From 2297d49895d3687073e46e35a8d44dcc2522673b Mon Sep 17 00:00:00 2001 From: yaojn Date: Tue, 2 Jan 2024 16:35:16 +0800 Subject: [PATCH 1/3] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B-=E7=BC=96=E8=BE=91=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=A8=A1=E5=9E=8B=E5=B1=82=E7=BA=A7=E6=9C=89?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=EF=BC=8C=E4=BD=86=E6=B2=A1=E6=9C=89=E5=9B=9E?= =?UTF-8?q?=E6=98=BE=20=20-=20[=E5=85=B3=E8=81=94]#[1054875905916928]?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=A8=A1=E5=9E=8B-=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E6=97=B6=EF=BC=8C=E6=A8=A1=E5=9E=8B=E5=B1=82?= =?UTF-8?q?=E7=BA=A7=E6=9C=89=E6=95=B0=E6=8D=AE=EF=BC=8C=E4=BD=86=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=9B=9E=E6=98=BE=20http://192.168.0.96:8090/demo/rdm?= =?UTF-8?q?.html#/bug-detail/939050947543040/939050947543057/1054875905916?= =?UTF-8?q?928?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/plugins/TsForm/TsFormSelect.vue | 11 +++++------ .../pages/cmdb/resourceentity/mapping-setting.vue | 1 + .../cmdb/resourceentity/typecomponent/const-type.vue | 1 + .../resourceentity/typecomponent/globalattr-type.vue | 4 +++- .../cmdb/resourceentity/typecomponent/rel-type.vue | 1 + 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/resources/plugins/TsForm/TsFormSelect.vue b/src/resources/plugins/TsForm/TsFormSelect.vue index 3f475b7b..279047d8 100755 --- a/src/resources/plugins/TsForm/TsFormSelect.vue +++ b/src/resources/plugins/TsForm/TsFormSelect.vue @@ -654,7 +654,7 @@ export default { this.multiple ? (this.currentValue = [this.nodeList[0][this.valueName]]) : (this.currentValue = this.nodeList[0][this.valueName]); //是单选,进行赋值处理 this.searchKeyWord = !this.multiple ? '' : ''; - this.isSingel = !!(this.isSquare && this.currentSearch); + this.isSingel = !!this.isSquare; this.onChangeValue(); } }, @@ -679,7 +679,7 @@ export default { //url let params = {}; this.nodeList = []; - this.isSingel = !!(this.isSquare && this.currentSearch); // 解决文本占位符显示不出来问题 + this.isSingel = !!this.isSquare; this.getDataByAjax(params, this.url, 'cancelAxios1').then(res => { this.nodeList = res; @@ -709,7 +709,7 @@ export default { this.nodeList && this.nodeList.length > 20 && this.search === null ? (this.currentSearch = true) : (this.currentSearch = this.search); //当search参数值不存在时 如果长度大于20增加搜索功能, this.setDefaultValue(); this.initValueByNodeList(); - this.isSingel = !!(this.isSquare && this.currentSearch); // 解决文本占位符显示不出来问题 + this.isSingel = !!this.isSquare; this.handleEchoFailedDefaultValue(); } }, @@ -903,7 +903,7 @@ export default { if (!this.multiple) { //是单选,进行赋值处理 this.searchKeyWord = ''; - this.isSingel = !!(this.isSquare && this.currentSearch); + this.isSingel = !!this.isSquare; } if (this.needCallback) { //成功回调设置为false @@ -1093,8 +1093,7 @@ export default { this.multiple ? this.currentValue.splice(index, 1) : (this.currentValue = null); } this.multiple ? (this.searchKeyWord = '') : this.hideOption(); - this.isSingel = !!(this.isSquare && this.currentSearch); - + this.isSingel = !!this.isSquare; this.onChangeValue(); this.scrollTop(); }, diff --git a/src/views/pages/cmdb/resourceentity/mapping-setting.vue b/src/views/pages/cmdb/resourceentity/mapping-setting.vue index 7a9fb125..af83a3db 100644 --- a/src/views/pages/cmdb/resourceentity/mapping-setting.vue +++ b/src/views/pages/cmdb/resourceentity/mapping-setting.vue @@ -16,6 +16,7 @@ :dataList="typeList" :placeholder="$t('term.cmdb.inherentfield')+'/'+$t('page.attribute')+'/'+$t('page.relation')" :validateList="validateList" + :isSquare="false" transfer @on-change="changeType(item)" > diff --git a/src/views/pages/cmdb/resourceentity/typecomponent/const-type.vue b/src/views/pages/cmdb/resourceentity/typecomponent/const-type.vue index da693753..769ec02f 100644 --- a/src/views/pages/cmdb/resourceentity/typecomponent/const-type.vue +++ b/src/views/pages/cmdb/resourceentity/typecomponent/const-type.vue @@ -16,6 +16,7 @@ :validateList="validateList" :placeholder="$t('page.attribute')" transfer + :isSquare="false" > diff --git a/src/views/pages/cmdb/resourceentity/typecomponent/globalattr-type.vue b/src/views/pages/cmdb/resourceentity/typecomponent/globalattr-type.vue index 2f24a3cc..6b7543b9 100644 --- a/src/views/pages/cmdb/resourceentity/typecomponent/globalattr-type.vue +++ b/src/views/pages/cmdb/resourceentity/typecomponent/globalattr-type.vue @@ -24,6 +24,7 @@ :validateList="validateList" :placeholder="$t('page.attribute')" transfer + :isSquare="false" > @@ -60,7 +61,8 @@ export default { params: {}, transfer: true, showPath: true, - validateList: ['required'] + validateList: ['required'], + isSquare: false }, validateList: ['required'], dataList: [ diff --git a/src/views/pages/cmdb/resourceentity/typecomponent/rel-type.vue b/src/views/pages/cmdb/resourceentity/typecomponent/rel-type.vue index c66c4c0e..7e10faff 100644 --- a/src/views/pages/cmdb/resourceentity/typecomponent/rel-type.vue +++ b/src/views/pages/cmdb/resourceentity/typecomponent/rel-type.vue @@ -21,6 +21,7 @@ :dataList="directionList" :validateList="validateList" :placeholder="$t('term.cmdb.attrci')" + :isSquare="false" transfer @on-change="()=>{ $set(item,'fromAttr',''); -- Gitee From 32f2a952cccc7c6ee559aa9bb10e9ce09723f34a Mon Sep 17 00:00:00 2001 From: yaojn Date: Wed, 3 Jan 2024 10:17:16 +0800 Subject: [PATCH 2/3] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B-=E7=BC=96=E8=BE=91=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=A8=A1=E5=9E=8B=E5=B1=82=E7=BA=A7=E6=9C=89?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=EF=BC=8C=E4=BD=86=E6=B2=A1=E6=9C=89=E5=9B=9E?= =?UTF-8?q?=E6=98=BE=20=20-=20[=E5=85=B3=E8=81=94]#[1054875905916928]?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=A8=A1=E5=9E=8B-=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E6=97=B6=EF=BC=8C=E6=A8=A1=E5=9E=8B=E5=B1=82?= =?UTF-8?q?=E7=BA=A7=E6=9C=89=E6=95=B0=E6=8D=AE=EF=BC=8C=E4=BD=86=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=9B=9E=E6=98=BE=20http://192.168.0.96:8090/demo/rdm?= =?UTF-8?q?.html#/bug-detail/939050947543040/939050947543057/1054875905916?= =?UTF-8?q?928?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/plugins/TsForm/TsFormSelect.vue | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/resources/plugins/TsForm/TsFormSelect.vue b/src/resources/plugins/TsForm/TsFormSelect.vue index 279047d8..658a6005 100755 --- a/src/resources/plugins/TsForm/TsFormSelect.vue +++ b/src/resources/plugins/TsForm/TsFormSelect.vue @@ -654,7 +654,7 @@ export default { this.multiple ? (this.currentValue = [this.nodeList[0][this.valueName]]) : (this.currentValue = this.nodeList[0][this.valueName]); //是单选,进行赋值处理 this.searchKeyWord = !this.multiple ? '' : ''; - this.isSingel = !!this.isSquare; + this.isSingel = !!(this.isSquare && this.currentSearch); this.onChangeValue(); } }, @@ -679,11 +679,10 @@ export default { //url let params = {}; this.nodeList = []; - this.isSingel = !!this.isSquare; - this.getDataByAjax(params, this.url, 'cancelAxios1').then(res => { this.nodeList = res; this.nodeList && this.nodeList.length > 20 && this.search === null ? (this.currentSearch = true) : (this.currentSearch = this.search); //当search参数值不存在时 如果长度大于20增加搜索功能, + this.isSingel = !!(this.isSquare && this.currentSearch); // 可搜索时,并且显示tag标签时,才使用tag标签的样式 this.setDefaultValue(); //默认选中第一个 this.initValueByNodeList(); }); @@ -709,7 +708,7 @@ export default { this.nodeList && this.nodeList.length > 20 && this.search === null ? (this.currentSearch = true) : (this.currentSearch = this.search); //当search参数值不存在时 如果长度大于20增加搜索功能, this.setDefaultValue(); this.initValueByNodeList(); - this.isSingel = !!this.isSquare; + this.isSingel = !!(this.isSquare && this.currentSearch); // 可搜索并且是tag标签时,才显示tag标签的样式 this.handleEchoFailedDefaultValue(); } }, @@ -903,7 +902,7 @@ export default { if (!this.multiple) { //是单选,进行赋值处理 this.searchKeyWord = ''; - this.isSingel = !!this.isSquare; + this.isSingel = !!(this.isSquare && this.currentSearch); } if (this.needCallback) { //成功回调设置为false @@ -1093,7 +1092,7 @@ export default { this.multiple ? this.currentValue.splice(index, 1) : (this.currentValue = null); } this.multiple ? (this.searchKeyWord = '') : this.hideOption(); - this.isSingel = !!this.isSquare; + this.isSingel = !!(this.isSquare && this.currentSearch); this.onChangeValue(); this.scrollTop(); }, -- Gitee From dc6ec8243093b962107f51c96d1400fb4941c957 Mon Sep 17 00:00:00 2001 From: yaojn Date: Wed, 3 Jan 2024 10:22:52 +0800 Subject: [PATCH 3/3] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=E5=8E=BB=E6=8E=89i?= =?UTF-8?q?sSquare=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pages/cmdb/resourceentity/mapping-setting.vue | 1 - .../pages/cmdb/resourceentity/typecomponent/const-type.vue | 1 - .../cmdb/resourceentity/typecomponent/globalattr-type.vue | 4 +--- .../pages/cmdb/resourceentity/typecomponent/rel-type.vue | 1 - 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/views/pages/cmdb/resourceentity/mapping-setting.vue b/src/views/pages/cmdb/resourceentity/mapping-setting.vue index af83a3db..7a9fb125 100644 --- a/src/views/pages/cmdb/resourceentity/mapping-setting.vue +++ b/src/views/pages/cmdb/resourceentity/mapping-setting.vue @@ -16,7 +16,6 @@ :dataList="typeList" :placeholder="$t('term.cmdb.inherentfield')+'/'+$t('page.attribute')+'/'+$t('page.relation')" :validateList="validateList" - :isSquare="false" transfer @on-change="changeType(item)" > diff --git a/src/views/pages/cmdb/resourceentity/typecomponent/const-type.vue b/src/views/pages/cmdb/resourceentity/typecomponent/const-type.vue index 769ec02f..da693753 100644 --- a/src/views/pages/cmdb/resourceentity/typecomponent/const-type.vue +++ b/src/views/pages/cmdb/resourceentity/typecomponent/const-type.vue @@ -16,7 +16,6 @@ :validateList="validateList" :placeholder="$t('page.attribute')" transfer - :isSquare="false" > diff --git a/src/views/pages/cmdb/resourceentity/typecomponent/globalattr-type.vue b/src/views/pages/cmdb/resourceentity/typecomponent/globalattr-type.vue index 6b7543b9..2f24a3cc 100644 --- a/src/views/pages/cmdb/resourceentity/typecomponent/globalattr-type.vue +++ b/src/views/pages/cmdb/resourceentity/typecomponent/globalattr-type.vue @@ -24,7 +24,6 @@ :validateList="validateList" :placeholder="$t('page.attribute')" transfer - :isSquare="false" > @@ -61,8 +60,7 @@ export default { params: {}, transfer: true, showPath: true, - validateList: ['required'], - isSquare: false + validateList: ['required'] }, validateList: ['required'], dataList: [ diff --git a/src/views/pages/cmdb/resourceentity/typecomponent/rel-type.vue b/src/views/pages/cmdb/resourceentity/typecomponent/rel-type.vue index 7e10faff..c66c4c0e 100644 --- a/src/views/pages/cmdb/resourceentity/typecomponent/rel-type.vue +++ b/src/views/pages/cmdb/resourceentity/typecomponent/rel-type.vue @@ -21,7 +21,6 @@ :dataList="directionList" :validateList="validateList" :placeholder="$t('term.cmdb.attrci')" - :isSquare="false" transfer @on-change="()=>{ $set(item,'fromAttr',''); -- Gitee