From 1477a1353e96b5620a29c78e2b08647a1a2bc5b7 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 15 十月 2024 19:07:25 +0800
Subject: [PATCH] ll
---
admin/src/views/platform/index.vue | 117 +++++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 79 insertions(+), 38 deletions(-)
diff --git a/admin/src/views/platform/index.vue b/admin/src/views/platform/index.vue
index 890d23c..6e75cf5 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">
@@ -66,13 +62,13 @@
</div>
</div>
<div class="line">
- <div v-if="task.type == 4" class="ite">
- <span>鍚堝悓鍗曞彿锛�</span>
- <span>{{ task.contractNum }}</span>
- </div>
- <div v-else class="ite">
+ <div v-if="task.billCode" class="ite">
<span>杩愯緭鍗曞彿锛�</span>
<span>{{ task.billCode }}</span>
+ </div>
+ <div v-else class="ite">
+ <span>鍚堝悓鍗曞彿锛�</span>
+ <span>{{ task.contractNum }}</span>
</div>
<div class="ite siji">
<span>椹鹃┒鍛橈細</span>
@@ -86,25 +82,25 @@
<span>鎬昏繍杈撻噺锛�</span>
<span>{{ task.totalNum }}涓囨敮</span>
</div>
- <div v-if="task.type != 4" class="ite" style="width: 66.6%">
+ <div v-if="task.billCode" class="ite" style="width: 66.6%">
<span>杩愯緭鍏徃锛�</span>
<span>{{ task.carrierName }}</span>
</div>
- <div class="ite"></div>
+ <!-- <div class="ite"></div> -->
</div>
<div class="line">
- <div v-if="task.type != 4" class="left">
- <span class="primaryColor pointer" @click="handleDetail">杩愬崟璇︽儏</span>
+ <div class="left">
+ <span v-if="task.billCode" class="primaryColor pointer" @click="handleDetail(task)">杩愬崟璇︽儏</span>
+ <span v-else class="primaryColor pointer" @click="subDetail(task)">棰勭害璇︽儏</span>
</div>
- <div v-else></div>
<div class="right">
<el-button v-if="task.status == 5" plain @click="handleErr(task)">寮傚父鎸傝捣</el-button>
<el-button v-if="task.status == 5 || task.status == 8" plain
@click="handleTransform(item, task)">杞Щ鏈堝彴</el-button>
<el-button v-if="task.status == 4" plain @click="handlePass(task)">杩囧彿</el-button>
- <el-button v-if="task.status == 5 || task.status == 8" type="primary"
+ <el-button v-preventReClick :loading="loadingFinish" v-if="task.status == 5 || task.status == 8" type="primary"
@click="handleFinish(task)">浣滀笟瀹屾垚</el-button>
- <el-button v-if="task.status == 4" type="primary" @click="handleWork(task)">寮�濮嬩綔涓�</el-button>
+ <el-button v-preventReClick :loading="loadingOpen" v-if="task.status == 4" type="primary" @click="handleWork(task)">寮�濮嬩綔涓�</el-button>
</div>
</div>
</div>
@@ -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 }"
@@ -139,6 +135,7 @@
<PlatformQueuing ref="PlatformQueuingRef" v-if="isShowQueuing" @success="getPlatGroupList"
@close="isShowQueuing = false" />
<WaybillDetail ref="WaybillDetailRef" v-if="isShowDetail" @success="getList" @close="isShowDetail = false" />
+ <DriverDetail v-if="isShowDriver" ref="DriverDetailRef" />
<el-dialog title="杞Щ鏈堝彴" :visible.sync="isShowTransform" width="500px" style="margin-top: 12vh">
<div class="df_ac">
<span>閫夋嫨杞Щ鍒扮殑鏈堝彴锛�</span>
@@ -149,7 +146,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="isShowTransform = false">鍙栨秷</el-button>
- <el-button type="primary" @click="transformSub">纭畾</el-button>
+ <el-button v-preventReClick type="primary" @click="transformSub">纭畾</el-button>
</span>
</el-dialog>
</div>
@@ -169,16 +166,18 @@
} from '@/api'
import PlatformQueuing from './components/PlatformQueuing.vue'
import WaybillDetail from './components/WaybillDetail.vue'
+import DriverDetail from "@/views/task/driverDetail.vue"
import GlobalWindow from '@/components/common/GlobalWindow'
import dayjs from 'dayjs'
import duration from 'dayjs/plugin/duration'
-import { Message } from 'element-ui'
+import { Loading, Message } from 'element-ui'
import { statusMap } from './config'
dayjs.extend(duration)
export default {
components: {
PlatformQueuing,
WaybillDetail,
+ DriverDetail,
GlobalWindow
},
data() {
@@ -186,6 +185,7 @@
statusMap,
activeGroup: {},
PlatGroupList: [],
+ PlatGroupListSet: [],
platList: [],
platCallList: [],
isShowTransform: false,
@@ -197,26 +197,40 @@
setParam: {},
isShowDetail: false, // 杩愬崟璇︽儏
+ isShowDriver: false, // 棰勭害璇︽儏
detail: {},
isShowQueuing: false,
- timer: null
+ timer: null,
+
+ loadingOpen: false,
+ loadingFinish: false,
}
},
created() {
+ setInterval(() => {
+ this.getPlatGroupList()
+ }, 1000 * 20)
this.getPlatGroupList()
- // this.getList()
},
methods: {
handleWork(item) {
+ this.loadingOpen = true
platformBeginWork({ jobId: item.id }).then(res => {
+ this.loadingOpen = false
Message.success('宸插紑濮嬩綔涓�')
this.getPlatGroupList()
+ }, () => {
+ this.loadingOpen = false
})
},
handleFinish(item) {
+ this.loadingFinish = true
platformFinishWork({ jobId: item.id }).then(res => {
+ this.loadingFinish = false
Message.success('瀹屾垚浣滀笟')
this.getPlatGroupList()
+ },() => {
+ this.loadingFinish = false
})
},
handleTransform(item, task) {
@@ -288,16 +302,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 +329,32 @@
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() {
+ subDetail(row) {
+ this.isShowDriver = true
+ this.$nextTick(() => {
+ this.$refs.DriverDetailRef.id = row.bookId
+ this.$refs.DriverDetailRef.type = 6
+ this.$refs.DriverDetailRef.getDetail()
+ this.$refs.DriverDetailRef.isShowModal = true
+ })
+ },
+ 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 +365,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 +393,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 +466,7 @@
margin-top: 10px;
padding: 16px;
width: calc(100% - 0);
+
.info {
background: #f4fafb;
border-radius: 2px;
@@ -504,6 +542,7 @@
}
}
}
+
.jobing {
background: #effbf5;
@@ -573,12 +612,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