Explorar o código

fix: 修改剩余问题

username hai 1 semana
pai
achega
b5853660a7

+ 51 - 12
src/components/import/index.vue

@@ -36,14 +36,18 @@ const handleUploadChange = (file: File) => {
   const reader = new FileReader();
   let fileType = file.name.slice(-4);
   if (fileType == "xlsx") {
+    console.log(query.value.assessmentType, "打印type值");
     reader.onload = e => {
       const data = new Uint8Array(e.target?.result as ArrayBuffer);
       const workbook = XLSX.read(data, { type: "array" }); // 读取 Excel 文件
       const firstSheetName = workbook.SheetNames[0]; // 获取第一个工作表名
       const worksheet = workbook.Sheets[firstSheetName]; // 获取第一个工作表
       const jsonData = XLSX.utils.sheet_to_json(worksheet, { header: 1 }); // 将工作表转为 JSON
-      console.log(jsonData, "获取的数据");
-      if (jsonData[1].length == 6) {
+      console.log("获取的数据", jsonData[1]);
+      if (
+        jsonData[1].length == 6 &&
+        (query.value.assessmentType == 0 || query.value.assessmentType == 1)
+      ) {
         tableHeaders.value = [
           "工号",
           "人员",
@@ -65,14 +69,29 @@ const handleUploadChange = (file: File) => {
           }
         });
         tableData.value = arr.filter(item => item);
-        // tableData.value = jsonData.slice(1).map(row => {
-        //   const rowData = {};
-        //   tableHeaders.value.forEach((header, index) => {
-        //     rowData[header] = row[index] !== undefined ? row[index] : null; // 填充缺失值
-        //   });
-        //   return rowData;
-        // });
-        console.log("表头", tableHeaders.value);
+        ElMessage.success("文件上传成功");
+        uploadShow.value = false; // 隐藏上传区域,显示数据表
+      } else if (query.value.assessmentType == 2) {
+        tableHeaders.value = [
+          "用户组",
+          "用户组编号",
+          "考核模板",
+          "指标名称",
+          "完成值",
+          "得分"
+        ]; // 表头
+        const arr = jsonData.slice(2).map(row => {
+          if (row[0] && row[1] && row[2] && row[3]) {
+            const rowData = {};
+            tableHeaders.value.forEach((header, index) => {
+              if (row[index]) {
+                rowData[header] = row[index];
+              }
+            });
+            return rowData;
+          }
+        });
+        tableData.value = arr.filter(item => item);
         ElMessage.success("文件上传成功");
         uploadShow.value = false; // 隐藏上传区域,显示数据表
       } else {
@@ -95,14 +114,21 @@ const postImportAssessmentTemplateApi = async data => {
     const formData = new FormData();
     console.log(fileDocument.value, "获取的数据");
     formData.append("file", fileDocument.value); // 将文件添加到表单数据
+    const reader = new FileReader();
+    reader.onload = function (event) {
+      const arrayBuffer = event.target.result;
+      // arrayBuffer就是文件的二进制数据表示形式
+      console.log(arrayBuffer, "转换后的二进制数据");
 
+      // 这里可以根据需要进一步处理二进制数据,比如发送给服务器等操作
+    };
+    const file = formData.get("file");
     // 调用 API 上传文件
     const { data } = await postImportAssessmentTemplate({
-      formData,
+      formData: file,
       type: route.query.assessmentType,
       assessmentId: route.query.id
     });
-    console.log("dsada", data);
     if (data.code === 200) {
       // 根据后端返回的 code 判断是否成功
       ElMessage.success("文件上传并导入成功");
@@ -141,9 +167,22 @@ const backDefine = () => {
         <el-button class="mt-2"
           ><el-icon> <Download /> </el-icon
           ><a
+            v-if="query.assessmentType == 0"
             href="http://116.148.231.9:9999/download/考核数据导入模板-人员.xlsx"
             download="考核数据导入模板-人员.xlsx"
             >下载空的模板表格</a
+          >
+          <a
+            v-if="query.assessmentType == 1"
+            href="http://116.148.231.9:9999/download/考核数据导入模板-部门.xlsx"
+            download="考核数据导入模板-部门.xlsx"
+            >下载空的模板表格</a
+          >
+          <a
+            v-if="query.assessmentType == 2"
+            href="http://116.148.231.9:9999/download/考核数据导入模板-用户组.xlsx"
+            download="考核数据导入模板-用户组.xlsx"
+            >下载空的模板表格</a
           ></el-button
         >
       </div>

+ 4 - 1
src/views/evaluate/children/change/components/editMould.vue

@@ -58,9 +58,11 @@ function confirmClick() {
     }
   });
 }
+const titleName = ref("");
 const open = (row: any, title: string, order: number) => {
   dalongTitle.value = title;
   if (title == "新建") {
+    titleName.value = "新建考核维度";
     Object.assign(formLabelAlign, {
       tpId: row.id ? row.id : $route.query.id,
       list: [],
@@ -79,6 +81,7 @@ const open = (row: any, title: string, order: number) => {
     });
   }
   if (title == "编辑") {
+    titleName.value = "编辑考核维度";
     Object.assign(formLabelAlign, {
       ...row,
       order
@@ -183,7 +186,7 @@ defineExpose({
       :before-close="handleClose"
     >
       <template #header>
-        <h4>编辑考核维度</h4>
+        <h4>{{ titleName }}</h4>
       </template>
       <template #default>
         <div>

+ 1 - 0
src/views/evaluate/children/change/components/newAdd.vue

@@ -424,6 +424,7 @@ const editClosedEvent = ({ row, column }) => {
     <settingIndexDrawer
       ref="settingIndexDrawerRef"
       v-model:drawerValue="settingIndexDrawerShow"
+      @refresh="getListByApi"
     />
     <!-- 新增、编辑模块 -->
     <editMould

+ 71 - 6
src/views/evaluate/children/change/components/settingIndexDrawer.vue

@@ -9,6 +9,12 @@ import {
 } from "@/api/templateInfo";
 import { conditionVerify } from "@/api/formula";
 import jishuanqi from "./jishuanqi.vue";
+import {
+  postListTreeWithUser,
+  postListTree,
+  postListTreeWithUserApi,
+  treeDept
+} from "@/api/department";
 import type { DrawerProps, FormItemProps, FormProps } from "element-plus";
 // const itemLabelPosition = ref<FormItemProps["labelPosition"]>("");
 const drawer = ref(false);
@@ -28,6 +34,7 @@ const params = reactive({
   indId: "",
   valueInput: "",
   scoreStandard: 0,
+  designatedPersonnel: "",
   remark: "",
   scoreRule: "",
   targetValue: "",
@@ -48,6 +55,7 @@ const getIndexInfoApi = async id => {
   // console.log("1111", data);
   if (code === 200) {
     Object.assign(params, data);
+    params.personList = data.designatedPersonnel.split(",");
     if (isValidJSON(data.formula)) {
       if (params.formulaType == 0) {
         params.formula = JSON.parse(data.formula);
@@ -70,6 +78,7 @@ const getIndexInfoApi = async id => {
     ElMessage.error(msg);
   }
 };
+const $emit = defineEmits(["refresh"]);
 // 更新指标
 const postUpdateApi = async () => {
   if (params.formulaType == 0) {
@@ -87,6 +96,7 @@ const postUpdateApi = async () => {
       message: "编辑成功",
       type: "success"
     });
+    $emit("refresh");
     disabledValue.value = true;
     editShow.value = true;
     drawer.value = !drawer.value;
@@ -175,7 +185,6 @@ const countComputed = async () => {
       let aa = JSON.parse(JSON.stringify(addmanyChange));
       aa.outerConditionValue = formulaForm.value[0].value;
       formulaForm.value.map((item, index) => {
-        console.log("item", aa);
         if (index > 0) {
           delete aa.innerConditionExpression[index - 1].select;
           aa.innerConditionExpression[
@@ -185,7 +194,6 @@ const countComputed = async () => {
       });
       const { code, msg, data } =
         await calculateScoreByConditionMoCondition(aa);
-      console.log("aaa", aa);
       if (code == 200) {
         grade.value = data;
       } else {
@@ -225,6 +233,27 @@ const handleClose = (done: () => void) => {
 };
 function cancelClick() {
   drawer.value = false;
+  params = {
+    id: "",
+    tpId: "",
+    dimId: "",
+    indId: "",
+    valueInput: "",
+    scoreStandard: 0,
+    remark: "",
+    scoreRule: "",
+    targetValue: "",
+    finalValue: "",
+    formulaType: 0,
+    challengeValue: "",
+    startValue: "",
+    datasoure: "",
+    weight: "",
+    scoreValue: "",
+    formula: {
+      noConditionFormula: ""
+    }
+  };
   disabledValue.value = true;
   editShow.value = true;
 }
@@ -233,12 +262,14 @@ function confirmClick() {
 }
 const open = row => {
   drawer.value = true;
+  params.designatedPersonnel = "";
   Object.assign(params, {
     id: "",
     tpId: "",
     dimId: "",
     indId: "",
     valueInput: "",
+    designatedPersonnel: "",
     scoreStandard: 0,
     remark: "",
     scoreRule: "",
@@ -250,6 +281,7 @@ const open = row => {
     datasoure: "",
     weight: "",
     scoreValue: "",
+    personList: "",
     formula: {
       noConditionFormula: ""
     }
@@ -310,8 +342,6 @@ const watchFormulaType = value => {
   }
 };
 const lookRoles = item => {
-  console.log("item", item);
-  console.log("params", params);
   if (isValidJSON(params.formula)) {
     params.formula = JSON.parse(params.formula);
   }
@@ -454,7 +484,6 @@ const addItemDataList = (
 };
 // 多条件公式验证
 const manyConditions = () => {
-  // outerConditionValue
   dialogFormVisibleFormula.value = true;
   formulaForm.value = [];
   console.log("1addmanyChange", addmanyChange);
@@ -496,6 +525,31 @@ const countNoConditionFormula4 = (item, index, indexList) => {
     index
   ].scoreRuleMoreInnerVO[0].scoreRules[indexList].score = item;
 };
+
+// 转换函数 --- 人员
+const convertDepartmentDataRecursive_Person = data => {
+  return data.map(department => {
+    const { userNameNew, userCodeNew, children } = department;
+    return {
+      value: userCodeNew,
+      label: userNameNew,
+      children:
+        children.length > 0
+          ? children.map(
+              child => convertDepartmentDataRecursive_Person([child])[0]
+            )
+          : []
+    };
+  });
+};
+postListTreeWithUserApi();
+const assessmentTypeRef = ref();
+const handleRreeSelect = () => {
+  const arr = assessmentTypeRef.value.getCheckedNodes().filter(item => {
+    return item.children.length == 0;
+  });
+  params.designatedPersonnel = arr.map(item => item.value).join(",");
+};
 </script>
 
 <template>
@@ -515,11 +569,22 @@ const countNoConditionFormula4 = (item, index, indexList) => {
             <el-form-item label="完成值录入人" label-position="top">
               <el-select v-model="params.valueInput" placeholder="请选择">
                 <el-option label="被考核人" :value="0" />
-                <el-option label="上级" :value="1" />
+                <!-- <el-option label="上级" :value="1" /> -->
                 <el-option label="指定人员" :value="2" />
                 <el-option label="考核管理员" :value="3" />
                 <el-option label="指标自动采集" :value="4" />
               </el-select>
+              <el-tree-select
+                v-if="params.valueInput == 2"
+                ref="assessmentTypeRef"
+                v-model="params.personList"
+                multiple
+                :data="convertDepartmentDataRecursive_Person(treeDept)"
+                :render-after-expand="false"
+                show-checkbox
+                style="margin-top: 10px"
+                @check-change="handleRreeSelect()"
+              />
             </el-form-item>
             <el-form-item label="评分方式" label-position="top">
               <el-select v-model="params.scoreStandard" placeholder="请选择">

+ 1 - 1
src/views/evaluate/children/change/manage.vue

@@ -82,10 +82,10 @@ const dialogVisibleCopy = ref(false);
 const copyTitle = ref("");
 const copyForm = reactive({ name: "" });
 const copyManage = (row: any) => {
-  console.log(row);
   Object.assign(copyForm, row);
   copyTitle.value = row.name;
   dialogVisibleCopy.value = true;
+  copyForm.name = row.name + "_副本";
 };
 const handleClose = () => {
   dialogVisibleCopy.value = false;

+ 8 - 8
src/views/evaluate/children/change/manage/addExam.vue

@@ -19,6 +19,8 @@ import {
 } from "@/api/userSetting";
 // 医疗组
 import { getTemplateInfoList } from "@/api/templateInfo";
+// 获取医疗组的数据
+import { postPageGroup } from "@/api/userGroup";
 import ElPicker from "@/components/ELPicker/index.vue";
 const $emit = defineEmits(["addHandClick"]);
 const dialogVisibleAdd = ref(false);
@@ -208,7 +210,6 @@ const monthOne = item => {
       break;
   }
   form.cycleValue = `${yearTime.value}年${item}`;
-  console.log(start, end);
   // return `从 ${start} 到 ${end}`; // 设置时间区间
 };
 // 部门人员与考核模板数据
@@ -223,10 +224,10 @@ const resTmp = ref([]);
 const selectRefs = ref();
 const handChange = index => {
   const arr = treeDeptList.value.filter(item => {
-    return form.listArr[index].idList.includes(item.userCode);
+    return form.listArr[index].idList.includes(item.groupCode);
   });
-  form.listArr[index].assessmentObjectId = arr.map(item => item.userCode);
-  form.listArr[index].assessmentObjectName = arr.map(item => item.realName);
+  form.listArr[index].assessmentObjectId = arr.map(item => item.groupCode);
+  form.listArr[index].assessmentObjectName = arr.map(item => item.groupName);
 };
 
 const assessmentTypeRef = ref();
@@ -290,8 +291,7 @@ const assessmentTypeApi = async value => {
       dpetTree.value = convertDepartmentDataRecursive(data);
       break;
     case 2:
-      const yiliao = await postOrganizationUserPage({
-        organizationType: "group",
+      const yiliao = await postPageGroup({
         pageNumber: 1,
         pageSize: 1000
       });
@@ -468,8 +468,8 @@ const idList = ref([]);
                       <el-option
                         v-for="(it, id) in treeDeptList"
                         :key="id"
-                        :label="it.realName"
-                        :value="it.userCode"
+                        :label="it.groupName"
+                        :value="it.groupCode"
                       />
                     </el-select>
                   </div>

+ 173 - 27
src/views/evaluate/children/change/mould/manageObject.vue

@@ -14,10 +14,22 @@ import {
 import { getTemplateInfoList } from "@/api/templateInfo";
 import { useRouter } from "vue-router";
 import { ElMessage, ElMessageBox } from "element-plus";
-import { treeDept, postListTreeWithUserApi } from "@/api/department";
+import {
+  treeDept,
+  postListTreeWithUserApi,
+  postListTree
+} from "@/api/department";
 import { Search } from "@element-plus/icons-vue";
 import messagePerson from "./message.vue";
 import dayjs from "dayjs";
+// 人员,医疗组,负责人
+import {
+  postUserList,
+  postOrganizationUserPage,
+  getLeaderList
+} from "@/api/userSetting";
+// 获取医疗组的数据
+import { postPageGroup } from "@/api/userGroup";
 const $props = defineProps({
   message: {
     type: Object
@@ -70,9 +82,38 @@ const state = reactive({
   tableType: 0
 });
 
+// 转换函数 --- 人员
+const convertDepartmentDataRecursive_Person = data => {
+  return data.map(department => {
+    const { userNameNew, userCodeNew, children } = department;
+    return {
+      value: userCodeNew,
+      label: userNameNew,
+      children:
+        children.length > 0
+          ? children.map(
+              child => convertDepartmentDataRecursive_Person([child])[0]
+            )
+          : []
+    };
+  });
+};
+// 转换函数 --- 部门
+const convertDepartmentDataRecursive = data => {
+  return data.map(department => {
+    const { deptCode, deptName, childrenRes } = department;
+    return {
+      value: deptCode,
+      label: deptName,
+      children:
+        childrenRes.length > 0
+          ? childrenRes.map(child => convertDepartmentDataRecursive([child])[0])
+          : []
+    };
+  });
+};
+const dpetTree = ref([]);
 onMounted(() => {
-  // messageData.value.assessmentType
-  console.log("dsafa", messageData.value);
   Object.assign(messageData.value, $props.message);
   switch (messageData.value.assessmentType) {
     case 0:
@@ -87,16 +128,38 @@ onMounted(() => {
     case 3:
       initParams.assessmentType = "员工";
   }
+  assessmentTypeApi(messageData.value.assessmentType);
   initParams.params.assessmentId = $props.message.id;
   initParams.objParams.assessmentId = $props.message.id;
   initParams.indexParams.assessmentId = $props.message.id;
   state.tableType = $props.message.assessmentType;
   getAssessmentQuotaDetailsApi();
   getTemplateInfoListApi();
-  postListTreeWithUserApi();
   getAssessmentObjectDetailsApi();
-  console.log("onMounted", $props.message);
 });
+const treeDeptList = ref([]);
+const assessmentTypeApi = async value => {
+  switch (value) {
+    case 0:
+      postListTreeWithUserApi();
+      break;
+    case 1:
+      const { data, code } = await postListTree();
+      dpetTree.value = convertDepartmentDataRecursive(data);
+      break;
+    case 2:
+      const yiliao = await postPageGroup({
+        pageNumber: 1,
+        pageSize: 1000
+      });
+      treeDeptList.value = yiliao.data.records;
+      break;
+    case 3:
+      const fuzhere = await getLeaderList();
+      console.log(fuzhere);
+      treeDeptList.value = fuzhere.data;
+  }
+};
 // 指标分页查询
 const getAssessmentQuotaDetailsApi = async () => {
   const res = await getAssessmentQuotaDetails(initParams.indexParams);
@@ -153,13 +216,11 @@ const changeSelection = val => {
   if (val) {
     valSelection.value = true;
     delParams.objectAddVoList = [];
-    console.log(val, "获取的批量选中的数据");
     delParams.assessmentId = messageData.value.id;
     addPersonParams.assessmentId = messageData.value.id;
     let assessmentObjectId;
     let assessmentObjectName;
     val.forEach((item, index) => {
-      console.log(item, "循环过滤的数据");
       const obj = {
         assessmentObjectId: item.assessmentObjectId,
         assessmentObjectName: item.assessmentObjectName
@@ -191,22 +252,62 @@ const publish = () => {
 };
 // 添加被考核人
 const dialogVisibleAdd = ref(false);
+const assessmentTypeRef = ref();
+const transformArrayFormat = data => {
+  return data.assessmentObjectId
+    .map((item, index) => {
+      return {
+        assessmentObjectId: item,
+        assessmentObjectName: data.assessmentObjectName[index]
+      };
+    })
+    .flat();
+};
+// 人员 ---- 部门
 const handleRreeSelect = data => {
-  addPersonParams.objectAddVoList.push({
-    assessmentObjectId: data.userCode,
-    assessmentObjectName: data.userName
+  const list = ref({});
+  const arr = assessmentTypeRef.value.getCheckedNodes().filter(item => {
+    return item.children.length == 0;
   });
-  console.log("1111111", data);
+  list.value.assessmentObjectId = arr.map(item => item.value);
+  list.value.assessmentObjectName = arr.map(item => item.label);
+  addPersonParams.objectAddVoList = transformArrayFormat(list);
 };
+// 医疗 --- 医疗主任
+const handChange = () => {
+  const list = ref({});
+  const arr = treeDeptList.value.filter(item => {
+    return value1.value.includes(item.groupCode);
+  });
+  list.value.assessmentObjectId = arr.map(item => item.groupCode);
+  list.value.assessmentObjectName = arr.map(item => item.groupName);
+  addPersonParams.objectAddVoList = transformArrayFormat(list);
+};
+
 const dialogVisibleAddShow = () => {
   dialogVisibleAdd.value = true;
 };
 // 跳转对应科室
 const GoView = row => {
-  router.push({
-    name: "departmentDrank",
-    query: { ...messageData.value, deptId: row.deptId }
-  });
+  const arr = {
+    "0": "/draw/children/worker/workerDrak",
+    "1": "/draw/children/department/departmentDrank",
+    "2": "/draw/children/health/healthDrank",
+    "3": "/draw/children/head/headDrank"
+  };
+  for (let key in arr) {
+    if ($props.message.assessmentType == key) {
+      router.push({
+        path: arr[key],
+        query: { ...messageData.value, deptId: row.deptId }
+      });
+      return;
+    }
+  }
+  // router.push({
+  //   name: "departmentDrank",
+  //   query: { ...messageData.value,  },
+  // });
 };
 // 考核对象
 const objList = ref([]);
@@ -245,7 +346,8 @@ const updateAssessmentQuotaDetailsApi = async row => {
     assessmentObjectId: row.assessmentObjectId,
     assessmentModelId: row.assessmentModelId,
     score: row.score,
-    finalValue: row.finalValue
+    finalValue: row.finalValue,
+    assessmentId: messageData.value.id
   });
   if (code === 200) {
     ElMessage.success("修改成功");
@@ -259,7 +361,6 @@ const editConfig = ref({
   mode: "cell"
 });
 const editClosedEvent = ({ row, column }) => {
-  console.log("row", row);
   const $table = tableVxeRef.value;
   if ($table) {
     updateAssessmentQuotaDetailsApi(row);
@@ -267,6 +368,28 @@ const editClosedEvent = ({ row, column }) => {
     // postUpdateApi();
   }
 };
+
+// 关闭弹窗
+const closePerson = () => {
+  Object.assign(addPersonParams, {
+    assessmentId: "",
+    objectAddVoList: []
+  });
+  value1.value = [];
+  dialogVisibleAdd.value = false;
+};
+
+// 添加被考核人
+const addPerson = async () => {
+  addPersonParams.assessmentId = $props.message.id;
+  const { data, msg, code } = await postAddAssessmentObject(addPersonParams);
+  if (code === 200) {
+    ElMessage.success("添加成功");
+    dialogVisibleAdd.value = false;
+    getAssessmentObjectDetailsApi();
+    closePerson();
+  }
+};
 </script>
 
 <template>
@@ -535,29 +658,52 @@ const editClosedEvent = ({ row, column }) => {
         >
           <el-form-item label="维度权重" label-position="top">
             <el-tree-select
+              v-if="$props.message.assessmentType == 0"
+              ref="assessmentTypeRef"
               v-model="value1"
-              :data="treeDept"
+              :data="convertDepartmentDataRecursive_Person(treeDept)"
               multiple
-              :props="{
-                label: 'userNameNew',
-                value: 'userCodeNew',
-                children: 'children'
-              }"
               :render-after-expand="false"
               show-checkbox
-              check-strictly
-              check-on-click-node
               style="width: 240px"
               @check-change="handleRreeSelect"
             />
+            <el-tree-select
+              v-if="$props.message.assessmentType == 1"
+              ref="assessmentTypeRef"
+              v-model="value1"
+              :data="dpetTree"
+              multiple
+              :render-after-expand="false"
+              show-checkbox
+              style="width: 240px"
+              @check-change="handleRreeSelect"
+            />
+            <el-select
+              v-if="
+                $props.message.assessmentType != 0 &&
+                $props.message.assessmentType != 1
+              "
+              ref="selectRefs"
+              v-model="value1"
+              multiple
+              @change="handChange"
+            >
+              <el-option
+                v-for="(it, id) in treeDeptList"
+                :key="id"
+                :label="it.groupName"
+                :value="it.groupCode"
+              />
+            </el-select>
           </el-form-item>
         </el-form>
       </div>
       <template #footer>
         <div class="dialog-footer w-full flex justify-between mt-4">
           <div>
-            <el-button>取消</el-button>
-            <el-button type="primary"> 确认 </el-button>
+            <el-button @click="closePerson">取消</el-button>
+            <el-button type="primary" @click="addPerson"> 确认 </el-button>
           </div>
         </div>
       </template>

+ 5 - 4
src/views/evaluate/children/change/mould/message.vue

@@ -4,6 +4,8 @@ import { ElMessageBox, ElMessage } from "element-plus";
 import { Calendar } from "@element-plus/icons-vue";
 import { getAssessmentDetails } from "@/api/assessment";
 import dayjs from "dayjs";
+// 获取医疗组的数据
+import { postPageGroup } from "@/api/userGroup";
 import { postAddAssessment, updateAssessment } from "@/api/assessment";
 import { postListTreeWithUser } from "@/api/department";
 import { getTemplateInfoList } from "@/api/templateInfo";
@@ -243,8 +245,7 @@ const getAssessmentDetailsApi = async () => {
     } else if (form.assessmentType === 0) {
       getPersonList();
     } else if (form.assessmentType === 2) {
-      const yiliao = await postOrganizationUserPage({
-        organizationType: "group",
+      const yiliao = await postPageGroup({
         pageNumber: 1,
         pageSize: 1000
       });
@@ -437,8 +438,8 @@ onMounted(() => {
                     <el-option
                       v-for="(it, id) in treeDeptList"
                       :key="id"
-                      :label="it.realName"
-                      :value="it.userCode"
+                      :label="it.groupName"
+                      :value="it.groupCode"
                     />
                   </el-select>
                 </div>