From c5cc7da07c7f202f336468c0cd0d2789b4775b03 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 09 十月 2024 11:31:15 +0800
Subject: [PATCH] 最新版本
---
admin/src/views/platform/index.vue | 65 ++++++++++++++++++++------------
1 files changed, 41 insertions(+), 24 deletions(-)
diff --git a/admin/src/views/platform/index.vue b/admin/src/views/platform/index.vue
index 890d23c..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">
@@ -94,7 +90,7 @@
</div>
<div class="line">
<div v-if="task.type != 4" class="left">
- <span class="primaryColor pointer" @click="handleDetail">杩愬崟璇︽儏</span>
+ <span class="primaryColor pointer" @click="handleDetail(task)">杩愬崟璇︽儏</span>
</div>
<div v-else></div>
<div class="right">
@@ -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,15 +314,23 @@
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
})
},
- handleDetail() {
+ handleDetail(row) {
this.isShowDetail = true
this.$nextTick(() => {
this.$refs.WaybillDetailRef.isShowModal = true
+ this.$refs.WaybillDetailRef.id = row.id
+ this.$refs.WaybillDetailRef.getDetail()
})
},
getList() {
@@ -334,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)
@@ -356,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
@@ -429,6 +442,7 @@
margin-top: 10px;
padding: 16px;
width: calc(100% - 0);
+
.info {
background: #f4fafb;
border-radius: 2px;
@@ -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