detail.js 6.3 KB

12
  1. require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/subPackages/repairprocessing-app/detail"],{188:function(e,t,n){"use strict";(function(e,t){var a=n(4);n(26),n(27);a(n(25));var i=a(n(189));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n(1)["default"],n(2)["createPage"])},189:function(e,t,n){"use strict";n.r(t);var a=n(190),i=n(192);for(var r in i)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(r);n(194),n(196);var s,l=n(46),o=Object(l["default"])(i["default"],a["render"],a["staticRenderFns"],!1,null,null,null,!1,a["components"],s);o.options.__file="pages/subPackages/repairprocessing-app/detail.vue",t["default"]=o.exports},190:function(e,t,n){"use strict";n.r(t);var a=n(191);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"]}))},191:function(e,t,n){"use strict";var a;n.r(t),n.d(t,"render",(function(){return i})),n.d(t,"staticRenderFns",(function(){return s})),n.d(t,"recyclableRender",(function(){return r})),n.d(t,"components",(function(){return a}));var i=function(){var e=this,t=e.$createElement;e._self._c},r=!1,s=[];i._withStripped=!0},192:function(e,t,n){"use strict";n.r(t);var a=n(193),i=n.n(a);for(var r in a)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(r);t["default"]=i.a},193: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(29)),r=a(n(18)),s=a(n(32)),l=n(67),o=function(){n.e("pages/subPackages/components/tel-number/index").then(function(){return resolve(n(443))}.bind(null,n)).catch(n.oe)},d=function(){n.e("common/vendor").then(function(){return resolve(n(486))}.bind(null,n)).catch(n.oe)},c={components:{TelNum:o,vanRate:d},data:function(){return{handleUserId2:"",userId2:"",dispatchUserId2:"",dic_key:["QUICK_SELECTION","REPAIR_STATUS"],dic_SelectList:{},detailId:"",handleUrlList:[],fileUrls:[],handleUrls:[],detailStatus:"1",explainAnnexList:[],processedAnnexList:[],stepActive:0,processSteps:[{id:1,status:1,text:"上报"},{id:2,status:1,text:"已受理"},{id:3,status:1,text:"已处理"},{id:4,status:0,text:"评价"}],evaluateVal:0,id:"",detail:{},fileUrlList:[],params:{id:"",handleUrl:"",handleTime:"",status:"processed"}}},onLoad:function(e){this.id=e.id,this.getByCodes()},methods:{getByCodes: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,(0,l.getByCodes)(JSON.stringify(e.dic_key));case 2:n=t.sent,e.dic_SelectList=e.$common.handleDicList(n),e.getDetailById();case 5:case"end":return t.stop()}}),t)})))()},onSelect:function(e){this.value=e.text,this.params.handleUserId=e.value+"-"+e.text,this.showPicker=!1},onConfirm:function(t){var n=this;this.params.id=this.id,this.params.handleTime=this.detail.handleTime;var a=[];this.handleUrlList&&this.handleUrlList.length>0&&(a=this.handleUrlList.map((function(e){return e.id}))),this.params.updatedBy=(0,l.getUserLocalStorageInfo)().user.id,this.params.handleUrl=a.join(","),(0,l.editRepair)(this.params).then((function(t){n.$showToast("结案成功"),e.navigateBack({})}))},getDetailById:function(){var e=this,t=this;(0,l.getRepairDispatchById)(t.id).then((function(n){if(console.log(n.data),n.data){var a=t.getItemJson(n.data);if(e.detail=a,null!=a.userId&&""!==a.userId){var i=a.userId.split("-");e.detail.phone=i[2],e.userId2=i[1]+"-"+i[2]}if(null!=a.dispatchUserId&&""!==a.dispatchUserId){var r=a.dispatchUserId.split("-");console.log(r),e.dispatchUserId2=r[1]+"-"+r[2]}if(null!=a.handleUserId&&""!==a.handleUserId){var s=a.handleUserId.split("-");console.log(s),e.handleUserId2=s[1]+"-"+s[2]}e.handleUrlList=a.handleUrlList,console.log("asodmqowndonq",e.handleUrlList),e.explainAnnexList=a.fileUrlViewList,e.detailStatus=a.status,e.params.remark=a.remark}}))},getItemJson:function(e){var t=this,n=e.fileUrl?e.fileUrl.split(","):[],a=[];null!==n&&n.length>0&&n.forEach((function(e){e=t.$constant.BASE_URI+"/wx/fileController/download/"+e,a.push(e)})),e.fileUrlViewList=a,e.handleTime||(e.handleTime=this.$common.transServDate(new Date));var i=e.handleUrl?e.handleUrl.split(","):[],r=[];switch(null!==i&&i.length>0&&i.forEach((function(e){r.push({url:t.$constant.BASE_URI+"/wx/fileController/download/"+e,isImage:!0})})),e.handleUrlList=r,console.log(e),e.serviceType=this.dic_SelectList.QUICK_SELECTION[e.serviceType-1].label,e.status){case"unAcceptance":this.stepActive=0;break;case"acceptance":this.stepActive=1;break;case"evaluated":this.stepActive=3;break;case"processed":this.stepActive=2;break}return e},afterRead:function(t){var n=this,a=t.detail.file;try{e.uploadFile({url:n.$constant.BASE_URI+"/wx/fileController/upload",filePath:a.url,name:"file",formData:{user:"test"},success:function(e){var t=JSON.parse(e.data),a=t.data;console.log(a[0]),n.handleUrlList.push({id:a[0],url:n.$constant.BASE_URI+"/FileController/download/"+a[0],isImage:!0}),n.handleUrlList=(0,r.default)(n.handleUrlList),n.$forceUpdate(),console.log(n.fileUrlList)},fail:function(e){}})}catch(i){}},beforeDelete:function(e,t){var n=this;return n.handleUrls.splice(t.index,1),function(e,a){var i=a.index;n.handleUrls[t.index].splice(i,1)}},uploadImg:function(e){var t=this,n=new FormData;n.append("file",e.file),console.log(n.get("file"));var a={headers:{"Content-Type":"multipart/form-data","MVVM-Key":String((new Date).getTime()),xx:"anything"}};return new Promise((function(e,i){axios.post("/smartParkH5Server/wx/fileController/upload",n,a).then((function(e){var n=e.data.data.substring(1,e.data.data.length);n=n.substring(0,n.length-1),t.handleUrls.push(t.$common.castEval(n))})).catch((function(e,t){i(e,t)}))}))}}};t.default=c}).call(this,n(2)["default"])},194:function(e,t,n){"use strict";n.r(t);var a=n(195),i=n.n(a);for(var r in a)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(r);t["default"]=i.a},195:function(e,t,n){},196:function(e,t,n){"use strict";n.r(t);var a=n(197),i=n.n(a);for(var r in a)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(r);t["default"]=i.a},197:function(e,t,n){}},[[188,"common/runtime","common/vendor"]]]);
  2. //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/subPackages/repairprocessing-app/detail.js.map