调整基础数据模块

This commit is contained in:
2026-08-07 13:36:51 +08:00
parent 04ab648f5b
commit 56729c8cc9
6 changed files with 194 additions and 50 deletions
+15 -1
View File
@@ -394,6 +394,7 @@ export default {
},
},
created() {
this.applyDefaultDeptSearch();
this.initDeptTree();
},
methods: {
@@ -434,6 +435,18 @@ export default {
defaultDeptId() {
return (this.userInfo && (this.userInfo.deptId || this.userInfo.dept_id)) || '';
},
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;
}
});
},
resetAddressQuery() {
this.addressQuery = {
addressName: '',
@@ -883,8 +896,9 @@ export default {
},
searchReset() {
this.query = {};
this.applyDefaultDeptSearch();
this.page.currentPage = 1;
this.onLoad(this.page);
this.onLoad(this.page, this.query);
},
searchChange(params, done) {
this.query = params;