From bf460ad63d349e720b45b9243883ae99a9558bf2 Mon Sep 17 00:00:00 2001 From: "382696293@qq.com" <382696293@qq.com> Date: Wed, 3 Jan 2024 14:13:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E7=AE=A1=E7=90=86-=E7=9C=81?= =?UTF-8?q?=E5=B8=82=E5=8C=BA=E8=81=94=E5=8A=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flossom-ui/src/views/system/member/index.vue | 73 +++++++++++++++++--- 1 file changed, 65 insertions(+), 8 deletions(-) diff --git a/flossom-ui/src/views/system/member/index.vue b/flossom-ui/src/views/system/member/index.vue index 974282b..33a61e7 100644 --- a/flossom-ui/src/views/system/member/index.vue +++ b/flossom-ui/src/views/system/member/index.vue @@ -62,7 +62,7 @@ + @keyup.enter.native="handleQuery" filterable clearable @clear="clearOption(1)"> - - + - + { this.provinceList = Response.data }) }, getCityList(pid, isSave) { + if (pid == '') { + return; + } + this.queryParams.cityId = null; + this.queryParams.areaId = null; getRegionByPid(pid).then(Response => { if (isSave) { this.saveCityList = Response.data; @@ -1065,6 +1069,10 @@ export default { }) }, getAreaByPid(pid, isSave) { + if (pid == '') { + return; + } + this.queryParams.areaId = null; getRegionByPid(pid).then(Response => { if (isSave) { this.saveAreaList = Response.data; @@ -1073,6 +1081,55 @@ export default { } }) }, + // 查询条件-省市区清空 + clearOption(option) { + // 省级清空 + if (option == 1) { + this.queryParams.cityId = null; + this.queryParams.areaId = null; + this.cityList = null; + this.areaList = null; + } + // 市级清空 + if (option == 2) { + this.queryParams.areaId = null; + this.areaList = null; + } + }, + // 修改-获取省市区 + getSaveCityList(pid) { + if (pid == '') { + return; + } + this.form.cityId = null; + this.form.areaId = null; + getRegionByPid(pid).then(Response => { + this.saveCityList = Response.data; + }) + }, + getSaveAreaByPid(pid) { + if (pid == '') { + return; + } + this.form.areaId = null; + getRegionByPid(pid).then(Response => { + this.saveAreaList = Response.data; + }) + }, + clearSaveOption(option) { + // 省级清空 + if (option == 1) { + this.form.cityId = null; + this.form.areaId = null; + this.saveCityList = null; + this.saveAreaList = null; + } + // 市级清空 + if (option == 2) { + this.form.areaId = null; + this.saveAreaList = null; + } + }, // 取消按钮 cancel() { this.open = false;