NEZ-309 feat:alert rule相关页面增加 operator,threshold,unit字段 & singlestat chart添加no data & asset model 同步添加确认提示框
This commit is contained in:
@@ -110,7 +110,7 @@
|
|||||||
<div v-else-if="item.prop == 'current'" class="too-long-split" >
|
<div v-else-if="item.prop == 'current'" class="too-long-split" >
|
||||||
<span v-if="!scope.row.current">-</span>
|
<span v-if="!scope.row.current">-</span>
|
||||||
<el-popover v-else placement="right" trigger="hover">
|
<el-popover v-else placement="right" trigger="hover">
|
||||||
<span slot="reference">{{scope.row.current[1]}}</span>
|
<span slot="reference">{{formatThreshold(scope.row.current[1],scope.row.alertRule.unit)}}</span>
|
||||||
<div>{{$unixTimeParseToString(scope.row.current[0])}}</div>
|
<div>{{$unixTimeParseToString(scope.row.current[0])}}</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</div>
|
</div>
|
||||||
@@ -262,10 +262,10 @@
|
|||||||
<div slot="title">
|
<div slot="title">
|
||||||
{{$t("project.endpoint.dialogTitle")}}
|
{{$t("project.endpoint.dialogTitle")}}
|
||||||
<div class="float-right panel-calendar dialog-tool" style="display: flex">
|
<div class="float-right panel-calendar dialog-tool" style="display: flex">
|
||||||
<pick-time :refresh-data-func="queryChartDate" :use-refresh="false" v-model="searchTime" style="height: 28px;" @unitChange="chartUnitChange"></pick-time>
|
<pick-time :refresh-data-func="queryChartDate" :use-refresh="false" :use-chart-unit="false" v-model="searchTime" style="height: 28px;" @unitChange="chartUnitChange"></pick-time>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<chart ref="messageChart" name="alertMessageChart" :unit="chartUnit"></chart>
|
<chart ref="messageChart" name="alertMessageChart" :unit="chartUnit" ></chart>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<element-set
|
<element-set
|
||||||
path="/alertList"
|
path="/alertList"
|
||||||
@@ -502,11 +502,20 @@ export default {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
formatThreshold:function(value,unit){
|
||||||
|
let unitMethod=chartDataFormat.getUnit(unit)
|
||||||
|
if(unitMethod&&unit.compute){
|
||||||
|
return unitMethod.compute(value,null,2);
|
||||||
|
}else{
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
},
|
||||||
detail(obj) {
|
detail(obj) {
|
||||||
this.chartDatas = [];
|
this.chartDatas = [];
|
||||||
this.legend = [];
|
this.legend = [];
|
||||||
this.graphShow = true;
|
this.graphShow = true;
|
||||||
this.currentMsg = obj;
|
this.currentMsg = obj;
|
||||||
|
this.chartUnit=obj.alertRule.unit?obj.alertRule.unit:5;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.queryChartDate();
|
this.queryChartDate();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
<div class="mt-10 single-stat-container" v-cloak v-show="firstShow" >
|
<div class="mt-10 single-stat-container" v-cloak v-show="firstShow" >
|
||||||
<div :id="'chartContainer'+chartIndex" ref="chartContainer" class="single-stat-content" >
|
<div :id="'chartContainer'+chartIndex" ref="chartContainer" class="single-stat-content" >
|
||||||
{{serieSingleStat}}
|
{{serieSingleStat}}
|
||||||
|
<div class="chart-no-data" v-show="noData">No data</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--全屏-->
|
<!--全屏-->
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
<div class="single-stat-screen-container" >
|
<div class="single-stat-screen-container" >
|
||||||
<div id="chartScreenContainer" ref="chartScreenContainer" class="single-stat-content" >
|
<div id="chartScreenContainer" ref="chartScreenContainer" class="single-stat-content" >
|
||||||
{{serieSingleStat}}
|
{{serieSingleStat}}
|
||||||
|
<div class="chart-no-data" v-show="noData">No data</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<loading :ref="'localLoadingScreen'+chartIndex"></loading>
|
<loading :ref="'localLoadingScreen'+chartIndex"></loading>
|
||||||
@@ -99,6 +101,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
data: {}, // 该图表信息,chartItem
|
data: {}, // 该图表信息,chartItem
|
||||||
|
noData:false,
|
||||||
unit:{},
|
unit:{},
|
||||||
isError:false,
|
isError:false,
|
||||||
errorContent:'',
|
errorContent:'',
|
||||||
@@ -389,6 +392,11 @@ export default {
|
|||||||
this.isError = false;
|
this.isError = false;
|
||||||
this.errorContent = '';
|
this.errorContent = '';
|
||||||
}
|
}
|
||||||
|
if(seriesItem){
|
||||||
|
this.noData=false;
|
||||||
|
}else{
|
||||||
|
this.noData=true;
|
||||||
|
}
|
||||||
if(area==='showFullScreen'){//全屏按时间查询
|
if(area==='showFullScreen'){//全屏按时间查询
|
||||||
this.data = chartItem;
|
this.data = chartItem;
|
||||||
this.unit = chartDataFormat.getUnit(this.data.unit);
|
this.unit = chartDataFormat.getUnit(this.data.unit);
|
||||||
|
|||||||
@@ -550,5 +550,7 @@ export default {
|
|||||||
}
|
}
|
||||||
return units[index-1];
|
return units[index-1];
|
||||||
},
|
},
|
||||||
short
|
formatData:function(value,unit){
|
||||||
|
return this.getUnit(unit).compute(value,null,2)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -419,20 +419,26 @@
|
|||||||
},
|
},
|
||||||
syncChart:function(){
|
syncChart:function(){
|
||||||
if(this.from=='asset'||this.from=='model'){
|
if(this.from=='asset'||this.from=='model'){
|
||||||
let param={
|
this.$confirm(this.$t("tip.syncTip"), {
|
||||||
modelId:this.from=='model'?this.obj.id:null,
|
confirmButtonText: this.$t("tip.yes"),
|
||||||
assetId:this.from=='asset'?this.obj.id:null,
|
cancelButtonText: this.$t("tip.no"),
|
||||||
}
|
type: 'warning'
|
||||||
this.$put('/model/syncChart',param).then(response=>{
|
}).then(() => {
|
||||||
if(response.code == 200){
|
let param={
|
||||||
this.$message({duration: 1000, type: 'success', message: this.$t("tip.syncSuccess")});
|
modelId:this.from=='model'?this.obj.id:null,
|
||||||
if(this.from == 'asset'){
|
assetId:this.from=='asset'?this.obj.id:null,
|
||||||
this.Refresh();
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
console.error(response.msg)
|
|
||||||
this.$message.error(response.msg)
|
|
||||||
}
|
}
|
||||||
|
this.$put('/model/syncChart',param).then(response=>{
|
||||||
|
if(response.code == 200){
|
||||||
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.syncSuccess")});
|
||||||
|
if(this.from == 'asset'){
|
||||||
|
this.Refresh();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
console.error(response.msg)
|
||||||
|
this.$message.error(response.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -342,6 +342,7 @@ const cn = {
|
|||||||
pressEnterToAdd: "回车添加新行",
|
pressEnterToAdd: "回车添加新行",
|
||||||
resetSuccess: "重置成功",
|
resetSuccess: "重置成功",
|
||||||
syncSuccess:'同步成功',
|
syncSuccess:'同步成功',
|
||||||
|
syncTip:"此操作可能造成原有数据或图表被覆盖,确认同步吗?"
|
||||||
},
|
},
|
||||||
asset: {
|
asset: {
|
||||||
asset: "资产",
|
asset: "资产",
|
||||||
@@ -769,7 +770,10 @@ const cn = {
|
|||||||
module: "组件",
|
module: "组件",
|
||||||
asset: "设备"
|
asset: "设备"
|
||||||
},
|
},
|
||||||
alertNum: "告警数量"
|
alertNum: "告警数量",
|
||||||
|
operator:'比较符',
|
||||||
|
threshold:'阈值',
|
||||||
|
unit:'单位'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
project: {
|
project: {
|
||||||
|
|||||||
@@ -357,9 +357,10 @@ const en = {
|
|||||||
testSuccess:'Test success',
|
testSuccess:'Test success',
|
||||||
downloadSuccess : 'Download success',
|
downloadSuccess : 'Download success',
|
||||||
uploadSuccess: 'Upload success',
|
uploadSuccess: 'Upload success',
|
||||||
pressEnterToAdd: 'Press enter to add new line',
|
pressEnterToAdd: 'Press enter to add new此操作可能造成原有数据或图表被覆盖,确认同步吗? line',
|
||||||
resetSuccess:'Reset success',
|
resetSuccess:'Reset success',
|
||||||
syncSuccess:'Synchronize success'
|
syncSuccess:'Synchronize success',
|
||||||
|
syncTip:'This operation may cause the original data or chart to be overwritten. Are you sure to synchronize?',
|
||||||
},
|
},
|
||||||
asset:{
|
asset:{
|
||||||
asset: 'Asset',
|
asset: 'Asset',
|
||||||
@@ -792,7 +793,10 @@ const en = {
|
|||||||
project: 'Project',//'系统'
|
project: 'Project',//'系统'
|
||||||
module: 'Module',//'组件'
|
module: 'Module',//'组件'
|
||||||
asset: 'Device'//'设备'
|
asset: 'Device'//'设备'
|
||||||
}
|
},
|
||||||
|
operator:'Operator',
|
||||||
|
threshold:'Threshold',
|
||||||
|
unit:'Unit'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
project: {
|
project: {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="interval-refresh ">
|
<div class="interval-refresh ">
|
||||||
<time-picker ref="timePicker" class="time-picker" @change="dateChange"></time-picker>
|
<time-picker ref="timePicker" class="time-picker" @change="dateChange"></time-picker>
|
||||||
<chart-unit v-model="unit" ></chart-unit>
|
<chart-unit v-model="unit" v-if="useChartUnit"></chart-unit>
|
||||||
<div class="nz-btn-group nz-btn-group-size-normal nz-btn-group-light margin-r-20" v-show="useRefresh" style="height: 24px;line-height: 24px;vertical-align: middle;">
|
<div class="nz-btn-group nz-btn-group-size-normal nz-btn-group-light margin-r-20" v-show="useRefresh" style="height: 24px;line-height: 24px;vertical-align: middle;">
|
||||||
<button style="border-right: 1px solid rgba(162,162,162,0.50);" type="button" class="nz-btn nz-btn-size-normal nz-btn-style-light" @click="refreshDataFunc">
|
<button style="border-right: 1px solid rgba(162,162,162,0.50);" type="button" class="nz-btn nz-btn-size-normal nz-btn-style-light" @click="refreshDataFunc">
|
||||||
<i style="font-size: 12px" class="global-active-color nz-icon nz-icon-refresh"></i>
|
<i style="font-size: 12px" class="global-active-color nz-icon nz-icon-refresh"></i>
|
||||||
|
|||||||
@@ -32,6 +32,29 @@
|
|||||||
<el-input maxlength="512" rows="4" show-word-limit v-if="rightBox.isEdit" type="textarea" placeholder="" v-model="alertRule.expr" size="small"></el-input>
|
<el-input maxlength="512" rows="4" show-word-limit v-if="rightBox.isEdit" type="textarea" placeholder="" v-model="alertRule.expr" size="small"></el-input>
|
||||||
<div v-if="!rightBox.isEdit" class="right-box-form-content-txt">{{alertRule.expr}}</div>
|
<div v-if="!rightBox.isEdit" class="right-box-form-content-txt">{{alertRule.expr}}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!--operator-->
|
||||||
|
<el-form-item :label="$t('alert.config.operator')" prop="operator">
|
||||||
|
<el-select v-if="rightBox.isEdit" popper-class="config-dropdown" v-model="alertRule.operator" placeholder="" size="small">
|
||||||
|
<el-option :id="'operator-'+item.key" v-for="item in operators" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
<div v-if="!rightBox.isEdit" class="right-box-form-content-txt">{{alertRule.operator}}</div>
|
||||||
|
</el-form-item>
|
||||||
|
<!--threshold-->
|
||||||
|
<el-form-item :label="$t('alert.config.threshold')" prop="threshold">
|
||||||
|
<el-input v-if="rightBox.isEdit" type="text" placeholder="" v-model.number="alertRule.threshold" size="small">
|
||||||
|
</el-input>
|
||||||
|
<div v-if="!rightBox.isEdit" class="right-box-form-content-txt">{{alertRule.operator}}s</div>
|
||||||
|
</el-form-item>
|
||||||
|
<!--unit-->
|
||||||
|
<el-form-item :label="$t('alert.config.unit')" prop="unit">
|
||||||
|
<el-cascader filterable placeholder="" popper-class="no-style-class unit-popper-class" size="small" style="width: 100%"
|
||||||
|
:options="unitOptions"
|
||||||
|
:props="{ expandTrigger: 'click',emitPath:false }"
|
||||||
|
:show-all-levels="false"
|
||||||
|
v-model="alertRule.unit"
|
||||||
|
>
|
||||||
|
</el-cascader>
|
||||||
|
</el-form-item>
|
||||||
<!--last-->
|
<!--last-->
|
||||||
<el-form-item :label="$t('alert.config.for')" prop="last">
|
<el-form-item :label="$t('alert.config.for')" prop="last">
|
||||||
<el-input v-if="rightBox.isEdit" type="text" placeholder="" v-model.number="alertRule.last" size="small">
|
<el-input v-if="rightBox.isEdit" type="text" placeholder="" v-model.number="alertRule.last" size="small">
|
||||||
@@ -98,6 +121,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import chartDataFormat from "../../charts/chartDataFormat";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "alertConfigBox",
|
name: "alertConfigBox",
|
||||||
props: {
|
props: {
|
||||||
@@ -124,6 +149,17 @@
|
|||||||
summary:[
|
summary:[
|
||||||
{required:true,message:this.$t('validate.required'),trigger:'blur'},
|
{required:true,message:this.$t('validate.required'),trigger:'blur'},
|
||||||
],
|
],
|
||||||
|
operator:[
|
||||||
|
{required:true,message:this.$t('validate.required'),trigger:'blur'},
|
||||||
|
],
|
||||||
|
unit:[
|
||||||
|
{required:true,message:this.$t('validate.required'),trigger:'blur'},
|
||||||
|
],
|
||||||
|
threshold:[
|
||||||
|
{required:true,message:this.$t('validate.required'),trigger:'blur'},
|
||||||
|
{type:'number',message:this.$t('validate.number')}
|
||||||
|
],
|
||||||
|
|
||||||
// description:[
|
// description:[
|
||||||
// {required:true,message:this.$t('validate.required'),trigger:'blur'},
|
// {required:true,message:this.$t('validate.required'),trigger:'blur'},
|
||||||
// ],
|
// ],
|
||||||
@@ -145,6 +181,33 @@
|
|||||||
value: this.$t("alert.config.low")
|
value: this.$t("alert.config.low")
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
operators:[
|
||||||
|
{
|
||||||
|
label:'==',
|
||||||
|
value:'=='
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:'!=',
|
||||||
|
value:'!='
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:'>',
|
||||||
|
value:'>'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:'<',
|
||||||
|
value:'<'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:'>=',
|
||||||
|
value:'>='
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:'<=',
|
||||||
|
value:'<='
|
||||||
|
},
|
||||||
|
],
|
||||||
|
unitOptions:chartDataFormat.unitOptions(),
|
||||||
typeData: [
|
typeData: [
|
||||||
{
|
{
|
||||||
key: 1, //project
|
key: 1, //project
|
||||||
@@ -296,3 +359,8 @@
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
<style>
|
||||||
|
.unit-popper-class{
|
||||||
|
z-index: 2052 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -66,6 +66,9 @@
|
|||||||
<template v-else-if="item.prop == 'alertNum'">
|
<template v-else-if="item.prop == 'alertNum'">
|
||||||
<span class="link" @click="queryMessage(scope.row)">{{scope.row.alertNum + ' ' + $t('overall.active')}}</span>
|
<span class="link" @click="queryMessage(scope.row)">{{scope.row.alertNum + ' ' + $t('overall.active')}}</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="item.prop == 'threshold'">
|
||||||
|
<span >{{formatThreshold(scope.row[item.prop],scope.row.unit)}}</span>
|
||||||
|
</template>
|
||||||
<template v-else-if="item.prop == 'receivers'">
|
<template v-else-if="item.prop == 'receivers'">
|
||||||
<el-tag effect="dark" v-if="user.userName" :key="index" size="mini" v-for="(user, index) in scope.row[item.prop]" class="alert-rule-tag">{{user.userName}}</el-tag>
|
<el-tag effect="dark" v-if="user.userName" :key="index" size="mini" v-for="(user, index) in scope.row[item.prop]" class="alert-rule-tag">{{user.userName}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
@@ -112,6 +115,7 @@
|
|||||||
<script>
|
<script>
|
||||||
var vm;
|
var vm;
|
||||||
import bus from '../../../libs/bus';
|
import bus from '../../../libs/bus';
|
||||||
|
import chartDataFormat from "../../charts/chartDataFormat";
|
||||||
export default {
|
export default {
|
||||||
name: "alert-config",
|
name: "alert-config",
|
||||||
data() {
|
data() {
|
||||||
@@ -173,6 +177,9 @@
|
|||||||
type: '',
|
type: '',
|
||||||
linkObject: {id: '', name: ''},
|
linkObject: {id: '', name: ''},
|
||||||
linkId: '',
|
linkId: '',
|
||||||
|
operator:'',
|
||||||
|
threshold:'',
|
||||||
|
unit:2,
|
||||||
expr: '',
|
expr: '',
|
||||||
last: '',
|
last: '',
|
||||||
severity: '',
|
severity: '',
|
||||||
@@ -240,6 +247,14 @@
|
|||||||
show: true,
|
show: true,
|
||||||
width: 140
|
width: 140
|
||||||
}, */{
|
}, */{
|
||||||
|
label: this.$t("alert.config.operator"),
|
||||||
|
prop: 'operator',
|
||||||
|
show: true,
|
||||||
|
}, {
|
||||||
|
label: this.$t("alert.config.threshold"),
|
||||||
|
prop: 'threshold',
|
||||||
|
show: true,
|
||||||
|
}, {
|
||||||
label: this.$t("alert.config.for"),
|
label: this.$t("alert.config.for"),
|
||||||
prop: 'last',
|
prop: 'last',
|
||||||
show: true,
|
show: true,
|
||||||
@@ -338,6 +353,14 @@
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
formatThreshold:function(value,unit){
|
||||||
|
let unitMethod=chartDataFormat.getUnit(unit)
|
||||||
|
if(unitMethod&&unit.compute){
|
||||||
|
return unitMethod.compute(value,null,2);
|
||||||
|
}else{
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
},
|
||||||
//asset弹框控制
|
//asset弹框控制
|
||||||
tabControl(data) {
|
tabControl(data) {
|
||||||
if (data === 'close') {
|
if (data === 'close') {
|
||||||
|
|||||||
@@ -124,7 +124,7 @@
|
|||||||
<div v-else-if="item.prop == 'current'" class="too-long-split" >
|
<div v-else-if="item.prop == 'current'" class="too-long-split" >
|
||||||
<span v-if="!scope.row.current">-</span>
|
<span v-if="!scope.row.current">-</span>
|
||||||
<el-popover v-else placement="right" trigger="hover">
|
<el-popover v-else placement="right" trigger="hover">
|
||||||
<span slot="reference">{{scope.row.current[1]}}</span>
|
<span slot="reference">{{formatThreshold(scope.row.current[1],scope.row.alertRule.unit)}}</span>
|
||||||
<div>{{$unixTimeParseToString(scope.row.current[0])}}</div>
|
<div>{{$unixTimeParseToString(scope.row.current[0])}}</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</div>
|
</div>
|
||||||
@@ -208,7 +208,7 @@
|
|||||||
<div slot="title">
|
<div slot="title">
|
||||||
{{$t("project.endpoint.dialogTitle")}}
|
{{$t("project.endpoint.dialogTitle")}}
|
||||||
<div class="float-right panel-calendar dialog-tool" style="display: flex">
|
<div class="float-right panel-calendar dialog-tool" style="display: flex">
|
||||||
<pick-time :refresh-data-func="queryChartDate" :use-refresh="false" v-model="searchTime" style="height: 28px;" @unitChange="chartUnitChange"></pick-time>
|
<pick-time :refresh-data-func="queryChartDate" :use-refresh="false" :use-chart-unit="false" v-model="searchTime" style="height: 28px;" @unitChange="chartUnitChange"></pick-time>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<chart ref="messageChart" name="alertMessageChart" :unit="chartUnit"></chart>
|
<chart ref="messageChart" name="alertMessageChart" :unit="chartUnit"></chart>
|
||||||
@@ -221,6 +221,7 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import nzAlertTag from './nzAlertTag';
|
import nzAlertTag from './nzAlertTag';
|
||||||
import chart from '../../page/dashboard/overview/chart'
|
import chart from '../../page/dashboard/overview/chart'
|
||||||
|
import chartDataFormat from "../../charts/chartDataFormat";
|
||||||
|
|
||||||
var vm;
|
var vm;
|
||||||
export default {
|
export default {
|
||||||
@@ -482,6 +483,14 @@
|
|||||||
this.queryChartDate()
|
this.queryChartDate()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
formatThreshold:function(value,unit){
|
||||||
|
let unitMethod=chartDataFormat.getUnit(unit)
|
||||||
|
if(unitMethod&&unit.compute){
|
||||||
|
return unitMethod.compute(value,null,2);
|
||||||
|
}else{
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
},
|
||||||
queryChartDate() {
|
queryChartDate() {
|
||||||
let start = this.searchTime[0]?this.searchTime[0]:this.getTime(-1, 'h');
|
let start = this.searchTime[0]?this.searchTime[0]:this.getTime(-1, 'h');
|
||||||
let end = this.searchTime[1]?this.searchTime[1]:this.getTime(0, 'h')
|
let end = this.searchTime[1]?this.searchTime[1]:this.getTime(0, 'h')
|
||||||
@@ -564,6 +573,7 @@
|
|||||||
this.legend = [];
|
this.legend = [];
|
||||||
this.graphShow = true;
|
this.graphShow = true;
|
||||||
this.currentMsg = obj;
|
this.currentMsg = obj;
|
||||||
|
this.chartUnit=obj.alertRule.unit?obj.alertRule.unit:5;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.queryChartDate();
|
this.queryChartDate();
|
||||||
});
|
});
|
||||||
@@ -592,6 +602,8 @@
|
|||||||
return parseFloat(item).toFixed(2);
|
return parseFloat(item).toFixed(2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
current=['','']
|
||||||
}
|
}
|
||||||
this.$set(item, "current", current);
|
this.$set(item, "current", current);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user