| 12 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/disease/cmb"],{903:function(e,t,n){"use strict";(function(e,t){var i=n(4);n(26);i(n(25));var a=i(n(904));e.__webpack_require_UNI_MP_PLUGIN__=n,t(a.default)}).call(this,n(1)["default"],n(2)["createPage"])},904:function(e,t,n){"use strict";n.r(t);var i=n(905),a=n(907);for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);n(909);var s,r=n(32),u=Object(r["default"])(a["default"],i["render"],i["staticRenderFns"],!1,null,null,null,!1,i["components"],s);u.options.__file="pages/disease/cmb.vue",t["default"]=u.exports},905:function(e,t,n){"use strict";n.r(t);var i=n(906);n.d(t,"render",(function(){return i["render"]})),n.d(t,"staticRenderFns",(function(){return i["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return i["recyclableRender"]})),n.d(t,"components",(function(){return i["components"]}))},906:function(e,t,n){"use strict";var i;n.r(t),n.d(t,"render",(function(){return a})),n.d(t,"staticRenderFns",(function(){return s})),n.d(t,"recyclableRender",(function(){return o})),n.d(t,"components",(function(){return i}));try{i={uniNavBar:function(){return n.e("components/uni-nav-bar/uni-nav-bar").then(n.bind(null,1164))},uIcon:function(){return n.e("uview-ui/components/u-icon/u-icon").then(n.bind(null,1128))},uCalendar:function(){return n.e("uview-ui/components/u-calendar/u-calendar").then(n.bind(null,1271))}}}catch(r){if(-1===r.message.indexOf("Cannot find module")||-1===r.message.indexOf(".vue"))throw r;console.error(r.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var a=function(){var e=this,t=e.$createElement,n=(e._self._c,e.eqinfo.uptime?e._f("timeFormat")(0==e.eqinfo.uptime?"无":e.eqinfo.uptime):null),i=e.eqinfo.uptime?null:e._f("timeFormat")(0==e.eqinfo.uptime?"无":e.eqinfo.uptime),a=e.datatf?e.timetab(e.begintime):null,o=e.datatf?e.timetab(e.end):null,s=e.datatf?e.__map(e.historylistdata,(function(t,n){var i=e.__get_orig(t),a=e._f("timeFormat")(t.uploadTime);return{$orig:i,f2:a}})):null,r=e.datatf?e.historylistdata.length:null;e._isMounted||(e.e0=function(t){e.tiemshow=!e.tiemshow}),e.$mp.data=Object.assign({},{$root:{f0:n,f1:i,m0:a,m1:o,l0:s,g0:r}})},o=!1,s=[];a._withStripped=!0},907:function(e,t,n){"use strict";n.r(t);var i=n(908),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=a.a},908:function(e,t,n){"use strict";(function(e){var i=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(41)),o=i(n(43)),s=i(n(199)),r=null,u=null,c={data:function(){return{basetype:"",kongtf:!1,datatf:!1,eqinfo:{},city:"河南省",tiemshow:!1,begintime:"",end:"",dataloadingtf:!0,canvastishiTF:!1,device_id:"",tableHead:["上报时间","电池电压","50cm土壤含水量","50cm土壤温度","5cm土壤含水量","5cm土壤温度","空气温度","露点温度","日照时数","叶面湿润时间","10cm土壤含水量","10cm土壤温度","天降雨量","土壤导电率","25cm土壤含水量","25cm土壤温度","20cm土壤含水量","20cm土壤温度","相对湿度","时降雨量"],forbidden:!1,historylistdata:[],pagesum:1,page:1,cWidth:"",cHeight:"",pixelRatio:1,param:{dianChiDianYa:"电池电压",fiftyTuRangHanShuiLiang:"50cm土壤含水量",fiftyTuRangWenDu:"50cm土壤温度",fiveTuRangHanShuiLiang:"5cm土壤含水量",fiveTuRangWenDu:"5cm土壤温度",kongQiWenDu:"空气温度",luDianWenDu:"露点温度",riZhaoShiShu:"日照时数",shiRunShiJian:"叶面湿润时间",tenTuRangHanShuiLiang:"10cm土壤含水量",tenTuRangWenDu:"10cm土壤温度",tianJiangYuLiang:"天降雨量",tuRangDaoDianLv:"土壤导电率",twentyFiveTuRangHanShuiLiang:"25cm土壤含水量",twentyFiveTuRangWenDu:"25cm土壤温度",twentyTuRangHanShuiLiang:"20cm土壤含水量",twentyTuRangWenDu:"20cm土壤温度",xiangDuiShiDu:"相对湿度",xiaoShiJiangYuLiang:"小时降雨量"},color:["#ff7b30","#f93948","#fb2ea4","#bc59db","#7457ec","#307dfd","#31bfff","#46e9b1","#19cd48","#b2e409","#f0f254","#fed000","#f06f14","#a74040","#90bb71","#a07635","#6502bd","#048bbb","#9ebb01","#cc9202","#ff8fa0","#a3d55f","#d9bedd","#00a6b6","#236093","#009fff","#ddc0a6","#c4a6dd","#dda6a6","#779e33","#a6ddb0"]}},methods:{copy:function(t){e.setClipboardData({data:t,success:function(){console.log("success")}})},control:function(){e.navigateTo({url:"./forecastResult?id="+this.eqinfo.device_id})},tiemchange:function(e){console.log(e),this.begintime=parseInt(+new Date("".concat(e.startDate," 00:00:00"))/1e3),this.end=parseInt(+new Date("".concat(e.endDate," 00:00:00"))/1e3),this.histprydatas(),this.getChartLine()},timetab:function(e){e=new Date(1e3*e);var t=e.getFullYear(),n=e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1,i=e.getDate()<10?"0"+e.getDate():e.getDate(),a=t+"/"+n+"/"+i;return a},histprydatas:function(){var e=this;return(0,o.default)(a.default.mark((function t(){var n,i,o,s,r,u;return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$myRequest({url:"/api/api_gateway?method=wheat.wheat.wheat_data_list",data:{device_id:e.eqinfo.device_id,page:e.page,begin:e.begintime,end:e.end}});case 2:if(n=t.sent,e.pagesum=Math.ceil(n.nums/10)||1,e.pagesum>0)for(e.forbidden=!1,i=n.sta,e.historylistdata=[],o=0;o<i.length;o++){for(u in i[o]=i[o].replace(/'/g,'"'),s=JSON.parse("".concat(i[o])),r={},s)r[u]=s[u];e.historylistdata.push(r)}else e.forbidden=!0,e.historylistdata=[];case 5:case"end":return t.stop()}}),t)})))()},getChartLine:function(){var e=this;return(0,o.default)(a.default.mark((function t(){var n,i,o,s,r,u,c,d,l,f,h,m,g,p,b;return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$myRequest({method:"POST",url:"/api/api_gateway?method=wheat.wheat.wheat_data",data:{device_id:e.eqinfo.device_id,begin:e.begintime,end:e.end}});case 2:if(n=t.sent,e.dataloadingtf=!1,i=n,!i.length){t.next=42;break}o=[],s=[],r=[],u=[],c=0;case 11:if(!(c<i.length)){t.next=32;break}i[c]=i[c].replace(/'/g,'"'),d=JSON.parse("".concat(i[c])),l=1e3*parseInt(d["uploadTime"]),f=new Date(l),u.unshift(f.getMonth()+1+"/"+f.getDate()+"-"+f.getHours()+":"+f.getMinutes()),r.unshift(l),t.t0=a.default.keys(d);case 19:if((t.t1=t.t0()).done){t.next=29;break}if(h=t.t1.value,m="","id"!=h&&"uploadTime"!=h){t.next=26;break}return t.abrupt("continue",19);case 26:"-1"==s.indexOf(h)?(s.push(h),o.push({name:e.param[h],color:e.color[s.length-1],data:[]}),m=parseFloat(d[h]),o[s.indexOf(h)].data.unshift(m)):(m=parseFloat(d[h]),o[s.indexOf(h)].data.unshift(m));case 27:t.next=19;break;case 29:c++,t.next=11;break;case 32:console.log(o),g=Math.ceil(o.length/2),p=o.filter((function(e,t){return t<g})),b=o.filter((function(e,t){return t>=g})),console.log(p,p),e.showColumn("canvasColumnA",u,p),e.showColumn("canvasColumnB",u,b),e.canvastishiTF=!0,t.next=45;break;case 42:e.canvastishiTF=!1,e.showColumn("canvasColumnA",u,[]),e.showColumn("canvasColumnB",u,[]);case 45:case"end":return t.stop()}}),t)})))()},prev:function(){this.page>1&&(this.page--,this.histprydatas())},next:function(){this.page<this.pagesum&&(this.page++,this.histprydatas())},clickLeft:function(){e.navigateBack({delta:1})},showColumn:function(e,t,n){console.log(e);var i=this;"canvasColumnA"===e?r=new s.default({canvasId:e,type:"line",legend:{position:"top"},fontSize:11,background:"#FFFFFF",pixelRatio:1,animation:!0,dataLabel:!1,categories:t,series:n,enableScroll:!0,xAxis:{disableGrid:!0,type:"grid",gridType:"dash",itemCount:4,scrollShow:!0,scrollBackgroundColor:"#F7F7FF",scrollColor:"#DEE7F7"},yAxis:{},width:1*i.cWidth,height:1*i.cHeight,extra:{line:{type:"curve"}}}):"canvasColumnB"===e&&(u=new s.default({canvasId:e,type:"line",legend:{position:"top"},fontSize:11,background:"#FFFFFF",pixelRatio:1,animation:!0,dataLabel:!1,categories:t,series:n,enableScroll:!0,xAxis:{disableGrid:!0,type:"grid",gridType:"dash",itemCount:4,scrollShow:!0,scrollBackgroundColor:"#F7F7FF",scrollColor:"#DEE7F7"},yAxis:{},width:1*i.cWidth,height:1*i.cHeight,extra:{line:{type:"curve"}}}))},touchLineA:function(e){console.log(e),r.scrollStart(e)},moveLineA:function(e){r.scroll(e)},touchEndLineA:function(e){r.scrollEnd(e),r.showToolTip(e,{format:function(e,t){return t+" "+e.name+":"+e.data}})},touchLineB:function(e){console.log(e),u.scrollStart(e)},moveLineB:function(e){u.scroll(e)},touchEndLineB:function(e){u.scrollEnd(e),u.showToolTip(e,{format:function(e,t){return t+" "+e.name+":"+e.data}})}},onLoad:function(t){this.eqinfo=JSON.parse(t.shebei),this.basetype=this.eqinfo.type,this.cWidth=e.upx2px(650),this.cHeight=e.upx2px(500),this.device_id=t.id,this.end=parseInt(+new Date/1e3),this.begintime=parseInt(this.end-86400),this.histprydatas(),this.getChartLine(),11==this.basetype?(this.kongtf=this.$QueryPermission(251),this.datatf=this.$QueryPermission(221)):19==this.basetype?(this.kongtf=this.$QueryPermission(252),this.datatf=this.$QueryPermission(222)):20==this.basetype?(this.kongtf=this.$QueryPermission(253),this.datatf=this.$QueryPermission(223)):21==this.basetype?(this.kongtf=this.$QueryPermission(280),this.datatf=this.$QueryPermission(279)):26==this.basetype&&(this.kongtf=this.$QueryPermission(344),this.datatf=this.$QueryPermission(343))}};t.default=c}).call(this,n(2)["default"])},909:function(e,t,n){"use strict";n.r(t);var i=n(910),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=a.a},910:function(e,t,n){}},[[903,"common/runtime","common/vendor"]]]);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/disease/cmb.js.map
|