فهرست منبع

DIP看板提交,添加UPH值

callm 2 سال پیش
والد
کامیت
62d93431c0

+ 83 - 64
src/components/assemblyechart/bottom/bottomLeft2Chart/chart.vue

@@ -2,11 +2,11 @@
   <div>
     <!-- 年度开工率 -->
     <Echart
-      :options="options"
-      id="bottomLeft2Chart"
-      height="480px"
-      width="100%"
-      ref="column-board"
+        :options="options"
+        id="bottomLeft2Chart"
+        height="480px"
+        width="100%"
+        ref="column-board"
     ></Echart>
   </div>
 </template>
@@ -17,7 +17,7 @@ import Echart from '@/common/echart'
 export default {
   data () {
     return {
-      timing : null,
+      timing :null,
       options:{
         tooltip: {
           trigger: 'axis',
@@ -75,7 +75,7 @@ export default {
           {
             name: '投入',
             type: 'bar',
-            barWidth: 20,
+            barWidth: 15,
             emphasis: {
               focus: 'series'
             },
@@ -90,7 +90,7 @@ export default {
           {
             name: '产出',
             type: 'bar',
-            barWidth: 20,
+            barWidth: 15,
             stack: 'Ad',
             emphasis: {
               focus: 'series'
@@ -137,16 +137,31 @@ export default {
               normal: {
                 barBorderRadius: 6,
                 color:  "rgba(156,107,211,0.8)"
-               /* color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
-                  { offset: 0, color: "rgba(156,107,211,0.8)" },
-                  { offset: 0.2, color: "rgba(156,107,211,0.5)" },
-                  { offset: 1, color: "rgba(156,107,211,0.2)" }
-                ])*/
+                /* color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                   { offset: 0, color: "rgba(156,107,211,0.8)" },
+                   { offset: 0.2, color: "rgba(156,107,211,0.5)" },
+                   { offset: 1, color: "rgba(156,107,211,0.2)" }
+                 ])*/
               }
             },
             emphasis: {
               focus: 'series'
             }
+          }, {
+            name: 'UPH',
+            type: 'bar',
+            barWidth: 15,
+            data:[],
+            //data: [12, 22, 32, 12, 32, 12, 32],
+            emphasis: {
+              focus: 'series'
+            },
+            label: {
+              show: true,
+              position: 'top',
+              fontSize:14,
+              fontWeight: "bold"
+            }
           }
         ]
       },
@@ -186,57 +201,61 @@ export default {
           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();
-                        let series3 = new Array();
-                        for (let index = 0; index < dataList.length; index++) {
-                          const element = dataList[index];
-                          xAxis0.push(element.sp_wccode);
-                          //投入
-                          series0.push(element.v_inqty);
-                          //产出
-                          series1.push(element.v_outqty);
-                          //不良
-                          series2.push(element.v_ngqty);
-                          //良率
-                          series3.push(element.v_okrate);
-                        }
-                        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;
-                       /*let myChart = this.$children[0].chart;
-                       myChart.setOption({
-                          xAxis: {
-                            data: xAxis0
-                          },
-                          series: [
-                            {
-                              // 根据名字对应到相应的系列
-                              name: '投入',
-                              data: series0
-                            },
-                            {
-                              name: '产出',
-                              data: series2
-                            }, {
-                              name: '不良',
-                              data: series3
-                            },
-                            {
-                              name: '不良率%',
-                              data: series4
-                            },
-                          ]
-                        });*/
-                      },(result)=>{
-                        console.error(result)
-                      }
-              );
+            let dataList = JSON.parse(result.data.data);
+            let xAxis0 = new Array();
+            let series0 = new Array();
+            let series1 = new Array();
+            let series2 = new Array();
+            let series3 = new Array();
+            let series4 = new Array();
+            for (let index = 0; index < dataList.length; index++) {
+              const element = dataList[index];
+              xAxis0.push(element.sp_wccode);
+              //投入
+              series0.push(element.v_inqty);
+              //产出
+              series1.push(element.v_outqty);
+              //不良
+              series2.push(element.v_ngqty);
+              //良率
+              series3.push(element.v_okrate);
+              //UPH
+              series4.push(element.uph);
+            }
+            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;
+            this.options.series[4].data = series4;
+            /*let myChart = this.$children[0].chart;
+            myChart.setOption({
+               xAxis: {
+                 data: xAxis0
+               },
+               series: [
+                 {
+                   // 根据名字对应到相应的系列
+                   name: '投入',
+                   data: series0
+                 },
+                 {
+                   name: '产出',
+                   data: series2
+                 }, {
+                   name: '不良',
+                   data: series3
+                 },
+                 {
+                   name: '不良率%',
+                   data: series4
+                 },
+               ]
+             });*/
+          },(result)=>{
+            console.error(result)
+          }
+      );
     }
   }
 }

+ 87 - 66
src/components/dipechart/bottom/bottomLeft2Chart/chart.vue

@@ -1,14 +1,12 @@
-
-
 <template>
   <div>
     <!-- 年度开工率 -->
     <Echart
-      :options="options"
-      id="bottomLeft2Chart"
-      height="480px"
-      width="100%"
-      ref="column-board"
+        :options="options"
+        id="bottomLeft2Chart"
+        height="480px"
+        width="100%"
+        ref="column-board"
     ></Echart>
   </div>
 </template>
@@ -19,6 +17,7 @@ import Echart from '@/common/echart'
 export default {
   data () {
     return {
+      timing :null,
       options:{
         tooltip: {
           trigger: 'axis',
@@ -76,7 +75,7 @@ export default {
           {
             name: '投入',
             type: 'bar',
-            barWidth: 20,
+            barWidth: 15,
             emphasis: {
               focus: 'series'
             },
@@ -91,7 +90,7 @@ export default {
           {
             name: '产出',
             type: 'bar',
-            barWidth: 20,
+            barWidth: 15,
             stack: 'Ad',
             emphasis: {
               focus: 'series'
@@ -138,16 +137,31 @@ export default {
               normal: {
                 barBorderRadius: 6,
                 color:  "rgba(156,107,211,0.8)"
-               /* color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
-                  { offset: 0, color: "rgba(156,107,211,0.8)" },
-                  { offset: 0.2, color: "rgba(156,107,211,0.5)" },
-                  { offset: 1, color: "rgba(156,107,211,0.2)" }
-                ])*/
+                /* color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                   { offset: 0, color: "rgba(156,107,211,0.8)" },
+                   { offset: 0.2, color: "rgba(156,107,211,0.5)" },
+                   { offset: 1, color: "rgba(156,107,211,0.2)" }
+                 ])*/
               }
             },
             emphasis: {
               focus: 'series'
             }
+          }, {
+            name: 'UPH',
+            type: 'bar',
+            barWidth: 15,
+            data:[],
+            //data: [12, 22, 32, 12, 32, 12, 32],
+            emphasis: {
+              focus: 'series'
+            },
+            label: {
+              show: true,
+              position: 'top',
+              fontSize:14,
+              fontWeight: "bold"
+            }
           }
         ]
       },
@@ -167,9 +181,12 @@ export default {
     this.getdata();
     this.refreshdata();
   },
+  beforeDestroy () {
+    clearInterval(this.timing)
+  },
   methods: {
     refreshdata() {
-      setInterval(() => {
+      this.timing = setInterval(() => {
         this.getdata(); //获取-数据
       }, 30000);
     },
@@ -184,57 +201,61 @@ export default {
           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();
-                        let series3 = new Array();
-                        for (let index = 0; index < dataList.length; index++) {
-                          const element = dataList[index];
-                          xAxis0.push(element.sp_wccode);
-                          //投入
-                          series0.push(element.v_inqty);
-                          //产出
-                          series1.push(element.v_outqty);
-                          //不良
-                          series2.push(element.v_ngqty);
-                          //良率
-                          series3.push(element.v_okrate);
-                        }
-                        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;
-                       /*let myChart = this.$children[0].chart;
-                       myChart.setOption({
-                          xAxis: {
-                            data: xAxis0
-                          },
-                          series: [
-                            {
-                              // 根据名字对应到相应的系列
-                              name: '投入',
-                              data: series0
-                            },
-                            {
-                              name: '产出',
-                              data: series2
-                            }, {
-                              name: '不良',
-                              data: series3
-                            },
-                            {
-                              name: '不良率%',
-                              data: series4
-                            },
-                          ]
-                        });*/
-                      },(result)=>{
-                        console.error(result)
-                      }
-              );
+            let dataList = JSON.parse(result.data.data);
+            let xAxis0 = new Array();
+            let series0 = new Array();
+            let series1 = new Array();
+            let series2 = new Array();
+            let series3 = new Array();
+            let series4 = new Array();
+            for (let index = 0; index < dataList.length; index++) {
+              const element = dataList[index];
+              xAxis0.push(element.sp_wccode);
+              //投入
+              series0.push(element.v_inqty);
+              //产出
+              series1.push(element.v_outqty);
+              //不良
+              series2.push(element.v_ngqty);
+              //良率
+              series3.push(element.v_okrate);
+              //UPH
+              series4.push(element.uph);
+            }
+            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;
+            this.options.series[4].data = series4;
+            /*let myChart = this.$children[0].chart;
+            myChart.setOption({
+               xAxis: {
+                 data: xAxis0
+               },
+               series: [
+                 {
+                   // 根据名字对应到相应的系列
+                   name: '投入',
+                   data: series0
+                 },
+                 {
+                   name: '产出',
+                   data: series2
+                 }, {
+                   name: '不良',
+                   data: series3
+                 },
+                 {
+                   name: '不良率%',
+                   data: series4
+                 },
+               ]
+             });*/
+          },(result)=>{
+            console.error(result)
+          }
+      );
     }
   }
 }

+ 1 - 1
src/components/dipechart/bottom/bottomRightChart/index.vue

@@ -57,7 +57,7 @@ export default {
       this.cdata.year = dateBase.getFullYear();
       this.cdata.nowdate = (dateBase.getMonth() + 1 < 10 ? "0" + (dateBase.getMonth() + 1) : dateBase.getMonth() + 1)
               +"/"
-              +(dateBase.getDate() + 1 < 10 ? "0" + (dateBase.getDate() + 1) : dateBase.getDate() + 1);
+              +(dateBase.getDate()  < 10 ? "0" + (dateBase.getDate()) : dateBase.getDate() );
 
       //良率直通图
       var caller1 = 'DIP!DAYTURNOUT';

+ 105 - 0
src/components/dipechart/centerLeft/centerChartRate/index.vue

@@ -0,0 +1,105 @@
+<template>
+  <div>
+    <!-- 通过率/达标率 -->
+    <Echart
+        :options="options"
+        :id="id"
+        height="100px"
+        width="150px"
+    ></Echart>
+  </div>
+</template>
+
+<script>
+import Echart from '@/common/echart'
+export default {
+  data () {
+    return {
+      options: {},
+    };
+  },
+  components: {
+    Echart,
+  },
+  props: {
+    id: {
+      type: String,
+      required: true,
+      default: "chartRate"
+    },
+    tips: {
+      type: Number,
+      required: true,
+      default: 50
+    },
+    colorObj: {
+      type: Object,
+      default: function () {
+        return {
+          textStyle: "#3fc0fb",
+          series: {
+            color: ["#00bcd44a", "transparent"],
+            dataColor: {
+              normal: "#03a9f4",
+              shadowColor: "#97e2f5"
+            }
+          }
+        };
+      }
+    }
+  },
+  watch: {
+    // tips 是会变更的数据,所以进行监听
+    tips: {
+      handler (newData) {
+        this.options = {
+          title:{
+            text: newData * 1 + "%",
+            x: "center",
+            y: "center",
+            textStyle: {
+              color: this.colorObj.textStyle,
+              fontSize: 15
+            }
+          },
+          series: [
+            {
+              type: "pie",
+              radius: ["95%", "80%"],
+              center: ["50%", "50%"],
+              hoverAnimation: false,
+              color: this.colorObj.series.color,
+              label: {
+                normal: {
+                  show: false
+                }
+              },
+              data: [
+                {
+                  value: newData,
+                  itemStyle: {
+                    normal: {
+                      color: this.colorObj.series.dataColor.normal,
+                      shadowBlur: 10,
+                      shadowColor: this.colorObj.series.dataColor.shadowColor
+                    }
+                  }
+                },
+                {
+                  value: 100 - newData
+                }
+              ],
+              height: '90%',
+            }
+          ]
+        }
+      },
+      immediate: true,
+      deep: true
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 186 - 0
src/components/dipechart/centerLeft/centerLeft1ALLChart/chart.vue

@@ -0,0 +1,186 @@
+<template>
+  <div>
+    <!-- 年度开工率 -->
+    <Echart
+      :options="options"
+      id="centerLeft1ALLChart"
+      height="250px"
+      width="450px"
+      ref="column-board"
+    ></Echart>
+  </div>
+</template>
+
+<script>
+import Echart from '@/common/echart'
+//import { formatDate } from '../../../../utils/index.js'
+export default {
+    data () {
+    return {
+      timing :null,
+      options:{
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow'
+          }
+        },
+        legend: {
+          textStyle: {
+            fontSize: 18
+          },
+          itemWidth: 29,
+          itemHeight: 19
+        },
+        grid: {
+          left: '0%',
+          right: '0%',
+          bottom: '3%',
+          containLabel: true
+        },
+        xAxis: [
+          {
+            type: 'category',
+            axisLabel: {
+              show: false,
+              fontSize: 16,
+              fontWeight: "bold"
+            }
+          }
+        ],
+        yAxis: [
+          {
+            type: 'value',
+            axisLabel: {
+              fontSize: 16
+            }
+          },
+
+        ],
+        series: [
+          {
+            name: '计划数',
+            type: 'bar',
+            barWidth: 70,
+            emphasis: {
+              focus: 'series'
+            },
+            data:[],
+            label: {
+              show: true,
+              position: 'top',
+              fontSize:14,
+              fontWeight: "bold"
+            },
+          },
+          {
+            name: '投入数',
+            type: 'bar',
+            barWidth: 70,
+            emphasis: {
+              focus: 'series'
+            },
+            data:[],
+            label: {
+              show: true,
+              position: 'top',
+              color:'#fff'
+            },
+          },
+          {
+            name: '产出数',
+            type: 'bar',
+            stack: 'Ad',
+            barWidth: 70,
+            data:[],
+            emphasis: {
+              focus: 'series'
+            },
+            label: {
+              show: true,
+              position: 'top',
+              color:'#fff'
+            }
+          },
+          {
+            name: '不良数',
+            type: 'bar',
+            barWidth: 70,
+            data:[],
+            label: {
+              show: true,
+              position: 'top',
+              color:'#fff'
+            },
+            emphasis: {
+              focus: 'series'
+            }
+          }
+        ]
+      },
+    };
+  },
+  components: {
+    Echart, //子组件
+  },
+  props: {
+    cdata: {
+      type: Object,
+      default: () => ({})
+    },
+  },
+
+  mounted() {
+    this.getdata();
+    this.refreshdata();
+  },
+  beforeDestroy () {
+    clearInterval(this.timing)
+  },
+  methods: {
+    refreshdata() {
+      this.timing = setInterval(() => {
+        this.getdata(); //获取-数据
+      }, 30000);
+    },
+    async getdata() {
+      //20220211 -+formatDate(new Date()
+      var caller = 'MAKEQTY';
+      if (sessionStorage.getItem('li_code') == '所有'){
+        caller = 'DIP!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)
+                      }
+              );
+    }
+  }
+}
+</script>

+ 44 - 0
src/components/dipechart/centerLeft/centerLeft1ALLChart/index.vue

@@ -0,0 +1,44 @@
+<template>
+  <div>
+    <Chart :cdata="cdata" />
+  </div>
+</template>
+
+<script>
+import Chart from './chart.vue'
+export default {
+  data () {
+    return {
+      cdata: {
+        rateData:[
+        ]
+      }
+    };
+  },
+  components: {
+    Chart,
+  },
+  mounted () {
+    //this.setData();
+  },
+  beforeDestroy () {
+    clearInterval(this.intervalId);
+    this.chart.dispose()
+    this.chart.clear()
+    this.chart=null
+  },
+  methods: {
+    // 根据自己的业务情况修改
+    setData () {
+      for (let i = 0; i < this.cdata.barData.length -1; i++) {
+        let rate = this.cdata.barData[i] / this.cdata.lineData[i];
+        this.cdata.rateData.push(rate.toFixed(2));
+      }
+      console.log(this)
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 87 - 66
src/components/djechart/bottom/bottomLeft2Chart/chart.vue

@@ -1,14 +1,12 @@
-
-
 <template>
   <div>
     <!-- 年度开工率 -->
     <Echart
-      :options="options"
-      id="bottomLeft2Chart"
-      height="480px"
-      width="100%"
-      ref="column-board"
+        :options="options"
+        id="bottomLeft2Chart"
+        height="480px"
+        width="100%"
+        ref="column-board"
     ></Echart>
   </div>
 </template>
@@ -19,6 +17,7 @@ import Echart from '@/common/echart'
 export default {
   data () {
     return {
+      timing :null,
       options:{
         tooltip: {
           trigger: 'axis',
@@ -76,7 +75,7 @@ export default {
           {
             name: '投入',
             type: 'bar',
-            barWidth: 20,
+            barWidth: 15,
             emphasis: {
               focus: 'series'
             },
@@ -91,7 +90,7 @@ export default {
           {
             name: '产出',
             type: 'bar',
-            barWidth: 20,
+            barWidth: 15,
             stack: 'Ad',
             emphasis: {
               focus: 'series'
@@ -138,16 +137,31 @@ export default {
               normal: {
                 barBorderRadius: 6,
                 color:  "rgba(156,107,211,0.8)"
-               /* color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
-                  { offset: 0, color: "rgba(156,107,211,0.8)" },
-                  { offset: 0.2, color: "rgba(156,107,211,0.5)" },
-                  { offset: 1, color: "rgba(156,107,211,0.2)" }
-                ])*/
+                /* color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                   { offset: 0, color: "rgba(156,107,211,0.8)" },
+                   { offset: 0.2, color: "rgba(156,107,211,0.5)" },
+                   { offset: 1, color: "rgba(156,107,211,0.2)" }
+                 ])*/
               }
             },
             emphasis: {
               focus: 'series'
             }
+          }, {
+            name: 'UPH',
+            type: 'bar',
+            barWidth: 15,
+            data:[],
+            //data: [12, 22, 32, 12, 32, 12, 32],
+            emphasis: {
+              focus: 'series'
+            },
+            label: {
+              show: true,
+              position: 'top',
+              fontSize:14,
+              fontWeight: "bold"
+            }
           }
         ]
       },
@@ -167,9 +181,12 @@ export default {
     this.getdata();
     this.refreshdata();
   },
+  beforeDestroy () {
+    clearInterval(this.timing)
+  },
   methods: {
     refreshdata() {
-      setInterval(() => {
+      this.timing = setInterval(() => {
         this.getdata(); //获取-数据
       }, 30000);
     },
@@ -184,57 +201,61 @@ export default {
           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();
-                        let series3 = new Array();
-                        for (let index = 0; index < dataList.length; index++) {
-                          const element = dataList[index];
-                          xAxis0.push(element.sp_wccode);
-                          //投入
-                          series0.push(element.v_inqty);
-                          //产出
-                          series1.push(element.v_outqty);
-                          //不良
-                          series2.push(element.v_ngqty);
-                          //良率
-                          series3.push(element.v_okrate);
-                        }
-                        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;
-                       /*let myChart = this.$children[0].chart;
-                       myChart.setOption({
-                          xAxis: {
-                            data: xAxis0
-                          },
-                          series: [
-                            {
-                              // 根据名字对应到相应的系列
-                              name: '投入',
-                              data: series0
-                            },
-                            {
-                              name: '产出',
-                              data: series2
-                            }, {
-                              name: '不良',
-                              data: series3
-                            },
-                            {
-                              name: '不良率%',
-                              data: series4
-                            },
-                          ]
-                        });*/
-                      },(result)=>{
-                        console.error(result)
-                      }
-              );
+            let dataList = JSON.parse(result.data.data);
+            let xAxis0 = new Array();
+            let series0 = new Array();
+            let series1 = new Array();
+            let series2 = new Array();
+            let series3 = new Array();
+            let series4 = new Array();
+            for (let index = 0; index < dataList.length; index++) {
+              const element = dataList[index];
+              xAxis0.push(element.sp_wccode);
+              //投入
+              series0.push(element.v_inqty);
+              //产出
+              series1.push(element.v_outqty);
+              //不良
+              series2.push(element.v_ngqty);
+              //良率
+              series3.push(element.v_okrate);
+              //UPH
+              series4.push(element.uph);
+            }
+            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;
+            this.options.series[4].data = series4;
+            /*let myChart = this.$children[0].chart;
+            myChart.setOption({
+               xAxis: {
+                 data: xAxis0
+               },
+               series: [
+                 {
+                   // 根据名字对应到相应的系列
+                   name: '投入',
+                   data: series0
+                 },
+                 {
+                   name: '产出',
+                   data: series2
+                 }, {
+                   name: '不良',
+                   data: series3
+                 },
+                 {
+                   name: '不良率%',
+                   data: series4
+                 },
+               ]
+             });*/
+          },(result)=>{
+            console.error(result)
+          }
+      );
     }
   }
 }

+ 83 - 66
src/components/dplechart/bottom/bottomLeft2Chart/chart.vue

@@ -1,14 +1,12 @@
-
-
 <template>
   <div>
     <!-- 年度开工率 -->
     <Echart
-      :options="options"
-      id="bottomLeft2Chart"
-      height="480px"
-      width="100%"
-      ref="column-board"
+        :options="options"
+        id="bottomLeft2Chart"
+        height="480px"
+        width="100%"
+        ref="column-board"
     ></Echart>
   </div>
 </template>
@@ -19,7 +17,7 @@ import Echart from '@/common/echart'
 export default {
   data () {
     return {
-      timing : null,
+      timing :null,
       options:{
         tooltip: {
           trigger: 'axis',
@@ -77,7 +75,7 @@ export default {
           {
             name: '投入',
             type: 'bar',
-            barWidth: 20,
+            barWidth: 15,
             emphasis: {
               focus: 'series'
             },
@@ -92,7 +90,7 @@ export default {
           {
             name: '产出',
             type: 'bar',
-            barWidth: 20,
+            barWidth: 15,
             stack: 'Ad',
             emphasis: {
               focus: 'series'
@@ -139,16 +137,31 @@ export default {
               normal: {
                 barBorderRadius: 6,
                 color:  "rgba(156,107,211,0.8)"
-               /* color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
-                  { offset: 0, color: "rgba(156,107,211,0.8)" },
-                  { offset: 0.2, color: "rgba(156,107,211,0.5)" },
-                  { offset: 1, color: "rgba(156,107,211,0.2)" }
-                ])*/
+                /* color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                   { offset: 0, color: "rgba(156,107,211,0.8)" },
+                   { offset: 0.2, color: "rgba(156,107,211,0.5)" },
+                   { offset: 1, color: "rgba(156,107,211,0.2)" }
+                 ])*/
               }
             },
             emphasis: {
               focus: 'series'
             }
+          }, {
+            name: 'UPH',
+            type: 'bar',
+            barWidth: 15,
+            data:[],
+            //data: [12, 22, 32, 12, 32, 12, 32],
+            emphasis: {
+              focus: 'series'
+            },
+            label: {
+              show: true,
+              position: 'top',
+              fontSize:14,
+              fontWeight: "bold"
+            }
           }
         ]
       },
@@ -188,57 +201,61 @@ export default {
           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();
-                        let series3 = new Array();
-                        for (let index = 0; index < dataList.length; index++) {
-                          const element = dataList[index];
-                          xAxis0.push(element.sp_wccode);
-                          //投入
-                          series0.push(element.v_inqty);
-                          //产出
-                          series1.push(element.v_outqty);
-                          //不良
-                          series2.push(element.v_ngqty);
-                          //良率
-                          series3.push(element.v_okrate);
-                        }
-                        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;
-                       /*let myChart = this.$children[0].chart;
-                       myChart.setOption({
-                          xAxis: {
-                            data: xAxis0
-                          },
-                          series: [
-                            {
-                              // 根据名字对应到相应的系列
-                              name: '投入',
-                              data: series0
-                            },
-                            {
-                              name: '产出',
-                              data: series2
-                            }, {
-                              name: '不良',
-                              data: series3
-                            },
-                            {
-                              name: '不良率%',
-                              data: series4
-                            },
-                          ]
-                        });*/
-                      },(result)=>{
-                        console.error(result)
-                      }
-              );
+            let dataList = JSON.parse(result.data.data);
+            let xAxis0 = new Array();
+            let series0 = new Array();
+            let series1 = new Array();
+            let series2 = new Array();
+            let series3 = new Array();
+            let series4 = new Array();
+            for (let index = 0; index < dataList.length; index++) {
+              const element = dataList[index];
+              xAxis0.push(element.sp_wccode);
+              //投入
+              series0.push(element.v_inqty);
+              //产出
+              series1.push(element.v_outqty);
+              //不良
+              series2.push(element.v_ngqty);
+              //良率
+              series3.push(element.v_okrate);
+              //UPH
+              series4.push(element.uph);
+            }
+            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;
+            this.options.series[4].data = series4;
+            /*let myChart = this.$children[0].chart;
+            myChart.setOption({
+               xAxis: {
+                 data: xAxis0
+               },
+               series: [
+                 {
+                   // 根据名字对应到相应的系列
+                   name: '投入',
+                   data: series0
+                 },
+                 {
+                   name: '产出',
+                   data: series2
+                 }, {
+                   name: '不良',
+                   data: series3
+                 },
+                 {
+                   name: '不良率%',
+                   data: series4
+                 },
+               ]
+             });*/
+          },(result)=>{
+            console.error(result)
+          }
+      );
     }
   }
 }

+ 1 - 1
src/views/dip/center.vue

@@ -63,7 +63,7 @@ export default {
         headerBGC: '#0f1325', //表头
         oddRowBGC: '#0f1325', //奇数行
         evenRowBGC: '#171c33', //偶数行
-        columnWidth: [150,110,140],
+        columnWidth: [130,80,110],
         align: ['center']
       },
       timing : null,

+ 203 - 0
src/views/dip/centerLeft1ALL.vue

@@ -0,0 +1,203 @@
+<template>
+  <div id="centerLeft1ALL">
+    <div class="bg-color-black">
+      <div class="d-flex pt-2 pl-2">
+        <span>
+          <icon name="chart-bar" class="text-icon"></icon>
+        </span>
+        <span class="fs-xl text mx-2 mb-1 pl-3">工单完成情况统计</span>
+      </div>
+      <div class="d-flex jc-center columnperent">
+         <CenterLeft1ALLChart/>
+      </div>
+      <div class="d-flex circleperent">
+          <div class="item"  v-for="item in rate" :key="item.id">
+          <span>{{ item.title }}</span>
+          <CenterChart :id="item.id" :tips="item.tips" :colorObj="item.colorData"/>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import CenterLeft1ALLChart from '@/components/dipechart/centerLeft/centerLeft1ALLChart'
+import CenterChart from '@/components/dipechart/centerLeft/centerChartRate'
+export default {
+  data() {
+    return {
+      titleItem:[],
+      config: {
+        data: [],
+        showValue: true
+      },
+      // 通过率和达标率的组件复用数据
+      rate: [
+        {
+          id: 'centerRate1',
+          tips: 50,
+          colorData: {
+            textStyle: '#31b4fb',
+            series: {
+              color: ['rgba(19,122,244,0.29)', 'transparent'],
+              dataColor: {
+                normal: '#137af4',
+                shadowColor: '#80e0f5'
+              }
+            }
+          }
+        },
+        {
+          id: 'centerRate2',
+          tips: 60,
+          colorData: {
+            textStyle: '#43cfe9',
+            series: {
+              color: ['#00bcd44a', 'transparent'],
+              dataColor: {
+                normal: '#32C5E9',
+                shadowColor: '#9fe5f5'
+              }
+            }
+          }
+        },
+        {
+          id: 'centerRate3',
+          tips: 60,
+          colorData: {
+            textStyle: '#6ad59c',
+            series: {
+              color: ['rgba(25,161,95,0.29)', 'transparent'],
+              dataColor: {
+                normal: '#00a11a',
+                shadowColor: '#6cda9c'
+              }
+            }
+          }
+        }
+      ],
+      intervalId :null
+    }
+  },
+  components: {
+    CenterLeft1ALLChart,
+    CenterChart
+  },
+  mounted() {
+    this.changeTiming()
+  },
+  beforeDestroy () {
+   clearInterval(this.intervalId)
+    this.chart.dispose()
+    this.chart.clear()
+    this.chart=null
+  },
+  methods: {
+    changeTiming() {
+      this.changeNumber();
+      this.intervalId =  setInterval(() => {
+        this.changeNumber()
+      }, 20000)
+    },
+    async changeNumber() {
+      var caller2 = 'MakeComRate';
+      if (sessionStorage.getItem('li_code') == '所有'){
+        caller2 = 'DIP!MakeComRate!ALL';
+      }
+      //工单关闭率
+      await this.$http.get("kanban/datalist.action?caller="+caller2+"&_noc=1&page=1&pageSize=100",{
+        params: {
+          condition: "1=1",
+        }
+      }).then((result)=>{
+                let dataList = JSON.parse(result.data.data);
+                for (let index = 0; index < dataList.length; index++) {
+                  const element = dataList[index];
+                  this.rate[index].tips = element.rate;
+                  this.rate[index].title = element.title;
+                }
+              },(result)=>{
+                console.error(result)
+              }
+          );
+
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+$box-height: 420px;
+$box-width: 500px;
+#centerLeft1ALL {
+  padding: 0px;
+  height: $box-height;
+  font-size: 50px;
+  width: $box-width;
+  border-radius: 10px;
+  .bg-color-black {
+    height: $box-height - 10px;
+    border-radius: 10px;
+    padding: 5px;
+  }
+
+  .circleperent {
+    width: 100%;
+    display: flex;
+    flex-wrap: wrap;
+    .item {
+      width: 33%;
+      height: 118px;
+      span {
+        margin-top: 15px;
+        font-size: 18px;
+        display: flex;
+        justify-content: center;
+      }
+    }
+  }
+  .columnperent {
+    width: 100%;
+    display: flex;
+  }
+  .text {
+    color: #FFE900;
+  }
+  .dv-dec-3 {
+    position: relative;
+    width: 150px;
+    height: 20px;
+    top: -3px;
+  }
+
+  .bottom-data {
+    .item-box {
+      & > div {
+        padding-right: 5px;
+      }
+      font-size: 14px;
+      float: right;
+      position: relative;
+      width: 50%;
+      color: #d3d6dd;
+      .dv-digital-flop {
+        width: 120px;
+        height: 30px;
+      }
+      // 金币
+      .coin {
+        position: relative;
+        top: 6px;
+        font-size: 20px;
+        color: #ffc107;
+      }
+      .colorYellow {
+        color: yellowgreen;
+      }
+      p {
+        text-align: center;
+      }
+    }
+  }
+}
+</style>

+ 6 - 1
src/views/dip/index.vue

@@ -73,9 +73,12 @@
           <!-- 第三行数据 -->
           <div class="content-box">
             <div>
-              <dv-border-box-12>
+              <dv-border-box-12 v-show="linecode!='所有'">
                 <centerLeft_two />
               </dv-border-box-12>
+              <dv-border-box-12 v-show="linecode=='所有'">
+                <centerLeft1ALL />
+              </dv-border-box-12>
             </div>
             <div>
               <dv-border-box-12>
@@ -123,6 +126,7 @@ import centerRight1 from './centerRight1'
 import center from './center'
 import bottomLeft2 from './bottomLeft2'
 import bottomRight from './bottomRight'
+import centerLeft1ALL from "@/views/dip/centerLeft1ALL.vue";
 
 export default {
   mixins: [ drawMixin ],
@@ -143,6 +147,7 @@ export default {
     }
   },
   components: {
+    centerLeft1ALL,
     centerLeft1,
     centerLeft_two,
     centerRight1,