Commit 8e88d185 authored by miaojiale's avatar miaojiale

修改第四部风险评估时数据回显问题

parent 5eee2d75
......@@ -149,7 +149,7 @@ export default {
watch: {
activeName(val) {
if (val == "index3") {
// setTimeout(() => {
// 第四步风险评估
this.$nextTick(() => {
//!
this.formInitial = {
......@@ -158,21 +158,9 @@ export default {
screening_advise: "立刻住院",
}
})
// }, 300)
} else {
this.formInitial = {}
this.formInitial = false
}
// if(val=="index0" && this.formClass){
// this.showIndex = false
// // this.survivalFlag = true
// console.log(1)
// }
// else{
// this.showIndex = true
// // this.survivalFlag = false
// console.log(2)
// }
},
},
computed: {
......
......@@ -92,6 +92,7 @@ export default {
getAll: Boolean, // 获取页面所有数据
survivalFlag: Boolean, //存活的显示
formEdit: Object,
formInitial: {},
},
provide() {
return {
......@@ -361,39 +362,6 @@ export default {
return this.loading || this.formloading
},
},
watch: {
formInitial: {
handler(v) {
if (v) {
this.$set(this.formData, "formEdit", { ...v })
console.log(this.formData.formEdit)
}
},
deep: true,
},
},
created() {
this.initForm()
if (this.getAll) {
// 监听patientId 获取页面所有数据
this.$watch(
"patientId",
() => {
this.initData()
},
{ immediate: true }
)
} else {
// 监听form.silent 获取当前tab页数据
this.$watch(
"form.silent",
() => {
this.initData()
},
{ immediate: true }
)
}
},
methods: {
initData() {
this.formData.formRecordId = null
......@@ -559,6 +527,15 @@ export default {
formEdit(val) {
console.log("回显3", val)
},
formInitial: {
handler(v) {
if (v) {
this.$set(this.formData, "formEdit", { ...v })
console.log(this.formData.formEdit)
}
},
deep: true,
},
},
created() {
if (this.$route.query.formEdit) {
......
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