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 37a856f5
authored
Mar 26, 2026
by
yancanhua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 自测问题调整
1 parent
ad64fdaa
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
8 deletions
apps/web/venus-usedcar-quality/src/api/modules/inspect-report/inspect-report.ts
apps/web/venus-usedcar-quality/src/components/CustomizeForm/Index.vue
apps/web/venus-usedcar-quality/src/components/CustomizeForm/selectDropdown.vue
apps/web/venus-usedcar-quality/src/utils/request.ts
apps/web/venus-usedcar-quality/src/api/modules/inspect-report/inspect-report.ts
View file @
37a856f
...
@@ -176,3 +176,7 @@ export interface DetailRes {
...
@@ -176,3 +176,7 @@ export interface DetailRes {
export
function
detail
(
recordId
:
number
)
{
export
function
detail
(
recordId
:
number
)
{
return
get
<
DetailRes
>
(
`/rest/inspectionRecord/
${
recordId
}
/detail`
);
return
get
<
DetailRes
>
(
`/rest/inspectionRecord/
${
recordId
}
/detail`
);
}
}
export
function
getCarTypeList
(
csId
:
number
)
{
return
get
<
DetailRes
>
(
`/rest/ropApi/getCarTypeList?csId=
${
csId
}
`
);
}
apps/web/venus-usedcar-quality/src/components/CustomizeForm/Index.vue
View file @
37a856f
...
@@ -9,6 +9,8 @@ import radioSelect from "@/components/CustomizeForm/radioSelect.vue";
...
@@ -9,6 +9,8 @@ import radioSelect from "@/components/CustomizeForm/radioSelect.vue";
import
customizeUploadFile
from
"@/components/CustomizeForm/customizeUploadFile.vue"
;
import
customizeUploadFile
from
"@/components/CustomizeForm/customizeUploadFile.vue"
;
import
buttonSelectAndImageUpload
from
"@/components/CustomizeForm/buttonSelectAndImageUpload.vue"
;
import
buttonSelectAndImageUpload
from
"@/components/CustomizeForm/buttonSelectAndImageUpload.vue"
;
import
{
getCarTypeList
}
from
"@/api/modules/inspect-report"
;
// 获取父组件传递数据
// 获取父组件传递数据
const
props
=
withDefaults
(
const
props
=
withDefaults
(
...
@@ -49,6 +51,7 @@ watch(() => props.leafNodes, (nodes) => {
...
@@ -49,6 +51,7 @@ watch(() => props.leafNodes, (nodes) => {
value
:
getValueText
(
item
),
value
:
getValueText
(
item
),
}))
as
InspectionColumnRow
[];
}))
as
InspectionColumnRow
[];
console
.
log
(
'watchLeafNodes'
,
columnsList
.
value
);
console
.
log
(
'watchLeafNodes'
,
columnsList
.
value
);
getCarTypeListData
();
setTimeout
(()
=>
{
setTimeout
(()
=>
{
pageLoading
.
value
=
false
;
pageLoading
.
value
=
false
;
},
1200
);
},
1200
);
...
@@ -194,21 +197,25 @@ async function validate(): Promise<CustomizeFormValidateResult> {
...
@@ -194,21 +197,25 @@ async function validate(): Promise<CustomizeFormValidateResult> {
}
}
});
});
return
{
const
returnData
=
{
data
:
nodesData
,
data
:
nodesData
,
message
:
message
||
"操作成功"
,
message
:
message
||
"操作成功"
,
success
:
success
,
success
:
success
,
};
}
console
.
log
(
'validate'
,
returnData
);
return
returnData
;
}
}
/** 与 `validate` 相同返回结构,不校验必填,用于静默保存 / 上一步等场景 */
/** 与 `validate` 相同返回结构,不校验必填,用于静默保存 / 上一步等场景 */
async
function
saveData
():
Promise
<
CustomizeFormValidateResult
>
{
async
function
saveData
():
Promise
<
CustomizeFormValidateResult
>
{
const
nodesData
=
setSubmitData
();
const
nodesData
=
setSubmitData
();
return
{
const
returnData
=
{
data
:
nodesData
,
data
:
nodesData
,
message
:
"操作成功"
,
message
:
"操作成功"
,
success
:
true
,
success
:
true
,
};
}
console
.
log
(
'saveData'
,
returnData
);
return
returnData
;
}
}
function
getValidationRules
(
item
:
any
)
{
function
getValidationRules
(
item
:
any
)
{
...
@@ -226,6 +233,20 @@ function setImgWidth(item: any) {
...
@@ -226,6 +233,20 @@ function setImgWidth(item: any) {
return
resultStatus
return
resultStatus
}
}
const
carTypeList
=
ref
([]);
async
function
getCarTypeListData
()
{
const
templateDefaultData
=
props
?.
templateDefaultData
||
{};
if
(
templateDefaultData
.
carSeriesId
)
{
const
res
=
await
getCarTypeList
(
templateDefaultData
.
carSeriesId
);
carTypeList
.
value
=
(
res
?.
data
?.
carinfos
||
[]).
map
(
item
=>
({
text
:
item
.
name
||
''
,
value
:
String
(
item
.
id
)
||
''
,
}));
}
}
defineExpose
({
defineExpose
({
validate
,
validate
,
saveData
,
saveData
,
...
@@ -291,7 +312,8 @@ defineExpose({
...
@@ -291,7 +312,8 @@ defineExpose({
<!-- 下拉选择器 -->
<!-- 下拉选择器 -->
<div
v-if=
"item.interactionType == 'dropdown'"
>
<div
v-if=
"item.interactionType == 'dropdown'"
>
<selectDropdown
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
<selectDropdown
:item=
"item"
:carTypeList=
"carTypeList"
:value=
"item.value"
@
update=
"item.value = $event"
/>
</div>
</div>
<!-- 按钮选择器 -->
<!-- 按钮选择器 -->
...
...
apps/web/venus-usedcar-quality/src/components/CustomizeForm/selectDropdown.vue
View file @
37a856f
...
@@ -6,6 +6,10 @@ const props = defineProps({
...
@@ -6,6 +6,10 @@ const props = defineProps({
type
:
Object
,
type
:
Object
,
default
:
()
=>
{
},
default
:
()
=>
{
},
},
},
carTypeList
:
{
type
:
Array
,
default
:
()
=>
{
},
},
});
});
const
emit
=
defineEmits
([
"update"
]);
const
emit
=
defineEmits
([
"update"
]);
...
@@ -43,7 +47,6 @@ function initData() {
...
@@ -43,7 +47,6 @@ function initData() {
}
}
}
}
onConfirm
();
onConfirm
();
console
.
log
(
'pickerValue.value2222222222222222222'
,
pickerValue
.
value
);
}
}
// 计算属性
// 计算属性
...
@@ -55,9 +58,11 @@ const columnsList = computed(() => {
...
@@ -55,9 +58,11 @@ const columnsList = computed(() => {
value
:
valueList
[
0
]
||
""
,
value
:
valueList
[
0
]
||
""
,
};
};
});
});
return
optionsList
;
return
props
.
item
.
nodeName
===
"车型"
?
props
.
carTypeList
:
optionsList
;
});
});
function
onConfirm
()
{
function
onConfirm
()
{
const
picker
=
pickerValue
.
value
&&
pickerValue
.
value
.
length
>
0
?
pickerValue
.
value
[
0
]
:
""
;
const
picker
=
pickerValue
.
value
&&
pickerValue
.
value
.
length
>
0
?
pickerValue
.
value
[
0
]
:
""
;
showPicker
.
value
=
false
;
showPicker
.
value
=
false
;
...
...
apps/web/venus-usedcar-quality/src/utils/request.ts
View file @
37a856f
...
@@ -188,7 +188,8 @@ async function handleResponse<T>(
...
@@ -188,7 +188,8 @@ async function handleResponse<T>(
}
}
showToast
(
errMsg
);
showToast
(
errMsg
);
throw
new
ApiHandledError
(
errMsg
);
// 后端调整后修改放开注释
//throw new ApiHandledError(errMsg);
}
}
// 非标准结构,直接返回 data
// 非标准结构,直接返回 data
...
...
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