chunk-8a967f8e.8badbddc.js 12 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8a967f8e"],{"052d":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"repair-box"},[a("div",{staticClass:"repair-content fixed-page-content"},[a("div",{staticClass:"white-box page-1"},[a("div",{staticClass:"page-1-head",on:{click:function(e){return t.goNavigator("repairDispatch-app")}}},[a("i",{staticClass:"iconfont icon-daichulihetong"}),a("span",[t._v("派单记录")])])]),a("div",{staticClass:"white-box page-2"},[t._m(0),a("div",{staticClass:"custom-white-box-content"},[a("div",{staticClass:"custom-input-box"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.form.companyName,expression:"form.companyName"}],attrs:{type:"text",maxlength:"50px",placeholder:"请输入"},domProps:{value:t.form.companyName},on:{input:function(e){e.target.composing||t.$set(t.form,"companyName",e.target.value)}}})])]),a("div",{staticClass:"cell-item"},[a("p",{staticClass:"label required"},[t._v("您是想")]),a("div",{staticClass:"tit"},[a("van-radio-group",{model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}},[a("van-radio",{attrs:{name:"1","checked-color":"#976CEB"}},[t._v("报事")]),a("van-radio",{attrs:{name:"2","checked-color":"#976CEB"}},[t._v("咨询")])],1)],1)]),a("div",{staticClass:"block-cell-item"},[a("p",{staticClass:"label"},[t._v("快捷选择")]),a("div",{staticClass:"tit"},[a("ul",{staticClass:"custom-select-list"},t._l(t.quickList,function(e){return""!==e.value?a("li",{key:e.value,class:{active:t.quickSleced.value&&e.value===t.quickSleced.value},on:{click:function(a){return t.quickSelect(e)}}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(e.label)+"\n\t\t\t\t\t\t\t")]):t._e()}),0),a("van-field",{attrs:{autosize:"",type:"textarea",maxlength:"800",placeholder:"输入文字进行报事报修描述","show-word-limit":""},model:{value:t.form.description,callback:function(e){t.$set(t.form,"description",e)},expression:"form.description"}})],1)])]),a("div",{staticClass:"white-box page-3"},[a("div",{staticClass:"cell-item"},[a("p",{staticClass:"label required"},[t._v("位置")]),a("div",{staticClass:"tit"},[a("van-radio-group",{model:{value:t.form.position,callback:function(e){t.$set(t.form,"position",e)},expression:"form.position"}},t._l(t.positionList,function(e){return a("van-radio",{key:e.val,attrs:{name:e.val,"checked-color":"#976CEB"},on:{change:function(a){return t.changePosition(e.val)}}},[t._v(t._s(e.label)+"\n\t\t\t\t\t\t\t")])}),1)],1)]),a("div",{staticClass:"block-cell-item"},[t._m(1),a("div",{staticClass:"tit"},[a("van-uploader",{attrs:{multiple:!0,"max-count":6,"after-read":t.afterRead,"before-delete":t.beforeDelete},model:{value:t.fileUrls,callback:function(e){t.fileUrls=e},expression:"fileUrls"}})],1)]),a("div",{staticClass:"cell-item"},[a("p",{staticClass:"label"},[t._v("报事人")]),a("p",{staticClass:"tit"},[t._v(t._s(t.form.userId))])])])]),a("div",{staticClass:"repair-bottom bottom-button"},[a("button",{staticClass:"btn",on:{click:t.submit}},[t._v("提交")])])])},i=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"custom-item-tit"},[a("p",{staticClass:"tit"},[t._v("当前企业")])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("p",{staticClass:"label"},[t._v("\n\t\t\t\t\t\t补充说明"),a("span",{staticClass:"tips"},[t._v("(支持图片/视频上传限20M内,最多6张)")])])}],c=a("f499"),o=a.n(c),r=a("795b"),s=a.n(r),u=a("06a8"),l=a("bc3a"),d=a.n(l),f=a("b48a"),m=a("3a06"),h=a("3089"),p=a("5cab"),v={data:function(){return{dc_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",userId:p["a"].currUser().truename+"-"+p["a"].currUser().phone,fileUrl:"",status:"unAcceptance"}}},mixins:[u["a"]],mounted:function(){var t=this;this.initDict(this.dc_key).then(function(e){t.quickList=t.dc_data.QUICK_SELECTION}),Object(m["d"])({id:p["a"].currUser().id,type:"2,3"}).then(function(e){t.form.companyName=e.data.businessName})},methods:{quickSelect:function(t){this.quickSleced.value&&this.quickSleced.value===t.value?this.quickSleced={}:this.quickSleced=t},afterRead:function(t){var e=this;t instanceof Array?t.map(function(t){e.uploadImg(t)}):this.uploadImg(t)},beforeDelete:function(t,e){var a=this;return a.fileUrlList.splice(e.index,1),function(t,n){var i=n.index;a.fileUrlList[e.index].splice(i,1)}},uploadImg:function(t){var e=this,a=new FormData;a.append("file",t.file),console.log(a.get("file"));var n={headers:{"Content-Type":"multipart/form-data","MVVM-Key":String((new Date).getTime()),xx:"anything"}};return new s.a(function(t,i){d.a.post("/industryParkApi/wx/fileController/upload",a,n).then(function(t){var a=t.data.data.substring(1,t.data.data.length);a=a.substring(0,a.length-1),e.fileUrlList.push(e.$common.castEval(a))}).catch(function(t,e){i(t,e)})})},submit:function(){var t=this;null!=this.quickSleced.value&&""!==this.quickSleced.value?(this.form.groupId="870261874875170816",this.form.fileUrl=o()(this.fileUrlList),this.form.userId=p["a"].currUser().id+"-"+p["a"].currUser().truename+"-"+p["a"].currUser().phone,this.form.serviceType=this.quickSleced.value,this.form.createdBy=p["a"].currUser().id,Object(f["a"])(this.form).then(function(e){Object(h["Toast"])("填报成功"),t.$router.push({path:"/repairDispatch-app"})})):Object(h["Toast"])("请选择服务类型")},changePosition:function(t){}}},b=v,g=(a("85cb"),a("2877")),_=Object(g["a"])(b,n,i,!1,null,"7b9ebd09",null);e["default"]=_.exports},"06a8":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div")},i=[],c=a("795b"),o=a.n(c),r=(a("7f7f"),a("ac6a"),a("f20c")),s=a("5cab"),u=a("f499"),l=a.n(u),d=a("8982"),f="/industryParkApi",m="/wx/data",h="/wx/public",p="/wx/dictController";function v(t){return Object(d["a"])({url:f+m+"/listBizAll/"+t,method:"post"})}function b(t){return Object(d["a"])({url:f+h+"/listProjectAll",method:"post",data:t})}function g(t){return Object(d["a"])({url:f+p+"/getByCodes",method:"post",data:t})}function _(t){var e={codes:l()(t)};return new o.a(function(t,a){g(e).then(function(e){t(e)}).catch(function(t,e){a(t,e)})})}var k=a("3089"),C={name:"BaseData",data:function(){return{currentPage:1,totalSize:0,pageSize:10,InitialLoading:!0,allLoaded:!1,bottomStatus:"",StaffData:[],StaffMap:{},BizData:[],BizMap:{},UserProject:[],ProjectData:[],ProjectMap:{},dialogImageUrl:"",dialogImageVisible:!1,dc_map:{},dc_data:{},dc_map_no_all:{},dc_data_no_all:{}}},mounted:function(){},methods:{initDict:function(t){var e=this;return t||(t=e.dc_key),_(t).then(function(t){t.data&&e.dc_key.forEach(function(a){var n=e.getDictValue(t.data,a,!0);e.dc_data[a]=n,e.dc_map[a]=e.$common.transDcMap(n);var i=e.getDictValue(t.data,a,!1);e.dc_data_no_all[a]=i,e.dc_map_no_all[a]=e.$common.transDcMap(i)})})},initDict2:function(t){var e=this;return t||(t=e.dc_key),_(t).then(function(t){t.data&&e.dc_key.forEach(function(a){var n=e.getDictValue(t.data,a,!1);e.dc_data[a]=n,e.dc_map[a]=e.$common.transDcMap(n);var i=e.getDictValue(t.data,a,!1);e.dc_data_no_all[a]=i,e.dc_map_no_all[a]=e.$common.transDcMap(i)})})},initBiz:function(){var t=this;return this.BizData=[],v(s["a"].uid()).then(function(e){e.data&&e.data.forEach(function(e){var a={label:e.businessName,value:e.id};t.BizData.push(a),t.BizMap[e.id]=e.businessName})}).catch(function(){})},initProjectData:function(){var t=this;return this.ProjectData=[],b(s["a"].uid()).then(function(e){e.data&&e.data.forEach(function(e){var a={label:e.name,value:e.id};t.ProjectData.push(a),t.ProjectMap[a.value]=e})}).catch(function(){})},pagination:function(t){var e=this.currentPage,a=this.pageSize,n=e*a-a,i=e*a;return t.slice(n,i)},getDictValue:function(t,e,a){var n=t[e]?r["a"].castEval(t[e].dictValue):[],i=[];if(n.forEach(function(t){var e={id:t.id,isSearch:t.isSearch,label:t.label,value:t.value,active:!1};i.push(e)}),a){var c={label:"全部",value:"",active:!0};i.unshift(c)}return i},confirm:function(t,e){return new o.a(function(a,n){k["Dialog"].confirm({title:e,message:t}).then(function(t){a(t)}).catch(function(t){Object(k["Toast"])("已取消"),n(t)})})},handleBottomChange:function(t){console.log("handleBottomChange:"+t),this.bottomStatus=t,"drop"===this.bottomStatus&&this.currentPage++},loadBottom:function(){var t=this,e=this;console.log("loadBottom"),setTimeout(function(){e.getData(),t.$refs.loadmore.onBottomLoaded()},500)},imgPreview:function(t){this.dialogImageUrl="/industryParkApi/wx/img/viewImg/"+t,this.dialogImageVisible=!0},imgRemove:function(t,e){var a=e.indexOf(t);e.splice(a,1)},noImg:function(){var t=event.srcElement;t.src=a("aed7"),t.onerror=null}}},y=C,x=a("2877"),j=Object(x["a"])(y,n,i,!1,null,"3fa5b905",null);e["a"]=j.exports},"2bd5":function(t,e,a){},"3a06":function(t,e,a){"use strict";a.d(e,"a",function(){return o}),a.d(e,"e",function(){return r}),a.d(e,"c",function(){return s}),a.d(e,"b",function(){return u}),a.d(e,"d",function(){return l});var n=a("8982"),i="/industryParkApi",c="/wx/roadShow";function o(t){return Object(n["a"])({url:i+c+"/add",method:"post",data:t})}function r(t){return Object(n["a"])({url:i+c+"/list",method:"post",data:t})}function s(t){return Object(n["a"])({url:i+c+"/getById",method:"post",data:t})}function u(t){return Object(n["a"])({url:i+c+"/edit",method:"post",data:t})}function l(t){return Object(n["a"])({url:i+c+"/getCompanyById",method:"post",data:t})}},"7f7f":function(t,e,a){var n=a("86cc").f,i=Function.prototype,c=/^\s*function ([^ (]*)/,o="name";o in i||a("9e1e")&&n(i,o,{configurable:!0,get:function(){try{return(""+this).match(c)[1]}catch(t){return""}}})},"85cb":function(t,e,a){"use strict";var n=a("2bd5"),i=a.n(n);i.a},8982:function(t,e,a){"use strict";a.d(e,"a",function(){return m}),a.d(e,"b",function(){return h});var n=a("795b"),i=a.n(n),c=a("bc3a"),o=a.n(c),r=a("4328"),s=a.n(r),u=a("4360"),l=a("5cab"),d=a("a18c"),f=a("3089");function m(t,e){t.headers||(t.headers={}),t.headers&&l["a"].getToken()&&(t.headers["RC-Token"]=l["a"].getToken());var a={method:t.method,url:t.url,data:s.a.stringify(t.data)};return e&&(a.data=t.data),t.headers&&(a.headers=t.headers),new i.a(function(e,n){o()(a).then(function(t){if(t&&t.data&&200===t.status){var a=t.data;switch(a.errno){case 501:Object(f["Toast"])(a.errmsg),setTimeout(function(){u["a"].dispatch("user/logout").then(function(){d["a"].push("/login")})},1500),n(a.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(f["Toast"])(a.errmsg),n(a.errmsg);break}e(a)}else console.log(t),n(t)}).catch(function(e,a){console.log(t.url+" fail",e,a),Object(f["Toast"])(e),n(e,a)})})}function h(t){t.headers||(t.headers={}),t.headers&&l["a"].getToken()&&(t.headers["RC-Token"]=l["a"].getToken());var e={method:t.method,url:t.url};return e.data=t.data,t.headers&&(e.headers=t.headers,e.headers["MVVM-Key"]=String((new Date).getTime()),e.headers["xx"]="anything",e.headers["Content-Type"]="application/json;charset=UTF-8"),console.log("request: ",t),new i.a(function(a,n){o.a.defaults.withCredentials=!0,o()(e).then(function(t){if(console.log("response:",t),t&&t.data&&200===t.status){var e=t.data;switch(e.errno){case 501:Object(f["Toast"])(e.errmsg),setTimeout(function(){u["a"].dispatch("user/logout").then(function(){d["a"].push("/login")})},1500),n(e.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(f["Toast"])(e.errmsg),n(e.errmsg);break}a(e)}else console.log(t),n(t)}).catch(function(e,a){console.log(t.url+" fail",e,a),Object(f["Toast"])(e),n(e,a)})})}},aed7:function(t,e,a){t.exports=a.p+"assets/img/no-result.b05bdcd3.jpg"},b48a:function(t,e,a){"use strict";a.d(e,"a",function(){return o}),a.d(e,"e",function(){return r}),a.d(e,"c",function(){return s}),a.d(e,"b",function(){return u}),a.d(e,"d",function(){return l});var n=a("8982"),i="/industryParkApi",c="/wx/repair";function o(t){return Object(n["a"])({url:i+c+"/add",method:"post",data:t})}function r(t){return Object(n["a"])({url:i+c+"/list",method:"post",data:t})}function s(t){return Object(n["a"])({url:i+c+"/getById",method:"post",data:t})}function u(t){return Object(n["a"])({url:i+c+"/edit",method:"post",data:t})}function l(t){return Object(n["a"])({url:i+c+"/getDispatchToPerson",method:"post",data:t})}}}]);