|
@@ -162,13 +162,12 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
- // 从通知链接跳转时(带no参数)或「我的工单」页面,不默认按本部门筛选,显示全部工单
|
|
|
|
|
|
|
+ // 从通知链接跳转时(带no参数)不默认按本部门筛选,其他情况默认显示本部门工单
|
|
|
const hasNoParam = this.$route.query.no != null
|
|
const hasNoParam = this.$route.query.no != null
|
|
|
- const skipDeptDefault = hasNoParam || this.searchType === 2
|
|
|
|
|
return {
|
|
return {
|
|
|
// 查询参数
|
|
// 查询参数
|
|
|
queryParam: {
|
|
queryParam: {
|
|
|
- deptIdList: skipDeptDefault ? [] : [this.$store.getters.userInfo.deptId],
|
|
|
|
|
|
|
+ deptIdList: hasNoParam ? [] : [this.$store.getters.userInfo.deptId],
|
|
|
searchStartTime: null,
|
|
searchStartTime: null,
|
|
|
searchEndTime: null
|
|
searchEndTime: null
|
|
|
},
|
|
},
|
|
@@ -443,16 +442,19 @@ export default {
|
|
|
this.selectedRows = selectedRows
|
|
this.selectedRows = selectedRows
|
|
|
},
|
|
},
|
|
|
resetSearchForm() {
|
|
resetSearchForm() {
|
|
|
- // 重置时:通知跳转(带no参数)或「我的工单」页面不恢复部门筛选
|
|
|
|
|
|
|
+ // 重置时:仅通知跳转(带no参数)不恢复部门筛选,其他情况恢复默认部门
|
|
|
const no = this.$route.query.no
|
|
const no = this.$route.query.no
|
|
|
- const skipDeptDefault = no != null || this.searchType === 2
|
|
|
|
|
- this.queryParam = {
|
|
|
|
|
- deptIdList: skipDeptDefault ? [] : [this.$store.getters.userInfo.deptId],
|
|
|
|
|
- searchStartTime: null,
|
|
|
|
|
- searchEndTime: null
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 先清空所有查询条件,让 a-select 组件先响应清空状态
|
|
|
|
|
+ this.queryParam.deptIdList = []
|
|
|
|
|
+ this.queryParam.searchStartTime = null
|
|
|
|
|
+ this.queryParam.searchEndTime = null
|
|
|
if (no != null) {
|
|
if (no != null) {
|
|
|
this.queryParam.no = no
|
|
this.queryParam.no = no
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 等 a-select 同步清空后,再恢复默认部门,避免标签删不掉
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.queryParam.deptIdList = [this.$store.getters.userInfo.deptId]
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
},
|