NEZ-3172 fix:取消 alert rule 关联 dashboard 配置及显示

This commit is contained in:
zhangyu
2023-09-05 14:00:33 +08:00
parent cef9ef6f23
commit 4b19977721
2 changed files with 32 additions and 32 deletions

View File

@@ -5,9 +5,9 @@
<div v-if="item.key === 'detail' && activeName === 'detail'">
<alert-message-info-detail :info-data="infoData"/>
</div>
<div v-else-if="item.key === 'dashboard' && activeName === 'dashboard'" class="alert-message-info-dashboard">
<dashboard :temp-id="infoData.alertRule.dashboardId" :showImport="false" :showName="false" :url-type="'dashboard'" :time="timeRange" class="message-info-dashboard" :from="fromRoute.dashboard"></dashboard>
</div>
<!-- <div v-else-if="item.key === 'dashboard' && activeName === 'dashboard'" class="alert-message-info-dashboard">-->
<!-- <dashboard :temp-id="infoData.alertRule.dashboardId" :showImport="false" :showName="false" :url-type="'dashboard'" :time="timeRange" class="message-info-dashboard" :from="fromRoute.dashboard"></dashboard>-->
<!-- </div>-->
<div v-else-if="(activeName === item.key) && infoData[item.key]" class="no-position-alert-label">
<!-- <searchItemInfo :obj="findData(item.key)" :severityData="severityData" :fa-loading="false"></searchItemInfo>-->
<alertLabel
@@ -118,13 +118,13 @@ export default {
})
// && n.alertRule.dashboardId
// n.alertRule && (n.alertRule.dashboardId = 101534)
if (n.alertRule && n.alertRule.dashboardId && n.alertRule.dashboardId != -1) {
//
this.cardNames.push({
key: 'dashboard',
label: this.$t('overall.dashboard')
})
}
// if (n.alertRule && n.alertRule.dashboardId && n.alertRule.dashboardId != -1) {
// //
// this.cardNames.push({
// key: 'dashboard',
// label: this.$t('overall.dashboard')
// })
// }
if (n.alertRule && n.alertRule.trbShot && n.alertRule.trbShot != '<div class="editor-core ql-container ql-snow"><div class="ql-editor"><p><br></p></div></div>') {
this.cardNames.push({
key: 'trbShot',

View File

@@ -339,27 +339,27 @@
</el-time-picker>
</el-form-item>
<div class="alert-rule-split-title">{{ $t('overall.more') }}</div>
<!--panel-->
<el-form-item
class="form-item--half-width"
:label="$t('overall.associateDashboard')"
prop="dashboard"
>
<select-panel @setPanelName="setPanelName" ref="selectPanel" :disabled="false" :filter-panel="filterPanel" :chart-box="true" :panel-lock="true" :show-panel="showPanel" :panelData="panelData" :placement="'bottom-start'" @selectPanel="selectPanel">
<template v-slot:header>
<div class="panel-select-header">
<el-input id="chart-box-panelname" v-model="filterPanel" :placeholder="$t('overall.search')" clearable size="small" style="width: 596px"></el-input>
</div>
</template>
<template v-slot:trigger>
<!-- <el-input placeholder="" size="small" clearable v-model="panelName" :disabled="false"></el-input>-->
<div class="alert-rule-box-dashboard">
<div class="text-ellipsis alert-rule-box-dashboard-name" :title="panelName">{{panelName}}</div>
<i class="nz-icon nz-icon-guanbi2" @click.stop="clearDashboard()"/>
</div>
</template>
</select-panel>
</el-form-item>
<!-- &lt;!&ndash;panel&ndash;&gt;-->
<!-- <el-form-item-->
<!-- class="form-item&#45;&#45;half-width"-->
<!-- :label="$t('overall.associateDashboard')"-->
<!-- prop="dashboard"-->
<!-- >-->
<!-- <select-panel @setPanelName="setPanelName" ref="selectPanel" :disabled="false" :filter-panel="filterPanel" :chart-box="true" :panel-lock="true" :show-panel="showPanel" :panelData="panelData" :placement="'bottom-start'" @selectPanel="selectPanel">-->
<!-- <template v-slot:header>-->
<!-- <div class="panel-select-header">-->
<!-- <el-input id="chart-box-panelname" v-model="filterPanel" :placeholder="$t('overall.search')" clearable size="small" style="width: 596px"></el-input>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-slot:trigger>-->
<!--&lt;!&ndash; <el-input placeholder="" size="small" clearable v-model="panelName" :disabled="false"></el-input>&ndash;&gt;-->
<!-- <div class="alert-rule-box-dashboard">-->
<!-- <div class="text-ellipsis alert-rule-box-dashboard-name" :title="panelName">{{panelName}}</div>-->
<!-- <i class="nz-icon nz-icon-guanbi2" @click.stop="clearDashboard()"/>-->
<!-- </div>-->
<!-- </template>-->
<!-- </select-panel>-->
<!-- </el-form-item>-->
<el-form-item :label="$t('alert.config.trbShot')" prop="trbShot">
<rich-text-editor ref="richTextEditor" :edit-data="editAlertRule.trbShot" @after-init="afterInitRich"></rich-text-editor>
</el-form-item>
@@ -804,7 +804,7 @@ export default {
mounted () {
this.getUserList()
this.getNotifyData()
this.getDashboard()
// this.getDashboard()
},
watch: {
alertRule: {