Explorar o código

调整展示信息

yhluo hai 1 mes
pai
achega
b369bca9e1
Modificáronse 1 ficheiros con 102 adicións e 91 borrados
  1. 102 91
      src/views/dpl/centerRight1.vue

+ 102 - 91
src/views/dpl/centerRight1.vue

@@ -12,15 +12,15 @@
       <div class="d-flex jc-center body-box">
         <dv-scroll-board class="dv-scr-board" :config="config" ref="scroll-board" />
       </div>
-      
-    <div class="photo-box">
+
+      <div class="photo-box">
         <div>
           <div>
             <img :src="imgSrc1" class="responsive-img">
           </div>
           <div>
             <p>拉长: {{ upitem.v_leadname }}</p>
-            <p>产线人数: {{zzmancount}}</p>
+            <p>产线人数: {{ zzmancount }}</p>
           </div>
         </div>
         <div>
@@ -29,7 +29,7 @@
           </div>
           <div>
             <p>IPQC: {{ upitem.v_quaname }}</p>
-            <p>品检人数: {{bzmancount}}</p>
+            <p>品检人数: {{ bzmancount }}</p>
           </div>
         </div>
         <div>
@@ -37,8 +37,8 @@
             <img :src="imgSrc3" class="responsive-img">
           </div>
           <div>
-            <p>PE: {{ upitem.v_engineername }}</p>
-            <p>管理人数: {{glmancount}}</p>
+            <p>QE: {{ upitem.v_engineername }}</p>
+            <p>管理人数: {{ glmancount }}</p>
           </div>
         </div>
       </div>
@@ -50,15 +50,15 @@
 export default {
   data() {
     return {
-      upitem:{},
-      imgSrc1:'',
-      imgSrc2:'',
-      imgSrc3:'',
-      zzmancount:0,
-      bzmancount:0,
-      glmancount:0,
+      upitem: {},
+      imgSrc1: '',
+      imgSrc2: '',
+      imgSrc3: '',
+      zzmancount: 0,
+      bzmancount: 0,
+      glmancount: 0,
       config: {
-        header:  ['线别', '投入','产出','不良','良率%','待维修','已维修'],
+        header: ['线别', '投入', '产出', '不良', '良率%', '待维修', '已维修'],
         data: [
         ],
         rowNum: 1, //表格行数
@@ -66,30 +66,30 @@ export default {
         headerBGC: '#0f1325', //表头
         oddRowBGC: '#0f1325', //奇数行
         evenRowBGC: '#171c33', //偶数行
-        columnWidth: [150,90,100,80,90,90,90],
+        columnWidth: [150, 90, 100, 80, 90, 90, 90],
         align: ['center']
       },
-      timing : null
+      timing: null
     }
   },
   mounted() {
     this.refreshdata()
   },
-  beforeDestroy () {
+  beforeDestroy() {
     clearInterval(this.timing)
   },
   methods: {
     refreshdata() {
       this.getdata(); //获取-数据
-     /* this.$http.get("kanban/login.action?username=zhongyl&password=asd&sob=N_MES_TEST").then(
-           (result)=>{
-              console.info(result.data);
-              var res = result.data;
-              //登录成功返回session
-              sessionStorage.setItem('x-access-token',res.token);
-            },(result)=>{
-              console.error(result)
-         });*/
+      /* this.$http.get("kanban/login.action?username=zhongyl&password=asd&sob=N_MES_TEST").then(
+            (result)=>{
+               console.info(result.data);
+               var res = result.data;
+               //登录成功返回session
+               sessionStorage.setItem('x-access-token',res.token);
+             },(result)=>{
+               console.error(result)
+          });*/
 
       this.timing = setInterval(() => {
         this.getdata(); //获取--数据
@@ -97,36 +97,36 @@ export default {
     },
     async getdata() {
       var caller = 'DPL!DPLANTOUTPUT';
-      if (sessionStorage.getItem('li_code') == '所有'){
+      if (sessionStorage.getItem('li_code') == '所有') {
         caller = 'DPL!DPLANTOUTPUT!ALL';
       }
-    //  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",{
+      //  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: {
           condition: "1=1",
         }
-      }).then((result)=>{
-                    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();
-                      item.push(element.linecode);
-                      item.push("<span  class='colorGrass'>"+element.inqty+"</span>");
-                      item.push("<span  class='colorGrass'>"+element.value+"</span>");
-                      item.push("<span  class='colorGrass'>"+element.ngqty+"</span>");
-                      item.push("<span  class='colorGrass'>"+element.okrate+"</span>");
-                      item.push("<span  class='colorGrass'>"+element.repair+"</span>");
-                      item.push("<span  class='colorGrass'>"+element.repairrate+"</span>");
-                      resultList.push(item);
-                    }
-                    const scrollBoard = this.$refs['scroll-board'];
-                    //刷新数据
-                    scrollBoard.updateRows(resultList);
-                },(result)=>{
-                    console.error(result)
-                    }
-          );
+      }).then((result) => {
+        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();
+          item.push(element.linecode);
+          item.push("<span  class='colorGrass'>" + element.inqty + "</span>");
+          item.push("<span  class='colorGrass'>" + element.value + "</span>");
+          item.push("<span  class='colorGrass'>" + element.ngqty + "</span>");
+          item.push("<span  class='colorGrass'>" + element.okrate + "</span>");
+          item.push("<span  class='colorGrass'>" + element.repair + "</span>");
+          item.push("<span  class='colorGrass'>" + element.repairrate + "</span>");
+          resultList.push(item);
+        }
+        const scrollBoard = this.$refs['scroll-board'];
+        //刷新数据
+        scrollBoard.updateRows(resultList);
+      }, (result) => {
+        console.error(result)
+      }
+      );
 
       caller = 'KB!UpLineManInfo';
       await this.$http.get("kanban/datalist.action?caller=" + caller + "&_noc=1&page=1&pageSize=100", {
@@ -134,27 +134,27 @@ export default {
           condition: "V_OUTLINE='" + sessionStorage.getItem('li_code') + "'",
         }
       }).then((result) => {
-            let dataList = JSON.parse(result.data.data);
-            if (dataList.length > 0) {
-              this.upitem = dataList[0];
-              if (null != this.upitem.v_leadimageurl && '' != this.upitem.v_leadimageurl) {
-                this.fetchImage('imgSrc1', this.upitem.v_leadimageurl);
-              }
-              if (null != this.upitem.v_quaimageurl && '' != this.upitem.v_quaimageurl) {
-                this.fetchImage('imgSrc2', this.upitem.v_quaimageurl);
-              }
-              if (null != this.upitem.v_engineerimageurl && '' != this.upitem.v_engineerimageurl) {
-                this.fetchImage('imgSrc3', this.upitem.v_engineerimageurl);
-              }
-            } else {
-              this.upitem = {},
-                  this.imgSrc1 = '';
-              this.imgSrc2 = '';
-              this.imgSrc3 = '';
-            }
-          }, (result) => {
-            console.error(result)
+        let dataList = JSON.parse(result.data.data);
+        if (dataList.length > 0) {
+          this.upitem = dataList[0];
+          if (null != this.upitem.v_leadimageurl && '' != this.upitem.v_leadimageurl) {
+            this.fetchImage('imgSrc1', this.upitem.v_leadimageurl);
           }
+          if (null != this.upitem.v_quaimageurl && '' != this.upitem.v_quaimageurl) {
+            this.fetchImage('imgSrc2', this.upitem.v_quaimageurl);
+          }
+          if (null != this.upitem.v_engineerimageurl && '' != this.upitem.v_engineerimageurl) {
+            this.fetchImage('imgSrc3', this.upitem.v_engineerimageurl);
+          }
+        } else {
+          this.upitem = {},
+            this.imgSrc1 = '';
+          this.imgSrc2 = '';
+          this.imgSrc3 = '';
+        }
+      }, (result) => {
+        console.error(result)
+      }
       );
       caller = 'KB!UpLineManTotalNew';
       await this.$http.get("kanban/datalist.action?caller=" + caller + "&_noc=1&page=1&pageSize=100", {
@@ -162,26 +162,26 @@ export default {
           condition: "V_OUTLINE='" + sessionStorage.getItem('li_code') + "'",
         }
       }).then((result) => {
-            let dataList = JSON.parse(result.data.data);
-            if (dataList.length > 0) {
-              this.zzmancount = dataList[0].cs_production;
-              this.bzmancount = dataList[0].cs_qa;
-              this.glmancount = dataList[0].cs_management;
-            }
-          }, (result) => {
-            console.error(result)
-          }
+        let dataList = JSON.parse(result.data.data);
+        if (dataList.length > 0) {
+          this.zzmancount = dataList[0].cs_production;
+          this.bzmancount = dataList[0].cs_qa;
+          this.glmancount = dataList[0].cs_management;
+        }
+      }, (result) => {
+        console.error(result)
+      }
       );
     },
-    async fetchImage(param,url) {
+    async fetchImage(param, url) {
       try {
         console.log(param);
         // 假设你已经有了token,并且知道图片的URL
-        let response = await this.$httpImg.get("/kanban/download.action?path="+url+"&_noc=1");
+        let response = await this.$httpImg.get("/kanban/download.action?path=" + url + "&_noc=1");
         if (response.status === 200) {
           // 创建一个URL,并且使用这个URL作为img的src
           this[param] = URL.createObjectURL(new Blob([response.data]));
-        }else{
+        } else {
           this[param] = '';
         }
       } catch (error) {
@@ -195,58 +195,69 @@ export default {
 <style lang="scss" scoped>
 $box-height: 420px;
 $box-width: 640px;
+
 #centerRight1 {
   padding: 16px;
   padding-top: 20px;
   height: $box-height;
   width: $box-width;
   border-radius: 5px;
+
   .bg-color-black {
     height: $box-height - 30px;
     border-radius: 10px;
   }
+
   .text {
     color: #c3cbde;
-  //  font-size: 15px;
+    //  font-size: 15px;
   }
+
   .body-box {
     border-radius: 10px;
     overflow: hidden;
+
     .dv-scr-board {
       width: 600px;
       height: 60px;
     }
   }
-  .photo-box{
+
+  .photo-box {
     width: 100%;
     height: 280px;
     margin-top: 15px;
     display: flex;
     justify-content: space-between;
 
-    >div{
+    >div {
       width: 30%;
       height: 100%;
-      >div:first-child{
+
+      >div:first-child {
         height: calc(100% - 60px);
         border-radius: 5px 5px 0 0;
-        >img{
+
+        >img {
           display: block;
           height: 100%;
           width: 100%;
           border-radius: 3px;
         }
       }
-      >div:nth-child(2){
+
+      >div:nth-child(2) {
         width: 100%;
         height: 60px;
         text-align: center;
-        >p:first-child{
+
+        >p:first-child {
           font-size: 22px;
           color: #fff;
           line-height: 40px;
         }
-        >p{
+
+        >p {
           line-height: 20px;
           font-size: 18px;
           color: #33cea0;