Your Name
2022-04-08 1f2a259f8cbb7eb0b12d12895116c309eb8cd609
1
(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-5eec"],{CufV:function(t,e,r){"use strict";r.r(e);var n=r("cLjf"),o=r.n(n),i=r("hDQ3"),a=r.n(i),c=r("wk8/"),s=r("8fCU"),l=(r("lh3E"),{name:"index",data:function(){return{baseUrl:"http://222.92.213.21:8006/zhongtai/upload/",title:"",tableKey:"",mobile:"",listLoading:!1,workLicenseData:[],branchList:[{id:1,name:"电工作业"},{id:2,name:"焊接与热切割作业"},{id:3,name:"高处作业"},{id:4,name:"制冷与空调作业"},{id:5,name:"煤矿安全作业"},{id:6,name:"压力容器作业"},{id:7,name:"采掘(剥)作业"},{id:8,name:"矿山提升运输作业"},{id:9,name:"矿山安全检查作业"},{id:10,name:"矿山通风作业"},{id:11,name:"矿山排水作业"}],workLicenseDialog:!1,LicenseFormDialog:!1,licenseForm:{id:"",realname:"",mobile:"",idcard:"",certname:"",starttime:"",endtime:"",branch:""},licenseRules:{}}},methods:{openWorkLicense:function(t){this.workLicenseDialog=!0,this.licenseForm.realname=t.realname,this.licenseForm.mobile=t.username,this.licenseForm.idcard=t.idcard,this.licenseForm.branch=t.branch,this.getWorkLicenseData()},getWorkLicenseData:function(){var t=this;return a()(o.a.mark(function e(){var r;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(c.i)(t.licenseForm.mobile);case 2:"200"===(r=e.sent).data.code?t.workLicenseData=r.data.result:t.$message({type:"warning",message:r.data.message});case 4:case"end":return e.stop()}},e,t)}))()},showLicenseForm:function(t,e){this.LicenseFormDialog=!0,"新增"===e?(this.licenseForm.certname="",this.licenseForm.starttime="",this.licenseForm.endtime="",this.licenseForm.branch="",this.title="新增"):(this.title="编辑",this.licenseForm=t)},submit:function(){var t=this;if("新增"===this.title){var e=new FormData;for(var r in this.licenseForm)void 0!=this.licenseForm[r]&&""!=this.licenseForm[r].toString()&&e.append(r,this.licenseForm[r]);0!==this.$refs.upload.files.length&&e.append("file",this.$refs.upload.files[0]),Object(c.a)(e).then(function(e){"200"===e.data.code?(t.LicenseFormDialog=!1,t.getWorkLicenseData(),t.$notify({title:"成功",message:"新增成功",duration:2e3,type:"success"})):t.$message({type:"warning",message:e.data.message})}).catch(function(e){Object(s.a)({error:e,vm:t})})}else{var n=new FormData;for(var o in this.licenseForm)void 0!=this.licenseForm[o]&&""!=this.licenseForm[o].toString()&&n.append(o,this.licenseForm[o]);0!==this.$refs.upload.files.length&&n.append("file",this.$refs.upload.files[0]),Object(c.p)(n).then(function(e){"200"===e.data.code?(t.LicenseFormDialog=!1,t.getWorkLicenseData(),t.$notify({type:"success",message:"新增成功",duration:2e3,title:"成功"})):t.$message({message:e.data.message,type:"warning"})}).catch(function(e){Object(s.a)({error:e,vm:t})})}},deleteById:function(t){var e=this;this.$confirm("删除此条工作证,是否继续","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(c.f)({id:t.id}).then(function(){e.getWorkLicenseData(),e.$notify({title:"成功",message:"删除成功",type:"success",duration:2e3})})}).catch(function(t){return Object(s.a)({error:t,vm:e})})}}}),u=(r("syOV"),r("ZrdR")),h=Object(u.a)(l,function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-dialog",{attrs:{visible:t.workLicenseDialog,"close-on-click-modal":!1,title:"工作证",width:"60%"},on:{"update:visible":function(e){t.workLicenseDialog=e}}},[r("div",{staticClass:"app-container"},[r("div",{staticClass:"filter-container"},[r("div",{staticClass:"basic_search"},[r("el-button",{attrs:{type:"primary"},on:{click:function(e){t.showLicenseForm("","新增")}}},[t._v("新增")]),t._v(" "),r("el-button",{attrs:{type:"primary",icon:"el-icon-search"}},[t._v("查询")])],1)]),t._v(" "),r("div",{staticClass:"table_content"},[r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],key:t.tableKey,staticStyle:{width:"100%"},attrs:{data:t.workLicenseData,fit:"",border:"","highlight-current-row":""}},[r("el-table-column",{attrs:{type:"index",label:"",align:"center",width:"60"}}),t._v(" "),r("el-table-column",{attrs:{label:"姓名",prop:"realname",align:"center",sortable:"custom"}}),t._v(" "),r("el-table-column",{attrs:{label:"手机号",prop:"mobile",align:"center",sortable:"custom"}}),t._v(" "),r("el-table-column",{attrs:{label:"身份证",prop:"idcard",align:"center",sortable:"custom"}}),t._v(" "),r("el-table-column",{attrs:{label:"特殊作业工种",prop:"branch",align:"center",sortable:"custom"}}),t._v(" "),r("el-table-column",{attrs:{label:"特殊作业证件号",prop:"certname",align:"center",sortable:"custom"}}),t._v(" "),r("el-table-column",{attrs:{label:"文件路径",prop:"certpath",align:"center",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("a",{attrs:{href:t.baseUrl+e.row.certpath,target:"_blank"}},[t._v(t._s(t.baseUrl+e.row.url))])]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"有效期开始时间",prop:"starttime",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{label:"有效期结束时间",prop:"endtime",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{label:"操作",align:"center",width:"250","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-button",{attrs:{type:"text"},on:{click:function(r){t.showLicenseForm(e.row,"编辑")}}},[t._v("编辑")]),t._v(" "),r("el-button",{staticStyle:{color:"red"},attrs:{type:"text"},on:{click:function(r){t.deleteById(e.row)}}},[t._v("删除")])]}}])})],1)],1)]),t._v(" "),r("el-dialog",{attrs:{visible:t.LicenseFormDialog,"close-on-click-modal":!1,"append-to-body":!0,title:t.title,width:"30%"},on:{"update:visible":function(e){t.LicenseFormDialog=e}}},[r("el-form",{ref:"licenseForm",staticStyle:{"padding-right":"50px"},attrs:{rules:t.licenseRules,model:t.licenseForm,"label-position":"right","label-width":"150px","element-loading-text":"保存中..."}},[r("el-form-item",{attrs:{label:"真实姓名:",prop:"realname"}},[r("el-input",{attrs:{disabled:!0},model:{value:t.licenseForm.realname,callback:function(e){t.$set(t.licenseForm,"realname","string"==typeof e?e.trim():e)},expression:"licenseForm.realname"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"联系方式:",prop:"mobile"}},[r("el-input",{attrs:{disabled:!0},model:{value:t.licenseForm.mobile,callback:function(e){t.$set(t.licenseForm,"mobile","string"==typeof e?e.trim():e)},expression:"licenseForm.mobile"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"身份证:",prop:"idcard"}},[r("el-input",{attrs:{disabled:!0},model:{value:t.licenseForm.idcard,callback:function(e){t.$set(t.licenseForm,"idcard","string"==typeof e?e.trim():e)},expression:"licenseForm.idcard"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"特种作业工种:",prop:"branch"}},[r("el-select",{model:{value:t.licenseForm.branch,callback:function(e){t.$set(t.licenseForm,"branch","string"==typeof e?e.trim():e)},expression:"licenseForm.branch"}}),t._v(" "),t._l(t.branchList,function(t){return r("el-option",{key:t.id,attrs:{label:t.name,value:t.name}})})],2),t._v(" "),r("el-form-item",{attrs:{label:"特种作业证件号:",prop:"certname"}},[r("el-input",{model:{value:t.licenseForm.certname,callback:function(e){t.$set(t.licenseForm,"certname","string"==typeof e?e.trim():e)},expression:"licenseForm.certname"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"有效期开始时间:",prop:"starttime"}},[r("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"选择日期时间"},model:{value:t.licenseForm.starttime,callback:function(e){t.$set(t.licenseForm,"starttime",e)},expression:"licenseForm.starttime"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"有效期结束时间:",prop:"endtime"}},[r("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"选择日期时间"},model:{value:t.licenseForm.endtime,callback:function(e){t.$set(t.licenseForm,"endtime",e)},expression:"licenseForm.endtime"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"文件:",prop:"upload"}},[r("input",{ref:"upload",attrs:{id:"upload",type:"file"}})])],1),t._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(e){t.LicenseFormDialog=!1}}},[t._v("取消")]),t._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submit()}}},[t._v("确定")])],1)],1)],1)},[],!1,null,"18eddea0",null);h.options.__file="index.vue";e.default=h.exports},cLjf:function(t,e,r){t.exports=r("xOJF")},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(i,a){try{var c=e[i](a),s=c.value}catch(t){return void r(t)}if(!c.done)return n.default.resolve(s).then(function(t){o("next",t)},function(t){o("throw",t)});t(s)}("next")})}}},k4Ii:function(t,e){!function(e){"use strict";var r,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag",l="object"==typeof t,u=e.regeneratorRuntime;if(u)l&&(t.exports=u);else{(u=e.regeneratorRuntime=l?t.exports:{}).wrap=w;var h="suspendedStart",d="suspendedYield",f="executing",m="completed",p={},b={};b[a]=function(){return this};var g=Object.getPrototypeOf,v=g&&g(g(D([])));v&&v!==n&&o.call(v,a)&&(b=v);var y=L.prototype=j.prototype=Object.create(b);F.prototype=y.constructor=L,L.constructor=F,L[s]=F.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===F||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,L):(t.__proto__=L,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(y),t},u.awrap=function(t){return{__await:t}},_(k.prototype),k.prototype[c]=function(){return this},u.AsyncIterator=k,u.async=function(t,e,r,n){var o=new k(w(t,e,r,n));return u.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},_(y),y[s]="Generator",y[a]=function(){return this},y.toString=function(){return"[object Generator]"},u.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}},u.values=D,E.prototype={constructor:E,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(A),!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 c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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 i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},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),p},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),A(r),p}},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;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:D(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),p}}}function w(t,e,r,n){var o=e&&e.prototype instanceof j?e:j,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n=h;return function(o,i){if(n===f)throw new Error("Generator is already running");if(n===m){if("throw"===o)throw i;return $()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var s=O(t,e,r);if("normal"===s.type){if(n=r.done?m:d,s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=m,r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function O(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function j(){}function F(){}function L(){}function _(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function k(t){var e;this._invoke=function(r,n){function i(){return new Promise(function(e,i){!function e(r,n,i,a){var c=O(t[r],t,n);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&o.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(l).then(function(t){s.value=t,i(s)},a)}a(c.arg)}(r,n,e,i)})}return e=e?e.then(i,i):i()}}function x(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,x(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=O(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function z(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 A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,this),this.reset(!0)}function D(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=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 i.next=i}}return{next:$}}function $(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},kZZ9:function(t,e,r){},lh3E:function(t,e,r){"use strict";r.d(e,"d",function(){return i}),r.d(e,"a",function(){return a}),r.d(e,"e",function(){return c}),r.d(e,"b",function(){return s}),r.d(e,"c",function(){return l});var n=r("X4fA"),o=r("t3Un");function i(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/company",method:"get",params:t||{}})}function a(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/addCompany",method:"post",data:t})}function c(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/putCompany",method:"post",data:t})}function s(t){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/delCompany",method:"post",data:t})}function l(){return Object(o.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/companyList",method:"get"})}},syOV:function(t,e,r){"use strict";var n=r("kZZ9");r.n(n).a},"wk8/":function(t,e,r){"use strict";r.d(e,"q",function(){return i}),r.d(e,"d",function(){return a}),r.d(e,"e",function(){return c}),r.d(e,"n",function(){return s}),r.d(e,"o",function(){return l}),r.d(e,"k",function(){return u}),r.d(e,"l",function(){return h}),r.d(e,"g",function(){return d}),r.d(e,"h",function(){return f}),r.d(e,"c",function(){return m}),r.d(e,"i",function(){return p}),r.d(e,"a",function(){return b}),r.d(e,"p",function(){return g}),r.d(e,"f",function(){return v}),r.d(e,"m",function(){return y}),r.d(e,"b",function(){return w}),r.d(e,"j",function(){return O});var n=r("t3Un"),o=r("X4fA");function i(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/user",method:"get",params:t||{}})}function a(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/adduser",method:"post",data:t})}function c(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/deluser",method:"post",data:t})}function s(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/putuser",method:"post",data:t})}function l(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/userroles",method:"post",data:t})}function u(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/importUser",method:"post",data:t})}function h(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/importUserCode",method:"post",data:t})}function d(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/district",method:"get",params:t||{}})}function f(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/districtByName",method:"get",params:t||{}})}function m(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/userList",method:"get",params:t||{}})}function p(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/getWorkCert?mobile="+t,method:"get"})}function b(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/addWorkCert",method:"post",data:t})}function g(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/editWorkCert",method:"post",data:t})}function v(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/delWorkCert",method:"post",data:t})}function y(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/setInvalidDel",method:"post",data:t})}function w(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/bindCard",method:"post",data:t})}function O(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/importSupplierUser",method:"post",data:t})}},xOJF:function(t,e,r){var n=function(){return this}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,i=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r("k4Ii"),o)n.regeneratorRuntime=i;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}}}]);