[update 搜索中心] 完善
This commit is contained in:
@@ -828,6 +828,8 @@ export default {
|
||||
// 标准类型是条款时,默认回显第一个标准的条款
|
||||
if (this.dataSource.length && this.currStandardType === '4') {
|
||||
this.handleClickStandar(this.dataSource[0])
|
||||
} else {
|
||||
this.clauseDataSource = []
|
||||
}
|
||||
if (res.result.total) {
|
||||
this.ipagination.total = res.result.total
|
||||
|
||||
@@ -204,7 +204,8 @@ export default {
|
||||
'standardState', // 状态
|
||||
'standardCode', // 企业标准代号
|
||||
'enterpriseStandardState', // 标准状态
|
||||
'gradeClassification' // 标准等级分类
|
||||
'gradeClassification', // 标准等级分类
|
||||
'categoryCode' // 标准分类代码
|
||||
], // 其他筛选条件中所有的key,为了能按顺序遍历
|
||||
dataSource: [],
|
||||
ipagination: {
|
||||
@@ -326,32 +327,8 @@ export default {
|
||||
// 设置对象key为搜索时需要传给后端的字段名,以及设置选项和字段label
|
||||
for (const item in res.result) {
|
||||
if (res.result[item]) {
|
||||
let label = ''
|
||||
if (item === 'applicableVehicle') {
|
||||
// 适用车辆类型
|
||||
label = this.$t('dashboard.generalSearch.applicableVehicleType')
|
||||
} else if (item === 'dynamicType') {
|
||||
// 动力类型
|
||||
label = this.$t('dashboard.generalSearch.dynamicType')
|
||||
} else if (item === 'enterpriseStandardState') {
|
||||
// 标准状态
|
||||
label = this.$t('dashboard.generalSearch.standardState')
|
||||
} else if (item === 'gradeClassification') {
|
||||
// 标准等级分类
|
||||
label = this.$t('dashboard.generalSearch.standardGradeClassification')
|
||||
} else if (item === 'standardClass') {
|
||||
// 标准类别
|
||||
label = this.$t('dashboard.generalSearch.standardClass')
|
||||
} else if (item === 'standardCode') {
|
||||
// 企业标准代号
|
||||
label = this.$t('dashboard.generalSearch.enterpriseStandardCode')
|
||||
} else if (item === 'standardProperty') {
|
||||
// 标准类型
|
||||
label = this.$t('dashboard.generalSearch.standardType')
|
||||
} else if (item === 'standardState') {
|
||||
// 状态
|
||||
label = this.$t('dashboard.generalSearch.state')
|
||||
}
|
||||
// 通过key获取对应label
|
||||
const label = this.getLabelByKey(item)
|
||||
res.result[item].unshift({ itemText: this.$t('dashboard.generalSearch.all'), itemValue: 'all' })
|
||||
this.selectOptions[item] = {
|
||||
options: res.result[item],
|
||||
@@ -375,6 +352,40 @@ export default {
|
||||
this.selectOptionLoading = false
|
||||
})
|
||||
},
|
||||
// 通过key获取label
|
||||
getLabelByKey (key) {
|
||||
if (key === 'applicableVehicle') {
|
||||
// 适用车型
|
||||
return this.$t('dashboard.generalSearch.applicableVehicleType')
|
||||
} else if (key === 'dynamicType') {
|
||||
// 动力类型
|
||||
return this.$t('dashboard.generalSearch.dynamicType')
|
||||
} else if (key === 'enterpriseStandardState') {
|
||||
// 标准状态
|
||||
return this.$t('dashboard.generalSearch.standardState')
|
||||
} else if (key === 'gradeClassification') {
|
||||
// 标准等级分类
|
||||
return this.$t('dashboard.generalSearch.standardGradeClassification')
|
||||
} else if (key === 'standardClass') {
|
||||
// 标准类别
|
||||
return this.$t('dashboard.generalSearch.standardClass')
|
||||
} else if (key === 'standardCode') {
|
||||
// 企业标准代号
|
||||
return this.$t('dashboard.generalSearch.enterpriseStandardCode')
|
||||
} else if (key === 'standardProperty') {
|
||||
// 标准类型
|
||||
return this.$t('dashboard.generalSearch.standardType')
|
||||
} else if (key === 'standardState') {
|
||||
// 状态
|
||||
return this.$t('dashboard.generalSearch.state')
|
||||
} else if (key === 'categoryCode') {
|
||||
// 标准分类代码
|
||||
return this.$t('dashboard.generalSearch.standardCategoryCode')
|
||||
} else if (key === 'applicableMarket') {
|
||||
// 适用市场
|
||||
return this.$t('dashboard.generalSearch.applicableMarkets')
|
||||
}
|
||||
},
|
||||
// 查询时获取参数
|
||||
getSearchParam () {
|
||||
const param = {}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
<div class="table-operator" style="border-top: 5px">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus" v-has="'standardMasterPlan:add'">{{ $t('add') }}</a-button>
|
||||
<a-button type="primary" icon="upload" ghost @click="handleExportXls($t('dict.dictInfo'))"
|
||||
<a-button type="primary" icon="upload" ghost @click="handleExportXls($t('standardRegulationLibrary.standardMasterPlan.exportXlsName'))"
|
||||
v-has="'standardMasterPlan:export'">{{ $t('export') }}
|
||||
</a-button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user