From a0b404bae711b6048bae28cbe4822e5e2cfc97f3 Mon Sep 17 00:00:00 2001 From: "LAPTOP-AKBAACR8\\An.Hr" <297504645@qq.com> Date: Thu, 23 Mar 2023 09:37:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=91=E5=90=AC=E7=BC=93=E5=AD=98=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=9B=B4=E6=94=B9=E9=85=8D=E7=BD=AE=EF=BC=8C=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E8=AE=BE=E7=BD=AE=E7=BB=84=E4=BB=B6=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/PC/public/config.js | 18 +++++++++++++---- .../components/currenButton/innerButton.vue | 18 +++++++++++++++++ fe/PC/src/components/rowDrop/index.vue | 20 +++++++++---------- fe/PC/src/components/umyTable/index.vue | 2 +- fe/PC/src/main.js | 2 ++ fe/PC/src/mixins/mixins.js | 12 +++++------ fe/PC/src/utils/defaultButtons.js | 19 +++++++++++++++--- 7 files changed, 67 insertions(+), 24 deletions(-) diff --git a/fe/PC/public/config.js b/fe/PC/public/config.js index bf41df45d..2aab7acbc 100644 --- a/fe/PC/public/config.js +++ b/fe/PC/public/config.js @@ -1,12 +1,22 @@ // dev -window.SITE_CONFIG['base'] = 'http://dev.ccwin-in.com:21093' -window.SITE_CONFIG['user'] = 'http://dev.ccwin-in.com:21293' +window.SITE_CONFIG['base'] = 'http://dev.ccwin-in.com:59099' +window.SITE_CONFIG['user'] = 'http://dev.ccwin-in.com:59093' window.SITE_CONFIG['print'] = 'print' -window.SITE_CONFIG['largeScreen'] = 'http://dev.ccwin-in.com:21093' +window.SITE_CONFIG['largeScreen'] = 'http://dev.ccwin-in.com:59082' window.SITE_CONFIG['warehouseCode'] = 'T8' window.SITE_CONFIG['company'] = 'DongYang' window.SITE_CONFIG['client_secret'] = '1q2w3e*' -window.SITE_CONFIG['reportsUrl'] = 'http://10.164.0.227:21093/#/reports/' +window.SITE_CONFIG['reportsUrl'] = 'http://10.164.0.227:59091/#/reports/' + +// dev-new +// window.SITE_CONFIG['base'] = 'http://dev.ccwin-in.com:21093' +// window.SITE_CONFIG['user'] = 'http://dev.ccwin-in.com:21293' +// window.SITE_CONFIG['print'] = 'print' +// window.SITE_CONFIG['largeScreen'] = 'http://dev.ccwin-in.com:21093' +// window.SITE_CONFIG['warehouseCode'] = 'T8' +// window.SITE_CONFIG['company'] = 'DongYang' +// window.SITE_CONFIG['client_secret'] = '1q2w3e*' +// window.SITE_CONFIG['reportsUrl'] = 'http://10.164.0.227:21093/#/reports/' // localhost // window.SITE_CONFIG['base'] = 'http://dev.ccwin-in.com:59099' diff --git a/fe/PC/src/components/currenButton/innerButton.vue b/fe/PC/src/components/currenButton/innerButton.vue index f067e9987..f7525c2f5 100644 --- a/fe/PC/src/components/currenButton/innerButton.vue +++ b/fe/PC/src/components/currenButton/innerButton.vue @@ -31,7 +31,25 @@ export default { } }, }, + mounted(){ + window.addEventListener('setItemEvent', (item) => { + this.initButtonType(item) + }) + }, methods:{ + initButtonType(changeItem){ + let _num = 0 + let _new = JSON.parse(changeItem.newValue) + _new.forEach((item) => { + if(item.istrue)_num ++ + }) + this.Butttondata.forEach(item=>{ + // 监听本地缓存【字段配置】缓存,更改按钮type + if(item.name == 'field'){ + return item.type = (_num >= _new.length) ? '' : 'warning'; + } + }) + }, tableButtonClick (val,item) { this.$emit('tableButtonClick', val,item) } diff --git a/fe/PC/src/components/rowDrop/index.vue b/fe/PC/src/components/rowDrop/index.vue index f9d9d9fcf..048d24aa9 100644 --- a/fe/PC/src/components/rowDrop/index.vue +++ b/fe/PC/src/components/rowDrop/index.vue @@ -28,9 +28,9 @@ >
{{ item.label }}
@@ -88,10 +88,10 @@ export default { type: 'warning', cancelButtonClass:'rowDropNotHideItem' }).then(() => { - localStorage.removeItem(this.$store.getters.name.userName + '_' + this.$route.name) + localStorage.removeItem('tableColumns_' + this.$store.getters.name.userName + '_' + this.$route.name) let _resetCol = this.$isTableColumns[this.$route.name] _resetCol.forEach(item => { - item.isture = true + item.istrue = true }) this.dataList = _resetCol this.initSelectSta() @@ -108,8 +108,8 @@ export default { formatData (val) { this.dataList = JSON.parse(JSON.stringify(val)) this.dataList.forEach(item => { - if (item.isture == undefined) { - item.isture = true + if (item.istrue == undefined) { + item.istrue = true } }) }, @@ -117,7 +117,7 @@ export default { this.$forceUpdate() this.$emit('radio',this.dataList) // 本地缓存 当前用户名 + 路由名称 - localStorage.setItem(this.$store.getters.name.userName + '_' + this.$route.name, JSON.stringify(this.dataList)) + localStorage.setItem('tableColumns_' + this.$store.getters.name.userName + '_' + this.$route.name, JSON.stringify(this.dataList)) }, dragstart(value) { this.oldData = value @@ -147,7 +147,7 @@ export default { }, // item元素点击眼睛事件 rediochange(index){ - this.dataList[index].isture = !this.dataList[index].isture + this.dataList[index].istrue = !this.dataList[index].istrue this.initSelectSta() this.save() }, @@ -155,7 +155,7 @@ export default { initSelectSta(){ let _num = 0 this.dataList.forEach(item=>{ - if(item.isture){ + if(item.istrue){ _num ++ } }) @@ -168,7 +168,7 @@ export default { let isSelectAll = !(this.allSeletType == 'allSelect') this.allSeletType = isSelectAll ? 'allSelect' : 'NoSelect'; this.dataList.forEach(item=>{ - return item.isture = isSelectAll + return item.istrue = isSelectAll }) this.save() }, diff --git a/fe/PC/src/components/umyTable/index.vue b/fe/PC/src/components/umyTable/index.vue index f1d386972..c409a37f3 100644 --- a/fe/PC/src/components/umyTable/index.vue +++ b/fe/PC/src/components/umyTable/index.vue @@ -31,7 +31,7 @@ :width="item.width" :align="item.tableAlign" :header-align="item.tableHeaderAlign" - v-if="item.isture==null?true:item.isture" + v-if="item.istrue==null?true:item.istrue" >