fix:系统设置assetPingSwitch bug修复
This commit is contained in:
@@ -1012,9 +1012,9 @@
|
|||||||
let localStorageTitle = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path);
|
let localStorageTitle = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path);
|
||||||
this.tablelable = localStorageTitle ? JSON.parse(localStorageTitle) : this.tableTitle;
|
this.tablelable = localStorageTitle ? JSON.parse(localStorageTitle) : this.tableTitle;
|
||||||
// this.assetPingSwit
|
// this.assetPingSwit
|
||||||
|
|
||||||
if (this.assetPingSwitch == 'off') {
|
if (this.assetPingSwitch == 'off') {
|
||||||
console.log(this.assetPingSwitch)
|
|
||||||
console.log(this.tablelable)
|
|
||||||
for (let i in this.tablelable) {
|
for (let i in this.tablelable) {
|
||||||
let label = this.tablelable[i];
|
let label = this.tablelable[i];
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
<el-table-column :resizable="false" v-for="(item, index) in tablelable" v-if="item.show" :width="item.width"
|
<el-table-column :resizable="false" v-for="(item, index) in tablelable" v-if="item.show" :width="item.width"
|
||||||
:key="`col-${index}`" :label="item.label">
|
:key="`col-${index}`" :label="item.label">
|
||||||
<template slot-scope="scope" :column="item">
|
<template slot-scope="scope" :column="item">
|
||||||
<span v-if="item.prop == 'idc'" >{{scope.row[item.prop].name}}</span>
|
<span v-if="item.prop == 'idc'" >{{scope.row[item.prop]?scope.row[item.prop].name:'-'}}</span>
|
||||||
|
|
||||||
<span v-else-if="item.prop == 'type'">
|
<span v-else-if="item.prop == 'type'">
|
||||||
{{scope.row[item.prop] == '1' ? 'Global' : ''}}
|
{{scope.row[item.prop] == '1' ? 'Global' : ''}}
|
||||||
|
|||||||
@@ -362,6 +362,14 @@
|
|||||||
for(let key in sets){
|
for(let key in sets){
|
||||||
this[type][key]=sets[key];
|
this[type][key]=sets[key];
|
||||||
}
|
}
|
||||||
|
if(type == 'basic'){
|
||||||
|
localStorage.setItem('nz-sys-name',this.basic.system_name);
|
||||||
|
localStorage.setItem('nz-sys-timezone',this.basic.timezone);
|
||||||
|
localStorage.setItem('nz-sys-asset-ping-switch',this.basic.asset_ping_switch);
|
||||||
|
localStorage.setItem('nz-sys-default-cabinet-usize',this.basic.default_cabinet_usize);
|
||||||
|
}else if(type == 'terminal'){
|
||||||
|
localStorage.setItem('nz-sys-max-terminal-num',this.terminal.max_terminal_num);
|
||||||
|
}
|
||||||
if(type == 'email'){
|
if(type == 'email'){
|
||||||
this.$refs.emailForm.clearValidate();
|
this.$refs.emailForm.clearValidate();
|
||||||
}
|
}
|
||||||
@@ -383,16 +391,8 @@
|
|||||||
if(response.code == 200){
|
if(response.code == 200){
|
||||||
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
this.resetForm(formName);
|
this.resetForm(formName);
|
||||||
setTimeout(()=>{
|
setTimeout(()=> {
|
||||||
this.querySetInfo(type);
|
this.querySetInfo(type);
|
||||||
if(type == 'basic'){
|
|
||||||
localStorage.setItem('nz-sys-name',this.basic.system_name);
|
|
||||||
localStorage.setItem('nz-sys-timezone',this.basic.timezone);
|
|
||||||
localStorage.setItem('nz-sys-asset-ping-switch',this.basic.asset_ping_switch);
|
|
||||||
localStorage.setItem('nz-sys-default-cabinet-usize',this.basic.default_cabinet_usize);
|
|
||||||
}else if(type == 'terminal'){
|
|
||||||
localStorage.setItem('nz-sys-max-terminal-num',this.terminal.max_terminal_num);
|
|
||||||
}
|
|
||||||
},200)
|
},200)
|
||||||
}else{
|
}else{
|
||||||
this.$message.error(response.msg);
|
this.$message.error(response.msg);
|
||||||
|
|||||||
Reference in New Issue
Block a user