Your Name
2022-09-26 bb455cebea17349a2f5ed0d4e86eac3905b24585
1
(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-0cc2","chunk-1c22"],{"7dY+":function(t,e,r){},WgQi:function(t,e,r){"use strict";r.d(e,"e",function(){return a}),r.d(e,"a",function(){return i}),r.d(e,"f",function(){return s}),r.d(e,"b",function(){return c}),r.d(e,"d",function(){return u}),r.d(e,"c",function(){return l});var n=r("t3Un"),o=r("X4fA");function a(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.22:8006/zhongtai/department",method:"get",params:t||{}})}function i(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.22:8006/zhongtai/addDepartment",method:"post",data:t})}function s(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.22:8006/zhongtai/putDepartment",method:"post",data:t})}function c(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.22:8006/zhongtai/delDepartment",method:"post",data:t})}function u(){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.22:8006/zhongtai/departmentList",method:"get"})}function l(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.22:8006/zhongtai/department-userList",method:"post",data:t})}},cLjf:function(t,e,r){t.exports=r("xOJF")},fmMu:function(t,e,r){"use strict";var n=r("7dY+");r.n(n).a},hDQ3:function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r("Asgo"));e.default=function(t){return function(){var e=t.apply(this,arguments);return new n.default(function(t,r){return function o(a,i){try{var s=e[a](i),c=s.value}catch(t){return void r(t)}if(!s.done)return n.default.resolve(c).then(function(t){o("next",t)},function(t){o("throw",t)});t(c)}("next")})}}},k4Ii:function(t,e){!function(e){"use strict";var r,n=Object.prototype,o=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag",u="object"==typeof t,l=e.regeneratorRuntime;if(l)u&&(t.exports=l);else{(l=e.regeneratorRuntime=u?t.exports:{}).wrap=w;var h="suspendedStart",f="suspendedYield",m="executing",p="completed",d={},g={};g[i]=function(){return this};var y=Object.getPrototypeOf,v=y&&y(y(A([])));v&&v!==n&&o.call(v,i)&&(g=v);var b=O.prototype=j.prototype=Object.create(g);x.prototype=b.constructor=O,O.constructor=x,O[c]=x.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(b),t},l.awrap=function(t){return{__await:t}},L(F.prototype),F.prototype[s]=function(){return this},l.AsyncIterator=F,l.async=function(t,e,r,n){var o=new F(w(t,e,r,n));return l.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},L(b),b[c]="Generator",b[i]=function(){return this},b.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},l.values=A,$.prototype={constructor:$,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(z),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return s.type="throw",s.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),z(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;z(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:A(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),d}}}function w(t,e,r,n){var o=e&&e.prototype instanceof j?e:j,a=Object.create(o.prototype),i=new $(n||[]);return a._invoke=function(t,e,r){var n=h;return function(o,a){if(n===m)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw a;return C()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=k(i,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=m;var c=_(t,e,r);if("normal"===c.type){if(n=r.done?p:f,c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=p,r.method="throw",r.arg=c.arg)}}}(t,r,i),a}function _(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function j(){}function x(){}function O(){}function L(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function F(t){var e;this._invoke=function(r,n){function a(){return new Promise(function(e,a){!function e(r,n,a,i){var s=_(t[r],t,n);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,a,i)},function(t){e("throw",t,a,i)}):Promise.resolve(u).then(function(t){c.value=t,a(c)},i)}i(s.arg)}(r,n,e,a)})}return e=e?e.then(a,a):a()}}function k(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,k(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=_(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,d):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function z(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function $(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:C}}function C(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},lh3E:function(t,e,r){"use strict";r.d(e,"d",function(){return a}),r.d(e,"a",function(){return i}),r.d(e,"e",function(){return s}),r.d(e,"b",function(){return c}),r.d(e,"c",function(){return u});var n=r("X4fA"),o=r("t3Un");function a(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.22:8006/zhongtai/company",method:"get",params:t||{}})}function i(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.22:8006/zhongtai/addCompany",method:"post",data:t})}function s(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.22:8006/zhongtai/putCompany",method:"post",data:t})}function c(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.22:8006/zhongtai/delCompany",method:"post",data:t})}function u(){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.22:8006/zhongtai/companyList",method:"get"})}},uVOl:function(t,e,r){"use strict";r.r(e);var n=r("cLjf"),o=r.n(n),a=r("hDQ3"),i=r.n(a),s=r("fe1z"),c=r("8fCU"),u=r("lh3E"),l=r("WgQi"),h={name:"register",data:function(){return{companyList:[],departmentList:[],submitting:!1,isMain:!1,registerForm:{username:"",realname:"",password:"",idcard:"",company:"",companyid:"",department:"",job:""},rules:{realname:[{required:!0,message:"请填写姓名",trigger:"blur"}],username:[{required:!0,message:"请填写手机号",trigger:"blur"}],password:[{required:!0,message:"请填写密码",trigger:"blur"}],idcard:[{required:!0,message:"请填写身份证",trigger:"blur"}],company:[{required:!0,message:"请填写单位",trigger:"blur"}]}}},watch:{},created:function(){this.getDepartmentData(),this.getCompanyData()},methods:{submit:function(){var t=this;return i()(o.a.mark(function e(){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.$refs.ruleForm.validate(function(e){e?t.register():t.$message({type:"warning",message:"请填写基本信息"})});case 1:case"end":return e.stop()}},e,t)}))()},getDepartmentData:function(){var t=this;Object(l.d)().then(function(e){"200"===e.data.code?t.departmentList=e.data.result:t.$message({type:"warning",message:e.data.message})}).catch(function(e){Object(c.a)({error:e,vm:t})})},getCompanyData:function(){var t=this;Object(u.c)().then(function(e){"200"===e.data.code?t.companyList=e.data.result:t.$message({type:"warning",message:e.data.message})}).catch(function(e){Object(c.a)({error:e,vm:t})})},companyChange:function(t){this.registerForm.company=t.company,this.registerForm.companyid=t.id,1===t.ismain?this.isMain=!0:(this.isMain=!1,this.registerForm.department="")},register:function(){var t=this;this.submitting=!0,Object(s.f)(this.registerForm).then(function(e){"200"===e.data.code?(t.$message({type:"success",message:"注册成功"}),setTimeout(function(){t.$router.push({path:"/login"})},1e3)):t.$message({type:"warning",message:e.data.message})}).catch(function(e){console.log(e),t.$message({type:"warning",message:"请求超时"})}).finally(function(){t.submitting=!1})}}},f=(r("fmMu"),r("ZrdR")),m=Object(f.a)(h,function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"register_main"},[t._m(0),t._v(" "),r("div",{staticClass:"register_main_form"},[r("el-form",{ref:"ruleForm",attrs:{model:t.registerForm,rules:t.rules,"label-width":"150px"}},[r("el-row",[r("el-col",{attrs:{span:20}},[r("el-form-item",{attrs:{label:"姓名",prop:"realname"}},[r("el-input",{model:{value:t.registerForm.realname,callback:function(e){t.$set(t.registerForm,"realname",e)},expression:"registerForm.realname"}})],1)],1)],1),t._v(" "),r("el-row",[r("el-col",{attrs:{span:20}},[r("el-form-item",{attrs:{label:"密码",prop:"password"}},[r("el-input",{model:{value:t.registerForm.password,callback:function(e){t.$set(t.registerForm,"password",e)},expression:"registerForm.password"}})],1)],1)],1),t._v(" "),r("el-row",[r("el-col",{attrs:{span:20}},[r("el-form-item",{attrs:{label:"手机号(账户)",prop:"username"}},[r("el-input",{ref:"tel",model:{value:t.registerForm.username,callback:function(e){t.$set(t.registerForm,"username",e)},expression:"registerForm.username"}})],1)],1)],1),t._v(" "),r("el-row",[r("el-col",{attrs:{span:20}},[r("el-form-item",{attrs:{label:"身份证",prop:"idcard"}},[r("el-input",{ref:"idcard",model:{value:t.registerForm.idcard,callback:function(e){t.$set(t.registerForm,"idcard",e)},expression:"registerForm.idcard"}})],1)],1)],1),t._v(" "),r("el-row",[r("el-col",{attrs:{span:11}},[r("el-form-item",{attrs:{label:"单位:",prop:"company"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{"value-key":"item","auto-complete":"on"},on:{change:t.companyChange},model:{value:t.registerForm.company,callback:function(e){t.$set(t.registerForm,"company","string"==typeof e?e.trim():e)},expression:"registerForm.company"}},t._l(t.companyList,function(t){return r("el-option",{key:t.id,attrs:{value:t,label:t.company}})}))],1)],1),t._v(" "),r("el-col",{attrs:{span:9}},[t.isMain?r("el-form-item",{attrs:{label:"部门:",prop:"department"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{"auto-complete":"on"},model:{value:t.registerForm.department,callback:function(e){t.$set(t.registerForm,"department","string"==typeof e?e.trim():e)},expression:"registerForm.department"}},t._l(t.departmentList,function(t){return r("el-option",{key:t.id,attrs:{value:t.id,label:t.department}})}))],1):t._e()],1)],1),t._v(" "),r("el-row"),t._v(" "),r("el-row",[r("el-col",{attrs:{span:20}},[r("el-form-item",{attrs:{label:"职位",prop:"job"}},[r("el-input",{model:{value:t.registerForm.job,callback:function(e){t.$set(t.registerForm,"job",e)},expression:"registerForm.job"}})],1)],1)],1)],1),t._v(" "),r("div",{staticStyle:{"padding-bottom":"30px"},attrs:{align:"center"}},[r("el-button",{attrs:{type:"primary",disabled:t.submitting},on:{click:function(e){t.submit()}}},[t._v("同意协议并注册")])],1)],1)])},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"register_main_body"},[e("span",{staticClass:"register_main_body_span"},[this._v("用户注册")])])}],!1,null,null,null);m.options.__file="register.vue";e.default=m.exports},xOJF:function(t,e,r){var n=function(){return this}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,a=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r("k4Ii"),o)n.regeneratorRuntime=a;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}}}]);