|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <div class="main_app"> | 
|---|
|  |  |  | <div class="main_app" style="overflow-y: auto;height: calc(100% - 100px);"> | 
|---|
|  |  |  | <div class="mb20 main_header"> | 
|---|
|  |  |  | <div class="platgroup_tabs"> | 
|---|
|  |  |  | <div class="tab" :class="{ active: activeGroup.id === item.id }" @click="platgroupClick(item)" | 
|---|
|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="right"> | 
|---|
|  |  |  | <el-button v-if="task.status == 5" plain @click="handleErr(task)">异常挂起</el-button> | 
|---|
|  |  |  | <el-button v-if="task.status == 8" plain @click="restore(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-preventReClick :loading="loadingFinish" v-if="task.status == 5 || task.status == 8" type="primary" | 
|---|
|  |  |  | @click="handleFinish(task)">作业完成</el-button> | 
|---|
|  |  |  | <el-button v-preventReClick :loading="loadingOpen" v-if="task.status == 4" type="primary" @click="handleWork(task)">开始作业</el-button> | 
|---|
|  |  |  | <el-button v-preventReClick :loading="loadingFinish" v-if="task.status == 5 || task.status == 8" | 
|---|
|  |  |  | type="primary" @click="handleFinish(task)">作业完成</el-button> | 
|---|
|  |  |  | <el-button v-preventReClick :loading="loadingOpen" v-if="task.status == 4" type="primary" | 
|---|
|  |  |  | @click="handleWork(task)">开始作业</el-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | platformMove, | 
|---|
|  |  |  | updUserPlatformConfig, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | listByGroupId | 
|---|
|  |  |  | listByGroupId, | 
|---|
|  |  |  | restoreWork | 
|---|
|  |  |  | } from '@/api' | 
|---|
|  |  |  | import PlatformQueuing from './components/PlatformQueuing.vue' | 
|---|
|  |  |  | import WaybillDetail from './components/WaybillDetail.vue' | 
|---|
|  |  |  | 
|---|
|  |  |  | detail: {}, | 
|---|
|  |  |  | isShowQueuing: false, | 
|---|
|  |  |  | timer: null, | 
|---|
|  |  |  | timer2: null, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | loadingOpen: false, | 
|---|
|  |  |  | loadingFinish: false, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | created() { | 
|---|
|  |  |  | setInterval(() => { | 
|---|
|  |  |  | this.timer2 = setInterval(() => { | 
|---|
|  |  |  | this.getPlatGroupList() | 
|---|
|  |  |  | }, 1000 * 20) | 
|---|
|  |  |  | this.getPlatGroupList() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | beforeDestroy() { | 
|---|
|  |  |  | if (this.timer2) { | 
|---|
|  |  |  | clearInterval(this.timer2) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (this.timer) { | 
|---|
|  |  |  | clearInterval(this.timer) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | handleWork(item) { | 
|---|
|  |  |  | 
|---|
|  |  |  | this.loadingFinish = false | 
|---|
|  |  |  | Message.success('完成作业') | 
|---|
|  |  |  | this.getPlatGroupList() | 
|---|
|  |  |  | },() => { | 
|---|
|  |  |  | }, () => { | 
|---|
|  |  |  | this.loadingFinish = false | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 
|---|
|  |  |  | }).then(() => { | 
|---|
|  |  |  | platformErr({ jobId: item.id }).then(ress => { | 
|---|
|  |  |  | Message.success('异常挂起成功') | 
|---|
|  |  |  | this.getPlatGroupList() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | restore(item) { | 
|---|
|  |  |  | this.$confirm('您确认要对该任务进行恢复作业吗', '温馨提示', { | 
|---|
|  |  |  | confirmButtonText: '确定', | 
|---|
|  |  |  | cancelButtonText: '取消', | 
|---|
|  |  |  | type: 'warning' | 
|---|
|  |  |  | }).then(() => { | 
|---|
|  |  |  | restoreWork({ jobId: item.id }).then(ress => { | 
|---|
|  |  |  | Message.success('恢复作业成功') | 
|---|
|  |  |  | this.getPlatGroupList() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | 
|---|
|  |  |  | @import "@/assets/style/variables.scss"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .platform_list { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | width: calc(100% - 20px); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .item { | 
|---|
|  |  |  | /* padding: 16px 24px; */ | 
|---|