(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/mbwa/mbwaUpload"],{"0bd5":function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i}));var a=function(){var t=this,e=t.$createElement;t._self._c;t._isMounted||(t.e0=function(e){t.inputfocus=!0},t.e1=function(e){t.inputfocus=!1},t.e2=function(e){t.radiofocus=!1})},o=[]},"0da1":function(t,e,n){"use strict";n.r(e);var i=n("0bd5"),a=n("aa9a");for(var o in a)"default"!==o&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("b387");var s,r=n("f0c5"),u=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,"65401b20",null,!1,i["a"],s);e["default"]=u.exports},"12bf":function(t,e,n){"use strict";(function(t){n("40da");i(n("66fd"));var e=i(n("0da1"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},"504b":function(t,e,n){},"94cd":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("2f62");function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var r={data:function(){var t=this.$util.cutDate(new Date,"hh:mm:ss");return{inputfocus:!0,imgfocus:!1,loadingType:1,radiofocus:!0,work_address:"",uploadResult:"",now_time:t,imgData:[],imgsList:[],value:"0",current:0,mbwaId:"",options:[{name:"情况正常",value:"0"},{name:"急需处理",value:"1"}],tagList:[],selectTags:[]}},computed:o({},(0,i.mapGetters)({user:"getUser"})),methods:{radioFocus:function(){this.radiofocus=!0,this.imgfocus=!1},showImg2:function(t){plus.nativeUI.previewImage(this.imgsList,{current:t,loop:!0,indicator:"number"})},submitUpload:function(){var e=this;if(this.radiofocus=!1,this.imgfocus=!1,""==this.uploadResult)return t.showToast({icon:"none",title:"请输入巡查内容！"}),!1;if(0===e.imgData.length)return t.showToast({icon:"none",title:"请上传现场图片。"}),!1;t.showLoading({title:"提交中，请稍后"});var n=e.mbwaId.split(",");n[n.length-1];e.$request.$post("AddMbwa",{MBWA_ADDRESS:e.mbwaId,MBWA_CONTENT:e.uploadResult,ImageArr:e.imgData.toString(),PROCESSMODE:e.value,_enumLabel:e.selectTags.toString()}).then((function(e){t.hideLoading(),100==e.ResultCode?t.showToast({icon:"none",title:"提交成功",success:function(){setTimeout((function(){t.navigateBack({delta:1})}),500)}}):t.showToast({icon:"none",title:e.ResulteDesc})}))},submitImg:function(e){this.imgfocus=!0;var n=this;t.chooseImage({count:1,sizeType:["compressed"],sourceType:["camera"],success:function(e){var i=e.tempFilePaths[0];t.showLoading(),t.uploadFile({url:"https://user.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=MBWA",filePath:i,fileType:"image",name:"data",success:function(e){var a=JSON.parse(e.data);t.hideLoading(),n.imgsList.push(i),n.imgData.push(a.Data.IMAGE_PATH)},fail:function(e){t.showModal({content:e.errMsg,showCancel:!1})}})}})},deleteImgFunc:function(e,n){var i=this;i.$request.$post("DelFile",{fileUrl:i.imgData[n]}).then((function(e){i.imgData.splice(n,1),i.imgsList.splice(n,1),t.showToast({title:e.data,icon:"none",duration:2e3})}))},radioChange:function(t){this.value=t.target.value;for(var e=0;e<this.options.length;e++)if(this.options[e].value===t.target.value){this.current=e;break}},getTag:function(){var t=this;t.$request.$get("GetEnumLable",{fieldexplainField:"BUSINESS_TARGET",fieldenumIndex:3e3}).then((function(e){t.tagList=e.Data.List}))},selectTag:function(t){var e=this.selectTags.indexOf(t.FIELDENUM_VALUE);-1!==e?this.selectTags.splice(e,1):this.selectTags.push(t.FIELDENUM_VALUE),t.ischecked=void 0==t.ischecked||!t.ischecked,this.$forceUpdate()}},onUnload:function(){this.$util.addUserBehavior()},onLoad:function(t){this.mbwaId=t.mbwaID;var e=t.mbwaID.trim().split(",");e.length&&(this.work_address=e[2],this.getTag())}};e.default=r}).call(this,n("543d")["default"])},aa9a:function(t,e,n){"use strict";n.r(e);var i=n("94cd"),a=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a},b387:function(t,e,n){"use strict";var i=n("504b"),a=n.n(i);a.a}},[["12bf","common/runtime","common/vendor"]]]);