diff --git a/src/views/screening/components/ConfigForms.vue b/src/views/screening/components/ConfigForms.vue index a6dd43e8123c0cc77158d5ec1afbbbac933e4bb9..dee4b57ff661baa5e42799f1c0c9c4c086cc2fab 100644 --- a/src/views/screening/components/ConfigForms.vue +++ b/src/views/screening/components/ConfigForms.vue @@ -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: { diff --git a/src/views/screening/components/FormTab.vue b/src/views/screening/components/FormTab.vue index 39428fb9fffe00eb9d41dc0d9ad4ff0a54e2b083..f1df7a565f6c308956cd993b40fc64e747bb7df5 100644 --- a/src/views/screening/components/FormTab.vue +++ b/src/views/screening/components/FormTab.vue @@ -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) {