From 6d3886ba1e4b3630da947a7a046433feb3759d17 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 26 九月 2024 17:59:39 +0800
Subject: [PATCH] ll

---
 admin/src/views/platform/index.vue |   55 +++++++++++++++++++++++++++++++++----------------------
 1 files changed, 33 insertions(+), 22 deletions(-)

diff --git a/admin/src/views/platform/index.vue b/admin/src/views/platform/index.vue
index e82f7a4..6be4435 100644
--- a/admin/src/views/platform/index.vue
+++ b/admin/src/views/platform/index.vue
@@ -6,16 +6,11 @@
           v-for="(item, i) in PlatGroupList" :key="i">
           {{ item.name }}
         </div>
-        <!-- <el-tabs v-model="activeGroup.id" @tab-click="platgroupClick">
-          <el-tab-pane
-            v-for="item,i in PlatGroupList"
-            :key="i"
-            :label="item.name"
-            :name="String(item.id)"
-          />
-        </el-tabs> -->
       </div>
-      <el-button type="primary" class="ml20" @click="handleSet">閰嶇疆鏈堝彴</el-button>
+      <div class="btns">
+        <!-- <el-button type="primary" @click="handleSet">鍒锋柊</el-button> -->
+        <el-button type="primary" class="ml20" @click="handleSet">閰嶇疆鏈堝彴</el-button>
+      </div>
     </div>
     <!--  -->
     <div v-if="activeGroup.platformList" class="platform_list">
@@ -43,7 +38,8 @@
           <el-button type="primary" @click="handleQueuing(item, 2)">鏈堝彴鍙彿</el-button>
         </div>
         <div class="list" v-if="item.platformWorkVO && item.platformWorkVO.platformJobList">
-          <div class="info" :class="{err: task.status == 8}" v-for="task in item.platformWorkVO.platformJobList" :key="task.id">
+          <div class="info" :class="{ err: task.status == 8 }" v-for="task in item.platformWorkVO.platformJobList"
+            :key="task.id">
             <div class="line">
               <div class="left">
                 <div v-if="task.carCodeFront" class="code">
@@ -120,7 +116,7 @@
     <GlobalWindow title="閰嶇疆鏄剧ず鏈堝彴" :visible.sync="isShowSet" :confirm-working="setLoading" @confirm="handleSetSub"
       width="560px">
       <div class="set_modal">
-        <div class="mb10" v-for="group in PlatGroupList" :key="group.id">
+        <div class="mb10" v-for="group in PlatGroupListSet" :key="group.id">
           <div class="title">{{ group.name }}</div>
           <div class="list">
             <div class="item" @click="platformSetClick(item.id)" :class="{ active: item.showConfig }"
@@ -186,6 +182,7 @@
       statusMap,
       activeGroup: {},
       PlatGroupList: [],
+      PlatGroupListSet: [],
       platList: [],
       platCallList: [],
       isShowTransform: false,
@@ -203,8 +200,10 @@
     }
   },
   created() {
+    setInterval(() => {
+      this.getPlatGroupList()
+    }, 1000 * 20)
     this.getPlatGroupList()
-    // this.getList()
   },
   methods: {
     handleWork(item) {
@@ -288,16 +287,16 @@
         this.activeGroup.platformList.forEach(plat => {
           if (plat.platformWorkVO.platformJobList && plat.platformWorkVO.platformJobList.length > 0) {
             plat.platformWorkVO.platformJobList.forEach(item => {
-              if (item.callDate) {
-                const timeNum = time.getTime() - new Date(item.callDate).getTime()
+              if (item.newCallDate) {
+                const timeNum = time.getTime() - new Date(item.newCallDate).getTime()
                 if (timeNum > 3600000) {
                   item.callDateTemp = dayjs.duration(timeNum).format('H灏忔椂m鍒唖绉�')
                 } else {
                   item.callDateTemp = dayjs.duration(timeNum).format('m鍒唖绉�')
                 }
               }
-              if (item.startDate) {
-                const timeNum = time.getTime() - new Date(item.startDate).getTime()
+              if (item.newStartDate) {
+                const timeNum = time.getTime() - new Date(item.newStartDate).getTime()
                 if (timeNum > 3600000) {
                   item.startDateTemp = dayjs.duration(timeNum).format('H灏忔椂m鍒唖s绉�')
                 } else {
@@ -336,11 +335,17 @@
     },
     handleSet() {
       this.isShowSet = true
+      getPlatformGroupList({
+        queryData: 0,
+        queryType: 1
+      }).then(res => {
+        this.PlatGroupListSet = res || []
+      })
     },
     handleSetSub() {
-      const { PlatGroupList } = this
+      const { PlatGroupListSet } = this
       const ids = []
-      PlatGroupList.forEach(item => {
+      PlatGroupListSet.forEach(item => {
         item.platformList.forEach(platform => {
           if (platform.showConfig) {
             ids.push(platform.id)
@@ -358,8 +363,8 @@
       })
     },
     platformSetClick(id) {
-      const { PlatGroupList } = this
-      PlatGroupList.forEach(item => {
+      const { PlatGroupListSet } = this
+      PlatGroupListSet.forEach(item => {
         item.platformList.forEach(platform => {
           if (platform.id === id) {
             platform.showConfig = !platform.showConfig
@@ -431,6 +436,7 @@
       margin-top: 10px;
       padding: 16px;
       width: calc(100% - 0);
+
       .info {
         background: #f4fafb;
         border-radius: 2px;
@@ -485,12 +491,14 @@
               border-radius: 4px;
               border: 1px solid $primaryColor;
               padding-right: 4px;
+
               span {
                 &:nth-of-type(1) {
                   background: $primaryColor;
                   padding: 0 8px;
                   color: #fff;
                 }
+
                 &:nth-of-type(2) {
                   padding-left: 4px;
                 }
@@ -504,6 +512,7 @@
           }
         }
       }
+
       .jobing {
         background: #effbf5;
 
@@ -573,12 +582,14 @@
     }
   }
 
-  .ml20 {
+  .btns {
     position: absolute;
-    width: 120px;
+    width: 180px;
     height: 36px;
     right: 0;
     top: -4px;
+    display: flex;
+    justify-content: flex-end;
   }
 }
 

--
Gitblit v1.9.3