Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ad64fdaa
authored
Mar 26, 2026
by
chenwq1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 新增中间
1 parent
27cec057
Pipeline
#118
for
ad64fdaa
failed
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
16 deletions
apps/web/venus-usedcar-quality/src/components/CustomizeForm/Index.vue
apps/web/venus-usedcar-quality/src/views/car-detail/composables/useInspectModules.ts
apps/web/venus-usedcar-quality/src/views/car-detail/index.vue
apps/web/venus-usedcar-quality/src/components/CustomizeForm/Index.vue
View file @
ad64fda
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
watch
}
from
"vue"
;
import
{
ref
,
watch
}
from
"vue"
;
import
type
{
InspectionNode
}
from
"@api"
;
import
type
{
InspectionNode
,
InspectionTemplateDefaultData
}
from
"@api"
;
import
type
{
CustomizeFormValidateResult
}
from
"@/types/views/car-detail"
;
import
type
{
CustomizeFormValidateResult
}
from
"@/types/views/car-detail"
;
import
selectDatePicker
from
"@/components/CustomizeForm/selectDatePicker.vue"
;
import
selectDatePicker
from
"@/components/CustomizeForm/selectDatePicker.vue"
;
import
selectDropdown
from
"@/components/CustomizeForm/selectDropdown.vue"
;
import
selectDropdown
from
"@/components/CustomizeForm/selectDropdown.vue"
;
...
@@ -17,11 +17,14 @@ const props = withDefaults(
...
@@ -17,11 +17,14 @@ const props = withDefaults(
bigModuleLabel
?:
string
;
bigModuleLabel
?:
string
;
subTabLabel
?:
string
;
subTabLabel
?:
string
;
allowNoStructure
?:
boolean
;
allowNoStructure
?:
boolean
;
/** `getInspectionTemplateDefault` 解包后的 data(与 nodeCode 等字段对应) */
templateDefaultData
?:
InspectionTemplateDefaultData
|
null
;
}
>
(),
{
}
>
(),
{
leafNodes
:
()
=>
[],
leafNodes
:
()
=>
[],
bigModuleLabel
:
""
,
bigModuleLabel
:
""
,
subTabLabel
:
""
,
subTabLabel
:
""
,
allowNoStructure
:
false
,
allowNoStructure
:
false
,
templateDefaultData
:
null
,
});
});
type
InspectionColumnRow
=
InspectionNode
&
{
type
InspectionColumnRow
=
InspectionNode
&
{
...
...
apps/web/venus-usedcar-quality/src/views/car-detail/composables/useInspectModules.ts
View file @
ad64fda
...
@@ -74,6 +74,8 @@ export function useInspectModules(route: RouteLocationNormalizedLoaded) {
...
@@ -74,6 +74,8 @@ export function useInspectModules(route: RouteLocationNormalizedLoaded) {
const
showModulePicker
=
ref
(
false
);
const
showModulePicker
=
ref
(
false
);
const
loading
=
ref
(
false
);
const
loading
=
ref
(
false
);
const
activeSubKey
=
ref
<
number
|
string
>
(
""
);
const
activeSubKey
=
ref
<
number
|
string
>
(
""
);
/** `getInspectionTemplateDefault` 解包后的 data,供表单区等消费 */
const
templateDefaultData
=
ref
<
InspectionTemplateDefaultData
|
null
>
(
null
);
const
activeBigModule
=
computed
(
const
activeBigModule
=
computed
(
()
=>
()
=>
...
@@ -112,7 +114,7 @@ export function useInspectModules(route: RouteLocationNormalizedLoaded) {
...
@@ -112,7 +114,7 @@ export function useInspectModules(route: RouteLocationNormalizedLoaded) {
activeBigModule
.
value
?.
subTabs
[
0
]
activeBigModule
.
value
?.
subTabs
[
0
]
);
);
/** 有真实二级 Tab 时,当前是否为该大项的最后一个二级项
(用于底部主按钮「提交检测内容」)
*/
/** 有真实二级 Tab 时,当前是否为该大项的最后一个二级项 */
const
isLastSubTabOfActiveBigModule
=
computed
(()
=>
{
const
isLastSubTabOfActiveBigModule
=
computed
(()
=>
{
const
m
=
activeBigModule
.
value
;
const
m
=
activeBigModule
.
value
;
if
(
!
m
||
m
.
hasSecondaryTabs
!==
true
)
return
false
;
if
(
!
m
||
m
.
hasSecondaryTabs
!==
true
)
return
false
;
...
@@ -194,16 +196,17 @@ export function useInspectModules(route: RouteLocationNormalizedLoaded) {
...
@@ -194,16 +196,17 @@ export function useInspectModules(route: RouteLocationNormalizedLoaded) {
const
firstChild
=
list
[
0
];
const
firstChild
=
list
[
0
];
const
isDirectLeafChildren
=
firstChild
!==
undefined
&&
firstChild
.
nodeType
===
3
;
const
isDirectLeafChildren
=
firstChild
!==
undefined
&&
firstChild
.
nodeType
===
3
;
let
template
DefaultData
:
InspectionTemplateDefaultData
|
null
=
null
;
let
fetched
DefaultData
:
InspectionTemplateDefaultData
|
null
=
null
;
try
{
try
{
template
DefaultData
=
await
getInspectionTemplateDefault
(
taskId
.
value
);
fetched
DefaultData
=
await
getInspectionTemplateDefault
(
taskId
.
value
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
"获取模板默认值失败:"
,
error
);
console
.
error
(
"获取模板默认值失败:"
,
error
);
}
}
templateDefaultData
.
value
=
fetchedDefaultData
;
if
(
isDirectLeafChildren
)
{
if
(
isDirectLeafChildren
)
{
targetBigModule
.
hasSecondaryTabs
=
false
;
targetBigModule
.
hasSecondaryTabs
=
false
;
const
leafNodes
=
applyResolvedInitialValuesToLeafNodes
(
list
,
template
DefaultData
);
const
leafNodes
=
applyResolvedInitialValuesToLeafNodes
(
list
,
fetched
DefaultData
);
const
allDone
=
list
.
every
((
n
)
=>
isInspectionVoCompleted
(
n
.
inspectionResultVO
));
const
allDone
=
list
.
every
((
n
)
=>
isInspectionVoCompleted
(
n
.
inspectionResultVO
));
targetBigModule
.
subTabs
=
[
targetBigModule
.
subTabs
=
[
{
{
...
@@ -220,7 +223,7 @@ export function useInspectModules(route: RouteLocationNormalizedLoaded) {
...
@@ -220,7 +223,7 @@ export function useInspectModules(route: RouteLocationNormalizedLoaded) {
key
:
node
.
id
,
key
:
node
.
id
,
label
:
node
.
nodeName
,
label
:
node
.
nodeName
,
nodeId
:
node
.
id
,
nodeId
:
node
.
id
,
leafNodes
:
applyResolvedInitialValuesToLeafNodes
(
node
.
childrenNodes
,
template
DefaultData
),
leafNodes
:
applyResolvedInitialValuesToLeafNodes
(
node
.
childrenNodes
,
fetched
DefaultData
),
inspectionResultVO
:
node
.
inspectionResultVO
,
inspectionResultVO
:
node
.
inspectionResultVO
,
completedFlag
:
isInspectionVoCompleted
(
node
.
inspectionResultVO
)
?
1
:
0
,
completedFlag
:
isInspectionVoCompleted
(
node
.
inspectionResultVO
)
?
1
:
0
,
}));
}));
...
@@ -328,6 +331,7 @@ export function useInspectModules(route: RouteLocationNormalizedLoaded) {
...
@@ -328,6 +331,7 @@ export function useInspectModules(route: RouteLocationNormalizedLoaded) {
isLastSubTabOfActiveBigModule
,
isLastSubTabOfActiveBigModule
,
activeSubTab
,
activeSubTab
,
currentLeafNodes
,
currentLeafNodes
,
templateDefaultData
,
initializeInspection
,
initializeInspection
,
loadSubTabsForBigModule
,
loadSubTabsForBigModule
,
switchToUncompletedInspectionNode
,
switchToUncompletedInspectionNode
,
...
...
apps/web/venus-usedcar-quality/src/views/car-detail/index.vue
View file @
ad64fda
...
@@ -87,7 +87,8 @@
...
@@ -87,7 +87,8 @@
:active-sub-tab=
"activeBigModule"
:active-sub-tab=
"activeBigModule"
:big-module-label=
"activeBigModule?.label"
:big-module-label=
"activeBigModule?.label"
:leaf-nodes=
"currentLeafNodes"
:leaf-nodes=
"currentLeafNodes"
:sub-tab-label=
"activeSubTab?.label"
/>
:sub-tab-label=
"activeSubTab?.label"
:template-default-data=
"templateDefaultData"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -106,7 +107,7 @@
...
@@ -106,7 +107,7 @@
提交评分
提交评分
</van-button>
</van-button>
</
template
>
</
template
>
<!-- 普通检测页:有二级时上一步 + 下一步;无二级时仅
完成检测
(全宽) -->
<!-- 普通检测页:有二级时上一步 + 下一步;无二级时仅
下一步
(全宽) -->
<
template
v-else
>
<
template
v-else
>
<van-button
v-if=
"activeBigModule?.hasSecondaryTabs !== false"
<van-button
v-if=
"activeBigModule?.hasSecondaryTabs !== false"
class=
"btn-save"
class=
"btn-save"
...
@@ -124,13 +125,7 @@
...
@@ -124,13 +125,7 @@
round
round
type=
"primary"
type=
"primary"
@
click=
"onNext"
>
@
click=
"onNext"
>
{{
下一步
activeBigModule
?.
hasSecondaryTabs
===
false
?
"完成检测"
:
isLastSubTabOfActiveBigModule
?
"提交检测内容"
:
"下一步"
}}
</van-button>
</van-button>
</
template
>
</
template
>
</div>
</div>
...
@@ -191,6 +186,7 @@ const customizeFormRef = ref<InstanceType<typeof customizeForm> | null>(null);
...
@@ -191,6 +186,7 @@ const customizeFormRef = ref<InstanceType<typeof customizeForm> | null>(null);
const
inspectionScoreFormRef
=
ref
<
InstanceType
<
typeof
ScoreForm
>
|
null
>
(
null
);
const
inspectionScoreFormRef
=
ref
<
InstanceType
<
typeof
ScoreForm
>
|
null
>
(
null
);
const
modules
=
useInspectModules
(
route
);
const
modules
=
useInspectModules
(
route
);
const
templateDefaultData
=
modules
.
templateDefaultData
;
const
{
const
{
submitting
,
submitting
,
onSelectBigModule
,
onSelectBigModule
,
...
@@ -213,7 +209,6 @@ const {
...
@@ -213,7 +209,6 @@ const {
showInspectionProgressBar
,
showInspectionProgressBar
,
progressTotal
,
progressTotal
,
progressDone
,
progressDone
,
isLastSubTabOfActiveBigModule
,
activeSubTab
,
activeSubTab
,
currentLeafNodes
,
currentLeafNodes
,
initializeInspection
,
initializeInspection
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment