addRepair.js 4.2 KB

1
  1. require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/subPackages/todo/addRepair"],{"12c0":function(e,t,i){"use strict";(function(e){var o=i("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i("2eee")),a=o(i("c973")),c=i("7982"),s=(o(i("3f13")),{data:function(){return{getUserLocalStorageInfo:(0,c.getUserLocalStorageInfo)(),dc_key:["QUICK_SELECTION"],isCheck:!1,isCheck2:!1,form:{groupId:"",companyId:(0,c.getUserLocalStorageInfo)().userId,type:"1",serviceType:"",description:"",position:"1",userId:(0,c.getUserLocalStorageInfo)().userId+"-"+(0,c.getUserLocalStorageInfo)().username+"-"+(0,c.getUserLocalStorageInfo)().phone,fileUrl:"",status:"unAcceptance",userType:(0,c.getUserLocalStorageInfo)().userType},submitUser:(0,c.getUserLocalStorageInfo)().username+"-"+(0,c.getUserLocalStorageInfo)().phone,checkList:[],quickSleced:{},fileList:[],dic_SelectList:[]}},created:function(){this.getByCodes()},mounted:function(){},methods:{showClick:function(e){console.log(e)},changeIpt:function(e){this.form.description=e.detail},onChange:function(e){this.form.type=e.detail},onChange2:function(e){this.form.position=e.detail},getByCodes:function(){var e=this;return(0,a.default)(n.default.mark((function t(){var i;return n.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,c.getByCodes)(JSON.stringify(e.dc_key));case 2:i=t.sent,e.dic_SelectList=e.$common.handleDicList(i),e.checkList=e.dic_SelectList.QUICK_SELECTION;case 5:case"end":return t.stop()}}),t)})))()},toRecord:function(){e.navigateTo({url:"/pages/subPackages/reportRepair/repairRecord"})},clickCheck:function(e){this.quickSleced.value&&this.quickSleced.value===e.value?this.quickSleced={}:(this.quickSleced=e,this.$set(this.form,"description",e.label))},submit:function(){if(null!=this.quickSleced.value&&""!==this.quickSleced.value)if(this.fileList.length<=0||!this.fileList)e.showToast({title:"请上传补充说明图片",icon:"none",mask:!0,duration:1e3});else{var t=[];this.fileList.forEach((function(e){t.push(e)})),this.form.fileUrl=JSON.stringify(t),this.form.serviceType=this.quickSleced.value,this.form.createdBy=this.getUserLocalStorageInfo.userId,(0,c.repairAdd)(this.form).then((function(t){e.showToast({title:"填报成功",icon:"success",mask:!0,duration:1e3}),e.navigateBack()}))}else e.showToast({title:"请选择服务类型",icon:"none",mask:!0,duration:1e3})},deleteRYXXZP:function(e){this.fileList.splice(e.detail.index,1),this.$forceUpdate()},uploadRYXXZP:function(t){var i=this,o=t.detail.file;console.log(t.detail),e.uploadFile({url:i.$constant.BASE_URI+"/wx/fileController/upload",filePath:o.url,name:"file",formData:{user:"test"},success:function(e){var o=JSON.parse(e.data);"image"===t.detail.file.type?i.fileList.push({imgUrl:"/FileController/download/"+o.data[0],id:o.data[0],url:i.$constant.BASE_URI+"/FileController/download/"+o.data[0],type:t.detail.file.type,isImage:!0}):i.fileList.push({imgUrl:"/FileController/download/"+o.data[0],id:o.data[0],url:i.$constant.BASE_URI+"/FileController/download/"+o.data[0],type:t.detail.file.type,isVideo:!0})},fail:function(e){}})}}});t.default=s}).call(this,i("543d")["default"])},3761:function(e,t,i){"use strict";i.r(t);var o=i("d225"),n=i("3838");for(var a in n)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(a);i("9395");var c=i("f0c5"),s=Object(c["a"])(n["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);t["default"]=s.exports},3838:function(e,t,i){"use strict";i.r(t);var o=i("12c0"),n=i.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return o[e]}))}(a);t["default"]=n.a},"4b2c":function(e,t,i){},5495:function(e,t,i){"use strict";(function(e,t){var o=i("4ea4");i("1416"),i("4a2a");o(i("66fd"));var n=o(i("3761"));e.__webpack_require_UNI_MP_PLUGIN__=i,t(n.default)}).call(this,i("bc2e")["default"],i("543d")["createPage"])},9395:function(e,t,i){"use strict";var o=i("4b2c"),n=i.n(o);n.a},d225:function(e,t,i){"use strict";i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return n})),i.d(t,"a",(function(){}));var o=function(){var e=this.$createElement;this._self._c},n=[]}},[["5495","common/runtime","common/vendor","pages/subPackages/common/vendor"]]]);