(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f69a264c"],{6703:function(t,e,r){"use strict";r.r(e);var o=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ids-qrcode-show",staticStyle:{"text-align":"center"},style:{height:t.height,padding:"1px"},attrs:{id:"ids-qrcode-show"}},[e("canvas",{attrs:{id:"canvasShowQrcode"}}),e("div",{style:{marginTop:"calc(("+t.height+"/2) - 250px)"}},[e("span",{staticStyle:{"font-size":"20px"}},[t._v(t._s(t.qrcodeValue))])])])},i=[],n=r("2f62"),a=r("d055"),c=r.n(a),s=r("4532");function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return e=f(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function f(t){var e=m(t,"string");return"symbol"===l(e)?e:String(e)}function m(t,e){if("object"!==l(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==l(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var b={name:"iDS-QrcodeShow",components:{QRCode:c.a},data:function(){return{title:"显示二维码",qrcode:null,qrcodeValue:"",taskDetailID:"",taskDetailState:"",scanResult:0,qrcodeColor:"#000000",timer:null}},computed:{height:function(){return"calc(".concat(window.innerHeight,"px - 48px ")+")"}},methods:d(d({showQrcode:function(){var t={errorCorrectionLevel:"H",type:"image/jpeg",quality:1,margin:1,height:300,width:300,color:{dark:this.qrcodeColor}};c.a.toCanvas(document.getElementById("canvasShowQrcode"),this.qrcodeValue,t,(function(t){}))},mFetchTaskDetailQRCodeScanRecord:function(){var t=this;this.fetchTaskDetailQRCodeScanRecord({id:this.taskDetailID,authorization:{Authorization:"Bearer "+s["a"].vm.getUserToken()},vm:s["a"].vm}).then((function(){var e=t.getWaybillQRCodeScanRecord();if(null!=e){switch(t.scanResult=e.scanResult,t.scanResult){case 0:t.qrcodeColor="#000000";break;case 1:t.qrcodeColor="#67C23A";break;case 2:t.qrcodeColor="#F56C6C";break;default:t.qrcodeColor="#000000";break}t.showQrcode()}}),(function(){t.qrcodeColor="#000000",t.showQrcode()}))},changeView:function(){s["a"].vm.setTitle(this.title),s["a"].vm.setBottomNavVisible(!1),s["a"].vm.setBottomBtnVisible(!1),s["a"].vm.setBackDisabled(!1),s["a"].vm.setBackIcon("arrow_back"),s["a"].vm.setContentHeight({value:"calc(".concat(window.innerHeight,"px - 48px ")+")"})}},Object(n["c"])("waybill",["getWaybillQRCodeScanRecord"])),Object(n["b"])("waybill",["fetchTaskDetailQRCodeScanRecord"])),created:function(){console.log("调试代码"),null!=s["a"].vm.getUserToken()&&null!=s["a"].vm.getUserId()?(null!=this.timer&&clearInterval(this.timer),this.title=this.$route.params.title,this.qrcodeValue=this.$route.params.qrcodeValue,this.taskDetailID=this.$route.params.taskDetailID,this.changeView()):window.location.href="/"},mounted:function(){var t=this;"driver"==s["a"].vm.getUserRoleGroup().name?(this.taskDetailState=this.$route.params.taskDetailState,"ptds_delivering"==this.taskDetailState?(this.qrcodeColor="#E6A23C",this.showQrcode()):"ptds_delaying"==this.taskDetailState?(this.mFetchTaskDetailQRCodeScanRecord(),this.timer=setInterval((function(){t.mFetchTaskDetailQRCodeScanRecord()}),3e3)):(this.qrcodeColor="#000000",this.showQrcode())):this.showQrcode()},beforeDestroy:function(){clearInterval(this.timer)}},p=b,v=(r("ddbf"),r("2877")),y=Object(v["a"])(p,o,i,!1,null,null,null);e["default"]=y.exports},"7bd2":function(t,e,r){},ddbf:function(t,e,r){"use strict";r("7bd2")}}]);