| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="main_content"> |
| | | <view class="title" |
| | | >安泰物流装货平台<u-icon |
| | | <view class="title" @click="showPlatformgroup = true" |
| | | >{{ activePlatformGroup.name }}<u-icon |
| | | name="arrow-down" |
| | | size="20" |
| | | class="ml12" |
| | |
| | | <view class="platform_list"> |
| | | <view |
| | | class="item" |
| | | :class="{ active: index === 0 }" |
| | | v-for="(i, index) in 8" |
| | | :key="i" |
| | | >1号月台</view |
| | | :class="{ active: item.id === activePlatformId }" |
| | | v-for="(item, index) in activePlatformGroup.platformList" |
| | | :key="index" |
| | | @click="platformClick(item.id)" |
| | | >{{ item.name }}</view |
| | | > |
| | | </view> |
| | | <view class="status_wrap"> |
| | | <view class="status" |
| | | >作业:<text>{{ 0 }}</text></view |
| | | >作业:<text>{{ platformTaskInfo.workNum }}</text></view |
| | | > |
| | | <view class="status" |
| | | >已叫:<text>{{ 0 }}</text></view |
| | | >已叫:<text>{{ platformTaskInfo.callNum }}</text></view |
| | | > |
| | | <view class="status" |
| | | >等待:<text>{{ 0 }}</text></view |
| | | >等待:<text>{{ platformTaskInfo.waitNum }}</text></view |
| | | > |
| | | <view class="status" |
| | | >异常:<text>{{ 0 }}</text></view |
| | | >异常:<text>{{ platformTaskInfo.exceptionNum }}</text></view |
| | | > |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <!-- --> |
| | | <u-picker :show="showPlatformgroup" keyName="name" :columns="[platformGroupList]" @cancel="showPlatformgroup = false" @confirm="platConfirm"></u-picker> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getPlatformGroupList, getPlatformWorkData } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | showPlatformCall: false, // 月台叫号 |
| | | showDetail: false, |
| | | showTransform: false // 转移 |
| | | showTransform: false, // 转移 |
| | | showPlatformgroup: false, |
| | | |
| | | platformGroupList: [], |
| | | activePlatformGroup: {}, |
| | | platformTaskInfo: {}, |
| | | activePlatformId: '', |
| | | } |
| | | }, |
| | | onLoad() { |
| | | |
| | | this.getPlatformGroup() |
| | | }, |
| | | methods: { |
| | | getPlatformGroup() { |
| | | getPlatformGroupList({ |
| | | queryData: 1, |
| | | queryType: 0 |
| | | }).then(res => { |
| | | this.platformGroupList = res.data || [] |
| | | if(this.platformGroupList.length > 0){ |
| | | this.activePlatformGroup = this.platformGroupList[0] |
| | | if(this.activePlatformGroup.platformList && this.activePlatformGroup.platformList.length > 0){ |
| | | this.activePlatformId = this.activePlatformGroup.platformList[0].id |
| | | this.getPlatformTask() |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | getPlatformTask() { |
| | | getPlatformWorkData({platformId: this.activePlatformId}).then(res => { |
| | | this.platformTaskInfo = res.data |
| | | }) |
| | | }, |
| | | platConfirm(e) { |
| | | const index = e.indexs[0] |
| | | this.activePlatformGroup = this.platformGroupList[index] |
| | | if(this.activePlatformGroup.platformList && this.activePlatformGroup.platformList.length > 0){ |
| | | this.activePlatformId = this.activePlatformGroup.platformList[0].id |
| | | this.getPlatformTask() |
| | | } |
| | | this.showPlatformgroup =false |
| | | }, |
| | | platformClick(id) { |
| | | this.activePlatformId = id |
| | | this.getPlatformTask() |
| | | }, |
| | | handleDetail() { |
| | | this.showDetail = true |
| | | }, |