gsequipment.js 4.8 KB

12
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/environment/gsequipment"],{863:function(e,t,n){"use strict";(function(e,t){var o=n(4);n(26);o(n(25));var a=o(n(864));e.__webpack_require_UNI_MP_PLUGIN__=n,t(a.default)}).call(this,n(1)["default"],n(2)["createPage"])},864:function(e,t,n){"use strict";n.r(t);var o=n(865),a=n(867);for(var i in a)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(i);n(869);var r,s=n(32),u=Object(s["default"])(a["default"],o["render"],o["staticRenderFns"],!1,null,null,null,!1,o["components"],r);u.options.__file="pages/environment/gsequipment.vue",t["default"]=u.exports},865:function(e,t,n){"use strict";n.r(t);var o=n(866);n.d(t,"render",(function(){return o["render"]})),n.d(t,"staticRenderFns",(function(){return o["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return o["recyclableRender"]})),n.d(t,"components",(function(){return o["components"]}))},866:function(e,t,n){"use strict";var o;n.r(t),n.d(t,"render",(function(){return a})),n.d(t,"staticRenderFns",(function(){return r})),n.d(t,"recyclableRender",(function(){return i})),n.d(t,"components",(function(){return o}));try{o={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))},uModal:function(){return n.e("uview-ui/components/u-modal/u-modal").then(n.bind(null,1171))}}}catch(s){if(-1===s.message.indexOf("Cannot find module")||-1===s.message.indexOf(".vue"))throw s;console.error(s.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")(e.eqinfo.uptime):null),o=e.eqinfo.uptime?null:e._f("timeFormat")(e.eqinfo.addtime),a=e.$QueryPermission(250),i=e.$QueryPermission(189);e.$mp.data=Object.assign({},{$root:{f0:n,f1:o,m0:a,m1:i}})},i=!1,r=[];a._withStripped=!0},867:function(e,t,n){"use strict";n.r(t);var o=n(868),a=n.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t["default"]=a.a},868:function(e,t,n){"use strict";(function(e){var o=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(41)),i=o(n(43)),r={data:function(){return{eqinfo:{},city:"",modalshow:!1,stepsize:"",newdataobj:{},depthlist:[]}},methods:{reverseGeocode:function(t,n){var o=this;e.request({type:"GET",url:"https://restapi.amap.com/v3/geocode/regeo?output=JSON&location="+n+","+t+"&key=27273b81090f78759e4057f94474516f&radius=1000&extensions=all",dataType:"json",complete:function(e){console.log(e),0==e.data.regeocode.formatted_address.length?o.city="--":o.city=e.data.regeocode.formatted_address}})},setlongfun:function(t){var n=this;return(0,i.default)(a.default.mark((function o(){var i;return a.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return n.modalshow=!n.modalshow,o.next=3,n.$myRequest({url:"/api/api_gateway?method=weather.weather.nd_topic_change",data:{device_id:n.eqinfo.device_id,depth:t}});case 3:i=o.sent,console.log(i),""==t?n.depthlist=i.depth.split(","):i?e.showToast({title:"设置成功",icon:"none"}):e.showToast({title:"设置失败",icon:"none"});case 6:case"end":return o.stop()}}),o)})))()},newdatafun:function(){var e=this;return(0,i.default)(a.default.mark((function t(){var n;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=weather.weather.nd_status",data:{device_id:e.eqinfo.device_id}});case 2:n=t.sent,e.newdataobj=n,e.newdataobj.depth=e.newdataobj.depth.split(","),e.newdataobj.temp=e.newdataobj.temp.split(","),e.newdataobj.swc=e.newdataobj.swc.split(","),e.newdataobj.ecs=e.newdataobj.ecs.split(","),console.log(e.newdataobj);case 9:case"end":return t.stop()}}),t)})))()},confirm:function(){this.modalshow=!this.modalshow,this.setlongfun(this.depthlist)},clickLeft:function(){e.navigateBack({delta:1})},tohistory:function(){e.navigateTo({url:"./gshistory?id="+this.eqinfo.device_id})},copy:function(t){e.setClipboardData({data:t,success:function(){console.log("success")}})}},onLoad:function(e){this.eqinfo=JSON.parse(e.shebei),this.reverseGeocode(this.eqinfo.lat,this.eqinfo.lng),this.newdatafun(),console.log(this.eqinfo)}};t.default=r}).call(this,n(2)["default"])},869:function(e,t,n){"use strict";n.r(t);var o=n(870),a=n.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t["default"]=a.a},870:function(e,t,n){}},[[863,"common/runtime","common/vendor"]]]);
  2. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/environment/gsequipment.js.map