|
|
@@ -443,17 +443,26 @@ export default {
|
|
|
this.selectedRows = selectedRows
|
|
|
},
|
|
|
resetSearchForm() {
|
|
|
- // 「所有工单」重置后恢复本部门;「我的工单」和通知跳转不限制部门
|
|
|
+ // 重置为刚进界面时的查询状态
|
|
|
const no = this.$route.query.no
|
|
|
const skipDeptDefault = no != null || this.searchType === 2
|
|
|
- // 先清空所有查询条件,让 a-select 组件先响应清空状态
|
|
|
- this.queryParam.deptIdList = []
|
|
|
+ // 清空所有查询条件,与初始化时保持一致
|
|
|
+ this.queryParam.keyword = null
|
|
|
+ this.queryParam.zbh = null
|
|
|
+ this.queryParam.actualUser = null
|
|
|
+ this.queryParam.repairUserName = null
|
|
|
+ this.queryParam.content = null
|
|
|
+ this.queryParam.statusList = null
|
|
|
this.queryParam.searchStartTime = null
|
|
|
this.queryParam.searchEndTime = null
|
|
|
+ // 部门:先清空让 a-select 同步状态
|
|
|
+ this.queryParam.deptIdList = []
|
|
|
+ // 保留 no 参数(通知跳转场景)
|
|
|
if (no != null) {
|
|
|
this.queryParam.no = no
|
|
|
- } else if (!skipDeptDefault) {
|
|
|
- // 等 a-select 同步清空后,再恢复默认部门,避免标签删不掉
|
|
|
+ }
|
|
|
+ // 「所有工单」恢复默认部门,等 a-select 同步清空后再设值,避免标签删不掉
|
|
|
+ if (!skipDeptDefault) {
|
|
|
this.$nextTick(() => {
|
|
|
this.queryParam.deptIdList = [this.$store.getters.userInfo.deptId]
|
|
|
})
|