fix: project-query和metric preview里添加图表后顶部菜单高亮状态改变
This commit is contained in:
@@ -122,6 +122,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bus from '../../libs/bus';
|
||||
export default {
|
||||
name: "Header",
|
||||
data() {
|
||||
@@ -424,6 +425,10 @@
|
||||
// 刷新后有高亮
|
||||
let activePath = this.$route.path.slice(1);
|
||||
this.activeIndex = activePath;
|
||||
bus.$on("menu-change", (menu) => {
|
||||
console.info(menu);
|
||||
this.activeIndex = menu;
|
||||
});
|
||||
},
|
||||
computed: {
|
||||
projectListReloadWatch() {
|
||||
@@ -433,8 +438,8 @@
|
||||
return this.$store.state.assetDcList;
|
||||
},
|
||||
getAssetDcData() {
|
||||
return this.$store.state.assetData
|
||||
},
|
||||
return this.$store.state.assetData;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
getAssetDcData: {
|
||||
|
||||
@@ -176,6 +176,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bus from "../../../libs/bus";
|
||||
export default {
|
||||
name: "asset",
|
||||
data() {
|
||||
@@ -467,6 +468,7 @@
|
||||
},
|
||||
jumpToAlertMsg(assetId) {
|
||||
this.$store.commit('assetForAlertListChange', assetId);
|
||||
bus.$emit("menu-change", 'alertList');
|
||||
this.$router.push({
|
||||
path: "/alertList",
|
||||
query: {
|
||||
|
||||
@@ -435,7 +435,7 @@
|
||||
this.$message({duration: 1000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||
this.$refs.chartForm.resetFields();//清空表单
|
||||
let panel = this.panelData.find(p => p.id === this.panelId);
|
||||
console.info("panel", panel)
|
||||
//console.info("panel", panel)
|
||||
this.$emit('on-create-success', 'create', response.data,params, panel);
|
||||
} else {
|
||||
this.$message.error(response.msg);
|
||||
@@ -572,7 +572,7 @@
|
||||
let dSet = this.$refs.chartTag;
|
||||
this.$nextTick(() => {
|
||||
dSet.forEach((item, index) => {
|
||||
console.info('bbb', elementInfo.elements[index])
|
||||
//console.info('bbb', elementInfo.elements[index])
|
||||
item.setMdata(elementInfo.elements[index]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -200,7 +200,7 @@ export default {
|
||||
cancelButtonText: this.$t("tip.no"),
|
||||
type: 'success'
|
||||
}).then(() => {
|
||||
//this.$store.state.assetData.moduleData = 'panel';
|
||||
bus.$emit("menu-change", 'panel');
|
||||
this.$store.state.showPanel.id = panel.id;
|
||||
this.$store.state.showPanel.name = panel.name;
|
||||
this.$router.push({
|
||||
|
||||
@@ -255,6 +255,8 @@
|
||||
<script>
|
||||
import echarts from 'echarts';
|
||||
import chartBox from "../dashboard/chartBox";
|
||||
import bus from "../../../libs/bus";
|
||||
|
||||
export default {
|
||||
name: "project2",
|
||||
components: {
|
||||
@@ -513,8 +515,8 @@
|
||||
tooltip:{
|
||||
show:true,
|
||||
formatter:function(params){
|
||||
console.log("params")
|
||||
console.log(params);
|
||||
//console.log("params")
|
||||
//console.log(params);
|
||||
return `<div style='width:100%;display:block;word-break:break-all;word-wrap:break-word;white-space:normal'> ${params.name}</div>`;
|
||||
},
|
||||
},
|
||||
@@ -601,7 +603,7 @@
|
||||
this.$refs.addChartModal.show(true);
|
||||
let metricInfo = {};
|
||||
metricInfo.elements = [];
|
||||
console.info("aaa", this.selectedEndpoints)
|
||||
//console.info("aaa", this.selectedEndpoints)
|
||||
for(let i = 0; i < this.selectedEndpoints.length; i++) {
|
||||
let type = '';
|
||||
if (this.selectedEndpoints[i].type == '1') {
|
||||
@@ -619,7 +621,7 @@
|
||||
cancelButtonText: this.$t("tip.no"),
|
||||
type: 'success'
|
||||
}).then(() => {
|
||||
//this.$store.state.assetData.moduleData = 'panel';
|
||||
bus.$emit("menu-change", 'panel');
|
||||
this.$store.state.showPanel.id = panel.id;
|
||||
this.$store.state.showPanel.name = panel.name;
|
||||
this.$router.push({
|
||||
@@ -674,7 +676,7 @@
|
||||
response.data.list[i].paramObj.push({key: k, value: tempObj[k]})
|
||||
}
|
||||
} catch (err) {
|
||||
console.info(response.data.list[i], err);
|
||||
console.error(response.data.list[i], err);
|
||||
}
|
||||
}
|
||||
this.endpointTableData = response.data.list;
|
||||
@@ -923,7 +925,7 @@
|
||||
this.showEndpoint();
|
||||
},
|
||||
pickTime:function(){
|
||||
console.log(this.formatTime)
|
||||
//console.log(this.formatTime)
|
||||
this.showEndpoint();
|
||||
},
|
||||
getTime:function(size,unit){//计算时间
|
||||
|
||||
Reference in New Issue
Block a user