Commit 8e88d185 authored by miaojiale's avatar miaojiale

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

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