diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss
index 5542d1f..9ba2391 100644
--- a/src/assets/styles/index.scss
+++ b/src/assets/styles/index.scss
@@ -341,11 +341,16 @@ aside {
left: 53% !important;
//transform: translate(-50%, -50%) !important;
}
-// 提示信息--应用于Agent更新提交时
-.el-message {
+// 提示信息--应用于Agent更新、mtr探测策略--提交时
+.el-message--warning {
max-width: 600px!important;
}
+.el-message--warning .el-message__icon {
+ position: absolute;
+ top: 14px;
+}
.el-message--warning .el-message__content {
width: 95%;
word-wrap: break-word!important;
+ margin-left: 26px;
}
diff --git a/src/components/echartsList/line.vue b/src/components/echartsList/line.vue
index f316a64..a5c61c4 100644
--- a/src/components/echartsList/line.vue
+++ b/src/components/echartsList/line.vue
@@ -160,7 +160,7 @@
// 如果太靠右,向左偏移
if (x > size.viewSize[0] - size.contentSize[0]) {
- x = x - size.contentSize[0] - 20;
+ x = x - size.contentSize[0] + 10;
}
// 如果太靠下,向上偏移
@@ -168,7 +168,7 @@
y = y - size.contentSize[1] - 20;
}
- return [x - 10, y + 10];
+ return [x - 5, y + 18];
},
formatter: !dataXY.tooltipFormatter ? null : function(params) { // 主要应对与MTRAgent丢包趋势图模块的功能
// 获取当前悬停的日期
@@ -180,12 +180,9 @@
if (dataXY.tooltipFormatter && dataXY.tooltipFormatter.customList) {
if (paramItem.data.content) {
let content = JSON.parse(paramItem.data.content);
- html+= `
最新一跳平均延迟: ${content[content.length - 1].avgLatency}(ms)
- 最新一跳丢包率: ${content[content.length - 1].lossPercent}(%)
`;
- // 如果不是弹窗这显示按钮,可点击查看弹窗信息
- if (dataXY.tooltipFormatter && !dataXY.tooltipFormatter.defaultType) {
- html+= ``;
- }
+ html+= `最后一跳平均延迟: ${content[content.length - 1].avgLatency}(ms)
+ 最后一跳丢包率: ${content[content.length - 1].lossPercent}(%)
`;
+ html+= ``;
} else {
let valueparams = paramItem.value;
if (dataXY.tooltipFormatter && dataXY.tooltipFormatter.valueToop) {
@@ -380,8 +377,12 @@
}
},
// tooltip中的按钮点击事件
- detailsVal(xTime, content) {
- this.$emit('dialogChartTabList', {value: xTime, tableVal: this.lineData.dataList[0].data[content]});
+ detailsVal(xTime, content, dialogOpen) {
+ if (dialogOpen && dialogOpen !== 'null') {
+ this.$emit('showChartTabList', {value: xTime, tableVal: this.lineData.dataList[0].data[content]});
+ } else {
+ this.$emit('dialogChartTabList', {value: xTime, tableVal: this.lineData.dataList[0].data[content]});
+ }
}
}
}
diff --git a/src/components/form/index.vue b/src/components/form/index.vue
index 29eed1d..a1391d3 100644
--- a/src/components/form/index.vue
+++ b/src/components/form/index.vue
@@ -18,15 +18,20 @@
{{formVal.label ? formVal.label + ':' : ''}}
- handleChange(key,val,formVal)">
-
{{formVal.warningTitle}}
-
+
+
+ handleChange(key,val,formVal)">
+
{{formVal.warningTitle}}
+
+
diff --git a/src/components/table/index.vue b/src/components/table/index.vue
index fe2b35f..62e254d 100644
--- a/src/components/table/index.vue
+++ b/src/components/table/index.vue
@@ -73,7 +73,7 @@
-
+
handleClick({fnCode: command}, scope.row)">
{{item && item.title ? item.title : '更多'}}
@@ -260,10 +260,23 @@
// 判断按钮是否显示
isButtonVisible(buttonConfig, row) {
- if (buttonConfig.showName) {
- return buttonConfig.showVal.includes(row[buttonConfig.showName]);
+ if (buttonConfig && buttonConfig.more) {
+ if (!checkPermi(buttonConfig.hasPermi)) {
+ return false;
+ }
+ if (buttonConfig.showName) {
+ return buttonConfig.showVal.includes(row[buttonConfig.showName]);
+ }
+ return true;
+ } else {
+ if (!checkPermi([buttonConfig.hasPermi])) {
+ return false;
+ }
+ if (buttonConfig.showName) {
+ return buttonConfig.showVal.includes(row[buttonConfig.showName]);
+ }
+ return true;
}
- return true;
},
// 所有方法都抛出到父组件里去
handleClick(result, row) {
diff --git a/src/views/resource/agentUpdate/agentUpdateView.vue b/src/views/resource/agentUpdate/agentUpdateView.vue
index ecd99ad..24f2150 100644
--- a/src/views/resource/agentUpdate/agentUpdateView.vue
+++ b/src/views/resource/agentUpdate/agentUpdateView.vue
@@ -142,7 +142,7 @@
});
}
if (unknownData && unknownData.length > 0) {
- this.$modal.msgWarning(`存在未知的ClientID: ${unknownData.join(';')}`);
+ this.$modal.msgWarning(`存在未知的ClientID: ${unknownData.join('; ')}`);
return;
}
let fnType = addAgentManage;
diff --git a/src/views/resource/fileManage/fileManageView.vue b/src/views/resource/fileManage/fileManageView.vue
index 3560024..1303a44 100644
--- a/src/views/resource/fileManage/fileManageView.vue
+++ b/src/views/resource/fileManage/fileManageView.vue
@@ -66,8 +66,8 @@
groupName: {label: '名称', span: 12, type: 'input'},
type: {label: '类型', span: 12, type: 'input', disabled: true},
description: {label: '描述', span: 12, type: 'textarea'},
- createTime: {label: '创建时间', span: 12, type: 'date', disabled: true},
- includedDevices: {label: '修改时间', span: 12, type: 'date', disabled: true},
+ createTime: {label: '创建时间', span: 12, type: 'datetime', disabled: true},
+ includedDevices: {label: '修改时间', span: 12, type: 'datetime', disabled: true},
num: {label: '大小(KB)', span: 12, type: 'input', disabled: true},
md5: {label: 'MD5值', span: 12, type: 'input', disabled: true},
router: {label: '路径', span: 12, type: 'input', disabled: true},
diff --git a/src/views/resource/mtrAgent/lossRateChart.vue b/src/views/resource/mtrAgent/lossRateChart.vue
index 5ccd521..f61a2ee 100644
--- a/src/views/resource/mtrAgent/lossRateChart.vue
+++ b/src/views/resource/mtrAgent/lossRateChart.vue
@@ -9,7 +9,7 @@
探测失败
{{val.mtrClientId}}
-
最新丢包率:{{item.dataVal.lastYDataNum || 'null'}}
+
最后一跳丢包率:{{item.dataVal.lastYDataNum || item.dataVal.lastYDataNum == 0 ? item.dataVal.lastYDataNum : 'null'}}
@@ -19,7 +19,7 @@
{{tagTitle}}
-
+
{{row[valueKey]}}{{column.unit}}
@@ -30,7 +30,7 @@
-
+
{{row[valueKey]}}{{column.unit}}
@@ -71,6 +71,8 @@
params[this.dialogRowData.clientId]['jointName'] = '丢包率';
this.activeShowList.push(this.dialogRowData.clientId);
this.chartDataLit = params;
+ this.tagTitle = '';
+ this.roleList = [];
this.timeDefault();
this.$nextTick(() => {
this.getEchartList(params, 'dialog');
@@ -181,6 +183,7 @@
yDataList = res.data.yData.packetLossRate || [];
}
}
+ chartList.dataVal.dialogOpen = this.open ? this.open : null;
chartList.dataVal.tooltipFormatter['defaultType'] = type ? type : null;
chartList.dataVal.lineXData = res.data && res.data.xData || [];
chartList.dataVal.dataList[0].data = yDataList || [];
diff --git a/src/views/resource/mtrAgent/mtrAgent.vue b/src/views/resource/mtrAgent/mtrAgent.vue
index 8295e76..248ade6 100644
--- a/src/views/resource/mtrAgent/mtrAgent.vue
+++ b/src/views/resource/mtrAgent/mtrAgent.vue
@@ -138,7 +138,7 @@
line: [
{content: '查看丢包率趋势', fnCode: 'echartView', type: 'text', icon: 'el-icon-data-analysis', hasPermi: 'resource:mtrAgent:echartView'},
{content: '详情', fnCode: 'details', type: 'text', icon: 'el-icon-view', hasPermi: 'resource:mtrAgent:details'},
- {title: '更多', more: [
+ {title: '更多', hasPermi: ['resource:mtrAgent:update', 'resource:mtrAgent:addMtrProbe'], more: [
{content: '配置更新策略', fnCode: 'update', type: 'text', icon: 'el-icon-circle-check', hasPermi: 'resource:mtrAgent:update'},
{content: '新建MTR探测策略', fnCode: 'addMtrProbe', type: 'text', icon: 'el-icon-circle-check', hasPermi: 'resource:mtrAgent:addMtrProbe'},
]
diff --git a/src/views/resource/mtrProbe/mtrProbeView.vue b/src/views/resource/mtrProbe/mtrProbeView.vue
index 05c3170..cd04b35 100644
--- a/src/views/resource/mtrProbe/mtrProbeView.vue
+++ b/src/views/resource/mtrProbe/mtrProbeView.vue
@@ -12,7 +12,7 @@