From 523d7a54fb07fdf756fbc4faa5eb7fef7263a556 Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期四, 07 九月 2023 09:46:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/chart/work/index.vue |   59 +++++++++++++++++++++++++++++++----------------------------
 1 files changed, 31 insertions(+), 28 deletions(-)

diff --git a/src/views/chart/work/index.vue b/src/views/chart/work/index.vue
index 46e1da2..de2af9f 100644
--- a/src/views/chart/work/index.vue
+++ b/src/views/chart/work/index.vue
@@ -6,9 +6,9 @@
                 <el-card>
                   <el-form :rules="rules" ref="formInline" :inline="true"
                   :model="formInline" class="demo-form-inline">
-                    <el-form-item prop="date">
-                      <p><span>*</span>妫�娴嬫棩鏈�:</p>
+                    <el-form-item prop="date" label="妫�娴嬫棩鏈�:">
                       <el-date-picker
+                        size="small"
                         v-model="formInline.date"
                         format="yyyy-MM-dd"
                         value-format="yyyy-MM-dd"
@@ -18,17 +18,16 @@
                         end-placeholder="缁撴潫鏃ユ湡">
                       </el-date-picker>
                     </el-form-item>
-                    <el-form-item prop="type">
-                      <p><span>*</span>妫�楠岀被鍨�:</p>
-                      <el-select v-model="formInline.type" placeholder="閲囪喘鍏ュ簱">
+                    <el-form-item prop="type" label="妫�楠岀被鍨�:">
+                      <el-select size="small" v-model="formInline.type" placeholder="閲囪喘鍏ュ簱">
                         <el-option label="鍘熸潗鏂�" value="0"></el-option>
                         <el-option label="鎴愬搧" value="1"></el-option>
                         <el-option label="濮旀墭鍝�" value="2"></el-option>
                       </el-select>
                     </el-form-item>
                     <el-form-item class="buttons">
-                      <el-button @click="resetForm('formInline')">娓呯┖</el-button>
-                      <el-button type="primary" @click="onSubmit('formInline')">鏌ヨ</el-button>
+                      <el-button size="small" @click="resetForm('formInline')">娓呯┖</el-button>
+                      <el-button size="small" type="primary" @click="onSubmit('formInline')">鏌ヨ</el-button>
                     </el-form-item>
                   </el-form>
                 </el-card>
@@ -64,7 +63,7 @@
         </el-row>
       </div>
       <div class="work-foot">
-        <el-button type="primary">鏁版嵁瀵煎嚭</el-button>
+        <el-button size="small" type="primary">鏁版嵁瀵煎嚭</el-button>
       </div>
   </div>
 </template>
@@ -90,23 +89,34 @@
         },
       }
     },
-    mounted(){},
+    mounted(){
+      this.queryData();
+    },
     methods: {
       async queryData(){
-        let date = this.formInline.date;
+        let date = [];
+        let type;
+        if(this.formInline.date == null || this.formInline.date == ""){
+          let currentDate = new Date();
+          let year = currentDate.getFullYear();
+          let month = currentDate.getMonth() + 1;
+          let day = currentDate.getDate();
+          date.push(year +"-" + month + "-01");
+          date.push(year +"-" + month + "-" + day);
+          type = 0;
+        }else{
+          date = this.formInline.date;
+          type = this.formInline.type;
+        }
         let obj = {
           startTime : date[0],
           endTime : date[1],
-          type : this.formInline.type
+          type : type
         }
         const dutyMater = await getDutyMater(obj);
         const dutyTimely = await getDutyTimely(obj);
         const executeMater = await getExecuteMater(obj);
         const executeTimely = await getExecuteTimely(obj);
-        console.log("dm",dutyMater.data);
-        console.log("dt",dutyTimely.data);
-        console.log("em",executeMater.data.length);
-        console.log("et",executeTimely.data);
         this.initLeaderStatiChart("leaderStati",dutyMater.data);
         this.initLeaderTimelyChart("leaderTimely",dutyTimely.data);
         this.initTesterStatiChart("testerStati",executeMater.data);
@@ -315,6 +325,9 @@
               axisPointer: {
                 type: 'shadow'
               },
+              nameTextStyle:{
+                padding:20
+              }
             }
           ],
           yAxis: [
@@ -363,7 +376,7 @@
                   return value + ' %';
                 }
               },
-              data: [{value:20},{value:40}],
+              data: data2,
               itemStyle: {
                 color: '#d2eec5'
               }
@@ -487,24 +500,14 @@
       z-index: 10;
       .demo-form-inline{
         margin: 0px 10px;
-        p{
-          margin: 0;
-          font-size: 16px;
-          font-weight: bold;
-          span{
-            font-size: 16px;
-            font-weight: bold;
-            color: red;
-          }
-        }
         .buttons{
-          margin: 40px 0px 0px 50%;
+          margin-left: 10%;
         }
       }
     }
     .work-center{
       margin: 0px 0px 150px 10px;
-      padding: 18vh 0px 5px 0px;
+      padding: 13vh 0px 5px 0px;
       .el-card{
         margin: 5px 0px;
         height:500px;

--
Gitblit v1.9.3