[update] 修改bug79085
This commit is contained in:
@@ -102,7 +102,8 @@
|
|||||||
</template>
|
</template>
|
||||||
<a-empty class="empty-content" v-else />
|
<a-empty class="empty-content" v-else />
|
||||||
|
|
||||||
<search-history-modal class="search-history-modal" ref="searchHistoryModal"></search-history-modal>
|
<!-- 检索历史弹框 -->
|
||||||
|
<search-history-modal class="search-history-modal" ref="searchHistoryModal" @historySearch="historySearch"></search-history-modal>
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</template>
|
</template>
|
||||||
@@ -193,7 +194,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取要显示数量的筛选条件的数据
|
// 获取要显示数量的筛选条件的数据
|
||||||
initFilterData () {
|
initFilterData (callback) {
|
||||||
const param = {}
|
const param = {}
|
||||||
// 资源类型
|
// 资源类型
|
||||||
param.resourceType = this.resourceTypeCurrent === 'all' ? null : this.resourceTypeCurrent
|
param.resourceType = this.resourceTypeCurrent === 'all' ? null : this.resourceTypeCurrent
|
||||||
@@ -253,6 +254,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(this.selectOptions)
|
console.log(this.selectOptions)
|
||||||
|
callback && callback()
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
this.selectOptions = {}
|
this.selectOptions = {}
|
||||||
@@ -414,6 +416,37 @@ export default {
|
|||||||
id: record.id
|
id: record.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
// 检索弹框点击历史查数据
|
||||||
|
historySearch (searchObj) {
|
||||||
|
console.log('--------historySearch--------', searchObj)
|
||||||
|
this.retrievalModeCurrent = searchObj.searchMode // 检索方式
|
||||||
|
this.resourceTypeCurrent = searchObj.resourceType || 'all' // 资源类型
|
||||||
|
this.searchValue = searchObj.searchValue // 搜索内容
|
||||||
|
if (this.resourceTypeCurrent !== 'all' && this.searchValue) {
|
||||||
|
this.initFilterData(() => {
|
||||||
|
const query = {
|
||||||
|
applicableVehicle: searchObj.applicableVehicle, // 适用车辆类型
|
||||||
|
dynamicType: searchObj.dynamicType, // 动力类型
|
||||||
|
enterpriseStandardState: searchObj.enterpriseStandardState, // 标准状态
|
||||||
|
gradeClassification: searchObj.gradeClassification, // 标准等级分类
|
||||||
|
standardClass: searchObj.standardClass, // 标准类别
|
||||||
|
standardCode: searchObj.standardCode, // 企业标准代号
|
||||||
|
standardProperty: searchObj.standardProperty, // 标准类型
|
||||||
|
standardState: searchObj.standardState // 状态
|
||||||
|
}
|
||||||
|
const queryObj = {}
|
||||||
|
for (const item in query) {
|
||||||
|
if (query[item]) {
|
||||||
|
queryObj[item] = query[item]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (const item in queryObj) {
|
||||||
|
this.selectOptions[item].current = queryObj[item]
|
||||||
|
}
|
||||||
|
this.onSearch(1)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<template #title>
|
<template #title>
|
||||||
{{ arrItem.searchContent }}
|
{{ arrItem.searchContent }}
|
||||||
</template>
|
</template>
|
||||||
<p>{{ arrItem.searchContent }}</p>
|
<p class="search-content" @click="clickSearchContent(arrItem)">{{ arrItem.searchContent }}</p>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<i class="iconfont icon-shanchu_" @click="handleDelete(arrItem.id)"></i>
|
<i class="iconfont icon-shanchu_" @click="handleDelete(arrItem.id)"></i>
|
||||||
</div>
|
</div>
|
||||||
@@ -135,6 +135,31 @@ export default {
|
|||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 点击标题跳转
|
||||||
|
clickSearchContent (item) {
|
||||||
|
const query = {
|
||||||
|
searchMode: item.searchMode, // 检索方式
|
||||||
|
resourceType: item.resourceType, // 资源类型
|
||||||
|
searchValue: item.searchContent, // 搜索内容
|
||||||
|
applicableVehicle: item.applicableVehicle, // 适用车辆类型
|
||||||
|
dynamicType: item.dynamicType, // 动力类型
|
||||||
|
enterpriseStandardState: item.enterpriseStandardState, // 标准状态
|
||||||
|
gradeClassification: item.gradeClassification, // 标准等级分类
|
||||||
|
standardClass: item.standardClass, // 标准类别
|
||||||
|
standardCode: item.standardCode, // 企业标准代号
|
||||||
|
standardProperty: item.standardProperty, // 标准类型
|
||||||
|
standardState: item.standardState // 状态
|
||||||
|
}
|
||||||
|
const queryObj = {}
|
||||||
|
// 去掉为空的数据
|
||||||
|
for (const item in query) {
|
||||||
|
if (query[item]) {
|
||||||
|
queryObj[item] = query[item]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$emit('historySearch', queryObj)
|
||||||
|
this.handleCancel()
|
||||||
|
},
|
||||||
// 多选变化
|
// 多选变化
|
||||||
onCheckChange (checkedValue) {
|
onCheckChange (checkedValue) {
|
||||||
console.log(checkedValue)
|
console.log(checkedValue)
|
||||||
@@ -245,4 +270,8 @@ export default {
|
|||||||
color: @primary-color;
|
color: @primary-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-content {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user