Ver Fonte

fix: 专题画像echats回显问题

ystl_myq há 6 meses atrás
pai
commit
d16e68f644
28 ficheiros alterados com 664 adições e 331 exclusões
  1. BIN
      dist.zip
  2. 0 1
      src/components/UserPageTable/index.vue
  3. 59 73
      src/components/echarts/bar.vue
  4. 123 49
      src/components/echarts/barDim.vue
  5. 11 8
      src/components/echarts/big/fullBig.vue
  6. 11 3
      src/components/echarts/radar.vue
  7. 34 5
      src/components/personList/index.vue
  8. 20 8
      src/components/rankTable/draw.vue
  9. 6 6
      src/components/rankTable/index.vue
  10. 3 1
      src/router/modules/password.ts
  11. 1 1
      src/views/background/framework/proson/components/personDetailsDrawer.vue
  12. 12 6
      src/views/background/framework/proson/prosonDepartment.vue
  13. 3 1
      src/views/background/framework/roles/components/addRole.vue
  14. 12 5
      src/views/background/framework/roles/rolePower.vue
  15. 7 3
      src/views/background/framework/users/components/addPerson.vue
  16. 9 7
      src/views/background/framework/users/components/addUsers.vue
  17. 11 8
      src/views/background/framework/users/index.vue
  18. 0 1
      src/views/draw/children/department/componements/seach.vue
  19. 46 31
      src/views/draw/children/department/departmentDrank.vue
  20. 1 1
      src/views/draw/children/head/componements/seach.vue
  21. 45 16
      src/views/draw/children/head/headDrank.vue
  22. 55 16
      src/views/draw/children/health/healthDrank.vue
  23. 5 3
      src/views/draw/children/worker/componements/seach.vue
  24. 56 31
      src/views/draw/children/worker/workerDrak.vue
  25. 4 5
      src/views/evaluate/children/change/components/settingIndexDrawer.vue
  26. 51 17
      src/views/evaluate/children/change/manage/addExam.vue
  27. 59 22
      src/views/evaluate/children/change/mould/manageObject.vue
  28. 20 3
      src/views/indexDefine/children/define.vue

BIN
dist.zip


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

@@ -21,7 +21,6 @@ const tableData = reactive({
   total: 0
 });
 const handleNodeClick = (data: any, userType: string) => {
-  console.log("handleNodeClick");
   if (userType == "group") {
     tableData.params.organizationCode = data.groupCode;
     tableData.params.organizationType = userType;

+ 59 - 73
src/components/echarts/bar.vue

@@ -1,17 +1,48 @@
 <script setup lang="ts">
 import { ref, computed, onMounted, nextTick, watch } from "vue";
+import { getPersonDimensionChartsRanking } from "@/api/draw";
 import { useDark, useECharts } from "@pureadmin/utils";
 import { reactive } from "vue";
 const props = defineProps({
   title: {
     type: String
+  },
+  barDimEchartsList: {
+    type: Object
+  },
+  itemDim: {
+    type: Object
   }
 });
 const dataProp = reactive({
   title: "",
   data: {}
 });
-onMounted(() => {});
+onMounted(() => {
+  if (props) {
+    if (props.itemDim) {
+      init(
+        props.barDimEchartsList.data,
+        props.barDimEchartsList.type,
+        props.itemDim
+      );
+    } else {
+      console.log("没有数据", props?.barDimEchartsList);
+      init(props?.barDimEchartsList?.data, props?.barDimEchartsList?.type);
+    }
+  }
+});
+watch(props, newVal => {
+  if (newVal.itemDim) {
+    init(
+      newVal.barDimEchartsList.data,
+      newVal.barDimEchartsList.type,
+      newVal.itemDim
+    );
+  } else {
+    init(newVal.barDimEchartsList.data, newVal.barDimEchartsList.type);
+  }
+});
 // 兼容dark主题
 const { isDark } = useDark();
 let theme = computed(() => {
@@ -20,80 +51,30 @@ let theme = computed(() => {
 // 初始化ECharts
 const chartRef = ref();
 const { setOptions } = useECharts(chartRef, { theme });
-// 根据配置项渲染ECharts
-// watch(
-//   () => props.title,
-//   newTitle => {
-//     dataProp.title = newTitle.title;
-//     setOptions({
-//       title: {
-//         text: `${dataProp.title}Top10`
-//       },
-//       tooltip: {
-//         trigger: "axis",
-//         axisPointer: {
-//           type: "shadow"
-//         }
-//       },
-//       grid: {
-//         left: "3%",
-//         right: "4%",
-//         bottom: "3%",
-//         containLabel: true
-//       },
-//       xAxis: [
-//         {
-//           type: "category",
-//           data: [
-//             "张医生",
-//             "王医生",
-//             "李医生",
-//             "吴医生",
-//             "哈哈哈",
-//             "吼吼吼",
-//             "吴医生",
-//             "哈哈哈",
-//             "吼吼吼",
-//             "啊啊啊"
-//           ],
-//           axisTick: {
-//             alignWithLabel: true
-//           }
-//         }
-//       ],
-//       yAxis: [
-//         {
-//           type: "value"
-//         }
-//       ],
-//       series: [
-//         {
-//           name: "Direct",
-//           type: "bar",
-//           // barWidth: "30%",
-//           barWidth: dataProp.title == "总得分" ? "30%" : "40%",
-//           data: [10, 52, 200, 334, 390, 330, 220, 52, 390, 330]
-//         }
-//       ]
-//     });
-//   },
-//   { immediate: true }
-// );
+
 const dataList = reactive({
   title: [],
   data: []
 });
-const init = (item?: any) => {
+const init = async (item?: any, type?: any, itemDim?: any) => {
   dataList.title = [];
   dataList.data = [];
-  if (item && item.length > 0) {
-    item.sort((a, b) => a.ranking - b.ranking);
-    item.map((it, id) => {
-      if (id < 10) {
-        dataList.title.push(it.assessmentObjectName);
-        dataList.data.push(it.totalScore);
-      }
-    });
+  const { data, code } = await getPersonDimensionChartsRanking({
+    ...item,
+    dimensionName: itemDim?.name,
+    dimId: itemDim?.id,
+    type
+  });
+  if (code === 200) {
+    // dataListInit = data.sort((a, b) => a.ranking - b.ranking);
+    if (data.length > 0) {
+      data.map((it, id) => {
+        if (id < 10) {
+          dataList.title.push(it.assessmentObjectName);
+          dataList.data.push(it.totalScore);
+        }
+      });
+    }
   }
   setOptions({
     title: {
@@ -117,6 +98,14 @@ const init = (item?: any) => {
         data: dataList.title,
         axisTick: {
           alignWithLabel: true
+        },
+        axisLabel: {
+          interval: 0, // 强制显示所有标签
+          rotate: 0, // 旋转45度
+          formatter: function (value) {
+            // 可以根据需要截取过长的标签,避免布局问题
+            return value.length > 5 ? value.slice(0, 5) + "..." : value;
+          }
         }
       }
     ],
@@ -127,7 +116,7 @@ const init = (item?: any) => {
     ],
     series: [
       {
-        name: "Direct",
+        name: "得分",
         type: "bar",
         // barWidth: "30%",
         barWidth: props.title == "总得分" ? "30%" : "40%",
@@ -136,9 +125,6 @@ const init = (item?: any) => {
     ]
   });
 };
-nextTick(() => {
-  init();
-});
 defineExpose({
   init
 });

+ 123 - 49
src/components/echarts/barDim.vue

@@ -6,13 +6,57 @@ import { reactive } from "vue";
 const props = defineProps({
   title: {
     type: String
+  },
+  barDimEchartsList: {
+    type: Object
+  },
+  itemDim: {
+    type: Object
+  },
+  bigFull: {
+    type: Number
   }
 });
 const dataProp = reactive({
   title: "",
   data: {}
 });
-onMounted(() => {});
+const propItem = ref();
+onMounted(() => {
+  nextTick(() => {
+    if (props) {
+      propItem.value = props;
+      console.log("props", props);
+      init(
+        props.barDimEchartsList.data,
+        props.barDimEchartsList.type,
+        props.itemDim
+      );
+    }
+  });
+});
+watch(
+  propItem,
+  newVal => {
+    console.log("newVal", newVal);
+    if (props.bigFull == 2) {
+      let dimList = {
+        name: newVal.barDimEchartsList.name,
+        id: newVal.barDimEchartsList.id
+      };
+      let type = newVal.barDimEchartsList.type;
+      delete newVal.barDimEchartsList.type;
+      init(newVal.barDimEchartsList, type, dimList);
+    } else {
+      init(
+        newVal.barDimEchartsList.data,
+        newVal.barDimEchartsList.type,
+        newVal.itemDim
+      );
+    }
+  },
+  { deep: true }
+);
 // 兼容dark主题
 const { isDark } = useDark();
 let theme = computed(() => {
@@ -25,66 +69,96 @@ const dataList = reactive({
   title: [],
   data: []
 });
-const init = async (item?: any, type?: number) => {
+const init = async (item?: any, type?: number, dimList?: any) => {
   dataList.title = [];
   dataList.data = [];
+  let dataFullBig = [];
+  // if (props.bigFull == 2) {
+  //   console.log("item", item);
+  //   console.log("item", item);
+  //   console.log("dimList", item);
+  //   const { data, code } = await getPersonDimensionChartsRanking({
+  //     ...item?.barDimEchartsList,
+  //     dimensionName: item.barDimEchartsList?.name,
+  //     dimId: item.barDimEchartsList?.id
+  //   });
+  //   if (code === 200) {
+  //     dataFullBig = data;
+  //   }
+  // } else {
+  //   console.log("没有这条数据", item);
+  // }
+  console.log("item", item);
   const { data, code } = await getPersonDimensionChartsRanking({
     ...item,
+    dimensionName: dimList?.name,
+    dimId: dimList?.id,
     type
   });
-  let dataListInit;
   if (code === 200) {
-    dataListInit = data.sort((a, b) => a.ranking - b.ranking);
-    dataListInit.map((it, id) => {
+    dataFullBig = data;
+  }
+  if (dataFullBig) {
+    dataFullBig.map((it, id) => {
       if (id < 10) {
-        dataList.title.push(it.assessmentObjectName);
-        dataList.data.push(it.totalScore);
+        if (dataList.data.length < 10) {
+          dataList.title.push(it.assessmentObjectName);
+          dataList.data.push(it.totalScore);
+        }
       }
     });
-  }
-  setOptions({
-    title: {
-      text: `${props.title}Top10`
-    },
-    tooltip: {
-      trigger: "axis",
-      axisPointer: {
-        type: "shadow"
-      }
-    },
-    grid: {
-      left: "3%",
-      right: "4%",
-      bottom: "3%",
-      containLabel: true
-    },
-    xAxis: [
-      {
-        type: "category",
-        data: dataList.title,
-        axisTick: {
-          alignWithLabel: true
+    setOptions({
+      title: {
+        text: `${props.title}Top10`
+      },
+      tooltip: {
+        trigger: "axis",
+        axisPointer: {
+          type: "shadow"
         }
-      }
-    ],
-    yAxis: [
-      {
-        type: "value"
-      }
-    ],
-    series: [
-      {
-        name: "Direct",
-        type: "bar",
-        barWidth: props.title == "总得分" ? "30%" : "40%",
-        data: dataList.data
-      }
-    ]
-  });
+      },
+      grid: {
+        left: "3%",
+        right: "4%",
+        bottom: "3%",
+        containLabel: true
+      },
+      xAxis: [
+        {
+          type: "category",
+          data: dataList.title,
+          axisTick: {
+            alignWithLabel: true
+          },
+          axisLabel: {
+            interval: 0, // 强制显示所有标签
+            rotate: 0, // 旋转45度
+            formatter: function (value) {
+              // 可以根据需要截取过长的标签,避免布局问题
+              return value.length > 4 ? value.slice(0, 4) + "..." : value;
+            }
+          }
+        }
+      ],
+      yAxis: [
+        {
+          type: "value"
+        }
+      ],
+      series: [
+        {
+          name: "得分",
+          type: "bar",
+          barWidth: props.title == "总得分" ? "30%" : "40%",
+          data: dataList.data
+        }
+      ]
+    });
+  }
 };
-nextTick(() => {
-  init();
-});
+// nextTick(() => {
+//   init();
+// });
 defineExpose({
   init
 });

+ 11 - 8
src/components/echarts/big/fullBig.vue

@@ -15,12 +15,12 @@ const params = ref({});
 const title = ref();
 onMounted(() => {
   nextTick(() => {
-    console.log("full-bigroute", route.query);
-    title.value = route.query.dimensionName;
+    title.value = route.query.name;
     Object.assign(params.value, route.query);
-    console.log("full-bigroute", params.value);
-    barDimEchartsRef.value.init(params.value);
-    init();
+    // barDimEchartsRef.value.init(params.value);
+    setTimeout(() => {
+      init();
+    }, 500);
   });
 });
 
@@ -38,7 +38,6 @@ const init = async () => {
   const { data, code } = await getPersonDimensionChartsList({
     ...params.value
   });
-  console.log("full-bigroutedata", data);
   if (code == 200) {
     personListRef.value.init(data);
   }
@@ -57,8 +56,12 @@ defineExpose({
       </div>
     </div>
     <div class="w-[1260px] h-[380px] mt-5">
-      <barDimEcharts ref="barDimEchartsRef" :title="title" />
+      <barDimEcharts
+        ref="barDimEchartsRef"
+        :title="title"
+        :barDimEchartsList="params"
+        :bigFull="2"
+      />
     </div>
-    <!-- :title="barEchartsList.shuliang" -->
   </div>
 </template>

+ 11 - 3
src/components/echarts/radar.vue

@@ -1,7 +1,16 @@
 <script setup lang="ts">
-import { ref, computed, nextTick } from "vue";
+import { ref, computed, nextTick, onMounted } from "vue";
 import { useDark, useECharts } from "@pureadmin/utils";
-
+const $props = defineProps({
+  radarRefList: {
+    type: Array
+  }
+});
+onMounted(() => {
+  if ($props.radarRefList) {
+    initChart($props.radarRefList);
+  }
+});
 // 兼容dark主题
 const { isDark } = useDark();
 let theme = computed(() => {
@@ -17,7 +26,6 @@ const rankValue = ref([]);
 const initChart = (item?: any) => {
   rankName.value = [];
   rankValue.value = [];
-  console.log("根据配置项渲染ECharts", item);
   if (item && item.length != 0) {
     item.map(itx => {
       itx.dimensionList.map(it => {

+ 34 - 5
src/components/personList/index.vue

@@ -6,10 +6,38 @@
           <div class="text-black">{{ scope.row.quotaName }}</div>
         </template>
       </el-table-column>
+      <el-table-column
+        v-if="showList?.showIndicRemark"
+        prop="remark"
+        label="指标说明"
+      />
+      <el-table-column
+        v-if="showList?.showScoreRule"
+        prop="scoreRule"
+        label="评价标准"
+      />
+      <el-table-column
+        v-if="showList?.showDatasource"
+        prop="datasoure"
+        label="数据来源"
+      />
+      <el-table-column
+        v-if="showList?.showTargetValue"
+        prop="targetValue"
+        label="目标值"
+      />
       <el-table-column prop="finalValue" label="完成值" />
-      <el-table-column prop="startValue" label="门槛值" />
-      <el-table-column prop="challengeValue" label="挑战值" />
-      <el-table-column prop="challengeValue" label="排名" />
+      <el-table-column
+        v-if="showList?.showStartValue"
+        prop="startValue"
+        label="门槛值"
+      />
+      <el-table-column
+        v-if="showList?.showChallengeValue"
+        prop="challengeValue"
+        label="挑战值"
+      />
+      <el-table-column prop="ranking" label="排名" />
       <el-table-column prop="quotaScore" label="得分" />
     </el-table>
   </div>
@@ -18,15 +46,16 @@
 <script lang="ts" setup>
 import { ref, nextTick } from "vue";
 const tableData = ref([]);
+const showList = ref();
 const init = (data?: any) => {
   if (data) {
-    console.log("data1111", data);
     tableData.value = [];
     setTimeout(() => {
       nextTick(() => {
+        showList.value = data[0]?.dimensionList[0];
+        console.log("维度", showList.value);
         tableData.value = data[0]?.dimensionList[0].quotaList;
         // tableData.value = data;
-        console.log("tableData.value", tableData.value);
       });
     }, 0);
   }

+ 20 - 8
src/components/rankTable/draw.vue

@@ -161,12 +161,24 @@ defineExpose({
 </template>
 
 <script setup>
-import { ref, reactive, watch } from "vue";
+import { ref, reactive, watch, onMounted } from "vue";
 import rank1 from "@/assets/rank/rank1.png";
 import rank2 from "@/assets/rank/rank2.png";
 import rank3 from "@/assets/rank/rank3.png";
 import { useRoute } from "vue-router";
-
+const $prop = defineProps({
+  rankTableRefList: Object
+});
+onMounted(() => {
+  // 员工排行榜无法获取组件渲染问题
+  if ($prop.rankTableRefList) {
+    init(
+      $prop.rankTableRefList.data,
+      $prop.rankTableRefList.dept,
+      $prop.rankTableRefList.name
+    );
+  }
+});
 const $route = useRoute();
 const RANK_IMG = [rank1, rank2, rank3];
 const deptName = ref("");
@@ -177,15 +189,16 @@ const mergeCells = ref([
   { row: 2, col: 1, rowspan: 0, colspan: 0 }
 ]);
 const averageData = averageSore => {
+  console.log("平均数", rawData.value);
   if (rawData.value.length > 0) {
     let num = 0;
-    rawData.value.map(it => {
-      num = num + it.allScore;
-    });
-    num = num / rawData.value.length;
+    // rawData.value.map(it => {
+    //   num = num + it.allScore;
+    // });
+    // num = (num / rawData.value.length).toFixed(2);
     rawData.value.unshift({
       dimensionList: [],
-      allScore: num
+      allScore: rawData.value[0].averageSore
     });
   }
 };
@@ -213,7 +226,6 @@ const tableConfig = reactive({});
 const rawData = ref([]);
 const init = (item, deptNames, names) => {
   rawData.value = item;
-  console.log("111-item", item);
   deptName.value = deptNames;
   name.value = names;
   if ($route.name != "workerDrak") {

+ 6 - 6
src/components/rankTable/index.vue

@@ -190,14 +190,14 @@ const mergeCells = ref([
 ]);
 const averageData = averageSore => {
   if (rawData.value.length > 0) {
-    let num = 0;
-    rawData.value.map(it => {
-      num = num + it.allScore;
-    });
-    num = num / rawData.value.length;
+    // let num = 0;
+    // rawData.value.map(it => {
+    //   num = num + it.allScore;
+    // });
+    // num = num / rawData.value.length;
     rawData.value.unshift({
       dimensionList: [],
-      allScore: num
+      allScore: rawData.value[0].averageSore
     });
   }
 };

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

@@ -2,6 +2,7 @@
 import server from "@/assets/icon-png/menuList/server.svg";
 export default {
   path: "/password",
+  name: "passWord",
   redirect: "/password/change",
   meta: {
     title: "账号与密码",
@@ -12,11 +13,12 @@ export default {
   children: [
     {
       path: "/password-Change",
+      name: "passWordChange",
       meta: {
         title: "账号与密码",
         icon: server
       },
-      component: () => import("@/views/password/index.vue"),
+      // component: () => import("@/views/password/index.vue"),
       children: [
         {
           path: "/password/change",

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

@@ -59,7 +59,7 @@ function confirmClick() {
 }
 const postUpdateUserInfoApi = async () => {
   if (!formLabelAlign.birth) {
-    delete formLabelAlign.birth;
+    formLabelAlign.birth = 0;
   }
   const { code, msg } = await postUpdateUserInfo(formLabelAlign);
   if (code === 200) {

+ 12 - 6
src/views/background/framework/proson/prosonDepartment.vue

@@ -3,7 +3,7 @@ defineOptions({
   // name 作为一种规范最好必须写上并且和路由的name保持一致
   name: "prosonDepartment"
 });
-import { ref, reactive, watch, nextTick } from "vue";
+import { ref, reactive, watch, nextTick, onMounted } from "vue";
 import { ElMessageBox, ElMessage } from "element-plus";
 import { Search } from "@element-plus/icons-vue";
 import prosonEditDrawer from "./components/prosonEditDrawer.vue";
@@ -59,6 +59,7 @@ const postListTreeApi = async () => {
       data[0].id = 1;
     }
     dataTree.value = data;
+    console.log("dataTree", dataTree.value);
     let dataId = { data: "" };
     dataId.data = dataTree.value[0];
     nextTick(() => {
@@ -66,7 +67,14 @@ const postListTreeApi = async () => {
     });
   }
 };
-postListTreeApi();
+onMounted(() => {
+  postListTreeApi();
+  setTimeout(() => {
+    nextTick(() => {
+      selectedNodeId.value = dataTree.value[0].id;
+    });
+  }, 500);
+});
 // 删除人员
 const deletePerson = row => {
   console.log(row);
@@ -265,10 +273,8 @@ watch(realName, val => {
                     </el-dropdown-item>
                   </Auth>
                   <Auth :value="['删除']">
-                    <el-dropdown-item>
-                      <el-link type="danger" @click="deleteDepartment(node)"
-                        >删除</el-link
-                      >
+                    <el-dropdown-item @click="deleteDepartment(node)">
+                      <el-link type="danger">删除</el-link>
                     </el-dropdown-item>
                   </Auth>
                 </el-dropdown-menu>

+ 3 - 1
src/views/background/framework/roles/components/addRole.vue

@@ -17,10 +17,13 @@ const postAddRoleApi = async () => {
       : await postUpdateRoleName(form);
   if (res.code === 200) {
     emit("handleClick");
+    dialogVisibleAdd.value = false;
+
     ElMessage({
       message: `${dialogTitle.value}成功`,
       type: "success"
     });
+  } else {
   }
 };
 const handleClose = () => {
@@ -42,7 +45,6 @@ const handleClose = () => {
 const saveDepartment = () => {
   formRef.value.validate(valid => {
     if (valid) {
-      dialogVisibleAdd.value = false;
       postAddRoleApi();
     }
   });

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

@@ -3,7 +3,7 @@ defineOptions({
   // name 作为一种规范最好必须写上并且和路由的name保持一致
   name: "rolePower"
 });
-import { ref, reactive, watch } from "vue";
+import { ref, reactive, watch, onMounted } from "vue";
 import { ElMessageBox, ElMessage } from "element-plus";
 import { Search } from "@element-plus/icons-vue";
 import addRole from "./components/addRole.vue";
@@ -92,9 +92,18 @@ const postPageRoleApi = async () => {
   }
 };
 // 自定义角色
-postPageRoleApi();
 // 查看角色组
 const bgColor = ref(null);
+onMounted(() => {
+  postPageRoleApi();
+  setTimeout(() => {
+    bgColor.value = rolesList.data[0].roleCode;
+    paramsPageUser.roleName = rolesList.data[0].roleName;
+    paramsPageUser.roleCode = rolesList.data[0].roleCode;
+    rolesList.rolesName = rolesList.data[0].roleName;
+    postPageUserByRoleApi();
+  }, 500);
+});
 const lookRoles = item => {
   paramsPageUser.roleName = item.roleName;
   paramsPageUser.roleCode = item.roleCode;
@@ -202,9 +211,7 @@ const postPageUserByRoleApi = async () => {
   console.log(data);
   if (code === 200) {
     tableData.value = data.records;
-    if (data.totalRow) {
-      total.value = data.totalRow;
-    }
+    total.value = data?.totalRow;
   }
 };
 // 菜单权限

+ 7 - 3
src/views/background/framework/users/components/addPerson.vue

@@ -26,8 +26,12 @@ const open = (item, list) => {
   form.targetCodes = [];
   dialogVisibleAdd.value = true;
   filterText.value = "";
+  console.log(item, list);
+  if (treeRef.value) {
+    console.log(12345);
+    treeRef.value.setCheckedKeys([]);
+  }
   form.targetCodes.push(item.groupCode);
-  // form.sourceCodes.push(item.groupCode);
 };
 const postAssignmentUserApi = async () => {
   // 清除为null的数据
@@ -47,7 +51,7 @@ const postAssignmentUserApi = async () => {
     });
     dialogVisibleAdd.value = false;
   } else {
-    ElMessage.error(msg);
+    // ElMessage.error(msg);
   }
 };
 // 树选择
@@ -101,7 +105,7 @@ defineExpose({
         style="max-width: 600px"
         :data="treeDept"
         show-checkbox
-        node-key="id"
+        node-key="userCodeNew"
         :props="defaultProps"
         :filter-node-method="filterNode"
         @check="handleCheck"

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

@@ -44,7 +44,7 @@ const postAddUserGroupApi = async () => {
       type: "success"
     });
   } else {
-    ElMessage.error(msg);
+    // ElMessage.error(msg);
   }
 };
 const handleClose = () => {
@@ -64,9 +64,10 @@ const rolesData = async () => {
   }
 };
 const changeRoles = () => {
-  // console.log(rolesList.rolesName);
-  rolesList.assignmentParams.sourceCodes = [];
-  rolesList.assignmentParams.sourceCodes.push(rolesList.rolesName);
+  rolesList.assignmentParams.targetCodes = [];
+  rolesList.assignmentParams.targetCodes.push(rolesList.rolesName);
+  // rolesList.assignmentParams.sourceCodes = [];
+  // rolesList.assignmentParams.sourceCodes.push(rolesList.rolesName);
 };
 
 // 添加部门保存
@@ -80,9 +81,10 @@ const saveDepartment = () => {
 const open = item => {
   if (item) {
     dialogTitle.value = "配置角色";
-    // console.log("部门", item);
-    rolesList.assignmentParams.targetCodes = [];
-    rolesList.assignmentParams.targetCodes.push(item.hospitalCode);
+    rolesList.assignmentParams.sourceCodes = [];
+    rolesList.assignmentParams.sourceCodes.push(item.groupCode);
+    // rolesList.assignmentParams.targetCodes = [];
+    // rolesList.assignmentParams.targetCodes.push(item.groupCode);
     form.groupName = item.groupName;
     dialogForm.value = false;
   } else {

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

@@ -3,7 +3,7 @@ defineOptions({
   // name 作为一种规范最好必须写上并且和路由的name保持一致
   name: "users"
 });
-import { ref, reactive } from "vue";
+import { ref, reactive, onMounted } from "vue";
 import { ElMessageBox, ElMessage } from "element-plus";
 import { Search } from "@element-plus/icons-vue";
 import addPerson from "./components/addPerson.vue";
@@ -43,7 +43,6 @@ const load = () => {
 const postPageGroupApi = async () => {
   const { code, data } = await postPageGroup(rolesList.params);
   if (code === 200) {
-    console.log("用户组", data);
     rolesList.data = [];
     data.records.forEach((item, index) => {
       rolesList.data.push({
@@ -53,8 +52,14 @@ const postPageGroupApi = async () => {
     });
   }
 };
-postPageGroupApi();
-
+onMounted(() => {
+  postPageGroupApi();
+  setTimeout(() => {
+    rolesList.rolesName = rolesList.data[0].groupName;
+    bgColor.value = rolesList.data[0].id;
+    UserTable?.value?.handleNodeClick(rolesList.data[0], "group");
+  }, 500);
+});
 // 查看角色组
 const paramsItem = ref();
 const bgColor = ref(null);
@@ -223,10 +228,8 @@ const addPersonClickList = () => {
                       </el-dropdown-item>
                     </Auth>
                     <Auth :value="['删除']">
-                      <el-dropdown-item>
-                        <el-link type="danger" @click="deleteUsers(item)"
-                          >删除</el-link
-                        >
+                      <el-dropdown-item @click="deleteUsers(item)">
+                        <el-link type="danger">删除</el-link>
                       </el-dropdown-item>
                     </Auth>
                   </el-dropdown-menu>

+ 0 - 1
src/views/draw/children/department/componements/seach.vue

@@ -57,7 +57,6 @@ const postListTreeApi = async selectedItem => {
   if (code === 200) {
     dataList.deptList = data;
   }
-  console.log("await", data);
 };
 // ----------------------------
 const init = reactive({

+ 46 - 31
src/views/draw/children/department/departmentDrank.vue

@@ -2,10 +2,11 @@
 defineOptions({
   name: "departmentDrank"
 });
-import { ref, reactive, nextTick } from "vue";
+import { ref, reactive, nextTick, watch } from "vue";
 import { useRouter } from "vue-router";
 import radar from "@/components/echarts/radar.vue";
 import barEcharts from "@/components/echarts/bar.vue";
+import barDimEcharts from "@/components/echarts/barDim.vue";
 import rankTable from "@/components/rankTable/draw.vue";
 import personList from "@/components/personList/index.vue";
 import qvanping from "@/assets/rank/qvanping@2x.png";
@@ -56,7 +57,7 @@ const getPersonDimensionChartsListApiDimList = async () => {
     dataList.dimName = [];
     if (data.length > 0) {
       data.map(it => {
-        it.dimensionList.map(item => {
+        it.dimensionList.map((item, index) => {
           dataList.dimName.push({
             name: item.dimName,
             id: item.dimId
@@ -66,6 +67,7 @@ const getPersonDimensionChartsListApiDimList = async () => {
     }
   }
 };
+const radarRefList = ref([]);
 const getPersonDimensionChartsListApi = async (
   dimensionName?: string,
   dimId?: number | string,
@@ -81,7 +83,6 @@ const getPersonDimensionChartsListApi = async (
   if (code == 200) {
     if (data.length > 0) {
       if (dimensionName && dimId) {
-        console.log("文化", personListRef.value);
         setTimeout(() => {
           nextTick(() => {
             if (personListRef.value) {
@@ -92,7 +93,8 @@ const getPersonDimensionChartsListApi = async (
       } else {
         setTimeout(() => {
           nextTick(() => {
-            radarRef.value.initChart(data);
+            radarRefList.value = data;
+            // radarRef.value.initChart(data);
           });
         }, 500);
       }
@@ -113,31 +115,33 @@ const getPersonDimensionChartsRankingApi = async (
   });
   if (code == 200) {
     if (data.length > 0) {
-      barEchartsRef.value.init(data);
+      // barEchartsRef.value.init(data);
     }
   }
 };
+const barDimEchartsList = reactive({
+  data: null,
+  type: null
+});
 const init = (item, type) => {
   seachParams.value = item;
+  barDimEchartsList.data = null;
+  barDimEchartsList.type = null;
   if (Number(type)) {
+    nextTick(() => {
+      barDimEchartsList.data = item;
+      barDimEchartsList.type = 1;
+    });
     getPersonDimensionChartsListApi();
-    getPersonDimensionChartsRankingApi();
     getPersonDimensionChartsListApiDimList();
+    getPersonDimensionChartsRankingApi();
     getChartsListApi();
   }
-  setTimeout(() => {
-    nextTick(() => {
-      if (barDimEchartsRef.value) {
-        if (Array.isArray(barDimEchartsRef.value)) {
-          dataList.dimName.map((it, id) => {
-            barDimEchartsRef?.value[id - 1]?.init(seachParams.value, 1);
-          });
-        } else {
-          barDimEchartsRef.value.init(seachParams.value, 1);
-        }
-      }
-    });
-  }, 500);
+  // setTimeout(() => {
+  //   nextTick(() => {
+  //     //
+  //   });
+  // }, 500);
 };
 // 维度表格
 const personListRef = ref();
@@ -157,8 +161,7 @@ const fullBig = (item: any) => {
   router.push({
     path: "/fullBig",
     query: {
-      dimensionName: item.name,
-      dimId: item.id,
+      ...item,
       ...seachParams.value,
       type: 1
     }
@@ -172,7 +175,7 @@ const fullBig = (item: any) => {
       <seachData @handClick="init" />
       <div v-if="showLength > 0">
         <div class="flex mr-2">
-          <radar ref="radarRef" />
+          <radar ref="radarRef" :radarRefList="radarRefList" />
         </div>
         <el-tabs
           v-model="activeName"
@@ -186,16 +189,23 @@ const fullBig = (item: any) => {
             </div>
             <!-- 总得分 -->
             <div class="mt-5 pr-8 w-full h-60">
-              <barEcharts ref="barEchartsRef" :title="'总得分'" />
+              <barEcharts
+                ref="barEchartsRef"
+                :title="'总得分'"
+                :barDimEchartsList="barDimEchartsList"
+              />
             </div>
             <!-- 维度得分 -->
-            <div
-              v-for="(item, index) in dataList.dimName"
-              :key="index"
-              class="flex justify-between flex-wrap items-center"
-            >
-              <div class="mt-5 pr-8 w-1/2 h-60">
-                <barDimEcharts ref="barDimEchartsRef" :title="item.name" />
+            <div class="flex justify-between flex-wrap items-center">
+              <div v-for="(item, index) in dataList.dimName" :key="index">
+                <div class="mt-5 pr-8 h-60 w-[600px]">
+                  <barDimEcharts
+                    ref="barDimEchartsRef"
+                    :title="item.name"
+                    :barDimEchartsList="barDimEchartsList"
+                    :itemDim="item"
+                  />
+                </div>
               </div>
             </div>
           </el-tab-pane>
@@ -217,7 +227,12 @@ const fullBig = (item: any) => {
                 </div>
               </div>
               <div class="w-full h-60 mt-5 pr-8">
-                <barEcharts ref="barEchartsRef" :title="item.name" />
+                <barEcharts
+                  ref="barEchartsRef"
+                  :title="item.name"
+                  :barDimEchartsList="barDimEchartsList"
+                  :itemDim="item"
+                />
               </div>
             </div>
           </el-tab-pane>

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

@@ -29,7 +29,7 @@ const dataList = reactive({
 const getTemplateInfoListApi = async selectedItem => {
   const { data, code } = await getModelListByAssessmentId(selectedItem);
   if (code === 200) {
-    dataList.teplist = data.records;
+    dataList.teplist = data;
   }
 };
 // getTemplateInfoListApi();

+ 45 - 16
src/views/draw/children/head/headDrank.vue

@@ -6,6 +6,7 @@ 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";
+import barDimEcharts from "@/components/echarts/barDim.vue";
 import rankTable from "@/components/rankTable/draw.vue";
 import personList from "@/components/personList/index.vue";
 import qvanping from "@/assets/rank/qvanping@2x.png";
@@ -22,17 +23,24 @@ const activeName = ref("1");
 // 排行榜
 const showLength = ref(0);
 const chartList = ref([]);
+const rankTableRefList = reactive({
+  data: [],
+  dept: "",
+  name: ""
+});
 const getChartsListApi = async () => {
   const { code, data } = await getChartsList({
     ...seachParams.value,
     type: 3
   });
   if (code == 200) {
-    showLength.value = data.length;
     setTimeout(() => {
       nextTick(() => {
-        if (rankTableRef.value) {
-          rankTableRef.value.init(data, "科室", "姓名");
+        if (data) {
+          showLength.value = data.length;
+          rankTableRefList.data = data;
+          rankTableRefList.dept = "科室";
+          rankTableRefList.name = "姓名";
         }
       });
     }, 500);
@@ -66,6 +74,7 @@ const getPersonDimensionChartsListApiDimList = async () => {
     }
   }
 };
+const radarRefList = ref([]);
 const getPersonDimensionChartsListApi = async (
   dimensionName?: string,
   dimId?: number | string,
@@ -90,8 +99,9 @@ const getPersonDimensionChartsListApi = async (
       } else {
         setTimeout(() => {
           nextTick(() => {
-            radarRef.value.initChart(data);
-            rankTableRef.value.init(data, "科室");
+            radarRefList.value = data;
+            // radarRef.value.initChart(data);
+            // rankTableRef.value.init(data, "科室");
           });
         }, 500);
       }
@@ -116,9 +126,17 @@ const getPersonDimensionChartsRankingApi = async (
     }
   }
 };
+const barDimEchartsList = reactive({
+  data: null,
+  type: null
+});
 const init = (item, type) => {
   seachParams.value = item;
   if (Number(type)) {
+    nextTick(() => {
+      barDimEchartsList.data = item;
+      barDimEchartsList.type = 3;
+    });
     getPersonDimensionChartsListApi();
     getPersonDimensionChartsRankingApi();
     getPersonDimensionChartsListApiDimList();
@@ -150,7 +168,7 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
     getPersonDimensionChartsListApi(tab.props.label, tab.props.name, tab.index);
     getPersonDimensionChartsRankingApi(tab.props.label, tab.props.name);
   }
-  barEchartsRef.value.init(tab.props);
+  // barEchartsRef.value.init(tab.props);
 };
 const fullBig = (item: any) => {
   router.push({
@@ -171,7 +189,7 @@ const fullBig = (item: any) => {
       <seachData @handClick="init" />
       <div v-if="showLength > 0">
         <div class="flex mr-2">
-          <radar ref="radarRef" />
+          <radar ref="radarRef" :radarRefList="radarRefList" />
         </div>
         <el-tabs
           v-model="activeName"
@@ -181,20 +199,26 @@ const fullBig = (item: any) => {
         >
           <el-tab-pane label="总览" name="1">
             <div class="flex mr-8">
-              <rankTable ref="rankTableRef" />
+              <rankTable
+                ref="rankTableRef"
+                :rankTableRefList="rankTableRefList"
+              />
             </div>
             <!-- 总得分 -->
             <div class="mt-5 pr-8 w-full h-60">
               <barEcharts ref="barEchartsRef" :title="'总得分'" />
             </div>
             <!-- 维度得分 -->
-            <div
-              v-for="(item, index) in dataList.dimName"
-              :key="index"
-              class="flex justify-between flex-wrap items-center"
-            >
-              <div class="mt-5 pr-8 w-1/2 h-60">
-                <barDimEcharts ref="barDimEchartsRef" :title="item.name" />
+            <div class="flex justify-between flex-wrap items-center">
+              <div v-for="(item, index) in dataList.dimName" :key="index">
+                <div class="mt-5 pr-8 h-60 w-[650px]">
+                  <barDimEcharts
+                    ref="barDimEchartsRef"
+                    :title="item.name"
+                    :barDimEchartsList="barDimEchartsList"
+                    :itemDim="item"
+                  />
+                </div>
               </div>
             </div>
           </el-tab-pane>
@@ -216,7 +240,12 @@ const fullBig = (item: any) => {
                 </div>
               </div>
               <div class="w-full h-60 mt-5 pr-8">
-                <barEcharts ref="barEchartsRef" :title="item.name" />
+                <barEcharts
+                  ref="barEchartsRef"
+                  :title="item.name"
+                  :barDimEchartsList="barDimEchartsList"
+                  :itemDim="item"
+                />
               </div>
             </div>
           </el-tab-pane>

+ 55 - 16
src/views/draw/children/health/healthDrank.vue

@@ -6,6 +6,7 @@ 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";
+import barDimEcharts from "@/components/echarts/barDim.vue";
 import rankTable from "@/components/rankTable/draw.vue";
 import personList from "@/components/personList/index.vue";
 import qvanping from "@/assets/rank/qvanping@2x.png";
@@ -26,6 +27,11 @@ const barDimEchartsRef = ref();
 const seachParams = ref();
 // 排行榜
 const showLength = ref(0);
+const rankTableRefList = reactive({
+  data: [],
+  dept: "",
+  name: ""
+});
 const chartList = ref([]);
 const getChartsListApi = async () => {
   const { code, data } = await getChartsList({
@@ -33,11 +39,14 @@ const getChartsListApi = async () => {
     type: 2
   });
   if (code == 200) {
-    showLength.value = data.length;
+    // showLength.value = data.length;
     setTimeout(() => {
       nextTick(() => {
-        if (rankTableRef.value) {
-          rankTableRef.value.init(data, "医疗组");
+        if (data) {
+          showLength.value = data.length;
+          rankTableRefList.data = data;
+          rankTableRefList.dept = "医疗组";
+          // rankTableRef.value.init(data, "医疗组");
         }
       });
     }, 500);
@@ -54,7 +63,7 @@ const getPersonDimensionChartsListApiDimList = async () => {
   });
   if (code == 200) {
     dataList.dimName = [];
-    if (data.length > 0) {
+    if (data && data.length > 0) {
       data.map(it => {
         it.dimensionList.map(item => {
           dataList.dimName.push({
@@ -63,11 +72,10 @@ const getPersonDimensionChartsListApiDimList = async () => {
           });
         });
       });
-      console.log("data", data);
-      console.log("data", dataList.dimName);
     }
   }
 };
+const radarRefList = ref([]);
 const getPersonDimensionChartsListApi = async (
   dimensionName?: string,
   dimId?: number | string,
@@ -82,7 +90,7 @@ const getPersonDimensionChartsListApi = async (
   });
 
   if (code == 200) {
-    if (data.length > 0) {
+    if (data && data.length > 0) {
       if (dimensionName && dimId) {
         setTimeout(() => {
           nextTick(() => {
@@ -92,7 +100,8 @@ const getPersonDimensionChartsListApi = async (
       } else {
         setTimeout(() => {
           nextTick(() => {
-            radarRef.value.initChart(data);
+            radarRefList.value = data;
+            // radarRef.value.initChart(data);
           });
         }, 500);
         // rankTableRef.value.init(data, "医疗组");
@@ -115,13 +124,20 @@ const getPersonDimensionChartsRankingApi = async (
   });
   if (code == 200) {
     if (data.length > 0) {
-      barEchartsRef.value.init(data);
     }
   }
 };
+const barDimEchartsList = reactive({
+  data: null,
+  type: null
+});
 const init = (item, type) => {
   seachParams.value = item;
   if (Number(type)) {
+    nextTick(() => {
+      barDimEchartsList.data = item;
+      barDimEchartsList.type = 2;
+    });
     getPersonDimensionChartsListApi();
     getPersonDimensionChartsRankingApi();
     getPersonDimensionChartsListApiDimList();
@@ -159,8 +175,7 @@ const fullBig = (item: any) => {
   router.push({
     path: "/fullBig",
     query: {
-      dimensionName: item.name,
-      dimId: item.id,
+      ...item,
       ...seachParams.value,
       type: 2
     }
@@ -174,7 +189,7 @@ const fullBig = (item: any) => {
       <seachData @handClick="init" />
       <div v-if="showLength > 0">
         <div class="flex mr-2">
-          <radar ref="radarRef" />
+          <radar ref="radarRef" :radarRefList="radarRefList" />
         </div>
         <el-tabs
           v-model="activeName"
@@ -184,14 +199,21 @@ const fullBig = (item: any) => {
         >
           <el-tab-pane label="总览" name="1">
             <div class="flex mr-8">
-              <rankTable ref="rankTableRef" />
+              <rankTable
+                ref="rankTableRef"
+                :rankTableRefList="rankTableRefList"
+              />
             </div>
             <!-- 总得分 -->
             <div class="mt-5 pr-8 w-full h-60">
-              <barEcharts ref="barEchartsRef" :title="'总得分'" />
+              <barEcharts
+                ref="barEchartsRef"
+                :title="'总得分'"
+                :barDimEchartsList="barDimEchartsList"
+              />
             </div>
             <!-- 维度得分 -->
-            <div
+            <!-- <div
               v-for="(item, index) in dataList.dimName"
               :key="index"
               class="flex justify-between flex-wrap items-center"
@@ -199,6 +221,18 @@ const fullBig = (item: any) => {
               <div class="mt-5 pr-8 w-1/2 h-60">
                 <barDimEcharts ref="barDimEchartsRef" :title="item.name" />
               </div>
+            </div> -->
+            <div class="flex justify-between flex-wrap items-center">
+              <div v-for="(item, index) in dataList.dimName" :key="index">
+                <div class="mt-5 pr-8 h-60 w-[650px]">
+                  <barDimEcharts
+                    ref="barDimEchartsRef"
+                    :title="item.name"
+                    :barDimEchartsList="barDimEchartsList"
+                    :itemDim="item"
+                  />
+                </div>
+              </div>
             </div>
           </el-tab-pane>
           <el-tab-pane
@@ -219,7 +253,12 @@ const fullBig = (item: any) => {
                 </div>
               </div>
               <div class="w-full h-60 mt-5 pr-8">
-                <barEcharts ref="barEchartsRef" :title="item.name" />
+                <barEcharts
+                  ref="barEchartsRef"
+                  :title="item.name"
+                  :barDimEchartsList="barDimEchartsList"
+                  :itemDim="item"
+                />
               </div>
             </div>
           </el-tab-pane>

+ 5 - 3
src/views/draw/children/worker/componements/seach.vue

@@ -46,7 +46,10 @@ const userPageWhitOrganizationApi = async selectedItem => {
   if (code === 200) {
     dataList.personList = data;
     data.map(item => {
-      if (item.assessmentObjectId.substring(0, 4) == "user") {
+      if (
+        item.assessmentObjectId &&
+        item.assessmentObjectId.substring(0, 4) == "user"
+      ) {
         userCodeList.value.push(item.assessmentObjectId);
       }
     });
@@ -68,7 +71,6 @@ const userPageWhitOrganizationApi = async selectedItem => {
 const userCodeList = ref([]);
 const getDeptListByUserListApi = async () => {
   const { data, code } = await getDeptListByUserList(userCodeList.value);
-  console.log(data, code);
   if (code === 200) {
     const uniqueDeptCodes = {};
     dataList.deptList = data.filter(item => {
@@ -145,7 +147,7 @@ const handClickInit3 = value => {
       ...dataList.params,
       ...init
     },
-    "1"
+    "0"
   );
 };
 const handClickInit4 = value => {

+ 56 - 31
src/views/draw/children/worker/workerDrak.vue

@@ -2,7 +2,7 @@
 defineOptions({
   name: "workerDrak"
 });
-import { ref, reactive, nextTick, onMounted } from "vue";
+import { ref, reactive, nextTick, onMounted, watch } from "vue";
 import { useRouter } from "vue-router";
 import radar from "@/components/echarts/radar.vue";
 import barEcharts from "@/components/echarts/bar.vue";
@@ -27,7 +27,11 @@ const barDimEchartsRef = ref();
 const seachParams = ref();
 // 排行榜
 const showLength = ref(0);
-const chartList = ref([]);
+const rankTableRefList = reactive({
+  data: [],
+  dept: "",
+  name: ""
+});
 const getChartsListApi = async () => {
   const { code, data } = await getChartsList({
     ...seachParams.value,
@@ -38,10 +42,14 @@ const getChartsListApi = async () => {
       nextTick(() => {
         if (data) {
           showLength.value = data.length;
+          rankTableRefList.data = data;
+          rankTableRefList.dept = "科室";
+          rankTableRefList.name = "姓名";
         }
-        if (rankTableRef.value) {
-          rankTableRef.value.init(data, "科室", "姓名");
-        }
+        // console.log("排行榜", rankTableRef.value);
+        // if (rankTableRef.value) {
+        //   rankTableRef.value.init(data, "科室", "姓名");
+        // }
       });
     }, 500);
   }
@@ -57,7 +65,7 @@ const getPersonDimensionChartsListApiDimList = async () => {
   });
   if (code == 200) {
     dataList.dimName = [];
-    if (data.length > 0) {
+    if (data && data.length > 0) {
       data.map(it => {
         it.dimensionList.map(item => {
           dataList.dimName.push({
@@ -66,11 +74,10 @@ const getPersonDimensionChartsListApiDimList = async () => {
           });
         });
       });
-      console.log("data", data);
-      console.log("data", dataList.dimName);
     }
   }
 };
+const radarRefList = ref([]);
 const getPersonDimensionChartsListApi = async (
   dimensionName?: string,
   dimId?: number | string,
@@ -96,9 +103,13 @@ const getPersonDimensionChartsListApi = async (
     } else {
       setTimeout(() => {
         nextTick(() => {
-          radarRef.value.initChart(data);
+          radarRefList.value = data;
+          // 组件加载过慢使用prop加载
+          // if (radarRef.value) {
+          //   radarRef.value.initChart(data);
+          // }
         });
-      }, 500);
+      }, 0);
     }
   }
 };
@@ -122,9 +133,19 @@ const getPersonDimensionChartsRankingApi = async (
     }
   }
 };
+const barDimEchartsList = reactive({
+  data: null,
+  type: null
+});
 const init = (item, type) => {
   seachParams.value = item;
+  barDimEchartsList.data = null;
+  barDimEchartsList.type = null;
   if (Number(type)) {
+    nextTick(() => {
+      barDimEchartsList.data = item;
+      barDimEchartsList.type = 0;
+    });
     getPersonDimensionChartsListApi();
     getPersonDimensionChartsRankingApi();
     getPersonDimensionChartsListApiDimList();
@@ -147,7 +168,6 @@ const init = (item, type) => {
 // 维度表格
 const personListRef = ref();
 const handleClick = (tab: TabsPaneContext, event: Event) => {
-  console.log(tab, event);
   if (tab.props.label == "总览") {
     getPersonDimensionChartsListApi();
     getPersonDimensionChartsRankingApi();
@@ -156,24 +176,12 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
     getPersonDimensionChartsListApi(tab.props.label, tab.props.name, tab.index);
     getPersonDimensionChartsRankingApi(tab.props.label, tab.props.name);
   }
-  // setTimeout(() => {
-  //   nextTick(() => {
-  //     if (barDimEchartsRef.value) {
-  //       if (Array.isArray(barDimEchartsRef.value)) {
-  //         barEchartsRef.value[tabIndex - 1]?.init(tab.props);
-  //       } else {
-  //         barEchartsRef.value?.init(tab.props);
-  //       }
-  //     }
-  //   });
-  // }, 500);
 };
 const fullBig = (item: any) => {
   router.push({
     path: "/fullBig",
     query: {
-      dimensionName: item.name,
-      dimId: item.id,
+      ...item,
       ...seachParams.value,
       type: 0
     }
@@ -187,7 +195,7 @@ const fullBig = (item: any) => {
       <seachData @handClick="init" />
       <div v-if="showLength > 0">
         <div class="flex mr-2">
-          <radar ref="radarRef" />
+          <radar ref="radarRef" :radarRefList="radarRefList" />
         </div>
         <el-tabs
           v-model="activeName"
@@ -197,24 +205,36 @@ const fullBig = (item: any) => {
         >
           <el-tab-pane label="总览" name="1">
             <div class="flex mr-8">
-              <rankTable ref="rankTableRef" />
+              <rankTable
+                ref="rankTableRef"
+                :rankTableRefList="rankTableRefList"
+              />
             </div>
             <!-- 总得分 -->
             <div class="mt-5 pr-8 w-full h-60">
-              <barEcharts ref="barEchartsRef" :title="'总得分'" />
+              <barEcharts
+                ref="barEchartsRef"
+                :title="'总得分'"
+                :barDimEchartsList="barDimEchartsList"
+              />
             </div>
             <!-- 维度得分 -->
             <div class="flex justify-between flex-wrap items-center">
-              <div v-for="(item, index) in dataList.dimName" :key="index">
+              <div v-for="item in dataList.dimName" :key="item.id">
                 <div class="mt-5 pr-8 h-60 w-[600px]">
-                  <barDimEcharts ref="barDimEchartsRef" :title="item.name" />
+                  <barDimEcharts
+                    ref="barDimEchartsRef"
+                    :title="item.name"
+                    :barDimEchartsList="barDimEchartsList"
+                    :itemDim="item"
+                  />
                 </div>
               </div>
             </div>
           </el-tab-pane>
           <el-tab-pane
             v-for="(item, index) in dataList.dimName"
-            :key="index"
+            :key="item.id + index"
             :label="item.name"
             :name="item.id"
             :lazy="true"
@@ -230,7 +250,12 @@ const fullBig = (item: any) => {
                 </div>
               </div>
               <div class="w-full h-60 mt-5 pr-8">
-                <barEcharts ref="barEchartsRef" :title="item.name" />
+                <barEcharts
+                  ref="barEchartsRef"
+                  :title="item.name"
+                  :barDimEchartsList="barDimEchartsList"
+                  :itemDim="item"
+                />
               </div>
             </div>
           </el-tab-pane>

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

@@ -284,8 +284,9 @@ const countComputed = async () => {
           }
           return match; // 如果没有匹配项,返回原始匹配值
         });
-        calculator.calculate(result);
-        grade.value = calculator.get();
+        // calculator.calculate(result);
+        // grade.value = calculator.get();
+        grade.value = eval(result);
       } else {
         ElMessageBox.confirm(
           "如果不修改将无法计算得分",
@@ -342,8 +343,6 @@ const countComputed = async () => {
             }
           });
         }
-        console.log("计算后的数据oldValue", oldValue);
-        console.log("计算后的数据addmanyChange", addmanyChange);
         // let newValue = reverseReplace(formListNum, oldValue);
         const { code, msg, data } =
           await calculateScoreByConditionMoCondition(oldValue);
@@ -857,7 +856,7 @@ const changeAddMay = () => {
                 addmanyChangeOldVal.innerConditionExpression[
                   index
                 ].scoreRuleMoreInnerVO[0].scoreRules[id + 1].comparisonStart =
-                  it?.comparisonEnd;
+                  it?.comparisonEnd == "≥" ? ">" : "≥";
                 // }
               }
             }

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

@@ -73,10 +73,10 @@ const transformArrayFormat = data => {
     .map(item => {
       return item.idList.map((id, index) => {
         return {
-          assessmentObjectId: item.assessmentObjectId[index],
-          assessmentObjectName: item.assessmentObjectName[index],
-          assessmentModelId: item.assessmentModelId,
-          assessmentModelName: item.assessmentModelName
+          assessmentObjectId: item?.assessmentObjectId[index],
+          assessmentObjectName: item?.assessmentObjectName[index],
+          assessmentModelId: item?.assessmentModelId,
+          assessmentModelName: item?.assessmentModelName
         };
       });
     })
@@ -94,6 +94,10 @@ const saveDepartment = async () => {
   if (timeType.value == "日期") {
     form.cycleValue = dayjs(new Date(form.cycleValue)).format("YYYY-MM-DD");
   }
+  form.assessmentObjectList = form.assessmentObjectList.filter(
+    item => item.assessmentObjectId && item.assessmentObjectName
+  );
+  delete form.listArr;
   const { code, msg } = await postAddAssessment(form);
   if (code === 200) {
     ElMessage({
@@ -194,19 +198,19 @@ const monthOne = item => {
   let end = "";
 
   switch (item) {
-    case "一季度":
+    case "一季度":
       start = `${yearTime.value}-01-01`;
       end = `${yearTime.value}-03-31`;
       break;
-    case "二季度":
+    case "二季度":
       start = `${yearTime.value}-04-01`;
       end = `${yearTime.value}-06-30`;
       break;
-    case "三季度":
+    case "三季度":
       start = `${yearTime.value}-07-01`;
       end = `${yearTime.value}-09-30`;
       break;
-    case "四季度":
+    case "四季度":
       start = `${yearTime.value}-10-01`;
       end = `${yearTime.value}-12-31`;
       break;
@@ -219,7 +223,7 @@ const monthOne = item => {
       end = `${yearTime.value}-12-31`;
       break;
   }
-  form.cycleValue = `${yearTime.value}年${item}`;
+  form.cycleValue = `${yearTime.value}年${item}`;
   // return `从 ${start} 到 ${end}`; // 设置时间区间
 };
 // 部门人员与考核模板数据
@@ -252,16 +256,35 @@ const handleRreeSelect = index => {
   const arr = assessmentTypeRef.value[index].getCheckedNodes().filter(item => {
     return item.children.length == 0;
   });
-  form.listArr[index].assessmentObjectId = arr.map(item => {
-    if (item.value.substring(0, 4) == "user") {
+  if (form.assessmentType === 0) {
+    // 更新选中的 idList
+    // form.listArr[index].idList = filteredNodes;
+    // let aa = [];
+    // form.listArr[index].idList.map(item => {
+    //   if (item.substring(0, 4) == "user") {
+    //     aa.push(item);
+    //   }
+    // });
+    // console.log(11111, aa);
+    // form.listArr[index].idList = aa;
+    form.listArr[index].assessmentObjectId = arr.map(item => {
+      if (item.value.substring(0, 4) == "user") {
+        return item.value;
+      }
+    });
+    form.listArr[index].assessmentObjectName = arr.map(item => {
+      if (item.value.substring(0, 4) == "user") {
+        return item.label;
+      }
+    });
+  } else {
+    form.listArr[index].assessmentObjectId = arr.map(item => {
       return item.value;
-    }
-  });
-  form.listArr[index].assessmentObjectName = arr.map(item => {
-    if (item.value.substring(0, 4) == "user") {
+    });
+    form.listArr[index].assessmentObjectName = arr.map(item => {
       return item.label;
-    }
-  });
+    });
+  }
 };
 const handleSelect = index => {
   form.listArr[index].assessmentModelName = form.listArr[index].am.tpName;
@@ -335,6 +358,16 @@ const monthTime = ref("");
 defineExpose({
   open
 });
+const handChangeTree = value => {
+  console.log(1122131, value);
+  // if (Array.isArray(value)) {
+  //   value.forEach(item => {
+  //     if (item.substring(0, 4) != "user") {
+  //       return delete item;
+  //     }
+  //   });
+  // }
+};
 const idList = ref([]);
 </script>
 
@@ -471,6 +504,7 @@ const idList = ref([]);
                       :render-after-expand="false"
                       show-checkbox
                       style="width: 180px"
+                      @change="handChangeTree"
                       @check-change="handleRreeSelect(index)"
                     />
                     <el-tree-select

+ 59 - 22
src/views/evaluate/children/change/mould/manageObject.vue

@@ -438,16 +438,7 @@ const handleCurrentIndexChange = (val: number) => {
 };
 // 指标修改
 const updateAssessmentQuotaDetailsApi = async row => {
-  const { msg, code } = await updateAssessmentQuotaDetails({
-    relationId: row.relationId,
-    id: row.id,
-    dimId: row.dimId,
-    assessmentObjectId: row.assessmentObjectId,
-    assessmentModelId: row.assessmentModelId,
-    score: row.score,
-    finalValue: row.finalValue,
-    assessmentId: messageData.value.id
-  });
+  const { msg, code } = await updateAssessmentQuotaDetails({ ...row });
   if (code === 200) {
     getAssessmentQuotaDetailsApi();
     ElMessage.success("修改成功");
@@ -462,24 +453,58 @@ const editConfig = ref({
   mode: "cell",
   showStatus: true
 });
-const editClosedEvent = ({ row, column }) => {
+const editVxe = reactive({
+  relationId: null,
+  startValue: null,
+  finalValue: null,
+  dataSource: null,
+  score: null,
+  assessmentObjectId: null,
+  assessmentModelId: null,
+  id: null,
+  dimId: null,
+  assessmentId: null
+});
+// 编辑前面
+const editOpenEvent = data => {
+  console.log("editOpenEvent", data);
+};
+const hangdleOpenClick = row => {
+  console.log("hangdleOpenClick", row);
+  editVxe.finalValue = row?.finalValue;
+  editVxe.score = row?.score;
+};
+const editClosedEvent = row => {
+  // { row, column, newValue, oldValue }
   const $table = tableVxeRef.value;
   if ($table) {
-    const updateRecords = $table.getUpdateRecords();
-    if (updateRecords.length > 0) {
-      if (updateRecords[-1]?.score != row?.score) {
-        if (row?.score) {
-          updateAssessmentQuotaDetailsApi(row);
+    editVxe.relationId = row.row?.relationId;
+    editVxe.assessmentModelId = row.row?.assessmentModelId;
+    editVxe.assessmentObjectId = row.row?.assessmentObjectId;
+    editVxe.id = row.row?.id;
+    editVxe.dimId = row.row?.dimId;
+    editVxe.assessmentId = messageData.value.id;
+    if (row.column.title == "得分") {
+      if (row.row?.score) {
+        if (editVxe.score != row.row?.score) {
+          editVxe.score = row.row?.score;
+          editVxe.score = null;
+          updateAssessmentQuotaDetailsApi(editVxe);
         }
       }
-      if (updateRecords[-1]?.finalValue != row?.finalValue) {
-        if (row?.finalValue) {
-          updateAssessmentQuotaDetailsApi(row);
+    }
+    if (row.column.title == "完成值") {
+      if (row.row?.finalValue) {
+        if (editVxe.finalValue != row.row?.finalValue) {
+          editVxe.finalValue = row.row?.finalValue;
+          editVxe.finalValue = null;
+          updateAssessmentQuotaDetailsApi(editVxe);
         }
       }
     }
   }
 };
+
 // 关闭弹窗
 const closePerson = () => {
   Object.assign(addPersonParams, {
@@ -745,7 +770,7 @@ const changTitle = () => {
           />
           <vxe-column
             v-if="state.tableType == 1"
-            field="deptCode"
+            field="deptHospitalCode"
             fixed
             title="部门编号"
             width="200"
@@ -766,14 +791,26 @@ const changTitle = () => {
             title="完成值"
             :edit-render="{ name: 'input' }"
             width="180"
-          />
+          >
+            <template #default="{ row }">
+              <div @click="hangdleOpenClick(row)">
+                {{ row.finalValue }}
+              </div>
+            </template>
+          </vxe-column>
           <vxe-column
             field="score"
             fixed
             title="得分"
             :edit-render="{ name: 'input' }"
             width="180"
-          />
+          >
+            <template #default="{ row }">
+              <div @click="hangdleOpenClick(row)">
+                {{ row.score }}
+              </div>
+            </template>
+          </vxe-column>
           <vxe-column field="updateTime" title="更新时间" sortable width="180">
             <template #default="{ row }">
               {{ dayjs(row.updateTime).format("YYYY-MM-DD HH:mm:ss") }}

+ 20 - 3
src/views/indexDefine/children/define.vue

@@ -53,8 +53,12 @@ const params = reactive({
   total: 0
 });
 // 分页
-const getQuotaPageListApi = async () => {
-  const { code, data } = await getQuotaPageList(params.params);
+const getQuotaPageListApi = async (orderField?: any, orderType?: any) => {
+  const { code, data } = await getQuotaPageList({
+    ...params.params,
+    orderField,
+    orderType
+  });
   console.log("code", data);
   if (code === 200) {
     params.records = data.records;
@@ -178,6 +182,15 @@ const formattedTime = time => {
     return "无效日期";
   }
 };
+const changeSort = ({ column, prop, order }) => {
+  if (order === "ascending") {
+    console.log(11); // 正序
+    getQuotaPageListApi("updateTime", "升序");
+  } else if (order === "descending") {
+    console.log(22); // 反序
+    getQuotaPageListApi("updateTime", "降序");
+  }
+};
 </script>
 
 <template>
@@ -262,7 +275,11 @@ const formattedTime = time => {
         </div>
       </div>
       <div class="mt-8">
-        <el-table :data="params.records" style="z-index: 0; width: 100%">
+        <el-table
+          :data="params.records"
+          style="z-index: 0; width: 100%"
+          @sort-change="changeSort"
+        >
           <el-table-column
             prop="id"
             label="指标编号"