|
@@ -1,18 +1,19 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="head-container">
|
|
<div class="head-container">
|
|
|
- <el-input v-model="deptName" class="mb-20px" clearable placeholder="请输入部门名称">
|
|
|
|
|
|
|
+ <el-input v-model="deptName" class="mb-20px" clearable placeholder="请输入岗位名称">
|
|
|
<template #prefix>
|
|
<template #prefix>
|
|
|
<Icon icon="ep:search" />
|
|
<Icon icon="ep:search" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="head-container">
|
|
<div class="head-container">
|
|
|
|
|
+<!-- :props="defaultProps"-->
|
|
|
<el-tree
|
|
<el-tree
|
|
|
ref="treeRef"
|
|
ref="treeRef"
|
|
|
:data="deptList"
|
|
:data="deptList"
|
|
|
:expand-on-click-node="false"
|
|
:expand-on-click-node="false"
|
|
|
:filter-node-method="filterNode"
|
|
:filter-node-method="filterNode"
|
|
|
- :props="defaultProps"
|
|
|
|
|
|
|
+ :props="{ label: 'workstationName', value: 'id', children: 'children' }"
|
|
|
default-expand-all
|
|
default-expand-all
|
|
|
highlight-current
|
|
highlight-current
|
|
|
node-key="id"
|
|
node-key="id"
|
|
@@ -23,9 +24,11 @@
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { ElTree } from 'element-plus'
|
|
import { ElTree } from 'element-plus'
|
|
|
-import * as DeptApi from '@/api/system/dept'
|
|
|
|
|
|
|
+// import * as DeptApi from '@/api/system/dept'
|
|
|
|
|
+import * as MarsDeptApi from '@/api/system/marsdept'
|
|
|
import { defaultProps, handleTree } from '@/utils/tree'
|
|
import { defaultProps, handleTree } from '@/utils/tree'
|
|
|
|
|
|
|
|
|
|
+
|
|
|
defineOptions({ name: 'SystemUserDeptTree' })
|
|
defineOptions({ name: 'SystemUserDeptTree' })
|
|
|
|
|
|
|
|
const deptName = ref('')
|
|
const deptName = ref('')
|
|
@@ -34,9 +37,13 @@ const treeRef = ref<InstanceType<typeof ElTree>>()
|
|
|
|
|
|
|
|
/** 获得部门树 */
|
|
/** 获得部门树 */
|
|
|
const getTree = async () => {
|
|
const getTree = async () => {
|
|
|
- const res = await DeptApi.getSimpleDeptList()
|
|
|
|
|
|
|
+ // const res = await DeptApi.getSimpleDeptList()
|
|
|
|
|
+ const res=await MarsDeptApi.listMarsDept({pageNo: 1, pageSize: -1})
|
|
|
|
|
+ console.log(res,'mars岗位')
|
|
|
deptList.value = []
|
|
deptList.value = []
|
|
|
- deptList.value.push(...handleTree(res))
|
|
|
|
|
|
|
+ // deptList.value.push(...handleTree(res.list))
|
|
|
|
|
+ deptList.value = handleTree(res.list, 'id', 'parentId', 'children')
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/** 基于名字过滤 */
|
|
/** 基于名字过滤 */
|