From 006cedaa4188d5bd5f99ef0721572a24c89d7ce4 Mon Sep 17 00:00:00 2001 From: Admin <978517621@qq.com> Date: 星期六, 20 八月 2022 17:19:08 +0800 Subject: [PATCH] Default Changelist --- src/views/specialWorkSystem/workTicket/workApply/index.vue | 24 +++++++++++++++++++++--- 1 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/views/specialWorkSystem/workTicket/workApply/index.vue b/src/views/specialWorkSystem/workTicket/workApply/index.vue index 181b250..ea33534 100644 --- a/src/views/specialWorkSystem/workTicket/workApply/index.vue +++ b/src/views/specialWorkSystem/workTicket/workApply/index.vue @@ -14,7 +14,7 @@ <ground-form :workerList = allWorkers></ground-form> </el-tab-pane> <el-tab-pane label="断路作业"> - <broken-form :workerList = allWorkers></broken-form> + <broken-form :workerList = allWorkers :departList = departmentList></broken-form> </el-tab-pane> <el-tab-pane label="高处作业"> <height-form :workerList = allWorkers></height-form> @@ -39,10 +39,11 @@ import { ElMessage } from 'element-plus' import type { FormInstance, FormRules } from 'element-plus' import { workApplyApi } from '/@/api/specialWorkSystem/workApply'; - + import {teamManageApi} from "/@/api/systemManage/basicDateManage/personShiftManage/teamManage"; interface stateType { allWorkers: Array<any> + departmentList: Array<any> } export default defineComponent({ name: 'workTicket', @@ -60,8 +61,11 @@ const userInfo = useUserInfo() const { userInfos } = storeToRefs(userInfo); const state = reactive<stateType>({ - allWorkers: [] + allWorkers: [], + departmentList: [] }); + + // 获取用户列表 const getAll = async ()=>{ const res = await workApplyApi().getAllUsers() if (res.data.code === '200') { @@ -74,9 +78,23 @@ } }; + // 获取部门列表 + const getAllDepartment = async () => { + let res = await teamManageApi().getAllDepartment(); + if (res.data.code === '200') { + state.departmentList = JSON.parse(JSON.stringify(res.data.data)) + } else { + ElMessage({ + type: 'warning', + message: res.data.msg + }); + } + }; + // 页面载入时执行方法 onMounted(() => { getAll(); + getAllDepartment(); }); return { -- Gitblit v1.9.2