From 75eaf1c64ab4166138bdb535c9fb87ce25c1e103 Mon Sep 17 00:00:00 2001
From: 赵士淞 <zhaoss@yhzhg.cn>
Date: Thu, 23 Mar 2023 06:49:15 +0000
Subject: [PATCH] 图表

---
 eladmin-web-master/src/views/project/index.vue |   46 ++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/eladmin-web-master/src/views/project/index.vue b/eladmin-web-master/src/views/project/index.vue
index ee2d5c9..9daf30d 100644
--- a/eladmin-web-master/src/views/project/index.vue
+++ b/eladmin-web-master/src/views/project/index.vue
@@ -52,6 +52,28 @@
           </div>
         </el-col>
         <el-col :xs="24" :sm="24" :lg="12">
+          <div class="chart-wrapper" />
+        </el-col>
+      </el-row>
+      <el-row :gutter="32">
+        <el-col :xs="24" :sm="24" :lg="12">
+          <div class="chart-wrapper">
+            <div class="wrapper-div">
+              <div style="height: 32px;">
+                <el-select v-model="sthProjectDistinguish" filterable clearable placeholder="项目区分" style="width: 185px;" @change="sthProjectDistinguishChange">
+                  <el-option
+                    v-for="item in projectDistinguishList"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </div>
+            </div>
+          </div>
+          <subgroup-top-hours :key="sthRandom" :project-distinguish="sthParameterProjectDistinguish" />
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="12">
           <div class="chart-wrapper">
             <div class="wrapper-div">
               <el-select v-model="pwhProjectId" filterable clearable placeholder="目标项目" style="width: 185px;" @change="pwhProjectIdChange">
@@ -80,10 +102,11 @@
 import ProjectWorkingHours from './chart/projectWorkingHours.vue'
 import TypeContractPrice from './chart/typeContractPrice.vue'
 import TypeWorkingHours from './chart/typeWorkingHours.vue'
+import SubgroupTopHours from './chart/subgroupTopHours.vue'
 
 export default {
   name: 'ProjectChart',
-  components: { SubgroupTurnover, SubgroupWorkingHours, ProjectWorkingHours, TypeContractPrice, TypeWorkingHours },
+  components: { SubgroupTurnover, SubgroupWorkingHours, ProjectWorkingHours, TypeContractPrice, TypeWorkingHours, SubgroupTopHours },
   data() {
     return {
       // 项目列表
@@ -110,7 +133,13 @@
       tcpwhRandom: 0,
       // 类型合同额、分组工时:传参
       tcpwhParameterProjectDistinguish: null,
-      tcpwhParameterTargetYear: new Date().getFullYear().toString()
+      tcpwhParameterTargetYear: new Date().getFullYear().toString(),
+      // 分组排名工时:项目区分
+      sthProjectDistinguish: null,
+      // 分组排名工时:随机数
+      sthRandom: 0,
+      // 分组排名工时:传参
+      sthParameterProjectDistinguish: null
     }
   },
   created() {
@@ -144,6 +173,12 @@
         this.tcpwhParameterProjectDistinguish = res[constant.PROJECT_DISTINGUISH][0].value.toString()
         // 类型合同额、分组工时:随机数
         this.tcpwhRandom = Math.random()
+        // 分组排名工时:项目区分
+        this.sthProjectDistinguish = res[constant.PROJECT_DISTINGUISH][0].value
+        // 分组排名工时:传参
+        this.sthParameterProjectDistinguish = res[constant.PROJECT_DISTINGUISH][0].value.toString()
+        // 分组排名工时:随机数
+        this.sthRandom = Math.random()
       })
     },
     // 分组营业额:目标年度变更
@@ -167,6 +202,13 @@
       this.tcpwhParameterTargetYear = this.tcpwhTargetYear.getFullYear().toString()
       // 类型合同额、分组工时:随机数
       this.tcpwhRandom = Math.random()
+    },
+    // 分组排名工时:项目区分变更
+    sthProjectDistinguishChange() {
+      // 分组排名工时:传参
+      this.sthParameterProjectDistinguish = this.sthProjectDistinguish.toString()
+      // 分组排名工时:随机数
+      this.sthRandom = Math.random()
     }
   }
 }

--
Gitblit v1.9.3