|
@ -28,9 +28,9 @@ |
|
|
> |
|
|
> |
|
|
<svg-icon |
|
|
<svg-icon |
|
|
class="checkbox-svg" |
|
|
class="checkbox-svg" |
|
|
:class="{'show': dataList[index].isture}" |
|
|
:class="{'show': dataList[index].istrue}" |
|
|
@click="rediochange(index)" |
|
|
@click="rediochange(index)" |
|
|
:icon-class="dataList[index].isture ? 'show' : 'hide'" |
|
|
:icon-class="dataList[index].istrue ? 'show' : 'hide'" |
|
|
/> |
|
|
/> |
|
|
<div class="lable">{{ item.label }}</div> |
|
|
<div class="lable">{{ item.label }}</div> |
|
|
</div> |
|
|
</div> |
|
@ -88,10 +88,10 @@ export default { |
|
|
type: 'warning', |
|
|
type: 'warning', |
|
|
cancelButtonClass:'rowDropNotHideItem' |
|
|
cancelButtonClass:'rowDropNotHideItem' |
|
|
}).then(() => { |
|
|
}).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] |
|
|
let _resetCol = this.$isTableColumns[this.$route.name] |
|
|
_resetCol.forEach(item => { |
|
|
_resetCol.forEach(item => { |
|
|
item.isture = true |
|
|
item.istrue = true |
|
|
}) |
|
|
}) |
|
|
this.dataList = _resetCol |
|
|
this.dataList = _resetCol |
|
|
this.initSelectSta() |
|
|
this.initSelectSta() |
|
@ -108,8 +108,8 @@ export default { |
|
|
formatData (val) { |
|
|
formatData (val) { |
|
|
this.dataList = JSON.parse(JSON.stringify(val)) |
|
|
this.dataList = JSON.parse(JSON.stringify(val)) |
|
|
this.dataList.forEach(item => { |
|
|
this.dataList.forEach(item => { |
|
|
if (item.isture == undefined) { |
|
|
if (item.istrue == undefined) { |
|
|
item.isture = true |
|
|
item.istrue = true |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
@ -117,7 +117,7 @@ export default { |
|
|
this.$forceUpdate() |
|
|
this.$forceUpdate() |
|
|
this.$emit('radio',this.dataList) |
|
|
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) { |
|
|
dragstart(value) { |
|
|
this.oldData = value |
|
|
this.oldData = value |
|
@ -147,7 +147,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// item元素点击眼睛事件 |
|
|
// item元素点击眼睛事件 |
|
|
rediochange(index){ |
|
|
rediochange(index){ |
|
|
this.dataList[index].isture = !this.dataList[index].isture |
|
|
this.dataList[index].istrue = !this.dataList[index].istrue |
|
|
this.initSelectSta() |
|
|
this.initSelectSta() |
|
|
this.save() |
|
|
this.save() |
|
|
}, |
|
|
}, |
|
@ -155,7 +155,7 @@ export default { |
|
|
initSelectSta(){ |
|
|
initSelectSta(){ |
|
|
let _num = 0 |
|
|
let _num = 0 |
|
|
this.dataList.forEach(item=>{ |
|
|
this.dataList.forEach(item=>{ |
|
|
if(item.isture){ |
|
|
if(item.istrue){ |
|
|
_num ++ |
|
|
_num ++ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -168,7 +168,7 @@ export default { |
|
|
let isSelectAll = !(this.allSeletType == 'allSelect') |
|
|
let isSelectAll = !(this.allSeletType == 'allSelect') |
|
|
this.allSeletType = isSelectAll ? 'allSelect' : 'NoSelect'; |
|
|
this.allSeletType = isSelectAll ? 'allSelect' : 'NoSelect'; |
|
|
this.dataList.forEach(item=>{ |
|
|
this.dataList.forEach(item=>{ |
|
|
return item.isture = isSelectAll |
|
|
return item.istrue = isSelectAll |
|
|
}) |
|
|
}) |
|
|
this.save() |
|
|
this.save() |
|
|
}, |
|
|
}, |
|
|