1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-73903374"],{"06a8":function(t,a,e){"use strict";var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div")},c=[],i=e("795b"),s=e.n(i),r=(e("7f7f"),e("ac6a"),e("f20c")),o=e("5cab"),u=e("f499"),d=e.n(u),l=e("8982"),f="/industryParkApi",h="/wx/data",m="/wx/public",p="/wx/dictController";function g(t){return Object(l["a"])({url:f+h+"/listBizAll/"+t,method:"post"})}function v(t){return Object(l["a"])({url:f+m+"/listProjectAll",method:"post",data:t})}function b(t){return Object(l["a"])({url:f+p+"/getByCodes",method:"post",data:t})}function _(t){var a={codes:d()(t)};return new s.a(function(t,e){b(a).then(function(a){t(a)}).catch(function(t,a){e(t,a)})})}var k=e("3089"),D={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 a=this;return t||(t=a.dc_key),_(t).then(function(t){t.data&&a.dc_key.forEach(function(e){var n=a.getDictValue(t.data,e,!0);a.dc_data[e]=n,a.dc_map[e]=a.$common.transDcMap(n);var c=a.getDictValue(t.data,e,!1);a.dc_data_no_all[e]=c,a.dc_map_no_all[e]=a.$common.transDcMap(c)})})},initDict2:function(t){var a=this;return t||(t=a.dc_key),_(t).then(function(t){t.data&&a.dc_key.forEach(function(e){var n=a.getDictValue(t.data,e,!1);a.dc_data[e]=n,a.dc_map[e]=a.$common.transDcMap(n);var c=a.getDictValue(t.data,e,!1);a.dc_data_no_all[e]=c,a.dc_map_no_all[e]=a.$common.transDcMap(c)})})},initBiz:function(){var t=this;return this.BizData=[],g(o["a"].uid()).then(function(a){a.data&&a.data.forEach(function(a){var e={label:a.businessName,value:a.id};t.BizData.push(e),t.BizMap[a.id]=a.businessName})}).catch(function(){})},initProjectData:function(){var t=this;return this.ProjectData=[],v(o["a"].uid()).then(function(a){a.data&&a.data.forEach(function(a){var e={label:a.name,value:a.id};t.ProjectData.push(e),t.ProjectMap[e.value]=a})}).catch(function(){})},pagination:function(t){var a=this.currentPage,e=this.pageSize,n=a*e-e,c=a*e;return t.slice(n,c)},getDictValue:function(t,a,e){var n=t[a]?r["a"].castEval(t[a].dictValue):[],c=[];if(n.forEach(function(t){var a={id:t.id,isSearch:t.isSearch,label:t.label,value:t.value,active:!1};c.push(a)}),e){var i={label:"全部",value:"",active:!0};c.unshift(i)}return c},confirm:function(t,a){return new s.a(function(e,n){k["Dialog"].confirm({title:a,message:t}).then(function(t){e(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,a=this;console.log("loadBottom"),setTimeout(function(){a.getData(),t.$refs.loadmore.onBottomLoaded()},500)},imgPreview:function(t){this.dialogImageUrl="/industryParkApi/wx/img/viewImg/"+t,this.dialogImageVisible=!0},imgRemove:function(t,a){var e=a.indexOf(t);a.splice(e,1)},noImg:function(){var t=event.srcElement;t.src=e("aed7"),t.onerror=null}}},j=D,w=e("2877"),y=Object(w["a"])(j,n,c,!1,null,"3fa5b905",null);a["a"]=y.exports},"096f":function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"repair-record-box"},[e("ul",{staticClass:"custom-list-box"},t._l(t.recordList,function(a){return e("li",{key:a.id,staticClass:"record-item white-box",on:{click:function(e){return t.$router.push({path:"/repairDetail",query:{id:a.id}})}}},[e("div",{staticClass:"item-head custom-status-box"},[e("p",{staticClass:"company"},[t._v(t._s(a.companyId))]),e("div",{class:["status-btn",t.setStatusStyle(a.status)]},[t._v("\n\t\t\t\t\t\t"+t._s(a.statusName)+"\n\t\t\t\t\t")])]),e("div",{staticClass:"item-content"},[e("div",{staticClass:"img-box",staticStyle:{width:"40%"}},[e("img",{attrs:{src:null!=a.fileUrl?a.fileUrl[0]:"",alt:""}})]),e("div",{staticClass:"content-box",staticStyle:{width:"55%"}},[t._v("\n\t\t\t\t\t\t"+t._s(a.description)+"\n\t\t\t\t\t")])]),e("div",{staticClass:"item-foot"},[e("p",{staticClass:"time"},[e("i",{staticClass:"iconfont icon-shijian"}),t._v(t._s(a.createdAt)+"\n\t\t\t\t\t")])])])}),0)])},c=[],i=(e("a481"),e("ac6a"),e("b48a")),s=e("06a8"),r=(e("5cab"),{data:function(){return{dc_key:["REPAIR_STATUS"],recordList:[],params:{pageNum:1,pageSize:10,createdBy:1},totalPage:1,allData:[]}},mixins:[s["a"]],created:function(){var t=this;this.initDict(this.dc_key).then(function(a){t.selectData()})},methods:{selectData:function(){var t=this;Object(i["e"])(this.params).then(function(a){a.data.rows&&a.data.rows.forEach(function(a){var e=t.getItemJson(a);t.recordList.push(e)})})},getItemJson:function(t){t.companyId="固定公司名";var a=this.$common.castEval(t.fileUrl),e=[];return a.forEach(function(t){t=t.replace("/server","/industryParkApi"),e.push(t)}),t.fileUrl=e,t.createdAt=this.$common.transServDate(t.createdAt),t.statusName=this.dc_map.REPAIR_STATUS[t.status],t},quickSelect:function(t){this.quickSleced.val&&this.quickSleced.val===t.val?this.quickSleced={}:this.quickSleced=t},afterRead:function(t){console.log(t)},setStatusStyle:function(t){var a=null;switch(t){case"unAcceptance":a="pending-btn";break;case"acceptance":a="accepted-btn";break;case"processed":a="processed-btn";break;case"evaluated":a="evaluated-btn";break}return a}},filters:{statusFilter:function(t){var a=null;switch(t){case"unAcceptance":a="待处理";break;case"acceptance":a="已受理";break;case"processed":a="已处理";break;case"evaluated":a="已评价";break}return a}}}),o=r,u=(e("ade0"),e("2877")),d=Object(u["a"])(o,n,c,!1,null,"76ca359d",null);a["default"]=d.exports},"3f9a":function(t,a,e){},"7f7f":function(t,a,e){var n=e("86cc").f,c=Function.prototype,i=/^\s*function ([^ (]*)/,s="name";s in c||e("9e1e")&&n(c,s,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},8982:function(t,a,e){"use strict";e.d(a,"a",function(){return h}),e.d(a,"b",function(){return m});var n=e("795b"),c=e.n(n),i=e("bc3a"),s=e.n(i),r=e("4328"),o=e.n(r),u=e("4360"),d=e("5cab"),l=e("a18c"),f=e("3089");function h(t,a){t.headers||(t.headers={}),t.headers&&d["a"].getToken()&&(t.headers["RC-Token"]=d["a"].getToken());var e={method:t.method,url:t.url,data:o.a.stringify(t.data)};return a&&(e.data=t.data),t.headers&&(e.headers=t.headers),new c.a(function(a,n){s()(e).then(function(t){if(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(){l["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(a,e){console.log(t.url+" fail",a,e),Object(f["Toast"])(a),n(a,e)})})}function m(t){t.headers||(t.headers={}),t.headers&&d["a"].getToken()&&(t.headers["RC-Token"]=d["a"].getToken());var a={method:t.method,url:t.url};return a.data=t.data,t.headers&&(a.headers=t.headers,a.headers["MVVM-Key"]=String((new Date).getTime()),a.headers["xx"]="anything",a.headers["Content-Type"]="application/json;charset=UTF-8"),console.log("request: ",t),new c.a(function(e,n){s.a.defaults.withCredentials=!0,s()(a).then(function(t){if(console.log("response:",t),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(){l["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(a,e){console.log(t.url+" fail",a,e),Object(f["Toast"])(a),n(a,e)})})}},ade0:function(t,a,e){"use strict";var n=e("3f9a"),c=e.n(n);c.a},aed7:function(t,a,e){t.exports=e.p+"assets/img/no-result.b05bdcd3.jpg"},b48a:function(t,a,e){"use strict";e.d(a,"a",function(){return s}),e.d(a,"e",function(){return r}),e.d(a,"c",function(){return o}),e.d(a,"b",function(){return u}),e.d(a,"d",function(){return d});var n=e("8982"),c="/industryParkApi",i="/wx/repair";function s(t){return Object(n["a"])({url:c+i+"/add",method:"post",data:t})}function r(t){return Object(n["a"])({url:c+i+"/list",method:"post",data:t})}function o(t){return Object(n["a"])({url:c+i+"/getById",method:"post",data:t})}function u(t){return Object(n["a"])({url:c+i+"/edit",method:"post",data:t})}function d(t){return Object(n["a"])({url:c+i+"/getDispatchToPerson",method:"post",data:t})}}}]);
|