调整基础数据模块
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user