NEZ-660 fix: 修复一系列搜索框问题

This commit is contained in:
chenjinsong
2021-05-24 16:11:45 +08:00
parent f33fb16f1e
commit 0921f1c5ed
4 changed files with 17 additions and 16 deletions

View File

@@ -836,14 +836,14 @@ export default {
let labelBool = true
this.select_list.forEach(val => {
if (typeof (val.val) !== 'undefined' && val.val != null) {
if (val.type == 'select') {
if (val.label == 'alertType' || val.label == 'promType') {
if (val.type === 'select') {
if (val.label === 'alertType' || val.label === 'promType') {
objectInfo.type = val.valnum
} else if (val.label == 'assetState') {
} else if (val.label === 'assetState') {
objectInfo.state = val.valnum
} else if (typeof (val.valnum) === 'undefined' || val.valnum == '') {
this.selectInfoList[val.label].forEach(item => {
if (item.label == val.val) {
if (item.label === val.val) {
labelBool = false
objectInfo[val.label] = item.value
}
@@ -851,18 +851,20 @@ export default {
if (labelBool) {
objectInfo[val.label] = val.val
}
} else if (val.label === 'promState') {
objectInfo.statuses = val.valnum
} else {
objectInfo[val.label] = val.valnum
}
} else if (val.type == 'selectSelf') {
} else if (val.type === 'selectSelf') {
objectInfo[val.label] = val.valnum
} else if (val.type == 'selectAction') { // 新增日志判断
} else if (val.type === 'selectAction') { // 新增日志判断
objectInfo[val.label] = val.valnum
} else if (val.type == 'dc') {
} else if (val.type === 'dc') {
objectInfo.dcIds = val.valnum
} else if (val.type == 'asset') {
} else if (val.type === 'asset') {
objectInfo.asset = val.val
} else if (val.type == 'module') {
} else if (val.type === 'module') {
objectInfo.moduleId = val.valnum
} else if (val.type === 'project') {
objectInfo.projectIds = val.valnum
@@ -877,8 +879,6 @@ export default {
objectInfo.state = val.val
} else if (val.label === 'promType') {
objectInfo.type = val.val
} else if (val.label === 'promState') {
objectInfo.status = val.val
} else if (val.label === 'chartType') {
objectInfo.type = val.val
}

View File

@@ -161,11 +161,11 @@ const searchSelectInfo = { // value: 传给后台的值label显示给用
],
dcState: [
{
value: 'enable',
value: 'ON',
label: 'Enable'
},
{
value: 'disable',
value: 'OFF',
label: 'Disable'
}
],

View File

@@ -89,7 +89,7 @@ export default {
}, {
name: this.$t('alert.silence.matchers'),
type: 'input',
label: 'matchers ',
label: 'matchers',
disabled: false
}
]

View File

@@ -7,7 +7,9 @@
:custom-table-title.sync="tools.customTableTitle"
:from="fromRoute.mib"
:layout="['searchInput', 'elementSet']"
:search-msg="searchMsg">
:search-msg="searchMsg"
@search="search"
>
<template v-slot:top-tool-left>
<div id="module-type-6" class="nz-tab-item-box" @click="toFileTab">
<div class="nz-tab-item ">{{$t("config.mib.mibFiles")}}</div>
@@ -85,7 +87,6 @@ export default {
}
},
searchMsg: { // 给搜索框子组件传递的信息
zheze_none: true,
searchLabelList: [{
name: 'ID',
type: 'input',