add.js 4.1 KB

1
  1. require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/subPackages/repairDispatch-app/add"],{2251:function(e,t,n){"use strict";var i=n("883d"),o=n.n(i);o.a},"2b6f":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return i}));var i={uniEasyinput:function(){return n.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(n.bind(null,"7e43"))}},o=function(){var e=this.$createElement;this._self._c},a=[]},"73a4":function(e,t,n){},"79a3":function(e,t,n){"use strict";n.r(t);var i=n("c8df"),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);t["default"]=o.a},"883d":function(e,t,n){},"9bf8":function(e,t,n){"use strict";n.r(t);var i=n("2b6f"),o=n("79a3");for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);n("2251"),n("c138");var r=n("f0c5"),c=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,"166c7094",null,!1,i["a"],void 0);t["default"]=c.exports},a921:function(e,t,n){"use strict";(function(e,t){var i=n("4ea4");n("1416"),n("4a2a");i(n("66fd"));var o=i(n("9bf8"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(o.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},c138:function(e,t,n){"use strict";var i=n("73a4"),o=n.n(i);o.a},c8df:function(e,t,n){"use strict";(function(e){var i=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n("2eee")),a=i(n("448a")),r=i(n("c973")),c=n("7982"),u={components:{vanRadio:function(){n.e("common/vendor").then(function(){return resolve(n("06b5"))}.bind(null,n)).catch(n.oe)},vanRadioGroup:function(){n.e("common/vendor").then(function(){return resolve(n("c46a"))}.bind(null,n)).catch(n.oe)}},data:function(){return{dic_SelectList:{},dic_key:["QUICK_SELECTION"],reportTypeSleced:"1",quickSleced:{},quickList:[],positionSleced:"1",positionList:[{val:"1",label:"室内"},{val:"2",label:"公区"}],fileUrlList:[],fileUrls:[],form:{groupId:"",companyId:"",companyName:"",type:"1",serviceType:"",description:"",position:"1",fileUrl:"",status:"unAcceptance"}}},onLoad:function(){this.getByCodes(this.dic_SelectList),this.form.userId=(0,c.getUserLocalStorageInfo)().user.truename+"-"+(0,c.getUserLocalStorageInfo)().user.phone},methods:{getByCodes:function(){var e=this;return(0,r.default)(o.default.mark((function t(){var n;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,c.getByCodes)(JSON.stringify(e.dic_key));case 2:n=t.sent,e.dic_SelectList=e.$common.handleDicList(n);case 4:case"end":return t.stop()}}),t)})))()},quickSelect:function(e){this.quickSleced.value&&this.quickSleced.value===e.value?(this.quickSleced={},console.log(123)):(console.log(e),this.quickSleced=e,this.form.description="",this.form.description=this.form.description+e.label)},beforeDelete:function(e,t){var n=this;return n.fileUrlList.splice(t.index,1),function(e,i){var o=i.index;n.fileUrlList[t.index].splice(o,1)}},afterRead:function(t){var n=this,i=t.detail.file;console.log(i),e.uploadFile({url:n.$constant.BASE_URI+"/wx/fileController/upload",filePath:i[0].url,name:"file",formData:{user:"test"},success:function(e){var t=JSON.parse(e.data),i=t.data;console.log(i[0]),n.fileUrlList.push({id:i[0],url:n.$constant.BASE_URI+"/FileController/download/"+i[0],isImage:!0}),n.fileUrlList=(0,a.default)(n.fileUrlList),n.$forceUpdate(),console.log(n.fileUrlList)},fail:function(e){}})},submit:function(){var t=this;if(null!=t.quickSleced.value&&""!==t.quickSleced.value){var n=(0,c.getUserLocalStorageInfo)().user;t.form.groupId="870261874875170816";var i="";t.fileUrlList&&t.fileUrlList.length>0&&(i=t.fileUrlList.map((function(e){return e.id}))),t.form.fileUrl=i?i.join(","):[],t.form.userId=n.id+"-"+n.truename+"-"+n.phone,t.form.serviceType=this.quickSleced.value,t.form.createdBy=n.id,(0,c.addRepair)(t.form).then((function(n){t.$showToast("填报成功"),e.navigateBack({})}))}else this.$showToast("请选择服务类型")},changePosition:function(e){}}};t.default=u}).call(this,n("543d")["default"])}},[["a921","common/runtime","common/vendor"]]]);