Browse Source

柯赛看板调整,仓库看板调整

xiaost 8 months ago
parent
commit
db0a5d636b

+ 2 - 1
src/components/totalechart/bottom3Chart/chart.vue

@@ -135,7 +135,8 @@ export default {
             },
             axisLabel: {
               //color: 'rgba(255,255,255,.8)',
-              fontSize: 15
+              fontSize: 15,
+              formatter: '{value}%',
             }
           },
           series: [

+ 2 - 1
src/components/totalechart/up1Chart/chart.vue

@@ -157,7 +157,8 @@ export default {
             },
             axisLabel: {
               color: 'rgba(255,255,255,.8)',
-              fontSize: 12
+              fontSize: 12,
+              formatter: '{value}%',
             }
           },{
             gridIndex: 1

+ 2 - 1
src/components/totalechart/up1dChart/chart.vue

@@ -159,7 +159,8 @@ export default {
             },
             axisLabel: {
               color: 'rgba(255,255,255,.8)',
-              fontSize: 12
+              fontSize: 12,
+              formatter: '{value}%',
             }
           },{
             splitNumber: 3,

+ 18 - 21
src/components/warehousechart/bottom2Chart/chart.vue

@@ -4,7 +4,7 @@
     <Echart
         :options="options"
         id="bottom2Chart"
-        height="325px"
+        height="410px"
         width="100%"
         ref="column-board"
     ></Echart>
@@ -25,7 +25,13 @@ export default {
             type: 'shadow'
           }
         },
-        legend: {},
+        legend: {
+          textStyle: {
+            fontSize: 18
+          },
+          itemWidth: 29,
+          itemHeight: 19
+        },
         grid: {
           left: '3%',
           right: '4%',
@@ -37,37 +43,30 @@ export default {
             type: 'category',
             data:[],
             axisLabel: {
-              fontSize: 9
+              fontSize: 16
             }
           }
         ],
         yAxis: [
           {
             type: 'value',
+            axisLabel: {
+              fontSize: 16
+            }
           },
           {
             type: 'value',
-            name: 'rate',
             min: 0,
             max: 100,
             interval: 20,
             axisLabel: {
-              formatter: '{value}%'
+              formatter: '{value}%',
+              fontSize: 16
             }
           }
 
         ],
         series: [
-          /*  {
-              name: '投入',
-              type: 'bar',
-              barWidth: 20,
-              emphasis: {
-                focus: 'series'
-              },
-              data:[]
-              //data: [320, 332, 301, 334, 390, 330, 320]
-            },*/
           {
             name: '已备料',
             type: 'bar',
@@ -80,7 +79,6 @@ export default {
             itemStyle: {
               color: '#9FE6B8'  //fac858
             },
-            //data: [220, 232, 221, 234, 290, 230, 220]
           },
           {
             name: '未备料',
@@ -88,7 +86,6 @@ export default {
             stack: 'Ad',
             barWidth: 10,
             data:[],
-            //data: [12, 22, 32, 12, 32, 12, 32],
             emphasis: {
               focus: 'series'
             },
@@ -102,7 +99,6 @@ export default {
             type: 'line',
             data:[],
             yAxisIndex: 1,
-            //data: [92, 92,92, 72, 82, 62, 62],
             tooltip: {
               valueFormatter: function (value) {
                 return value + '%';
@@ -168,17 +164,18 @@ export default {
                 let series2 = new Array();
                 for (let index = 0; index < dataList.length; index++) {
                   const element = dataList[index];
-                  if(index%2 == 0) {
+                  xAxis0.push(element.v_whname);
+                  /*if(index%2 == 0) {
                     xAxis0.push(element.v_whname);
                   }else{
                     xAxis0.push('\n'+element.v_whname);
-                  }
+                  }*/
                   //已备料
                   series0.push(element.v_haveqty);
                   //未备料
                   series1.push(element.v_unqty);
                   //备料率
-                  series2.push(element.v_okrate);
+                  series2.push(element.v_rate);
                 }
                 this.options.xAxis[0].data = xAxis0;
                 this.options.series[0].data = series0;

+ 44 - 0
src/components/warehousechart/bottom2Chart/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>

+ 74 - 0
src/components/warehousechart/bottom3Chart/chart.vue

@@ -0,0 +1,74 @@
+<template>
+  <div>
+    <Echart
+        :options="options"
+        id="bottom3Chart"
+        height="420px"
+        width="100%"
+    ></Echart>
+  </div>
+</template>
+
+<script>
+import Echart from '@/common/echart'
+export default {
+  data () {
+    return {
+      options: {},
+    };
+  },
+  components: {
+    Echart,
+  },
+  props: {
+    cdata: {
+      type: Object,
+      default: () => ({})
+    },
+  },
+  watch: {
+    cdata: {
+      handler (newData) {
+        this.options = {
+          color: [
+            "#37a2da",
+            "#32c5e9",
+            "#37a2da",
+            "#32c5e9",
+            "#ff9f7f",
+            "#fb7293",
+            "#e7bcf3",
+            "#8378ea"
+          ],
+          tooltip: {
+            trigger: "item",
+            formatter: "{a} <br/>{b} : {c} ({d}%)"
+          },
+          toolbox: {
+            show: true
+          },
+          calculable: true,
+          series: [
+            {
+              type: "pie",
+              radius: '50%',
+              center: ['50%', '50%'],
+              data: newData.data,
+              label: {
+                fontSize: 18,
+                fontWeight:"bold",
+                color: "#d3d6dd",
+              },
+            },
+          ]
+        }
+      },
+      immediate: true,
+      deep: true
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 75 - 0
src/components/warehousechart/bottom3Chart/index.vue

@@ -0,0 +1,75 @@
+<template>
+  <div>
+    <Chart :cdata="cdata" />
+  </div>
+</template>
+
+<script>
+import Chart from './chart.vue';
+import {mapState} from "vuex";
+
+export default {
+  computed: {
+    ...mapState(['factory']),
+  },
+  data () {
+    return {
+      timing :null,
+      cdata: {
+        xData:[],
+        data:[],
+      }
+    }
+  },
+  components: {
+    Chart,
+  },
+  mounted () {
+    console.log('23');
+    this.refreshdata();
+  },
+  beforeDestroy () {
+    clearInterval(this.timing);
+    this.chart.dispose()
+    this.chart.clear()
+    this.chart=null
+  },
+  methods: {
+    refreshdata() {
+      this.getdata();
+      this.timing = setInterval(() => {
+        this.getdata(); //获取-数据
+      }, 10000);
+    },
+    async getdata() {
+      //工单发料完成比例
+      var caller = 'KB!WHMAKEFLRATE';
+      console.log('23');
+      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 data1 = new Array();
+            for (let index = 0; index < dataList.length; index++) {
+              const element = dataList[index];
+              let ob = new Object();
+              ob.value = element.v_qty;
+              ob.name = element.v_name;
+              data1.push(ob);
+            }
+            console.log(data1);
+            this.cdata.data = data1;
+          },(result)=>{
+            console.error(result)
+          }
+      );
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 16 - 0
src/views/quality/index.vue

@@ -129,6 +129,7 @@ export default {
   mounted() {
     this.timeFn()
     this.cancelLoading()
+    this.autoFullScreen()
   },
   beforeDestroy () {
     clearInterval(this.timing)
@@ -148,6 +149,21 @@ export default {
         this.loading = false
       }, 1000)
     },
+    autoFullScreen(){
+      if (!this.isFullScreen) {
+        setTimeout(() => {
+          this.$showMsgBox({
+            caption: "提示",
+            msg: '是否全屏展示?',
+            callback: (data) => {
+              if (data == "yes") {
+                this.fullScreen();
+              }
+            }
+          })
+        }, 3000)
+      }
+    },
   }
 }
 </script>

+ 2 - 21
src/views/warehouse/bottom2.vue

@@ -1,13 +1,8 @@
 <template>
   <div id="bottom2">
     <div class="bg-color-black">
-      <div class="d-flex pt-2 pl-2">
-        <span>
-          <icon name="chart-bar" class="text-icon"></icon>
-        </span>
-        <div class="d-flex">
-          <span class="fs-xl text mx-2">工单备料完成进度</span>
-        </div>
+      <div class="d-flex jc-center pt-1 pl-2 mb-3">
+        <span class="fs-xxl text mx-2 fw-b">工单备料完成进度</span>
       </div>
       <div>
         <Bottom2Chart />
@@ -33,20 +28,6 @@ $box-width: 100%;
   height: $box-height;
   width: $box-width;
   border-radius: 5px;
-  .up{
-    height: 150px;
-    .bg-color-black {
-      border-radius: 10px;
-      height: 150px;
-    }
-  }
-  .down{
-    height: 370px;
-    .bg-color-black {
-      height: 350px;
-      border-radius: 10px;
-    }
-  }
 
 }
 </style>

+ 5 - 4
src/views/warehouse/bottom3.vue

@@ -4,8 +4,8 @@
       <div class="d-flex pt-1 pl-2 jc-center">
         <span class="fs-xxl text mx-2 fw-b">当日维修分析表</span>
       </div>
-      <div class="d-flex jc-center body-box">
-
+      <div class="body-box">
+        <Bottom3Chart />
       </div>
     </div>
   </div>
@@ -14,6 +14,7 @@
 <script>
 
 import {mapState} from "vuex";
+import Bottom3Chart from '@/components/warehousechart/bottom3Chart';
 export default {
   computed: {
     //数组写法
@@ -24,9 +25,9 @@ export default {
       timing:null,
     }
   },
-  components: {},
+  components: {Bottom3Chart},
   mounted() {
-    // this.refreshdata();
+     //this.refreshdata();
   },
   beforeDestroy () {
     clearInterval(this.timing)

+ 16 - 0
src/views/warehouse/index.vue

@@ -137,6 +137,7 @@ export default {
   mounted() {
     this.timeFn()
     this.cancelLoading()
+    this.autoFullScreen();
   },
   beforeDestroy () {
     clearInterval(this.timing);
@@ -156,6 +157,21 @@ export default {
         this.loading = false
       }, 1000)
     },
+    autoFullScreen(){
+      if (!this.isFullScreen) {
+        setTimeout(() => {
+          this.$showMsgBox({
+            caption: "提示",
+            msg: '是否全屏展示?',
+            callback: (data) => {
+              if (data == "yes") {
+                this.fullScreen();
+              }
+            }
+          })
+        }, 3000)
+      }
+    },
   }
 }
 </script>

+ 2 - 2
src/views/warehouse/up3.vue

@@ -20,8 +20,8 @@ export default {
       config: {
         header: ['类别','总数量', '低于安全库存数'],
         data: [],
-        rowNum: 12, //表格行数
-        headerHeight: 35,
+        rowNum: 10, //表格行数
+        headerHeight: 40,
         headerBGC: '#0f1325', //表头
         oddRowBGC: '#0f1325', //奇数行
         evenRowBGC: '#171c33', //偶数行