Browse Source

暂存

noToken
安虹睿 1 year ago
parent
commit
17bc8f0b7f
  1. 4
      PC/InterFace.Dash/src/mixins/TableMixins.js
  2. 10
      PC/InterFace.Dash/src/permission.js

4
PC/InterFace.Dash/src/mixins/TableMixins.js

@ -56,8 +56,10 @@ export const tableMixins = {
},
mounted() {
// 用于api表头的字段设置监听同步
// todo:切换页面空白bug,apiColumns_Table拿出去是否有效
window.addEventListener('setItemEvent', (item) => {
if (item.key.indexOf('tableColumns') > -1) {
if (item.key.indexOf('tableColumns_') >= 0) {
console.log(item.newValue)
if(JSON.parse(item.newValue).length <= 0){
this.apiColumns_Table = this.apiColumns_Table_copy[this.$route.name]
}else{

10
PC/InterFace.Dash/src/permission.js

@ -84,8 +84,8 @@ router.beforeEach(async (to, from, next) => {
}
}else{
// 重新获取api接口表头
// const _interfaceBoardColumnsNames = localStorage.getItem("interfaceBoardColumnsNames")
// if( !_interfaceBoardColumnsNames || _interfaceBoardColumnsNames == 'undefined' || _interfaceBoardColumnsNames == 'null'){
const _interfaceBoardColumnsNames = localStorage.getItem("interfaceBoardColumnsNames")
if( !_interfaceBoardColumnsNames || _interfaceBoardColumnsNames == 'undefined' || _interfaceBoardColumnsNames == 'null'){
getInterfaceBoard().then(result => {
// todo-new:columnsApiNamesZh配置的地址补全(evel)
localStorage.setItem("interfaceBoardColumnsNames", JSON.stringify(result.resources[_zh].texts));
@ -93,9 +93,9 @@ router.beforeEach(async (to, from, next) => {
next()
},0)
})
// }else{
// next()
// }
}else{
next()
}
}

Loading…
Cancel
Save