Browse Source

样式调整

xiaost 2 years ago
parent
commit
cbc5627eee
2 changed files with 71 additions and 10 deletions
  1. 3 3
      src/views/bottomRight2.vue
  2. 68 7
      src/views/centerLeft_two.vue

+ 3 - 3
src/views/bottomRight2.vue

@@ -24,7 +24,7 @@ export default {
   data() {
     return {
       config: {
-        header: ['线别','测试数','不良数', '良率%'],
+        header: ['线别','测试数','不良数', '良率%'],
         data: [],
         rowNum: 4, //表格行数
         headerHeight: 35,
@@ -87,9 +87,9 @@ export default {
                           const element = dataList[index];
                           let item = new Array();
                           item.push(element.linecode);
-                          item.push("<span  class='colorRed'>" + element.testqty + "</span>");
+                          item.push("<span  class='colorGrass'>" + element.testqty + "</span>");
                           item.push("<span  class='colorGrass'>" + element.ngqty + "</span>");
-                          item.push("<span  class='colorGrass'>" + element.value + "</span>");
+                          item.push("<span  class='colorRed'>" + element.value + "</span>");
                           resultList.push(item);
                         }
                         const scrollBoard2 = this.$refs['scroll-board2'];

+ 68 - 7
src/views/centerLeft_two.vue

@@ -5,10 +5,26 @@
         <span>
           <icon name="align-left" class="text-icon"></icon>
         </span>
-        <span class="fs-xl text mx-2">完成工单数统计</span>
+        <span class="fs-xl text mx-2">今日生产工单统计</span>
       </div>
       <div class="d-flex ai-center flex-column body-box">
-        <dv-capsule-chart class="dv-cap-chart" :config="config" />
+      <!--  <dv-capsule-chart class="dv-cap-chart" :config="config" />-->
+        <div class="up">
+          <div
+                  class="bg-color-black item"
+                  v-for="item in titleItem"
+                  :key="item.title"
+          >
+            <p class="ml-3 colorBlue fw-b fs-xl">{{ item.title }}</p>
+            <div>
+              <dv-digital-flop
+                      class="dv-dig-flop ml-1 mt-2 pl-3"
+                      :config="item.number"
+              />
+            </div>
+          </div>
+        </div>
+
          <span class="fs-xl text mx-2">工序投产良率分析</span>
         <centerRight2Chart1 />
       </div>
@@ -24,7 +40,8 @@ export default {
     return {
       config: {
         data: [{name:'客户',value:90}]
-      }
+      },
+      titleItem:[],
     }
   },
   components: { centerRight2Chart1 },
@@ -39,10 +56,10 @@ export default {
       }, 10000);
     },
     async settestdata(){
-      //完成工单数统计
-      this.config.data = [];
-      this.config = { ...this.config };
-      await this.$http.get("kanban/datalist.action?caller=MAKEQTY&_noc=1&page=1&pageSize=100&condition=1=1")
+      //今日生产工单统计
+      //this.config.data = [];
+      //this.config = { ...this.config };
+      /*await this.$http.get("kanban/datalist.action?caller=MAKEQTY&_noc=1&page=1&pageSize=100&condition=1=1")
               .then((result)=>{
                         let dataList = JSON.parse(result.data.data);
                         let makeData = new Array();
@@ -58,6 +75,30 @@ export default {
                       },(result)=>{
                         console.error(result)
                       }
+              );*/
+      await this.$http.get("kanban/datalist.action?caller=MAKEQTY&_noc=1&page=1&pageSize=100&condition=1=1")
+              .then((result)=>{
+                        let dataList = JSON.parse(result.data.data);
+                        let titleitems = new Array();
+                        console.log(titleitems);
+                        for (let index = 0; index < dataList.length; index++) {
+                          const element = dataList[index];
+                          titleitems.push({
+                            title: element.name,
+                            number: {
+                              number: [element.value],
+                              textAlign: 'left',
+                              content: '{nt}',
+                              style: {
+                                fontSize: 26
+                              }
+                            }
+                          });
+                        }
+                        this.titleItem = titleitems;
+                      },(result)=>{
+                        console.error(result)
+                      }
               );
     }
   }
@@ -89,6 +130,26 @@ export default {
       height: 160px;
       text-align:left;
     }
+    .up {
+      width: 95%;
+      display: flex;
+      flex-wrap: wrap;
+      //justify-content: space-around;
+      height: 140px;
+      margin-bottom: 7px;
+      .item {
+        border-radius: 6px;
+        padding-top: 8px;
+        margin-top: 8px;
+        width: 50%;
+        height: 60px;
+        .dv-dig-flop {
+          width: 100px;
+          height: 30px;
+        }
+      }
+    }
+
   }
 }
 </style>