From 84341976f769a1b07b9bc540d1c1c59df187e284 Mon Sep 17 00:00:00 2001 From: miaojiale <1123971748@qq.com> Date: Fri, 6 Jan 2023 17:23:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=97=85=E4=BE=8B=E9=83=A8?= =?UTF-8?q?=E5=88=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/WidgetConfig.vue | 4 +- packages/WidgetFormGroup.vue | 2 +- src/api/dataoverview.js | 12 + .../FormComponents/CustomForm/FormContent.vue | 8 +- .../CustomForm/FormItemSelf.vue | 75 +++- .../FormComponents/CustomForm/index.vue | 2 + .../FormComponents/CustomForm/text.js | 145 +++++++ src/components/Upload/index.vue | 180 +++------ src/components/UploadForOperation/index.vue | 356 ++++++++++++++++++ src/views/dataoverview/index.vue | 46 ++- .../screening/components/ConfigForms.vue | 71 +++- src/views/screening/components/FormTab.vue | 80 ++-- .../components/AcademicTrend.vue | 2 +- .../components/HealthPopularization.vue | 2 +- .../components/NewsMeeting.vue | 2 +- .../components/NoticeAnnouncement.vue | 2 +- .../components/scientificResearch.vue | 2 +- 17 files changed, 763 insertions(+), 228 deletions(-) create mode 100644 src/api/dataoverview.js create mode 100644 src/components/FormComponents/CustomForm/text.js create mode 100644 src/components/UploadForOperation/index.vue diff --git a/packages/WidgetConfig.vue b/packages/WidgetConfig.vue index 86f7aee..f7788c3 100644 --- a/packages/WidgetConfig.vue +++ b/packages/WidgetConfig.vue @@ -47,10 +47,10 @@ placeholder="标题" > - + diff --git a/packages/WidgetFormGroup.vue b/packages/WidgetFormGroup.vue index 022d697..af83bbf 100644 --- a/packages/WidgetFormGroup.vue +++ b/packages/WidgetFormGroup.vue @@ -73,7 +73,7 @@ > -
diff --git a/src/components/UploadForOperation/index.vue b/src/components/UploadForOperation/index.vue new file mode 100644 index 0000000..d8a6df5 --- /dev/null +++ b/src/components/UploadForOperation/index.vue @@ -0,0 +1,356 @@ + + + + + + diff --git a/src/views/dataoverview/index.vue b/src/views/dataoverview/index.vue index d310b4c..b27024e 100644 --- a/src/views/dataoverview/index.vue +++ b/src/views/dataoverview/index.vue @@ -28,6 +28,7 @@ diff --git a/src/views/screening/components/ConfigForms.vue b/src/views/screening/components/ConfigForms.vue index c0edf6f..4bf08b2 100644 --- a/src/views/screening/components/ConfigForms.vue +++ b/src/views/screening/components/ConfigForms.vue @@ -1,11 +1,15 @@ @@ -41,7 +46,11 @@
- + @@ -65,8 +76,16 @@
您可以在【筛查查询】页面查询到该数据
- 查看 - 继续添加 + 查看 + 继续添加
@@ -94,6 +113,7 @@ export default { // survivalFlag:false dialogType: "", loading: false, + formInitial: {}, // 第四步的数据 } }, methods: { @@ -126,18 +146,33 @@ export default { this.getCurrentFormByType(this.formType) }, watch: { - // activeName(val){ - // if(val=="index0" && this.formClass){ - // this.showIndex = false - // // this.survivalFlag = true - // console.log(1) - // } - // else{ - // this.showIndex = true - // // this.survivalFlag = false - // console.log(2) - // } - // } + activeName(val) { + if (val == "index3") { + // setTimeout(() => { + this.$nextTick(() => { + //! + this.formInitial = { + risk_rank: "中危", + risk_score: "5分", + screening_advise: "立刻住院", + } + }) + + // }, 300) + } else { + this.formInitial = {} + } + // 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: { survivalFlag() { diff --git a/src/views/screening/components/FormTab.vue b/src/views/screening/components/FormTab.vue index 8e26c55..39ce47d 100644 --- a/src/views/screening/components/FormTab.vue +++ b/src/views/screening/components/FormTab.vue @@ -14,11 +14,11 @@ @@ -42,7 +42,11 @@ --> -
+
@@ -77,6 +81,7 @@ import ReadForm from "@/components/FormComponents/ReadForm/index" import TagsScrollBar from "@/components/TagsScrollBar/index" export default { name: "FormTab", + components: { CustomForm, TagsScrollBar, ReadForm }, props: { externalScroll: Boolean, //外部滚动 disabled: Boolean, @@ -86,8 +91,8 @@ export default { patientStandbyId: String, getAll: Boolean, // 获取页面所有数据 survivalFlag: Boolean, //存活的显示 + formInitial: {}, // 第四步的数据 }, - components: { CustomForm, TagsScrollBar, ReadForm }, provide() { return { formId: this.form.formId, @@ -104,9 +109,9 @@ export default { widgetFormPreview: {}, formData: { formEdit: { - risk_rank: "中危", - risk_score: "5分", - screening_advise: "立刻住院", + // risk_rank: "中危", + // risk_score: "5分", + // screening_advise: "立刻住院", }, percent: {}, formRecordId: null, @@ -356,6 +361,39 @@ 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 @@ -517,28 +555,6 @@ export default { }) }, }, - 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 } - ) - } - }, }