(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-12de"],{"4JOm":function(t,e,r){},BnjB:function(t,e,r){"use strict";var n=r("4JOm");r.n(n).a},DnhZ:function(t,e,r){"use strict";r.r(e);var n=r("cLjf"),i=r.n(n),o=r("hDQ3"),a=r.n(o),c=r("wk8/"),s=r("8fCU"),l={name:"index",data:function(){return{baseUrl:"http://222.92.213.21:8006/zhongtai/upload/",title:"",tableKey:"",mobile:"",listLoading:!1,workLicenseData:[],isHealthList:[{id:1,name:"是"},{id:0,name:"否"}],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:"",ishealth:0},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()(i.a.mark(function e(){var r;return i.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.licenseForm.ishealth=0,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 i in this.licenseForm)void 0!=this.licenseForm[i]&&""!=this.licenseForm[i].toString()&&n.append(i,this.licenseForm[i]);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("BnjB"),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._l(t.branchList,function(t){return r("el-option",{key:t.id,attrs:{label:t.name,value:t.name}})}))],1),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:"ishealth"}},[r("el-select",{model:{value:t.licenseForm.ishealth,callback:function(e){t.$set(t.licenseForm,"ishealth","string"==typeof e?e.trim():e)},expression:"licenseForm.ishealth"}},t._l(t.isHealthList,function(t){return r("el-option",{key:t.id,attrs:{value:t.id,label:t.name}})}))],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,"66b7730b",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 i(o,a){try{var c=e[o](a),s=c.value}catch(t){return void r(t)}if(!c.done)return n.default.resolve(s).then(function(t){i("next",t)},function(t){i("throw",t)});t(s)}("next")})}}},k4Ii:function(t,e){!function(e){"use strict";var r,n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.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",m="executing",f="completed",p={},b={};b[a]=function(){return this};var g=Object.getPrototypeOf,v=g&&g(g(A([])));v&&v!==n&&i.call(v,a)&&(b=v);var y=O.prototype=L.prototype=Object.create(b);_.prototype=y.constructor=O,O.constructor=_,O[s]=_.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(y),t},u.awrap=function(t){return{__await:t}},j(k.prototype),k.prototype[c]=function(){return this},u.AsyncIterator=k,u.async=function(t,e,r,n){var i=new k(w(t,e,r,n));return u.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},j(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=A,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(D),!t)for(var e in this)"t"===e.charAt(0)&&i.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,i){return c.type="throw",c.arg=t,e.next=n,i&&(e.method="next",e.arg=r),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),l=i.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&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),D(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 i=n.arg;D(r)}return i}}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),p}}}function w(t,e,r,n){var i=e&&e.prototype instanceof L?e:L,o=Object.create(i.prototype),a=new E(n||[]);return o._invoke=function(t,e,r){var n=h;return function(i,o){if(n===m)throw new Error("Generator is already running");if(n===f){if("throw"===i)throw o;return $()}for(r.method=i,r.arg=o;;){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=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=m;var s=F(t,e,r);if("normal"===s.type){if(n=r.done?f:d,s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=f,r.method="throw",r.arg=s.arg)}}}(t,r,a),o}function F(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function L(){}function _(){}function O(){}function j(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 o(){return new Promise(function(e,o){!function e(r,n,o,a){var c=F(t[r],t,n);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&i.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,o,a)},function(t){e("throw",t,o,a)}):Promise.resolve(l).then(function(t){s.value=t,o(s)},a)}a(c.arg)}(r,n,e,o)})}return e=e?e.then(o,o):o()}}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 i=F(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,p;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,p):o:(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 D(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 A(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,o=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=r,e.done=!0,e};return o.next=o}}return{next:$}}function $(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},"wk8/":function(t,e,r){"use strict";r.d(e,"q",function(){return o}),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 m}),r.d(e,"c",function(){return f}),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 F});var n=r("t3Un"),i=r("X4fA");function o(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/user",method:"get",params:t||{}})}function a(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/adduser",method:"post",data:t})}function c(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/deluser",method:"post",data:t})}function s(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/putuser",method:"post",data:t})}function l(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/userroles",method:"post",data:t})}function u(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/importUser",method:"post",data:t})}function h(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/importUserCode",method:"post",data:t})}function d(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/district",method:"get",params:t||{}})}function m(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/districtByName",method:"get",params:t||{}})}function f(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/userList",method:"get",params:t||{}})}function p(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/getWorkCert?mobile="+t,method:"get"})}function b(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/addWorkCert",method:"post",data:t})}function g(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/editWorkCert",method:"post",data:t})}function v(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/delWorkCert",method:"post",data:t})}function y(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/setInvalidDel",method:"post",data:t})}function w(t){return Object(n.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/bindCard",method:"post",data:t})}function F(t){return Object(n.a)({headers:{Authorization:Object(i.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")(),i=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,o=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r("k4Ii"),i)n.regeneratorRuntime=o;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}}}]);
|