From deb2a67c1a9824b288ce4a7a228347ffd60964fe Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期二, 24 九月 2024 18:25:08 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- admin/src/views/platform/components/PlatformQueuing.vue | 77 ++++++++++++++++++++++---------------- 1 files changed, 44 insertions(+), 33 deletions(-) diff --git a/admin/src/views/platform/components/PlatformQueuing.vue b/admin/src/views/platform/components/PlatformQueuing.vue index d32f32e..c175a11 100644 --- a/admin/src/views/platform/components/PlatformQueuing.vue +++ b/admin/src/views/platform/components/PlatformQueuing.vue @@ -1,18 +1,10 @@ <template> - <GlobalWindow - :title="'鏈堝彴鍙彿-'+title" - :visible.sync="isShowModal" - :showConfirm="false" - width="800px" - > + <GlobalWindow :title="callType == 1 ? '鍙彿鍏ュ洯-' + title : '鏈堝彴鍙彿-' + title" :visible.sync="isShowModal" + :showConfirm="false" width="800px"> <div class="queuing_modal"> <div class="df_ac mb20"> <span>鎼滅储杞﹁締锛�</span> - <el-input - class="flex1 mr20" - v-model="carCodeFront" - placeholder="璇疯緭鍏ヨ溅鐗屽彿" - ></el-input> + <el-input class="flex1 mr20" v-model="carCodeFront" placeholder="璇疯緭鍏ヨ溅鐗屽彿"></el-input> <el-button type="primary" @click="getList">鏌ユ壘</el-button> <el-button @click="reset">閲嶇疆</el-button> </div> @@ -34,7 +26,7 @@ </div> <div v-else class="ite"> <span>杩愯緭鍗曞彿锛�</span> - <span>{{ item.code }}</span> + <span>{{ item.billCode }}</span> </div> <div class="ite"> <span>椹鹃┒鍛橈細</span> @@ -60,11 +52,7 @@ </div> </div> </div> - <pagination - @size-change="handleSizeChange" - @current-change="handlePageChange" - :pagination="pagination" - > + <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="pagination"> </pagination> </div> </GlobalWindow> @@ -73,7 +61,7 @@ <script> import GlobalWindow from '@/components/common/GlobalWindow' import Pagination from '@/components/common/Pagination' -import { platformCallList, platformCallNumber } from '@/api' +import { platformCallList, platformCallNumber, platformInPark } from '@/api' import { statusMap } from '../config' import { Message } from 'element-ui' export default { @@ -81,7 +69,7 @@ GlobalWindow, Pagination }, - data () { + data() { return { statusMap, isShowModal: false, @@ -93,24 +81,35 @@ }, carCodeFront: '', title: '', + callType: '1', 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() - }) + handleCall(item) { + const { activePlat, callType } = this + if (callType == 1) { // 鍏ュ洯鍙彿 + platformInPark({ + jobId: item.id, + platformId: activePlat.id + }).then(() => { + Message.success('鍙彿鎴愬姛') + this.getList() + }) + } else { + platformCallNumber({ platformId: activePlat.id, jobId: item.id }).then(res => { + Message.success('鍙彿鎴愬姛') + this.$emit('success') + this.getList() + }) + } }, - getList () { - const { activePlat, pagination, carCodeFront } = this + getList() { + const { activePlat, pagination, carCodeFront, callType } = this platformCallList({ - model: { callType: '2', platformId: activePlat.id, carCodeFront }, + model: { callType, platformId: activePlat.id, carCodeFront }, page: pagination.page, capacity: pagination.pageSize }).then(res => { @@ -118,21 +117,21 @@ this.pagination.total = res.total }) }, - reset () { + reset() { this.carCodeFront = '' this.pagination.page = 1 this.pagination.pageSize = 10 this.getList() }, - handleSizeChange (e) { + handleSizeChange(e) { this.pagination.pageSize = e this.getList() }, - handlePageChange (e) { + handlePageChange(e) { this.pagination.page = e this.getList() }, - handleSub () { + handleSub() { const { param } = this this.subLoading = true PlatformEdit({ @@ -153,8 +152,10 @@ <style lang="scss" scoped> @import "@/assets/style/variables.scss"; + .queuing_modal { padding: 10px 30px; + .list { .item { background: #f4fafb; @@ -162,8 +163,10 @@ border: 1px solid #dfe2e8; margin-bottom: 10px; padding: 16px; + .head { margin-bottom: 15px; + .plate { width: 90px; text-align: center; @@ -174,9 +177,11 @@ border: 1px solid #279baa; background-color: #fff; } + .status { color: $primaryColor; } + .code { display: flex; font-weight: 600; @@ -188,24 +193,29 @@ 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; flex-wrap: wrap; + .ite { width: 33.3%; margin-bottom: 8px; + span { &:nth-child(1) { color: #666666; @@ -213,6 +223,7 @@ } } } + .footer { .detail { color: $primaryColor; -- Gitblit v1.9.3