|
@@ -11,17 +11,14 @@
|
|
|
</div>
|
|
|
<div class="form">
|
|
|
<span class="formSpan">申请人:</span>
|
|
|
- <el-tree-select
|
|
|
- v-model="queryParams.userId"
|
|
|
- :data="userList"
|
|
|
- :props="defaultProps"
|
|
|
- check-strictly
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- default-expand-all
|
|
|
- node-key="id"
|
|
|
- placeholder="请选择人员"
|
|
|
- />
|
|
|
+ <el-select v-model="queryParams.userId" filterable clearable placeholder="请选择申请人">
|
|
|
+ <el-option
|
|
|
+ v-for="item in userList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.nickname"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
<div class="form">
|
|
|
<span class="formSpan">核销状态:</span>
|
|
@@ -155,6 +152,7 @@ import { useRouter } from 'vue-router'
|
|
|
import * as DeptApi from '@/api/system/dept'
|
|
|
import { defaultProps, handleTree } from '@/utils/tree'
|
|
|
import { arrFlatten } from '../../attendanceCenter/attendAuth'
|
|
|
+import * as UserApi from '@/api/system/user'
|
|
|
import moment from 'moment'
|
|
|
defineOptions({ name: 'BzjglDeptPage' })
|
|
|
const { wsCache } = useCache()
|
|
@@ -192,7 +190,6 @@ const loading = ref(true) // 列表的加载中
|
|
|
const total = ref(0) // 列表的总页数
|
|
|
const list = ref([]) // 列表的数
|
|
|
const deptList = ref<Tree[]>([]) // 树形结构
|
|
|
-const userList = ref<Tree[]>([]) // 树形结构
|
|
|
const deptSort: any = ref([])
|
|
|
const initTreeDeps = async () => {
|
|
|
DeptApi.getSimpleDeptList().then((res) => {
|
|
@@ -200,11 +197,12 @@ const initTreeDeps = async () => {
|
|
|
deptSort.value = arrFlatten(res, 'children')
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
|
|
/** 用户列表 */
|
|
|
-const initTreeUsers = async () => {
|
|
|
- DeptApi.getSimpleDeptUserAllList().then((res) => {
|
|
|
- userList.value = handleTree(res)
|
|
|
- })
|
|
|
+const initDeptUsers = async () => {
|
|
|
+ // 获得用户列表
|
|
|
+ userList.value = await UserApi.getSimpleDeptUserAllList(userDeptId)
|
|
|
}
|
|
|
const changeApplyDate = (value, data) => {
|
|
|
if (!value) {
|
|
@@ -274,8 +272,8 @@ const handleCurrentChange = (pageNo: number) => {
|
|
|
/** 初始化 */
|
|
|
onMounted(() => {
|
|
|
initTreeDeps()
|
|
|
- initTreeUsers()
|
|
|
getList()
|
|
|
+ initDeptUsers()
|
|
|
getOverview()
|
|
|
})
|
|
|
const router = useRouter()
|