| 12 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/cbqxyj/cbwarn"],{1072:function(e,t,n){"use strict";(function(e,t){var a=n(4);n(26);a(n(25));var i=a(n(1073));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n(1)["default"],n(2)["createPage"])},1073:function(e,t,n){"use strict";n.r(t);var a=n(1074),i=n(1076);for(var s in i)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(s);n(1078);var r,o=n(32),c=Object(o["default"])(i["default"],a["render"],a["staticRenderFns"],!1,null,null,null,!1,a["components"],r);c.options.__file="pages/cbqxyj/cbwarn.vue",t["default"]=c.exports},1074:function(e,t,n){"use strict";n.r(t);var a=n(1075);n.d(t,"render",(function(){return a["render"]})),n.d(t,"staticRenderFns",(function(){return a["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return a["recyclableRender"]})),n.d(t,"components",(function(){return a["components"]}))},1075:function(e,t,n){"use strict";var a;n.r(t),n.d(t,"render",(function(){return i})),n.d(t,"staticRenderFns",(function(){return r})),n.d(t,"recyclableRender",(function(){return s})),n.d(t,"components",(function(){return a}));try{a={uIcon:function(){return n.e("uview-ui/components/u-icon/u-icon").then(n.bind(null,1200))},uInput:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-input/u-input")]).then(n.bind(null,1264))},uSwipeAction:function(){return n.e("uview-ui/components/u-swipe-action/u-swipe-action").then(n.bind(null,1473))},uSwitch:function(){return n.e("uview-ui/components/u-switch/u-switch").then(n.bind(null,1423))},uMask:function(){return n.e("uview-ui/components/u-mask/u-mask").then(n.bind(null,1466))},uSelect:function(){return n.e("uview-ui/components/u-select/u-select").then(n.bind(null,1402))},uCalendar:function(){return n.e("uview-ui/components/u-calendar/u-calendar").then(n.bind(null,1343))},uModal:function(){return n.e("uview-ui/components/u-modal/u-modal").then(n.bind(null,1243))}}}catch(o){if(-1===o.message.indexOf("Cannot find module")||-1===o.message.indexOf(".vue"))throw o;console.error(o.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var e=this,t=e.$createElement,n=(e._self._c,e.__map(e.wranlistdata,(function(t,n){var a=e.__get_orig(t),i=e._f("timeFormat")(t.upltime);return{$orig:a,f0:i}}))),a=e.userphone.length,i=e.userphone.length;e._isMounted||(e.e0=function(t){e.timeshow=!0},e.e1=function(t){e.timeshow=!0},e.e2=function(t){e.recordtypeshow=!0},e.e3=function(t){e.accServiceShow=!0}),e.$mp.data=Object.assign({},{$root:{l0:n,g0:a,g1:i}})},s=!1,r=[];i._withStripped=!0},1076:function(e,t,n){"use strict";n.r(t);var a=n(1077),i=n.n(a);for(var s in a)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(s);t["default"]=i.a},1077:function(e,t,n){"use strict";(function(e){var a=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(41)),s=a(n(43)),r=function(){n.e("components/multiple-select").then(function(){return resolve(n(1480))}.bind(null,n)).catch(n.oe)},o={components:{multipleSelect:r},data:function(){return{date:"",active:0,equipArr:["预警记录","预警发布","预警设置"],timeshow:!1,mode:"range",start_time:"",end_time:"",recordtypeshow:!1,recordtype:"",recordtypename:"",recordtypelist:[{value:"",label:"请选择预警类型"},{value:"1",label:"目标种类预警"},{value:"2",label:"指定害虫数量预警"},{value:"3",label:"害虫数量总和预警"},{value:"4",label:"综合预警"}],wranlistdata:[],listpage:1,defaultSelected:[],serviceList:[{value:"1",name:"目标种类预警"},{value:"2",name:"指定害虫数量预警"},{value:"3",name:"害虫数量总和预警"},{value:"4",name:"综合预警"}],accServiceShow:!1,wormvalue:"",userphone:[],total_sms_counts:"",isTop:!1,src:"../../static/images/1.png",src1:"../../static/images/b0bcdb0e3fe8690520f743aa8303bf2.png",filtrateTF:!1,modalshow:!1,content:"",warmstatus:{},configlist:[],addvalue:"",addshow:!1,options:[{text:"删除",style:{backgroundColor:"#dd524d"}}],confpage:1}},methods:{tabClick:function(e){this.active=e,0==e?(this.listpage=1,this.wranlistdata=[],this.getwranlistdata()):1==e?this.getmessagescounts():2==e&&(this.confpage=1,this.configlist=[],this.getconfiglist())},timechange:function(e){console.log(e),this.start_time=e.startDate,this.end_time=e.endDate,this.listpage=1,this.wranlistdata=[],this.getwranlistdata()},closetime:function(){this.start_time="",this.end_time="",this.listpage=1,this.wranlistdata=[],this.getwranlistdata()},confirm:function(e){console.log(e),this.recordtypename=e[0].label,this.recordtype=e[0].value,this.listpage=1,this.wranlistdata=[],this.getwranlistdata()},getwranlistdata:function(){var e=this;return(0,s.default)(i.default.mark((function t(){var n,a,s;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n="",a="",n=""!=e.end_time?Math.floor(+new Date(e.end_time)/1e3):"",a=""!=e.start_time?Math.floor(+new Date(e.start_time)/1e3):"",t.next=6,e.$myRequest({url:"/api/api_gateway?method=device.device_sms_alert.user_cbd_pest_warning_record_list",data:{end_time:n,page:e.listpage,page_size:"10",start_time:a,warning_type:e.recordtype}});case 6:s=t.sent,console.log(s),e.wranlistdata=e.wranlistdata.concat(s.data);case 9:case"end":return t.stop()}}),t)})))()},tomap:function(t){e.navigateTo({url:"./basemap?device_id="+t.device_id})},accServiceConfirm:function(e){console.log(e),this.userphone=e},getuseriphonelist:function(){var e=this;return(0,s.default)(i.default.mark((function t(){var n,a,s;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$myRequest({url:"/api/api_gateway?method=device.device_sms_alert.user_warning_liaisons_list",data:{page:1,page_size:9999999}});case 2:for(n=t.sent,console.log(n),e.serviceList=[],a=0;a<n.data.length;a++)s={value:n.data[a].d_id,name:n.data[a].liaisons+"/"+n.data[a].phone},e.serviceList.push(s);case 6:case"end":return t.stop()}}),t)})))()},getmessagescounts:function(){var e=this;return(0,s.default)(i.default.mark((function t(){var n;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$myRequest({url:"/api/api_gateway?method=device.device_sms_alert.remaining_messages_counts",data:{}});case 2:n=t.sent,console.log(n),e.total_sms_counts=n.total_sms_counts;case 5:case"end":return t.stop()}}),t)})))()},send:function(){var t=this;return(0,s.default)(i.default.mark((function n(){var a,s,r;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(""!=t.wormvalue){n.next=4;break}e.showToast({title:"请填写短信预警信息",icon:"none"}),n.next=15;break;case 4:if(0!=t.userphone.length){n.next=8;break}e.showToast({title:"请选择短信接收人",icon:"none"}),n.next=15;break;case 8:for(a=[],s=0;s<t.userphone.length;s++)a.push(t.userphone[s].value);return n.next=12,t.$myRequest({url:"/api/api_gateway?method=device.device_sms_alert.user_pest_warning_release",data:{send_user:a.join(","),content:t.wormvalue,device_type_id:3}});case 12:r=n.sent,console.log(r),r?e.showToast({title:"发送成功",icon:"none"}):e.showToast({title:"发送失败",icon:"none"});case 15:case"end":return n.stop()}}),n)})))()},tobook:function(){e.navigateTo({url:"./addressbook"})},allread:function(){var t=this;return(0,s.default)(i.default.mark((function n(){var a;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$myRequest({url:"/api/api_gateway?method=device.device_sms_alert.user_cbd_pest_warning_record_read",data:{req:"all"}});case 2:a=n.sent,a&&(e.showToast({title:"已完成一键已读",icon:"none"}),t.listpage=1,t.wranlistdata=[],t.getwranlistdata());case 4:case"end":return n.stop()}}),n)})))()},singleread:function(e){console.log(e),this.modalshow=!0,this.content=e.warning_content,this.warmstatus=e},singlereadsure:function(){var t=this;return(0,s.default)(i.default.mark((function n(){var a;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(0!=t.warmstatus.status){n.next=5;break}return n.next=3,t.$myRequest({url:"/api/api_gateway?method=device.device_sms_alert.user_cbd_pest_warning_record_read",data:{id:t.warmstatus.id}});case 3:a=n.sent,a&&(e.showToast({title:"此条预警已读",icon:"none"}),t.listpage=1,t.wranlistdata=[],t.getwranlistdata());case 5:case"end":return n.stop()}}),n)})))()},top:function(){e.pageScrollTo({scrollTop:0,duration:500})},getconfiglist:function(){var e=this;return(0,s.default)(i.default.mark((function t(){var n,a;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$myRequest({url:"/api/api_gateway?method=device.device_sms_alert.user_warning_config_list",data:{device_type_id:"3",page:e.confpage,page_size:"10"}});case 2:for(n=t.sent,console.log(n.data),a=0;a<n.data.length;a++)n.data[a]["statustf"]=1==n.data[a].status;e.configlist=e.configlist.concat(n.data),console.log(e.configlist);case 7:case"end":return t.stop()}}),t)})))()},swichchange:function(t,n){var a=this;return(0,s.default)(i.default.mark((function s(){var r;return i.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,a.$myRequest({url:"/api/api_gateway?method=device.device_sms_alert.modify_user_warning_config_status",data:{id:n,status:t?1:0}});case 2:r=i.sent,r&&e.showToast({title:"状态修改成功",icon:"none"}),a.configlist=[],a.confpage=1,a.getconfiglist();case 7:case"end":return i.stop()}}),s)})))()},toset:function(t){console.log(t),e.navigateTo({url:"./warnset?id="+t})},addwarning_config:function(){return(0,s.default)(i.default.mark((function t(){return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.navigateTo({url:"./warnset"});case 1:case"end":return t.stop()}}),t)})))()},delconfig:function(e){var t=this;return(0,s.default)(i.default.mark((function n(){var a;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$myRequest({url:"/api/api_gateway?method=device.device_sms_alert.del_user_warning_config_status",data:{id:e}});case 2:a=n.sent,console.log(a),a&&(t.configlist=[],t.confpage=1,t.getconfiglist());case 5:case"end":return n.stop()}}),n)})))()}},onLoad:function(){this.getwranlistdata()},onShow:function(){this.getuseriphonelist(),this.getconfiglist()},onReachBottom:function(){0==this.active?(this.listpage++,this.getwranlistdata()):2==this.active&&(this.confpage++,this.getconfiglist())},onPageScroll:function(e){e.scrollTop>200?this.isTop=!0:this.isTop=!1}};t.default=o}).call(this,n(2)["default"])},1078:function(e,t,n){"use strict";n.r(t);var a=n(1079),i=n.n(a);for(var s in a)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(s);t["default"]=i.a},1079:function(e,t,n){}},[[1072,"common/runtime","common/vendor"]]]);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/cbqxyj/cbwarn.js.map
|