ystl_myq 6 ヶ月 前
コミット
8e98d3db6d

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

@@ -40,7 +40,8 @@ const init = async () => {
     ...params.value
   });
   if (code == 200) {
-    personListRef.value.init(data);
+    console.log("data", data);
+    personListRef.value.init(data, params.value.id);
   }
 };
 defineExpose({

+ 5 - 0
src/components/echarts/radar.vue

@@ -35,6 +35,11 @@ const initChart = async (item?: any) => {
   rankName.value = [];
   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 => {

+ 12 - 7
src/components/personList/index.vue

@@ -48,15 +48,23 @@ import { ref, nextTick, watch } from "vue";
 const tableData = ref([]);
 const showList = ref();
 const watchData = ref();
-const init = (data?: any) => {
+const init = (data?: any, id?: any) => {
   if (data) {
     tableData.value = [];
     watchData.value = data;
     setTimeout(() => {
       nextTick(() => {
-        showList.value = data[0]?.dimensionList[0];
-        tableData.value = data[0]?.dimensionList[0].quotaList;
-        // tableData.value = data;
+        if (id) {
+          data[0]?.dimensionList.map(it => {
+            if (it.dimId == id) {
+              showList.value = it;
+              tableData.value = it.quotaList;
+            }
+          });
+        } else {
+          showList.value = data[0]?.dimensionList[0];
+          tableData.value = data[0]?.dimensionList[0].quotaList;
+        }
       });
     }, 0);
   }
@@ -69,9 +77,6 @@ watch(
   },
   { deep: true }
 );
-// nextTick(() => {
-//   init();
-// });
 defineExpose({
   init
 });

+ 1 - 1
src/components/rankTable/draw.vue

@@ -189,7 +189,7 @@ const mergeCells = ref([
   { row: 2, col: 1, rowspan: 0, colspan: 0 }
 ]);
 const averageData = averageSore => {
-  console.log("平均数", rawData.value);
+  // console.log("平均数", rawData.value);
   if (rawData.value.length > 0) {
     let num = 0;
     // rawData.value.map(it => {

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

@@ -36,7 +36,7 @@ const getChartsListApi = async () => {
   if (code == 200) {
     setTimeout(() => {
       nextTick(() => {
-        if (data) {
+        if (data && data.length > 0) {
           showLength.value = data?.length;
           rankTableRefList.data = data;
           rankTableRefList.dept = "科室";
@@ -220,12 +220,16 @@ 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 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]">
+                <div class="mt-5 pr-8 h-60 w-[600px]">
                   <barDimEcharts
                     ref="barDimEchartsRef"
                     :title="item.name"

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

@@ -135,7 +135,7 @@ const init = (item, type) => {
   seachParams.value = item;
   if (Number(type)) {
     nextTick(() => {
-      radarRefList.value = { ...seachParams.value, type: 0 };
+      radarRefList.value = { ...seachParams.value, type: 2 };
       barDimEchartsList.data = item;
       barDimEchartsList.type = 2;
     });
@@ -226,7 +226,7 @@ const fullBig = (item: any) => {
             </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]">
+                <div class="mt-5 pr-8 h-60 w-[600px]">
                   <barDimEcharts
                     ref="barDimEchartsRef"
                     :title="item.name"