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