Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yuzhenWang
yd-csf-front
Commits
6bbe241c
Commit
6bbe241c
authored
Jan 06, 2026
by
yuzhenWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
先提交测试
parent
20e7b750
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
308 additions
and
135 deletions
+308
-135
src/api/common.js
+38
-0
src/views/sign/FnaList/edit.vue
+3
-1
src/views/sign/appointment/appointmentEdit.vue
+19
-10
src/views/sign/appointment/components/fileUpload.vue
+248
-101
src/views/sign/appointment/components/healthInfo.vue
+0
-23
No files found.
src/api/common.js
View file @
6bbe241c
...
...
@@ -159,3 +159,41 @@ export function importExcel(data) {
data
:
data
})
}
// 上传获取材料列表
export
function
uploadMaterialList
(
data
)
{
return
request
({
url
:
'/oss/api/material/list'
,
data
:
data
,
method
:
'post'
})
}
// 删除上传文件
export
function
delUploadFile
(
fileBizId
)
{
return
request
({
url
:
`/oss/api/ossFile/del?fileBizId=
${
fileBizId
}
`
,
method
:
'delete'
})
}
// 上传获取材料列表2
export
function
uploadRelObjectMaterialList
(
data
)
{
return
request
({
url
:
'/oss/api/relObjectMaterial/page'
,
data
:
data
,
method
:
'post'
})
}
// 删除材料
export
function
delMaterial
(
relObjectMaterialBizId
)
{
return
request
({
url
:
`/oss/api/relObjectMaterial/del?relObjectMaterialBizId=
${
relObjectMaterialBizId
}
`
,
method
:
'delete'
})
}
// 获取文件详情
export
function
uploadOssFileList
(
data
)
{
return
request
({
url
:
'/oss/api/ossFile/list'
,
data
:
data
,
method
:
'post'
})
}
src/views/sign/FnaList/edit.vue
View file @
6bbe241c
...
...
@@ -379,7 +379,9 @@ const getDictsData = async () => {
'wj_question_second_category'
,
'csf_ap_policy_transfer'
,
'md_bank'
,
'csf_property_type'
'csf_property_type'
,
'oss_data_type'
,
'oss_data_person'
])
}
...
...
src/views/sign/appointment/appointmentEdit.vue
View file @
6bbe241c
...
...
@@ -262,6 +262,7 @@
@
handleSuccessEdit=
"getAppointmentInfo(idsObj.appointmentBizId)"
:pageSource=
"pageSource"
:showSubmitBtn=
"showSubmitBtn"
ref=
"appointmentAccessoriesRef"
/>
</div>
<div
v-if=
"tab.name === 'policyInfo'"
>
...
...
@@ -418,6 +419,7 @@ const insuredInfoRef = ref(null)
const
secondHolderInfoRef
=
ref
(
null
)
const
beneficiaryInfoRef
=
ref
(
null
)
const
policyTransferRef
=
ref
(
null
)
const
appointmentAccessoriesRef
=
ref
(
null
)
const
questionnairesInfoRef
=
ref
(
null
)
const
customerInfo
=
ref
({})
const
idsObj
=
ref
({})
//各个模块的bizId
...
...
@@ -815,7 +817,9 @@ const getDictsData = async () => {
'wj_question_first_category'
,
'wj_question_second_category'
,
'csf_ap_status'
,
'md_bank'
'md_bank'
,
'oss_data_type'
,
'oss_data_person'
])
}
// Tab切换前的验证
...
...
@@ -868,15 +872,20 @@ const handleSubmit = async type => {
// await secondHolderInfoRef.value[0].handleFormValues()
// if (!submitAppointmentObj.value.apiSecondHolderInfoDto) return
// }
if
(
beneficiaryInfoRef
.
value
)
{
submitAppointmentObj
.
value
.
apiBeneficiaryInfoFzDto
=
await
beneficiaryInfoRef
.
value
[
0
].
handleFormValues
()
if
(
!
submitAppointmentObj
.
value
.
apiBeneficiaryInfoFzDto
)
return
}
if
(
questionnairesInfoRef
.
value
&&
questionnairesInfoRef
.
value
[
0
].
questionLength
>
0
)
{
submitAppointmentObj
.
value
.
questionnairesDetailResponse
=
await
questionnairesInfoRef
.
value
[
0
].
handleFormValues
()
if
(
!
submitAppointmentObj
.
value
.
questionnairesDetailResponse
)
return
// if (beneficiaryInfoRef.value) {
// submitAppointmentObj.value.apiBeneficiaryInfoFzDto =
// await beneficiaryInfoRef.value[0].handleFormValues()
// if (!submitAppointmentObj.value.apiBeneficiaryInfoFzDto) return
// }
// if (questionnairesInfoRef.value && questionnairesInfoRef.value[0].questionLength > 0) {
// submitAppointmentObj.value.questionnairesDetailResponse =
// await questionnairesInfoRef.value[0].handleFormValues()
// if (!submitAppointmentObj.value.questionnairesDetailResponse) return
// }
if
(
appointmentAccessoriesRef
.
value
)
{
submitAppointmentObj
.
value
.
materialDtoList
=
appointmentAccessoriesRef
.
value
[
0
].
handleFormValues
()
if
(
!
submitAppointmentObj
.
value
.
materialDtoList
)
return
}
console
.
log
(
'大提交'
,
submitAppointmentObj
.
value
)
return
...
...
src/views/sign/appointment/components/fileUpload.vue
View file @
6bbe241c
<
template
>
<!-- :limit="limit" :on-exceed="handleExceed"-->
<div>
<!-- 来自新单跟进的不需要上传预约附件,只能看预约附件 -->
<div
v-if=
"props.pageSource !== 'policyList'"
>
<div
class=
"fileUploadBox"
>
<el-upload
:action=
"uploadImgUrl"
:headers=
"headers"
:show-file-list=
"false"
:on-success=
"uploadSuccess"
:before-upload=
"handleBeforeUpload"
<div
class=
"uploadContainer"
>
<CardOne
title=
"材料信息"
>
<template
#
content
>
<el-table
v-loading=
"loading"
:data=
"fileTableList"
boder
>
<el-table-column
label=
"序号"
type=
"index"
width=
"55"
/>
<el-table-column
label=
"资料人"
align=
"center"
prop=
"dataPerson"
width=
"200"
>
<template
#
default=
"scope"
>
<dict-tag
:options=
"fetchDictData('oss_data_person')"
:value=
"scope.row.dataPerson"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"资料类型"
align=
"center"
prop=
"dataType"
width=
"200"
>
<
template
#
default=
"scope"
>
<dict-tag
:options=
"fetchDictData('oss_data_type')"
:value=
"scope.row.dataType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"注意事项"
align=
"center"
prop=
"precautions"
/>
<el-table-column
label=
"上传状态"
align=
"center"
prop=
"status"
v-if=
"fileTableList.length > 0 && fileTableList[0].relObjectMaterialBizId"
>
<div
class=
"uploadBox"
>
<el-icon
size=
"20"
><DocumentAdd
/></el-icon>
<div
class=
"file"
>
选择文件
</div>
</div>
</el-upload>
</div>
<div
class=
"tip"
>
(支持Word,Excel,PDF,图片格式)
</div>
</div>
<el-table
v-loading=
"loading"
:data=
"fileTableList"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
/>
-->
<el-table-column
label=
"序号"
type=
"index"
width=
"50"
/>
<el-table-column
label=
"文件名"
align=
"center"
prop=
"fileName"
width=
"200"
/>
<!-- sortable -->
<el-table-column
label=
"上传时间"
align=
"center"
prop=
"createTime"
width=
"200"
>
<
template
#
default=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
<span
v-if=
"scope.row.status === 1"
>
已上传
</span>
<span
v-if=
"scope.row.status === 0"
style=
"color: red"
>
待上传
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"上传人"
align=
"center"
prop=
"creatorName"
/>
<el-table-column
label=
"文件类型"
align=
"center"
prop=
"fileType"
/>
<el-table-column
label=
"操作"
align=
"center"
width=
"25
0"
width=
"18
0"
class-name=
"small-padding fixed-width"
fixed=
"right"
>
<
template
#
default=
"scope"
>
<el-button
type=
"primary"
link
@
click=
"downloadFile(scope.row)"
>
下载
</el-button
>
<!--
<el-button
type=
"primary"
link
@
click=
"downloadFile(scope.row)"
>
下载
</el-button>
--
>
<el-button
v-if=
"isImageFile(scope.row.fileName)"
type=
"primary"
link
@
click=
"handleView(scope.row)"
@
click=
"handleUploadFile(scope.row)"
v-if=
"scope.row.fileBizIdList.length == 0"
>
查看
上传
</el-button>
<el-button
v-if=
"props.pageSource !== 'policyList'
"
v-if=
"props.pageSource !== 'policyList' && scope.row.fileBizIdList.length > 0
"
type=
"primary"
link
@
click=
"handleUpdate(scope.row)"
>
修改
</el-button
>
查看
</el-button
>
<el-button
v-if=
"props.pageSource !== 'policyList'"
...
...
@@ -65,32 +61,62 @@
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total >= 0"
:total=
"total"
v-model:page=
"queryParams.pageNo"
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getFileList"
/>
<el-dialog
title=
"重命名文件"
v-model=
"editVisible"
width=
"800px"
append-to-body
>
<el-form>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"文件名"
>
<el-input
v-model=
"form.fileName"
placeholder=
"请输入文件名"
maxlength=
"300"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
</CardOne>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"canelEdit"
>
取 消
</el-button>
<CommonDialog
dialogTitle=
"上传附件"
cancleText=
"取消"
confirmText=
"确认"
dialogWidth=
"70%"
:openDialog=
"editVisible"
@
close=
"editVisible = false"
@
confirm=
"handleSubmitUpload"
:showClose=
"true"
>
<div
class=
"dialogBox"
>
<div
class=
"dialogLeft"
>
<div
class=
"fileUploadBox"
>
<el-upload
:action=
"uploadImgUrl"
:headers=
"headers"
multiple
:limit=
"limit"
:show-file-list=
"false"
:on-exceed=
"handleExceed"
:on-success=
"uploadSuccess"
:before-upload=
"handleBeforeUpload"
>
<div
class=
"uploadBox"
>
<el-icon
size=
"20"
><DocumentAdd
/></el-icon>
<div
class=
"file"
>
选择文件
</div>
</div>
</
template
>
</el-dialog>
<!-- 图片查看器 -->
</el-upload>
</div>
<div
class=
"tip"
>
(支持Word,Excel,PDF,图片格式)
</div>
</div>
<div
class=
"dialogRight"
>
<div
v-if=
"uploadedFiles.length === 0"
style=
"color: #999; padding: 20px; text-align: center"
>
暂无上传文件
</div>
<el-scrollbar
max-height=
"300px"
>
<div
v-for=
"(file, index) in uploadedFiles"
:key=
"file.fileBizId"
class=
"uploaded-file-item"
>
<div
class=
"fileName"
>
{{ file.originalName }}
</div>
<el-icon
color=
"red"
size=
"18"
@
click=
"removeUploadedFile(file, index)"
><Delete
/></el-icon>
</div>
</el-scrollbar>
</div>
</div>
</CommonDialog>
<el-dialog
v-model=
"imageViewerVisible"
title=
"图片预览"
width=
"60%"
>
<div
style=
"text-align: center"
>
<el-image
:src=
"imageUrl"
fit=
"contain"
/>
...
...
@@ -100,60 +126,96 @@
</template>
<
script
setup
name=
"FileUpload"
>
import
CommonDialog
from
'@/components/commonDialog'
import
CardOne
from
'@/components/formCard/cardOne'
import
{
getToken
}
from
'@/utils/auth'
import
{
addFile
,
getAppointmentFile
,
delFile
,
editAppointmentFile
}
from
'@/api/sign/appointment'
import
useDictStore
from
'@/store/modules/dict'
import
{
uploadMaterialList
,
delUploadFile
,
uploadRelObjectMaterialList
,
uploadOssFileList
}
from
'@/api/common'
const
props
=
defineProps
({
activeName
:
{
type
:
String
,
default
:
''
},
//tab名称
idsObj
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的id对象
pageSource
:
{
type
:
String
,
default
:
''
}
//页面来源
})
const
dictStore
=
useDictStore
()
//获取字典数据
const
{
proxy
}
=
getCurrentInstance
()
const
editVisible
=
ref
(
false
)
const
loading
=
ref
(
true
)
const
total
=
ref
(
0
)
const
fileTableList
=
ref
([])
const
limit
=
ref
(
2
)
const
limit
=
ref
(
10
)
const
fileSize
=
ref
(
10
)
const
headers
=
ref
({
Authorization
:
'Bearer '
+
getToken
()
})
const
uploadImgUrl
=
ref
(
import
.
meta
.
env
.
VITE_APP_BASE_API
+
'/oss/api/oss/upload'
)
// 上传的服务器地址
// 图片查看相关状态
const
imageViewerVisible
=
ref
(
false
)
const
imageUrl
=
ref
(
''
)
const
tempFileTableList
=
ref
([])
const
data
=
reactive
({
form
:
{},
queryParams
:
{
pageNo
:
1
,
pageSize
:
4
,
startTime
:
''
,
endTime
:
''
,
appointmentBizId
:
props
.
idsObj
.
appointmentBizId
objectType
:
'appointment'
}
})
const
{
queryParams
,
form
}
=
toRefs
(
data
)
const
canelEdit
=
()
=>
{
// 新增:用于存储已上传成功的文件列表
const
uploadedFiles
=
ref
([])
const
currentUploadRow
=
ref
([])
const
handleSubmitUpload
=
()
=>
{
if
(
uploadedFiles
.
value
.
length
>
0
)
{
fileTableList
.
value
.
forEach
(
item
=>
{
if
(
item
.
materialBizId
==
currentUploadRow
.
value
.
materialBizId
)
{
item
.
fileBizIdList
=
JSON
.
parse
(
JSON
.
stringify
(
uploadedFiles
.
value
))
}
})
}
editVisible
.
value
=
false
form
.
value
=
{}
console
.
log
(
'fileTableList'
,
fileTableList
.
value
)
}
const
submitForm
=
()
=>
{
let
obj
=
{
appointmentFileBizId
:
form
.
value
.
appointmentFileBizId
,
fileName
:
form
.
value
.
fileName
// 获取字典数据
const
fetchDictData
=
dictType
=>
{
let
options
=
[]
try
{
dictStore
.
dictTypeLists
.
forEach
(
item
=>
{
if
(
item
.
dictType
==
'sys_no_yes'
)
{
item
.
dictItemList
.
forEach
(
item2
=>
{
item2
.
value
=
String
(
item2
.
itemValue
)
})
}
editAppointmentFile
(
obj
).
then
(
response
=>
{
if
(
response
.
code
==
200
)
{
proxy
.
$modal
.
msgSuccess
(
'文件名修改成功'
)
editVisible
.
value
=
false
getFileList
()
if
(
item
.
dictType
==
dictType
)
{
options
=
item
.
dictItemList
}
})
return
options
}
catch
(
error
)
{
console
.
error
(
'获取字典数据失败:'
,
error
)
return
[]
}
}
// 重置上传列表(比如关闭弹窗时清空)
const
resetUploadedList
=
()
=>
{
uploadedFiles
.
value
=
[]
}
const
handleUploadFile
=
row
=>
{
currentUploadRow
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
editVisible
.
value
=
true
}
const
handleDetele
=
row
=>
{
proxy
.
$modal
.
confirm
(
'是否确认删除
名称为"'
+
row
.
fileName
+
'"的文件
?'
)
.
confirm
(
'是否确认删除
此行数据
?'
)
.
then
(
function
()
{
return
delFile
(
row
.
appointmentFileBizId
)
if
(
row
.
relObjectMaterialBizId
)
{
return
delMaterial
(
row
.
relObjectMaterialBizId
)
}
else
{
fileTableList
.
value
.
splice
(
row
.
index
,
1
)
}
})
.
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
...
...
@@ -167,8 +229,22 @@ const isImageFile = fileName => {
return
/
\.(
jpg|jpeg|png|gif|bmp|webp|svg|ico
)
$/i
.
test
(
fileName
||
''
)
}
const
handleUpdate
=
row
=>
{
currentUploadRow
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
if
(
row
.
relObjectMaterialBizId
)
{
try
{
uploadOssFileList
({
objectBizId
:
row
.
relObjectMaterialBizId
}).
then
(
response
=>
{
uploadedFiles
.
value
=
response
.
data
editVisible
.
value
=
true
})
}
catch
(
error
)
{
uploadedFiles
.
value
=
[]
proxy
.
$message
.
error
(
'文件获取失败'
)
}
}
else
{
editVisible
.
value
=
true
form
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
uploadedFiles
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
row
.
fileBizIdList
))
}
}
const
handleView
=
row
=>
{
imageUrl
.
value
=
row
.
fileUrl
...
...
@@ -208,57 +284,104 @@ function handleBeforeUpload(file) {
function
handleExceed
()
{
proxy
.
$modal
.
msgError
(
`一次只能上传
${
limit
.
value
}
个文件!`
)
}
const
uploadSuccess
=
res
=>
{
console
.
log
(
'上传成功'
,
res
)
if
(
res
.
code
==
200
)
{
if
(
props
.
idsObj
.
appointmentBizId
)
{
let
submitObj
=
{
appointmentBizId
:
props
.
idsObj
.
appointmentBizId
,
fileUrl
:
res
.
data
.
url
,
fileName
:
res
.
data
.
originalName
,
ossFileBizId
:
res
.
data
.
fileBizId
// 文件上传成功回调
const
uploadSuccess
=
(
res
,
file
,
fileList
)
=>
{
console
.
log
(
'上传成功'
,
res
,
file
)
if
(
res
.
code
===
200
)
{
// 构造前端使用的文件对象(保留原始 file 信息 + 后端返回的 url 等)
const
uploadedFile
=
{
fileBizId
:
res
.
data
.
fileBizId
,
// 用于唯一标识
originalName
:
res
.
data
.
originalName
||
file
.
name
,
url
:
res
.
data
.
url
,
size
:
file
.
size
,
raw
:
file
.
raw
// 原始 File 对象(如需后续操作)
}
addFile
(
submitObj
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
uploadedFiles
.
value
.
push
(
uploadedFile
)
proxy
.
$message
.
success
(
'文件上传成功'
)
queryParams
.
value
.
pageNo
=
1
getFileList
()
// emit('handleSuccessEdit')
}
else
{
proxy
.
$message
.
error
(
res
.
msg
||
'上传失败'
)
}
}
// 删除已上传的文件(仅从列表移除,不调用后端删除)
const
removeUploadedFile
=
(
file
,
index
)
=>
{
try
{
delUploadFile
(
file
.
fileBizId
).
then
(
response
=>
{
uploadedFiles
.
value
.
splice
(
index
,
1
)
})
}
}
catch
(
error
)
{
proxy
.
$message
.
error
(
'文件删除失败'
)
}
}
const
getFileList
=
()
=>
{
loading
.
value
=
true
try
{
getAppointmentFile
(
queryParams
.
value
).
then
(
response
=>
{
total
.
value
=
response
.
data
.
total
fileTableList
.
value
=
response
.
data
.
records
if
(
!
props
.
idsObj
.
appointmentBizId
)
{
uploadMaterialList
(
queryParams
.
value
).
then
(
response
=>
{
fileTableList
.
value
=
response
.
data
if
(
fileTableList
.
value
.
length
>
0
)
{
for
(
const
item
of
fileTableList
.
value
)
{
item
.
fileType
=
'预约文件'
fileTableList
.
value
.
forEach
(
item
=>
{
item
.
fileBizIdList
=
[]
})
}
loading
.
value
=
false
})
}
else
{
let
obj
=
{
objectType
:
'appointment'
,
objectBizId
:
props
.
idsObj
.
appointmentBizId
}
uploadRelObjectMaterialList
(
obj
).
then
(
response
=>
{
fileTableList
.
value
=
response
.
data
loading
.
value
=
false
})
}
if
(
tempFileTableList
.
value
.
length
>
0
)
{
fileTableList
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tempFileTableList
.
value
))
}
}
catch
(
error
)
{
fileTableList
.
value
=
[]
}
finally
{
loading
.
value
=
false
}
}
const
handleFormValues
=
()
=>
{
let
submitData
=
[]
fileTableList
.
value
.
forEach
(
item
=>
{
if
(
item
.
fileBizIdList
.
length
>
0
)
{
submitData
.
push
({
materialBizId
:
item
.
materialBizId
,
fileBizIdList
:
item
.
fileBizIdList
.
map
(
item
=>
item
.
fileBizId
)
})
}
})
return
submitData
}
// 关闭弹窗时清空已上传列表
watch
(
editVisible
,
newVal
=>
{
if
(
!
newVal
)
{
resetUploadedList
()
}
})
watch
(
()
=>
props
.
activeName
,
newVal
=>
{
tempFileTableList
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
fileTableList
.
value
))
if
(
newVal
===
'accessories'
)
{
queryParams
.
value
.
pageNo
=
1
getFileList
()
}
}
)
// 暴露给父组件
defineExpose
({
handleFormValues
})
</
script
>
<
style
lang=
"scss"
scoped
>
.uploadContainer
{
padding-left
:
10px
;
padding-top
:
10px
;
}
.fileUploadBox
{
display
:
flex
;
flex-direction
:
column
;
...
...
@@ -267,12 +390,14 @@ watch(
width
:
100%
;
padding
:
20px
0
;
border
:
1px
dashed
#dcdfe6
;
height
:
200px
;
}
.uploadBox
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
height
:
100%
;
.file
{
font-size
:
14px
;
margin-top
:
10px
;
...
...
@@ -284,4 +409,26 @@ watch(
color
:
#909399
;
margin
:
10px
0
20px
0
;
}
.dialogBox
{
width
:
100%
;
display
:
flex
;
justify-content
:
space-between
;
}
.dialogLeft
{
width
:
40%
;
}
.dialogRight
{
width
:
55%
;
}
.uploaded-file-item
{
width
:
100%
;
background
:
rgba
(
247
,
248
,
250
,
1
);
border-radius
:
4px
;
padding
:
10px
;
margin-bottom
:
5px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
16px
;
}
</
style
>
src/views/sign/appointment/components/healthInfo.vue
View file @
6bbe241c
...
...
@@ -454,30 +454,7 @@ const handleFormValues = () => {
}
)
}
)
}
// 表单提交
const
submitForm
=
()
=>
{
proxy
.
$refs
[
'heathFormRef'
].
validate
((
valid
,
fields
)
=>
{
if
(
valid
)
{
let
submitObj
=
handleFormValues
()
saveQuestionnaires
(
submitObj
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
handleEditStatus
(
true
)
proxy
.
$message
.
success
(
'健康信息修改成功'
)
// emit('handleSuccessEdit')
getQuestionnairesInfo
()
}
}
)
errorFields
.
value
=
[]
// 清空错误信息
}
else
{
// 获取校验失败的字段信息
errorFields
.
value
=
getInvalidFields
(
fields
)
if
(
errorFields
.
value
.
length
>
0
)
{
proxy
.
$message
.
error
(
errorFields
.
value
[
0
].
message
)
}
}
}
)
}
const
getQuestionnairesInfo
=
()
=>
{
loading
.
value
=
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment