From 0adb696e7fade5eeb02396e5d4bacf9355ca5e2e Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 08 十月 2024 14:28:36 +0800
Subject: [PATCH] ''
---
admin/src/views/platform/index.vue | 61 +++++++++++++++++++-----------
1 files changed, 39 insertions(+), 22 deletions(-)
diff --git a/admin/src/views/platform/index.vue b/admin/src/views/platform/index.vue
index e82f7a4..8f4bacf 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 {
@@ -315,6 +314,12 @@
this.$nextTick(() => {
this.$refs.PlatformQueuingRef.isShowModal = true
this.$refs.PlatformQueuingRef.callType = callType
+ this.$refs.PlatformQueuingRef.carCodeFront = ''
+ this.$refs.PlatformQueuingRef.pagination = {
+ total: 0,
+ pageSize: 10,
+ page: 1
+ }
this.$refs.PlatformQueuingRef.activePlat = { ...item }
this.$refs.PlatformQueuingRef.getList()
this.$refs.PlatformQueuingRef.title = item.name
@@ -336,11 +341,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 +369,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 +442,7 @@
margin-top: 10px;
padding: 16px;
width: calc(100% - 0);
+
.info {
background: #f4fafb;
border-radius: 2px;
@@ -485,12 +497,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 +518,7 @@
}
}
}
+
.jobing {
background: #effbf5;
@@ -573,12 +588,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