fix 用户列表部门权限

This commit is contained in:
yxh 2024-09-14 10:45:06 +08:00
parent c905456c10
commit 25b352d3c3
2 changed files with 6 additions and 5 deletions

View File

@ -36,10 +36,11 @@ export function getUserSelector(query:Object) {
})
}
export function getDeptTree() {
export function getDeptTree(showOwner?:boolean) {
return request({
url: '/api/v1/system/dept/treeSelect',
method: 'get'
method: 'get',
params:{showOwner}
})
}

View File

@ -100,11 +100,11 @@
</template>
<script setup lang="ts">
import {toRefs, reactive, onMounted, ref, defineComponent, watch, getCurrentInstance} from 'vue';
import {toRefs, reactive, onMounted, ref, watch, getCurrentInstance} from 'vue';
import {ElTree,FormInstance} from 'element-plus';
import { Search } from '@element-plus/icons-vue'
import UserList from '/@/views/system/user/component/userList.vue';
import {getDeptTree} from '/@/api/system/user/index';
import {getDeptTree} from '/@/api/system/user';
interface QueryParam {
ids:number[];
@ -165,7 +165,7 @@ const state = reactive<QueryParam>({
const { deptData,deptProps,param}=toRefs(state)
//
const initTableData = () => {
getDeptTree().then((res:any)=>{
getDeptTree(true).then((res:any)=>{
state.deptData = res.data.deps
})
};