Browse Source

总看板修改提交

callm 1 year ago
parent
commit
30d18ecbf8

+ 7 - 8
src/components/totalchart/bottom/bottomLeft2Chart/chart.vue

@@ -54,7 +54,6 @@ export default {
               formatter: '{value}%'
             }
           }
-
         ],
         series: [
           /*  {
@@ -143,7 +142,7 @@ export default {
     refreshdata() {
       setInterval(() => {
         this.getdata(); //获取-数据
-      }, 10000);
+      }, 30000);
     },
     async getdata() {
       //20220211 -+formatDate(new Date()
@@ -152,7 +151,7 @@ export default {
       this.options.series[1].data =[];
       this.options.series[2].data = [];
 
-      await this.$http.get("kanban/datalist.action?caller=WCDAYTURNOUT&_noc=1&page=1&pageSize=100&condition=1=1")
+      await this.$http.get("kanban/datalist.action?caller=LINEGETRATE!TOTAL&_noc=1&page=1&pageSize=100&condition=1=1")
           .then((result)=>{
                 let dataList = JSON.parse(result.data.data);
                 let xAxis0 = new Array();
@@ -162,18 +161,18 @@ export default {
                 for (let index = 0; index < dataList.length; index++) {
                   const element = dataList[index];
                   if(index%2 == 0) {
-                    xAxis0.push(element.sp_wccode);
+                    xAxis0.push(element.v_licode);
                   }else{
-                    xAxis0.push('\n'+element.sp_wccode);
+                    xAxis0.push('\n'+element.v_licode);
                   }
                   //投入
                   // series0.push(element.v_inqty);
                   //产出
-                  series0.push(element.v_outqty);
+                  series0.push(element.outqty);
                   //不良
-                  series1.push(element.v_ngqty);
+                  series1.push(element.remain);
                   //良率
-                  series2.push(element.v_okrate);
+                  series2.push(element.getrate);
                 }
                 this.options.xAxis[0].data = xAxis0;
                 this.options.series[0].data = series0;

+ 8 - 1
src/components/totalchart/bottom/bottomRightChart/chart.vue

@@ -136,7 +136,8 @@ export default {
             center: ['80%', '15%'],
             radius: '20%',
             name: {
-              color: '#fff'
+              color: '#fff',
+              fontSize:16
             },
             splitNumber: 8,
             axisLine: {
@@ -223,6 +224,7 @@ export default {
             splitLine: {
               show: true,
               lineStyle: {
+                fontSize: 16,
                 color: '#fff',
                 opacity: 0.1
               }
@@ -311,6 +313,11 @@ export default {
                 }
               },
               data: newData.weekLineData,
+              label:{
+                show: true,
+                position: 'top',
+                fontSize:14,
+              },
               lineSmooth: true,
               markLine: {
                 silent: true,

+ 1 - 4
src/components/totalchart/bottom/bottomRightChart/index.vue

@@ -60,10 +60,7 @@ export default {
               +(dateBase.getDate() < 10 ? "0" + (dateBase.getDate()) : dateBase.getDate());
 
       //良率直通图
-      var caller1 = 'DAYTURNOUT';
-      if (sessionStorage.getItem('li_code') == '所有'){
-        caller1 = 'DAYTURNOUT!ALL';
-      }
+      var caller1 = 'DAYTURNOUT!TOTAL';
       await this.$http.get("kanban/datalist.action?caller="+caller1+"&_noc=1&page=1&pageSize=100",{
         params: {
           condition: "1=1",

+ 5 - 5
src/components/totalchart/bottom/bottomRightNgChart/chart.vue

@@ -79,12 +79,12 @@ export default {
     refreshdata() {
       setInterval(() => {
         this.getdata(); //获取-数据
-      }, 10000);
+      }, 30000);
     },
     async getdata() {
       this.options.xAxis[0].data=[];
       this.options.series[0].data=[];
-      await this.$http.get("kanban/datalist.action?caller=LINENGRATE&_noc=1&page=1&pageSize=100&condition=1=1")
+      await this.$http.get("kanban/datalist.action?caller=LINENGRATE!TOTAL&_noc=1&page=1&pageSize=100&condition=1=1")
           .then((result)=>{
                 let dataList = JSON.parse(result.data.data);
                 let xAxis0 = new Array();
@@ -92,12 +92,12 @@ export default {
                 for (let index = 0; index < dataList.length; index++) {
                   const element = dataList[index];
                   if(index%2 == 0) {
-                    xAxis0.push(element.linecode);
+                    xAxis0.push(element.v_licode);
                   }else{
-                    xAxis0.push('\n'+element.linecode);
+                    xAxis0.push('\n'+element.v_licode);
                   }
                   //不良率
-                  series0.push(element.value);
+                  series0.push(element.ngqty);
                 }
                 this.options.xAxis[0].data = xAxis0;
                 this.options.series[0].data = series0;

+ 85 - 93
src/components/totalchart/centerLeft/centerLeft1ALLChart/chart.vue

@@ -4,8 +4,8 @@
     <Echart
       :options="options"
       id="centerLeft1ALLChart"
-      height="350px"
-      width="500px"
+      height="400px"
+      width="600px"
       ref="column-board"
     ></Echart>
   </div>
@@ -15,9 +15,8 @@
 import Echart from '@/common/echart'
 //import { formatDate } from '../../../../utils/index.js'
 export default {
-    data () {
+  data () {
     return {
-      timing :null,
       options:{
         tooltip: {
           trigger: 'axis',
@@ -25,92 +24,87 @@ export default {
             type: 'shadow'
           }
         },
-        legend: {
-          textStyle: {
-            fontSize: 18
-          },
-          itemWidth: 29,
-          itemHeight: 19
-        },
+        legend: {},
         grid: {
-          left: '0%',
-          right: '0%',
+          left: '3%',
+          right: '4%',
           bottom: '3%',
           containLabel: true
         },
         xAxis: [
           {
             type: 'category',
+            data:[],
             axisLabel: {
-              show: false,
-              fontSize: 16,
-              fontWeight: "bold"
+              fontSize: 13
             }
           }
         ],
         yAxis: [
           {
             type: 'value',
+          },
+          {
+            type: 'value',
+            name: 'rate',
+            min: 0,
+            max: 100,
+            interval: 20,
             axisLabel: {
-              fontSize: 16
+              formatter: '{value}%'
             }
-          },
-
+          }
         ],
         series: [
           {
-            name: '计划数',
+            name: '车间产出',
             type: 'bar',
-            barWidth: 70,
-            emphasis: {
-              focus: 'series'
-            },
-            data:[],
-            label: {
-              show: true,
-              position: 'top',
-              fontSize:14,
-              fontWeight: "bold"
-            },
-          },
-          {
-            name: '投入数',
-            type: 'bar',
-            barWidth: 70,
+            barWidth: 30,
+            stack: 'Ad',
             emphasis: {
               focus: 'series'
             },
             data:[],
-            label: {
-              show: true,
-              position: 'top',
-              color:'#fff'
+            itemStyle: {
+              color: '#40BF7F'  //fac858
             },
+            //data: [220, 232, 221, 234, 290, 230, 220]
           },
           {
-            name: '产出数',
+            name: '计划剩余',
             type: 'bar',
             stack: 'Ad',
-            barWidth: 70,
+            barWidth: 15,
             data:[],
+            //data: [12, 22, 32, 12, 32, 12, 32],
             emphasis: {
               focus: 'series'
             },
-            label: {
-              show: true,
-              position: 'top',
-              color:'#fff'
-            }
+            itemStyle: {
+              color: '#DFA22D'  //fac858
+            },
+
           },
           {
-            name: '不良数',
-            type: 'bar',
-            barWidth: 70,
+            name: '计划达成率%',
+            type: 'line',
             data:[],
-            label: {
-              show: true,
-              position: 'top',
-              color:'#fff'
+            yAxisIndex: 1,
+            //data: [92, 92,92, 72, 82, 62, 62],
+            tooltip: {
+              valueFormatter: function (value) {
+                return value + '%';
+              }
+            },
+            itemStyle: {
+              normal: {
+                barBorderRadius: 5,
+                color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                  { offset: 0, color: "rgba(0,161,26,0.8)" },
+                  { offset: 0.2, color: "rgba(0,161,26,0.5)" },
+                  { offset: 1, color: "rgba(0,161,26,0.2)" }
+                ])
+              }
             },
             emphasis: {
               focus: 'series'
@@ -134,52 +128,50 @@ export default {
     this.getdata();
     this.refreshdata();
   },
-  beforeDestroy () {
-    clearInterval(this.timing)
-  },
   methods: {
     refreshdata() {
-      this.timing = setInterval(() => {
+      setInterval(() => {
         this.getdata(); //获取-数据
       }, 30000);
     },
     async getdata() {
       //20220211 -+formatDate(new Date()
-      var caller = 'MAKEQTY';
-      if (sessionStorage.getItem('li_code') == '所有'){
-        caller = 'MAKEQTY!ALL';
-      }
-      await this.$http.get("kanban/datalist.action?caller="+caller+"&_noc=1&page=1&pageSize=100",{
-        params: {
-          condition: "1=1",
-        }
-      }).then((result)=>{
-                        let dataList = JSON.parse(result.data.data);
-                        let series0 = new Array();
-                        let series1 = new Array();
-                        let series2 = new Array();
-                        let series3 = new Array();
-                        let xAxis0 = new Array();
-                        for (let index = 0; index < dataList.length; index++) {
-                          const element = dataList[index];
-                          xAxis0.push(element.inqty);
-                          series0.push(element.planqty);
-                          //投入
-                          series1.push(element.inqty);
-                          //产出
-                          series2.push(element.outqty);
-                          //不良
-                          series3.push(element.ngqty);
-                        }
-                        this.options.xAxis[0].data = xAxis0;
-                        this.options.series[0].data = series0;
-                        this.options.series[1].data = series1;
-                        this.options.series[2].data = series2;
-                        this.options.series[3].data = series3;
-                      },(result)=>{
-                        console.error(result)
-                      }
-              );
+      this.options.xAxis[0].data = [];
+      this.options.series[0].data = [];
+      this.options.series[1].data =[];
+      this.options.series[2].data = [];
+
+      await this.$http.get("kanban/datalist.action?caller=MAKEQTY!TOTAL&_noc=1&page=1&pageSize=100&condition=1=1")
+          .then((result)=>{
+                let dataList = JSON.parse(result.data.data);
+                let xAxis0 = new Array();
+                let series0 = new Array();
+                let series1 = new Array();
+                let series2 = new Array();
+                for (let index = 0; index < dataList.length; index++) {
+                  const element = dataList[index];
+                  if(index%2 == 0) {
+                    xAxis0.push(element.v_wccode);
+                  }else{
+                    xAxis0.push('\n'+element.v_wccode);
+                  }
+                  //投入
+                  // series0.push(element.v_inqty);
+                  //产出
+                  series0.push(element.outqty);
+                  //不良
+                  series1.push(element.remain);
+                  //良率
+                  series2.push(element.rate);
+                }
+                this.options.xAxis[0].data = xAxis0;
+                this.options.series[0].data = series0;
+                this.options.series[1].data = series1;
+                this.options.series[2].data = series2;
+              },(result)=>{
+                console.error(result)
+              }
+          );
     }
   }
 }

+ 12 - 18
src/views/total/center.vue

@@ -38,15 +38,7 @@ export default {
       ranking: {
         data: [],
         carousel: 'single',
-        rowNum:4,
-        valueFormatter ({ name,value }) {
-          console.warn(arguments);
-          if((name == '插件' && value<98) || (name == '组装' && value<99.2) || (name == '老化' && value<99) || (name == '包装' && value<98)) {
-            return '<div style ="color:red">' + value + ' </div>';
-          }else{
-            return '<div style ="color:#18a158">' + value + ' </div>';
-          }
-        }
+        rowNum:6,
       },
       water: {
         data: [],//[24, 66],
@@ -110,18 +102,20 @@ export default {
         }
       }).then((result)=>{
             let dataList = JSON.parse(result.data.data);
-            let resultList = new Array();
+            let datas = new Array();
             for (let index = 0; index < dataList.length; index++) {
+              //插件≥98%(包含误测)、组装≥99.2%、老化≥99%、包装≥98%(包含误测)
               const element = dataList[index];
-              let item = new Array();
-              item.push("<span  class='colorGrass'>"+element.makecode+"</span>");
-              item.push("<span  class='colorGrass'>"+element.stepcode+"</span>");
-              item.push("<span  class='colorGrass'>"+element.value+"</span>");
-              resultList.push(item);
+              /* if(element.value<element.bzvalue){
+
+               }*/
+              datas.push({
+                name:element.v_wccode ,
+                value:element.v_okrate,
+              });
             }
-            const scrollBoard = this.$refs['scroll-board'];
-            //刷新数据
-            scrollBoard.updateRows(resultList);
+            this.ranking.data = datas;
+            this.ranking = { ...this.ranking };
                       },(result)=>{
                         console.error(result)
                       }

+ 1 - 1
src/views/total/centerLeft1ALL.vue

@@ -5,7 +5,7 @@
         <span>
           <icon name="chart-bar" class="text-icon"></icon>
         </span>
-        <span class="fs-xl text mx-2 mb-1 pl-3">工单完成情况统计</span>
+        <span class="fs-xl text mx-2 mb-1 pl-3">各车间工单完成情况统计</span>
       </div>
       <div class="d-flex jc-center columnperent">
          <CenterLeft1ALLChart/>

+ 1 - 4
src/views/total/centerLeft_two.vue

@@ -88,10 +88,7 @@ export default {
       }, 30000);
     },
     async settestdata(){
-      var caller = 'MAKEQTY';
-      if (sessionStorage.getItem('li_code') == '所有'){
-        caller = 'MAKEQTY!ALL';
-      }
+      var caller = 'MAKEQTY!TOTAL';
       //完成工单数统计
       await this.$http.get("kanban/datalist.action?caller="+caller+"&_noc=1&page=1&pageSize=100",{
         params: {

+ 5 - 8
src/views/total/centerRight1.vue

@@ -29,7 +29,7 @@ export default {
         headerBGC: '#0f1325', //表头
         oddRowBGC: '#0f1325', //奇数行
         evenRowBGC: '#171c33', //偶数行
-        columnWidth: [100,100,100,80,90,100,90],
+        columnWidth: [200,150,150,100,120,140,90],
         align: ['center']
       },
       timing : null,
@@ -59,10 +59,7 @@ export default {
       }, 30000);
     },
     async getdata() {
-      var caller = 'DPLANTOUTPUT';
-      if (sessionStorage.getItem('li_code') == '所有'){
-        caller = 'DPLANTOUTPUT!ALL';
-      }
+      var caller = 'DPLANTOUTPUT!Total';
     //  const {data} = await this.$http.get("kanban/panelView/parseData/2B247DC439B3?index=0&kanbanCode=2B23AC00BCFB");
       await this.$http.get("kanban/datalist.action?caller="+caller+"&_noc=1&page=1&pageSize=100",{
         params: {
@@ -97,7 +94,7 @@ export default {
 
 <style lang="scss" scoped>
 $box-height: 500px;
-$box-width: 940px;
+$box-width: 100%;
 #centerRight1 {
   padding: 16px;
   padding-top: 20px;
@@ -116,8 +113,8 @@ $box-width: 940px;
     border-radius: 10px;
     overflow: hidden;
     .dv-scr-board {
-      width: 600px;
-      height: 340px;
+      width: 900px;
+      height: 450px;
     }
   }
 }

+ 2 - 2
src/views/total/index.vue

@@ -97,10 +97,10 @@
           <!-- 第四行数据 -->
           <div class="bottom-box">
             <dv-border-box-12>
-              <bottomLeft2 />
+              <center-right1 />
             </dv-border-box-12>
             <dv-border-box-12>
-              <center-right1 />
+              <bottomLeft2 />
             </dv-border-box-12>
           </div>
         </div>