fix: 修复chabinetBox name未定义 alertRuleBox id未定义

This commit is contained in:
@changcode
2021-05-10 14:35:12 +08:00
parent f56ca0fac5
commit e3d95001eb
3 changed files with 12 additions and 10 deletions

View File

@@ -56,6 +56,8 @@ export default {
}
}
},
created() {
},
methods: {
clickOutside () {
this.esc(false)

View File

@@ -78,7 +78,7 @@
</transition>
<!-- cabinet -->
<transition name="right-box">
<cabinet-box v-if="rightBox.cabinet.show" :cabinet="cabinet" ref="cabinetEditBox" @close="closeCabinetBox"></cabinet-box>
<cabinet-box v-if="rightBox.cabinet.show" :current-dc="cabinet" :cabinet="cabinet" ref="cabinetEditBox" @close="closeCabinetBox"></cabinet-box>
</transition>
<!-- agent -->
<transition name="right-box">
@@ -173,7 +173,7 @@
v-if="rightBox.charts.show"></chart-box>
</transition>
<transition name="right-box">
<alert-rule-box v-if="rightBox.alert.show" ref="alertConfigBox" :alert="alert" @close="closeAlertBox"></alert-rule-box>
<alert-rule-box v-if="rightBox.alert.show" :alert-rule="alert" ref="alertConfigBox" :alert="alert" @close="closeAlertBox"></alert-rule-box>
</transition>
<!--web-->
<el-dropdown>
@@ -227,12 +227,10 @@ import axios from 'axios'
export default {
props: {
show: Boolean,
params: { type: Object },
exportFileName: { type: String },
link: { type: Object },
permissions: { type: Object },
showCur: { type: Boolean, default: true },
id: { type: String, default: 'export' }
id: { type: String, default: 'export' },
currentDc: { type: Object },
alertRule: Object
},
components: {
DcBox,
@@ -431,9 +429,10 @@ export default {
unit: 2,
operator: '>',
last: 60,
severity: 'P2',
severityId: '',
summary: '',
description: ''
description: '',
method: []
},
cabinet: {
id: '',
@@ -525,6 +524,7 @@ export default {
},
// Alert
addAlertRule() {
console.log(id)
this.rightBox.alert.show = true
this.$emit("update:show", false);
},

View File

@@ -47,7 +47,7 @@
</template>
</nz-data-list>
<transition name="right-box">
<snmp-credential-box :credential="object" v-if="rightBox.show" ref="credentialBox" @close="closeRightBox" @reload="getTableData"></snmp-credential-box>
<snmp-credential-box :credential="object" v-if="rightBox.show" ref="credentialBox" @close="closeSnmpBox" @reload="getTableData"></snmp-credential-box>
</transition>
</div>
</template>