feat:部门权限
This commit is contained in:
1 parent
26cc0e1231
commit
6dddc12da8
3 files changed
+36
-19
No files matched your search
@@ -6,7 +6,7 @@
|
||||
|
||||
<script setup lang="ts" name="SelectDept">
|
||||
import { ref, onMounted } from "vue"
|
||||
import { deptTree, deptTreeSelect } from "/@/api/admin/dept"
|
||||
import { deptTree } from "/@/api/admin/dept"
|
||||
import { useMessage } from "/@/hooks/message"
|
||||
|
||||
const selectId = defineModel()
|
||||
@@ -15,13 +15,6 @@ const props = defineProps({
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: "请选择部门",
|
||||
},
|
||||
/**
|
||||
* "all" | "scope"
|
||||
*/
|
||||
dataScope: {
|
||||
type: String,
|
||||
default: "scope",
|
||||
}
|
||||
})
|
||||
|
||||
@@ -32,7 +25,7 @@ const deptOptions = ref<any[]>([])
|
||||
// 加载部门树数据
|
||||
const loadDeptTree = async () => {
|
||||
try {
|
||||
const res: any = props.dataScope == "scope" ? await deptTree() : await deptTreeSelect()
|
||||
const res: any = await deptTree()
|
||||
if (res.code == 0) {
|
||||
deptOptions.value = res.data || []
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user