feature(体系搜索): 修改标准状态数据来源
This commit is contained in:
@@ -24,10 +24,14 @@
|
||||
:maxlength="100"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="标准状态" class="search-item">
|
||||
<el-select v-model="searchForm.standState"
|
||||
placeholder="请选择标准状态" clearable>
|
||||
<el-option v-for="item in dict.commonState" :value="item.value" :label="item.label"></el-option>
|
||||
<el-form-item label="标准状态" class="search-item" :title="standStateLabel(searchForm.standState)">
|
||||
<el-select :value="convertStr(searchForm.standState)"
|
||||
placeholder="请选择标准状态"
|
||||
clearable
|
||||
multiple
|
||||
collapse-tags
|
||||
@change="standStateChange">
|
||||
<el-option v-for="item in standStateOptions" :value="item.value" :label="item.label"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布日期" class="search-item">
|
||||
@@ -306,6 +310,7 @@ export default {
|
||||
getListStandLimit: "lawss/sarMenuStandardLimit/getListStandLimit",
|
||||
},
|
||||
iconShow: false,
|
||||
standStateOptions: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -445,9 +450,32 @@ export default {
|
||||
this.searchForm.standSystem = ''
|
||||
this.searchForm.standSystemId = ''
|
||||
},
|
||||
standStateChange (value) {
|
||||
this.searchForm.standState = value.join(',')
|
||||
},
|
||||
standStateLabel (values) {
|
||||
if (values === '') {
|
||||
return ''
|
||||
}
|
||||
return this.standStateOptions.filter(item => values.split(',').some(i => i === item.value)).map(item => item.label).join(',')
|
||||
},
|
||||
convertStr (str) {
|
||||
return str === '' ? [] : str.split(',')
|
||||
},
|
||||
getDicTypeListCode () {
|
||||
this.$http._getData('sys/dictype/getDicTypeListCode').then(res => {
|
||||
this.dict = { ...res.data }
|
||||
if (res.ok) {
|
||||
this.dict = { ...res.data }
|
||||
const WBZTCLASS = this.dict.WBZTCLASS.map(item => ({
|
||||
label: '国内标准-' + item.label,
|
||||
value: item.value
|
||||
}))
|
||||
const TEXTSTATUSBUSS = this.dict.TEXTSTATUSBUSS.map(item => ({
|
||||
label: '企业标准-' + item.label,
|
||||
value: item.value
|
||||
}))
|
||||
this.standStateOptions = [...WBZTCLASS, ...TEXTSTATUSBUSS]
|
||||
}
|
||||
})
|
||||
},
|
||||
handlePreview (row) {
|
||||
@@ -480,4 +508,17 @@ export default {
|
||||
padding: 0 20px !important;
|
||||
}
|
||||
}
|
||||
/deep/ .search-item {
|
||||
.el-select .el-tag {
|
||||
max-width: 80px !important;
|
||||
}
|
||||
}
|
||||
///deep/ .search-area .search-item input.el-input__inner {
|
||||
// display: inline-block;
|
||||
// width: 200px;
|
||||
// color: #999;
|
||||
// height: 30px;
|
||||
// line-height: 30px;
|
||||
// font-family: MicrosoftYaHei,微软雅黑;
|
||||
//}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user