From 856fbd7e5110fb3222513e982b9b543a7efdbe7e Mon Sep 17 00:00:00 2001 From: miaojiale <1123971748@qq.com> Date: Mon, 6 Mar 2023 14:37:50 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A4=84=E7=90=86=E6=95=B0=E6=8D=AE=E4=B8=BA?= =?UTF-8?q?=E6=95=B0=E5=AD=97=E7=B1=BB=E5=9E=8B=E8=BD=AC=E4=B8=BA=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2=E7=B1=BB=E5=9E=8B=202.=E5=A4=84=E7=90=86?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/followupentry/index.vue | 15 ++++++++------- src/views/followupresearch/index.vue | 2 +- src/views/screening/components/ConfigForms.vue | 6 ++++-- src/views/screening/components/FormTab.vue | 10 ++++++++-- src/views/screening/components/mixin.js | 2 +- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/views/followupentry/index.vue b/src/views/followupentry/index.vue index 7e501e9..5fe9b91 100644 --- a/src/views/followupentry/index.vue +++ b/src/views/followupentry/index.vue @@ -1,7 +1,11 @@ @@ -13,14 +17,11 @@ export default { ConfigForms, }, data() { - return { - } - }, - created() { + return {} }, + created() {}, methods: {}, } - + diff --git a/src/views/followupresearch/index.vue b/src/views/followupresearch/index.vue index a235e14..c1d532f 100644 --- a/src/views/followupresearch/index.vue +++ b/src/views/followupresearch/index.vue @@ -280,9 +280,9 @@ export default { }, rowOpration(data, i) { console.log("跳转", data, i) + sessionStorage.setItem("formEdit", JSON.stringify(data)) this.$router.push({ path: "/followupentry", - query: { formEdit: JSON.stringify(data) }, }) }, async handleSearch() { diff --git a/src/views/screening/components/ConfigForms.vue b/src/views/screening/components/ConfigForms.vue index bce1cd7..8b63c43 100644 --- a/src/views/screening/components/ConfigForms.vue +++ b/src/views/screening/components/ConfigForms.vue @@ -210,9 +210,11 @@ export default { }, }, created() { - // 字典formType 1 筛查表单 + // 字典formType 1 筛查表单 2随访表单 // console.log('回显2',this.formEdit) this.getCurrentFormByType(this.formType) + console.log(this.$route.path) + this.infoCompelete = this.$route.path == "/followupentry" ? true : false }, methods: { handleConfirm(data, done, cb) { @@ -244,7 +246,7 @@ export default { )[0] formTab.temporarySave() // console.log(formTab) - } else if (type == 2) { + } else if (type == 3) { //提交 this.dialogType = "submit" this.$refs.showDialog.dialogVisible = true diff --git a/src/views/screening/components/FormTab.vue b/src/views/screening/components/FormTab.vue index 0760567..4ca66e8 100644 --- a/src/views/screening/components/FormTab.vue +++ b/src/views/screening/components/FormTab.vue @@ -385,8 +385,14 @@ export default { }, }, created() { - if (this.$route.query.formEdit) { - this.formData.formEdit = JSON.parse(this.$route.query.formEdit) + if (sessionStorage.getItem("formEdit")) { + let data = JSON.parse(sessionStorage.getItem("formEdit")) + for (const key in data) { + if (typeof data[key] == "number") { + data[key] = data[key] + "" + } + } + this.formData.formEdit = data } this.initForm() if (this.getAll) { diff --git a/src/views/screening/components/mixin.js b/src/views/screening/components/mixin.js index c9535b7..c33ee4e 100644 --- a/src/views/screening/components/mixin.js +++ b/src/views/screening/components/mixin.js @@ -28,7 +28,7 @@ export default { let i = this.activeName.split("index")[1] - 0 i++ if (i == 6) { - this.onSubmit(2) + this.onSubmit(3) return } else { this.activeName = "index" + i -- 2.22.0