1 |
- (this.webpackJsonpmanagement=this.webpackJsonpmanagement||[]).push([[7],{112:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return u}));var r=n(5),o=n.n(r),a=n(12),i=n(20),c=function(){var t=Object(a.a)(o.a.mark((function t(e){var n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.a.post("/api/login",e);case 2:return n=t.sent,t.abrupt("return",n.data);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),u=function(){var t=Object(a.a)(o.a.mark((function t(e){var n,r,a;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.a.get("/api/login/project/name",{code:e});case 2:return n=t.sent,r=n.data,a=void 0===r?{}:r,t.abrupt("return",a);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},129:function(t,e,n){t.exports=n(192)},13:function(t,e,n){"use strict";e.a={VERSION:"1.0.0",BASE_URL:{DEV:"",PROD:""},TOKEN_API:"",TOKEN_INVALID_CODE:[1],TOKEN_WHITE_LIST:["/api/login"],RET_CODE:{SUCCESS:0,FAIL:1,TOKEN_UNDEFINED:19,TOKEN_EXPIRED:1},RETRY:{COUNT:3,DELAY:1e3},RULE:{SAFE:"safeRule",QUALITY:"qualityRule",CONTRACT:"contractRule"},UPLOAD_WHITE:"'.json', '.txt','.xls', '.xlsx','.doc', '.docx','.pdf','.ppt', '.pptx','.png', '.jpg', '.jpeg', '.gif', '.bmp', '.cad', '.dwg','.zip', '.rar', '.7z'",UPLOAD_LIMIT:30,DATA_TYPE:{CONTRACT:1,QUALITY:2,SAFE:3},PAGE_SIZE:10,OSS_PATH:{REVIEW:"https://file-upload.6jlzf.cn/",DOWNLOAD:"https://measuresaas.oss-cn-shenzhen.aliyuncs.com/"}}},134:function(t,e,n){},17:function(t,e,n){"use strict";n.d(e,"d",(function(){return K})),n.d(e,"b",(function(){return k})),n.d(e,"c",(function(){return I})),n.d(e,"a",(function(){return v}));var r,o,a=n(21),i=n(8),c=n(10),u=n(11),s=n(2),l=(n(45),n(96)),p=n(13),h=n(1),d=[{elderBrother:!1,isEnd:!1,attribsortution:0,attribution:"",bidsectionId:"",children:void 0,code:"",contractCode:"",contractId:"",contractName:"",contractPrice:"",contractReturned:"",contractStatus:0,contractsPaid:"",createTime:"",depth:0,id:"",name:"",operation:"",parentId:"",projectId:"",serial:0,templateNumber:0}];var f,m,b,y,g,v=new(r=function(){function t(){Object(c.a)(this,t),Object(i.a)(this,"tree",o,this)}return Object(u.a)(t,[{key:"updateTree",value:function(t){this.tree=t}},{key:"resetTree",value:function(t){var e=this;Object(l.a)(t).then((function(t){var n=t.code,r=void 0===n?-1:n,o=t.sectionTree,a=void 0===o?{}:o;r===p.a.RET_CODE.SUCCESS&&Object.keys(a).length&&(e.tree=a.children)}))}},{key:"addRowTree",value:function(t){var e=function t(e,n){return n.map((function(n){return n.id===e?(Array.isArray(n.children)?n.children.push(Object(a.a)(Object(a.a)({},d[0]),{},{isEdit:!0,code:n.code+"-".concat(n.children.length+1),parentId:n.id,bidsectionId:n.bidsectionId})):n.children=[Object(a.a)(Object(a.a)({},d[0]),{},{isEdit:!0,code:n.code+"-1",parentId:n.id,bidsectionId:n.bidsectionId})],n):(n.children&&n.children.length&&(n.children=t(e,n.children)),n)}))}(t,this.tree);this.tree=e}},{key:"rowChange",value:function(t){var e=function t(e,n){return n.map((function(n){return n.isEdit=!1,n.id===e?n.isEdit=!0:Array.isArray(n.children)&&(n.children=t(e,n.children)),n}))}(t,this.tree);this.tree=e}},{key:"showTable",get:function(){return this.tree&&this.tree.length>1}}]),t}(),o=Object(s.a)(r.prototype,"tree",[h.n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return d}}),Object(s.a)(r.prototype,"updateTree",[h.f],Object.getOwnPropertyDescriptor(r.prototype,"updateTree"),r.prototype),Object(s.a)(r.prototype,"resetTree",[h.f],Object.getOwnPropertyDescriptor(r.prototype,"resetTree"),r.prototype),Object(s.a)(r.prototype,"addRowTree",[h.f],Object.getOwnPropertyDescriptor(r.prototype,"addRowTree"),r.prototype),Object(s.a)(r.prototype,"rowChange",[h.f],Object.getOwnPropertyDescriptor(r.prototype,"rowChange"),r.prototype),Object(s.a)(r.prototype,"showTable",[h.g],Object.getOwnPropertyDescriptor(r.prototype,"showTable"),r.prototype),r),O=n(61),R=n(51),E=n(7);var j,w,N,k=new(f=function(){function t(){Object(c.a)(this,t),Object(i.a)(this,"routeNameMapping",m,this),Object(i.a)(this,"defaultRouteMapping",b,this),Object(i.a)(this,"handledRouteConfig",y,this),Object(i.a)(this,"currentRoutePath",g,this);var e=function(t){var e=new Map,n=JSON.parse(JSON.stringify(t)),r=new Map;return function t(n,o){if(Array.isArray(n)){var a,i=Object(O.a)(n);try{for(i.s();!(a=i.n()).done;){t(a.value)}}catch(p){i.e(p)}finally{i.f()}}else{var c;n.path=Object(E.a)(null===o||void 0===o?void 0:o.path,n.path);var u=(null===(c=n.meta)||void 0===c?void 0:c.title)?n.meta.title:n.path;if(e.set(n.path,u),n.defaultChildRoute&&o&&r.set(o.path,n.path),n.childRoutes){var s,l=Object(O.a)(n.childRoutes);try{for(l.s();!(s=l.n()).done;){t(s.value,n)}}catch(p){l.e(p)}finally{l.f()}}}}(n),{pathNameMapping:e,handledRouteConfig:n,defaultRouteMapping:r}}(R.a),n=e.pathNameMapping,r=e.handledRouteConfig,o=e.defaultRouteMapping;this.routeNameMapping=n,this.handledRouteConfig=r,this.defaultRouteMapping=o}return Object(u.a)(t,[{key:"setRouteNameMapping",value:function(t,e){this.routeNameMapping.set(t,e)}},{key:"setCurrentRoutePath",value:function(t){this.currentRoutePath=t}}]),t}(),m=Object(s.a)(f.prototype,"routeNameMapping",[h.n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new Map}}),b=Object(s.a)(f.prototype,"defaultRouteMapping",[h.n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new Map}}),y=Object(s.a)(f.prototype,"handledRouteConfig",[h.n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),g=Object(s.a)(f.prototype,"currentRoutePath",[h.n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Object(s.a)(f.prototype,"setRouteNameMapping",[h.f],Object.getOwnPropertyDescriptor(f.prototype,"setRouteNameMapping"),f.prototype),Object(s.a)(f.prototype,"setCurrentRoutePath",[h.f],Object.getOwnPropertyDescriptor(f.prototype,"setCurrentRoutePath"),f.prototype),f),I=new(j=function(){function t(){Object(c.a)(this,t),Object(i.a)(this,"bidsectionId",w,this),Object(i.a)(this,"name",N,this)}return Object(u.a)(t,[{key:"saveBidsectionId",value:function(t){this.bidsectionId=t,E.d.set("bid",t)}},{key:"saveName",value:function(t){this.name=t}},{key:"bid",get:function(){if(!this.bidsectionId){var t=E.d.get("bid");return this.saveBidsectionId(t),t}return this.bidsectionId}}]),t}(),w=Object(s.a)(j.prototype,"bidsectionId",[h.n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),N=Object(s.a)(j.prototype,"name",[h.n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Object(s.a)(j.prototype,"saveBidsectionId",[h.f],Object.getOwnPropertyDescriptor(j.prototype,"saveBidsectionId"),j.prototype),Object(s.a)(j.prototype,"saveName",[h.f],Object.getOwnPropertyDescriptor(j.prototype,"saveName"),j.prototype),Object(s.a)(j.prototype,"bid",[h.g],Object.getOwnPropertyDescriptor(j.prototype,"bid"),j.prototype),j),S=n(5),C=n.n(S),P=n(12),D=n(20);function M(){return(M=Object(P.a)(C.a.mark((function t(){var e,n;return C.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,D.a.post("/api/login/out");case 2:return e=t.sent,n=e.data,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var A,U,T,x,_=n(112),L=function(){E.d.del("user_info")},z=n(32),K=new(A=function(){function t(){Object(c.a)(this,t),this.initUserState={account:"",accountGroup:void 0,company:"",csrf:"",enable:0,id:"",isAdmin:0,mobile:"",name:"",password:"",position:"",projectId:"",role:"",telephone:""},Object(i.a)(this,"userInfo",U,this),Object(i.a)(this,"permission",T,this),Object(i.a)(this,"showLeftSide",x,this)}return Object(u.a)(t,[{key:"login",value:function(t){var e=this;Object(_.a)(t).then((function(t){var n,r=t.code,o=void 0===r?-1:r,a=t.data;o===p.a.RET_CODE.SUCCESS&&(n=a,E.d.set("user_info",n),e.userInfo=a,z.a.push("/"))}))}},{key:"toggleLeftSide",value:function(){this.showLeftSide=!this.showLeftSide}},{key:"logout",value:function(){var t=this;(function(){return M.apply(this,arguments)})().then((function(e){var n=e.code;(void 0===n?-1:n)===p.a.RET_CODE.SUCCESS&&(L(),t.userInfo=t.initUserState,z.a.push("/login"))}))}},{key:"check",value:function(){var t=E.d.get("user_info");t&&(this.userInfo=t)}},{key:"isLogin",get:function(){return!!this.userInfo.id}},{key:"role",get:function(){return this.userInfo.isAdmin?"ADMIN":"USER"}}]),t}(),U=Object(s.a)(A.prototype,"userInfo",[h.n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return this.initUserState}}),T=Object(s.a)(A.prototype,"permission",[h.n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),x=Object(s.a)(A.prototype,"showLeftSide",[h.n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Object(s.a)(A.prototype,"isLogin",[h.g],Object.getOwnPropertyDescriptor(A.prototype,"isLogin"),A.prototype),Object(s.a)(A.prototype,"role",[h.g],Object.getOwnPropertyDescriptor(A.prototype,"role"),A.prototype),Object(s.a)(A.prototype,"login",[h.f],Object.getOwnPropertyDescriptor(A.prototype,"login"),A.prototype),Object(s.a)(A.prototype,"toggleLeftSide",[h.f],Object.getOwnPropertyDescriptor(A.prototype,"toggleLeftSide"),A.prototype),Object(s.a)(A.prototype,"logout",[h.f],Object.getOwnPropertyDescriptor(A.prototype,"logout"),A.prototype),Object(s.a)(A.prototype,"check",[h.f],Object.getOwnPropertyDescriptor(A.prototype,"check"),A.prototype),A)},191:function(t,e,n){},192:function(t,e,n){"use strict";n.r(e);var r=n(0),o=n.n(r),a=n(16),i=n.n(a),c=n(83),u=n(32),s=(n(190),n(42)),l=n(193),p=(n(191),n(51)),h=function(){return o.a.createElement("div",{className:"App",key:"".concat("tmyE","11")},o.a.createElement(l.c,{history:u.a,key:"".concat("tmyE","21")},o.a.createElement(s.AliveScope,{key:"".concat("tmyE","31")},o.a.createElement(l.d,{key:"".concat("tmyE","41")},o.a.createElement(c.a,{routeConfig:p.a,key:"".concat("tmyE","51")})))))},d=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function f(t,e){navigator.serviceWorker.register(t).then((function(t){t.onupdatefound=function(){var n=t.installing;null!=n&&(n.onstatechange=function(){"installed"===n.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://bit.ly/CRA-PWA."),e&&e.onUpdate&&e.onUpdate(t)):(console.log("Content is cached for offline use."),e&&e.onSuccess&&e.onSuccess(t)))})}})).catch((function(t){console.error("Error during service worker registration:",t)}))}i.a.render(o.a.createElement(h,{key:"".concat("kxFg","11")}),document.getElementById("root")),function(t){if("serviceWorker"in navigator){if(new URL("",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(function(){var e="".concat("","/service-worker.js");d?(!function(t,e){fetch(t,{headers:{"Service-Worker":"script"}}).then((function(n){var r=n.headers.get("content-type");404===n.status||null!=r&&-1===r.indexOf("javascript")?navigator.serviceWorker.ready.then((function(t){t.unregister().then((function(){window.location.reload()}))})):f(t,e)})).catch((function(){console.log("No internet connection found. App is running in offline mode.")}))}(e,t),navigator.serviceWorker.ready.then((function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://bit.ly/CRA-PWA")}))):f(e,t)}))}}()},20:function(t,e,n){"use strict";n(118);var r=n(80),o=n(17),a=n(13),i=n(7),c=n(60),u=n.n(c),s=[],l=function(t){for(var e in s){var n=+e,r=s[e];r.url===t.url&&r.method===t.method&&JSON.stringify(r.params)===JSON.stringify(t.params)&&JSON.stringify(r.data)===JSON.stringify(t.data)&&(r.cancel("\u64cd\u4f5c\u592a\u9891\u7e41\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5"),s.splice(n,1))}},p=u.a.create({baseURL:a.a.BASE_URL.PROD,timeout:5e3,withCredentials:!0});p.interceptors.request.use((function(t){return l(t),t.cancelToken=new u.a.CancelToken((function(e){s.push({url:t.url,method:t.method,params:t.params,data:t.data,cancel:e})})),"get"!==(null===t||void 0===t?void 0:t.method)&&(t.headers["X-CSRF-Token"]=i.d.get("csrf_token")),t}),(function(t){return Promise.reject(t)})),p.interceptors.response.use((function(t){var e;l(t.config);var n=t.data;if(n.code!==a.a.RET_CODE.SUCCESS&&(r.b.error(JSON.stringify(n.msg)),a.a.TOKEN_INVALID_CODE.includes(n.code)&&o.d.logout()),"GET"===(null===(e=t.config.method)||void 0===e?void 0:e.toLocaleUpperCase())){var c=null===t||void 0===t?void 0:t.headers["x-csrf-token"];i.d.set("csrf_token",c)}return t}),(function(t){var e=t.response,n=t.config,r=a.a.RETRY,o=r.COUNT,i=r.DELAY;return n&&o?(n.__retryCount=n.__retryCount||0,n.__retryCount>=o?Promise.reject(e):(n.__retryCount++,new Promise((function(t){setTimeout((function(){t()}),1|i)})).then((function(){return p(n)})))):Promise.reject(e)})),e.a={get:function(t,e){return p.get(t,{params:e})},post:function(t,e){return p.post(t,e)},del:function(t,e){return p.delete(t,{params:e})}}},32:function(t,e,n){"use strict";var r=n(18).createBrowserHistory;e.a=r()},51:function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var r=n(5),o=n.n(r),a=n(12),i=n(10),c=n(11),u=n(44),s=n(43),l=n(62),p=n.n(l),h=n(0),d=n.n(h);function f(t){return function(e){Object(u.a)(r,e);var n=Object(s.a)(r);function r(t){var e;return Object(i.a)(this,r),(e=n.call(this,t)).state={asyncComponent:null},p.a.start(),e}return Object(c.a)(r,[{key:"componentDidMount",value:function(){var e=Object(a.a)(o.a.mark((function e(){var n,r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.state.asyncComponent){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t();case 4:n=e.sent,r=n.default,this.setState({asyncComponent:r}),p.a.done();case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var t=this.state.asyncComponent;return t?d.a.createElement(t,Object.assign({},this.props,{key:"".concat("qfhg","11")})):null}}]),r}(d.a.Component)}var m=[{path:"/",redirect:"/console/dashboard"},{path:"/login",component:f((function(){return Promise.all([n.e(0),n.e(2),n.e(5),n.e(6),n.e(20)]).then(n.bind(null,794))}))},{path:"/console",component:f((function(){return Promise.all([n.e(0),n.e(1),n.e(4),n.e(21),n.e(27)]).then(n.bind(null,816))})),auth:["USER","ADMIN"],childRoutes:[{path:"dashboard",component:f((function(){return n.e(37).then(n.bind(null,795))})),auth:["USER","ADMIN"],defaultChildRoute:!0,meta:{icon:"xxh-chalkboard",title:"\u5f85\u529e\u4e8b\u9879",isTop:!0,sort:1}},{path:"contract",component:f((function(){return n.e(36).then(n.bind(null,796))})),auth:["USER","ADMIN"],meta:{icon:"xxh-book-open",title:"\u5408\u540c\u7ba1\u7406",isTop:!0,sort:2},childRoutes:[{path:"list",component:f((function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(2),n.e(17)]).then(n.bind(null,818))})),defaultChildRoute:!0,auth:["USER","ADMIN"],meta:{noCache:!0}},{path:"content",component:f((function(){return Promise.all([n.e(4),n.e(23)]).then(n.bind(null,797))})),auth:["USER","ADMIN"],childRoutes:[{path:"summary",component:f((function(){return n.e(35).then(n.bind(null,798))})),defaultChildRoute:!0,auth:["USER","ADMIN"],meta:{title:"\u5408\u540c\u6982\u51b5"}},{path:"income",component:f((function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(2),n.e(9)]).then(n.bind(null,813))})),auth:["USER","ADMIN"],meta:{title:"\u6536\u5165\u5408\u540c"}},{path:"spending",component:f((function(){return Promise.all([n.e(4),n.e(34)]).then(n.bind(null,799))})),auth:["USER","ADMIN"],meta:{title:"\u652f\u51fa\u5408\u540c"}}]}]},{path:"safe",component:f((function(){return n.e(41).then(n.bind(null,800))})),auth:["USER","ADMIN"],meta:{icon:"xxh-users-cog",title:"\u5b89\u5168\u5de1\u68c0",isTop:!0,sort:3},childRoutes:[{path:"list",component:f((function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(2),n.e(19)]).then(n.bind(null,819))})),defaultChildRoute:!0,auth:["USER","ADMIN"],meta:{noCache:!0}},{path:"content",component:f((function(){return Promise.all([n.e(4),n.e(26)]).then(n.bind(null,801))})),auth:["USER","ADMIN"],childRoutes:[{path:"summary",component:f((function(){return n.e(29).then(n.bind(null,802))})),auth:["USER","ADMIN"],defaultChildRoute:!0,meta:{icon:"xxh-chart-pie",title:"\u5de1\u68c0\u6982\u51b5"}},{path:"detail",component:f((function(){return n.e(40).then(n.bind(null,803))})),auth:["USER","ADMIN"],meta:{title:"\u5b89\u5168\u5de1\u68c0"},childRoutes:[{path:"list",component:f((function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(2),n.e(11)]).then(n.bind(null,820))})),auth:["USER","ADMIN"],defaultChildRoute:!0},{path:"info",component:f((function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(5),n.e(16)]).then(n.bind(null,821))})),auth:["USER","ADMIN"]}]}]}]},{path:"quality",component:f((function(){return n.e(39).then(n.bind(null,804))})),auth:["USER","ADMIN"],meta:{icon:"xxh-toolbox",title:"\u8d28\u91cf\u5de1\u68c0",isTop:!0,sort:4},childRoutes:[{path:"list",component:f((function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(2),n.e(18)]).then(n.bind(null,822))})),defaultChildRoute:!0,auth:["USER","ADMIN"],meta:{noCache:!0}},{path:"content",component:f((function(){return Promise.all([n.e(4),n.e(25)]).then(n.bind(null,805))})),auth:["USER","ADMIN"],childRoutes:[{path:"summary",component:f((function(){return n.e(28).then(n.bind(null,806))})),auth:["USER","ADMIN"],defaultChildRoute:!0,meta:{icon:"xxh-chart-pie",title:"\u5de1\u68c0\u6982\u51b5"}},{path:"detail",component:f((function(){return n.e(38).then(n.bind(null,807))})),auth:["USER","ADMIN"],meta:{title:"\u5b89\u5168\u5de1\u68c0"},childRoutes:[{path:"list",component:f((function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(2),n.e(10)]).then(n.bind(null,817))})),auth:["USER","ADMIN"],defaultChildRoute:!0},{path:"info",component:f((function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(5),n.e(15)]).then(n.bind(null,823))})),auth:["USER","ADMIN"]}]}]}]},{path:"management",component:f((function(){return Promise.all([n.e(4),n.e(24)]).then(n.bind(null,808))})),auth:["ADMIN"],meta:{icon:"xxh-cogs",title:"\u9879\u76ee\u8bbe\u7f6e",isTop:!1},childRoutes:[{path:"info",defaultChildRoute:!0,auth:["ADMIN"],component:f((function(){return Promise.all([n.e(0),n.e(2),n.e(5),n.e(6),n.e(22)]).then(n.bind(null,824))})),meta:{title:"\u9879\u76ee\u4fe1\u606f"}},{path:"setting",auth:["ADMIN"],component:f((function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(2),n.e(14)]).then(n.bind(null,814))})),meta:{title:"\u8d26\u53f7\u8bbe\u7f6e"}},{path:"tender",auth:["ADMIN"],component:f((function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(2),n.e(13)]).then(n.bind(null,815))})),meta:{title:"\u6807\u6bb5\u7ba1\u7406"}}]},{path:"account",component:f((function(){return n.e(33).then(n.bind(null,809))})),auth:["USER","ADMIN"],childRoutes:[{path:"info",defaultChildRoute:!0,auth:["USER","ADMIN"],component:f((function(){return n.e(30).then(n.bind(null,810))}))},{path:"safe",auth:["USER","ADMIN"],component:f((function(){return n.e(32).then(n.bind(null,811))}))},{path:"manual",auth:["USER","ADMIN"],component:f((function(){return n.e(31).then(n.bind(null,812))}))}]}]}]},7:function(t,e,n){"use strict";n.d(e,"d",(function(){return a})),n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return u}));var r=n(79),o=n.n(r);var a={get:function(t){var e=localStorage.getItem(t);return e?JSON.parse(e):null},set:function(t,e){e&&(e=JSON.stringify(e)),localStorage.setItem(t,e)},del:function(t){localStorage.removeItem(t)}},i=function(t,e){var n=e.startsWith("/")?e:"/".concat(e);return n=t?"".concat(t).concat(n):n},c=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD HH:mm:ss";return o()(t).format(e)},u=function(t){for(var e=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9","_","-","$","%","&","@","+","!"],n="",r=0;r<t;r++){n+=e[Math.floor(Math.random()*e.length)]}return n}},83:function(t,e,n){"use strict";var r=n(21),o=n(10),a=n(11),i=n(44),c=n(43),u=n(0),s=n.n(u);n(134);function l(){return s.a.createElement("div",{className:"loss-container",key:"".concat("uKNP","11")},s.a.createElement("div",{className:"content",key:"".concat("uKNP","12")},s.a.createElement("h4",{key:"".concat("uKNP","21")},"Opps\uff01\u9875\u9762\u4e0d\u5b58\u5728\u3002"),s.a.createElement("h4",{key:"".concat("uKNP","22")},"404")),s.a.createElement("footer",{key:"".concat("uKNP","31")},s.a.createElement("p",{className:"mb-1",key:"".concat("uKNP","41")},"Copyright \xa9 2019 ",s.a.createElement("a",{href:"https://smartcost.com.cn",key:"".concat("uKNP","51")},"\u73e0\u6d77\u7eb5\u6a2a\u521b\u65b0\u8f6f\u4ef6\u6709\u9650\u516c\u53f8"),".All Rights Reserved.",s.a.createElement("a",{className:"mb-2",href:"http://www.miitbeian.gov.cn",key:"".concat("uKNP","52")},"\u7ca4ICP\u590714032472\u53f7"))))}var p=n(17),h=n(7),d=n(42),f=n.n(d),m=n(193),b=function(t){Object(i.a)(n,t);var e=Object(c.a)(n);function n(t){var r;return Object(o.a)(this,n),r=e.call(this,t),p.d.check(),r}return Object(a.a)(n,[{key:"shouldComponentUpdate",value:function(t){return this.props.location.pathname!==t.location.pathname}},{key:"render",value:function(){var t=this.props,e=t.location,r=t.routeConfig,o=t.match;if(!r||r.length<=0)return null;var a=l,i=o&&o.path,c=null===e||void 0===e?void 0:e.pathname;if(c&&p.b.defaultRouteMapping.has(c)){var u=p.b.defaultRouteMapping.get(c);return s.a.createElement(m.a,{to:u,key:"".concat("MasU","11")})}var h=c&&n.findTargetRoute(i,c,r),d=h&&h.targetRoute,f=p.d.isLogin;if(d instanceof Error)return s.a.createElement(a,{key:"".concat("MasU","21")});if(h){var b=h.realPath?h.realPath:"";d&&p.b.setCurrentRoutePath(b)}return d?d.redirect&&!d.component?s.a.createElement(m.a,{to:d.redirect,key:"".concat("MasU","12")}):f?s.a.createElement(y,{ErrorPage:a,targetRoute:d,key:"".concat("MasU","31")}):s.a.createElement(g,{targetRoute:d,key:"".concat("MasU","41")}):s.a.createElement(a,{key:"".concat("MasU","22")})}}],[{key:"switchRoute",value:function(t,e){return t===e||new RegExp("(^".concat(t,")(?=/)")).test(e)}},{key:"permissionAuthentication",value:function(t,e){return!!t.find((function(t){return t===e}))}},{key:"findTargetRoute",value:function(t,e,o){for(var a=0;a<o.length;a++){var i=o[a],c=Object(h.a)(t,i.path);if(e&&n.switchRoute(c,e))return{targetRoute:Object(r.a)(Object(r.a)({},i),{},{path:c}),realPath:c}}return{targetRoute:null,realPath:""}}}]),n}(u.Component);function y(t){var e,n=t.targetRoute,r=t.ErrorPage,o=n.path,a=n.auth,i=!!(null===(e=n.meta)||void 0===e?void 0:e.noCache)&&n.meta.noCache;return"/login"===o?s.a.createElement(m.a,{to:"/console/dashboard",key:"".concat("MasU","13")}):!a||b.permissionAuthentication(a,p.d.role)?s.a.createElement(m.b,{path:o,render:function(t){return i?s.a.createElement(n.component,Object.assign({},t,{routeConfig:n.childRoutes,key:"".concat("MasU","61")})):s.a.createElement(f.a,{name:"".concat(o),key:"".concat("MasU","71")},s.a.createElement(n.component,Object.assign({},t,{routeConfig:n.childRoutes,key:"".concat("MasU","62")})))},key:"".concat("MasU","51")}):s.a.createElement(r,{message:"\u60a8\u65e0\u6743\u8bbf\u95ee\u6b64\u9875",key:"".concat("MasU","23")})}function g(t){var e=t.targetRoute,n=e.path,r=e.auth;return r&&r.length>0?s.a.createElement(m.a,{to:"/login",key:"".concat("MasU","14")}):s.a.createElement(m.b,{path:n,render:function(t){return s.a.createElement(e.component,Object.assign({},t,{routeConfig:e.childRoutes,key:"".concat("MasU","63")}))},key:"".concat("MasU","52")})}e.a=b},96:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return s}));var r=n(5),o=n.n(r),a=n(12),i=n(20);function c(t){return u.apply(this,arguments)}function u(){return(u=Object(a.a)(o.a.mark((function t(e){var n,r;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.a.get("/api/contract/income/section/all",{bidsectionId:e});case 2:return n=t.sent,r=n.data,t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function s(t,e){return l.apply(this,arguments)}function l(){return(l=Object(a.a)(o.a.mark((function t(e,n){var r,a;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.a.post("/api/contract/section/template",{templateNumber:parseInt(e),bidsectionId:n});case 2:return r=t.sent,a=r.data,t.abrupt("return",a);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}}},[[129,8,12]]]);
|