From 50cb00532dc67d66f6921687cba7e33982d5e2ce Mon Sep 17 00:00:00 2001 From: shidongli Date: Wed, 21 Sep 2022 18:02:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A4=E7=90=86=E7=AB=99=E4=BA=BA=E5=91=98?= =?UTF-8?q?=20=E5=B1=85=E4=BD=8F=E4=BF=A1=E6=81=AF=20=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/communityInfo/index.vue | 86 ++++++++++++++++------ src/views/system/patientArchives/index.vue | 12 +-- 2 files changed, 71 insertions(+), 27 deletions(-) diff --git a/src/views/system/communityInfo/index.vue b/src/views/system/communityInfo/index.vue index c36b3dc..65c316c 100644 --- a/src/views/system/communityInfo/index.vue +++ b/src/views/system/communityInfo/index.vue @@ -250,7 +250,7 @@ :key="item.areaCode" :label="item.areaName" :value="item.areaCode" - @click.native="province(item)" + @click.native="province2(item, index)" > @@ -266,7 +266,7 @@ :key="item.areaCode" :label="item.areaName" :value="item.areaCode" - @click.native="clickcity(item)" + @click.native="clickcity2(item, index)" > @@ -281,7 +281,7 @@ :key="item.areaCode" :label="item.areaName" :value="item.areaCode" - @click.native="clickarea(item)" + @click.native="clickarea2(item, index)" > @@ -296,7 +296,6 @@ :key="item.areaCode" :label="item.areaName" :value="item.areaCode" - @click.native="clickstreet(item)" > @@ -443,10 +442,10 @@ export default { city: "", area: "", areaCode: "", - value: "", - value3: "", - value2: "", - value1: "", + // value: "", + // value3: "", + // value2: "", + // value1: "", // 弹出层标题 title: "", // 是否显示弹出层 @@ -456,6 +455,10 @@ export default { queryParams: { pageNum: 1, pageSize: 10, + city: "", + area: "", + areaCode: "", + province: "", // areaCode: null, // communityCode: null, // communityName: null, @@ -550,13 +553,33 @@ export default { methods: { // 查询省事件 province(item) { + // this.form.xxx[index].code='' console.log(item); this.queryParams.city = ""; this.queryParams.area = ""; this.queryParams.areaCode = ""; - // this.value1 = ""; - // this.value2 = ""; - // this.value3 = ""; + // this.item.city = ""; + // this.item.area = ""; + // this.item.areaCode = ""; + SecondaryLevelInfo(item.id).then((res) => { + console.log(res); + this.SecondaryLevelInfolist = res.data; + // console.log(this.SecondaryLevelInfolist); + this.citylist = res.data; + }); + }, + + province2(item, index) { + this.form.communityInfoList[index].city = ""; + this.form.communityInfoList[index].area = ""; + this.form.communityInfoList[index].areaCode = ""; + console.log(item); + // this.queryParams.city = ""; + // this.queryParams.area = ""; + // this.queryParams.areaCode = ""; + // this.item.city = ""; + // this.item.area = ""; + // this.item.areaCode = ""; SecondaryLevelInfo(item.id).then((res) => { console.log(res); this.SecondaryLevelInfolist = res.data; @@ -566,10 +589,22 @@ export default { }, // 点击市 clickcity(item) { - this.queryParams.area = ""; - this.queryParams.areaCode = ""; - this.value2 = ""; - this.value3 = ""; + // this.queryParams.area = ""; + // this.queryParams.areaCode = ""; + // this.value2 = ""; + // this.value3 = ""; + console.log(item); + SecondaryLevelInfo(item.id).then((res) => { + console.log(res); + this.arealists = res.data; + }); + }, + + clickcity2(item, index) { + // this.queryParams.area = ""; + // this.queryParams.areaCode = ""; + // this.value2 = ""; + // this.value3 = ""; console.log(item); SecondaryLevelInfo(item.id).then((res) => { console.log(res); @@ -578,8 +613,18 @@ export default { }, //点击区县城 clickarea(item) { - // this.queryParams.areaCode = ""; - this.value3 = ""; + // this.queryParams.areaCode = ""; + // this.value3 = ""; + console.log(item); + SecondaryLevelInfo(item.id).then((res) => { + console.log(res); + this.streetlist = res.data; + }); + }, + + clickarea2(item, index) { + // this.queryParams.areaCode = ""; + // this.value3 = ""; console.log(item); SecondaryLevelInfo(item.id).then((res) => { console.log(res); @@ -588,8 +633,8 @@ export default { }, //点击街道 clickstreet(item) { - this.form.areaCode = item.areaCode; - console.log(this.form); + this.queryParams.areaCode = item.areaCode; + console.log(this.queryParams); }, // 所属省下拉框 loadMore() { @@ -660,13 +705,12 @@ export default { // 表单重置 reset() { this.form = { - communityInfoList: [ { province: "", city: "", area: "", - areaCodes: "", + // areaCodes: "", areaCode: "", communityCode: "", communityName: "", diff --git a/src/views/system/patientArchives/index.vue b/src/views/system/patientArchives/index.vue index 26117b1..b57f1d0 100644 --- a/src/views/system/patientArchives/index.vue +++ b/src/views/system/patientArchives/index.vue @@ -393,9 +393,9 @@ export default { this.queryParams.city = ""; this.queryParams.area = ""; this.queryParams.areaCode = ""; - this.value1 = ""; - this.value2 = ""; - this.value3 = ""; + // this.value1 = ""; + // this.value2 = ""; + // this.value3 = ""; SecondaryLevelInfo(item.id).then((res) => { console.log(res); this.SecondaryLevelInfolist = res.data; @@ -407,8 +407,8 @@ export default { clickcity(item) { this.queryParams.area = ""; this.queryParams.areaCode = ""; - this.value2 = ""; - this.value3 = ""; + // this.value2 = ""; + // this.value3 = ""; console.log(item); SecondaryLevelInfo(item.id).then((res) => { console.log(res); @@ -417,7 +417,7 @@ export default { }, //点击区县城 clickarea(item) { - this.value3 = ""; + // this.value3 = ""; console.log(item); SecondaryLevelInfo(item.id).then((res) => { console.log(res);