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"
>
{{ item.label }}
diff --git a/fe/PC/src/main.js b/fe/PC/src/main.js
index 536dc6fbb..831c80e89 100644
--- a/fe/PC/src/main.js
+++ b/fe/PC/src/main.js
@@ -5,6 +5,7 @@ import '@/styles/index.scss' // global css
import App from './App'
import store from './store'
import router from './router'
+import watchLocal from '@/utils/watcLlocalstorage'//用于监听本地缓存
import "./utils/utils"
@@ -23,6 +24,7 @@ Vue.use(UTableColumn);
Vue.use(UTable);
Vue.use(UxGrid);
Vue.use(UxTableColumn);
+Vue.use(watchLocal)
// 通用按钮样式
import {
diff --git a/fe/PC/src/mixins/mixins.js b/fe/PC/src/mixins/mixins.js
index 37c12838d..3c3a7cd12 100644
--- a/fe/PC/src/mixins/mixins.js
+++ b/fe/PC/src/mixins/mixins.js
@@ -54,14 +54,14 @@ export const mixins = {
methods: {
// 结合默认及缓存中的列表tableColumns数据做初始化
initTableColumns(){
- let _local = localStorage.getItem(this.$store.getters.name.userName + '_' + this.$route.name)
- let _list_local = JSON.parse(localStorage.getItem(this.$store.getters.name.userName + '_' + this.$route.name))
+ let _local = localStorage.getItem('tableColumns_' + this.$store.getters.name.userName + '_' + this.$route.name)
+ let _list_local = JSON.parse(localStorage.getItem('tableColumns_' + this.$store.getters.name.userName + '_' + this.$route.name))
let _list_defalut = this.$isTableColumns[this.$route.name]
let _new_list = [] //格式化后的数据
// 如果没有缓存则直接为默认值
if(!_local){
_list_defalut.forEach((defalutItem,index) => {
- defalutItem.isture = true
+ defalutItem.istrue = true
_new_list.push(defalutItem)
})
}
@@ -81,13 +81,13 @@ export const mixins = {
let _number = 0
_list_defalut.forEach((defalutItem) => {
if(_locals[defalutItem.showProp]){
- defalutItem.isture = _locals[defalutItem.showProp].isture
+ defalutItem.istrue = _locals[defalutItem.showProp].istrue
defalutItem.itemIndex = _locals[defalutItem.showProp].itemIndex
}else if(_locals[defalutItem.prop]){
- defalutItem.isture = _locals[defalutItem.prop].isture
+ defalutItem.istrue = _locals[defalutItem.prop].istrue
defalutItem.itemIndex = _locals[defalutItem.prop].itemIndex
}else{
- defalutItem.isture = false
+ defalutItem.istrue = false
defalutItem.itemIndex = _number
}
_number ++
diff --git a/fe/PC/src/utils/defaultButtons.js b/fe/PC/src/utils/defaultButtons.js
index 19f54ff70..2cbac6f98 100644
--- a/fe/PC/src/utils/defaultButtons.js
+++ b/fe/PC/src/utils/defaultButtons.js
@@ -42,10 +42,23 @@ export function defaultExportBtn(option) {
// 字段设置
export function defaultFieldSettingBtn(option) {
// todo:监听已经配置过的字段按钮更改状态特殊显示
- // let _local = localStorage.getItem(this.$store.getters.name.userName + '_' + this.$route.name)
- // let _type = _local ? 'warning' : ''
+ let _local = localStorage.getItem('tableColumns_' + this.$store.getters.name.userName + '_' + this.$route.name)
+ let _type = ''
+ let _num = 0
+ if(_local){
+ JSON.parse(_local).forEach(item => {
+ if(item.istrue == true){
+ _num ++
+ }
+ });
+ if(_num >= JSON.parse(_local).length){
+ _type = ''
+ }else{
+ _type= 'warning'
+ }
+ }
return __defaultBtnOption(option,{
- // type: _type,
+ type: _type,
plain: true,
icon: "el-icon-setting",
label: "字段设置",