|  |  | 
 |  |  |                                                     <view class="flex-row sub-info"> | 
 |  |  |                                                         <image src="../../static/g1.png" mode="aspectFit"></image> | 
 |  |  |                                                         <view style="width: 8vw;height: 4vw;line-height: 4vw;">在库</view> | 
 |  |  |                                                         <view style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;">10000</view> | 
 |  |  |                                                         <view style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;">{{baseInfo.stockCount}}</view> | 
 |  |  |                                                     </view> | 
 |  |  |                                                     <view class="flex-row sub-info" style="margin-top: 2vh;"> | 
 |  |  |                                                         <image src="../../static/g1.png" mode="aspectFit"></image> | 
 |  |  |                                                         <view style="width: 8vw;height: 4vw;line-height: 4vw;">在库</view> | 
 |  |  |                                                         <view style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;">10000</view> | 
 |  |  |                                                         <view style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;">{{baseInfo.emptyCount}}</view> | 
 |  |  |                                                     </view> | 
 |  |  |                                                     <view class="flex-row sub-info" style="margin-top: 2vh;"> | 
 |  |  |                                                         <image src="../../static/g1.png" mode="aspectFit"></image> | 
 |  |  |                                                         <view style="width: 8vw;height: 4vw;line-height: 4vw;">在库</view> | 
 |  |  |                                                         <view style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;">10000</view> | 
 |  |  |                                                         <view style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;">{{baseInfo.noneCount}}</view> | 
 |  |  |                                                     </view> | 
 |  |  |                                                 </view> | 
 |  |  |                                             </view> | 
 |  |  | 
 |  |  |                                     <y-box> | 
 |  |  |                                         <view class="flex-col" style="width: 100%;height: 100%;font-size: 4vh;justify-content: center;letter-spacing: 1vh;"> | 
 |  |  |                                             <!-- 嘉善边锋机械股份有限公司 --> | 
 |  |  |                                             自动仓库WCS监控平台 | 
 |  |  |                                             <!-- 自动仓库WCS监控平台 --> | 
 |  |  |                                             <image src="../../static/ruiyun.jpg" mode="" style="width: 100%;"></image> | 
 |  |  |                                         </view> | 
 |  |  |                                     </y-box> | 
 |  |  |                                 </view> | 
 |  |  | 
 |  |  |                     xDuration: 3, | 
 |  |  |                     yDuration: 4, | 
 |  |  |                     usedPr: 50, | 
 |  |  |                     used: 3537 | 
 |  |  |                     used: 3537, | 
 |  |  |                     stockCount: '', | 
 |  |  |                     emptyCount: '', | 
 |  |  |                     noneCount: '', | 
 |  |  |                 }, | 
 |  |  |                 chartsData: { | 
 |  |  |                     "Line": { | 
 |  |  | 
 |  |  |             console.log(that.commonUrl); | 
 |  |  |         }, | 
 |  |  |         onLoad() { | 
 |  |  |             this.getServerData() | 
 |  |  |             // this.getServerData() | 
 |  |  |             this.getDate() | 
 |  |  |             setInterval(()=>{ | 
 |  |  |                 this.getDate() | 
 |  |  | 
 |  |  |             getUrl() { | 
 |  |  |                 this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePort + "/" +this.baseUrl | 
 |  |  |             }, | 
 |  |  |             getServerData() { | 
 |  |  |                 this.chartsDataLine1=JSON.parse(JSON.stringify(demodata.Line)) | 
 |  |  |                 this.chartsDataPie2=JSON.parse(JSON.stringify(demodata.PieA)) | 
 |  |  |             }, | 
 |  |  |             // getServerData() { | 
 |  |  |             //     this.chartsDataLine1=JSON.parse(JSON.stringify(demodata.Line)) | 
 |  |  |             //     this.chartsDataPie2=JSON.parse(JSON.stringify(demodata.PieA)) | 
 |  |  |             // }, | 
 |  |  |             // 获取错误信息 | 
 |  |  |             getInfo2() { | 
 |  |  |                 let that = this | 
 |  |  | 
 |  |  |                 this.calendar = year + "年" + month + "月" + day + "日 " + hours + ":" + minutes + ":" + seconds + " " + weeks | 
 |  |  |             }, | 
 |  |  |             getDateFormat(value) { | 
 |  |  |                             var date = new Date();// 获取当前时间 | 
 |  |  |                             date.setDate(date.getDate() + value);// 设置天数 -1 天 | 
 |  |  |                             var m = date.getMonth() + 1 | 
 |  |  |                             var d = date.getDate() | 
 |  |  |                             var newDate = m + '-' + d | 
 |  |  |                             return newDate | 
 |  |  |                         }, | 
 |  |  |                 var date = new Date();// 获取当前时间 | 
 |  |  |                 date.setDate(date.getDate() + value);// 设置天数 -1 天 | 
 |  |  |                 var m = date.getMonth() + 1 | 
 |  |  |                 var d = date.getDate() | 
 |  |  |                 var newDate = m + '-' + d | 
 |  |  |                 return newDate | 
 |  |  |             }, | 
 |  |  |             /*************** 折线图 *****************************************************************************************************/ | 
 |  |  |                         initlineChart() { | 
 |  |  |                             let that = this | 
 |  |  |                             uni.request({ | 
 |  |  |                                 url: that.commonUrl + "/monitor/line/charts", | 
 |  |  |                                 method:'GET', | 
 |  |  |                                 success(result) { | 
 |  |  |                                     var res = result.data | 
 |  |  |                                     if (res.code === 200) { | 
 |  |  |                                         that.chartsData.Line.categories = [ | 
 |  |  |                                             that.getDateFormat(-11),that.getDateFormat(-10),that.getDateFormat(-9),that.getDateFormat(-8), | 
 |  |  |                                             that.getDateFormat(-7),that.getDateFormat(-6),that.getDateFormat(-5),that.getDateFormat(-4), | 
 |  |  |                                             that.getDateFormat(-3),that.getDateFormat(-2),that.getDateFormat(-1),that.getDateFormat(0),] | 
 |  |  |                                         that.chartsData.Line.series = res.data.rows | 
 |  |  |                                     } | 
 |  |  |                                 } | 
 |  |  |                             }) | 
 |  |  |                         }, | 
 |  |  |             initlineChart() { | 
 |  |  |                 let that = this | 
 |  |  |                 uni.request({ | 
 |  |  |                     url: that.commonUrl + "/monitor/line/charts", | 
 |  |  |                     method:'GET', | 
 |  |  |                     success(result) { | 
 |  |  |                         var res = result.data | 
 |  |  |                         if (res.code === 200) { | 
 |  |  |                             that.chartsData.Line.categories = [ | 
 |  |  |                                 that.getDateFormat(-11),that.getDateFormat(-10),that.getDateFormat(-9),that.getDateFormat(-8), | 
 |  |  |                                 that.getDateFormat(-7),that.getDateFormat(-6),that.getDateFormat(-5),that.getDateFormat(-4), | 
 |  |  |                                 that.getDateFormat(-3),that.getDateFormat(-2),that.getDateFormat(-1),that.getDateFormat(0),] | 
 |  |  |                             that.chartsData.Line.series = res.data.rows | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                 }) | 
 |  |  |             }, | 
 |  |  |             /*************** 饼图 *****************************************************************************************************/ | 
 |  |  |                         initPieChart() { | 
 |  |  |                             let that = this | 
 |  |  |                             uni.request({ | 
 |  |  |                                 url: that.commonUrl + "/monitor/loc/rep", | 
 |  |  |                                 method:'GET', | 
 |  |  |                                 success(result) { | 
 |  |  |                                     var res = result.data | 
 |  |  |                                     if (res.code === 200) { | 
 |  |  |                                         that.chartsData.Pie.series[0].data = res.data.pie | 
 |  |  |                                         that.stockCount = res.data.stockCunt | 
 |  |  |                                         that.emptyCount = res.data.emptyCount | 
 |  |  |                                         that.noneCount = res.data.noneCount | 
 |  |  |                                         that.used = res.data.used | 
 |  |  |                                         that.usedPr = res.data.usedPr | 
 |  |  |                                     } | 
 |  |  |                                 } | 
 |  |  |                             }) | 
 |  |  |                         }, | 
 |  |  |                         getOther() { | 
 |  |  |                             let that = this | 
 |  |  |                             uni.request({ | 
 |  |  |                                 // http://10.10.0.222:9090/jkwcs/monitor/led?ledId=186 | 
 |  |  |                                 url: that.commonUrl + "/monitor/other", | 
 |  |  |                                 data: { | 
 |  |  |                                     crnId: that.baseCrnId,  | 
 |  |  |                                     ledId: that.baseLedId, | 
 |  |  |                                 }, | 
 |  |  |                                 success(result) { | 
 |  |  |                                     console.log(result); | 
 |  |  |                                     var res = result.data | 
 |  |  |                                     if (res.code === 200) { | 
 |  |  |                                         that.xDistance = res.data.xDistance | 
 |  |  |                                         that.yDistance = res.data.yDistance | 
 |  |  |                                         that.xDuration = res.data.xDuration | 
 |  |  |                                         that.yDuration = res.data.yDuration | 
 |  |  |                                     } else if (res.code === 403) { | 
 |  |  | 										 | 
 |  |  |                                     } else { | 
 |  |  | 										 | 
 |  |  |                                     } | 
 |  |  |                                 } | 
 |  |  |                             }) | 
 |  |  |                         }, | 
 |  |  |             initPieChart() { | 
 |  |  |                 let that = this | 
 |  |  |                 uni.request({ | 
 |  |  |                     url: that.commonUrl + "/monitor/loc/rep", | 
 |  |  |                     method:'GET', | 
 |  |  |                     success(result) { | 
 |  |  |                         var res = result.data | 
 |  |  |                         if (res.code === 200) { | 
 |  |  |                             that.chartsData.Pie.series[0].data = res.data.pie | 
 |  |  |                             that.stockCount = res.data.stockCunt | 
 |  |  |                             that.emptyCount = res.data.emptyCount | 
 |  |  |                             that.noneCount = res.data.noneCount | 
 |  |  |                             that.used = res.data.used | 
 |  |  |                             that.usedPr = res.data.usedPr | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                 }) | 
 |  |  |             }, | 
 |  |  |             getOther() { | 
 |  |  |                 let that = this | 
 |  |  |                 uni.request({ | 
 |  |  |                     // http://10.10.0.222:9090/jkwcs/monitor/led?ledId=186 | 
 |  |  |                     url: that.commonUrl + "/monitor/other", | 
 |  |  |                     data: { | 
 |  |  |                         crnId: that.baseCrnId,  | 
 |  |  |                         ledId: that.baseLedId, | 
 |  |  |                     }, | 
 |  |  |                     success(result) { | 
 |  |  |                         console.log(result); | 
 |  |  |                         var res = result.data | 
 |  |  |                         if (res.code === 200) { | 
 |  |  |                             that.baseInfo.xDistance = res.data.xDistance | 
 |  |  |                             that.baseInfo.yDistance = res.data.yDistance | 
 |  |  |                             that.baseInfo.xDuration = res.data.xDuration | 
 |  |  |                             that.baseInfo.yDuration = res.data.yDuration | 
 |  |  |                         } else if (res.code === 403) { | 
 |  |  | 							 | 
 |  |  |                         } else { | 
 |  |  | 							 | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                 }) | 
 |  |  |             }, | 
 |  |  |         } | 
 |  |  |          | 
 |  |  |     } |