From 166982c6c138b0b3face42de4a4e1b305ef0e02e Mon Sep 17 00:00:00 2001
From: Mr.Zhang <710666463@qq.com>
Date: 星期三, 23 八月 2023 18:41:54 +0800
Subject: [PATCH] 大屏

---
 screen_standard/src/components/AppLayout.vue |    2 
 /dev/null                                    |  277 ----------------------------------------------
 screen_standard/src/router/index.js          |    2 
 screen_standard/src/views/process.vue        |   10 
 screen_standard/src/views/index.vue          |   13 +
 5 files changed, 17 insertions(+), 287 deletions(-)

diff --git a/screen_standard/src/components/AppLayout.vue b/screen_standard/src/components/AppLayout.vue
index 1083e29..beb0e9c 100644
--- a/screen_standard/src/components/AppLayout.vue
+++ b/screen_standard/src/components/AppLayout.vue
@@ -115,6 +115,8 @@
 }
 
 const fullChange = () => {
+  enterprise.setDepartId('')
+  enterprise.setDepartId(data.tempCom.id)
   data.isFull = !data.isFull
   let element = document.documentElement;
   if (data.isFull) {   // 鍏ㄥ睆
diff --git a/screen_standard/src/router/index.js b/screen_standard/src/router/index.js
index c756cb1..c34f775 100644
--- a/screen_standard/src/router/index.js
+++ b/screen_standard/src/router/index.js
@@ -1,5 +1,5 @@
 import { createRouter, createWebHashHistory } from 'vue-router'
-import HomeView from '../views/HomeView.vue'
+// import HomeView from '../views/HomeView.vue'
 import indexView from '../views/index.vue'
 import processView from '../views/process.vue'
 // console.log(import.meta.env.VITE_BASE_CONTEXT);
diff --git a/screen_standard/src/views/HomeView.vue b/screen_standard/src/views/HomeView.vue
deleted file mode 100644
index 57c3298..0000000
--- a/screen_standard/src/views/HomeView.vue
+++ /dev/null
@@ -1,277 +0,0 @@
-<template>
-  <div class="productProcess">
-    
-    <!-- 濡傛灉椤甸潰鍒锋柊鏁版嵁姣旇緝棰戠箒锛屽彲浠ュ皢loading銆乻howFlag鐨勭浉鍏充唬鐮佸垹闄わ紝闃叉杩囦簬棰戠箒鐨勫嚭鐜板姞杞藉姩鐢� -->
-    <div class="loading_div" v-show="!showFlag">
-      <div>Loading...</div>  <!-- 杩欎釜loading鑷繁鍐欙紝浠g爜娌¤创鍑烘潵 -->
-    </div>
- 
-    <div class="success_info_body" v-show="showFlag">
-      <!-- 鍙傛暟鍚嶇О銆佸垪鏁版牴鎹疄闄呮儏鍐佃皟鏁� -->
-      <div class="table_body">
-        <div class="table_th">
-          <div class="tr1 th_style">鎺掍骇缂栧彿</div>
-          <div class="tr2 th_style">绫诲瀷</div>
-          <div class="tr3 th_style">鏃ユ湡</div>
-          <div class="tr4 th_style">杩涘害</div>
-        </div>
-        <div class="table_main_body">
-          <div class="table_inner_body" :style="{top: tableTop + 'px'}">
-            <div class="table_tr" v-for="(item,index) in tableList" :key="index">
-              <div class="tr1 tr">{{item.planNo}}</div>
-              <div class="tr2 tr">{{item.type}}</div>
-              <div class="tr3 tr" v-if="item.startDate!='-'">{{item.startDate}} ~ {{item.endDate}}</div>
-              <div class="tr3 tr" v-else>-</div>
-              <div class="tr4 tr" v-if="item.process!='-'">{{Number(item.process).toFixed(2)}} %</div>
-              <div class="tr4 tr" v-else>-</div>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
- 
-<script>
-export default {
-  
-  data() {
-    return {
-      showFlag: true,
-      tableTimer: null,
-      tableTop: 0,
-      tableList: [],
-       tableList:
-        [{
-          "process":0.0000,
-          "planNo":"BP2022060701",
-          "endDate":"2022-06-07",
-          "type":"鐮屽潡",
-          "startDate":"2022-06-07"
-        },
-        {
-          "process":0.0000,
-          "planNo":"BP2022060701",
-          "endDate":"2022-06-07",
-          "type":"鐮屽潡",
-          "startDate":"2022-06-07"
-        },
-        {
-          "process":0.0000,
-          "planNo":"BP2022060701",
-          "endDate":"2022-06-07",
-          "type":"鐮屽潡",
-          "startDate":"2022-06-07"
-        },
-        {
-          "process":0.0000,
-          "planNo":"BP2022060701",
-          "endDate":"2022-06-07",
-          "type":"鐮屽潡",
-          "startDate":"2022-06-07"
-        },
-        {
-          "process":0.0000,
-          "planNo":"BP2022060701",
-          "endDate":"2022-06-07",
-          "type":"鐮屽潡",
-          "startDate":"2022-06-07"
-        },
-        {
-          "process":0.0000,
-          "planNo":"BP2022060701",
-          "endDate":"2022-06-07",
-          "type":"鐮屽潡",
-          "startDate":"2022-06-07"
-        },
-        {
-          "process":0.0000,
-          "planNo":"BP2022060701",
-          "endDate":"2022-06-07",
-          "type":"鐮屽潡",
-          "startDate":"2022-06-07"
-        },
-
-        {
-          "process":0.0000,
-          "planNo":"WP2022061301",
-          "endDate":"2022-06-13",
-          "type":"澧欐澘",
-          "startDate":"2022-06-13"
-        }],
-      
-      tableListSize: 0,
-      componentTimer: null,
- 
-      //闇�瑕佹牴鎹儏鍐佃缃殑鍙傛暟
-      title: "鎺掍骇杩涘害",
-      visibleSize: 6, //瀹瑰櫒鍐呭彲瑙嗘渶澶у畬鏁磋鏁�
-      lineHeight: 49, //姣忚鐨勫疄闄呴珮搴︼紙鍖呭惈margin-top/bottom,border绛夛級
-      componentTimerInterval: 3600000, //鍒锋柊鏁版嵁鐨勬椂闂撮棿闅�
-      tableTimerInterval: 100 //鍚戜笂婊氬姩 1px 鎵�闇�瑕佺殑鏃堕棿锛岃秺灏忚秺蹇紝鎺ㄨ崘鍊� 100
-    };
-  },
- 
-  //濡傛灉娌℃湁鐖跺厓绱犱紶鍊硷紝灏唚atch鍐呯殑鍐呭鎼嚦mounted涓嵆鍙�
-  props: ["activeFactoryId"],
-  watch: {
-    activeFactoryId(val, oldVal) {
-      clearInterval(this.componentTimer);
-      this.bsGetProductProcess();
-      this.componentTimerFun();
-    }
-  },
-  mounted() {
-    clearInterval(this.componentTimer);
-      this.bsGetProductProcess();
-      this.componentTimerFun();
-  },
-  beforeDestroy() {
-    clearInterval(this.componentTimer);
-    clearInterval(this.tableTimer);
-  },
-  methods: {
-    //璋冪敤鏁版嵁鎺ュ彛锛岃幏鍙栧垪琛ㄦ暟鎹紝鏍规嵁鑷繁鎯呭喌濉帴鍙rl
-    bsGetProductProcess() {
-      clearInterval(this.tableTimer);
-      this.tableTop = 0;
-      this.showFlag = true;
-      this.tableActionFun();
-      // if (this.activeFactoryId != "") {
-      //   this.showFlag = false;
-      //   this.$ajax({
-      //     method: "get",
-      //     url: `` //鏍规嵁鑷繁鎯呭喌濉帴鍙rl
-      //   })
-      //     .then(res => {
-      //       this.tableList = res.data.data;
-      //       this.showFlag = true;
-      //       this.tableActionFun();
-      //     })
-      //     .catch(function(err) {
-      //       console.log("bsGetProductProcess error!");
-      //     });
-      // }
-    },
-    tableActionFun() {
-      this.tableListSize = this.tableList.length;
-      if (this.tableListSize > this.visibleSize) {
-        this.tableList = this.tableList.concat(this.tableList);
-        this.tableTimerFun();
-      } else {
-        this.fillTableList();
-      }
-    },
-    //褰撴暟鎹繃灏戞椂锛屼笉瑙﹀彂鑷姩杞挱浜嬩欢锛屽苟濉厖娌℃湁鏁版嵁鐨勮锛屽弬鏁版牴鎹疄闄呮儏鍐典慨鏀瑰嵆鍙�
-    fillTableList() {
-      var addLength = this.visibleSize - this.tableListSize;
-      for (var i = 0; i < addLength; i++) {
-        this.tableList.push({
-          planNo: "-",
-          type: "-",
-          startDate: "-",
-          endDate: "-",
-          process: "-"
-        });
-      }
-    },
-    tableTimerFun() {
-      var count = 0;
-      this.tableTimer = setInterval(() => {
-        if (count < (this.tableList.length / 2) * this.lineHeight) {
-          this.tableTop -= 1;
-          count++;
-        } else {
-          count = 0;
-          this.tableTop = 0;
-        }
-      }, this.tableTimerInterval);
-    },
-    componentTimerFun() {
-      this.componentTimer = setInterval(() => {
-        this.bsGetProductProcess();
-      }, this.componentTimerInterval);
-    }
-  }
-};
-</script>
- 
-<style scoped>
-.productProcess {
-  width: 550px;
-  height: 415px;
-}
-.loading_div {
-  /* color: #eee; */
-  padding-top: 100px;
-}
-.title_div {
-  width: 100%;
-}
-.table_body {
-  width: 100%;
-  margin-top: 15px;
-}
-.table_th {
-  width: 100%;
-  display: flex;
-  height: 40px;
-  line-height: 40px;
-}
-.tr {
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-  box-sizing: border-box;
-  padding: 0 5px;
-  text-align: center;
-  font-size: 14px;
-}
-.tr1 {
-  width: 28%;
-}
-.tr2 {
-  width: 15%;
-}
-.tr3 {
-  width: 35%;
-  font-size: 13px;
-}
- 
-.tr4 {
-  flex: 1;
-}
- 
-.th_style {
-  color: rgb(0, 221, 253);
-  font-weight: bold;
-  font-size: 18px;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-  box-sizing: border-box;
-  padding: 0 5px;
-  text-align: center;
-}
-.table_main_body {
-  width: 100%;
-  height: 294px;
-  overflow: hidden;
-  position: relative;
-}
-.table_inner_body {
-  width: 100%;
-  position: absolute;
-  left: 0;
-}
-.table_tr {
-  display: flex;
-  height: 40px;
-  line-height: 40px;
-  color: #eee;
-  font-size: 15px;
-  background: rgba(3, 145, 167, 0.1);
-  border: 1px solid rgb(4, 114, 131);
-  margin-top: 7px;
-}
-</style>
\ No newline at end of file
diff --git a/screen_standard/src/views/index.vue b/screen_standard/src/views/index.vue
index 2f482fd..c415965 100644
--- a/screen_standard/src/views/index.vue
+++ b/screen_standard/src/views/index.vue
@@ -61,7 +61,7 @@
                       <div class="scroll_item_row_item_x"></div>
                       <span v-if="child.rate < 100">{{ child.rate.toFixed(0) }}%</span>
                       <img v-else src="@/assets/img/ic_complete@2x.png" alt="" />
-                      <span class="scroll_item_row_item_wz">{{ child.procedureName }}</span>
+                      <span class="scroll_item_row_item_wz">{{ child.procedureName.substring(0, 3) }}</span>
                     </div>
                   </el-tooltip>
                 </div>
@@ -669,8 +669,10 @@
     }
     // 缁勪欢杩涜婊氬姩
     scrollDom.scrollTop += 2
+    console.log(scrollDom.scrollHeight - scrollDom.clientHeight);
+    console.log(scrollDom.scrollTop);
     // 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
-    if (Math.floor(scrollDom.scrollTop) >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+    if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight - 2)) {
       // 鑾峰彇缁勪欢绗竴涓妭鐐�
       let first = scrollDom.children[0]
       // 鍒犻櫎鑺傜偣
@@ -693,9 +695,9 @@
       return
     }
     // 缁勪欢杩涜婊氬姩
-    scrollDom.scrollTop += 1
+    scrollDom.scrollTop += 2
     // 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
-    if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+    if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight - 2)) {
       // 鑾峰彇缁勪欢绗竴涓妭鐐�
       let first = scrollDom.children[0]
       // 鍒犻櫎鑺傜偣
@@ -795,6 +797,9 @@
 
 onMounted(() => {
   if (!departId.value) return;
+  window.addEventListener('resize', () => {
+    init()
+  })
   timer5.value = setInterval(init(), 60000)
 })
 </script>
diff --git a/screen_standard/src/views/process.vue b/screen_standard/src/views/process.vue
index 119ac7c..a131c36 100644
--- a/screen_standard/src/views/process.vue
+++ b/screen_standard/src/views/process.vue
@@ -249,14 +249,14 @@
     scrollDom = planContainer.value
   } else {
     // 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
-    if (scrollDom.children.length < 10) {
+    if (scrollDom.children.length < 11) {
       clearTimeout(planTimer.value)
       return
     }
     // 缁勪欢杩涜婊氬姩
-    scrollDom.scrollTop += 1.5
+    scrollDom.scrollTop += 2 
     // 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
-    if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+    if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight - 2)) {
       // 鑾峰彇缁勪欢绗竴涓妭鐐�
       let first = scrollDom.children[0]
       // 鍒犻櫎鑺傜偣
@@ -495,7 +495,7 @@
     flex: 1;
     margin-right: 20px;
     .proccess-plan {
-      height: 424px;
+      height: 464px;
       background: linear-gradient(180deg, rgba(52, 88, 159, 0) 0%, rgba(0, 86, 255, 0.4) 100%);
       margin-bottom: 20px;
     }
@@ -601,7 +601,7 @@
     flex: 1;
 
     .report-log {
-      height: 424px;
+      height: 464px;
       background: linear-gradient(180deg, rgba(52, 88, 159, 0) 0%, rgba(0, 86, 255, 0.4) 100%);
       margin-bottom: 20px;
     }

--
Gitblit v1.9.3