(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2521d50c"],{"08fd":function(n,t,e){"use strict";e("e258")},"6a5c":function(n,t,e){"use strict";e.r(t);var o=function(){var n=this,t=n._self._c;return t("div",{staticClass:"ids-patrol-scan"},[n._v("二维码扫描")])},a=[],i=e("897d"),s=e.n(i),c=e("4532"),u=e("aed0"),r={name:"iDS-PatrolSacn",components:{PullTo:s.a},data:function(){return{buttons:[{disabled:!1,loading:!1,title:"确定",func:this.onConfirm,params:""}]}},computed:{height:function(){return"calc(".concat(window.innerHeight,"px - 48px ")+")"}},methods:{onConfirm:function(){},addClickEvent:function(n){for(var t in n)switch(n[t].title){case"确定":n[t].func=this.onConfirm;break}return n},scan:function(){var n=this;window.cordova&&window.cordova.plugins.barcodeScanner&&window.cordova.plugins.barcodeScanner.scan((function(t){t&&t.text?(n.content=t.text,n.$router.push({name:"patrolinfo",params:{scanResult:n.content}})):n.$router.push({name:"patrolinfo",params:{scanResult:n.content}})}),(function(t){n.$router.push({name:"patrolinfo",params:{scanResult:"err"}})}),{prompt:"请将二维码置于框内",resultDisplayDuration:0,showTorchButton:!0})},changeView:function(){if(c["a"].vm.setTitle("巡检"),c["a"].vm.setBackDisabled(!1),c["a"].vm.setBackIcon("arrow_back"),c["a"].vm.setMsgInputVisible(!1),c["a"].vm.setMenuDisabled(!0),c["a"].vm.setBottomNavVisible(!1),c["a"].vm.setBottomBtnVisible(!0),null!==this.buttons){var n=u["a"].getCopy(this.buttons);c["a"].vm.setBottomBtn({value:this.addClickEvent(n)})}c["a"].vm.setContentHeight({value:"calc(".concat(window.innerHeight,"px - 48px ")+")"})}},created:function(){console.log("调试代码"),null!=c["a"].vm.getUserToken()&&null!=c["a"].vm.getUserId()?(c["a"].vm.setHomePageRoute("homepageequipment"),this.changeView(),this.scan()):window.location.href="/"},mounted:function(){},beforeDestroy:function(){c["a"].vm.setMenuDisabled(!0),c["a"].vm.setMenuItems([]),c["a"].vm.setMenuIcon("")}},l=r,m=(e("08fd"),e("2877")),d=Object(m["a"])(l,o,a,!1,null,null,null);t["default"]=d.exports},e258:function(n,t,e){}}]);