From 2eccb6f6bc90642c6fd38a9d3b8db27492390151 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Thu, 22 Dec 2022 21:03:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20SQL=E5=8F=82=E6=95=B0=E5=9C=A8=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E7=BB=84=E4=BB=B6=E4=B8=AD=E6=8C=89=E8=A1=A8=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=AD=97=E6=AE=B5=E6=97=B6=E5=87=BA=E7=8E=B0=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/panel/filter/FilterDialog.vue | 1 + .../panel/filter/filterMain/FilterControl.vue | 45 ++++++++++++++++--- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/frontend/src/views/panel/filter/FilterDialog.vue b/frontend/src/views/panel/filter/FilterDialog.vue index 4944e9e7ca..1e201bb583 100644 --- a/frontend/src/views/panel/filter/FilterDialog.vue +++ b/frontend/src/views/panel/filter/FilterDialog.vue @@ -275,6 +275,7 @@ :control-attrs="myAttrs" :child-views="childViews" :dataset-params="datasetParams" + :activeName="activeName" /> diff --git a/frontend/src/views/panel/filter/filterMain/FilterControl.vue b/frontend/src/views/panel/filter/filterMain/FilterControl.vue index 288168622f..352138253b 100644 --- a/frontend/src/views/panel/filter/filterMain/FilterControl.vue +++ b/frontend/src/views/panel/filter/filterMain/FilterControl.vue @@ -215,12 +215,12 @@ v-model="attrs.parameters" > -
+
[] + }, + activeName:{ + } }, data() { @@ -327,16 +330,41 @@ export default { } this.attrs.parameters = parameters } - this.allParams = this.childViews.datasetParams + this.allParams = JSON.parse(JSON.stringify(this.childViews.datasetParams)) } }, 'datasetParams': { handler(newName, oldName) { + this.allParams = JSON.parse(JSON.stringify(this.childViews.datasetParams)) if (this.datasetParams.length > 0) { - this.allParams = this.childViews.datasetParams for (var j = 0; j < this.datasetParams.length; j++) { + var hasParam = false for (var i = 0; i < this.childViews.datasetParams.length; i++) { - if (this.childViews.datasetParams[i].id.split('|DE|')[0] !== this.datasetParams[j].id.split('|DE|')[0]) { + if (this.childViews.datasetParams[i].id === this.datasetParams[j].id) { + hasParam = true + } + } + if(!hasParam){ + this.allParams.push(this.datasetParams[j]) + } + } + } + } + }, + 'activeName':{ + handler(newName, oldName) { + if(this.activeName === 'assembly'){ + this.allParams = JSON.parse(JSON.stringify(this.childViews.datasetParams)) + }else { + if (this.datasetParams.length > 0) { + for (var j = 0; j < this.datasetParams.length; j++) { + var hasParam = false + for (var i = 0; i < this.childViews.datasetParams.length; i++) { + if (this.childViews.datasetParams[i].id === this.datasetParams[j].id) { + hasParam = true + } + } + if(!hasParam){ this.allParams.push(this.datasetParams[j]) } } @@ -475,6 +503,13 @@ export default { overflow: hidden; } +.span-div2 { + width: 350px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} + .de-ul li { margin: 5px 2px; cursor: pointer;