Skip to content

Commit

Permalink
feat: 查询部门 tree 支持过滤部门名
Browse files Browse the repository at this point in the history
  • Loading branch information
cadecode committed Nov 26, 2023
1 parent 4164faf commit e0742f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/api/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,11 @@ export function listDictTypeSuggest() {
});
}

export function listDeptTreeVo() {
export function listDeptTreeVo(data) {
return request({
url: '/framework/system/dept/list_tree_vo',
method: 'post'
method: 'post',
data
});
}

Expand Down
15 changes: 9 additions & 6 deletions src/view/System/Dept/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
:model="deptFilterForm.data"
:rules="deptFilterForm.rules"
>
<el-form-item label="部门名" prop="deptName">
<el-input v-model="deptFilterForm.data.deptName" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="listDept()">搜索</el-button>
<!--<el-button @click="() => this.$refs.deptFilterForm.resetFields()">重置</el-button>-->
<el-button @click="() => this.$refs.deptFilterForm.resetFields()">重置</el-button>
<el-button type="info" @click="addDept">添加部门</el-button>
</el-form-item>
</el-form>
Expand Down Expand Up @@ -150,6 +153,7 @@ export default {
return {
deptFilterForm: {
data: {
deptName: null
},
rules: {}
},
Expand Down Expand Up @@ -203,12 +207,11 @@ export default {
},
methods: {
listDept() {
// const data = {
// ...this.deptFilterForm.data
// };
const data = {
...this.deptFilterForm.data
};
// 查询部门列表
listDeptTreeVo().then(res => {
// 侧边栏菜单数据
listDeptTreeVo(data).then(res => {
this.deptListTable.data = res.data;
});
},
Expand Down

0 comments on commit e0742f0

Please sign in to comment.