Просмотр исходного кода

科赛修改车间进度看板修改--产线计划未完成订单明细

xiaost 5 месяцев назад
Родитель
Сommit
abca891ef5
2 измененных файлов с 132 добавлено и 3 удалено
  1. 3 3
      src/views/makeprocess/index.vue
  2. 129 0
      src/views/makeprocess/list.vue

+ 3 - 3
src/views/makeprocess/index.vue

@@ -63,7 +63,7 @@
         <div class="body-box" style="height: calc(100vh - 120px); overflow: hidden;">
           <div class="bottom-box" style="height: 100%;">
             <dv-border-box-12 style="height: 100%;">
-              <bottom1 />
+              <list />
             </dv-border-box-12>
           </div>
         </div>
@@ -76,7 +76,7 @@
 import drawMixin from "../../utils/drawMixin";
 import  common  from '../../utils/common';
 import {formatTime} from '../../utils/index.js'
-import bottom1 from './bottom1.vue'
+import list from './list.vue'
 import {mapMutations, mapState} from "vuex"
 
 export default {
@@ -99,7 +99,7 @@ export default {
     }
   },
   components: {
-    bottom1
+    list
   },
   beforeRouteEnter(to, from, next) {
     next(vm => {

+ 129 - 0
src/views/makeprocess/list.vue

@@ -0,0 +1,129 @@
+<template>
+  <div id="ddlist">
+    <div class="bg-color-black">
+      <div class="d-flex mt-2 pt-1 pl-2 pb-2 jc-center mb-2">
+        <span class="text mx-2 fw-b">产线计划未完成订单明细</span>
+      </div>
+      <div class="d-flex jc-center body-box">
+        <dv-scroll-board class="dv-scr-board" :config="config" ref="scroll-board" />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      config: {
+        header:[],
+        data: [],
+        rowNum: 14, //表格行数
+        headerHeight: 35,
+        headerBGC: '#0f1325', //表头
+        oddRowBGC: '#0f1325', //奇数行
+        evenRowBGC: '#171c33', //偶数行
+        columnWidth: [],
+        align: [],
+        carousel: 'page',
+        hoverPause: true,
+      },
+      timing:null,
+    }
+  },
+  mounted() {
+    this.refreshdata()
+  },
+  beforeDestroy () {
+    clearInterval(this.timing)
+  },
+  methods: {
+    refreshdata() {
+      this.getdata(); //获取-数据
+      this.timing = setInterval(() => {
+        this.getdata(); //获取--数据
+      }, 10000);
+    },
+    async getdata() {
+      //先清空数据
+      var caller1 = 'KB!PROCESS!DATA';
+      await this.$http.get("kanban/datalist.action?caller="+caller1+"&_noc=1&page=1&pageSize=100",{
+        params: {
+          condition:"1=1"
+        }
+      }).then((result)=>{
+            let columns = result.data.columns;
+            let headers = new Array();
+            let columnWidths = new Array();
+            let fieldnames = new Array();
+            let aligns = new Array();
+            for (let index = 0; index < columns.length; index++) {
+              const element = columns[index];
+              if(element.width>0) {
+                headers.push(element.text);
+                columnWidths.push(element.width);
+                fieldnames.push(element.dataIndex);
+                aligns.push('center');
+              }
+            }
+            this.config.header = headers;
+            this.config.columnWidth = columnWidths;
+            this.config.align = aligns;
+            let dataList = JSON.parse(result.data.data);
+            let resultList = new Array();
+            for (let index = 0; index < dataList.length; index++) {
+              const element = dataList[index];
+              let item = new Array();
+              fieldnames.forEach(function (ele) {
+                // 遍历数组,对每个元素进行操作
+                item.push("<span>" + element[ele] + "</span>");
+              });
+              resultList.push(item);
+            }
+            this.config.data = resultList;
+            this.config = { ...this.config };
+          },(result)=>{
+            console.error(result)
+          }
+      );
+
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+$box-height: 950px;
+$box-width: 100%;
+#ddlist {
+  padding: 12px;
+  height: $box-height;
+  width: $box-width;
+  border-radius: 5px;
+  .bg-color-black {
+    height: $box-height - 25px;
+    border-radius: 10px;
+  }
+  .text {
+    color: #c3cbde;
+    font-size: 33px;
+  }
+  .body-box {
+    border-radius: 10px;
+    overflow: hidden;
+    height: 915px;
+    ::v-deep .dv-scroll-board {
+      height: 885px;
+      .header{
+        font-size: 25px;
+      }
+      .rows {
+        .row-item {
+          font-size: 20px !important;
+          // color: #c3cbde !important;
+        }
+      }
+    }
+  }
+}
+</style>