From fbc625dea6117cb8724301d3a07d9071419f9715 Mon Sep 17 00:00:00 2001 From: liukangdong <898885815@qq.com> Date: 星期五, 30 八月 2024 18:08:56 +0800 Subject: [PATCH] ll --- admin/src/assets/icons/shengyin.png | 0 admin/src/layouts/TableLayout.vue | 4 admin/src/components/common/QueryForm/queryForm.vue | 4 admin/src/views/platform/config.js | 14 admin/src/views/platform/queueUp.vue | 140 +------- h5/pages/driver/index.vue | 2 admin/src/layouts/TableLayout1.vue | 1 admin/src/assets/images/default_nodata.png | 0 admin/src/views/platform/components/PlatformQueuing.vue | 124 ++++++- admin/src/api/platform/index.js | 41 ++ admin/src/components/system/operation/HiddenDangerParam.vue | 0 admin/src/assets/style/style.scss | 5 admin/src/components/system/operation/OperCarUseBookParamWindow.vue | 0 admin/src/components/common/GlobalWindow.vue | 6 admin/src/views/platform/index.vue | 564 ++++++++++++++++++++++++++++------ admin/src/components/common/CommonHeader.vue | 29 + pda/pages/index/center.vue | 2 admin/src/components/common/Pagination.vue | 2 admin/.env.development | 2 19 files changed, 681 insertions(+), 259 deletions(-) diff --git a/admin/.env.development b/admin/.env.development index 8e9a34f..5ae3033 100644 --- a/admin/.env.development +++ b/admin/.env.development @@ -2,4 +2,4 @@ NODE_ENV = 'development' VUE_APP_API_URL = 'http://localhost:10010' -VUE_APP_API_URL = 'http://192.168.0.136:10010' +VUE_APP_API_URL = 'http://192.168.0.139:10010' diff --git a/admin/src/api/platform/index.js b/admin/src/api/platform/index.js index 21c9200..c0f68ec 100644 --- a/admin/src/api/platform/index.js +++ b/admin/src/api/platform/index.js @@ -1,8 +1,45 @@ import request from '@/utils/request' -// 鏈堝彴鍒楄〃 +// 鑾峰彇鏈堝彴缁勪俊鎭� export function getPlatformGroupList (data) { - return request.post('/visitsAdmin/cloudService/business/platformGroup/getPlatformGroupList', data) + return request.post('/visitsAdmin/cloudService/business/platform/getPlatformGroupList', data) +} +// 鍙彿鍒楄〃 +export function platformCallList (data) { + return request.post('/visitsAdmin/cloudService/business/platform/platformCallList', data) +} +// 鍙彿 +export function platformCallNumber (data) { + return request.post('/visitsAdmin/cloudService/business/platform/platformCallNumber', data) +} +// 寮�濮嬩綔涓� +export function platformBeginWork (data) { + return request.post('/visitsAdmin/cloudService/business/platform/beginWork', data) +} +// 瀹屾垚浣滀笟 +export function platformFinishWork (data) { + return request.post('/visitsAdmin/cloudService/business/platform/finishWork', data) +} +// 杩囧彿 +export function platformOverNumber (data) { + return request.post('/visitsAdmin/cloudService/business/platform/platformOverNumber', data) +} +// 寮傚父鎸傝捣 +export function platformErr (data) { + return request.post('/visitsAdmin/cloudService/business/platform/platformErr', data) +} +// 寮傚父鎸傝捣 +export function platformMove (data) { + return request.post('/visitsAdmin/cloudService/business/platform/platformMove', data) +} +// 鏈堝彴閰嶇疆 +export function updUserPlatformConfig (data) { + return request.get('/visitsAdmin/cloudService/business/platform/updUserPlatformConfig?ids=' + data) +} + +// 鏍规嵁鏈堝彴缁勮幏鍙栨湀鍙板垪琛ㄤ俊鎭� +export function listByGroupId (id) { + return request.get('/visitsAdmin/cloudService/business/platform/listByGroupId?groupId=' + id) } // 鏈堝彴鍒楄〃 缂栬緫 export function PlatformEdit (data) { diff --git a/admin/src/assets/icons/shengyin.png b/admin/src/assets/icons/shengyin.png new file mode 100644 index 0000000..6ef8cce --- /dev/null +++ b/admin/src/assets/icons/shengyin.png Binary files differ diff --git a/admin/src/assets/images/default_nodata.png b/admin/src/assets/images/default_nodata.png new file mode 100644 index 0000000..0b58506 --- /dev/null +++ b/admin/src/assets/images/default_nodata.png Binary files differ diff --git a/admin/src/assets/style/style.scss b/admin/src/assets/style/style.scss index 754466b..91b6a3e 100644 --- a/admin/src/assets/style/style.scss +++ b/admin/src/assets/style/style.scss @@ -138,8 +138,9 @@ .main_app { background-color: #fff; - padding: 30px; - margin: 0 16px; + margin-top: 10px; + margin-left: 16px; + padding: 20px; } .fs12{ font-size: 12px; diff --git a/admin/src/components/common/CommonHeader.vue b/admin/src/components/common/CommonHeader.vue index 5afc768..aa3672e 100644 --- a/admin/src/components/common/CommonHeader.vue +++ b/admin/src/components/common/CommonHeader.vue @@ -4,7 +4,10 @@ <div class="logo"> <div>{{ title }}</div> <div class="list"> - <div class="item">鏈嶅姟涓績</div> + <div class="item active"> + <div>鏈嶅姟涓績</div> + <div class="linellae"></div> + </div> <div class="item">瀹夐槻涓績</div> <div class="item">娑堥槻涓績</div> <div class="item">鑳界涓績</div> @@ -204,6 +207,30 @@ .common-header { background-color: #2080f7; } +.list{ + display: flex; + align-items: center; + margin-left: 60px; + .item{ + margin-right: 40px; + font-size: 16px; + font-weight: 400; + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-start; + height: 40px; + cursor: pointer; + .linellae{ + width: 64px; + height: 2px; + background: #FFFFFF; + } + } + .active{ + font-weight: 500; + } +} .header { overflow: hidden; // background: #fff; diff --git a/admin/src/components/common/GlobalWindow.vue b/admin/src/components/common/GlobalWindow.vue index 64bcabe..4ae9ce1 100644 --- a/admin/src/components/common/GlobalWindow.vue +++ b/admin/src/components/common/GlobalWindow.vue @@ -20,7 +20,7 @@ </div> <div v-if="withFooter" class="window__footer"> <slot name="footer"> - <el-button @click="confirm" :loading="confirmWorking" type="primary">{{text}}</el-button> + <el-button v-if="showConfirm" @click="confirm" :loading="confirmWorking" type="primary">{{text}}</el-button> <slot name="btns" /> <el-button @click="close">{{ backText }}</el-button> </slot> @@ -55,6 +55,10 @@ type: Boolean, default: false }, + showConfirm: { + type: Boolean, + default: true + }, // 鏍囬 title: { type: String, diff --git a/admin/src/components/common/Pagination.vue b/admin/src/components/common/Pagination.vue index 86ea4d2..61d5103 100644 --- a/admin/src/components/common/Pagination.vue +++ b/admin/src/components/common/Pagination.vue @@ -1,7 +1,7 @@ <template> <div class="table-pagination"> <el-pagination - :current-page="pagination.pageIndex" + :current-page="pagination.pageIndex || pagination.page" :page-sizes="pagination.pageSizes||[10, 20, 30, 40]" :page-size="pagination.pageSize" layout="total, sizes, prev, pager, next, jumper" diff --git a/admin/src/components/common/QueryForm/queryForm.vue b/admin/src/components/common/QueryForm/queryForm.vue index 4755b31..9eedeab 100644 --- a/admin/src/components/common/QueryForm/queryForm.vue +++ b/admin/src/components/common/QueryForm/queryForm.vue @@ -191,8 +191,8 @@ align-items: center; background-color: #fff; border-bottom: 10px solid #f7f8f9; - margin: 0 -30px; - padding: 0 0 0 30px; + margin: 0 -20px; + padding: 0 0 0 20px; .el-input, .el-select { diff --git a/admin/src/components/operation/HiddenDangerParam.vue b/admin/src/components/system/operation/HiddenDangerParam.vue similarity index 100% rename from admin/src/components/operation/HiddenDangerParam.vue rename to admin/src/components/system/operation/HiddenDangerParam.vue diff --git a/admin/src/components/operation/OperCarUseBookParamWindow.vue b/admin/src/components/system/operation/OperCarUseBookParamWindow.vue similarity index 100% rename from admin/src/components/operation/OperCarUseBookParamWindow.vue rename to admin/src/components/system/operation/OperCarUseBookParamWindow.vue diff --git a/admin/src/layouts/TableLayout.vue b/admin/src/layouts/TableLayout.vue index 28ab4c7..c33073b 100644 --- a/admin/src/layouts/TableLayout.vue +++ b/admin/src/layouts/TableLayout.vue @@ -6,7 +6,7 @@ <el-breadcrumb-item v-for="path in paths" :key="path">{{path}}</el-breadcrumb-item> </el-breadcrumb> </div>--> - <div style="height:10px;"></div> + <!-- <div style="height:10px;"></div> --> <Profile :roles="roles" :permissions="permissions"> <!-- 鎼滅储琛ㄥ崟閮ㄥ垎 --> <div class="table-search-form"> @@ -60,6 +60,7 @@ height: 100%; display: flex; flex-direction: column; + margin-top: 10px; .not-allow-wrap { padding-top: 0; } @@ -104,7 +105,6 @@ } // 鍒楄〃鍜屽垎椤� .table-content { - margin-top: 10px; padding: 0 16px; .table-wrap { padding: 16px 16px 0 16px; diff --git a/admin/src/layouts/TableLayout1.vue b/admin/src/layouts/TableLayout1.vue index c5070e9..dd2e38d 100644 --- a/admin/src/layouts/TableLayout1.vue +++ b/admin/src/layouts/TableLayout1.vue @@ -110,7 +110,6 @@ } // 鍒楄〃鍜屽垎椤� .table-content { - margin-top: 10px; /*padding: 0 16px;*/ .table-wrap { padding: 16px 16px 0 16px; diff --git a/admin/src/views/platform/components/PlatformQueuing.vue b/admin/src/views/platform/components/PlatformQueuing.vue index 592bbda..4cbc85b 100644 --- a/admin/src/views/platform/components/PlatformQueuing.vue +++ b/admin/src/views/platform/components/PlatformQueuing.vue @@ -2,75 +2,135 @@ <GlobalWindow title="鏈堝彴鍙彿-xx鍙锋湀鍙�" :visible.sync="isShowModal" + :showConfirm="false" width="800px" - :confirm-working="subLoading" - @confirm="handleSub" > <div class="queuing_modal"> <div class="df_ac mb20"> <span>鎼滅储杞﹁締锛�</span> <el-input class="flex1 mr20" - v-model="param.aa" + v-model="carCodeFront" placeholder="璇疯緭鍏ヨ溅鐗屽彿" ></el-input> - <el-button type="primary">鏌ユ壘</el-button> - <el-button>閲嶇疆</el-button> + <el-button type="primary" @click="getList">鏌ユ壘</el-button> + <el-button @click="reset">閲嶇疆</el-button> </div> <div class="list"> - <div class="item"> + <div class="item" v-for="item in dataList" :key="item.id"> <div class="head df_sb"> - <div class="plate">鐨朅12122</div> - <div class="status">宸茬鍒�</div> + <div v-if="item.carCodeFront" class="code"> + <span>{{ item.carCodeFront.slice(0, 1) }}</span> + <span>{{ item.carCodeFront.slice(1, 2) }}</span> + <span>路</span> + <span>{{ item.carCodeFront.slice(2) }}</span> + </div> + <div class="status">{{ statusMap[item.status] }}</div> </div> <div class="info"> - <div class="ite"> + <div v-if="item.type == 4" class="ite"> + <span>鍚堝悓鍗曞彿锛�</span> + <span>{{ item.contractNum }}</span> + </div> + <div v-else class="ite"> <span>杩愯緭鍗曞彿锛�</span> - <span>12312</span> + <span>{{ item.code }}</span> </div> <div class="ite"> <span>椹鹃┒鍛橈細</span> - <span>12312</span> + <span>{{ item.driverName }}</span> </div> <div class="ite"> <span>鎵嬫満鍙凤細</span> - <span>12312</span> + <span>{{ item.drivierPhone }}</span> </div> <div class="ite"> <span>鎬昏繍杈撻噺锛�</span> - <span>12312</span> + <span>{{ item.totalNum }}涓囨敮</span> </div> - <div class="ite" style="width: 66%"> + <div v-if="item.type != 4" class="ite" style="width: 66%"> <span>杩愯緭鍏徃锛�</span> - <span>12312</span> + <span>{{ item.carrierName }}</span> </div> </div> <div class="footer df_sb"> - <div class="detail">杩愬崟璇︽儏</div> - <el-button type="primary">鍙彿</el-button> + <div v-if="item.type != 4" class="detail">杩愬崟璇︽儏</div> + <div v-else></div> + <el-button type="primary" @click="handleCall(item)">鍙彿</el-button> </div> </div> </div> + <pagination + @size-change="handleSizeChange" + @current-change="handlePageChange" + :pagination="pagination" + > + </pagination> </div> </GlobalWindow> </template> <script> import GlobalWindow from '@/components/common/GlobalWindow' -import { getPlatform, PlatformEdit, PlatformDel } from '@/api' +import Pagination from '@/components/common/Pagination' +import { platformCallList, platformCallNumber } from '@/api' +import { statusMap } from '../config' +import { Message } from 'element-ui' export default { components: { - GlobalWindow + GlobalWindow, + Pagination }, data () { return { + statusMap, isShowModal: false, subLoading: false, - param: {} + pagination: { + total: 0, + pageSize: 10, + page: 1 + }, + carCodeFront: '', + activePlat: {}, + dataList: [] } }, methods: { + handleCall (item) { + const activePlatform = this.activePlat + platformCallNumber({ platformId: activePlatform.id, jobId: item.id }).then(res => { + Message.success('鍙彿鎴愬姛') + this.$emit('success') + this.getList() + }) + }, + getList () { + const { activePlat, pagination, carCodeFront } = this + platformCallList({ + model: { callType: '2', platformId: activePlat.id, carCodeFront }, + page: pagination.page, + capacity: pagination.pageSize + }).then(res => { + this.dataList = res.records + this.pagination.total = res.total + }) + }, + reset () { + this.carCodeFront = '' + this.pagination.page = 1 + this.pagination.pageSize = 10 + this.getList() + }, + handleSizeChange (e) { + this.pagination.pageSize = e + this.getList() + }, + handlePageChange (e) { + this.pagination.page = e + this.getList() + }, handleSub () { const { param } = this this.subLoading = true @@ -84,7 +144,7 @@ }, () => { this.subLoading = false }) - }, + } } } @@ -116,6 +176,28 @@ .status { color: $primaryColor; } + .code { + display: flex; + font-weight: 600; + height: 30px; + line-height: 30px; + font-size: 15px; + color: #111111; + background-color: #fff; + 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; + } + } + } } .info { display: flex; diff --git a/admin/src/views/platform/config.js b/admin/src/views/platform/config.js new file mode 100644 index 0000000..e4a6ab5 --- /dev/null +++ b/admin/src/views/platform/config.js @@ -0,0 +1,14 @@ +export const statusMap = { + 0: '寰呯‘璁�', + 1: '寰呯鍒�', + 2: '绛夊緟鍙彿', + 3: '鍏ュ洯绛夊緟', + 4: '鏈堝彴绛夊緟', // 宸插彨鍙� + 5: '浣滀笟涓�', + 6: '浣滀笟瀹屾垚', + 7: '杞Щ涓�', + 8: '寮傚父鎸傝捣', + 9: '宸叉巿鏉冪鍥�', + 10: '宸茬鍥�', + 11: '宸茶繃鍙�' +} diff --git a/admin/src/views/platform/index.vue b/admin/src/views/platform/index.vue index 7bc61bf..7e712e4 100644 --- a/admin/src/views/platform/index.vue +++ b/admin/src/views/platform/index.vue @@ -1,155 +1,394 @@ <template> <div class="main_app"> - <div class="mb20"> - <el-select v-model="platformId" @change="getList()"> - <el-option v-for="item in PlatformList" :key="item.id" :value="item.id" :label="item.name" /> - </el-select> + <div class="mb20 main_header"> + <div class="platgroup_tabs"> + <div + class="tab" + :class="{ active: activeGroup.id === item.id }" + @click="platgroupClick(item)" + 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> <!-- --> - <div class="platform_list"> - <div class="item" v-for="i in 2"> + <div v-if="activeGroup.platformList" class="platform_list"> + <div class="item" :class="{ emyty: item.workStatus == 0 }" v-for="(item, i) in activeGroup.platformList" :key="i"> <div class="head"> <div class="left"> - <div class="status mr10">浣滀笟涓�</div> - <div class="name">6鍙锋湀鍙�</div> + <div class="status mr10"> + {{ item.workStatus == "0" ? "绌洪棽" : "浣滀笟涓�" }} + </div> + <div class="name">{{ item.name }}</div> <div class="ite"> - <span class="placeholder9">浣滀笟锛�</span><span>1</span> + <span class="placeholder9">浣滀笟锛�</span + ><span>{{ item.platformWorkVO.workNum }}</span> </div> <div class="ite"> - <span class="placeholder9">浣滀笟锛�</span><span>1</span> + <span class="placeholder9">宸插彨锛�</span + ><span>{{ item.platformWorkVO.callNum }}</span> </div> <div class="ite"> - <span class="placeholder9">浣滀笟锛�</span><span class="red">1</span> + <span class="placeholder9">绛夊緟锛�</span + ><span>{{ item.platformWorkVO.waitNum }}</span> + </div> + <div class="ite"> + <span class="placeholder9">寮傚父锛�</span + ><span class="red">{{ item.platformWorkVO.exceptionNum }}</span> </div> </div> - <el-button type="primary" @click="handleQueuing()">鍙彿</el-button> + <el-button type="primary" @click="handleQueuing(item)"> + <div class="df_ac"> + <img class="shengyin" src="@/assets/icons/shengyin.png" alt=""> + <span>鍙彿</span> + </div> + </el-button> </div> - <div class="list"> - <div class="info" v-for="j in 3"> + <div + class="list" + v-if="item.platformWorkVO && item.platformWorkVO.platformJobList" + > + <div + class="info" + v-for="task in item.platformWorkVO.platformJobList" + :key="task.id" + > <div class="line"> <div class="left"> - <span class="plate">鐨朅12122</span> + <div v-if="task.carCodeFront" class="code"> + <span>{{ task.carCodeFront.slice(0, 1) }}</span> + <span>{{ task.carCodeFront.slice(1, 2) }}</span> + <span>路</span> + <span>{{ task.carCodeFront.slice(2) }}</span> + </div> </div> <div class="right"> - <span class="green">浣滀笟涓�</span> - <span class="green ml20">23鍒嗛挓26绉�</span> + <div + class="status" + v-if="task.status != 4 && task.status != 5" + :class="{ red: task.status == 8 }" + > + <span class="lab">{{ statusMap[task.status] }}</span> + </div> + <div class="status" v-if="task.status == 4"> + <span class="lab">鍙彿涓�</span> {{ task.callDateTemp }} + </div> + <div class="status scs" v-if="task.status == 5"> + <span class="lab">宸蹭綔涓�</span> {{ task.startDateTemp }} + </div> </div> </div> <div class="line"> - <div class="ite"> + <div v-if="task.type == 4" class="ite"> + <span>鍚堝悓鍗曞彿锛�</span> + <span>{{ task.contractNum }}</span> + </div> + <div v-else class="ite"> <span>杩愯緭鍗曞彿锛�</span> - <span>202020</span> + <span>{{ task.code }}</span> </div> <div class="ite"> <span>椹鹃┒鍛橈細</span> - <span>202020</span> + <span>{{ task.driverName }}</span> </div> <div class="ite"> <span>鎵嬫満鍙凤細</span> - <span>202020</span> + <span>{{ task.drivierPhone }}</span> </div> <div class="ite"> <span>鎬昏繍杈撻噺锛�</span> - <span>202020</span> + <span>{{ task.totalNum }}涓囨敮</span> </div> - <div class="ite" style="width: 66.6%"> + <div v-if="task.type != 4" class="ite" style="width: 66.6%"> <span>杩愯緭鍏徃锛�</span> - <span>20202dasd鐜╁効鐜╁効鐜╁効棰濆 棰濆0</span> + <span>{{ task.carrierName }}</span> </div> <div class="ite"></div> </div> <div class="line"> - <div class="left"> + <div v-if="task.type != 4" class="left"> <span class="primaryColor pointer" @click="handleDetail" >杩愬崟璇︽儏</span > </div> + <div v-else></div> <div class="right"> - <el-button type="primary" @click="handleFinish()" + <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" + @click="handleFinish(task)" >浣滀笟瀹屾垚</el-button > - <el-button plain>杞Щ鏈堝彴</el-button> - <el-button plain>寮傚父鎸傝捣</el-button> + <el-button + v-if="task.status == 4" + type="primary" + @click="handleWork(task)" + >寮�濮嬩綔涓�</el-button + > </div> </div> </div> </div> + <div v-if="!item.platformWorkVO.platformJobList || item.platformWorkVO.platformJobList.length == 0" class="empty_plat"> + <img src="@/assets/images/default_nodata.png" alt=""> + <div>鏆傛棤杞﹁締</div> + </div> </div> </div> <!-- 閰嶇疆鏄剧ず鏈堝彴 --> - <el-dialog + <GlobalWindow title="閰嶇疆鏄剧ず鏈堝彴" :visible.sync="isShowSet" - center - width="420px" + :confirm-working="setLoading" + @confirm="handleSetSub" + width="560px" > <div class="set_modal"> - <div class="mb20"> - <div class="title">鍏ュ簱鏈堝彴缁�</div> + <div class="mb10" v-for="group in PlatGroupList" :key="group.id"> + <div class="title">{{group.name}}</div> <div class="list"> - <div class="item active">1鍙锋湀鍙�</div> - <div class="item">2鍙锋湀鍙�</div> - <div class="item">1鍙锋湀鍙�</div> - <div class="item">2鍙锋湀鍙�</div> - </div> - </div> - <div> - <div class="title">鍏ュ簱鏈堝彴缁�</div> - <div class="list"> - <div class="item">1鍙锋湀鍙�</div> - <div class="item">2鍙锋湀鍙�</div> - <div class="item">1鍙锋湀鍙�</div> - <div class="item">2鍙锋湀鍙�</div> + <div class="item" @click="platformSetClick(item.id)" :class="{ active: item.showConfig }" v-for="item in group.platformList" :key="item.id"> + <div>{{item.name}}</div> + <div v-if="item.showConfig" class="bg"></div> + <i v-if="item.showConfig" class="el-icon-check scs"></i> + </div> </div> </div> </div> - <span slot="footer" class="dialog-footer"> - <el-button @click="setReset">閲嶇疆</el-button> - <el-button type="primary" @click="setSub">纭畾</el-button> - </span> - </el-dialog> + </GlobalWindow> <!-- 杩愬崟璇︽儏 --> <!-- --> <!-- 鍙彿 --> - <PlatformQueuing ref="PlatformQueuingRef" v-if="isShowQueuing" @success="getList" @close="isShowQueuing = false" /> - <WaybillDetail ref="WaybillDetailRef" v-if="isShowDetail" @success="getList" @close="isShowDetail = false" /> + <PlatformQueuing + ref="PlatformQueuingRef" + v-if="isShowQueuing" + @success="getPlatGroupList" + @close="isShowQueuing = false" + /> + <WaybillDetail + ref="WaybillDetailRef" + v-if="isShowDetail" + @success="getList" + @close="isShowDetail = false" + /> + <el-dialog + title="杞Щ鏈堝彴" + :visible.sync="isShowTransform" + width="500px" + style="margin-top: 12vh" + > + <div class="df_ac"> + <span>閫夋嫨杞Щ鍒扮殑鏈堝彴锛�</span> + <el-select v-model="activePlatId"> + <el-option + v-for="item in activeGroup.platformList" + :key="item.id" + :label="item.name" + :value="item.id" + > + </el-option> + </el-select> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="isShowTransform = false">鍙栨秷</el-button> + <el-button type="primary" @click="transformSub">纭畾</el-button> + </span> + </el-dialog> </div> </template> <script> -import { getPlatform, getPlatformJob } from '@/api' +import { + getPlatformGroupList, + platformBeginWork, + platformFinishWork, + platformOverNumber, + platformErr, + platformMove, + updUserPlatformConfig, + + listByGroupId +} from '@/api' import PlatformQueuing from './components/PlatformQueuing.vue' import WaybillDetail from './components/WaybillDetail.vue' +import GlobalWindow from '@/components/common/GlobalWindow' +import dayjs from 'dayjs' +import duration from 'dayjs/plugin/duration' +import { Message } from 'element-ui' +import { statusMap } from './config' +dayjs.extend(duration) export default { components: { PlatformQueuing, - WaybillDetail + WaybillDetail, + GlobalWindow }, data () { return { - platformId: '', - PlatformList: [], - dataList: [], + statusMap, + activeGroup: {}, + PlatGroupList: [], + platList: [], + platCallList: [], + isShowTransform: false, + activePlatId: '', // 杞Щ鏈堝彴 + activetaskId: '', isShowSet: false, // 鏈堝彴閰嶇疆 + setLoading: false, + setParam: {}, isShowDetail: false, // 杩愬崟璇︽儏 detail: {}, - isShowQueuing: false + isShowQueuing: false, + timer: null } }, created () { - this.getPlatList() - this.getList() + this.getPlatGroupList() + // this.getList() }, methods: { - handleQueuing (row) { + handleWork (item) { + platformBeginWork({ jobId: item.id }).then(res => { + Message.success('宸插紑濮嬩綔涓�') + this.getPlatGroupList() + }) + }, + handleFinish (item) { + platformFinishWork({ jobId: item.id }).then(res => { + Message.success('瀹屾垚浣滀笟') + this.getPlatGroupList() + }) + }, + handleTransform (item, task) { + this.activePlatId = item.id + this.activetaskId = task.id + this.isShowTransform = true + }, + transformSub () { + const { activePlatId, activetaskId } = this + platformMove({ platformId: activePlatId, jobId: activetaskId }).then(res => { + Message.success('杞Щ鏈堝彴鎴愬姛') + this.isShowTransform = false + this.getPlatGroupList() + }) + }, + handlePass (item) { + this.$confirm('鎮ㄧ‘璁よ瀵硅浠诲姟杩涜杩囧彿鍚�', '娓╅Θ鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + platformOverNumber({ jobId: item.id }).then(ress => { + Message.success('杩囧彿鎴愬姛') + this.getPlatGroupList() + }) + }) + }, + handleErr (item) { + this.$confirm('鎮ㄧ‘璁よ瀵硅浠诲姟杩涜寮傚父鎸傝捣鍚�', '娓╅Θ鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + platformErr({ jobId: item.id }).then(ress => { + Message.success('寮傚父鎸傝捣鎴愬姛') + this.getPlatGroupList() + }) + }) + }, + platgroupClick (item) { + this.activeGroup = { ...item } + this.circulInitTaskList() + this.timer = setInterval(() => { + this.circulInitTaskList() + }, 1000) + }, + getPlatGroupList () { + getPlatformGroupList({ + queryData: 1, + queryType: 1 + }).then(res => { + this.PlatGroupList = res || [] + if (res.length > 0) { + if (this.activeGroup && this.activeGroup.id) { + this.activeGroup = res.find(item => item.id === this.activeGroup.id) + } else { + this.activeGroup = res[0] + } + this.circulInitTaskList() + this.timer = setInterval(() => { + this.circulInitTaskList() + }, 1000) + } + }) + }, + circulInitTaskList () { + if (this.activeGroup && this.activeGroup.platformList && this.activeGroup.platformList.length > 0) { + const time = new Date() + 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 (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 (timeNum > 3600000) { + item.startDateTemp = dayjs.duration(timeNum).format('H灏忔椂m鍒唖s绉�') + } else { + item.startDateTemp = dayjs.duration(timeNum).format('m鍒唖绉�') + } + } + }) + } + }) + this.$forceUpdate() + } + }, + handleQueuing (item) { this.isShowQueuing = true this.$nextTick(() => { this.$refs.PlatformQueuingRef.isShowModal = true + this.$refs.PlatformQueuingRef.activePlat = { ...item } + this.$refs.PlatformQueuingRef.getList() }) }, handleDetail () { @@ -159,32 +398,44 @@ }) }, getList () { - const { platformId } = this - getPlatformJob({ - model: { platformId } - }).then(res => { - this.dataList = res.records - }) - }, - handleFinish (item) { - this.$confirm('楂樻灦搴�6鍙锋湀鍙� 鐨朅12345 浣滀笟缁撴潫', '娓╅Θ鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning' - }) - }, - getPlatList () { - getPlatform({ - model: {} - }).then(res => { - this.PlatformList = res.records + const { groupId } = this + listByGroupId(groupId).then(res => { + this.platList = res }) }, handleSet () { this.isShowSet = true }, - setReset () { }, - setSub () { } + handleSetSub () { + const { PlatGroupList } = this + const ids = [] + PlatGroupList.forEach(item => { + item.platformList.forEach(platform => { + if (platform.showConfig) { + ids.push(platform.id) + } + }) + }) + this.setLoading = true + updUserPlatformConfig(ids).then(res => { + this.setLoading = false + Message.success('鏇存柊鎴愬姛') + this.isShowSet = false + this.getPlatGroupList() + }, () => { + this.setLoading = false + }) + }, + platformSetClick (id) { + const { PlatGroupList } = this + PlatGroupList.forEach(item => { + item.platformList.forEach(platform => { + if (platform.id === id) { + platform.showConfig = !platform.showConfig + } + }) + }) + } } } </script> @@ -192,20 +443,27 @@ <style lang="scss" scoped> @import "@/assets/style/variables.scss"; .platform_list { + width: 100%; .item { /* padding: 16px 24px; */ background: #ffffff; border-radius: 2px; border: 1px solid #dfe2e8; margin-bottom: 12px; + width: 100%; .head { display: flex; justify-content: space-between; align-items: center; height: 50px; - background: linear-gradient(270deg, #ffffff 0%, #ebf6f7 100%); + background: linear-gradient( 270deg, #FFFFFF 0%, #EBF6F7 100%); border-radius: 2px 2px 0px 0px; - padding: 0 28px; + padding: 0 20px; + .shengyin{ + width: 12px; + height: 12px; + margin-right: 3px; + } .left { flex: 1; display: flex; @@ -217,10 +475,10 @@ .status { line-height: 25px; height: 25px; - padding: 0 4px; background: #00ba67; border-radius: 2px; color: #ffffff; + padding: 0 6px; } .ite { margin-right: 30px; @@ -233,37 +491,53 @@ justify-content: space-between; margin-top: 10px; padding: 16px; + width: calc( 100% - 48px ); .info { - background: #effbf5; + background: #f4fafb; border-radius: 2px; border: 1px solid #dfe2e8; padding: 16px; border-radius: 2px; margin-bottom: 10px; - width: 30%; + width: calc( 31.6% - 16px ); + .status { + .lab { + font-weight: 500; + } + color: #00ba67; + } .line { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 6px; - span { - &:nth-child(1) { - color: #999999; - } - } .ite { width: 33.3%; margin-top: 8px; } .left { - .plate { + .code { + display: flex; + font-weight: 600; + height: 30px; + line-height: 30px; font-size: 15px; color: #111111; - padding: 4px 5px; - font-weight: 700; - border: 1px solid #279baa; background-color: #fff; + 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; + } + } } } .right { @@ -272,16 +546,69 @@ } } } + .jobing { + background: #effbf5; + .status { + color: #00ba67; + } + } + .err { + background: #fef6f6; + .status { + color: #ed4545; + } + } + } + .empty_plat{ + width: 100%; + height: 170px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + font-size: 12px; + color: #B2B2B2; + img{ + width: 110px; + } + } + } + .emyty{ + .head{ + background: linear-gradient( 270deg, #FFFFFF 0%, #F7F7F7 100%) !important; + } + .status{ + background: #CCCCCC !important; } } } - -.main_head { +.main_header { display: flex; - justify-content: space-between; - align-items: center; - .tabs { + position: relative; + .platgroup_tabs { flex: 1; + display: flex; + border-bottom: 1px solid #dfe2e8; + .tab { + color: #666666; + margin-right: 40px; + cursor: pointer; + padding-bottom: 18px; + border-bottom: 2px solid #fff; + } + .active { + font-weight: 500; + font-size: 15px; + color: #222222; + border-bottom: 2px solid $primary-color; + } + } + .ml20 { + position: absolute; + width: 120px; + height: 36px; + right: 0; + top: -4px; } } /* */ @@ -293,23 +620,42 @@ } .list { display: flex; - justify-content: space-between; flex-wrap: wrap; .item { cursor: pointer; - width: 30%; - height: 32px; + padding: 0 36px; + height: 36px; border: 1px solid #dfe2e8; display: flex; justify-content: center; align-items: center; border-radius: 2px; - margin-bottom: 12px; + margin-bottom: 10px; + margin-right: 13px; + position: relative; + overflow: hidden; + .bg{ + position: absolute; + right: -12px; + bottom: -12px; + width: 24px; + height: 24px; + background: $primaryColor; + transform: rotate(45deg); + } + .scs{ + position: absolute; + right: -1px; + bottom: -1px; + color: #fff; + z-index: 99999; + transform:scale(.8) + } } .active { - background: rgba(39, 155, 170, 0.06); - border: 1px solid #279baa; - color: #279baa; + background: rgba(39,155,170,0.06); + border: 1px solid $primaryColor; + color: $primaryColor; } } } diff --git a/admin/src/views/platform/queueUp.vue b/admin/src/views/platform/queueUp.vue index 9ad3106..78ced3e 100644 --- a/admin/src/views/platform/queueUp.vue +++ b/admin/src/views/platform/queueUp.vue @@ -1,129 +1,30 @@ <template> <div class="main_app"> - <div class="df_ac mb20"> - <el-select v-model="filters.currentPlatform" class="w300"> - <el-option v-for="item in platformList" :key="item.id"></el-option> - </el-select> - <el-input v-model="filters.id" placeholder="杞︾墝鍙�" class="ml20 w200" /> - <el-button type="primary" class="ml20" @click="getList()">鏌ヨ</el-button> - <el-button class="ml20" @click="clear">閲嶇疆</el-button> + <div class="mb20 main_header"> + <div class="platgroup_tabs"> + <div + class="tab" + :class="{ active: activeGroup.id === item.id }" + @click="platgroupClick(item)" + v-for="(item, i) in PlatGroupList" + :key="i" + > + {{ item.name }} + </div> </div> - <!-- --> - <div class="platform_list"> - <div class="item" v-for="i in 2"> - <div class="head"> - <div class="name">6鍙锋湀鍙�</div> - <div class="status"> - <span class="green">浣滀笟涓�</span> - <span class="">浣滀笟锛�1</span> - <span>鍙彿锛�1</span> - <span>绛夊緟锛�1</span> - <span class="red">寮傚父锛�1</span> - </div> - <!-- <el-button type="primary">鍙彿</el-button> --> - </div> - <div class="info" v-for="j in 3"> - <div class="line"> - <div class="left"> - <span class="plate mr20">鐨朅12122</span> - <span class="placeholder9">椹鹃┒鍛�</span> - <span>鐜嬫煇鏌�</span> - <span>18888888888</span> - </div> - <div class="right"> - <span class="green">浣滀笟涓�</span> - <span class="placeholder9 ml20">浣滀笟鏃堕暱锛�23鍒嗛挓26绉�</span> - </div> - </div> - <div class="line"> - <div class="left"> - <div> - <span>杩愯緭鍗曞彿</span - ><span class="ml10 placeholder9">1231231</span> - </div> - <div> - <span>鎬昏繍杈撻噺</span - ><span class="ml10 placeholder9">3000涓囨敮</span - ><span class="primaryColor ml10 pointer">杩愬崟璇︽儏</span> - </div> - </div> - </div> - </div> - </div> </div> - <!-- 閰嶇疆鏄剧ず鏈堝彴 --> - <el-dialog - title="閰嶇疆鏄剧ず鏈堝彴" - :visible.sync="isShowSet" - center - width="420px" - > - <div class="set_modal"> - <div class="mb20"> - <div class="title">鍏ュ簱鏈堝彴缁�</div> - <div class="list"> - <div class="item">1鍙锋湀鍙�</div> - <div class="item">2鍙锋湀鍙�</div> - <div class="item">1鍙锋湀鍙�</div> - <div class="item">2鍙锋湀鍙�</div> - </div> - </div> - <div> - <div class="title">鍏ュ簱鏈堝彴缁�</div> - <div class="list"> - <div class="item">1鍙锋湀鍙�</div> - <div class="item">2鍙锋湀鍙�</div> - <div class="item">1鍙锋湀鍙�</div> - <div class="item">2鍙锋湀鍙�</div> - </div> - </div> - </div> - <span slot="footer" class="dialog-footer"> - <el-button @click="setReset">閲嶇疆</el-button> - <el-button type="primary" @click="setSub">纭畾</el-button> - </span> - </el-dialog> - <!-- 杩愬崟璇︽儏 --> - <el-dialog - title="閰嶇疆鏄剧ず鏈堝彴" - :visible.sync="isShowSet" - center - width="420px" - > - <div class="set_modal"> - <div class="mb20"> - <div class="title">鍏ュ簱鏈堝彴缁�</div> - <div class="list"> - <div class="item">1鍙锋湀鍙�</div> - <div class="item">2鍙锋湀鍙�</div> - <div class="item">1鍙锋湀鍙�</div> - <div class="item">2鍙锋湀鍙�</div> - </div> - </div> - <div> - <div class="title">鍏ュ簱鏈堝彴缁�</div> - <div class="list"> - <div class="item">1鍙锋湀鍙�</div> - <div class="item">2鍙锋湀鍙�</div> - <div class="item">1鍙锋湀鍙�</div> - <div class="item">2鍙锋湀鍙�</div> - </div> - </div> - </div> - <span slot="footer" class="dialog-footer"> - <el-button @click="setReset">閲嶇疆</el-button> - <el-button type="primary" @click="setSub">纭畾</el-button> - </span> - </el-dialog> </div> </template> <script> +import { + getPlatformGroupList +} from '@/api' export default { data () { return { filters: {}, - platformList: [], + PlatGroupList: [], isShowSet: false, // 鏈堝彴閰嶇疆 setParam: {}, @@ -131,7 +32,18 @@ detail: {} } }, + created () { + this.getPlatGroupList() + }, methods: { + getPlatGroupList () { + getPlatformGroupList({ + queryData: 1, + queryType: 1 + }).then(res => { + this.PlatGroupList = res || [] + }) + }, getList () { }, clear () { } } diff --git a/h5/pages/driver/index.vue b/h5/pages/driver/index.vue index 46a3d5e..f8350f4 100644 --- a/h5/pages/driver/index.vue +++ b/h5/pages/driver/index.vue @@ -11,7 +11,7 @@ <image class="banner" src="../../static/driver/wuliuche_banner@2x.png" mode="widthFix"></image> </view> <!-- --> - <view class="task_list"> + <view v-if="taskList && taskList.length > 0" class="task_list"> <swiper circular class="task_swiper"> <swiper-item v-for="item in taskList" :key="item.id" @click="taskClick(item)"> <view class="item"> diff --git a/pda/pages/index/center.vue b/pda/pages/index/center.vue index 6278be5..a1aaff3 100644 --- a/pda/pages/index/center.vue +++ b/pda/pages/index/center.vue @@ -109,7 +109,7 @@ v-if="item.status == 5 || item.status == 8" class="btn active" @click="handleFinish(item)" - >瀹屾垚浣滀笟</view + >浣滀笟瀹屾垚</view > </view> </view> -- Gitblit v1.9.3