feat: 补充搜索条件select内容回显
This commit is contained in:
@@ -9,16 +9,32 @@
|
|||||||
background-color: $--background-color-base;
|
background-color: $--background-color-base;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.half-form-item.el-form-item {
|
.el-form-item.half-form-left {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 230px;
|
width: 347px;
|
||||||
|
.el-form-item__label {
|
||||||
|
text-align: left;
|
||||||
|
width: 98px !important;
|
||||||
|
}
|
||||||
.el-form-item__content {
|
.el-form-item__content {
|
||||||
width: 230px;
|
width: 230px;
|
||||||
.el-input.el-input--small,.el-input.el-input-group--append {
|
margin-left: 99px !important;
|
||||||
width: calc(100% - 18px);
|
.el-input.el-input-group--append {
|
||||||
|
width: calc(100% - 12px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.el-form-item.half-form-witch {
|
||||||
|
display: inline-block;
|
||||||
|
width: 372px;
|
||||||
|
.el-form-item__content {
|
||||||
|
width: 230px;
|
||||||
|
.el-input.el-input--small {
|
||||||
|
width: calc(100% - 49px);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.system-config-form{
|
.system-config-form{
|
||||||
width: 61.8% !important;
|
width: 61.8% !important;
|
||||||
|
|||||||
@@ -359,6 +359,7 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'state',
|
propertyName: 'state',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
isSearchInput: true,
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
label: 'dcState',
|
label: 'dcState',
|
||||||
@@ -470,15 +471,18 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'brandIds',
|
propertyName: 'brandIds',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
isSearchInput: true,
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
label: 'brandIds',
|
label: 'brandIds',
|
||||||
name: 'Brand',
|
name: 'Brand',
|
||||||
readonly: true,
|
readonly: true,
|
||||||
type: 'brand',
|
type: 'brand',
|
||||||
val: ''
|
val: '',
|
||||||
|
valnum: '',
|
||||||
|
listStr: 'brandSelect'
|
||||||
},
|
},
|
||||||
jsonKey: 'val'
|
jsonKey: 'valnum'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (path === 'operationLog') {
|
} else if (path === 'operationLog') {
|
||||||
@@ -520,6 +524,7 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'operation',
|
propertyName: 'operation',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
isSearchInput: true,
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
id: 13,
|
id: 13,
|
||||||
@@ -534,6 +539,7 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'state',
|
propertyName: 'state',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
isSearchInput: true,
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
id: 16,
|
id: 16,
|
||||||
@@ -599,6 +605,7 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'state',
|
propertyName: 'state',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
isSearchInput: true,
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
label: 'promState',
|
label: 'promState',
|
||||||
@@ -613,6 +620,7 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'dc',
|
propertyName: 'dc',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
isSearchInput: true,
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
name: 'Date center',
|
name: 'Date center',
|
||||||
type: 'dc',
|
type: 'dc',
|
||||||
@@ -620,29 +628,24 @@ export default {
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
val: '',
|
val: '',
|
||||||
valnum: '',
|
valnum: '',
|
||||||
valString: ''
|
|
||||||
},
|
|
||||||
jsonKey: 'valnum',
|
|
||||||
strKey: 'val',
|
|
||||||
listStr: 'dcSelect'
|
listStr: 'dcSelect'
|
||||||
},
|
},
|
||||||
|
jsonKey: 'valnum'
|
||||||
|
},
|
||||||
type: {
|
type: {
|
||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'type',
|
propertyName: 'type',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
isSearchInput: true,
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
label: 'promType',
|
label: 'promType',
|
||||||
name: 'Type',
|
name: 'Type',
|
||||||
readonly: true,
|
readonly: true,
|
||||||
type: 'select',
|
type: 'select',
|
||||||
val: '',
|
val: ''
|
||||||
valnum: '',
|
|
||||||
valString: ''
|
|
||||||
},
|
},
|
||||||
jsonKey: 'valnum',
|
jsonKey: 'val'
|
||||||
strKey: 'val',
|
|
||||||
listStr: 'history_once'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (path === 'roles') {
|
} else if (path === 'roles') {
|
||||||
@@ -753,6 +756,7 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'type',
|
propertyName: 'type',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
isSearchInput: true,
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
label: 'credentialType',
|
label: 'credentialType',
|
||||||
|
|||||||
@@ -479,11 +479,10 @@ export default {
|
|||||||
},
|
},
|
||||||
jsonKey: 'val'
|
jsonKey: 'val'
|
||||||
},
|
},
|
||||||
dcIds: { target: this.searchCheckBox, propertyName: 'dcIds', type: 'number' },
|
dcIds: { target: this.searchCheckBox, propertyName: 'dcIds', type: 'string', target2: this.selectValue, type2: 'array' },
|
||||||
modelIds: { target: this.searchCheckBox, propertyName: 'modelIds', type: 'number' },
|
moduleIds: { target: this.searchCheckBox, propertyName: 'moduleIds', type: 'string', target2: this.selectValue, type2: 'array' },
|
||||||
moduleIds: { target: this.searchCheckBox, propertyName: 'moduleIds', type: 'number' },
|
projectIds: { target: this.searchCheckBox, propertyName: 'projectIds', type: 'string', target2: this.selectValue, type2: 'array' },
|
||||||
projectIds: { target: this.searchCheckBox, propertyName: 'projectIds', type: 'number' },
|
severityIds: { target: this.searchCheckBox, propertyName: 'severityIds', type: 'string', target2: this.selectValue, type2: 'array' }
|
||||||
severityIds: { target: this.searchCheckBox, propertyName: 'severityIds', type: 'string' }
|
|
||||||
}
|
}
|
||||||
this.initQueryFromPath(searchKeys)
|
this.initQueryFromPath(searchKeys)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -390,7 +390,7 @@ export default {
|
|||||||
readonly: true,
|
readonly: true,
|
||||||
val: '',
|
val: '',
|
||||||
valnum: '',
|
valnum: '',
|
||||||
valString: ''
|
listStr: 'alertTypesSelect'
|
||||||
},
|
},
|
||||||
jsonKey: 'valnum'
|
jsonKey: 'valnum'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -767,7 +767,6 @@ export default {
|
|||||||
ids: {
|
ids: {
|
||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'ids',
|
propertyName: 'ids',
|
||||||
|
|
||||||
type: 'string',
|
type: 'string',
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
@@ -783,7 +782,6 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'name',
|
propertyName: 'name',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
id: 'name',
|
id: 'name',
|
||||||
@@ -798,7 +796,6 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'sn',
|
propertyName: 'sn',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
id: 'sn',
|
id: 'sn',
|
||||||
@@ -813,7 +810,6 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'manageIp',
|
propertyName: 'manageIp',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
id: 'manageIp',
|
id: 'manageIp',
|
||||||
@@ -828,7 +824,7 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'statistics',
|
propertyName: 'statistics',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
isSearchInput: true,
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
id: 'stateIds',
|
id: 'stateIds',
|
||||||
@@ -836,15 +832,17 @@ export default {
|
|||||||
name: 'State',
|
name: 'State',
|
||||||
readonly: true,
|
readonly: true,
|
||||||
type: 'assetState',
|
type: 'assetState',
|
||||||
val: ''
|
val: '',
|
||||||
|
valnum: '',
|
||||||
|
listStr: 'assetStateSelect'
|
||||||
},
|
},
|
||||||
jsonKey: 'val'
|
jsonKey: 'valnum'
|
||||||
},
|
},
|
||||||
dcIds: { target: this.searchCheckBox, propertyName: 'dcIds', type: 'string', target2: this.selectValue, type2: 'array' },
|
dcIds: { target: this.searchCheckBox, propertyName: 'dcIds', type: 'string', target2: this.selectValue, type2: 'array' },
|
||||||
fields: { target: this.searchCheckBox, propertyName: 'fields', type: 'json', target2: this.selectValue, type2: 'json' },
|
fields: { target: this.searchCheckBox, propertyName: 'fields', type: 'json', target2: this.selectValue, type2: 'json' },
|
||||||
ping: { target: this.searchCheckBox, propertyName: 'ping', type: 'string' },
|
ping: { target: this.searchCheckBox, propertyName: 'ping', type: 'string', target2: this.selectValue, type2: 'array' },
|
||||||
modelIds: { target: this.searchCheckBox, propertyName: 'modelIds', type: 'string' },
|
modelIds: { target: this.searchCheckBox, propertyName: 'modelIds', type: 'string', target2: this.selectValue, type2: 'array' },
|
||||||
typeIds: { target: this.searchCheckBox, propertyName: 'typeIds', type: 'string' }
|
typeIds: { target: this.searchCheckBox, propertyName: 'typeIds', type: 'string', target2: this.selectValue, type2: 'array' }
|
||||||
}
|
}
|
||||||
this.initQueryFromPath(searchKeys)
|
this.initQueryFromPath(searchKeys)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -348,11 +348,10 @@ export default {
|
|||||||
readonly: true,
|
readonly: true,
|
||||||
type: 'group',
|
type: 'group',
|
||||||
val: '',
|
val: '',
|
||||||
searchType: ''
|
valnum: '',
|
||||||
},
|
|
||||||
jsonKey: 'searchType',
|
|
||||||
strKey: 'val',
|
|
||||||
listStr: 'groupSelect'
|
listStr: 'groupSelect'
|
||||||
|
},
|
||||||
|
jsonKey: 'valnum'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.initQueryFromPath(searchKeys)
|
this.initQueryFromPath(searchKeys)
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
<el-switch v-model="basic.unsaved_change" active-value='on' inactive-value='off' id="system-baisc-unsaved_change">
|
<el-switch v-model="basic.unsaved_change" active-value='on' inactive-value='off' id="system-baisc-unsaved_change">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="system-title">{{$t('config.system.basic.pinPolicy')}} <span class="el-form-item__tip">({{$t('config.system.basic.pinPolicyValue')}})</span></div>
|
<div class="system-title">{{$t('config.system.basic.pinPolicy')}}</div>
|
||||||
<el-form-item :label="$t('config.system.basic.gloEnable')" prop="mfa_auth_enable">
|
<el-form-item :label="$t('config.system.basic.gloEnable')" prop="mfa_auth_enable">
|
||||||
<el-switch v-model="basic.mfa_auth_enable" :active-value='"1"' :inactive-value='"0"' id="system-basic-mfs_change">
|
<el-switch v-model="basic.mfa_auth_enable" :active-value='"1"' :inactive-value='"0"' id="system-basic-mfs_change">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
@@ -80,6 +80,7 @@
|
|||||||
<el-form-item :label="$t('config.system.basic.enable')" prop="enable">
|
<el-form-item :label="$t('config.system.basic.enable')" prop="enable">
|
||||||
<el-switch v-model="basic.pin_policy.enable" active-value='1' inactive-value='0' id="system-basic-enable">
|
<el-switch v-model="basic.pin_policy.enable" active-value='1' inactive-value='0' id="system-basic-enable">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
|
<div class="el-form-item__tip" style="margin: 0">{{$t('config.system.basic.pinPolicyValue')}}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.system.basic.length')" prop="length">
|
<el-form-item :label="$t('config.system.basic.length')" prop="length">
|
||||||
<el-input v-model="basic.pin_policy.length" id="system-basic-length"></el-input>
|
<el-input v-model="basic.pin_policy.length" id="system-basic-length"></el-input>
|
||||||
@@ -96,11 +97,11 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
<div class="el-form-item__tip">{{$t('config.system.basic.passPeriodValue')}}</div>
|
<div class="el-form-item__tip">{{$t('config.system.basic.passPeriodValue')}}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.system.basic.retry')" class="half-form-item" prop="retry" style="padding-bottom: 15px">
|
<el-form-item :label="$t('config.system.basic.retry')" class="half-form-witch" prop="retry" style="padding-bottom: 15px">
|
||||||
<el-input v-model="basic.pin_policy.retry" id="system-basic-retry"></el-input>
|
<el-input v-model="basic.pin_policy.retry" id="system-basic-retry"></el-input>
|
||||||
<div class="el-form-item__tip" style="width: 512px;">({{$t('config.system.basic.retryValue')}})</div>
|
<div class="el-form-item__tip" style="width: 512px;">{{$t('config.system.basic.retryValue')}}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.system.basic.lockTime')" class="half-form-item" prop="lockTime" style="margin-left: 66px">
|
<el-form-item :label="$t('config.system.basic.lockTime')" class="half-form-left" prop="lockTime">
|
||||||
<el-input v-model="basic.pin_policy.lockTime" id="system-basic-lock-time">
|
<el-input v-model="basic.pin_policy.lockTime" id="system-basic-lock-time">
|
||||||
<template slot="append"><span >{{$t('config.system.basic.minute')}}</span></template>
|
<template slot="append"><span >{{$t('config.system.basic.minute')}}</span></template>
|
||||||
</el-input>
|
</el-input>
|
||||||
|
|||||||
@@ -296,6 +296,7 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'type',
|
propertyName: 'type',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
isSearchInput: true,
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
label: 'chartType',
|
label: 'chartType',
|
||||||
@@ -310,6 +311,7 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'state',
|
propertyName: 'state',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
isSearchInput: true,
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
label: 'varType',
|
label: 'varType',
|
||||||
|
|||||||
@@ -295,6 +295,7 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'protocol',
|
propertyName: 'protocol',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
isSearchInput: true,
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
id: 16,
|
id: 16,
|
||||||
@@ -310,6 +311,7 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'state',
|
propertyName: 'state',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
isSearchInput: true,
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
id: 17,
|
id: 17,
|
||||||
|
|||||||
@@ -779,28 +779,6 @@ export default {
|
|||||||
this.selectValue.projectIds = [Number(localStorage.getItem('endpointProjectId'))]
|
this.selectValue.projectIds = [Number(localStorage.getItem('endpointProjectId'))]
|
||||||
this.searchCheckBox.projectIds = this.selectValue.projectIds.join(',')
|
this.searchCheckBox.projectIds = this.selectValue.projectIds.join(',')
|
||||||
}
|
}
|
||||||
// if (localStorage.getItem('endpointProjectId')) {
|
|
||||||
// const project = JSON.parse(localStorage.getItem('endpointProjectId'))
|
|
||||||
// let dataList = ''
|
|
||||||
// if (this.detailType !== 'view') {
|
|
||||||
// dataList = 'dataList'
|
|
||||||
// } else {
|
|
||||||
// dataList = 'detailList'
|
|
||||||
// }
|
|
||||||
// setTimeout(() => {
|
|
||||||
// this.$refs[dataList].$refs.searchInput.select_list.push({
|
|
||||||
// id: 11,
|
|
||||||
// name: this.$t('overall.name'),
|
|
||||||
// type: 'project',
|
|
||||||
// label: 'projectIds',
|
|
||||||
// disabled: false,
|
|
||||||
// val: project[1],
|
|
||||||
// valnum: project[0]
|
|
||||||
// })
|
|
||||||
// this.$refs[dataList].$refs.searchInput.sreach_num = 1
|
|
||||||
// this.$refs[dataList].$refs.searchInput.searchLabelList = this.$refs[dataList].$refs.searchInput.searchLabelList.filter(item => item.label !== 'projectIds')
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
const searchKeys = {
|
const searchKeys = {
|
||||||
// key: path 键
|
// key: path 键
|
||||||
// value: vue set 参数
|
// value: vue set 参数
|
||||||
@@ -848,9 +826,10 @@ export default {
|
|||||||
},
|
},
|
||||||
jsonKey: 'val'
|
jsonKey: 'val'
|
||||||
},
|
},
|
||||||
projectIds: { target: this.searchCheckBox, propertyName: 'projectIds', type: 'string' },
|
projectIds: { target: this.searchCheckBox, propertyName: 'projectIds', type: 'string', target2: this.selectValue, type2: 'array' },
|
||||||
logsStates: { target: this.searchCheckBox, propertyName: 'logsStates', type: 'string' },
|
moduleIds: { target: this.searchCheckBox, propertyName: 'moduleIds', type: 'string', target2: this.selectValue, type2: 'array' },
|
||||||
moduleIds: { target: this.searchCheckBox, propertyName: 'moduleIds', type: 'string' }
|
logsStates: { target: this.searchCheckBox, propertyName: 'logsStates', type: 'string', target2: this.selectValue, type2: 'array' },
|
||||||
|
metricsStates: { target: this.searchCheckBox, propertyName: 'metricsStates', type: 'string', target2: this.selectValue, type2: 'array' }
|
||||||
}
|
}
|
||||||
this.initQueryFromPath(searchKeys)
|
this.initQueryFromPath(searchKeys)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -494,6 +494,7 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'projectIds',
|
propertyName: 'projectIds',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
isSearchInput: true,
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
id: 11,
|
id: 11,
|
||||||
@@ -501,9 +502,11 @@ export default {
|
|||||||
name: 'Project name',
|
name: 'Project name',
|
||||||
readonly: true,
|
readonly: true,
|
||||||
type: 'project',
|
type: 'project',
|
||||||
val: ''
|
val: '',
|
||||||
|
valnum: '',
|
||||||
|
listStr: 'projectSelect'
|
||||||
},
|
},
|
||||||
jsonKey: 'val'
|
jsonKey: 'valnum'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.initQueryFromPath(searchKeys)
|
this.initQueryFromPath(searchKeys)
|
||||||
|
|||||||
Reference in New Issue
Block a user