chunk-2e05ef24.91dfbf12.js 16 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2e05ef24","chunk-6cb046c0","chunk-55babe02","chunk-2d0df437"],{"01cb":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"table-page-search-wrapper"},[t("a-form",{attrs:{layout:"inline"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchQuery.apply(null,arguments)}}},[t("a-row",{attrs:{gutter:24}},[t("a-col",{attrs:{xl:6,lg:7,md:8,sm:24}},[t("a-form-item",{attrs:{label:"名字"}},[t("a-input",{attrs:{placeholder:"用户名字"},model:{value:e.queryParam.name,callback:function(t){e.$set(e.queryParam,"name",t)},expression:"queryParam.name"}})],1)],1),t("a-col",{attrs:{xl:6,lg:7,md:8,sm:24}},[t("span",{staticClass:"table-page-search-submitButtons",staticStyle:{float:"left",overflow:"hidden"}},[t("a-button",{attrs:{type:"primary",icon:"search"},on:{click:e.searchQuery}},[e._v("查询")]),t("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",icon:"reload"},on:{click:e.searchReset}},[e._v("重置")])],1)])],1)],1)],1),t("div",{staticClass:"table-operator"},[t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:function(t){return e.handleAdd("新增参训人员")}}},[e._v("新增")]),t("a-button",{attrs:{type:"primary",icon:"download"},on:{click:function(t){return e.handleExportXls("导出参训人员")}}},[e._v("导出打印")]),e.selectedRowKeys.length>0?t("a-dropdown",[t("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[t("a-menu-item",{key:"1",on:{click:function(t){return e.handleExportXls("导出参训人员")}}},[t("a-icon",{attrs:{type:"download"}}),e._v("导出打印")],1)],1),t("a-button",{staticStyle:{"margin-left":"8px"}},[e._v(" 批量操作 "),t("a-icon",{attrs:{type:"down"}})],1)],1):e._e()],1),t("div",[t("div",{staticClass:"ant-alert ant-alert-info",staticStyle:{"margin-bottom":"16px"}},[t("i",{staticClass:"anticon anticon-info-circle ant-alert-icon"}),e._v(" 已选择 "),t("a",{staticStyle:{"font-weight":"600"}},[e._v(e._s(e.selectedRowKeys.length))]),e._v("项\n "),t("a",{staticStyle:{"margin-left":"24px"},on:{click:e.onClearSelected}},[e._v("清空")])]),t("a-table",{ref:"table",staticClass:"j-table-force-nowrap",attrs:{size:"middle",bordered:"",rowKey:"id",columns:e.columns,dataSource:e.dataSource,pagination:e.ipagination,loading:e.loading,rowSelection:{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange}},on:{change:e.handleTableChange},scopedSlots:e._u([{key:"htmlSlot",fn:function(a){return[t("div",{domProps:{innerHTML:e._s(a)}})]}},{key:"imgSlot",fn:function(a){return[a?t("img",{staticStyle:{"max-width":"80px","font-size":"12px","font-style":"italic"},attrs:{src:e.getImgView(a),height:"25px",alt:""}}):t("span",{staticStyle:{"font-size":"12px","font-style":"italic"}},[e._v("无图片")])]}},{key:"fileSlot",fn:function(a){return[a?t("a-button",{attrs:{ghost:!0,type:"primary",icon:"download",size:"small"},on:{click:function(t){return e.uploadFile(a)}}},[e._v("\n 下载\n ")]):t("span",{staticStyle:{"font-size":"12px","font-style":"italic"}},[e._v("无文件")])]}},{key:"action",fn:function(a,n){return t("span",{},[t("a",{on:{click:function(t){return e.handlePwd(n)}}},[e._v("重置密码")]),t("a-divider",{attrs:{type:"vertical"}}),t("a",{on:{click:function(t){return e.handleEdit(n,"编辑参训人员信息")}}},[e._v("编辑")]),t("a-divider",{attrs:{type:"vertical"}}),t("a",{on:{click:function(t){return e.handleShowProfile(n)}}},[e._v("查看档案")]),t("a-divider",{attrs:{type:"vertical"}}),t("a-dropdown",[t("a",{staticClass:"ant-dropdown-link"},[e._v("更多 "),t("a-icon",{attrs:{type:"down"}})],1),t("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[t("a-menu-item",[t("a-popconfirm",{attrs:{title:"确定删除吗?"},on:{confirm:function(){return e.handleDelete(n.id)}}},[t("a",[e._v("删除")])])],1)],1)],1)],1)}}])})],1),t("tourismCity-modal",{ref:"modalForm",on:{ok:e.modalFormOk}}),t("pwd-modal",{ref:"pwdForm"})],1)},i=[],r=(a("6eb7"),a("ac0d")),l=a("b65a"),o=a("cd77"),s=a("cddc"),c={name:"UserList",mixins:[l["a"],r["b"]],components:{TourismCityModal:o["default"],PwdModal:s["default"]},data:function(){return{description:"所有用户管理页面",columns:[{title:"#ID",align:"center",dataIndex:"id"},{title:"名称",align:"center",dataIndex:"name"},{title:"真实姓名",align:"center",dataIndex:"realname"},{title:"编号",align:"center",dataIndex:"code"},{title:"角色",align:"center",dataIndex:"role",customRender:function(e,t,a){switch(t.role){case 1:return"导调";case 2:return"参训人员";default:return"为设置角色"}}},{title:"最近登陆时间",align:"center",dataIndex:"last_login_time",width:100},{title:"操作",dataIndex:"action",align:"center",width:147,scopedSlots:{customRender:"action"}}],url:{list:"/admin/user/list",delete:"/admin/user/delete",exportXlsUrl:"/admin/user/exportXls"},dictOptions:{}}},computed:{importExcelUrl:function(){return"".concat(window._CONFIG["domianURL"],"/").concat(this.url.importExcelUrl)}},methods:{initDictConfig:function(){},handlePwd:function(e){this.$refs.pwdForm.edit(e),this.$refs.pwdForm.title="重置密码",this.$refs.pwdForm.disableSubmit=!1},handleShowProfile:function(e){this.$router.push({path:"/users/profile?id="+e.id,params:{id:e}})}}},u=c,d=(a("e878"),a("2877")),p=Object(d["a"])(u,n,i,!1,null,"81142b4a",null);t["default"]=p.exports},"6eb7":function(e,t,a){},7158:function(e,t,a){},"88bc":function(e,t,a){(function(t){var a=1/0,n=9007199254740991,i="[object Arguments]",r="[object Function]",l="[object GeneratorFunction]",o="[object Symbol]",s="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,u=s||c||Function("return this")();function d(e,t,a){switch(a.length){case 0:return e.call(t);case 1:return e.call(t,a[0]);case 2:return e.call(t,a[0],a[1]);case 3:return e.call(t,a[0],a[1],a[2])}return e.apply(t,a)}function p(e,t){var a=-1,n=e?e.length:0,i=Array(n);while(++a<n)i[a]=t(e[a],a,e);return i}function f(e,t){var a=-1,n=t.length,i=e.length;while(++a<n)e[i+a]=t[a];return e}var m=Object.prototype,h=m.hasOwnProperty,v=m.toString,b=u.Symbol,g=m.propertyIsEnumerable,w=b?b.isConcatSpreadable:void 0,y=Math.max;function x(e,t,a,n,i){var r=-1,l=e.length;a||(a=j),i||(i=[]);while(++r<l){var o=e[r];t>0&&a(o)?t>1?x(o,t-1,a,n,i):f(i,o):n||(i[i.length]=o)}return i}function C(e,t){return e=Object(e),k(e,t,(function(t,a){return a in e}))}function k(e,t,a){var n=-1,i=t.length,r={};while(++n<i){var l=t[n],o=e[l];a(o,l)&&(r[l]=o)}return r}function _(e,t){return t=y(void 0===t?e.length-1:t,0),function(){var a=arguments,n=-1,i=y(a.length-t,0),r=Array(i);while(++n<i)r[n]=a[t+n];n=-1;var l=Array(t+1);while(++n<t)l[n]=a[n];return l[t]=r,d(e,this,l)}}function j(e){return S(e)||L(e)||!!(w&&e&&e[w])}function O(e){if("string"==typeof e||M(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function L(e){return $(e)&&h.call(e,"callee")&&(!g.call(e,"callee")||v.call(e)==i)}var S=Array.isArray;function F(e){return null!=e&&U(e.length)&&!I(e)}function $(e){return P(e)&&F(e)}function I(e){var t=A(e)?v.call(e):"";return t==r||t==l}function U(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function A(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function P(e){return!!e&&"object"==typeof e}function M(e){return"symbol"==typeof e||P(e)&&v.call(e)==o}var q=_((function(e,t){return null==e?{}:C(e,p(x(t,1),O))}));e.exports=q}).call(this,a("c8ba"))},a726:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c;return t("a-checkbox-group",e._b({attrs:{options:e.options,value:e.checkboxArray},on:{change:e.onChange}},"a-checkbox-group",e.$attrs,!1))},i=[],r={name:"JCheckbox",props:{value:{type:String,required:!1},options:{type:Array,required:!0}},data:function(){return{checkboxArray:this.value?this.value.split(","):[]}},watch:{value:function(e){this.checkboxArray=e?this.value.split(","):[]}},methods:{onChange:function(e){this.$emit("change",e.join(","))}},model:{prop:"value",event:"change"}},l=r,o=a("2877"),s=Object(o["a"])(l,n,i,!1,null,null,null);t["default"]=s.exports},cd77:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c;return t("j-modal",{attrs:{title:e.title,width:e.width,visible:e.visible,confirmLoading:e.confirmLoading,switchFullscreen:"",cancelText:"关闭"},on:{ok:e.handleOk,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"登陆名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name"],expression:"['name']"}],attrs:{placeholder:"名称"}})],1),t("a-form-item",{attrs:{label:"真实名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["realname"],expression:"['realname']"}],attrs:{placeholder:"真实名称"}})],1),t("a-form-item",{attrs:{label:"角色",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["role"],expression:"['role']"}],attrs:{name:"sex"}},[t("a-radio",{attrs:{value:1}},[e._v("\n 导调\n ")]),t("a-radio",{attrs:{value:2}},[e._v("\n 参训人员\n ")])],1)],1),t("a-form-item",{attrs:{label:"编号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["code"],expression:"['code']"}],attrs:{placeholder:"编号"}})],1),t("a-form-item",{attrs:{label:"头像",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("j-image-upload",{directives:[{name:"decorator",rawName:"v-decorator",value:["avatar"],expression:"['avatar']"}]})],1)],1)],1)],1)},i=[],r=a("0fea"),l=a("88bc"),o=a.n(l),s=(a("ca00"),a("e610")),c=a("a726"),u={name:"UserModal",components:{JImageUpload:s["default"],JCheckbox:c["default"]},data:function(){return{form:this.$form.createForm(this),title:"操作",width:800,visible:!1,model:{},labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},confirmLoading:!1,validatorRules:{countryName:{rules:[{required:!0,message:"请输入国家!"}]}},url:{add:"/admin/user/add",edit:"/admin/user/edit"}}},created:function(){},methods:{add:function(){this.edit({})},edit:function(e){var t=this;this.form.resetFields(),this.model=Object.assign({},e),this.visible=!0,this.$nextTick((function(){t.form.setFieldsValue(o()(t.model,"name","realname","code","role","avatar"))}))},close:function(){this.$emit("close"),this.visible=!1},handleOk:function(){var e=this,t=this;this.form.validateFields((function(a,n){if(!a){t.confirmLoading=!0;var i="",l="";e.model.id?(i+=e.url.edit,l="put"):(i+=e.url.add,l="post");var o=Object.assign(e.model,n);Object(r["i"])(i,o,l).then((function(e){e.success?(t.$message.success(e.message),t.$emit("ok")):t.$message.warning(e.message)})).finally((function(){t.confirmLoading=!1,t.close()}))}}))},handleCancel:function(){this.close()},popupCallback:function(e){}}},d=u,p=a("2877"),f=Object(p["a"])(d,n,i,!1,null,null,null);t["default"]=f.exports},cddc:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c;return t("j-modal",{attrs:{title:e.title,width:e.width,visible:e.visible,confirmLoading:e.confirmLoading,switchFullscreen:"",cancelText:"关闭"},on:{ok:e.handleOk,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"登陆名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name"],expression:"['name']"}],attrs:{placeholder:"名称"}})],1),t("a-form-item",{attrs:{label:"新密码",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["pwd"],expression:"['pwd']"}],attrs:{placeholder:"请输入新密码"}})],1)],1)],1)],1)},i=[],r=a("0fea"),l=a("88bc"),o=a.n(l),s=(a("ca00"),a("e610")),c=a("a726"),u={name:"UserModal",components:{JImageUpload:s["default"],JCheckbox:c["default"]},data:function(){return{form:this.$form.createForm(this),title:"操作",width:800,visible:!1,model:{},labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},confirmLoading:!1,validatorRules:{countryName:{rules:[{required:!0,message:"请输入国家!"}]}},url:{add:"/admin/user/add",edit:"/admin/user/resetpwd"}}},created:function(){},methods:{add:function(){this.edit({})},edit:function(e){var t=this;this.form.resetFields(),this.model=Object.assign({},e),this.visible=!0,this.$nextTick((function(){t.form.setFieldsValue(o()(t.model,"name"))}))},close:function(){this.$emit("close"),this.visible=!1},handleOk:function(){var e=this,t=this;this.form.validateFields((function(a,n){if(!a){t.confirmLoading=!0;var i="",l="";i+=e.url.edit,l="put";var o=Object.assign(e.model,n);Object(r["i"])(i,{id:o.id,pwd:o.pwd},l).then((function(e){e.success?(t.$message.success(e.message),t.$emit("ok")):t.$message.warning(e.message)})).finally((function(){t.confirmLoading=!1,t.close()}))}}))},handleCancel:function(){this.close()},popupCallback:function(e){}}},d=u,p=a("2877"),f=Object(p["a"])(d,n,i,!1,null,null,null);t["default"]=f.exports},e610:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c;return t("a-upload",{attrs:{name:"file",listType:"picture-card",multiple:e.isMultiple,action:e.uploadAction,headers:e.headers,data:{biz:e.bizPath},fileList:e.fileList,beforeUpload:e.beforeUpload,disabled:e.disabled,isMultiple:e.isMultiple,showUploadList:e.isMultiple},on:{change:e.handleChange,preview:e.handlePreview}},[!e.isMultiple&&e.picUrl?t("img",{staticStyle:{height:"104px","max-width":"300px"},attrs:{src:e.getAvatarView()}}):t("div",[t("a-icon",{attrs:{type:e.uploadLoading?"loading":"plus"}}),t("div",{staticClass:"ant-upload-text"},[e._v(e._s(e.text))])],1),t("a-modal",{attrs:{visible:e.previewVisible,footer:null},on:{cancel:function(t){return e.handleCancel()}}},[t("img",{staticStyle:{width:"100%"},attrs:{alt:"example",src:e.previewImage}})])],1)},i=[],r=a("2b0e"),l=a("9fb0"),o=a("0fea"),s=function(){return"-"+parseInt(1e4*Math.random()+1,10)},c=function(e){if(e.lastIndexOf("\\")>=0){var t=new RegExp("\\\\","g");e=e.replace(t,"/")}return e.substring(e.lastIndexOf("/")+1)},u={name:"JImageUpload",data:function(){return{uploadAction:window._CONFIG["domianURL"]+"/sys/common/upload",uploadLoading:!1,picUrl:!1,headers:{},fileList:[],previewImage:"",previewVisible:!1}},props:{text:{type:String,required:!1,default:"上传"},bizPath:{type:String,required:!1,default:"temp"},value:{type:[String,Array],required:!1},disabled:{type:Boolean,required:!1,default:!1},isMultiple:{type:Boolean,required:!1,default:!1}},watch:{value:function(e){e instanceof Array?this.initFileList(e.join(",")):this.initFileList(e)}},created:function(){var e=r["default"].ls.get(l["a"]);this.headers={"X-Access-Token":e}},methods:{initFileList:function(e){if(e&&0!=e.length){this.picUrl=!0;for(var t=[],a=e.split(","),n=0;n<a.length;n++){var i=Object(o["e"])(a[n]);t.push({uid:s(),name:c(a[n]),status:"done",url:i,response:{status:"history",message:a[n]}})}this.fileList=t}else this.fileList=[]},beforeUpload:function(e){var t=e.type;if(t.indexOf("image")<0)return this.$message.warning("请上传图片"),!1},handleChange:function(e){this.picUrl=!1;var t=e.fileList;"done"===e.file.status?e.file.response.success&&(this.picUrl=!0,t=t.map((function(e){return e.response&&(e.url=e.response.message),e}))):"error"===e.file.status?this.$message.error("".concat(e.file.name," 上传失败.")):"removed"===e.file.status&&this.handleDelete(e.file),this.fileList=t,"done"!==e.file.status&&"removed"!==e.file.status||this.handlePathChange()},handlePreview:function(e){this.previewImage=e.url||e.thumbUrl,this.previewVisible=!0},getAvatarView:function(){if(this.fileList.length>0){var e=this.fileList[0].url;return Object(o["e"])(e)}},handlePathChange:function(){var e=this.fileList,t="";e&&0!=e.length||(t="");var a=[];if(this.isMultiple)for(var n=0;n<e.length;n++)a.push(e[n].response.message);else a.push(e[e.length-1].response.message);a.length>0&&(t=a.join(",")),this.$emit("change",t)},handleDelete:function(e){},handleCancel:function(){this.close(),this.previewVisible=!1},close:function(){}},model:{prop:"value",event:"change"}},d=u,p=a("2877"),f=Object(p["a"])(d,n,i,!1,null,"244aa1d3",null);t["default"]=f.exports},e878:function(e,t,a){"use strict";a("7158")}}]);