Commit f517ea87 authored by miaojiale's avatar miaojiale

1.评估提交弹窗

2.增加回显后逻辑
parent 06e97ac3
...@@ -112,6 +112,7 @@ ...@@ -112,6 +112,7 @@
:xl="item.span || 12" :xl="item.span || 12"
> >
<form-item-self <form-item-self
ref="formSelf"
:form="form" :form="form"
:column-index="columnIndex" :column-index="columnIndex"
:item="item" :item="item"
...@@ -180,6 +181,11 @@ export default { ...@@ -180,6 +181,11 @@ export default {
}, },
}, },
methods: { methods: {
clearAge() {
for (let i = 0; i < this.$refs.formSelf.length; i++) {
this.$refs.formSelf[i].age = ""
}
},
handleChange(key, val) { handleChange(key, val) {
if (this.form.hasOwnProperty(key)) this.form[key] = val if (this.form.hasOwnProperty(key)) this.form[key] = val
}, },
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
> >
<template v-if="options.column && options.column.length > 0"> <template v-if="options.column && options.column.length > 0">
<form-content <form-content
ref="form-content" ref="formContent"
:form="form" :form="form"
:columns="{ column: options.column }" :columns="{ column: options.column }"
:options="options" :options="options"
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
:name="`${gIndex}`" :name="`${gIndex}`"
> >
<form-content <form-content
ref="form-content" ref="formContent"
:form="form" :form="form"
:columns="g" :columns="g"
:options="options" :options="options"
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</template> </template>
<form-content <form-content
v-if="collapseNames.includes(g.prop)" v-if="collapseNames.includes(g.prop)"
ref="form-content" ref="formContent"
:form="form" :form="form"
:columns="g" :columns="g"
:options="options" :options="options"
...@@ -202,6 +202,12 @@ export default { ...@@ -202,6 +202,12 @@ export default {
} }
}, },
methods: { methods: {
clearAge() {
// 去除年龄文本
for (let i = 0; i < this.$refs.formContent.length; i++) {
this.$refs.formContent[i].clearAge()
}
},
// 显示不符合筛查条件 // 显示不符合筛查条件
showError(data) { showError(data) {
if (data) { if (data) {
......
...@@ -60,7 +60,6 @@ ...@@ -60,7 +60,6 @@
:columns="g" :columns="g"
:options="options" :options="options"
:is-show-important="isShowImportant" :is-show-important="isShowImportant"
@showError="showError"
:showIndex="g.showIndex" :showIndex="g.showIndex"
:class="g.showIndex ? 'simple-form' : 'index-form'" :class="g.showIndex ? 'simple-form' : 'index-form'"
></form-content> ></form-content>
...@@ -173,16 +172,6 @@ export default { ...@@ -173,16 +172,6 @@ export default {
}, },
methods: { methods: {
// 显示不符合筛查条件
showError(data) {
if (data) {
this.disabled = true
this.errorText = "不符合筛查条件"
} else {
this.disabled = false
this.errorText = ""
}
},
nextTab() { nextTab() {
const tabsLen = this.options.group.length const tabsLen = this.options.group.length
let active = Number(this.activeName) let active = Number(this.activeName)
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
width="40%" width="40%"
show-close show-close
@closed="cancelSubmit" @closed="cancelSubmit"
:close-on-click-modal="false"
:show-close="false"
> >
<slot name="content"></slot> <slot name="content"></slot>
<slot name="footer"></slot> <slot name="footer"></slot>
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
:key="form.id" :key="form.id"
:label="form.label" :label="form.label"
:name="'index' + index" :name="'index' + index"
disabled
> >
<transition mode="out-in" name="fade-transform"> <transition mode="out-in" name="fade-transform">
<div v-show="activeName === 'index' + index"> <div v-show="activeName === 'index' + index">
...@@ -49,11 +50,7 @@ ...@@ -49,11 +50,7 @@
</el-tabs> </el-tabs>
</div> </div>
<el-empty v-else description="暂无数据"></el-empty> <el-empty v-else description="暂无数据"></el-empty>
<public-dialog <public-dialog ref="showDialog">
ref="showDialog"
@onSubmit="dialogSubmit"
@onCancel="dialogCancel"
>
<!-- 保存草稿 --> <!-- 保存草稿 -->
<template v-if="dialogType == 'draft'" slot="content"> <template v-if="dialogType == 'draft'" slot="content">
<div class="title center">已保存至草稿箱!</div> <div class="title center">已保存至草稿箱!</div>
...@@ -83,7 +80,7 @@ ...@@ -83,7 +80,7 @@
type="primary" type="primary"
:loading="loading" :loading="loading"
class="textBtn" class="textBtn"
@click="view" @click="viewJump"
>查看</el-button >查看</el-button
> >
<el-button type="primary" :loading="loading" @click="continueSubmit" <el-button type="primary" :loading="loading" @click="continueSubmit"
...@@ -210,16 +207,33 @@ export default { ...@@ -210,16 +207,33 @@ export default {
// 临时保存草稿 // 临时保存草稿
this.dialogType = "draft" this.dialogType = "draft"
this.$refs.showDialog.dialogVisible = true this.$refs.showDialog.dialogVisible = true
this.loading = false
} else if (type == 2) {
//提交
this.dialogType = "submit"
this.$refs.showDialog.dialogVisible = true
this.loading = false this.loading = false
} else { } else {
// 返回 // 返回
this.$router.back() this.$router.back()
} }
}, },
dialogSubmit() {}, continueSubmit() {
dialogCancel() {}, sessionStorage.removeItem("index1Data")
continueSubmit() {}, this.activeName = "index0"
// 清空表单
for (let i = 0; i < this.$refs.formTabs.length; i++) {
this.$refs.formTabs[i].resetForm()
this.$refs.formTabs[i].initForm()
}
// 清空红字:不符合筛查条件
this.$refs.showDialog.dialogVisible = false
},
viewJump() {
// this.$router.push('/')
alert("跳转")
},
}, },
provide() { provide() {
return { return {
...@@ -274,6 +288,9 @@ export default { ...@@ -274,6 +288,9 @@ export default {
margin-top: 10px; margin-top: 10px;
} }
::v-deep { ::v-deep {
.el-tabs__item.is-disabled {
color: #252c49;
}
.el-tabs--card > .el-tabs__header { .el-tabs--card > .el-tabs__header {
width: calc(100% - 100px); width: calc(100% - 100px);
border-bottom: none; border-bottom: none;
......
...@@ -150,6 +150,12 @@ export default { ...@@ -150,6 +150,12 @@ export default {
}, },
}, },
methods: { methods: {
resetForm() {
this.$refs.form.resetForm(false)
this.$refs.form.showError(false)
// 清理年龄的回显
this.$refs.form.clearAge()
},
initData() { initData() {
this.formData.formRecordId = null this.formData.formRecordId = null
this.formCacheList = [] this.formCacheList = []
...@@ -236,7 +242,7 @@ export default { ...@@ -236,7 +242,7 @@ export default {
patientId: this.patientId || this.patientStandbyId, patientId: this.patientId || this.patientStandbyId,
formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
statusMap: { statusMap: {
patientFrom: this.$store.getters["table/selectedIndex"], patient_from: this.$store.getters["table/selectedIndex"],
is_draft: 1, //是否为草稿 is_draft: 1, //是否为草稿
check_status: 1, // 审核状态 check_status: 1, // 审核状态
}, },
......
...@@ -28,6 +28,7 @@ export default { ...@@ -28,6 +28,7 @@ export default {
let i = this.activeName.split("index")[1] - 0 let i = this.activeName.split("index")[1] - 0
i++ i++
if (i == 6) { if (i == 6) {
this.onSubmit(2)
return return
} else { } else {
this.activeName = "index" + i this.activeName = "index" + i
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment