From ee0894dce97ce61797237149f77f419e6953d3e5 Mon Sep 17 00:00:00 2001 From: "[li_she]" <[li.she@xujiesoft.com]> Date: Thu, 6 Jan 2022 17:59:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E6=95=B0=E6=8D=AE=E5=88=97?= =?UTF-8?q?=E8=A1=A8=20sxm=202022-1-6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/{list.vue => Chooselist.vue} | 18 +++++++++++++----- src/views/modules/sys/language/common.vue | 10 +++++----- 2 files changed, 18 insertions(+), 10 deletions(-) rename src/views/modules/common/{list.vue => Chooselist.vue} (92%) diff --git a/src/views/modules/common/list.vue b/src/views/modules/common/Chooselist.vue similarity index 92% rename from src/views/modules/common/list.vue rename to src/views/modules/common/Chooselist.vue index d828c7f..30d3505 100644 --- a/src/views/modules/common/list.vue +++ b/src/views/modules/common/Chooselist.vue @@ -23,7 +23,7 @@ - 查询 + 查询 @@ -78,7 +78,8 @@ export default { param1: '', param2: '', param3: '', - param4: '', + param: '', + param4: this.$store.state.user.site, dataList: [], baseListData: { caption1: '', @@ -90,14 +91,16 @@ export default { fieldname2: '', sqlcode: '', tagno: '', - } + }, + defaultParam: false } }, methods: { // 获取 用户的配置 - init(tagNo) { + init(tagNo,param) { this.visible = true; + this.param = param // 根据 tagNo 获取列表 getChooselist({"tagNo": tagNo}).then(({data}) => { this.columnList = [] @@ -140,11 +143,16 @@ export default { } this.columnList.push(column) }) + this.getDataList(true) }) this.dataListLoading = false + }, - getDataList() { + getDataList(bool) { let sql = this.baseListData.sqlcode + if (bool){ + sql += " and (" + this.baseListData.fieldname1 + " like '%" + this.param + "%' OR "+this.baseListData.fieldname2 + " like '%" + this.param + "%'" +" ) " + } if (this.param1) { sql += " and " + this.baseListData.fieldname1 + " like '%" + this.param1 + "%'" } diff --git a/src/views/modules/sys/language/common.vue b/src/views/modules/sys/language/common.vue index bfbaf4a..a66fdd6 100644 --- a/src/views/modules/sys/language/common.vue +++ b/src/views/modules/sys/language/common.vue @@ -82,7 +82,7 @@ - + @@ -134,7 +134,7 @@