⚡ 流程配置取消默认按当前用户部门筛选

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-02 13:32:06 +08:00
parent eaf431819e
commit 9fed3785d9
-23
View File
@@ -535,7 +535,6 @@ export default {
created() {
this.resetNodeRows();
this.loadProjectOptions('');
this.applyDefaultDeptSearch();
this.initDeptOptions();
},
methods: {
@@ -566,27 +565,6 @@ export default {
}
});
},
defaultDeptId() {
const raw = (this.userInfo && (this.userInfo.deptId || this.userInfo.dept_id)) || '';
return (
String(raw)
.split(',')
.map(item => item.trim())
.filter(Boolean)[0] || ''
);
},
applyDefaultDeptSearch() {
const deptId = this.defaultDeptId();
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
if (!deptId || !deptColumn) return;
deptColumn.searchValue = deptId;
this.query = { ...this.query, deptId };
this.$nextTick(() => {
if (this.$refs.crud?.searchForm) {
this.$refs.crud.searchForm.searchDeptId = deptId;
}
});
},
flattenDept(tree, level = 0) {
return tree.flatMap(item => {
const id =
@@ -1113,7 +1091,6 @@ export default {
},
searchReset() {
this.query = {};
this.applyDefaultDeptSearch();
this.page.currentPage = 1;
this.onLoad(this.page, this.query);
},