1 |
- (function(e){function t(t){for(var a,c,u=t[0],i=t[1],s=t[2],f=0,d=[];f<u.length;f++)c=u[f],Object.prototype.hasOwnProperty.call(r,c)&&r[c]&&d.push(r[c][0]),r[c]=0;for(a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a]);l&&l(t);while(d.length)d.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],a=!0,c=1;c<n.length;c++){var i=n[c];0!==r[i]&&(a=!1)}a&&(o.splice(t--,1),e=u(u.s=n[0]))}return e}var a={},r={app:0},o=[];function c(e){return u.p+"static/js/"+({}[e]||e)+"."+{"chunk-0241be4d":"571ec7f5","chunk-1bbc1964":"14c1f8c6","chunk-2d0b996b":"c0806164","chunk-2d208ac5":"822c7b96","chunk-2d217e4a":"c412098f","chunk-2d222368":"576f3cd5","chunk-2d2259db":"0b481244","chunk-33903f6c":"b02571d4","chunk-3b1aadda":"1dfcc884","chunk-4c3ff0cc":"af612dd2","chunk-513b9ab0":"5479ec6c","chunk-74161939":"d7e286b9"}[e]+".js"}function u(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,u),n.l=!0,n.exports}u.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var a=new Promise((function(t,a){n=r[e]=[t,a]}));t.push(n[2]=a);var o,i=document.createElement("script");i.charset="utf-8",i.timeout=120,u.nc&&i.setAttribute("nonce",u.nc),i.src=c(e);var s=new Error;o=function(t){i.onerror=i.onload=null,clearTimeout(f);var n=r[e];if(0!==n){if(n){var a=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+a+": "+o+")",s.name="ChunkLoadError",s.type=a,s.request=o,n[1](s)}r[e]=void 0}};var f=setTimeout((function(){o({type:"timeout",target:i})}),12e4);i.onerror=i.onload=o,document.head.appendChild(i)}return Promise.all(t)},u.m=e,u.c=a,u.d=function(e,t,n){u.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},u.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,t){if(1&t&&(e=u(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(u.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)u.d(n,a,function(t){return e[t]}.bind(null,a));return n},u.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return u.d(t,"a",t),t},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.p="/aftersale/supervisor/",u.oe=function(e){throw console.error(e),e};var i=window["webpackJsonp"]=window["webpackJsonp"]||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var f=0;f<i.length;f++)t(i[f]);var l=s;o.push(["0f83","chunk-vendors"]),n()})({"0781":function(e,t){e.exports={title:"志远售后-监理端",footer:"@2021 志远售后系统",logo:"https://image.nczyzs.com/zhiyuan-logo.png",validCss:["text-gray-500","text-yellow-500","text-blue-500","text-pink-500","text-purple-500","text-indigo-500","text-red-500"]}},"0b3e":function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"b",(function(){return i}));var a=n("a78e"),r=n.n(a),o="Supervisor-Token";function c(){return r.a.get(o)}function u(e){return r.a.set(o,e)}function i(){return r.a.remove(o)}},"0f83":function(e,t,n){"use strict";n.r(t);n("d1cf");var a=n("ee83"),r=(n("5852"),n("d961")),o=(n("91d5"),n("f0ca")),c=(n("a44c"),n("e27c")),u=(n("4ddd"),n("9f14")),i=(n("6d73"),n("473d")),s=(n("e17f"),n("2241")),f=(n("1f87"),n("510b")),l=(n("77f8"),n("dc0f")),d=(n("e930"),n("8f80")),p=(n("5f5f"),n("f253")),b=(n("8a58"),n("e41f")),h=(n("c3a6"),n("ad06")),m=(n("0ec5"),n("21ab")),v=(n("3df5"),n("2830")),g=(n("4b0a"),n("2bb1")),_=(n("7844"),n("5596")),O=(n("e7e5"),n("d399")),E=(n("bda7"),n("5e46")),k=(n("da3c"),n("0b33")),y=(n("0653"),n("34e9")),j=(n("c194"),n("7744")),w=(n("2994"),n("2bdd")),T=(n("5246"),n("6b41")),x=(n("8fec"),n("7bd9")),S=(n("a52c"),n("2ed4")),P=(n("537a"),n("ac28")),N=(n("4056"),n("44bf")),$=(n("66cf"),n("343b")),A=(n("be7f"),n("565f")),L=(n("38d5"),n("772a")),M=(n("66b9"),n("b650")),C=(n("e260"),n("e6cf"),n("cca6"),n("a79d"),n("2b0e")),D=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bg-gray-100 min-h-screen text-gray-600",attrs:{id:"app"}},[n("Loading",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}]}),n("router-view")],1)},I=[],U=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"fixed z-max w-full h-full flex justify-center items-center bg-white bg-opacity-50"},[n("van-loading",{attrs:{type:"spinner",color:"#1989fa"}})],1)},F=[],K=(n("ac1e"),n("543e"));C["a"].use(K["a"]);var R={name:"Loading",data:function(){return{}}},z=R,q=n("2877"),G=Object(q["a"])(z,U,F,!1,null,null,null),H=G.exports,J={components:{Loading:H},computed:{loading:function(){return this.$store.state.loading.loading}}},B=J,Q=Object(q["a"])(B,D,I,!1,null,null,null),V=Q.exports,W=n("5974"),X=(n("c975"),n("d3b7"),n("8c4f")),Y=n("0b3e"),Z=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("router-view"),n("app-footer"),n("tabbar")],1)},ee=[],te=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",{staticClass:"text-center pb-20 pt-10 text-gray-400 text-xs"},[e._v(e._s(e.data))])},ne=[],ae=n("0781"),re=n.n(ae),oe={name:"Footer",data:function(){return{data:ae["footer"]}}},ce=oe,ue=Object(q["a"])(ce,te,ne,!1,null,null,null),ie=ue.exports,se=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("van-tabbar",{attrs:{route:"","active-color":"#10B981"}},[n("van-tabbar-item",{attrs:{to:"/"},scopedSlots:e._u([{key:"icon",fn:function(t){return n("van-icon",{attrs:{"class-prefix":"my-icon",size:"20px",name:t.active?e.icon.repair_active:e.icon.repair_inactive}})}}])},[n("span",[e._v("正在维修")])]),n("van-tabbar-item",{attrs:{to:"/orders",icon:"notes-o"}},[e._v("维修记录")]),n("van-tabbar-item",{attrs:{to:"/personal",icon:"friends-o"}},[e._v("个人信息")])],1)},fe=[],le={data:function(){return{active:0,icon:{repair_active:"repair",repair_inactive:"repair"}}}},de=le,pe=Object(q["a"])(de,se,fe,!1,null,null,null),be=pe.exports,he={name:"Page",components:{AppFooter:ie,Tabbar:be}},me=he,ve=Object(q["a"])(me,Z,ee,!1,null,null,null),ge=ve.exports,_e=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("router-view"),n("app-footer")],1)},Oe=[],Ee={name:"Page",components:{AppFooter:ie}},ke=Ee,ye=Object(q["a"])(ke,_e,Oe,!1,null,null,null),je=ye.exports,we=n("0781");C["a"].use(X["a"]);var Te=[{path:"/redirect",children:[{path:"/redirect/:path(.*)",component:function(){return n.e("chunk-2d222368").then(n.bind(null,"ce3c"))}}]},{path:"/404",component:function(){return n.e("chunk-2d208ac5").then(n.bind(null,"a693"))},hidden:!0},{path:"/login",component:function(){return n.e("chunk-2d217e4a").then(n.bind(null,"c953"))},meta:{title:"登录"},hidden:!0},{path:"/",component:ge,children:[{path:"",component:function(){return n.e("chunk-1bbc1964").then(n.bind(null,"f447"))},meta:{title:"首页"}},{path:"orders",component:function(){return n.e("chunk-33903f6c").then(n.bind(null,"d6c0"))},meta:{title:"维修记录"}},{path:"/personal",component:function(){return n.e("chunk-2d2259db").then(n.bind(null,"e4c9"))},meta:{title:"个人信息"}}]},{path:"/personal/password",component:je,children:[{path:"",component:function(){return n.e("chunk-2d0b996b").then(n.bind(null,"341e"))},meta:{title:"修改密码"}}]},{path:"/orders",component:je,children:[{path:":id(\\d+)/schedule",component:function(){return n.e("chunk-513b9ab0").then(n.bind(null,"e7a9"))},meta:{title:"提交上门时间"}},{path:":id(\\d+)/repair",component:function(){return n.e("chunk-74161939").then(n.bind(null,"5a35"))},meta:{title:"维修反馈"}},{path:":id(\\d+)/info",component:function(){return n.e("chunk-3b1aadda").then(n.bind(null,"750a"))},meta:{title:"工单详情"}}]},{path:"/statis",component:je,children:[{path:"order",component:function(){return n.e("chunk-4c3ff0cc").then(n.bind(null,"0a63"))},meta:{title:"工单统计"}},{path:"comment",component:function(){return n.e("chunk-0241be4d").then(n.bind(null,"613e"))},meta:{title:"评价统计"}}]},{path:"*",redirect:"/404"}],xe=new X["a"]({routes:Te}),Se=["/login"];xe.beforeEach((function(e,t,n){var a=e.meta&&e.meta.title;a&&(document.title=we.title+"-"+a);var r=Object(Y["a"])();if(r)if("/login"===e.path)n({path:"/"});else{var o=W["a"].getters.user_id;0===o?W["a"].dispatch("user/getInfo").then((function(){n()})):n()}else-1!==Se.indexOf(e.path)?n():n("/login?redirect=".concat(e.path))}));var Pe=xe,Ne=(n("b972"),n("cccd1"),n("bc3a")),$e=n.n(Ne),Ae=n("bcb7"),Le=n("3eba");n("c037"),n("007d"),n("627c"),n("d28f");var Me=Le;C["a"].use(M["a"]),C["a"].use(L["a"]),C["a"].use(A["a"]),C["a"].use($["a"]),C["a"].use(N["a"]),C["a"].use(P["a"]),C["a"].use(S["a"]),C["a"].use(x["a"]),C["a"].use(T["a"]),C["a"].use(w["a"]),C["a"].use(j["a"]),C["a"].use(y["a"]),C["a"].use(k["a"]),C["a"].use(E["a"]),C["a"].use(O["a"]),C["a"].use(_["a"]),C["a"].use(g["a"]),C["a"].use(v["a"]),C["a"].use(m["a"]),C["a"].use(h["a"]),C["a"].use(b["a"]),C["a"].use(p["a"]),C["a"].use(d["a"]),C["a"].use(l["a"]),C["a"].use(f["a"]),C["a"].use(s["a"]),C["a"].use(i["a"]),C["a"].use(u["a"]),C["a"].use(c["a"]),C["a"].use(o["a"]),C["a"].use(r["a"]),C["a"].use(a["a"]),C["a"].prototype.$echarts=Me,C["a"].config.productionTip=!1,C["a"].prototype.$env=Ae["a"],C["a"].prototype.$axios=$e.a,C["a"].prototype.$settings=re.a,new C["a"]({router:Pe,store:W["a"],el:"#app",render:function(e){return e(V)}})},"222b":function(e,t,n){var a={"./user.js":"ef76"};function r(e){var t=o(e);return n(t)}function o(e){if(!n.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}r.keys=function(){return Object.keys(a)},r.resolve=o,e.exports=r,r.id="222b"},"46ac":function(e,t,n){"use strict";n("d3b7"),n("9a83");var a=n("f564"),r=n("bc3a"),o=n.n(r),c=n("5974"),u=n("0b3e"),i=n("bcb7"),s=o.a.create({baseURL:i["a"].baseApi,timeout:5e3});s.interceptors.request.use((function(e){var t=Object(u["a"])();return t&&(e.headers["Access-Token"]=t),e}),(function(e){return console.log(e),Promise.reject(e)})),s.interceptors.response.use((function(e){var t=e.data;return 200!==t.code?(Object(a["a"])({type:"danger",message:t.message}),Promise.reject(new Error(t.message||"Error"))):t}),(function(e){return console.log(e),e&&e.response?(Object(a["a"])({type:"danger",message:e.response.data.message}),401===e.response.status&&c["a"].dispatch("user/resetToken").then((function(){location.reload()}))):Object(a["a"])({type:"danger",message:e.message}),Promise.reject(e)})),t["a"]=s},"47ba":function(e,t,n){var a={"./loading.js":"b9a8"};function r(e){var t=o(e);return n(t)}function o(e){if(!n.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}r.keys=function(){return Object.keys(a)},r.resolve=o,e.exports=r,r.id="47ba"},5974:function(e,t,n){"use strict";n("13d5"),n("d3b7"),n("ac1f"),n("5319"),n("ddb0");var a=n("2b0e"),r=n("2f62"),o={user_id:function(e){return e.user.id},token:function(e){return e.user.token},username:function(e){return e.user.username},role_name:function(e){return e.user.role_name},phone:function(e){return e.user.phone},setting:function(e){return e.user.setting}},c=o,u=(n("4160"),n("c975"),n("fb6a"),n("b64b"),n("e25e"),n("4d63"),n("25f0"),n("3ca3"),n("4d90"),n("159b"),n("2b3d"),n("53ca"));function i(e,t){return"object"!==Object(u["a"])(e)&&(e={}),Array.isArray(t)?t.slice():(Object.keys(t).forEach((function(n){var a=t[n];"object"===Object(u["a"])(a)?e[n]=i(e[n],a):e[n]=a})),e)}a["a"].use(r["a"]);var s=n("222b"),f=s.keys().reduce((function(e,t){var n=t.replace(/^\.\/(.*)\.\w+$/,"$1"),a=s(t);return e[n]=a.default,e}),{}),l=n("47ba"),d=l.keys().reduce((function(e,t){var n=t.replace(/^\.\/(.*)\.\w+$/,"$1"),a=l(t);return e[n]=a.default,e}),{});f=i(f,d);var p=new r["a"].Store({modules:f,getters:c});t["a"]=p},b9a8:function(e,t,n){"use strict";n.r(t);var a={loading:!1},r={showLoading:function(e){e.loading=!0},hideLoading:function(e){e.loading=!1}},o={};t["default"]={namespaced:!0,state:a,mutations:r,actions:o}},bcb7:function(e,t,n){"use strict";var a={development:{baseApi:"http://localhost:4000/api/aftersale/supervisor/"},production:{baseApi:"https://zhiyuan.ovenx.cn/api/aftersale/supervisor/"}};t["a"]=a["production"]},cccd1:function(e,t,n){},ef76:function(e,t,n){"use strict";n.r(t);n("d3b7");var a=n("0b3e"),r=n("46ac");function o(e){return Object(r["a"])({url:"login",method:"post",data:e})}function c(){return Object(r["a"])({url:"info",method:"get"})}function u(){return Object(r["a"])({url:"logout",method:"post"})}function i(e){return Object(r["a"])({url:"password",method:"put",data:e})}var s={id:0,token:Object(a["a"])(),username:"",role_name:"",phone:"",setting:{}},f={SET_TOKEN:function(e,t){e.token=t},SET_USERNAME:function(e,t){e.username=t},SET_ROLE_NAME:function(e,t){e.role_name=t},SET_PHONE:function(e,t){e.phone=t},SET_SETTING:function(e,t){e.setting=t},SET_ID:function(e,t){e.id=t}},l={login:function(e,t){var n=e.commit;return new Promise((function(e,r){o(t).then((function(t){200!==t.code&&r(t.msg),n("SET_TOKEN",t.data.token),Object(a["c"])(t.data.token),e()})).catch((function(e){r(e)}))}))},logout:function(e){var t=e.commit,n=e.state;return new Promise((function(e,r){u(n.token).then((function(n){t("SET_TOKEN",""),t("SET_ID",0),Object(a["b"])(),e()})).catch((function(e){r(e)}))}))},getInfo:function(e){var t=e.commit,n=e.state;return new Promise((function(e,a){c(n.token).then((function(n){var a=n.data,r=a.id,o=a.username,c=a.phone,u=a.role_name,i=a.setting;t("SET_ID",r),t("SET_PHONE",c),t("SET_USERNAME",o),t("SET_ROLE_NAME",u),t("SET_SETTING",i),console.log(n),e(n.data)})).catch((function(e){a(e)}))}))},updatePassword:function(e,t){var n=e.commit;e.state;return new Promise((function(e,r){i(t).then((function(t){n("SET_ID",0),n("SET_TOKEN",""),Object(a["b"])(),e(t.data)})).catch((function(e){r(e)}))}))},resetToken:function(e){var t=e.commit;return new Promise((function(e){t("SET_TOKEN",""),Object(a["b"])(),e()}))}};t["default"]={namespaced:!0,state:s,mutations:f,actions:l}}});
|