fix: 修复$CONSTANTS报错问题

This commit is contained in:
陈劲松
2020-12-16 15:39:29 +08:00
committed by chenjinsong
parent d28df4fdc7
commit fc24385b1c
3 changed files with 8 additions and 8 deletions

View File

@@ -85,7 +85,7 @@
this.$emit('update:targetTab', tab); this.$emit('update:targetTab', tab);
}, },
afterResize() { afterResize() {
if (this.from == $CONSTANTS.fromRoute.endpoint && this.targetTab == 'endpointQuery') { if (this.from == this.$CONSTANTS.fromRoute.endpoint && this.targetTab == 'endpointQuery') {
this.$refs.endpointQuery.tableReload(); this.$refs.endpointQuery.tableReload();
} }
} }

View File

@@ -649,11 +649,11 @@
if(this.searchLabel.orderBy){ if(this.searchLabel.orderBy){
orderBy=this.searchLabel.orderBy orderBy=this.searchLabel.orderBy
} }
if (this.from == $CONSTANTS.fromRoute.rule) { if (this.from == this.$CONSTANTS.fromRoute.rule) {
this.searchLabel.ruleId = this.obj.id; this.searchLabel.ruleId = this.obj.id;
} else if (this.from == $CONSTANTS.fromRoute.asset) { } else if (this.from == this.$CONSTANTS.fromRoute.asset) {
this.searchLabel.assetId = this.obj.id; this.searchLabel.assetId = this.obj.id;
}else if(this.from == $CONSTANTS.fromRoute.endpoint){ }else if(this.from == this.$CONSTANTS.fromRoute.endpoint){
this.searchLabel.endpointId=this.obj.id; this.searchLabel.endpointId=this.obj.id;
} }
this.pageObj.pageNo = 1; this.pageObj.pageNo = 1;
@@ -693,17 +693,17 @@
}else{ }else{
this.defaultPick=12; this.defaultPick=12;
} }
if (this.from == $CONSTANTS.fromRoute.rule) { if (this.from == this.$CONSTANTS.fromRoute.rule) {
this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => { this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => {
return item.label != "alertName" && item.label != "severity" return item.label != "alertName" && item.label != "severity"
}); });
this.searchLabel.ruleId = n.id; this.searchLabel.ruleId = n.id;
} else if (this.from == $CONSTANTS.fromRoute.asset) { } else if (this.from == this.$CONSTANTS.fromRoute.asset) {
this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => { this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => {
return item.label != "alertType" && item.label != "asset" return item.label != "alertType" && item.label != "asset"
}); });
this.searchLabel.assetId = n.id; this.searchLabel.assetId = n.id;
} else if(this.from == $CONSTANTS.fromRoute.endpoint){ } else if(this.from == this.$CONSTANTS.fromRoute.endpoint){
this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => { this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => {
return item.label != "alertType" && item.label != "endpoint" return item.label != "alertType" && item.label != "endpoint"
}); });

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="panel"> <div class="panel">
<!--model和asset的工具栏--> <!--model和asset的工具栏-->
<div class="sub-top-tools" v-if="from != this.$CONSTANTS.fromRoute.project"> <div class="sub-top-tools" v-if="from != $CONSTANTS.fromRoute.project">
<div class="sub-list-tabs"> <div class="sub-list-tabs">
<div class="sub-list-tab-title"> <div class="sub-list-tab-title">
<template v-if="from == $CONSTANTS.fromRoute.model">{{obj.name}}</template> <template v-if="from == $CONSTANTS.fromRoute.model">{{obj.name}}</template>