Procházet zdrojové kódy

Merge branch 'master' of http://1.190.195.54:3000/ctf/visualization

zzs před 5 měsíci
rodič
revize
48e2c47d5a

+ 27 - 11
heida/src/views/home/index.vue

@@ -13,37 +13,37 @@
         </ul>
       </div>
       <div class="home-left-info" style="height: 41%; margin-top: 5px">
-        <item-title :title="'人材机概况'"></item-title>
+        <item-title :title="'今日人材机概况'"></item-title>
 
         <ul class="home-right-ziyuan__box">
           <li>
-            <div>
-              <span>45</span>
+            <div @click="handleJumpToPersonnel">
+              <span>133<span class="unit_l">人</span></span>
               <span>出勤人数</span>
             </div>
           </li>
 
           <li>
-            <div>
-              <span>17</span>
+            <div @click="handleJumpToMaterial">
+              <span>17<span class="unit_l">项</span></span>
               <span>材料入库</span>
             </div>
           </li>
           <li>
-            <div>
-              <span>7</span>
+            <div @click="handleJumpToMaterial">
+              <span>7<span class="unit_l">项</span></span>
               <span>材料出库</span>
             </div>
           </li>
           <li>
-            <div>
-              <span>24</span>
+            <div @click="handleJumpToQuality">
+              <span>24<span class="unit_l">条</span></span>
               <span>质量记录</span>
             </div>
           </li>
           <li>
-            <div>
-              <span>5</span>
+            <div @click="handleJumpToSafety">
+              <span>5<span class="unit_l">条</span></span>
               <span>安全记录</span>
             </div>
           </li>
@@ -194,6 +194,18 @@ export default {
       const wavechart = echarts.init(document.getElementById('wavechart'))
       window.onresize = wavechart.resize //在窗口大小改变时,相应的元素能够适应新的窗口尺寸。
       wavechart.setOption(option)
+    },
+    handleJumpToMaterial() {
+      this.$router.push({path: '/material'})
+    },
+    handleJumpToPersonnel() {
+      this.$router.push({path: '/personnel'})
+    },
+    handleJumpToSafety() {
+      this.$router.push({path: '/security'})
+    },
+    handleJumpToQuality() {
+      this.$router.push({path: '/quality'})
     }
   },
 
@@ -326,6 +338,10 @@ export default {
     }
   }
 
+  .unit_l {
+    font-size: 0.4rem !important;
+  }
+
   .home-right {
     height: 100%;
 

+ 121 - 17
heida/src/views/personnel/index.vue

@@ -10,7 +10,7 @@
       </div>
 
       <div class="block">
-        <item-title title="月用工统计"></item-title>
+        <item-title title="月用工平均值"></item-title>
         <div class="box" ref="chart1"></div>
       </div>
     </div>
@@ -212,8 +212,8 @@ export default {
       const tempObj = {}
       const hData = this.huamingce_config.data
 
-      for (let i = 4; i > 0; i--) {
-        this.yonggongjihua_config.header.push(dayjs().subtract(i, 'day').format('MM-DD'))
+      for (let i = 1; i < 5; i++) {
+        this.yonggongjihua_config.header.push(dayjs().add(i, 'day').format('MM-DD'))
       }
       dayjs().format('YYYY-MM-DD');
       for (const item of hData) {
@@ -227,6 +227,7 @@ export default {
       }
       var data = []
       var data1 = []
+      console.log('tempObj',tempObj)
       for (const key of Object.keys(tempObj)) {
         data.push([key, tempObj[key], '-'])
         var max = tempObj[key]
@@ -237,8 +238,108 @@ export default {
         data1.push([key, RandomNumBoth(min, max), RandomNumBoth(min, max), RandomNumBoth(min, max), RandomNumBoth(min, max)])
       }
       this.renshu_config.data = data
+      console.log('data1',data1)
 
-      this.yonggongjihua_config.data = data1
+      this.yonggongjihua_config.data = [
+    [
+        "防水",
+        8,
+        9,
+        2,
+        1
+    ],
+    [
+        "喷漆",
+        2,
+        1,
+        2,
+        2
+    ],
+    [
+        "外墙",
+        20,
+        23,
+        9,
+        19
+    ],
+    [
+        "架子工",
+        26,
+        16,
+        24,
+        21
+    ],
+    [
+        "高空车",
+        2,
+        1,
+        1,
+        2
+    ],
+    [
+        "力工",
+        19,
+        15,
+        12,
+        11
+    ],
+    [
+        "苯板",
+        30,
+        36,
+        33,
+        32
+    ],
+    [
+        "外网",
+        14,
+        1,
+        7,
+        15
+    ],
+    [
+        "楼道清理",
+        2,
+        2,
+        2,
+        1
+    ],
+    [
+        "屋面防水",
+        3,
+        1,
+        2,
+        2
+    ],
+    [
+        "油工",
+        2,
+        2,
+        5,
+        5
+    ],
+    [
+        "保温",
+        2,
+        3,
+        3,
+        5
+    ],
+    [
+        "举臂车",
+        1,
+        1,
+        1,
+        1
+    ],
+    [
+        "空调",
+        2,
+        2,
+        1,
+        1
+    ]
+]
     },
     initChart() {
       const option = {
@@ -263,7 +364,7 @@ export default {
         },
         series: [
           {
-            data: [45, 48],
+            data: [120, 176],
             type: 'bar'
           }
         ]
@@ -274,26 +375,29 @@ export default {
 
       var riqi = []
       var data2 = []
-      for (var i = 10; i >= 0; i--) {
+      for (var i = 6; i >= 0; i--) {
         var r = dayjs().subtract(i, 'day')
         var rStr = r.format('MM-DD')
         riqi.push(rStr)
         var d = r.format('D')
         console.log('d', d)
-        if (d == 5 || d == 30) {
-          data2.push(22)
+        if (d == 16) {
+          data2.push(133)
+        } else if (d == 15) {
+          data2.push(161)
+        } else if (d == 14) {
+          data2.push(197)
+        } else if (d == 13) {
+          data2.push(203)
         } else if (d == 12) {
-          data2.push(40)
-        } else {
-          if (d % 10 > 8) {
-            data2.push(48)
-          } else if (d % 10 > 5) {
-            data2.push(43)
-          } else {
-            data2.push(43)
-          }
+          data2.push(184)
+        } else if (d == 11) {
+          data2.push(190)
+        } else if (d == 10) {
+          data2.push(168)
         }
       }
+      console.log('data2',data2)
       const option2 = {
         xAxis: {
           type: 'category',

+ 1 - 1
heida/src/views/schedule/index.vue

@@ -183,7 +183,7 @@ export default {
     }
     gantt.config.columns = [
       { name: 'id', label: '编号', align: 'center', width: 25 },
-      { name: 'text', label: '工作名称', width: 150 },
+      { name: 'text', label: '工作名称', width: 500 },
       { name: 'duration', label: '持续时间', align: 'center', width: 48 },
       { name: 'start_date', label: '开始时间', align: 'center', width: 80 },
       {