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 36081662
authored
Mar 25, 2026
by
yancanhua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 页面优化
1 parent
a075417c
Pipeline
#105
for
36081662
failed
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
51 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/components.d.ts
View file @
3608166
...
...
@@ -30,6 +30,7 @@ declare module 'vue' {
VanImage
:
typeof
import
(
'vant/es'
)[
'Image'
]
VanList
:
typeof
import
(
'vant/es'
)[
'List'
]
VanLoading
:
typeof
import
(
'vant/es'
)[
'Loading'
]
VanOverlay
:
typeof
import
(
'vant/es'
)[
'Overlay'
]
VanPicker
:
typeof
import
(
'vant/es'
)[
'Picker'
]
VanPopup
:
typeof
import
(
'vant/es'
)[
'Popup'
]
VanProgress
:
typeof
import
(
'vant/es'
)[
'Progress'
]
...
...
apps/web/venus-usedcar-quality/src/components/CustomizeForm/Index.vue
View file @
3608166
...
...
@@ -26,9 +26,17 @@ const resultStatus = ref(false);
const
form
=
ref
({});
const
rules
=
ref
({});
//加载中
const
pageLoading
=
ref
(
false
);
watch
(()
=>
props
.
leafNodes
,
(
nodes
)
=>
{
pageLoading
.
value
=
true
;
columnsList
.
value
=
(
nodes
||
[]).
map
((
item
:
any
)
=>
({
...
item
,
value
:
getValueText
(
item
),
}));
console
.
log
(
'watchLeafNodes'
,
columnsList
.
value
);
setTimeout
(()
=>
{
pageLoading
.
value
=
false
;
},
1000
);
},
{
immediate
:
true
,
deep
:
true
});
...
...
@@ -162,68 +170,76 @@ defineExpose({
<
template
>
<div>
<van-form
ref=
"customizeFormRef"
:model=
"form"
:rules=
"rules"
>
<div
v-if=
"allowNoStructure"
class=
"formTitle"
>
<div
@
click=
"resultStatus = !resultStatus"
>
<van-icon
v-if=
"!resultStatus"
name=
"circle"
size=
"14"
color=
"#666666"
/>
<van-icon
v-if=
"resultStatus"
name=
"checked"
size=
"14"
color=
"#185EFE"
/>
<span
class=
"radioText"
>
无此结构
</span>
</div>
<van-overlay
:show=
"pageLoading"
>
<div
class=
"loadingBox"
>
<van-loading
size=
"24px"
color=
"#1989fa"
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"
name=
"circle"
size=
"14"
color=
"#666666"
/>
<van-icon
v-if=
"resultStatus"
name=
"checked"
size=
"14"
color=
"#185EFE"
/>
<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-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 == '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
:label=
"item.nodeName"
:maxlength=
"getValidationRules(item).maxLength || 120"
clearable
:placeholder=
"item.placeholder"
:required=
"item.required === 1"
rows=
"2"
show-word-limit
type=
"textarea"
/>
</div>
<!-- 长文本输入框 -->
<div
v-if=
"item.interactionType == 'textarea_input'"
>
<van-field
v-model=
"item.value"
autosize
:label=
"item.nodeName"
:maxlength=
"getValidationRules(item).maxLength || 120"
clearable
: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"
:label=
"item.nodeName"
clearable
:maxlength=
"getValidationRules(item).maxLength || 120"
:placeholder=
"item.placeholder"
:required=
"item.required === 1"
type=
"number"
/>
</div>
<!-- 数字输入框 -->
<div
v-if=
"item.interactionType == 'number_input'"
>
<van-field
v-model=
"item.value"
:label=
"item.nodeName"
clearable
:maxlength=
"getValidationRules(item).maxLength || 120"
:placeholder=
"item.placeholder"
:required=
"item.required === 1"
type=
"number"
/>
</div>
<!-- 单选框 -->
<div
v-if=
"item.interactionType == 'radio_button_select'"
>
<radioSelect
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
</div>
<!-- 单选框 -->
<div
v-if=
"item.interactionType == 'radio_button_select'"
>
<radioSelect
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
</div>
<!-- 日期选择器 -->
<div
v-if=
"item.interactionType == 'date_picker'"
>
<selectDatePicker
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
</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
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
</div>
<!-- 下拉选择器 -->
<div
v-if=
"item.interactionType == 'dropdown'"
>
<selectDropdown
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
</div>
<!-- 按钮选择器 -->
<div
v-if=
"item.interactionType == 'button_select'"
>
<buttonSelect
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
</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>
<!-- 图片上传 -->
<div
v-if=
"item.interactionType == 'image_upload' || item.interactionType == 'video_upload'"
>
<customizeUploadFile
:item=
"item"
:value=
"item.value"
@
update=
"item.value = $event"
/>
</div>
</div>
</van-form>
</div>
</van-form>
</div>
</div>
</
template
>
...
...
@@ -255,4 +271,13 @@ defineExpose({
.border-bottom
{
border-bottom
:
1px
solid
#e6ebf5
;
}
.loadingBox
{
width
:
80px
;
height
:
80px
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
}
</
style
>
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