Explorar o código

fix: 云校bug

ystl_myq hai 6 meses
pai
achega
a13512e95f
Modificáronse 28 ficheiros con 311 adicións e 149 borrados
  1. BIN=BIN
      dist.zip
  2. 1 1
      src/components/UserPageTable/index.vue
  3. 6 3
      src/components/echarts/bar.vue
  4. 5 3
      src/components/echarts/barDim.vue
  5. 4 1
      src/components/echarts/big/fullBig.vue
  6. 13 7
      src/components/echarts/radar.vue
  7. 23 19
      src/components/import/index.vue
  8. 1 0
      src/router/modules/password.ts
  9. 4 0
      src/router/utils.ts
  10. 1 1
      src/views/background/framework/proson/components/changeRole.vue
  11. 3 3
      src/views/background/framework/proson/prosonDepartment.vue
  12. 12 6
      src/views/background/framework/roles/rolePower.vue
  13. 9 7
      src/views/background/framework/users/components/addUsers.vue
  14. 16 8
      src/views/background/framework/users/index.vue
  15. 19 23
      src/views/draw/children/department/componements/seach.vue
  16. 26 14
      src/views/draw/children/department/departmentDrank.vue
  17. 9 5
      src/views/draw/children/head/componements/seach.vue
  18. 32 10
      src/views/draw/children/head/headDrank.vue
  19. 8 4
      src/views/draw/children/health/componements/seach.vue
  20. 32 11
      src/views/draw/children/health/healthDrank.vue
  21. 10 4
      src/views/draw/children/worker/componements/seach.vue
  22. 32 9
      src/views/draw/children/worker/workerDrak.vue
  23. 2 2
      src/views/evaluate/children/change/components/importIndex.vue
  24. 10 1
      src/views/evaluate/children/change/components/newAdd.vue
  25. 2 2
      src/views/evaluate/children/change/components/settingIndexDrawer.vue
  26. 1 0
      src/views/evaluate/children/change/manage.vue
  27. 6 3
      src/views/evaluate/children/change/mould/manageObject.vue
  28. 24 2
      src/views/indexDefine/children/import/index.vue

BIN=BIN
dist.zip


+ 1 - 1
src/components/UserPageTable/index.vue

@@ -88,9 +88,9 @@ const getTime = day => {
       <slot name="add-button" />
       <!-- <el-button type="primary" @click="AddPerson">添加人员</el-button> -->
     </div>
+    <!-- v-loading="loading" -->
     <el-table
       v-if="(tableData.params.organizationType = 'dept')"
-      v-loading="loading"
       :data="tableData.list"
       style="width: 100%"
     >

+ 6 - 3
src/components/echarts/bar.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { ref, computed, onMounted, watch } from "vue";
+import { ref, computed, onMounted, nextTick, watch } from "vue";
 import { useDark, useECharts } from "@pureadmin/utils";
 import { reactive } from "vue";
 const props = defineProps({
@@ -83,8 +83,8 @@ const dataList = reactive({
   title: [],
   data: []
 });
-const init = item => {
-  if (item.length > 0) {
+const init = (item?: any) => {
+  if (item && item.length > 0) {
     item.sort((a, b) => a.ranking - b.ranking);
     item.map((it, id) => {
       if (id < 10) {
@@ -134,6 +134,9 @@ const init = item => {
     ]
   });
 };
+nextTick(() => {
+  init();
+});
 defineExpose({
   init
 });

+ 5 - 3
src/components/echarts/barDim.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { ref, computed, onMounted, watch } from "vue";
+import { ref, computed, onMounted, nextTick, watch } from "vue";
 import { useDark, useECharts } from "@pureadmin/utils";
 import { getPersonDimensionChartsRanking } from "@/api/draw";
 import { reactive } from "vue";
@@ -25,7 +25,7 @@ const dataList = reactive({
   title: [],
   data: []
 });
-const init = async (item, type?: number) => {
+const init = async (item?: any, type?: number) => {
   const { data, code } = await getPersonDimensionChartsRanking({
     ...item,
     type
@@ -80,7 +80,9 @@ const init = async (item, type?: number) => {
     ]
   });
 };
-
+nextTick(() => {
+  init();
+});
 defineExpose({
   init
 });

+ 4 - 1
src/components/echarts/big/fullBig.vue

@@ -2,7 +2,7 @@
 defineOptions({
   name: "full-big"
 });
-import { ref, reactive, onMounted } from "vue";
+import { ref, reactive, onMounted, nextTick } from "vue";
 import { getPersonDimensionChartsList } from "@/api/draw";
 import { useRouter, useRoute } from "vue-router";
 import barDimEcharts from "@/components/echarts/barDim.vue";
@@ -39,6 +39,9 @@ const init = async () => {
     personListRef.value.init(data);
   }
 };
+nextTick(() => {
+  init();
+});
 defineExpose({
   dataList
 });

+ 13 - 7
src/components/echarts/radar.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { ref, computed } from "vue";
+import { ref, computed, nextTick } from "vue";
 import { useDark, useECharts } from "@pureadmin/utils";
 
 // 兼容dark主题
@@ -14,13 +14,16 @@ const { setOptions } = useECharts(chartRef, { theme });
 const rankName = ref([]);
 const rankValue = ref([]);
 // 根据配置项渲染ECharts
-const initChart = item => {
-  if (item.length != 0) {
-    item.dimensionList.map(it => {
-      rankName.value.push({
-        name: it.dimName
+const initChart = (item?: any) => {
+  console.log("根据配置项渲染ECharts", item);
+  if (item && item.length != 0) {
+    item.map(itx => {
+      itx.dimensionList.map(it => {
+        rankName.value.push({
+          name: it.dimName
+        });
+        rankValue.value.push(it.soreRate);
       });
-      rankValue.value.push(it.soreRate);
     });
     setOptions({
       tooltip: {},
@@ -65,6 +68,9 @@ const initChart = item => {
     });
   }
 };
+nextTick(() => {
+  initChart();
+});
 // initChart();
 defineExpose({ initChart });
 </script>

+ 23 - 19
src/components/import/index.vue

@@ -43,20 +43,11 @@ const handleUploadChange = (file: File) => {
       const firstSheetName = workbook.SheetNames[0]; // 获取第一个工作表名
       const worksheet = workbook.Sheets[firstSheetName]; // 获取第一个工作表
       const jsonData = XLSX.utils.sheet_to_json(worksheet, { header: 1 }); // 将工作表转为 JSON
-      console.log("获取的数据", jsonData[1]);
       if (
         jsonData[1].length == 6 &&
         (query.value.assessmentType == 0 || query.value.assessmentType == 1)
       ) {
-        tableHeaders.value = [
-          "工号",
-          "人员",
-          "考核模板",
-          "指标名称",
-          "完成值",
-          "得分"
-        ]; // 表头
-
+        tableHeaders.value = jsonData[1];
         const arr = jsonData.slice(2).map(row => {
           if (row[0] && row[1] && row[2] && row[3]) {
             const rowData = {};
@@ -112,26 +103,39 @@ const postImportAssessmentTemplateApi = async data => {
   }
   try {
     const formData = new FormData();
-    console.log(fileDocument.value, "获取的数据");
-    formData.append("file", fileDocument.value); // 将文件添加到表单数据
+
+    // 将 tableData 转换为 JSON 字符串
+    const jsonTableData = JSON.stringify(tableData.value);
+
+    // 创建一个 Blob 对象,将 JSON 数据作为二进制文件上传
+    const blob = new Blob([jsonTableData], { type: "application/json" });
+
+    // 创建一个文件对象
+    const file = new File([blob], "tableData.json", {
+      type: "application/json"
+    });
+
+    // 将生成的文件添加到 FormData 中
+    formData.append("file", file);
+
+    // 你可以在这里使用 FileReader 进一步处理文件数据
     const reader = new FileReader();
     reader.onload = function (event) {
       const arrayBuffer = event.target.result;
-      // arrayBuffer就是文件的二进制数据表示形式
-      console.log(arrayBuffer, "转换后的二进制数据");
-
-      // 这里可以根据需要进一步处理二进制数据,比如发送给服务器等操作
+      // 如果需要在上传前处理文件的二进制数据,可以在这里做
     };
-    const file = formData.get("file");
+
+    // 获取文件并执行上传
+    const fileToSend = formData.get("file");
     // 调用 API 上传文件
     const { data } = await postImportAssessmentTemplate({
-      formData: file,
+      file: fileToSend,
       type: route.query.assessmentType,
       assessmentId: route.query.id
     });
     if (data.code === 200) {
       // 根据后端返回的 code 判断是否成功
-      ElMessage.success("文件上传并导入成功");
+      ElMessage.success(data.msg);
       // 重置上传状态
       // uploadShow.value = true;
       // $router.push("/IndexDefine/children/define");

+ 1 - 0
src/router/modules/password.ts

@@ -16,6 +16,7 @@ export default {
         title: "账号与密码",
         icon: server
       },
+      component: () => import("@/views/password/index.vue"),
       children: [
         {
           path: "/password/change",

+ 4 - 0
src/router/utils.ts

@@ -293,6 +293,10 @@ function initRouter() {
         let menuDataList = matchAndMerge(data, muenList);
         addAuths(cleanEmptyChildren(menuDataList), btnList.value);
         handleAsyncRoutes(cloneDeep(cleanEmptyChildren(menuDataList)));
+        console.log(
+          "路由打印router/utils-296",
+          cleanEmptyChildren(menuDataList)
+        );
         resolve(router);
       });
     });

+ 1 - 1
src/views/background/framework/proson/components/changeRole.vue

@@ -18,7 +18,7 @@ const rolesList = reactive({
     sourceCodes: [],
     targetCodes: [],
     linkAction: "link",
-    correlatedModel: "userRole" // 人员角色关联
+    correlatedModel: "deptRole" // 部门角色关联
   }
 });
 const postAddUserGroupApi = async () => {

+ 3 - 3
src/views/background/framework/proson/prosonDepartment.vue

@@ -291,12 +291,12 @@ watch(realName, val => {
     <div class="box-right">
       <UserPageTable ref="UserTable">
         <template #add-button>
-          <Auth :value="['添加员']">
+          <Auth :value="['添加员']">
             <el-button type="primary" @click="AddPerson">新建人员</el-button>
           </Auth>
         </template>
         <template #actions="{ row }">
-          <Auth :value="['编辑员']">
+          <Auth :value="['编辑员']">
             <el-dropdown trigger="click" class="mr-2">
               <el-icon @click="personDetails(row)">
                 <View />
@@ -309,7 +309,7 @@ watch(realName, val => {
             </el-icon>
             <template #dropdown>
               <el-dropdown-menu class="setting">
-                <Auth :value="['删除员']">
+                <Auth :value="['删除员']">
                   <el-dropdown-item>
                     <el-link type="danger" @click="deletePerson(row)"
                       >删除</el-link

+ 12 - 6
src/views/background/framework/roles/rolePower.vue

@@ -55,8 +55,12 @@ let pageSize = reactive({
   pageNumber: 1,
   pageSize: 5
 });
+let pageSizeRoles = reactive({
+  pageNumber: 1,
+  pageSize: 5
+});
 const load = () => {
-  pageSize.pageSize += 5;
+  pageSizeRoles.pageSize += 5;
   postPageRoleApi();
 };
 const loadSystem = async () => {
@@ -71,7 +75,7 @@ const postPageRoleApi = async () => {
     roleType: "system"
   });
   const res: ApiResponse = await postPageRole({
-    ...pageSize,
+    ...pageSizeRoles,
     roleType: "user"
   });
   if (code === 200) {
@@ -464,9 +468,11 @@ const roleShowClick = (item, type: any) => {
                 <template #dropdown>
                   <div class="menu-bg">
                     <el-dropdown-menu class="setting">
-                      <el-dropdown-item> 编辑名称 </el-dropdown-item>
                       <el-dropdown-item>
-                        <el-link type="danger">删除</el-link>
+                        <el-link type="info">编辑名称</el-link>
+                      </el-dropdown-item>
+                      <el-dropdown-item>
+                        <el-link type="info">删除</el-link>
                       </el-dropdown-item>
                     </el-dropdown-menu>
                   </div>
@@ -549,7 +555,7 @@ const roleShowClick = (item, type: any) => {
               :prefix-icon="Search"
               @change="postPageUserByRoleApi"
             />
-            <Auth :value="['添加员']">
+            <Auth :value="['添加员']">
               <el-button type="primary" @click="AddRolesPerson"
                 >添加人员</el-button
               >
@@ -564,7 +570,7 @@ const roleShowClick = (item, type: any) => {
             <el-table-column label="操作">
               <template #default="{ row }">
                 <el-dropdown trigger="click" class="mr-2">
-                  <Auth :value="['移除人员']">
+                  <Auth :value="['移出成员']">
                     <el-text type="danger" @click="deltetePerson(row)">
                       移除
                     </el-text>

+ 9 - 7
src/views/background/framework/users/components/addUsers.vue

@@ -37,6 +37,7 @@ const postAddUserGroupApi = async () => {
       type: "success"
     });
   } else if (code == 200) {
+    emit("handleClick");
     dialogVisibleAdd.value = false;
     ElMessage({
       message: "添加成功",
@@ -48,8 +49,8 @@ const postAddUserGroupApi = async () => {
 };
 const handleClose = () => {
   dialogVisibleAdd.value = false;
-  formRef.value.clearValidate(); // 清除验证错误
-  formRef.value.resetFields(); // 重置表单字段
+  // formRef.value.clearValidate(); // 清除验证错误
+  // formRef.value.resetFields(); // 重置表单字段
 };
 // 角色数据
 
@@ -70,11 +71,11 @@ const changeRoles = () => {
 
 // 添加部门保存
 const saveDepartment = () => {
-  formRef.value.validate(valid => {
-    if (valid) {
-      postAddUserGroupApi();
-    }
-  });
+  // formRef.value.validate(valid => {
+  //   if (valid) {
+  //   }
+  // });
+  postAddUserGroupApi();
 };
 const open = item => {
   if (item) {
@@ -90,6 +91,7 @@ const open = item => {
       hospitalCode: "",
       leaderCode: ""
     });
+    rolesList.rolesName = "";
     dialogTitle.value = "新建用户组";
     form.groupName = "";
     dialogForm.value = true;

+ 16 - 8
src/views/background/framework/users/index.vue

@@ -141,7 +141,6 @@ const deltetePerson = row => {
 const addPersonClickList = () => {
   postPageGroupApi();
   UserTable.value.handleNodeClick(paramsItem.value, "group");
-  console.log(111);
 };
 </script>
 
@@ -163,7 +162,7 @@ const addPersonClickList = () => {
     <editPerson
       ref="editPersonRef"
       v-model="editPersonShow"
-      @handleClick="addPersonClick"
+      @handleClick="addPersonClickList"
     />
     <!-- 主体内容 -->
     <div class="box-left">
@@ -206,7 +205,9 @@ const addPersonClickList = () => {
             <div class="flex justify-between items-center">
               <el-dropdown trigger="click">
                 <span>
-                  <el-icon><Operation /></el-icon>
+                  <el-icon>
+                    <Operation />
+                  </el-icon>
                 </span>
                 <template #dropdown>
                   <el-dropdown-menu class="setting">
@@ -246,7 +247,7 @@ const addPersonClickList = () => {
       <h3>{{ rolesList.rolesName }}</h3>
       <UserPageTable ref="UserTable">
         <template #add-button>
-          <Auth :value="['添加员']">
+          <Auth :value="['添加员']">
             <el-button type="primary" @click="AddUsersPerson"
               >添加人员</el-button
             >
@@ -254,7 +255,7 @@ const addPersonClickList = () => {
         </template>
         <template #actions="{ row }">
           <el-dropdown trigger="click" class="mr-2">
-            <Auth :value="['移出员']">
+            <Auth :value="['移出员']">
               <el-text type="danger" @click="deltetePerson(row)">
                 移除
               </el-text>
@@ -292,15 +293,22 @@ const addPersonClickList = () => {
 }
 
 .infinite-list {
-  -ms-overflow-style: none; /* IE和Edge */
-  scrollbar-width: none; /* Firefox */
+  -ms-overflow-style: none;
+
+  /* IE和Edge */
+  scrollbar-width: none;
+
+  /* Firefox */
   // border: 1px solid red;
 }
 
 /* 隐藏滚动条 */
 .infinite-list::-webkit-scrollbar {
-  display: none; /* 对于 Webkit 浏览器(Chrome, Safari等) */
+  display: none;
+
+  /* 对于 Webkit 浏览器(Chrome, Safari等) */
 }
+
 // ::v-deep .el-dropdown {
 //   line-height: 1;
 // }

+ 19 - 23
src/views/draw/children/department/componements/seach.vue

@@ -33,7 +33,7 @@ const getTemplateInfoListApi = async selectedItem => {
     dataList.teplist = data;
   }
 };
-getTemplateInfoListApi();
+// getTemplateInfoListApi();
 // 员工
 const userPageWhitOrganizationApi = async selectedItem => {
   const { data, code } = await getUserListObjectByModelId({
@@ -48,14 +48,17 @@ const userPageWhitOrganizationApi = async selectedItem => {
 // userPageWhitOrganizationApi();
 
 // 部门
-const postListTreeApi = async () => {
-  const { data, code } = await postListTree();
+const postListTreeApi = async selectedItem => {
+  const { data, code } = await getUserListObjectByModelId({
+    type: 1,
+    assessmentId: selectedItem.assessmentId,
+    modelId: selectedItem.assessmentModelId
+  });
   if (code === 200) {
     dataList.deptList = data;
   }
   console.log("await", data);
 };
-postListTreeApi();
 // ----------------------------
 const init = reactive({
   assessmentName: "",
@@ -70,6 +73,10 @@ const handClickInit1 = value => {
     init.assessmentName = selectedItem.name;
     getTemplateInfoListApi(selectedItem);
   }
+  Object.assign(dataList.params, {
+    assessmentModelId: "",
+    deptCode: ""
+  });
   $emit(
     "handClick",
     {
@@ -86,7 +93,11 @@ const handClickInit2 = value => {
     );
     init.assessmentModelName = selectedItem.assessmentModelName;
     userPageWhitOrganizationApi(selectedItem);
+    postListTreeApi(selectedItem);
   }
+  Object.assign(dataList.params, {
+    deptCode: ""
+  });
   $emit(
     "handClick",
     {
@@ -99,11 +110,13 @@ const handClickInit2 = value => {
 
 const handClickInit3 = value => {
   if (value) {
-    const selectedItem = dataList.teplist.find(
+    const selectedItem = dataList.deptList.find(
       item => item.assessmentObjectId === value
     );
+    console.log("12321321", selectedItem);
+    console.log("12321321", value);
     init.assessmentObjectName = selectedItem.assessmentObjectName;
-    init.deptName = value.deptName;
+    // init.deptName = value.deptName;
   }
 
   $emit(
@@ -118,9 +131,6 @@ const handClickInit3 = value => {
 
 const route = useRoute();
 const getSearchFrom = () => {
-  route
-    ? console.log(route.query, "获取的路由信息")
-    : console.log("获得的路由信息为空", route);
   if (Object.keys(route.query).length > 0) {
     const {
       assessmentId,
@@ -220,20 +230,6 @@ getAssessmentPageListApi();
         </div>
         <div class="flex mr-2">
           <div class="text-sm leading-8 mr-3">科室</div>
-          <!-- <el-tree-select
-            v-model="dataList.params.deptCode"
-            :data="dataList.deptList"
-            check-strictly
-            filterable
-            clearable
-            :props="{
-              label: 'deptName',
-              value: 'deptCode',
-              children: 'childrenRes'
-            }"
-            style="width: 200px"
-            @change="handClickInit3"
-          /> -->
           <el-select
             v-model="dataList.params.deptCode"
             clearable

+ 26 - 14
src/views/draw/children/department/departmentDrank.vue

@@ -32,7 +32,9 @@ const getChartsListApi = async () => {
     showLength.value = data.length;
     setTimeout(() => {
       nextTick(() => {
-        rankTableRef.value.init(data, "科室", "姓名");
+        if (rankTableRef.value) {
+          rankTableRef.value.init(data, "科室", "姓名");
+        }
       });
     }, 500);
   }
@@ -58,16 +60,26 @@ const getPersonDimensionChartsListApi = async (
 
   if (code == 200) {
     if (data.length > 0) {
-      data.dimensionList.map(item => {
-        dataList.dimName.push({
-          name: item.dimName,
-          id: item.dimId
+      data.map(it => {
+        it.dimensionList.map(item => {
+          dataList.dimName.push({
+            name: item.dimName,
+            id: item.dimId
+          });
         });
       });
       if (dimensionName && dimId) {
-        personListRef.value.init(data);
+        setTimeout(() => {
+          nextTick(() => {
+            personListRef.value.init(data);
+          });
+        }, 500);
       } else {
-        radarRef.value.initChart(data);
+        setTimeout(() => {
+          nextTick(() => {
+            radarRef.value.initChart(data);
+          });
+        }, 500);
       }
     }
   }
@@ -92,22 +104,22 @@ const getPersonDimensionChartsRankingApi = async (
 };
 const init = (item, type) => {
   seachParams.value = item;
-
+  if (Number(type)) {
+    getPersonDimensionChartsListApi();
+    getPersonDimensionChartsRankingApi();
+    getChartsListApi();
+  }
   setTimeout(() => {
     nextTick(() => {
-      if (Number(type)) {
-        getPersonDimensionChartsListApi();
-        getPersonDimensionChartsRankingApi();
-        getChartsListApi();
+      if (barDimEchartsRef.value) {
+        barDimEchartsRef.value.init(seachParams.value, 1);
       }
-      barDimEchartsRef.value.init(seachParams.value, 1);
     });
   }, 500);
 };
 // 维度表格
 const personListRef = ref();
 const handleClick = (tab: TabsPaneContext, event: Event) => {
-  console.log(tab, event);
   if (tab.props.label == "总览") {
     getPersonDimensionChartsListApi();
     getPersonDimensionChartsRankingApi();

+ 9 - 5
src/views/draw/children/head/componements/seach.vue

@@ -32,7 +32,7 @@ const getTemplateInfoListApi = async selectedItem => {
     dataList.teplist = data.records;
   }
 };
-getTemplateInfoListApi();
+// getTemplateInfoListApi();
 // 员工
 const userPageWhitOrganizationApi = async () => {
   const { data, code } = await userPageWhitOrganization({
@@ -75,7 +75,7 @@ const getLeaderListApi = async selectedItem => {
     dataList.leaderList = data;
   }
 };
-getLeaderListApi();
+// getLeaderListApi();
 // ----------------------------
 const init = reactive({
   assessmentName: "",
@@ -90,6 +90,10 @@ const handClickInit1 = value => {
     init.assessmentName = selectedItem.name;
     getTemplateInfoListApi(selectedItem);
   }
+  Object.assign(dataList.params, {
+    assessmentModelId: "",
+    assessmentObjectId: ""
+  });
   $emit("handClick", {
     ...dataList.params,
     ...init
@@ -104,6 +108,9 @@ const handClickInit2 = value => {
     init.assessmentModelName = selectedItem.assessmentModelName;
     getLeaderListApi(selectedItem);
   }
+  Object.assign(dataList.params, {
+    assessmentObjectId: ""
+  });
   $emit(
     "handClick",
     {
@@ -132,9 +139,6 @@ const handClickInit3 = value => {
 
 const route = useRoute();
 const getSearchFrom = () => {
-  route
-    ? console.log(route.query, "获取的路由信息")
-    : console.log("获得的路由信息为空", route);
   if (Object.keys(route.query).length > 0) {
     const {
       assessmentId,

+ 32 - 10
src/views/draw/children/head/headDrank.vue

@@ -2,7 +2,7 @@
 defineOptions({
   name: "healthDrank"
 });
-import { ref, reactive } from "vue";
+import { ref, reactive, nextTick } from "vue";
 import { useRouter } from "vue-router";
 import radar from "@/components/echarts/radar.vue";
 import barEcharts from "@/components/echarts/bar.vue";
@@ -29,7 +29,13 @@ const getChartsListApi = async () => {
   });
   if (code == 200) {
     showLength.value = data.length;
-    rankTableRef.value.init(data, "科室", "姓名");
+    setTimeout(() => {
+      nextTick(() => {
+        if (rankTableRef.value) {
+          rankTableRef.value.init(data, "科室", "姓名");
+        }
+      });
+    }, 500);
   }
 };
 // 柱状图
@@ -54,17 +60,27 @@ const getPersonDimensionChartsListApi = async (
 
   if (code == 200) {
     if (data.length > 0) {
-      data.dimensionList.map(item => {
-        dataList.dimName.push({
-          name: item.dimName,
-          id: item.dimId
+      data.map(it => {
+        it.dimensionList.map(item => {
+          dataList.dimName.push({
+            name: item.dimName,
+            id: item.dimId
+          });
         });
       });
       if (dimensionName && dimId) {
-        personListRef.value.init(data);
+        setTimeout(() => {
+          nextTick(() => {
+            personListRef.value.init(data);
+          });
+        }, 500);
       } else {
-        radarRef.value.initChart(data);
-        rankTableRef.value.init(data, "科室");
+        setTimeout(() => {
+          nextTick(() => {
+            radarRef.value.initChart(data);
+            rankTableRef.value.init(data, "科室");
+          });
+        }, 500);
       }
     }
   }
@@ -94,7 +110,13 @@ const init = (item, type) => {
     getPersonDimensionChartsRankingApi();
     getChartsListApi();
   }
-  barDimEchartsRef.value.init(seachParams.value, 0);
+  setTimeout(() => {
+    nextTick(() => {
+      if (barDimEchartsRef.value) {
+        barDimEchartsRef.value.init(seachParams.value, 0);
+      }
+    });
+  }, 500);
 };
 // 维度表格
 const personListRef = ref();

+ 8 - 4
src/views/draw/children/health/componements/seach.vue

@@ -31,7 +31,7 @@ const getTemplateInfoListApi = async selectedItem => {
     dataList.teplist = data;
   }
 };
-getTemplateInfoListApi();
+// getTemplateInfoListApi();
 
 // 考核活动
 // const getAssessmentPageListApi = async () => {
@@ -72,6 +72,10 @@ const handClickInit1 = value => {
     init.assessmentName = selectedItem.name;
     getTemplateInfoListApi(selectedItem);
   }
+  Object.assign(dataList.params, {
+    assessmentModelId: "",
+    assessmentObjectId: ""
+  });
   $emit(
     "handClick",
     {
@@ -89,6 +93,9 @@ const handClickInit2 = value => {
     init.assessmentModelName = selectedItem.assessmentModelName;
     postPageGroupApi(selectedItem);
   }
+  Object.assign(dataList.params, {
+    assessmentObjectId: ""
+  });
   $emit(
     "handClick",
     {
@@ -117,9 +124,6 @@ const handClickInit3 = value => {
 
 const route = useRoute();
 const getSearchFrom = () => {
-  route
-    ? console.log(route.query, "获取的路由信息")
-    : console.log("获得的路由信息为空", route);
   if (Object.keys(route.query).length > 0) {
     const {
       assessmentId,

+ 32 - 11
src/views/draw/children/health/healthDrank.vue

@@ -2,7 +2,7 @@
 defineOptions({
   name: "headDrank"
 });
-import { ref, reactive } from "vue";
+import { ref, reactive, nextTick } from "vue";
 import { useRouter } from "vue-router";
 import radar from "@/components/echarts/radar.vue";
 import barEcharts from "@/components/echarts/bar.vue";
@@ -34,7 +34,13 @@ const getChartsListApi = async () => {
   });
   if (code == 200) {
     showLength.value = data.length;
-    rankTableRef.value.init(data, "医疗组");
+    setTimeout(() => {
+      nextTick(() => {
+        if (rankTableRef.value) {
+          rankTableRef.value.init(data, "医疗组");
+        }
+      });
+    }, 500);
   }
 };
 // 雷达图
@@ -53,18 +59,28 @@ const getPersonDimensionChartsListApi = async (
   });
 
   if (code == 200) {
-    console.log("触发事件", data);
+    dataList.dimName = [];
     if (data.length > 0) {
-      data.dimensionList.map(item => {
-        dataList.dimName.push({
-          name: item.dimName,
-          id: item.dimId
+      data.map(it => {
+        it.dimensionList.map(item => {
+          dataList.dimName.push({
+            name: item.dimName,
+            id: item.dimId
+          });
         });
       });
       if (dimensionName && dimId) {
-        personListRef.value.init(data);
+        setTimeout(() => {
+          nextTick(() => {
+            personListRef.value.init(data);
+          });
+        }, 500);
       } else {
-        radarRef.value.initChart(data);
+        setTimeout(() => {
+          nextTick(() => {
+            radarRef.value.initChart(data);
+          });
+        }, 500);
         // rankTableRef.value.init(data, "医疗组");
       }
     }
@@ -96,12 +112,17 @@ const init = (item, type) => {
     getPersonDimensionChartsRankingApi();
     getChartsListApi();
   }
-  barDimEchartsRef.value.init(seachParams.value, 0);
+  setTimeout(() => {
+    nextTick(() => {
+      if (barDimEchartsRef.value) {
+        barDimEchartsRef.value.init(seachParams.value, 0);
+      }
+    });
+  }, 500);
 };
 // 维度表格
 const personListRef = ref();
 const handleClick = (tab: TabsPaneContext, event: Event) => {
-  console.log(tab, event);
   if (tab.props.label == "总览") {
     getPersonDimensionChartsListApi();
     getPersonDimensionChartsRankingApi();

+ 10 - 4
src/views/draw/children/worker/componements/seach.vue

@@ -34,7 +34,7 @@ const getTemplateInfoListApi = async selectedItem => {
     dataList.teplist = data;
   }
 };
-getTemplateInfoListApi();
+// getTemplateInfoListApi();
 // 员工
 const userPageWhitOrganizationApi = async selectedItem => {
   const { data, code } = await getUserListObjectByModelId({
@@ -73,6 +73,11 @@ const handClickInit1 = value => {
     init.assessmentName = selectedItem.name;
     getTemplateInfoListApi(selectedItem);
   }
+  Object.assign(dataList.params, {
+    assessmentModelId: "",
+    deptCode: "",
+    assessmentObjectId: ""
+  });
   $emit(
     "handClick",
     {
@@ -91,6 +96,10 @@ const handClickInit2 = value => {
     userPageWhitOrganizationApi(selectedItem);
     postListTreeApi(selectedItem);
   }
+  Object.assign(dataList.params, {
+    deptCode: "",
+    assessmentObjectId: ""
+  });
   $emit(
     "handClick",
     {
@@ -136,9 +145,6 @@ const handClickInit4 = value => {
 
 const route = useRoute();
 const getSearchFrom = () => {
-  route
-    ? console.log(route.query, "获取的路由信息")
-    : console.log("获得的路由信息为空", route);
   if (Object.keys(route.query).length > 0) {
     const {
       assessmentId,

+ 32 - 9
src/views/draw/children/worker/workerDrak.vue

@@ -2,7 +2,7 @@
 defineOptions({
   name: "workerDrak"
 });
-import { ref, reactive } from "vue";
+import { ref, reactive, nextTick } from "vue";
 import { useRouter } from "vue-router";
 import radar from "@/components/echarts/radar.vue";
 import barEcharts from "@/components/echarts/bar.vue";
@@ -35,7 +35,13 @@ const getChartsListApi = async () => {
   });
   if (code == 200) {
     showLength.value = data.length;
-    rankTableRef.value.init(data, "科室", "姓名");
+    setTimeout(() => {
+      nextTick(() => {
+        if (rankTableRef.value) {
+          rankTableRef.value.init(data, "科室", "姓名");
+        }
+      });
+    }, 500);
   }
 };
 // 雷达图
@@ -54,17 +60,28 @@ const getPersonDimensionChartsListApi = async (
   });
 
   if (code == 200) {
+    dataList.dimName = [];
     if (data.length > 0) {
-      data.dimensionList.map(item => {
-        dataList.dimName.push({
-          name: item.dimName,
-          id: item.dimId
+      data.map(it => {
+        it.dimensionList.map(item => {
+          dataList.dimName.push({
+            name: item.dimName,
+            id: item.dimId
+          });
         });
       });
       if (dimensionName && dimId) {
-        personListRef.value.init(data);
+        setTimeout(() => {
+          nextTick(() => {
+            personListRef.value.init(data);
+          });
+        }, 500);
       } else {
-        radarRef.value.initChart(data);
+        setTimeout(() => {
+          nextTick(() => {
+            radarRef.value.initChart(data);
+          });
+        }, 500);
       }
     }
   }
@@ -97,7 +114,13 @@ const init = (item, type) => {
     getPersonDimensionChartsRankingApi();
     getChartsListApi();
   }
-  barDimEchartsRef.value.init(seachParams.value, 0);
+  setTimeout(() => {
+    nextTick(() => {
+      if (barDimEchartsRef.value) {
+        barDimEchartsRef.value.init(seachParams.value, 0);
+      }
+    });
+  }, 500);
 };
 // 维度表格
 const personListRef = ref();

+ 2 - 2
src/views/evaluate/children/change/components/importIndex.vue

@@ -120,14 +120,14 @@ const handleSelectionChange = selectedRows => {
     indexParams.tableIndex.push({
       dimId: indexParams.Relation.dimId,
       indId: item.id,
-      tpId: "",
+      tpId: indexParams.Relation.tpId,
       indName: item.name,
       scoreRule: "",
       targetValue: "",
       finalValue: "",
       challengeValue: "",
       startValue: "",
-      datasoure: "",
+      datasoure: item.datasoure,
       weight: "",
       scoreValue: ""
     });

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

@@ -423,6 +423,12 @@ const resultEvent = () => {
     console.log(visibleData);
   }
 };
+const titleShowClick = () => {
+  titleShow.value = true;
+  if (route.query.id) {
+    getListByApi();
+  }
+};
 </script>
 
 <template>
@@ -467,7 +473,7 @@ const resultEvent = () => {
           <div
             :class="{ 'step-success': titleShow, 'step-error': !titleShow }"
             class="w-[100px] flex justify-center items-center"
-            @click="titleShow = true"
+            @click="titleShowClick"
           >
             <two v-if="titleShow" />
             <one1 v-else />考核指标
@@ -596,6 +602,9 @@ const resultEvent = () => {
                 v-if="item.showDatasource"
                 field="stshowDatasourceate"
                 title="数据来源"
+                :edit-render="
+                  item.stshowDatasourceate === 'BI' ? null : { name: 'input' }
+                "
               />
               <vxe-column
                 v-if="item.mode"

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

@@ -312,7 +312,7 @@ const handleClose = (done: () => void) => {
 };
 function cancelClick() {
   drawer.value = false;
-  params = {
+  Object.assign(params, {
     id: "",
     tpId: "",
     dimId: "",
@@ -332,7 +332,7 @@ function cancelClick() {
     formula: {
       noConditionFormula: ""
     }
-  };
+  });
   disabledValue.value = true;
   editShow.value = true;
 }

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

@@ -163,6 +163,7 @@ const saveCopy = async () => {
             prop="assessmentModelNameList"
             label="考核模板"
             width="250"
+            show-overflow-tooltip
           >
             <template #default="{ row }">
               <div @click="setEdit(row)">

+ 6 - 3
src/views/evaluate/children/change/mould/manageObject.vue

@@ -136,6 +136,8 @@ onMounted(() => {
   getAssessmentQuotaDetailsApi();
   getTemplateInfoListApi();
   getAssessmentObjectDetailsApi();
+  console.log("messageData.value", typeof state.tableType);
+  console.log("messageData.value", state.tableType);
 });
 const treeDeptList = ref([]);
 const assessmentTypeApi = async value => {
@@ -306,7 +308,7 @@ const GoView = row => {
           assessmentObjectId: row.assessmentObjectId,
           assessmentName: row.assessmentModelName,
           assessmentModelName: row.assessmentModelName,
-          assessmentName: messageData.value.name,
+          // assessmentName: messageData.value.name,
           assessmentObjectName: row.assessmentObjectName
         }
       });
@@ -355,9 +357,11 @@ const updateAssessmentQuotaDetailsApi = async row => {
     assessmentId: messageData.value.id
   });
   if (code === 200) {
+    getAssessmentQuotaDetailsApi();
     ElMessage.success("修改成功");
   } else {
-    ElMessage.error(msg);
+    // 这里code不等于200调用了保存信息无法探寻到
+    // ElMessage.error(msg);
   }
 };
 const tableVxeRef = ref();
@@ -368,7 +372,6 @@ const editConfig = ref({
 const editClosedEvent = ({ row, column }) => {
   const $table = tableVxeRef.value;
   if ($table) {
-    console.log(111);
     updateAssessmentQuotaDetailsApi(row);
     // Object.assign(indexOf, row);
     // postUpdateApi();

+ 24 - 2
src/views/indexDefine/children/import/index.vue

@@ -26,9 +26,31 @@ const uploadFile = async () => {
 
   try {
     const formData = new FormData();
-    formData.append("file", fileDocument.value); // 将文件添加到表单数据
+    // 将 tableData 转换为 JSON 字符串
+    const jsonTableData = JSON.stringify(tableData.value);
+
+    // 创建一个 Blob 对象,将 JSON 数据作为二进制文件上传
+    const blob = new Blob([jsonTableData], { type: "application/json" });
+
+    // 创建一个文件对象
+    const file = new File([blob], "tableData.json", {
+      type: "application/json"
+    });
+
+    // 将生成的文件添加到 FormData 中
+    formData.append("file", file);
+
+    // 你可以在这里使用 FileReader 进一步处理文件数据
+    const reader = new FileReader();
+    reader.onload = function (event) {
+      const arrayBuffer = event.target.result;
+      // 如果需要在上传前处理文件的二进制数据,可以在这里做
+    };
+
+    // 获取文件并执行上传
+    const fileToSend = formData.get("file");
     // 调用 API 上传文件
-    const { data } = await postUpdateDeptApi(formData);
+    const { data } = await postUpdateDeptApi({ file: fileToSend });
     if (data.code === 200) {
       // 根据后端返回的 code 判断是否成功
       ElMessage.success("文件上传并导入成功");