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 e396e2d7
authored
Mar 26, 2026
by
yancanhua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 自测问题修改
1 parent
479a2475
Pipeline
#133
for
e396e2d7
failed
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
141 deletions
apps/web/venus-usedcar-quality/src/components.d.ts
apps/web/venus-usedcar-quality/src/components/CustomizeForm/Index.vue
apps/web/venus-usedcar-quality/src/utils/request.ts
apps/web/venus-usedcar-quality/src/components.d.ts
View file @
e396e2d
...
...
@@ -7,19 +7,19 @@ export {}
declare
module
'vue'
{
export
interface
GlobalComponents
{
ButtonSelect
:
typeof
import
(
'./components/
C
ustomizeForm/buttonSelect.vue'
)[
'default'
]
ButtonSelectAndImageUpload
:
typeof
import
(
'./components/
C
ustomizeForm/buttonSelectAndImageUpload.vue'
)[
'default'
]
CustomizeUploadFile
:
typeof
import
(
'./components/
C
ustomizeForm/customizeUploadFile.vue'
)[
'default'
]
Index
:
typeof
import
(
'./components/
C
ustomizeForm/Index.vue'
)[
'default'
]
ButtonSelect
:
typeof
import
(
'./components/
c
ustomizeForm/buttonSelect.vue'
)[
'default'
]
ButtonSelectAndImageUpload
:
typeof
import
(
'./components/
c
ustomizeForm/buttonSelectAndImageUpload.vue'
)[
'default'
]
CustomizeUploadFile
:
typeof
import
(
'./components/
c
ustomizeForm/customizeUploadFile.vue'
)[
'default'
]
Index
:
typeof
import
(
'./components/
c
ustomizeForm/Index.vue'
)[
'default'
]
Layouts
:
typeof
import
(
'./layouts/index.vue'
)[
'default'
]
LogoutConfirmModal
:
typeof
import
(
'./components/LogoutConfirmModal.vue'
)[
'default'
]
PageTitle
:
typeof
import
(
'./components/PageTitle.vue'
)[
'default'
]
PageTop
:
typeof
import
(
'./components/PageTop.vue'
)[
'default'
]
RadioSelect
:
typeof
import
(
'./components/
C
ustomizeForm/radioSelect.vue'
)[
'default'
]
RadioSelect
:
typeof
import
(
'./components/
c
ustomizeForm/radioSelect.vue'
)[
'default'
]
RouterLink
:
typeof
import
(
'vue-router'
)[
'RouterLink'
]
RouterView
:
typeof
import
(
'vue-router'
)[
'RouterView'
]
SelectDatePicker
:
typeof
import
(
'./components/
C
ustomizeForm/selectDatePicker.vue'
)[
'default'
]
SelectDropdown
:
typeof
import
(
'./components/
C
ustomizeForm/selectDropdown.vue'
)[
'default'
]
SelectDatePicker
:
typeof
import
(
'./components/
c
ustomizeForm/selectDatePicker.vue'
)[
'default'
]
SelectDropdown
:
typeof
import
(
'./components/
c
ustomizeForm/selectDropdown.vue'
)[
'default'
]
VanActionSheet
:
typeof
import
(
'vant/es'
)[
'ActionSheet'
]
VanButton
:
typeof
import
(
'vant/es'
)[
'Button'
]
VanDatePicker
:
typeof
import
(
'vant/es'
)[
'DatePicker'
]
...
...
@@ -49,6 +49,7 @@ declare module 'vue' {
VanTabbarItem
:
typeof
import
(
'vant/es'
)[
'TabbarItem'
]
VanTabs
:
typeof
import
(
'vant/es'
)[
'Tabs'
]
VanTag
:
typeof
import
(
'vant/es'
)[
'Tag'
]
VanVideo
:
typeof
import
(
'vant/es'
)[
'Video'
]
WorkOrderStatusTags
:
typeof
import
(
'./components/WorkOrderStatusTags.vue'
)[
'default'
]
}
}
apps/web/venus-usedcar-quality/src/components/CustomizeForm/Index.vue
View file @
e396e2d
...
...
@@ -23,12 +23,12 @@ const props = withDefaults(
/** `getInspectionTemplateDefault` 解包后的 data(与 nodeCode 等字段对应) */
templateDefaultData
?:
InspectionTemplateDefaultData
|
null
;
}
>
(),
{
leafNodes
:
()
=>
[],
bigModuleLabel
:
""
,
subTabLabel
:
""
,
allowNoStructure
:
false
,
templateDefaultData
:
null
,
});
leafNodes
:
()
=>
[],
bigModuleLabel
:
""
,
subTabLabel
:
""
,
allowNoStructure
:
false
,
templateDefaultData
:
null
,
});
type
InspectionColumnRow
=
InspectionNode
&
{
value
?:
number
|
string
;
...
...
@@ -245,7 +245,7 @@ async function getCarTypeListData() {
const
templateDefaultData
=
props
?.
templateDefaultData
||
{};
if
(
templateDefaultData
.
carSeriesId
)
{
const
res
=
await
getCarTypeList
(
templateDefaultData
.
carSeriesId
);
carTypeList
.
value
=
(
res
?.
data
?.
carinfos
||
[]).
map
(
item
=>
({
carTypeList
.
value
=
(
res
?.
carinfos
||
[]).
map
(
item
=>
({
text
:
item
.
name
||
""
,
value
:
String
(
item
.
id
)
||
""
,
}));
...
...
@@ -260,131 +260,92 @@ defineExpose({
</
script
>
<
template
>
<div>
<van-overlay
:show=
"pageLoading"
>
<div
class=
"loadingBox"
>
<van-loading
color=
"#1989fa"
size=
"24px"
vertical
>
加载中...
</van-loading>
</div>
</van-overlay>
<div
v-if=
"!pageLoading"
>
<van-form
ref=
"customizeFormRef"
:model=
"form"
:rules=
"rules"
>
<div
v-if=
"allowNoStructure"
class=
"formTitle"
>
<div
@
click=
"resultStatus = !resultStatus"
>
<van-icon
v-if=
"!resultStatus"
color=
"#666666"
name=
"circle"
size=
"14"
/>
<van-icon
v-if=
"resultStatus"
color=
"#185EFE"
name=
"checked"
size=
"14"
/>
<span
class=
"radioText"
>
无此结构
</span>
</div>
</div>
<div
v-for=
"(item, index) in columnsList"
:key=
"index"
class=
"customizeList"
:class=
"
{
'border-bottom': index
< columnsList
.
length
-
1
&&
item
.
interactionType
!=
'
image_upload
',
'
customizeList50
'
:
setImgWidth
(
item
)
}"
>
<!-- 文本输入框 -->
<div
v-if=
"item.interactionType == 'text_input'"
>
<van-field
v-model=
"item.value"
clearable
:label=
"item.nodeName"
:maxlength=
"getValidationRules(item).maxLength || 120"
:placeholder=
"item.placeholder"
:required=
"item.required === 1"
/>
</div>
<!-- 长文本输入框 -->
<div
v-if=
"item.interactionType == 'textarea_input'"
>
<van-field
v-model=
"item.value"
autosize
clearable
:label=
"item.nodeName"
:maxlength=
"getValidationRules(item).maxLength || 120"
:placeholder=
"item.placeholder"
:required=
"item.required === 1"
rows=
"2"
show-word-limit
type=
"textarea"
/>
</div>
<!-- 数字输入框 -->
<div
v-if=
"item.interactionType == 'number_input'"
>
<van-field
v-model=
"item.value"
clearable
:label=
"item.nodeName"
:max=
"getValidationRules(item).max || 100000"
:maxlength=
"getValidationRules(item).maxLength || 120"
:min=
"getValidationRules(item).min || 0"
:placeholder=
"item.placeholder"
:required=
"item.required === 1"
step=
"0.01"
type=
"number"
@
input=
"(e) =>
{ item.value = parseFloat(item.value)?.toFixed(getValidationRules(item).decimalDigits || 2) || '' }" />
</div>
<!-- 单选框 -->
<div
v-if=
"item.interactionType == 'radio_button_select'"
>
<radioSelect
:item=
"item"
:value=
"item.value"
@
update=
"(
{ value, valueText, valueKey }) => { item.value = value; item.valueText = valueText; item.valueKey = valueKey }" />
</div>
<!-- 日期选择器 -->
<div
v-if=
"item.interactionType == 'date_picker'"
>
<selectDatePicker
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
</div>
<!-- 下拉选择器 -->
<div
v-if=
"item.interactionType == 'dropdown'"
>
<selectDropdown
:car-type-list=
"carTypeList"
:item=
"item"
:value=
"item.value"
@
update=
"(
{ value, valueText, valueKey }) => { item.value = value; item.valueText = valueText; item.valueKey = valueKey }" />
</div>
<!-- 按钮选择器 -->
<div
v-if=
"item.interactionType == 'button_select'"
>
<buttonSelect
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
</div>
<!-- 图片上传 -->
<div
v-if=
"item.interactionType == 'image_upload' || item.interactionType == 'video_upload'"
>
<customizeUploadFile
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
</div>
<!-- image_upload_and_button_select -->
<div
v-if=
"item.interactionType == 'image_upload_and_button_select'"
>
<buttonSelect
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
<div
v-if=
"item.value"
>
<buttonSelectAndImageUpload
:item=
"item"
@
update=
"item.uploadValue = $event"
/>
</div>
</div>
</div>
</van-form>
</div>
</div>
<div>
<van-overlay
:show=
"pageLoading"
>
<div
class=
"loadingBox"
>
<van-loading
color=
"#1989fa"
size=
"24px"
vertical
>
加载中...
</van-loading>
</div>
</van-overlay>
<div
v-if=
"!pageLoading"
>
<van-form
ref=
"customizeFormRef"
:model=
"form"
:rules=
"rules"
>
<div
v-if=
"allowNoStructure"
class=
"formTitle"
>
<div
@
click=
"resultStatus = !resultStatus"
>
<van-icon
v-if=
"!resultStatus"
color=
"#666666"
name=
"circle"
size=
"14"
/>
<van-icon
v-if=
"resultStatus"
color=
"#185EFE"
name=
"checked"
size=
"14"
/>
<span
class=
"radioText"
>
无此结构
</span>
</div>
</div>
<div
v-for=
"(item, index) in columnsList"
:key=
"index"
class=
"customizeList"
:class=
"
{
'border-bottom': index
< columnsList
.
length
-
1
&&
item
.
interactionType
!=
'
image_upload
',
'
customizeList50
'
:
setImgWidth
(
item
)
}"
>
<!-- 文本输入框 -->
<div
v-if=
"item.interactionType == 'text_input'"
>
<van-field
v-model=
"item.value"
clearable
:label=
"item.nodeName"
:maxlength=
"getValidationRules(item).maxLength || 120"
:placeholder=
"item.placeholder"
:required=
"item.required === 1"
/>
</div>
<!-- 长文本输入框 -->
<div
v-if=
"item.interactionType == 'textarea_input'"
>
<van-field
v-model=
"item.value"
autosize
clearable
:label=
"item.nodeName"
:maxlength=
"getValidationRules(item).maxLength || 120"
:placeholder=
"item.placeholder"
:required=
"item.required === 1"
rows=
"2"
show-word-limit
type=
"textarea"
/>
</div>
<!-- 数字输入框 -->
<div
v-if=
"item.interactionType == 'number_input'"
>
<van-field
v-model=
"item.value"
clearable
:label=
"item.nodeName"
:max=
"getValidationRules(item).max || 100000"
:maxlength=
"getValidationRules(item).maxLength || 120"
:min=
"getValidationRules(item).min || 0"
:placeholder=
"item.placeholder"
:required=
"item.required === 1"
step=
"0.01"
type=
"number"
@
input=
"(e) =>
{ item.value = parseFloat(item.value)?.toFixed(getValidationRules(item).decimalDigits || 2) || '' }" />
</div>
<!-- 单选框 -->
<div
v-if=
"item.interactionType == 'radio_button_select'"
>
<radioSelect
:item=
"item"
:value=
"item.value"
@
update=
"(
{ value, valueText, valueKey }) => { item.value = value; item.valueText = valueText; item.valueKey = valueKey }" />
</div>
<!-- 日期选择器 -->
<div
v-if=
"item.interactionType == 'date_picker'"
>
<selectDatePicker
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
</div>
<!-- 下拉选择器 -->
<div
v-if=
"item.interactionType == 'dropdown'"
>
<selectDropdown
:car-type-list=
"carTypeList"
:item=
"item"
:value=
"item.value"
@
update=
"(
{ value, valueText, valueKey }) => { item.value = value; item.valueText = valueText; item.valueKey = valueKey }" />
</div>
<!-- 按钮选择器 -->
<div
v-if=
"item.interactionType == 'button_select'"
>
<buttonSelect
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
</div>
<!-- 图片上传 -->
<div
v-if=
"item.interactionType == 'image_upload' || item.interactionType == 'video_upload'"
>
<customizeUploadFile
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
</div>
<!-- image_upload_and_button_select -->
<div
v-if=
"item.interactionType == 'image_upload_and_button_select'"
>
<buttonSelect
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
<div
v-if=
"item.value"
>
<buttonSelectAndImageUpload
:item=
"item"
@
update=
"item.uploadValue = $event"
/>
</div>
</div>
</div>
</van-form>
</div>
</div>
</
template
>
<
style
lang=
"scss"
scoped
>
...
...
apps/web/venus-usedcar-quality/src/utils/request.ts
View file @
e396e2d
...
...
@@ -188,8 +188,7 @@ async function handleResponse<T>(
}
showToast
(
errMsg
);
// 后端调整后修改放开注释
// throw new ApiHandledError(errMsg);
throw
new
ApiHandledError
(
errMsg
);
}
// 非标准结构,直接返回 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