1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0fdc68fb","chunk-f15a0b5a","chunk-2d0df437"],{2735:function(e,t,a){"use strict";a("5ea7")},"3a10":function(e,t,a){"use strict";a.r(t);var i=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:["realname"],expression:"['realname']"}],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:["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)},n=[],s=a("0fea"),r=a("88bc"),l=a.n(r),o=(a("ca00"),a("e610")),c=a("a726"),u={name:"UserModal",components:{JImageUpload:o["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,url:{add:"/admin/user/add",edit:"/admin/user/edit"}}},created:function(){},methods:{edit:function(e){var t=this;this.form.resetFields(),this.model=Object.assign({},e),this.visible=!0,this.$nextTick((function(){t.form.setFieldsValue(l()(t.model,"realname","code","avatar"))}))},close:function(){this.$emit("close"),this.visible=!1},handleOk:function(){var e=this,t=this;this.form.validateFields((function(a,i){if(!a){t.confirmLoading=!0;var n=e.url.edit,r="put",l=Object.assign({id:e.model.id},i);Object(s["i"])(n,l,r).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()}}},d=u,f=a("2877"),p=Object(f["a"])(d,i,n,!1,null,null,null);t["default"]=p.exports},"5ea7":function(e,t,a){},"6eb7":function(e,t,a){},"82cb":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e._self._c;return t("div",[t("a-card",{attrs:{bordered:!1,title:"基础信息"}},[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)}}})],1),t("div",{staticClass:"table-operator"},[t("a-button",{attrs:{type:"primary",icon:"download"},on:{click:function(t){return e.handleExportXls(e.userDetail.realname)}}},[e._v("导出打印")])],1),e.loading?t("div",{staticClass:"loading"},[t("a-spin",{attrs:{size:"large"}})],1):e.userDetail.id?t("div",{staticClass:"profile_root"},[t("div",{staticClass:"user_info"},[e.userDetail.avatar?t("img",{staticClass:"avatar",attrs:{src:e.getImgView(e.userDetail.avatar),alt:""}}):t("a-avatar",{attrs:{size:120,icon:"user"}}),t("div",{staticClass:"name"},[t("span",[e._v(e._s(e.userDetail.realname))]),null==e.userId?t("a-icon",{staticClass:"Icon_edit",attrs:{type:"edit"},on:{click:e.showModal}}):e._e()],1),t("p",{staticClass:"id"},[e._v("系统编号:"+e._s(e.userDetail.code))])],1),t("ul",{staticClass:"exercise_list"},[t("li",{staticClass:"item"},[t("div",{staticClass:"content"},[t("div",{staticClass:"label"},[e._v("参训总次数")]),t("div",{staticClass:"value"},[e._v(e._s(e.userDetail.rids)+"次")])])]),t("li",{staticClass:"item"},[t("div",{staticClass:"content"},[t("div",{staticClass:"label"},[e._v("参训科目数")]),t("div",{staticClass:"value"},[e._v(e._s(e.userDetail.subjects)+"项")])])]),t("li",{staticClass:"item"},[t("div",{staticClass:"content"},[t("div",{staticClass:"label"},[e._v("参训总时间")]),t("div",{staticClass:"value"},[e._v(e._s(e.userDetail.totalTime))])])]),t("li",{staticClass:"item"},[t("div",{staticClass:"content"},[t("div",{staticClass:"label"},[e._v("首次参训时间")]),t("div",{staticClass:"value"},[e._v(e._s(e.userDetail.farTime))])])]),t("li",{staticClass:"item"},[t("div",{staticClass:"content"},[t("div",{staticClass:"label"},[e._v("最后参训时间")]),t("div",{staticClass:"value"},[e._v(e._s(e.userDetail.lastTime))])])])])]):t("div",[t("a-empty")],1)]),t("userEdit-modal",{ref:"modalForm",on:{ok:e.getUserDetail}})],1)},n=[],s=(a("6eb7"),a("ac0d")),r=a("b65a"),l=a("0fea"),o=a("3a10"),c={name:"UserProfile",mixins:[s["b"],r["a"]],components:{UserEditModal:o["default"]},data:function(){return{userId:null,userDetail:{},loading:!1,description:"参训档案",disableMixinCreated:!0,url:{exportXlsUrl:"/admin/user/exportProfile"},columns:[{title:"#",dataIndex:"",key:"rowIndex",width:60,align:"center",customRender:function(e,t,a){return parseInt(a)+1}},{title:"创建日期",align:"center",dataIndex:"createTime"},{title:"更新日期",align:"center",dataIndex:"updateTime"},{title:"网站首页banner",align:"center",dataIndex:"banners",scopedSlots:{customRender:"imgSlot"}},{title:"操作",dataIndex:"action",align:"center",width:147,scopedSlots:{customRender:"action"}}],dictOptions:{}}},computed:{importExcelUrl:function(){return"".concat(window._CONFIG["domianURL"],"/").concat(this.url.importExcelUrl)}},mounted:function(){var e=this.$route.query.id;e&&(this.userId=e),this.queryParam.id=e,this.getUserDetail()},methods:{getUserDetail:function(){var e=this;this.loading=!0;var t="/admin/user/profile",a={};this.userId&&(a={id:this.userId}),Object(l["c"])(t,a).then((function(t){if(e.loading=!1,200==t.code){var a=t.result;e.userDetail=a}else e.$message.error(t.message)}))},getImgView:function(e){return e&&e.indexOf(",")>0&&(e=e.substring(0,e.indexOf(","))),Object(l["e"])(e)},showModal:function(){this.$refs.modalForm.edit(this.userDetail)}}},u=c,d=(a("2735"),a("2877")),f=Object(d["a"])(u,i,n,!1,null,"0753ad35",null);t["default"]=f.exports},"88bc":function(e,t,a){(function(t){var a=1/0,i=9007199254740991,n="[object Arguments]",s="[object Function]",r="[object GeneratorFunction]",l="[object Symbol]",o="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,u=o||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 f(e,t){var a=-1,i=e?e.length:0,n=Array(i);while(++a<i)n[a]=t(e[a],a,e);return n}function p(e,t){var a=-1,i=t.length,n=e.length;while(++a<i)e[n+a]=t[a];return e}var h=Object.prototype,m=h.hasOwnProperty,v=h.toString,g=u.Symbol,b=h.propertyIsEnumerable,C=g?g.isConcatSpreadable:void 0,w=Math.max;function y(e,t,a,i,n){var s=-1,r=e.length;a||(a=O),n||(n=[]);while(++s<r){var l=e[s];t>0&&a(l)?t>1?y(l,t-1,a,i,n):p(n,l):i||(n[n.length]=l)}return n}function x(e,t){return e=Object(e),_(e,t,(function(t,a){return a in e}))}function _(e,t,a){var i=-1,n=t.length,s={};while(++i<n){var r=t[i],l=e[r];a(l,r)&&(s[r]=l)}return s}function j(e,t){return t=w(void 0===t?e.length-1:t,0),function(){var a=arguments,i=-1,n=w(a.length-t,0),s=Array(n);while(++i<n)s[i]=a[t+i];i=-1;var r=Array(t+1);while(++i<t)r[i]=a[i];return r[t]=s,d(e,this,r)}}function O(e){return L(e)||I(e)||!!(C&&e&&e[C])}function k(e){if("string"==typeof e||S(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function I(e){return D(e)&&m.call(e,"callee")&&(!b.call(e,"callee")||v.call(e)==n)}var L=Array.isArray;function U(e){return null!=e&&F(e.length)&&!A(e)}function D(e){return $(e)&&U(e)}function A(e){var t=M(e)?v.call(e):"";return t==s||t==r}function F(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function M(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function $(e){return!!e&&"object"==typeof e}function S(e){return"symbol"==typeof e||$(e)&&v.call(e)==l}var P=j((function(e,t){return null==e?{}:x(e,f(y(t,1),k))}));e.exports=P}).call(this,a("c8ba"))},a726:function(e,t,a){"use strict";a.r(t);var i=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))},n=[],s={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"}},r=s,l=a("2877"),o=Object(l["a"])(r,i,n,!1,null,null,null);t["default"]=o.exports},e610:function(e,t,a){"use strict";a.r(t);var i=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)},n=[],s=a("2b0e"),r=a("9fb0"),l=a("0fea"),o=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=s["default"].ls.get(r["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(","),i=0;i<a.length;i++){var n=Object(l["e"])(a[i]);t.push({uid:o(),name:c(a[i]),status:"done",url:n,response:{status:"history",message:a[i]}})}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(l["e"])(e)}},handlePathChange:function(){var e=this.fileList,t="";e&&0!=e.length||(t="");var a=[];if(this.isMultiple)for(var i=0;i<e.length;i++)a.push(e[i].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,f=a("2877"),p=Object(f["a"])(d,i,n,!1,null,"244aa1d3",null);t["default"]=p.exports}}]);
|