Commit f517ea87 authored by miaojiale's avatar miaojiale

1.评估提交弹窗

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