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

View File

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

View File

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