| | |
| | | <view class="button-right" @click="ejected()"></view> |
| | | <!-- 主体 --> |
| | | <view class="info-main"> |
| | | <view class="info-box"> |
| | | <y-box> |
| | | <view class="info-box" style="display: flex;"> |
| | | <y-box v-for="item in infoText"> |
| | | <!-- 文本容器 --> |
| | | <view class="text-content"> |
| | | <!-- head --> |
| | |
| | | <view class="board"> |
| | | <uni-transition ref="ani" custom-class="transition" :mode-class="newModeClass" :show="errorBoardShow"> |
| | | <view class="error-board"> |
| | | <text v-for="item in carInfo">{{item}}</text> |
| | | <text>{{infoText.error}}</text> |
| | | </view> |
| | | </uni-transition> |
| | | </view> |
| | |
| | | <view style="color: #FFF;position: fixed;bottom: 10px;left: 10px;" v-show="timeOut"> |
| | | 连接超时: {{times}} s |
| | | </view> |
| | | |
| | | <!-- 版本号 --> |
| | | <!-- #ifdef APP-PLUS --> |
| | | <view class="version"> |
| | | 当前版本:{{version}} |
| | | </view> |
| | | <!-- #endif --> |
| | | </view> |
| | | </template> |
| | | <!-- {"msg":"操作成功","code":200,"data":[{"title":"全板出库","workNo":7460,"staNo":110,"sourceStaNo":null,"locNo":null,"sourceLocNo":"0807102","matDtos":[{"matNo":"50460834","maknx":"200x60桌面","count":26.0}],"emptyMk":false,"ioType":101}]} --> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | version: '1231313', |
| | | newModeClass: 'slide-top', |
| | | errorBoardShow: false, |
| | | carInfo: [], |
| | |
| | | error: null, |
| | | infoType: 0, |
| | | text: '', |
| | | infoText: { |
| | | infoText: [{ |
| | | title: '自动仓库WCS监控平台', |
| | | title2: '', |
| | | staNo: "", |
| | |
| | | doneOfUnit: '', |
| | | totalOfUnit: '', |
| | | ctnNo: '1' |
| | | }, |
| | | }], |
| | | swiperList: [], |
| | | timeOut: false, |
| | | times: 0, |
| | |
| | | that.baseCrnId = BaseCrnId |
| | | |
| | | |
| | | |
| | | this.getVersion() |
| | | this.getDate2() |
| | | setTimeout(() => { |
| | | this.getShuttle() |
| | | this.getServerData() |
| | | this.initlineChart() |
| | | this.initPieChart() |
| | | this.getOther() |
| | | setTimeout(() => { |
| | | this.getShuttleTest() |
| | | this.getShuttle() |
| | | this.getServerData() |
| | | this.initlineChart() |
| | | this.initPieChart() |
| | | this.getOther() |
| | | setTimeout(() => { |
| | | this.getShuttleTest() |
| | | this.getServerData() |
| | | this.initlineChart() |
| | | this.initPieChart() |
| | | this.getOther() |
| | | }, 3000) |
| | | }, 1000) |
| | | }, 2000) |
| | | }, 1000) |
| | | }, |
| | | onLoad() { |
| | |
| | | this.getServerData() |
| | | this.getDate2() |
| | | this.getUrl() |
| | | this.getInfo() |
| | | this.getError() |
| | | this.getCarInfo() |
| | | // this.getInfo() |
| | | // this.getError() |
| | | // this.getCarInfo() |
| | | // this.getCarInfoTest() |
| | | // this.getInfo2() |
| | | // this.getError2() |
| | | this.getInfo2() |
| | | this.getError2() |
| | | this.controller() |
| | | }, 1000) |
| | | |
| | |
| | | // this.changeErrorShow() |
| | | // },5000) |
| | | setInterval(() => { |
| | | this.getShuttleTest() |
| | | this.getShuttle() |
| | | this.getServerData() |
| | | this.initlineChart() |
| | | this.initPieChart() |
| | | this.getOther() |
| | | }, 600000) |
| | | |
| | | // #ifdef APP-PLUS |
| | | setTimeout(()=>{ |
| | | plus.runtime.restart() |
| | | },28800000) |
| | | // #endif |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | getVersion() { |
| | | let that = this |
| | | plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => { |
| | | that.version = wgtinfo.version //客户端版本号 |
| | | }) |
| | | }, |
| | | getShuttleTest() { |
| | | let res = ycqdata.infoData2.data |
| | | this.shuttleInfoModel(res) |
| | |
| | | let that = this |
| | | let result = ycqdata.dataError2 |
| | | var res = result.data |
| | | if (res.data && res.data !== "") { |
| | | var errorInfo = res.data |
| | | if (that.infoType == 1) { |
| | | that.infoType = 3 |
| | | that.infoText.title = "异常" |
| | | that.infoText.error = errorInfo |
| | | return |
| | | } |
| | | that.infoType = 2 |
| | | that.infoText.title = "异常" |
| | | that.infoText.error = errorInfo |
| | | if (res.code == 200 && res.data != '') { |
| | | that.infoText.title = "其他信息" |
| | | that.infoText.error = res.data |
| | | this.errorBoardShow = true |
| | | } else { |
| | | if (that.infoType == 1) { |
| | | return |
| | | } |
| | | that.infoType = 0 |
| | | this.errorBoardShow = false |
| | | } |
| | | }, |
| | | getInfo() { |
| | |
| | | }, |
| | | infoModel(res) { |
| | | let that = this |
| | | |
| | | if (res.data && res.data !== "") { |
| | | if (that.infoType == 2 || that.infoType == 3) { |
| | | return; |
| | | } |
| | | // infoType1:只有拣料等信息 |
| | | that.infoType = 1 |
| | | if (res.data[0].ioType === 101) { |
| | | that.infoText.title = '全板出库' |
| | | that.infoText.title2 = '全板出库' |
| | | } else if (res.data[0].ioType === 103) { |
| | | that.infoText.title = '拣料出库' |
| | | that.infoText.title2 = '拣料出库' |
| | | } else if (res.data[0].ioType === 107) { |
| | | that.infoText.title = '盘点出库' |
| | | that.infoText.title2 = '盘点出库' |
| | | } |
| | | res.data[0].matDtos |
| | | for (let k in res.data[0].matDtos) { |
| | | |
| | | if (res.data[0].matDtos[k].count == 0) { |
| | | res.data[0].matDtos[k]['color'] = 'color: #df741c' |
| | | that.infoText.title = '站点出库' |
| | | that.infoText = res.data |
| | | for (let info of res.data) { |
| | | console.log(info); |
| | | res.data[0].matDtos |
| | | for (let k in res.data[0].matDtos) { |
| | | |
| | | } |
| | | that.infoText.staNo = res.data[0].staNo |
| | | that.infoText.barcode = res.data[0].barcode |
| | | that.swiperList = res.data[0].matDtos |
| | | } |
| | | that.infoText.staNo = res.data[0].staNo |
| | | that.infoText.barcode = res.data[0].barcode |
| | | that.swiperList = res.data[0].matDtos |
| | | |
| | | } else { |
| | | if (that.infoType == 2 || that.infoType == 3) { |
| | | return; |
| | |
| | | <style> |
| | | /* @import url("../../static/css/common.css"); */ |
| | | @import url("home.css"); |
| | | |
| | | /* 版本号 */ |
| | | .version { |
| | | min-width: 100rpx; |
| | | position: fixed; |
| | | right: 20rpx; |
| | | bottom: 10rpx; |
| | | font-size: .1rem; |
| | | color: #909399; |
| | | } |
| | | /* 列 */ |
| | | .flex-col { |
| | | display: flex; |
| | |
| | | |
| | | .error-board { |
| | | margin: .2rem; |
| | | height: 11vh; |
| | | padding: .2rem; |
| | | /* height: 11vh; */ |
| | | background-color: #F56C6C; |
| | | box-shadow: rgba(0, 0, 0, .35) 0px 5px 15px; |
| | | border-radius: .2rem; |