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'"> <div v-if="item.key === 'detail' && activeName === 'detail'">
<alert-message-info-detail :info-data="infoData"/> <alert-message-info-detail :info-data="infoData"/>
</div> </div>
<div v-else-if="item.key === 'dashboard' && activeName === 'dashboard'" class="alert-message-info-dashboard"> <!-- <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> <!-- <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>-->
<div v-else-if="(activeName === item.key) && infoData[item.key]" class="no-position-alert-label"> <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>--> <!-- <searchItemInfo :obj="findData(item.key)" :severityData="severityData" :fa-loading="false"></searchItemInfo>-->
<alertLabel <alertLabel
@@ -118,13 +118,13 @@ export default {
}) })
// && n.alertRule.dashboardId // && n.alertRule.dashboardId
// n.alertRule && (n.alertRule.dashboardId = 101534) // n.alertRule && (n.alertRule.dashboardId = 101534)
if (n.alertRule && n.alertRule.dashboardId && n.alertRule.dashboardId != -1) { // if (n.alertRule && n.alertRule.dashboardId && n.alertRule.dashboardId != -1) {
// // //
this.cardNames.push({ // this.cardNames.push({
key: 'dashboard', // key: 'dashboard',
label: this.$t('overall.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>') { 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({ this.cardNames.push({
key: 'trbShot', key: 'trbShot',

View File

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