Prechádzať zdrojové kódy

fix: 专题画像显示bug

ystl_myq 6 mesiacov pred
rodič
commit
ff6938e6e4

+ 1 - 1
.vscode/settings.json

@@ -7,7 +7,7 @@
   "editor.tabSize": 2,
   "editor.formatOnPaste": true,
   "editor.guides.bracketPairs": "active",
-  "files.autoSave": "off",
+  "files.autoSave": "afterDelay",
   "git.confirmSync": false,
   "workbench.startupEditor": "newUntitledFile",
   "editor.suggestSelection": "first",

+ 6 - 0
src/api/assessment.ts

@@ -74,3 +74,9 @@ export const alterFinishValue = params => {
     params
   });
 };
+// 同步自动采集的完成值
+export const automaticCollection = params => {
+  return http.request<addDept>("get", "/assessment/automaticCollection", {
+    params
+  });
+};

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

@@ -22,10 +22,10 @@ const tableData = reactive({
 });
 const handleNodeClick = (data: any, userType: string) => {
   if (userType == "group") {
-    tableData.params.organizationCode = data.groupCode;
+    tableData.params.organizationCode = data?.groupCode;
     tableData.params.organizationType = userType;
   } else {
-    tableData.params.organizationCode = data.deptCode;
+    tableData.params.organizationCode = data?.deptCode;
     tableData.params.organizationType = userType;
   }
   postOrganizationUserPageApi();

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

@@ -58,79 +58,81 @@ const dataList = reactive({
 const init = async (item?: any, type?: any, itemDim?: any) => {
   dataList.title = [];
   dataList.data = [];
-  const { data, code } = await getPersonDimensionChartsRanking({
-    ...item,
-    dimensionName: itemDim?.name,
-    dimId: itemDim?.id,
-    type
-  });
-  let aa = [];
-  let bb = [];
-  if (code === 200) {
-    // dataListInit = data.sort((a, b) => a.ranking - b.ranking);
-    if (data.length > 0) {
-      data.map((it, id) => {
-        // if (id < 10) {
-        // if (dataList.data.length < 10) {
-        dataList.title.push(it.assessmentObjectName);
-        dataList.data.push(it.totalScore);
-        aa.push(it.assessmentObjectName);
-        bb.push(it.totalScore);
-      });
-    }
-  }
-  if (aa.length > 10 || bb.length > 10) {
-    aa.splice(10); // 从索引 10 开始删除所有元素
-    bb.splice(10); // 从索引 10 开始删除所有元素
-  }
-  setOptions({
-    title: {
-      text: `${props.title}Top10`
-    },
-    tooltip: {
-      trigger: "axis",
-      axisPointer: {
-        type: "shadow"
+  if (item) {
+    const { data, code } = await getPersonDimensionChartsRanking({
+      ...item,
+      dimensionName: itemDim?.name,
+      dimId: itemDim?.id,
+      type
+    });
+    let aa = [];
+    let bb = [];
+    if (code === 200) {
+      // dataListInit = data.sort((a, b) => a.ranking - b.ranking);
+      if (data.length > 0) {
+        data.map((it, id) => {
+          // if (id < 10) {
+          // if (dataList.data.length < 10) {
+          dataList.title.push(it.assessmentObjectName);
+          dataList.data.push(it.totalScore);
+          aa.push(it.assessmentObjectName);
+          bb.push(it.totalScore);
+        });
       }
-    },
-    grid: {
-      left: "3%",
-      right: "4%",
-      bottom: "3%",
-      containLabel: true
-    },
-    xAxis: [
-      {
-        type: "category",
-        data: aa,
-        axisTick: {
-          alignWithLabel: true
-        },
-        axisLabel: {
-          interval: 0, // 强制显示所有标签
-          rotate: 0, // 旋转45度
-          formatter: function (value) {
-            // 可以根据需要截取过长的标签,避免布局问题
-            return value.length > 5 ? value.slice(0, 5) + "..." : value;
+    }
+    if (aa.length > 10 || bb.length > 10) {
+      aa.splice(10); // 从索引 10 开始删除所有元素
+      bb.splice(10); // 从索引 10 开始删除所有元素
+    }
+    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: aa,
+          axisTick: {
+            alignWithLabel: true
+          },
+          axisLabel: {
+            interval: 0, // 强制显示所有标签
+            rotate: 0, // 旋转45度
+            formatter: function (value) {
+              // 可以根据需要截取过长的标签,避免布局问题
+              return value.length > 5 ? value.slice(0, 5) + "..." : value;
+            }
           }
         }
-      }
-    ],
-    yAxis: [
-      {
-        type: "value"
-      }
-    ],
-    series: [
-      {
-        name: "得分",
-        type: "bar",
-        // barWidth: "30%",
-        barWidth: props.title == "总得分" ? "30%" : "40%",
-        data: bb
-      }
-    ]
-  });
+      ],
+      yAxis: [
+        {
+          type: "value"
+        }
+      ],
+      series: [
+        {
+          name: "得分",
+          type: "bar",
+          // barWidth: "30%",
+          barWidth: props.title == "总得分" ? "30%" : "40%",
+          data: bb
+        }
+      ]
+    });
+  }
 };
 defineExpose({
   init
@@ -138,5 +140,5 @@ defineExpose({
 </script>
 
 <template>
-  <div ref="chartRef" class="w-full h-full" />
+  <div ref="chartRef" class="w-full min-w-full h-full" />
 </template>

+ 71 - 84
src/components/echarts/barDim.vue

@@ -71,94 +71,81 @@ 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);
-  // }
-  const { data, code } = await getPersonDimensionChartsRanking({
-    ...item,
-    dimensionName: dimList?.name,
-    dimId: dimList?.id,
-    type
-  });
-  if (code === 200) {
-    dataFullBig = data;
-  }
-  if (dataFullBig) {
-    let aa = [];
-    let bb = [];
-    dataFullBig.map((it, id) => {
-      // if (id < 10) {
-      // if (dataList.data.length < 10) {
-      // }
-      // }
-      dataList.title.push(it.assessmentObjectName);
-      dataList.data.push(it.totalScore);
-      aa.push(it.assessmentObjectName);
-      bb.push(it.totalScore);
+  if (item) {
+    const { data, code } = await getPersonDimensionChartsRanking({
+      ...item,
+      dimensionName: dimList?.name,
+      dimId: dimList?.id,
+      type
     });
-    if (aa.length > 10 || bb.length > 10) {
-      aa.splice(10); // 从索引 10 开始删除所有元素
-      bb.splice(10); // 从索引 10 开始删除所有元素
+    if (code === 200) {
+      dataFullBig = data;
     }
-    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: aa,
-          axisTick: {
-            alignWithLabel: true
-          },
-          axisLabel: {
-            interval: 0, // 强制显示所有标签
-            rotate: 0, // 旋转45度
-            formatter: function (value) {
-              // 可以根据需要截取过长的标签,避免布局问题
-              return value.length > 4 ? value.slice(0, 4) + "..." : value;
+    if (dataFullBig) {
+      let aa = [];
+      let bb = [];
+      dataFullBig.map((it, id) => {
+        // if (id < 10) {
+        // if (dataList.data.length < 10) {
+        // }
+        // }
+        dataList.title.push(it.assessmentObjectName);
+        dataList.data.push(it.totalScore);
+        aa.push(it.assessmentObjectName);
+        bb.push(it.totalScore);
+      });
+      if (aa.length > 10 || bb.length > 10) {
+        aa.splice(10); // 从索引 10 开始删除所有元素
+        bb.splice(10); // 从索引 10 开始删除所有元素
+      }
+      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: aa,
+            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: bb
-        }
-      ]
-    });
+        ],
+        yAxis: [
+          {
+            type: "value"
+          }
+        ],
+        series: [
+          {
+            name: "得分",
+            type: "bar",
+            barWidth: props.title == "总得分" ? "30%" : "40%",
+            data: bb
+          }
+        ]
+      });
+    }
   }
 };
 // nextTick(() => {

+ 12 - 10
src/components/echarts/radar.vue

@@ -36,10 +36,6 @@ const initChart = async (item?: any) => {
   rankValue.value = [];
   const { data, code } = await getPersonDimensionChartsList({ ...item });
   // console.log("雷达图", data);
-  if (code == 200) {
-    console.log("雷达图", item);
-    console.log("雷达图数据", data);
-  }
   if (data && data.length != 0) {
     data.map(itx => {
       itx.dimensionList.map(it => {
@@ -49,6 +45,12 @@ const initChart = async (item?: any) => {
         rankValue.value.push(it.soreRate);
       });
     });
+    console.log("rankName", rankName.value);
+    rankName.value.forEach(item => {
+      if (item.name.length > 5) {
+        item.name = item.name.slice(0, 5) + "..."; // 截取前5个字符并加上 "..."
+      }
+    });
     setOptions({
       tooltip: {},
       legend: {
@@ -60,8 +62,11 @@ const initChart = async (item?: any) => {
         left: "left"
       },
       radar: {
-        radius: "70%", // 调整半径以使雷达图更大
-        indicator: rankName.value,
+        radius: "65%", // 调整半径以使雷达图更大
+        indicator: rankName.value.map((item, index) => ({
+          name: item.name,
+          max: 1 // 设置每个维度的最大值为 1,确保得分率的满分为 1
+        })),
         axisName: {
           color: "black"
         }
@@ -92,12 +97,9 @@ const initChart = async (item?: any) => {
     });
   }
 };
-// nextTick(() => {
-//   initChart();
-// });
 defineExpose({ initChart });
 </script>
 
 <template>
-  <div ref="chartRef" class="w-72 h-64 m-auto mt-2" />
+  <div ref="chartRef" class="w-80 h-64 m-auto mt-2" />
 </template>

+ 25 - 1
src/components/personList/index.vue

@@ -44,10 +44,34 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, nextTick, watch } from "vue";
+import { ref, nextTick, watch, onMounted } from "vue";
+import { getPersonDimensionChartsList } from "@/api/draw";
 const tableData = ref([]);
 const showList = ref();
 const watchData = ref();
+const props = defineProps({
+  paramsIndex: {
+    type: Object
+  }
+});
+const params = ref({});
+const getPersonDimensionChartsApi = async () => {
+  const { code, data } = await getPersonDimensionChartsList(params.value);
+  if (code == 200) {
+    showList.value = data[0]?.dimensionList[0];
+    tableData.value = data[0]?.dimensionList[0]?.quotaList;
+  }
+};
+onMounted(() => {
+  if (props.paramsIndex) {
+    Object.assign(params.value, props.paramsIndex);
+    getPersonDimensionChartsApi();
+  }
+});
+watch(props, newVal => {
+  Object.assign(params.value, newVal.paramsIndex);
+  getPersonDimensionChartsApi();
+});
 const init = (data?: any, id?: any) => {
   if (data) {
     tableData.value = [];

+ 119 - 38
src/components/rankTable/draw.vue

@@ -166,6 +166,7 @@ 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";
+import { useUserStoreHook } from "@/store/modules//user";
 const $prop = defineProps({
   rankTableRefList: Object
 });
@@ -232,6 +233,11 @@ const init = (item, deptNames, names) => {
   if ($route.name != "workerDrak") {
     averageData(item.averageSore);
   }
+  if ($route.name == "healthDrank" || $route.name == "healthRank") {
+    tabTitle.value = "医疗组";
+  } else {
+    tabTitle.value = "科室";
+  }
   // 初始化
   createColumns();
   loadData();
@@ -242,54 +248,127 @@ defineExpose({
 
 // 生成动态表头
 // 生成动态表头
+const tabTitle = ref();
 const createColumns = () => {
-  const columns = [
-    {
-      title: "排名",
-      field: "ranking",
-      width: 70,
-      slots: { default: "imgUrl_default" },
-      fixed: "left" // 将此列固定在左侧
-    },
-    {
-      title: "姓名",
-      field: "assessmentObjectName",
-      width: 100,
-      fixed: "left" // 将此列固定在左侧
-    },
-    {
-      title: "部门",
-      field: "deptName",
-      width: 150,
-      fixed: "left" // 将此列固定在左侧
-    },
-    {
-      title: "总得分",
-      field: "allScore",
-      width: 150,
-      fixed: "right", // 将此列固定在右侧
-      slots: { default: "dim-allScore" }
-    }
-  ];
+  let columns = [];
+  if ($route.name == "workerDrak") {
+    columns = [
+      {
+        title: "排名",
+        field: "ranking",
+        width: 70,
+        slots: { default: "imgUrl_default" },
+        fixed: "left" // 将此列固定在左侧
+      },
+      {
+        title: "姓名",
+        field: "assessmentObjectName",
+        width: 100,
+        fixed: "left" // 将此列固定在左侧
+      },
+      {
+        title: "部门",
+        field: "deptName",
+        width: 150,
+        fixed: "left" // 将此列固定在左侧
+      },
+      {
+        title: "总得分",
+        field: "allScore",
+        sortable: true,
+        width: 150,
+        fixed: "right", // 将此列固定在右侧
+        slots: { default: "dim-allScore" }
+      }
+    ];
+  } else {
+    columns = [
+      {
+        title: "排名",
+        field: "ranking",
+        width: 70,
+        slots: { default: "imgUrl_default" },
+        fixed: "left" // 将此列固定在左侧
+      },
+      {
+        title: tabTitle.value,
+        field: "assessmentObjectName",
+        width: 100,
+        fixed: "left" // 将此列固定在左侧
+      },
+      {
+        title: "总得分",
+        field: "allScore",
+        width: 150,
+        sortable: true,
+        fixed: "right", // 将此列固定在右侧
+        slots: { default: "dim-allScore" }
+      }
+    ];
+  }
 
   const headerMap = new Map();
-
+  console.log("value", rawData.value);
   // 遍历数据生成表头结构
+  // rawData.value.forEach(item => {
+  //   item.dimensionList.forEach(dim => {
+  //     if (!headerMap.has(dim.dimName)) {
+  //       // 存储维度相关信息,包括 totalSore
+  //       console.log("dim", dim);
+  //       headerMap.set(dim.dimName, {
+  //         totalSore: dim.totalSore,
+  //         quotas: [] // 用于存储 quota 列表
+  //       });
+  //     }
+  //     dim.quotaList.forEach(quota => {
+  //       const dimData = headerMap.get(dim.dimName);
+  //       if (!dimData.quotas.some(q => q.quotaName === quota.quotaName)) {
+  //         dimData.quotas.push({ quotaName: quota.quotaName });
+  //       }
+  //     });
+  //   });
+  // });
+
+  // // 构建多级表头
+  // headerMap.forEach((dimData, dimName) => {
+  //   const children = dimData.quotas.map(quota => ({
+  //     title: quota.quotaName,
+  //     width: 120,
+  //     sortable: true,
+  //     field: `${dimName}_${quota.quotaName}` // 确保字段唯一
+  //   }));
+
+  //   // 添加维度名称及其对应的子列
+  //   columns.push({
+  //     title: dimName,
+  //     children
+  //   });
+
+  //   // 添加该维度的总分列
+  //   columns.push({
+  //     title: `总分`, // 可根据需要调整标题
+  //     field: `${dimName}_totalSore`,
+  //     width: 120,
+  //     sortable: true
+  //   });
+  // });
   rawData.value.forEach(item => {
     item.dimensionList.forEach(dim => {
       if (!headerMap.has(dim.dimName)) {
-        // 存储维度相关信息,包括 totalSore
-        console.log("dim", dim);
+        // 存储维度相关信息,包括 totalSore 和 dimWeight
         headerMap.set(dim.dimName, {
-          totalSore: dim.totalSore,
+          dimWeight: dim.dimWeight || "0", // 默认值为 "-"
+          totalSore: dim.totalSore || "0", // 默认值为 "-"
           quotas: [] // 用于存储 quota 列表
         });
       }
       dim.quotaList.forEach(quota => {
         const dimData = headerMap.get(dim.dimName);
         if (!dimData.quotas.some(q => q.quotaName === quota.quotaName)) {
-          console.log("你是那个", quota);
-          dimData.quotas.push({ quotaName: quota.quotaName });
+          dimData.quotas.push({
+            quotaName: quota.quotaName,
+            quotaWeight: quota.quotaWeight || "0" // 默认值为 "-"
+          });
         }
       });
     });
@@ -298,14 +377,15 @@ const createColumns = () => {
   // 构建多级表头
   headerMap.forEach((dimData, dimName) => {
     const children = dimData.quotas.map(quota => ({
-      title: quota.quotaName,
+      title: `${quota.quotaName} (${quota.quotaWeight}%)`, // 在 title 后拼接 quotaWeight
       width: 120,
+      sortable: true,
       field: `${dimName}_${quota.quotaName}` // 确保字段唯一
     }));
 
     // 添加维度名称及其对应的子列
     columns.push({
-      title: dimName,
+      title: `${dimName} (${dimData.dimWeight}%)`, // 在 title 后拼接 dimWeight
       children
     });
 
@@ -313,10 +393,10 @@ const createColumns = () => {
     columns.push({
       title: `总分`, // 可根据需要调整标题
       field: `${dimName}_totalSore`,
-      width: 120
+      width: 120,
+      sortable: true
     });
   });
-
   gridOptions.columns = columns;
 };
 
@@ -352,6 +432,7 @@ const loadData = () => {
   setTimeout(() => {
     gridOptions.data = tableData;
     gridOptions.loading = false;
+    useUserStoreHook().tabload = false;
   }, 500);
 };
 

+ 27 - 9
src/components/rankTable/index.vue

@@ -173,7 +173,7 @@ 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";
@@ -205,6 +205,7 @@ const selectYear = ref("2024-01-01");
 const gridOptions = reactive({
   border: true,
   loading: false,
+  height: 500,
   columns: [],
   data: [],
   showOverflow: true,
@@ -224,7 +225,6 @@ const tabTitle = ref();
 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") {
@@ -271,6 +271,7 @@ const createColumns = () => {
       {
         title: "总得分",
         field: "allScore",
+        sortable: true,
         width: 150,
         fixed: "right", // 将此列固定在右侧
         slots: { default: "dim-allScore" }
@@ -295,6 +296,7 @@ const createColumns = () => {
         title: "总得分",
         field: "allScore",
         width: 150,
+        sortable: true,
         fixed: "right", // 将此列固定在右侧
         slots: { default: "dim-allScore" }
       }
@@ -306,16 +308,20 @@ const createColumns = () => {
   rawData.value.forEach(item => {
     item.dimensionList.forEach(dim => {
       if (!headerMap.has(dim.dimName)) {
-        // 存储维度相关信息,包括 totalSore
+        // 存储维度相关信息,包括 totalSore 和 dimWeight
         headerMap.set(dim.dimName, {
-          totalSore: dim.totalSore,
+          dimWeight: dim.dimWeight || "0", // 默认值为 "-"
+          totalSore: dim.totalSore || "0", // 默认值为 "-"
           quotas: [] // 用于存储 quota 列表
         });
       }
       dim.quotaList.forEach(quota => {
         const dimData = headerMap.get(dim.dimName);
         if (!dimData.quotas.some(q => q.quotaName === quota.quotaName)) {
-          dimData.quotas.push({ quotaName: quota.quotaName });
+          dimData.quotas.push({
+            quotaName: quota.quotaName,
+            quotaWeight: quota.quotaWeight || "0" // 默认值为 "-"
+          });
         }
       });
     });
@@ -324,14 +330,15 @@ const createColumns = () => {
   // 构建多级表头
   headerMap.forEach((dimData, dimName) => {
     const children = dimData.quotas.map(quota => ({
-      title: quota.quotaName,
+      title: `${quota.quotaName} (${quota.quotaWeight}%)`, // 在 title 后拼接 quotaWeight
       width: 120,
+      sortable: true,
       field: `${dimName}_${quota.quotaName}` // 确保字段唯一
     }));
 
     // 添加维度名称及其对应的子列
     columns.push({
-      title: dimName,
+      title: `${dimName} (${dimData.dimWeight}%)`, // 在 title 后拼接 dimWeight
       children
     });
 
@@ -339,10 +346,10 @@ const createColumns = () => {
     columns.push({
       title: `总分`, // 可根据需要调整标题
       field: `${dimName}_totalSore`,
-      width: 120
+      width: 120,
+      sortable: true
     });
   });
-
   gridOptions.columns = columns;
 };
 
@@ -387,6 +394,17 @@ watch(selectYear, () => {
   createColumns();
   loadData();
 });
+const setGridHeight = () => {
+  // 设置表格的高度为设备的高度(例如,减去其他UI元素的高度)
+  const height = window.innerHeight - 200; // 100 为你需要的偏移量(例如页头的高度)
+  gridOptions.height = height;
+};
+onMounted(() => {
+  setGridHeight();
+
+  // 监听窗口大小变化,动态调整表格高度
+  window.addEventListener("resize", setGridHeight);
+});
 </script>
 <style lang="scss" scoped>
 .diamond {

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

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

+ 1 - 2
src/store/modules/user.ts

@@ -9,7 +9,6 @@ import type { UserResult, RefreshTokenResult } from "@/api/user";
 import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
 import { type DataInfo, setToken, removeToken, userKey } from "@/utils/auth";
 
-console.log("111", localStorage.getItem("userName"));
 export const useUserStore = defineStore({
   id: "pure-user",
   state: (): userType => ({
@@ -21,7 +20,7 @@ export const useUserStore = defineStore({
     // 是否勾选了登录页的免登录
     isRemembered: false,
     // 登录页的免登录存储几天,默认7天
-    loginDay: 7
+    loginDay: 0
   }),
   actions: {
     /** 存储用户名 */

+ 10 - 15
src/views/background/framework/proson/prosonDepartment.vue

@@ -15,7 +15,6 @@ import { postListTree, postDelDept } from "@/api/department";
 import { postOrganizationUserPage, getDeleteUserApi } from "@/api/userSetting";
 import UserPageTable from "@/components/UserPageTable/index.vue";
 import { Plus } from "@element-plus/icons-vue";
-
 // 添加部门
 const newDepartmentRef = ref(null);
 const newDepartmentShow = ref(false);
@@ -59,7 +58,6 @@ const postListTreeApi = async () => {
       data[0].id = 1;
     }
     dataTree.value = data;
-    console.log("dataTree", dataTree.value);
     let dataId = { data: "" };
     dataId.data = dataTree.value[0];
     nextTick(() => {
@@ -67,14 +65,15 @@ const postListTreeApi = async () => {
     });
   }
 };
-onMounted(() => {
-  postListTreeApi();
-  setTimeout(() => {
-    nextTick(() => {
-      selectedNodeId.value = dataTree.value[0].id;
-    });
-  }, 500);
-});
+onMounted(() => {});
+postListTreeApi();
+setTimeout(() => {
+  nextTick(() => {
+    selectedNodeId.value = 1;
+    // sessionStorage.setItem("selectedNodeId", dataTree.value[0].id);
+    treeRef.value?.setCurrentKey(selectedNodeId.value);
+  });
+}, 500);
 // 删除人员
 const deletePerson = row => {
   console.log(row);
@@ -191,10 +190,6 @@ const filterNode = (value: string, data: any) => {
 watch(realName, val => {
   treeRef.value!.filter(val);
 });
-// function handleDropdownClick(node) {
-//   // 您的逻辑
-//   console.log(1111,node)
-// }
 </script>
 
 <template>
@@ -378,7 +373,7 @@ watch(realName, val => {
 //   background-color: #ecf2fe !important;
 // }
 .custom-node-class {
-  color: #0052d9;
+  color: #0052d9 !important;
   background-color: #ecf2fe !important;
 }
 

+ 4 - 4
src/views/background/framework/roles/rolePower.vue

@@ -97,10 +97,10 @@ 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;
+    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);
 });

+ 18 - 6
src/views/background/framework/users/index.vue

@@ -33,17 +33,27 @@ const rolesList = reactive({
     pageSize: 20,
     groupName: ""
   },
-  addPerson: {}
+  addPerson: {},
+  perOne: null,
+  perName: null
 });
 const load = () => {
   rolesList.params.pageSize += 10;
   postPageGroupApi();
 };
 // 用户组分页
+
 const postPageGroupApi = async () => {
   const { code, data } = await postPageGroup(rolesList.params);
+  const res = await postPageGroup({
+    pageNumber: 1,
+    pageSize: 20
+  });
+  rolesList.perOne = res.data.records[0].groupCode;
+  rolesList.perName = res.data.records[0].groupName;
   if (code === 200) {
     rolesList.data = [];
+    // console.log(1231231223,res);
     data.records.forEach((item, index) => {
       rolesList.data.push({
         ...item,
@@ -55,8 +65,10 @@ const postPageGroupApi = async () => {
 onMounted(() => {
   postPageGroupApi();
   setTimeout(() => {
-    rolesList.rolesName = rolesList.data[0].groupName;
-    bgColor.value = rolesList.data[0].id;
+    rolesList.rolesName = rolesList.perName;
+    bgColor.value = rolesList.perOne;
+    console.log(999, rolesList.data);
+    console.log(1231231, rolesList.perOne);
     UserTable?.value?.handleNodeClick(rolesList.data[0], "group");
   }, 500);
 });
@@ -64,7 +76,7 @@ onMounted(() => {
 const paramsItem = ref();
 const bgColor = ref(null);
 const lookRoles = item => {
-  bgColor.value = item.id;
+  bgColor.value = item.groupCode;
   rolesList.rolesName = item.groupName;
   Object.assign(rolesList.addPerson, item);
   UserTable?.value?.handleNodeClick(item, "group");
@@ -176,7 +188,7 @@ const addPersonClickList = () => {
         <div>
           <el-input
             v-model="rolesList.params.groupName"
-            placeholder="搜索姓名"
+            placeholder="搜索用户组"
             class="mb-2"
             clearable
             style="max-width: 300px"
@@ -199,7 +211,7 @@ const addPersonClickList = () => {
           <div
             :class="[
               'w-[100%] flex justify-between items-center mt-2 cursor-pointer',
-              { 'roles-bg': bgColor === item.id }
+              { 'roles-bg': bgColor === item.groupCode }
             ]"
           >
             <div

+ 22 - 20
src/views/draw/children/department/componements/seach.vue

@@ -1,5 +1,5 @@
 <script setup>
-import { ref, reactive } from "vue";
+import { ref, reactive, nextTick } from "vue";
 import { getTemplateInfoList } from "@/api/templateInfo";
 import { userPageWhitOrganization } from "@/api/userSetting";
 import { getAssessmentPageList } from "@/api/manage";
@@ -33,9 +33,8 @@ const getTemplateInfoListApi = async selectedItem => {
     dataList.teplist = data;
   }
 };
-// getTemplateInfoListApi();
 // 员工
-const userPageWhitOrganizationApi = async selectedItem => {
+const userPageWhitOrganizationApi = async (selectedItem, type) => {
   const { data, code } = await getUserListObjectByModelId({
     type: 1,
     assessmentId: selectedItem.assessmentId,
@@ -45,7 +44,6 @@ const userPageWhitOrganizationApi = async selectedItem => {
     dataList.personList = data;
   }
 };
-// userPageWhitOrganizationApi();
 
 // 部门
 const postListTreeApi = async selectedItem => {
@@ -91,7 +89,7 @@ const handClickInit2 = value => {
       item => item.assessmentModelId === value
     );
     init.assessmentModelName = selectedItem.assessmentModelName;
-    userPageWhitOrganizationApi(selectedItem);
+    userPageWhitOrganizationApi(selectedItem, 0);
     postListTreeApi(selectedItem);
   }
   Object.assign(dataList.params, {
@@ -129,6 +127,7 @@ const handClickInit3 = value => {
 const route = useRoute();
 const getSearchFrom = () => {
   if (Object.keys(route.query).length > 0) {
+    console.log("路由", route.query);
     const {
       assessmentId,
       assessmentModelId,
@@ -149,26 +148,29 @@ const getSearchFrom = () => {
     initObj.map(item => {
       init[item] = route.query[item];
     });
-    // dataList.params.assessmentId = assessmentId
-    // dataList.params.assessmentModelId = assessmentModelId
-    // dataList.params.assessmentObjectId = assessmentObjectId
-    // init.assessmentName = assessmentName;
-    // init.assessmentModelName = assessmentModelName
-    // init.assessmentObjectName = assessmentObjectName
     const selectedItem = dataList.magList.find(
       item => item.id === assessmentId
     );
     getTemplateInfoListApi(selectedItem);
-    const selectedItems = dataList.teplist.find(
-      item => item.assessmentModelId === dataList.params.assessmentModelId
-    );
-    userPageWhitOrganizationApi(selectedItems);
+
     setTimeout(() => {
-      $emit("handClick", {
-        ...dataList.params,
-        ...init
-      });
-    }, 100);
+      const selectedItems = dataList.teplist.find(
+        item => item.assessmentModelId === assessmentModelId
+      );
+      console.log("selectedItems", selectedItems);
+      userPageWhitOrganizationApi(selectedItems, 1);
+      postListTreeApi(selectedItems, 1);
+      setTimeout(() => {
+        $emit(
+          "handClick",
+          {
+            ...dataList.params,
+            ...init
+          },
+          1
+        );
+      }, 100);
+    }, 300);
   }
 };
 

+ 22 - 3
src/views/draw/children/department/departmentDrank.vue

@@ -88,7 +88,7 @@ const getPersonDimensionChartsListApi = async (
         setTimeout(() => {
           nextTick(() => {
             if (personListRef.value) {
-              personListRef?.value[tabIndex - 1]?.init(data);
+              // personListRef?.value[tabIndex - 1]?.init(data);
             }
           });
         }, 500);
@@ -148,8 +148,10 @@ const init = (item, type) => {
   // }, 500);
 };
 // 维度表格
+const paramsIndex = ref({});
 const personListRef = ref();
 const handleClick = (tab: TabsPaneContext, event: Event) => {
+  loading.value = true;
   if (tab.props.label == "总览") {
     getPersonDimensionChartsListApi();
     getPersonDimensionChartsRankingApi();
@@ -158,6 +160,17 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
     getPersonDimensionChartsListApi(tab.props.label, tab.props.name, tab.index);
     getPersonDimensionChartsRankingApi(tab.props.label, tab.props.name);
   }
+  nextTick(() => {
+    Object.assign(paramsIndex.value, {
+      ...seachParams.value,
+      dimId: tab.props.name,
+      dimensionName: tab.props.label,
+      type: 1
+    });
+  });
+  setTimeout(() => {
+    loading.value = false;
+  }, 1000);
   // barEchartsRef.value.init(tab.props);
 };
 const fullBig = (item: any) => {
@@ -171,6 +184,7 @@ const fullBig = (item: any) => {
     }
   });
 };
+const loading = ref(false);
 </script>
 
 <template>
@@ -183,6 +197,7 @@ const fullBig = (item: any) => {
         </div>
         <el-tabs
           v-model="activeName"
+          v-loading="loading"
           class="demo-tabs"
           :lazy="true"
           @tab-click="handleClick"
@@ -192,7 +207,7 @@ const fullBig = (item: any) => {
               <rankTable ref="rankTableRef" />
             </div>
             <!-- 总得分 -->
-            <div class="mt-5 pr-8 w-full h-60">
+            <div class="mt-5 w-full pr-8 h-60">
               <barEcharts
                 ref="barEchartsRef"
                 :title="'总得分'"
@@ -222,7 +237,11 @@ const fullBig = (item: any) => {
           >
             <div class="w-full">
               <div class="flex justify-between">
-                <personList ref="personListRef" class="w-11/12" />
+                <personList
+                  ref="personListRef"
+                  class="w-11/12"
+                  :paramsIndex="paramsIndex"
+                />
                 <div
                   class="w-[30px] h-[30px] mr-10 cursor-pointer"
                   @click="fullBig(item)"

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

@@ -160,26 +160,27 @@ const getSearchFrom = () => {
     initObj.map(item => {
       init[item] = route.query[item];
     });
-    // dataList.params.assessmentId = assessmentId
-    // dataList.params.assessmentModelId = assessmentModelId
-    // dataList.params.assessmentObjectId = assessmentObjectId
-    // init.assessmentName = assessmentName;
-    // init.assessmentModelName = assessmentModelName
-    // init.assessmentObjectName = assessmentObjectName
     const selectedItem = dataList.magList.find(
       item => item.id === assessmentId
     );
     getTemplateInfoListApi(selectedItem);
-    const selectedItems = dataList.teplist.find(
-      item => item.assessmentModelId === dataList.params.assessmentModelId
-    );
-    userPageWhitOrganizationApi(selectedItems);
     setTimeout(() => {
-      $emit("handClick", {
-        ...dataList.params,
-        ...init
-      });
-    }, 100);
+      const selectedItems = dataList.teplist.find(
+        item => item.assessmentModelId === assessmentModelId
+      );
+      userPageWhitOrganizationApi(selectedItems);
+      getLeaderListApi(selectedItems);
+      setTimeout(() => {
+        $emit(
+          "handClick",
+          {
+            ...dataList.params,
+            ...init
+          },
+          1
+        );
+      }, 100);
+    }, 300);
   }
 };
 

+ 25 - 3
src/views/draw/children/head/headDrank.vue

@@ -61,8 +61,8 @@ const getPersonDimensionChartsListApiDimList = async () => {
     type: 3
   });
   if (code == 200) {
-    dataList.dimName = [];
     if (data && data.length > 0) {
+      dataList.dimName = [];
       data.map(it => {
         it.dimensionList.map(item => {
           dataList.dimName.push({
@@ -93,7 +93,7 @@ const getPersonDimensionChartsListApi = async (
       if (dimensionName && dimId) {
         setTimeout(() => {
           nextTick(() => {
-            personListRef?.value[tabIndex - 1]?.init(data);
+            // personListRef?.value[tabIndex - 1]?.init(data);
           });
         }, 500);
       } else {
@@ -169,12 +169,17 @@ const init = (item, type) => {
   }, 500);
 };
 // 维度表格
+const paramsIndex = ref({});
 const personListRef = ref();
 const handleClick = (tab: TabsPaneContext, event: Event) => {
+  loading.value = true;
   if (tab.props.label == "总览") {
     getPersonDimensionChartsListApi();
     getPersonDimensionChartsRankingApi();
     getChartsListApi();
+    setTimeout(() => {
+      loading.value = false;
+    }, 1000);
   } else {
     getPersonDimensionChartsListApi(tab.props.label, tab.props.name, tab.index);
     getPersonDimensionChartsRankingApi(
@@ -182,7 +187,18 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
       tab.props.name,
       tab.index
     );
+    setTimeout(() => {
+      loading.value = false;
+    }, 1000);
   }
+  nextTick(() => {
+    Object.assign(paramsIndex.value, {
+      ...seachParams.value,
+      dimId: tab.props.name,
+      dimensionName: tab.props.label,
+      type: 3
+    });
+  });
   // barEchartsRef.value.init(tab.props);
 };
 const fullBig = (item: any) => {
@@ -195,6 +211,7 @@ const fullBig = (item: any) => {
     }
   });
 };
+const loading = ref(false);
 </script>
 
 <template>
@@ -207,6 +224,7 @@ const fullBig = (item: any) => {
         </div>
         <el-tabs
           v-model="activeName"
+          v-loading="loading"
           class="demo-tabs"
           :lazy="true"
           @tab-click="handleClick"
@@ -249,7 +267,11 @@ const fullBig = (item: any) => {
           >
             <div class="w-full">
               <div class="flex justify-between">
-                <personList ref="personListRef" class="w-11/12" />
+                <personList
+                  ref="personListRef"
+                  class="w-11/12"
+                  :paramsIndex="paramsIndex"
+                />
                 <div
                   class="w-[30px] h-[30px] mr-10 cursor-pointer"
                   @click="fullBig(item)"

+ 16 - 18
src/views/draw/children/health/componements/seach.vue

@@ -46,7 +46,7 @@ const getTemplateInfoListApi = async selectedItem => {
 // getAssessmentPageListApi();
 // 用户组-用户组-医疗组
 const postPageGroupApi = async selectedItem => {
-  console.log(selectedItem, "传给医疗组的数据");
+  console.log("selectedItem", selectedItem);
   const { data, code } = await getUserListObjectByModelId({
     modelId: selectedItem.assessmentModelId,
     assessmentId: selectedItem.assessmentId,
@@ -54,10 +54,8 @@ const postPageGroupApi = async selectedItem => {
   });
   if (code === 200) {
     dataList.userList = data;
-    console.log(data, "获取的医疗组");
   }
 };
-// postPageGroupApi();
 // -----------------------
 const init = reactive({
   assessmentName: "",
@@ -149,22 +147,22 @@ const getSearchFrom = () => {
       item => item.id === assessmentId
     );
     getTemplateInfoListApi(selectedItem);
-    const selectedItems = dataList.teplist.find(
-      item => item.assessmentModelId === dataList.params.assessmentModelId
-    );
-    console.log(
-      selectedItems,
-      "获取的模板信息",
-      dataList.params.assessmentModelId,
-      dataList.teplist
-    );
-    postPageGroupApi(selectedItems);
     setTimeout(() => {
-      $emit("handClick", {
-        ...dataList.params,
-        ...init
-      });
-    }, 100);
+      const selectedItems = dataList.teplist.find(
+        item => item.assessmentModelId === assessmentModelId
+      );
+      postPageGroupApi(selectedItems);
+      setTimeout(() => {
+        $emit(
+          "handClick",
+          {
+            ...dataList.params,
+            ...init
+          },
+          1
+        );
+      }, 100);
+    }, 300);
   }
 };
 

+ 22 - 2
src/views/draw/children/health/healthDrank.vue

@@ -94,7 +94,7 @@ const getPersonDimensionChartsListApi = async (
       if (dimensionName && dimId) {
         setTimeout(() => {
           nextTick(() => {
-            personListRef?.value[tabIndex - 1]?.init(data);
+            // personListRef?.value[tabIndex - 1]?.init(data);
           });
         }, 500);
       } else {
@@ -161,8 +161,11 @@ const init = (item, type) => {
   }, 500);
 };
 // 维度表格
+const paramsIndex = ref({});
 const personListRef = ref();
 const handleClick = (tab: TabsPaneContext, event: Event) => {
+  loading.value = true;
+
   if (tab.props.label == "总览") {
     getPersonDimensionChartsListApi();
     getPersonDimensionChartsRankingApi();
@@ -171,6 +174,17 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
     getPersonDimensionChartsListApi(tab.props.label, tab.props.name, tab.index);
     getPersonDimensionChartsRankingApi(tab.props.label, tab.props.name);
   }
+  nextTick(() => {
+    Object.assign(paramsIndex.value, {
+      ...seachParams.value,
+      dimId: tab.props.name,
+      dimensionName: tab.props.label,
+      type: 2
+    });
+  });
+  setTimeout(() => {
+    loading.value = false;
+  }, 1000);
   // barEchartsRef.value.init(tab.props);
 };
 const fullBig = (item: any) => {
@@ -183,6 +197,7 @@ const fullBig = (item: any) => {
     }
   });
 };
+const loading = ref(false);
 </script>
 
 <template>
@@ -195,6 +210,7 @@ const fullBig = (item: any) => {
         </div>
         <el-tabs
           v-model="activeName"
+          v-loading="loading"
           class="demo-tabs"
           :lazy="true"
           @tab-click="handleClick"
@@ -246,7 +262,11 @@ const fullBig = (item: any) => {
           >
             <div class="w-full">
               <div class="flex justify-between">
-                <personList ref="personListRef" class="w-11/12" />
+                <personList
+                  ref="personListRef"
+                  class="w-11/12"
+                  :paramsIndex="paramsIndex"
+                />
                 <div
                   class="w-[30px] h-[30px] mr-10 cursor-pointer"
                   @click="fullBig(item)"

+ 22 - 11
src/views/draw/children/worker/componements/seach.vue

@@ -37,10 +37,16 @@ const getTemplateInfoListApi = async selectedItem => {
 };
 // getTemplateInfoListApi();
 // 员工
-const userPageWhitOrganizationApi = async selectedItem => {
+const userPageWhitOrganizationApi = async (selectedItem, type) => {
+  let assessmentId;
+  if (type) {
+    assessmentId = selectedItem.id;
+  } else {
+    assessmentId = selectedItem.assessmentId;
+  }
   const { data, code } = await getUserListObjectByModelId({
-    modelId: selectedItem.assessmentModelId,
-    assessmentId: selectedItem.assessmentId,
+    modelId: selectedItem?.assessmentModelId,
+    assessmentId,
     type: 0
   });
   if (code === 200) {
@@ -117,7 +123,7 @@ const handClickInit2 = value => {
       item => item.assessmentModelId === value
     );
     init.assessmentModelName = selectedItem.assessmentModelName;
-    userPageWhitOrganizationApi(selectedItem);
+    userPageWhitOrganizationApi(selectedItem, 0);
     // postListTreeApi(selectedItem);
   }
   Object.assign(dataList.params, {
@@ -166,7 +172,6 @@ const handClickInit4 = value => {
     "1"
   );
 };
-
 const route = useRoute();
 const getSearchFrom = () => {
   if (Object.keys(route.query).length > 0) {
@@ -188,12 +193,16 @@ const getSearchFrom = () => {
       item => item.id === assessmentId
     );
     getTemplateInfoListApi(selectedItem);
-    userPageWhitOrganizationApi(selectedItem);
+    userPageWhitOrganizationApi(selectedItem, 1);
     setTimeout(() => {
-      $emit("handClick", {
-        ...dataList.params,
-        ...init
-      });
+      $emit(
+        "handClick",
+        {
+          ...dataList.params,
+          ...init
+        },
+        1
+      );
     }, 100);
   }
 };
@@ -208,7 +217,9 @@ const getAssessmentPageListApi = async () => {
     getSearchFrom();
   }
 };
-getAssessmentPageListApi();
+if (route.query) {
+  getAssessmentPageListApi();
+}
 </script>
 
 <template>

+ 42 - 21
src/views/draw/children/worker/workerDrak.vue

@@ -104,7 +104,7 @@ const getPersonDimensionChartsListApi = async (
       setTimeout(() => {
         nextTick(() => {
           if (personListRef.value) {
-            personListRef?.value[tabIndex - 1]?.init(data);
+            // personListRef?.value[tabIndex - 1]?.init(data);
           }
         });
       }, 0);
@@ -116,22 +116,22 @@ const getPersonDimensionChartsListApi = async (
 // console.log(res);
 
 // 柱状图
-const getPersonDimensionChartsRankingApi = async (
-  dimensionName?: string,
-  dimId?: number | string
-) => {
-  const { code, data } = await getPersonDimensionChartsRanking({
-    ...seachParams.value,
-    dimId,
-    dimensionName,
-    type: 0
-  });
-  if (code == 200) {
-    if (data && data.length > 0) {
-      // barEchartsRef?.value?.init(data);
-    }
-  }
-};
+// const getPersonDimensionChartsRankingApi = async (
+//   dimensionName?: string,
+//   dimId?: number | string
+// ) => {
+//   const { code, data } = await getPersonDimensionChartsRanking({
+//     ...seachParams.value,
+//     dimId,
+//     dimensionName,
+//     type: 0
+//   });
+//   if (code == 200) {
+//     if (data && data.length > 0) {
+//       // barEchartsRef?.value?.init(data);
+//     }
+//   }
+// };
 const barDimEchartsList = reactive({
   data: null,
   type: null
@@ -147,9 +147,10 @@ const init = (item, type) => {
       barDimEchartsList.type = 0;
     });
     getPersonDimensionChartsListApi();
-    getPersonDimensionChartsRankingApi();
+    // getPersonDimensionChartsRankingApi();
     getPersonDimensionChartsListApiDimList();
     getChartsListApi();
+    // debugger;
     activeName.value = "1";
   }
   setTimeout(() => {
@@ -167,16 +168,29 @@ const init = (item, type) => {
   }, 500);
 };
 // 维度表格
+const paramsIndex = ref({});
 const personListRef = ref();
 const handleClick = (tab: TabsPaneContext, event: Event) => {
+  loading.value = true;
   if (tab.props.label == "总览") {
     getPersonDimensionChartsListApi();
-    getPersonDimensionChartsRankingApi();
+    // getPersonDimensionChartsRankingApi();
     getChartsListApi();
   } else {
     getPersonDimensionChartsListApi(tab.props.label, tab.props.name, tab.index);
-    getPersonDimensionChartsRankingApi(tab.props.label, tab.props.name);
+    // getPersonDimensionChartsRankingApi(tab.props.label, tab.props.name);
+    nextTick(() => {
+      Object.assign(paramsIndex.value, {
+        ...seachParams.value,
+        dimId: tab.props.name,
+        dimensionName: tab.props.label,
+        type: 0
+      });
+    });
   }
+  setTimeout(() => {
+    loading.value = false;
+  }, 1000);
 };
 const fullBig = (item: any) => {
   router.push({
@@ -188,6 +202,8 @@ const fullBig = (item: any) => {
     }
   });
 };
+// 加载loading
+const loading = ref(false);
 </script>
 
 <template>
@@ -200,6 +216,7 @@ const fullBig = (item: any) => {
         </div>
         <el-tabs
           v-model="activeName"
+          v-loading="loading"
           class="demo-tabs"
           :lazy="true"
           @tab-click="handleClick"
@@ -242,7 +259,11 @@ const fullBig = (item: any) => {
           >
             <div class="w-full">
               <div class="flex justify-between">
-                <personList ref="personListRef" class="w-11/12" />
+                <personList
+                  ref="personListRef"
+                  class="w-11/12"
+                  :paramsIndex="paramsIndex"
+                />
                 <div
                   class="w-[30px] h-[30px] mr-10 cursor-pointer"
                   @click="fullBig(item)"

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

@@ -286,7 +286,7 @@ const countComputed = async () => {
         });
         // calculator.calculate(result);
         // grade.value = calculator.get();
-        grade.value = eval(result);
+        grade.value = eval(result).toFixed(2);
       } else {
         ElMessageBox.confirm(
           "如果不修改将无法计算得分",

+ 61 - 4
src/views/evaluate/children/change/mould/manageObject.vue

@@ -10,7 +10,8 @@ import {
   getAssessmentObjectDetails,
   postAddAssessmentObject,
   updateAssessmentQuotaDetails,
-  alterFinishValue
+  alterFinishValue,
+  automaticCollection
 } from "@/api/assessment";
 import { getTemplateInfoList } from "@/api/templateInfo";
 import { useRouter } from "vue-router";
@@ -451,7 +452,13 @@ const tableVxeRef = ref();
 const editConfig = ref({
   trigger: "click",
   mode: "cell",
-  showStatus: true
+  showStatus: true,
+  beforeEditMethod({ row }) {
+    if (row.source == "BI") {
+      return false;
+    }
+    return true;
+  }
 });
 const editVxe = reactive({
   relationId: null,
@@ -563,6 +570,16 @@ const changTitle = () => {
   };
   return obj[$props.message.assessmentType];
 };
+const editDisabledEvent = ({}) => {};
+// 同步数据
+const automaticCollectionApi = async () => {
+  const { code, msg } = await automaticCollection(initParams.indexParams);
+  if (code === 200) {
+    ElMessage.success("同步数据成功");
+  } else {
+    ElMessage.error(msg);
+  }
+};
 </script>
 
 <template>
@@ -724,7 +741,15 @@ const changTitle = () => {
               @change="getAssessmentQuotaDetailsApi"
             />
           </div>
-          <div class="mr-10">
+          <!-- <div class="-mr-">
+            <el-button type="primary" plain @click="automaticCollectionApi"
+              >同步最新数据</el-button
+            >
+          </div> -->
+          <div class="mr-10 flex items-center justify-between">
+            <el-button type="primary" plain @click="automaticCollectionApi"
+              >同步最新数据</el-button
+            >
             <Auth :value="['批量导入指标']">
               <el-button type="primary" plain @click="addsImport"
                 >批量导入</el-button
@@ -741,6 +766,7 @@ const changTitle = () => {
           :data="initParams.Indexlist"
           @edit-closed="editClosedEvent"
           @selection-change="changeSelection"
+          @edit-disabled="editDisabledEvent"
         >
           <vxe-column type="checkbox" width="60" />
           <vxe-column
@@ -803,7 +829,7 @@ const changTitle = () => {
           <vxe-column field="scoreRule" fixed title="评价标准" width="180" />
           <vxe-column field="source" fixed title="数据来源" width="180" />
           <vxe-column field="targetValue" fixed title="目标值" width="180" />
-          <vxe-column
+          <!-- <vxe-column
             field="finalValue"
             fixed
             title="完成值"
@@ -828,6 +854,37 @@ const changTitle = () => {
                 {{ row.score }}
               </div>
             </template>
+          </vxe-column> -->
+          <vxe-column
+            field="finalValue"
+            fixed
+            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 }">