| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-aftersale-list"],{1532:function(e,t,a){"use strict";var r=a("8172"),n=a.n(r);n.a},"2c6f":function(e,t,a){"use strict";var r=a("c201"),n=a.n(r);n.a},"32e5":function(e,t,a){"use strict";a("a9e3"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a("21f4"),n={name:"ui-tabs",props:{active:{type:[Number,String,Boolean],default:1},list:{type:Array,default:function(){return[]}},size:{type:Number,default:28},defaultProps:{type:Object,default:function(){return{text:"text",value:"value"}}},wait:{type:Number,default:500},customStyle:{type:Object,default:function(){return{}}}},computed:{nodeKey:function(){return this.defaultProps.value},nodeValue:function(){return this.defaultProps.text}},mounted:function(){this.tabsClick=(0,r.throttle)(this.tabsClick,this,this.wait)},methods:{tabsClick:function(e){this.$emit("clickTab",e)}}};t.default=n},4519:function(e,t,a){"use strict";var r=a("4ea4");a("99af"),a("4160"),a("b64b"),a("acd8"),a("ac1f"),a("1276"),a("159b"),Object.defineProperty(t,"__esModule",{value:!0}),t.getWeatherWarning=t.getWeatherDayData=t.getWeatherChart=t.getWeatherHistory=t.getWeatherDeviceDetail=t.getWeatherDeviceList=void 0,a("96cf");var n=r(a("1da1")),i=r(a("be72")),s=a("21f4"),c=function(){var e=(0,n.default)(regeneratorRuntime.mark((function e(t,a){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,i.default.post("api/api_gateway?method=weather.weather.".concat(t),a);case 2:return r=e.sent,e.abrupt("return",null===r||void 0===r?void 0:r.data);case 4:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}(),u=function(e){return c("qxz_page",e)};t.getWeatherDeviceList=u;var o=function(){var e=(0,n.default)(regeneratorRuntime.mark((function e(t){var a,r,n,i,s,u,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,c("qxz_status",t);case 2:for(s in a=e.sent,r=a.dat,n=a.conf,i=[],r)r[s]&&"uptime"!=s&&(console.log(r[s]),u=r[s].split("#"),o=n[s].split("#"),i.push({el:s,markId:u[1],text:"".concat(o[0]," ").concat(o[1]),value:"".concat(u[0])}));return e.abrupt("return",i);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.getWeatherDeviceDetail=o;var d=function(){var e=(0,n.default)(regeneratorRuntime.mark((function e(t){var a,r,n,i,u,o,d,l,v,f,p,m,h;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,c("qxz_detail",t);case 2:for(d in a=e.sent,r=a.data,n=a.nums,i=a.conf,u=a.rainFall,o=[{text:"日期",value:"date"}],i)i[d]&&(l=i[d].split("#"),o.push({text:l[0]+l[1],value:d}));for(v=[],f=0;f<r.length;f++){for(m in p={date:(0,s.timeFormat)(r[f].time,"yyyy-mm-dd hh:MM:ss")},r[f].dat)r[f].dat[m]&&(h=r[f].dat[m].split("#"),p[m]=h[0]);v.push(p)}return e.abrupt("return",{headers:o,list:v,nums:n,rainFall:u});case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.getWeatherHistory=d;var l=function(){var e=(0,n.default)(regeneratorRuntime.mark((function e(t){var a,r,n,i,u,o,d,l,v,f;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,c("qxz_data_chart",t);case 2:if(a=e.sent,r=a.data,n=a.conf,r){e.next=7;break}return e.abrupt("return");case 7:for(i=[],u=[],o={},Object.keys(n).forEach((function(e){n[e]&&(u.push({text:n[e].split("#").join(" "),value:e}),o[e]=[])})),d=0;d<r.length;d++){for(l in o)v=r[d].dat[l],v&&(f=v.split("#")[0],o[l].push(parseFloat(f)));i.push((0,s.timeFormat)(r[d].time,"mm月dd日"))}return e.abrupt("return",{times:i,pickes:u,charts:o});case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.getWeatherChart=l;var v=function(){var e=(0,n.default)(regeneratorRuntime.mark((function e(t){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,c("qxz_day_data",t);case 2:return a=e.sent,e.abrupt("return",a);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.getWeatherDayData=v;var f=function(e){return c("qxz_warning",e)};t.getWeatherWarning=f},5134:function(e,t,a){"use strict";var r;a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){return r}));var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",{staticClass:"tab-box"},[a("v-uni-view",{staticClass:"tab-box-scroll"},e._l(e.list,(function(t,r){return a("v-uni-view",{key:r,staticClass:"tab-box-item",class:{active:e.active===t[e.nodeKey]},style:e.customStyle,on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.tabsClick(t[e.nodeKey])}}},[e._v(e._s(t[e.nodeValue]))])})),1)],1)},i=[]},6985:function(e,t,a){"use strict";a.r(t);var r=a("5134"),n=a("d6c5");for(var i in n)"default"!==i&&function(e){a.d(t,e,(function(){return n[e]}))}(i);a("2c6f");var s,c=a("f0c5"),u=Object(c["a"])(n["default"],r["b"],r["c"],!1,null,"598394b6",null,!1,r["a"],s);t["default"]=u.exports},8172:function(e,t,a){var r=a("cbb0");"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var n=a("4f06").default;n("0d2edad1",r,!0,{sourceMap:!1,shadowMode:!1})},"8bb9":function(e,t,a){"use strict";a.r(t);var r=a("dcb4"),n=a.n(r);for(var i in r)"default"!==i&&function(e){a.d(t,e,(function(){return r[e]}))}(i);t["default"]=n.a},"8f6d":function(e,t,a){var r=a("24fb");t=r(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是app内置的常用样式变量\r\n *\r\n * app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 水平间距 */\r\n/* 水平间距 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.tab-box[data-v-598394b6]{position:relative;z-index:10;overflow-x:scroll;display:flex;width:100%;font-size:%?30?%;background-color:#fff;box-shadow:0 %?5?% %?5?% rgba(0,0,0,.02)}.tab-box .tab-box-scroll[data-v-598394b6]{display:flex;width:-webkit-max-content;width:max-content}.tab-box .tab-box-item[data-v-598394b6]{display:inline-block;box-sizing:border-box;width:-webkit-max-content;width:max-content;height:%?90?%;padding:0 %?32?%;line-height:%?90?%;text-align:center}.tab-box .active[data-v-598394b6]{position:relative;font-size:%?32?%;color:#333}.tab-box .active[data-v-598394b6]::after{content:" ";display:block;width:%?100?%;height:%?7?%;position:absolute;border-radius:100px;bottom:%?0?%;margin:auto;left:0;right:0;background-color:#317afd}',""]),e.exports=t},abed:function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){return r}));var r={uiSearch:a("c23e").default,uiTabs:a("6985").default,uiEmpty:a("83fa").default},n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",[a("ui-search",{attrs:{placeholder:"请输入设备ID"},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.searchDevice.apply(void 0,arguments)}}}),a("ui-tabs",{attrs:{list:e.deviceTabs,active:e.deviceTab},on:{clickTab:function(t){arguments[0]=t=e.$handleEvent(t),e.clickDeviceTabs.apply(void 0,arguments)}}}),e._l(e.deviceList,(function(t,r){return[1==e.deviceTab||3==e.deviceTab?a("v-uni-view",{key:r+"_0",staticClass:"ui-card forecast-item",on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.openDeviceDetails(t.equip_id,t.equip_name)}}},[a("v-uni-view",{staticClass:"flex-1 info"},[a("v-uni-view",{staticClass:"font-16 title",class:1==t.is_online?"on":"off"},[e._v("设备名称:"+e._s(t.equip_name))]),a("v-uni-view",{staticClass:"text"},[e._v("设备ID:"+e._s(t.equip_id))]),a("v-uni-view",{staticClass:"text text-ellipsis"},[e._v("地址:"+e._s(t.address))]),a("v-uni-view",{staticClass:"text"},[e._v("最新上报时间:"+e._s(e._f("timeFrom")(t.uptime)))])],1),a("v-uni-view",{staticClass:"aftersale-tips"},[e._v("故障上报")])],1):e._e(),4==e.deviceTab?a("v-uni-view",{key:r+"_1",staticClass:"ui-card forecast-item",on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.openDeviceDetails(t.imei,t.device_name)}}},[a("v-uni-view",{staticClass:"flex-1 info"},[a("v-uni-view",{staticClass:"font-16 title",class:1==t.is_online?"on":"off"},[e._v("设备名称:"+e._s(t.device_name?t.device_name:"测报灯"))]),a("v-uni-view",{staticClass:"text"},[e._v("设备ID:"+e._s(t.imei))]),a("v-uni-view",{staticClass:"text text-ellipsis"},[e._v("地址:"+e._s(t.address))]),a("v-uni-view",{staticClass:"text"},[e._v("最新上报时间:"+e._s(e._f("timeFrom")(t.uptime)))])],1),a("v-uni-view",{staticClass:"aftersale-tips"},[e._v("故障上报")])],1):e._e(),2==e.deviceTab?a("v-uni-view",{key:r+"_2",staticClass:"ui-card forecast-item",on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.openDeviceDetails(t.device_id,t.device_name)}}},[a("v-uni-view",{staticClass:"flex-1 info"},[a("v-uni-view",{staticClass:"font-16 title",class:1==t.status?"on":"off"},[e._v("设备名称:"+e._s(t.device_name))]),a("v-uni-view",{staticClass:"text"},[e._v("设备ID:"+e._s(t.device_id))])],1),a("v-uni-view",{staticClass:"aftersale-tips"},[e._v("故障上报")])],1):e._e()]})),0==e.deviceList.length?a("ui-empty"):e._e()],2)},i=[]},c201:function(e,t,a){var r=a("8f6d");"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var n=a("4f06").default;n("1376c54c",r,!0,{sourceMap:!1,shadowMode:!1})},c7b3:function(e,t,a){"use strict";a.r(t);var r=a("abed"),n=a("8bb9");for(var i in n)"default"!==i&&function(e){a.d(t,e,(function(){return n[e]}))}(i);a("1532");var s,c=a("f0c5"),u=Object(c["a"])(n["default"],r["b"],r["c"],!1,null,"317a34a3",null,!1,r["a"],s);t["default"]=u.exports},cbb0:function(e,t,a){var r=a("24fb");t=r(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是app内置的常用样式变量\r\n *\r\n * app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 水平间距 */\r\n/* 水平间距 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.aftersale-tips[data-v-317a34a3]{color:#e93f27;font-size:%?20?%}',""]),e.exports=t},d325:function(e,t,a){"use strict";var r=a("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.getWormLampHistory=t.getPestBaseData=t.getPestImageSource=t.getPestStatisticsChart=t.getPestRaiseInfo=t.getWormDetails=t.getWormImageList=t.getPestWarningList=t.getWormLampDetails=t.getWormLampList=void 0,a("96cf");var n=r(a("1da1")),i=r(a("be72")),s=a("21f4"),c=function(){var e=(0,n.default)(regeneratorRuntime.mark((function e(t,a){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,i.default.post("api/api_gateway?method=forecast.worm_lamp.".concat(t),a);case 2:return r=e.sent,e.abrupt("return",null===r||void 0===r?void 0:r.data);case 4:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}(),u=function(e){return c("lamp_list",e)};t.getWormLampList=u;var o=function(e){return c("device_status_data",e)};t.getWormLampDetails=o;var d=function(e){return c("cbd_pest_warning",e)};t.getPestWarningList=d;var l=function(){var e=(0,n.default)(regeneratorRuntime.mark((function e(t){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,i.default.post("api/api_gateway?method=forecast.forecast_system.device_photo_list",t);case 2:return a=e.sent,e.abrupt("return",null===a||void 0===a?void 0:a.data);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.getWormImageList=l;var v=function(e){return c("worm_list",e)};t.getWormDetails=v;var f=function(e){return c("pest_raise_info",e)};t.getPestRaiseInfo=f;var p=function(){var e=(0,n.default)(regeneratorRuntime.mark((function e(t){var a,r,n,i,u,o,d;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,c("pest_statistics_char_new",t);case 2:for(a=e.sent,a.char_data,r=a.pest_total,n=a.at_ah_info,i={categories:[],series:[{name:"湿度",data:[]},{name:"温度",data:[]}]},u=0;u<n.length;u++)i.categories.push((0,s.timeFormat)(n[u].addtime,"mm-dd")),i.series[0].data.push(n[u].ah),i.series[1].data.push(n[u].at);for(d in o={series:[{data:[]}]},r)o.series[0].data.push({name:d,value:r[d]});return e.abrupt("return",{lineChart:i,pieChart:o,pestTotal:r});case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.getPestStatisticsChart=p;var m=function(e){return c("pest_image_source",e)};t.getPestImageSource=m;var h=function(e){return c("pest_base_data",e)};t.getPestBaseData=h;var b=function(e){return c("device_history_data",e)};t.getWormLampHistory=b},d6c5:function(e,t,a){"use strict";a.r(t);var r=a("32e5"),n=a.n(r);for(var i in r)"default"!==i&&function(e){a.d(t,e,(function(){return r[e]}))}(i);t["default"]=n.a},dcb4:function(e,t,a){"use strict";var r=a("4ea4");a("99af"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(a("2909")),i=r(a("5530"));a("96cf");var s=r(a("1da1")),c=a("4519"),u=a("ed1b"),o=a("d325"),d={data:function(){return{params:{device_id:"",page:1,page_size:10},deviceList:[],total:0,deviceTab:1,deviceTabs:[{text:"气象站",value:1},{text:"监控",value:2},{text:"墒情站",value:3},{text:"测报灯",value:4}]}},onLoad:function(){var e=this;return(0,s.default)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$onLaunched;case 2:e.getDeviceList();case 3:case"end":return t.stop()}}),t)})))()},onReachBottom:function(e){this.deviceList.length>=this.total||(this.params.page+=1,this.getDeviceList())},methods:{refreshDeviceList:function(){this.params.page=1,this.deviceList=[],this.getDeviceList()},clickDeviceTabs:function(e){this.deviceTab=e,this.refreshDeviceList()},openDeviceDetails:function(e,t){uni.navigateTo({url:"index?deviceId=".concat(e,"&name=").concat(t)})},getDeviceList:function(){var e=this;return(0,s.default)(regeneratorRuntime.mark((function t(){var a,r,s,c;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a={},1!=e.deviceTab&&3!=e.deviceTab||(a.device_type=1==e.deviceTab?5:8),4==e.deviceTab&&(a.device_type_id=3),t.next=5,e.requestDeviceList((0,i.default)((0,i.default)({},e.params),a));case 5:r=t.sent,s=r.data,c=r.counts,e.deviceList=[].concat((0,n.default)(e.deviceList),(0,n.default)(s)),e.total=null!==c&&void 0!==c?c:0;case 10:case"end":return t.stop()}}),t)})))()},requestDeviceList:function(e){var t=this;return(0,s.default)(regeneratorRuntime.mark((function a(){var r,n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return r={1:c.getWeatherDeviceList,2:u.getCameraList,3:c.getWeatherDeviceList,4:o.getWormLampList},a.next=3,r[t.deviceTab](e);case 3:if(n=a.sent,1!=t.deviceTab&&3!=t.deviceTab){a.next=6;break}return a.abrupt("return",{data:n.ids,counts:n.nums});case 6:return a.abrupt("return",{data:n.data,counts:n.counts});case 7:case"end":return a.stop()}}),a)})))()},searchDevice:function(e){this.params.device_id=e,this.refreshDeviceList()}}};t.default=d},ed1b:function(e,t,a){"use strict";var r=a("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.controlCamera=t.getCameraAddress=t.getCameraList=void 0,a("96cf");var n=r(a("1da1")),i=r(a("be72")),s=function(){var e=(0,n.default)(regeneratorRuntime.mark((function e(t,a){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,i.default.post("api/api_gateway?method=camera.camera_manage.".concat(t),a);case 2:return r=e.sent,e.abrupt("return",null===r||void 0===r?void 0:r.data);case 4:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}(),c=function(e){return s("list_camera",e)};t.getCameraList=c;var u=function(e){return s("addr_camera_list",e)};t.getCameraAddress=u;var o=function(e){return s("ctrl_camera",e)};t.controlCamera=o}}]);
|