From eb26c21882c7140bf715319f2bc643e1e3748500 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Thu, 23 Jun 2022 13:33:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B8=E9=85=B8=E6=A3=80=E6=B5=8B=E7=82=B9?= =?UTF-8?q?=E3=80=81=E7=96=AB=E8=8B=97=E6=8E=A5=E7=A7=8D=E7=82=B9=20PC=20?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...icpointnucleicmonitoring-add-or-update.vue | 2 +- .../point/icpointnucleicmonitoring.vue | 73 ++++++++++++++++++- ...pointvaccinesinoculation-add-or-update.vue | 70 +++++++----------- .../point/icpointvaccinesinoculation.vue | 40 ++++------ 4 files changed, 112 insertions(+), 73 deletions(-) diff --git a/src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue b/src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue index 98ae2884..b18b80e7 100644 --- a/src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue +++ b/src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue @@ -202,7 +202,7 @@ export default { }; }, }, - created() { + mounted() { this.getFormInfo(); this.initMap(); }, diff --git a/src/views/modules/plugins/point/icpointnucleicmonitoring.vue b/src/views/modules/plugins/point/icpointnucleicmonitoring.vue index eb39591a..6d29c40f 100644 --- a/src/views/modules/plugins/point/icpointnucleicmonitoring.vue +++ b/src/views/modules/plugins/point/icpointnucleicmonitoring.vue @@ -6,8 +6,35 @@ :model="dataForm" @keyup.enter.native="getDataList()" > - - + + + + + + + + + + + + + + + + + + + + + {{ $t("query") }} @@ -169,14 +196,52 @@ export default { deleteIsBatch: true, }, dataForm: { - id: "", + name: "", + mobile: "", + orgId: "" }, + organizationList: [], + orgIds:[] }; }, components: { AddOrUpdate, }, + created(){ + this.getFormInfo() + }, methods: { + // 获取所属组织列表 + getFormInfo() { + this.$http + .post(`/gov/org/agency/getOrgTreeListByCustomerId`) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg); + } + this.organizationList = res.data; + this.deleteChildren(this.organizationList) + }) + .catch(() => {}); + }, + deleteChildren(arr) { + let childs = arr + for (let i = childs.length; i--; i > 0) { + if (childs[i].children) { + if (childs[i].children.length) { + this.deleteChildren(childs[i].children) + } else { + delete childs[i].children + } + } + } + return arr + }, + orgChangeHandle () { + this.dataForm.orgId = this.orgIds[this.orgIds.length-1] + console.log(this.dataForm) + + }, handleExportModule() { let title = "核酸检测点模板"; let url = "/epmetuser/icPointNucleicMonitoring/exporttemplate"; @@ -257,7 +322,7 @@ export default { let fileFormData = new FormData(); fileFormData.append("file", this.files); //filename是键,file是值,就是要传的文件,test.zip是要传的文件名 - url = "/epmetuser/icPointNucleicMonitoring/pointNucleicMonitoringImport"; + url = "/epmetuser/icPointNucleicMonitoring/pointImport"; window.app.ajax.post2(url,fileFormData,(data, rspMsg) => { if (data.code === 0 && data.msg == "success") { diff --git a/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue b/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue index f5a950b1..3df9077e 100644 --- a/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue +++ b/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue @@ -7,21 +7,17 @@ @keyup.enter.native="dataFormSubmitHandle()" label-width="120px" > - - - - - - - + + + + + + + + + + + 暂无疫苗 @@ -162,7 +158,7 @@ export default { latitude: "36.0722275", }, keyWords: null, - organizationList: [], + // organizationList: [], }; }, computed: { @@ -175,20 +171,6 @@ export default { trigger: "blur", }, ], - orgId: [ - { - required: true, - message: this.$t("validate.required"), - trigger: "blur", - }, - ], - orgName: [ - { - required: true, - message: this.$t("validate.required"), - trigger: "blur", - }, - ], name: [ { required: true, @@ -270,7 +252,7 @@ export default { }, }, mounted() { - this.getFormInfo(); + // this.getFormInfo(); this.initMap(); }, methods: { @@ -381,17 +363,17 @@ export default { ]); }, // 获取所属组织列表 - getFormInfo() { - this.$http - .post(`/gov/org/agency/community-list`) - .then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg); - } - this.organizationList = res.data; - }) - .catch(() => {}); - }, + // getFormInfo() { + // this.$http + // .post(`/gov/org/agency/community-list`) + // .then(({ data: res }) => { + // if (res.code !== 0) { + // return this.$message.error(res.msg); + // } + // this.organizationList = res.data; + // }) + // .catch(() => {}); + // }, init() { this.visible = true; this.$nextTick(() => { diff --git a/src/views/modules/plugins/point/icpointvaccinesinoculation.vue b/src/views/modules/plugins/point/icpointvaccinesinoculation.vue index 9668e34f..a62fe0ee 100644 --- a/src/views/modules/plugins/point/icpointvaccinesinoculation.vue +++ b/src/views/modules/plugins/point/icpointvaccinesinoculation.vue @@ -6,8 +6,11 @@ :model="dataForm" @keyup.enter.native="getDataList()" > - - + + + + + {{ $t("query") }} @@ -36,7 +39,7 @@ - + + + + + + @@ -133,18 +136,6 @@ header-align="center" align="center" > - - { if (data.code === 0 && data.msg == "success") {