From f7bd94cf4a3d6ce6b06c2f90413f6798c488481d Mon Sep 17 00:00:00 2001 From: batman <978517621@qq.com> Date: 星期三, 15 三月 2023 10:21:22 +0800 Subject: [PATCH] 修改特殊作业首页 --- src/views/intellectInspect/inspectTaskManage/inspectTask/index.vue | 60 ++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 48 insertions(+), 12 deletions(-) diff --git a/src/views/intellectInspect/inspectTaskManage/inspectTask/index.vue b/src/views/intellectInspect/inspectTaskManage/inspectTask/index.vue index d897b89..fc307b4 100644 --- a/src/views/intellectInspect/inspectTaskManage/inspectTask/index.vue +++ b/src/views/intellectInspect/inspectTaskManage/inspectTask/index.vue @@ -9,6 +9,13 @@ </el-select> </div> <div class="basic-line"> + <span>部门:</span> + <el-cascader class="input-box" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" + placeholder="请选择部门" clearable v-model="tableData.params.execDepId" + @change="changeGroup" + > </el-cascader> + </div> + <div class="basic-line"> <span>执行班组:</span> <el-select v-model="tableData.params.execClassgroupId" clearable filterable class="input-box" placeholder="执行班组"> <el-option v-for="item in classGroupList" :key="item.id" :label="item.groupName" :value="item.id"></el-option> @@ -143,6 +150,7 @@ params: { pageIndex: number | null; pageSize: number | null; + execDepId: number | null; unitName: string | null; workType: number | null; createUserId: number | null; @@ -182,6 +190,7 @@ pageIndex: 1, pageSize: 10, unitName: null, + execDepId: null, workType: null, createUserId: null, execClassgroupId: null, @@ -205,7 +214,7 @@ { id: 3, name: '日' }, { id: 4, name: '月' }, { id: 5, name: '年' } - ] + ], }); //获取巡检任务数据 @@ -236,17 +245,29 @@ }; //获取部门 - const getQuotaList = async () => { - let res = await inspectTaskApi().getQuotaList(); - if (res.data.code === '200') { - state.quotaList = res.data.data; - } else { - ElMessage({ - type: 'warning', - message: res.data.msg - }); - } - }; + // const getQuotaList = async () => { + // let res = await inspectTaskApi().getQuotaList(); + // if (res.data.code === '200') { + // state.quotaList = res.data.data; + // } else { + // ElMessage({ + // type: 'warning', + // message: res.data.msg + // }); + // } + // }; + //获取部门 + const getQuotaList = async () => { + let res = await inspectTaskApi().getAllQuotaList(); + if (res.data.code === '200') { + state.quotaList = res.data.data; + } else { + ElMessage({ + type: 'warning', + message: res.data.msg + }); + } + }; //获取巡检点 const getInspectTaskPoint = async () => { @@ -297,6 +318,19 @@ type: 'warning', message: res.data.msg }); + } + }; + + const changeGroup = async () => { + if(state.tableData.params.execDepId === null) { + state.classGroupList = [] + }else{ + let res = await departmentApi().getByDepId({depId:state.tableData.params.execDepId}) + if(res.data.code === '200'){ + state.classGroupList = res.data.data + }else{ + + } } }; @@ -407,6 +441,7 @@ pageIndex: 1, pageSize: 10, unitName: null, + execDepId: null, workType: null, createUserId: null, execClassgroupId: null, @@ -434,6 +469,7 @@ Plus, reset, changeStatus, + changeGroup, parseNumber, deleteInspectTask, getInspectionTask, -- Gitblit v1.9.2