消息推送表单关联值显隐时清除校验提示、网卡流量图展示优化
1、消息推送表单关联值显隐时清除校验提示 2、优化自定义下拉中下拉框状态切换的内容展示 3、出省流量统计为空时,添加暂无数据提示 4、优化并修改bug
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<Form :formList="formList" :ruleFormData="ruleForm" :config="paramsData && paramsData.readonly ? config : {}" @fnClick="callback"></Form>
|
||||
<Form ref="formRef" :formList="formList" :ruleFormData="ruleForm" :config="paramsData && paramsData.readonly ? config : {}" @fnClick="callback"></Form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
});
|
||||
break;
|
||||
case 'pushMethod':
|
||||
this.ruleForm = Object.assign({}, this.ruleForm, this.$refs.formRef.$refs.ruleForm.model);
|
||||
if (dataVal === '1') {
|
||||
this.formList[0].controls.pushAddress['hidden'] = false;
|
||||
this.formList[0].controls.contactPhones['required'] = false;
|
||||
@@ -87,8 +88,14 @@
|
||||
this.formList[0].controls.pushAddress['hidden'] = true;
|
||||
this.formList[0].controls.contactPhones['required'] = true;
|
||||
}
|
||||
// 1. 获取表单引用
|
||||
const formRef = this.$refs.formRef;
|
||||
// 2. 先清除所有表单校验
|
||||
if (formRef && formRef.$refs.ruleForm) {
|
||||
formRef.$refs.ruleForm.clearValidate(); // 清除校验提示
|
||||
}
|
||||
// 强制更新表单
|
||||
this.$set(this.ruleForm, 'updateFormVal', Date.now());
|
||||
// this.$set(this.ruleForm, 'updateFormVal', Date.now());
|
||||
break;
|
||||
case 'cancel':
|
||||
this.$router.push("/resource/messagePush");
|
||||
|
||||
@@ -347,7 +347,6 @@
|
||||
fnConfigName(groupId) {
|
||||
monitorConfigList({groupId: groupId}).then(res => {
|
||||
if (res && res.data) {
|
||||
this.configModel = '';
|
||||
this.configNameList = res && res.data;
|
||||
let index = 0;
|
||||
res && res.data.forEach(item => {
|
||||
@@ -357,8 +356,8 @@
|
||||
});
|
||||
if (index === 0 && this.configNameList.length > 0) {
|
||||
this.configModel = this.configNameList[0].id;
|
||||
this.fnChartView();
|
||||
}
|
||||
this.fnChartView();
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -398,6 +397,7 @@
|
||||
delMonitorConfig(this.reserveForm.id).then(res => {
|
||||
this.reserveForm = {};
|
||||
this.lineDataParams = {};
|
||||
this.configModel = '';
|
||||
this.fnConfigName(this.groupData);
|
||||
});
|
||||
}).catch(() => {});
|
||||
@@ -415,6 +415,7 @@
|
||||
// 分组
|
||||
fnGroupChange(val) {
|
||||
// this.groupData
|
||||
this.configModel = '';
|
||||
this.fnConfigName(val);
|
||||
},
|
||||
addMonitor() {
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
{name: '带宽', num: 0, unit: 'Mbps', imgUrl: bandWImg},
|
||||
{name: 'CPU', num: 0, unit: '核', imgUrl: cpuImg},
|
||||
{name: '内存', num: 0, unit: 'G', imgUrl: memoryImg},
|
||||
{name: '磁盘容量', num: 0, unit: 'GB', imgUrl: diskSizeImg},
|
||||
{name: '磁盘容量(HDD)', num: 0, unit: 'GB', imgUrl: diskSizeImg},
|
||||
],
|
||||
activeName: '网卡流量监控',
|
||||
echartList: {},
|
||||
@@ -547,7 +547,9 @@
|
||||
// 网卡流量监控
|
||||
async fnNetChartList(keyVal, time, interCardName, onlyInterCard) {
|
||||
if (onlyInterCard) {
|
||||
this.mapDataList[keyVal]['网卡信息'].echartList = [this.mapDataList[keyVal]['网卡信息'].echartList[0]];
|
||||
if (!this.interCartList[interCardName].businessFlag) {
|
||||
this.mapDataList[keyVal]['网卡信息'].echartList = [this.mapDataList[keyVal]['网卡信息'].echartList[0],this.mapDataList[keyVal]['网卡信息'].echartList[1]];
|
||||
}
|
||||
if (await this.getNetEcharts(time, keyVal, '网卡信息', interCardName)) {
|
||||
if (await this.getNetPingDropCharts(time, keyVal, '网卡信息', interCardName)) {
|
||||
if (this.interCartList[interCardName].businessFlag) {
|
||||
|
||||
@@ -30,9 +30,14 @@
|
||||
<div>
|
||||
<div class="mb20" style="border: 1px solid #eee;padding: 10px;">
|
||||
<span>出省流量统计</span>
|
||||
<div style="height: calc(100vh - 445px);overflow: auto;">
|
||||
<div v-for="item of timelineList" class="ml20">
|
||||
<pre>{{item.description}}</pre>
|
||||
<div style="max-height: calc(100vh - 445px);overflow: auto;">
|
||||
<temmplate v-if="timelineList && timelineList.length > 0">
|
||||
<div v-for="item of timelineList" class="ml20">
|
||||
<pre>{{item.description}}</pre>
|
||||
</div>
|
||||
</temmplate>
|
||||
<div v-else class="ml20 mt20" style="height: 100px;color: #a3a3a3;">
|
||||
暂无数据
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user