From 19965a0379a845cbb24658a275ef3402e2514579 Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: 星期四, 09 三月 2023 17:44:52 +0800
Subject: [PATCH] lct

---
 src/views/intellectInspect/inspectRecordManage/inspectRecord/index.vue |   30 ++++++++++++++++++------------
 1 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/src/views/intellectInspect/inspectRecordManage/inspectRecord/index.vue b/src/views/intellectInspect/inspectRecordManage/inspectRecord/index.vue
index 7657aad..939361f 100644
--- a/src/views/intellectInspect/inspectRecordManage/inspectRecord/index.vue
+++ b/src/views/intellectInspect/inspectRecordManage/inspectRecord/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>
@@ -278,16 +285,16 @@
             }
         };
 
-        //获取班组
-        const getClassGroupData = async () => {
-            let res = await teamManageApi().getRecord({ depIp: null, groupName: null, containGroupMemberEnable: null });
-            if (res.data.code === '200') {
-                state.classGroupList = res.data.data;
-            } else {
-                ElMessage({
-                    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{
+
+                }
             }
         };
 
@@ -366,13 +373,11 @@
                 getInspectRecord();
                 getQuotaList();
                 getDepartmentData();
-                getClassGroupData();
                 getInspectTaskPoint();
             } else {
                 getInspectRecord();
                 getQuotaList();
                 getDepartmentData();
-                getClassGroupData();
                 getInspectTaskPoint();
             }
         });
@@ -385,6 +390,7 @@
             Plus,
             reset,
             parseNumber,
+            changeGroup,
             getInspectRecord,
             onHandleSizeChange,
             onHandleCurrentChange,

--
Gitblit v1.9.2