You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
44 KiB
1 lines
44 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6fe287e0"],{"06b3":function(e,t,a){e.exports=a.p+"static/img/2dd7a2d09fa94bf8b5c52e5318868b4df.69c8d31a.jpg"},"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),Math.easeInOutQuad=function(e,t,a,s){return e/=s/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var s=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function i(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function r(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function n(e,t,a){var n=r(),o=e-n,l=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=l;var r=Math.easeInOutQuad(c,n,o,t);i(r),c<t?s(e):a&&"function"===typeof a&&a()};u()}},"0e6d":function(e,t,a){},"12f4":function(e,t,a){e.exports=a.p+"static/img/17e420c250804efe904a09a33796d5a10.29081190.jpg"},"1b90":function(e,t,a){e.exports=a.p+"static/img/20180414165936.d159905f.jpg"},"1dfa":function(e,t,a){},2120:function(e,t,a){e.exports=a.p+"static/img/gaOngJwsRYRaVAuXXcmB.473a3c87.png"},"21a2":function(e,t,a){e.exports=a.p+"static/img/20180414165914.bbc74627.jpg"},"242a":function(e,t,a){e.exports=a.p+"static/img/19034103295190235.32713499.jpg"},"24a9":function(e,t,a){e.exports=a.p+"static/img/cnrhVkzwxjPwAaCfPbdc.1b71a9dc.png"},"24fd":function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-upload",{ref:e.uploadRef,staticClass:"avatar-uploader",class:{limit:e.showUploadBtn},attrs:{accept:e.accept,action:e.action,"auto-upload":e.autoUpload,"before-upload":e.beforeUpload,data:e.fileOtherData,"file-list":e.imgFileList,headers:e.headers,limit:e.limit,multiple:e.multiple,"on-change":e.handleChange,"on-error":e.handleError,"on-exceed":e.handleExceed,"on-remove":e.handleRemove,"show-file-list":e.showFileList,"list-type":"picture-card"}},[e.imageUrl?a("img",{staticClass:"avatar",attrs:{src:e.imageUrl}}):a("i",{staticClass:"el-icon-plus"})]),a("el-dialog",{attrs:{visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("img",{attrs:{src:e.dialogImageUrl,alt:"",width:"100%"}})])],1)},i=[],r=(a("99af"),a("4160"),a("d81d"),a("a434"),a("b0c0"),a("a9e3"),a("b680"),a("159b"),a("96cf"),a("1da1")),n=a("5657"),o=a("c2cf"),l=(a("27ae"),{props:{uploadRef:{type:String,default:"file1"},multiple:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!1},showFileList:{type:Boolean,default:!0},limit:{type:Number,default:null},accept:{type:String,default:"image/jpeg, image/gif, image/png, image/bmp"},acceptSize:{type:Number,default:null},fileOtherData:{type:Object,default:function(){return{bizId:"",bizType:"",isSingle:!1}}}},data:function(){return{imageUrl:"",dialogImageUrl:"",dialogVisible:!1,disabled:!0,imgFileList:[],removeFileAry:[],addFileAry:[],isUploadError:!1,fileLength:0,action:"".concat("https://pos.admin.api.lotus-wallet.com","/attachment/upload")}},computed:{showUploadBtn:function(){return this.showFileList&&this.addFileAry.length+this.imgFileList.length===this.limit},headers:function(){return{token:"Bearer "+n["a"].get("TOKEN",""),tenant:n["a"].get("TENANT","")||"",Authorization:"Basic ".concat("".concat("ceres_admin_web",":").concat("ceres_admin_web"))}}},methods:{init:function(e){var t=e.bizId,a=e.bizType,s=e.imageUrl,i=e.isSingle,r=e.isDetail,n=this;n.fileOtherData.bizId=t,n.fileOtherData.bizType=a,n.fileOtherData.isSingle=i||!1,n.imgFileList.length=0,n.removeFileAry=[],n.addFileAry=[],n.imageUrl=s,n.isUploadError=!1,r&&n.getAttachment()},beforeUpload:function(){var e=this;e.$store.state.hasLoading=!0},handleChange:function(e,t){var a=this;if(e.response)if(e.response.isSuccess){var s=e.response.data;a.fileOtherData.bizId=s.bizId,a.imageUrl=s.url,a.$emit("setId",s.bizId,s.url)}else a.$message.error(e.response.msg),a.isUploadError=!1;else if(a.acceptSize){var i=e.size>a.acceptSize;i?(setTimeout((function(){a.$message.error("只能上传"+a.renderSize(a.acceptSize)+"的文件!已为您过滤文件:"+e.name)}),10),t.forEach((function(a,s){a.uid===e.uid&&t.splice(s,1)}))):(a.isUploadError||a.addFileAry.push(e.name),a.isUploadError=!1)}a.$store.state.hasLoading=!1},renderSize:function(e){if(null==e||""==e)return"0 B";var t=new Array("B","KB","MB","GB","TB","PB","EB","ZB","YB"),a=0,s=parseFloat(e);a=Math.floor(Math.log(s)/Math.log(1024));var i=s/Math.pow(1024,a);return i=i.toFixed(2),t[a]?i+t[a]:"文件太大"},handleError:function(){var e=this;e.$message.error("附件上传失败,请重试"),e.isUploadError=!0,e.$store.state.hasLoading=!1,e.showFileList||(e.imageUrl="")},getAttachment:function(){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function t(){var a,s,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e,t.next=3,o["a"].getAttachment({bizIds:a.fileOtherData.bizId,bizTypes:a.fileOtherData.bizType});case 3:s=t.sent,200===s.status&&0===s.data.code&&s.data.data.length>0&&(i=s.data.data[0].list,i.map((function(e){e.name=e.submittedFileName,a.showFileList||(a.imageUrl=e.url)})),a.imgFileList=i,a.$emit("fileLengthVaild",a.imgFileList.length));case 5:case"end":return t.stop()}}),t)})))()},handleRemove:function(e){var t=this;e.bizId?(t.removeFileAry.push(e.id),t.imgFileList.map((function(a,s){if(a.bizId===e.bizId)return t.imgFileList.splice(s,1),!1}))):t.addFileAry.map((function(a,s){if(a===e.name)return t.addFileAry.splice(s,1),!1}))},handleExceed:function(){var e=this;e.$message("当前最多允许上传"+e.limit+"张图片")},handleBack:function(){var e=this;return{addLength:e.addFileAry.length,removeLength:e.removeFileAry.length}},deleteAttachment:function(){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function t(){var a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e,t.next=3,o["a"].deleteAttachment({ids:a.removeFileAry});case 3:s=t.sent,200===s.status&&0!==s.data.code&&a.$message(s.data.msg);case 5:case"end":return t.stop()}}),t)})))()},submitFile:function(e,t,a){var s=this;if(s.fileOtherData.bizId=e,s.fileOtherData.bizType=t,s.fileOtherData.isSingle=a,!s.showFileList){var i=s.$refs[s.uploadRef].uploadFiles.length-1;s.$refs[s.uploadRef].uploadFiles=[s.$refs[s.uploadRef].uploadFiles[i]],s.imgFileList.map((function(e){s.removeFileAry.push(e.id)})),s.imgFileList.length>0&&s.deleteAttachment()}s.$refs[s.uploadRef].submit(),s.$store.state.hasLoading=!1,s.addFileAry=[]},deleteAttachmentByIds:function(e){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function a(){var s,i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return s=t,a.next=3,o["a"].deleteAttachment({ids:e});case 3:i=a.sent,200===i.status&&(0!==i.data.code?s.$message(i.data.msg):s.removeFileAry=[]);case 5:case"end":return a.stop()}}),a)})))()}}}),c=l,u=(a("9e93"),a("2877")),d=Object(u["a"])(c,s,i,!1,null,"71888a80",null);t["a"]=d.exports},"29df":function(e,t,a){e.exports=a.p+"static/img/20180414165942.f3d935fe.jpg"},"2d64":function(e,t,a){"use strict";var s=a("5530"),i=a("9256"),r={page:{url:"/station/page",method:"POST"},save:{url:"/station",method:"POST"},update:{url:"/station",method:"PUT"},delete:{url:"/station",method:"DELETE"},preview:{method:"POST",url:"/station/preview"},export:{method:"POST",url:"/station/export"},import:{method:"POST",url:"/station/import"}};t["a"]={page:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.page),{},{data:e}))},save:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.save),{},{data:e}))},update:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.update),{},{data:e}))},delete:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.delete),{},{data:e}))},preview:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.preview),{},{data:e}))},export:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.export),{},{responseType:"blob",data:e}))},import:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.import),{},{data:e}))}}},"33dd":function(e,t,a){e.exports=a.p+"static/img/c7c4ee7be3eb4e73a19887dc713505145.57706d61.jpg"},3578:function(e,t,a){e.exports=a.p+"static/img/496b3ace787342f7954b7045b8b06804.6862ad72.jpeg"},"3a3e":function(e,t,a){e.exports=a.p+"static/img/20180414170003.ac0bc33c.jpg"},"3c73":function(e,t,a){e.exports=a.p+"static/img/595ba7b05f2e485eb50565a50cb6cc3c.90fd22fd.jpeg"},"56ad":function(e,t,a){e.exports=a.p+"static/img/a3b10296862e40edb811418d64455d00.61eb0186.jpeg"},"5a1b":function(e,t,a){e.exports=a.p+"static/img/20180414165855.6dee59da.jpg"},"5bad":function(e,t,a){e.exports=a.p+"static/img/20180414165846.a0a77a87.jpg"},"71b5":function(e,t,a){e.exports=a.p+"static/img/ubnKSIfAJTxIgXOKlciN.53c840d8.png"},"734a":function(e,t,a){e.exports=a.p+"static/img/87d8194bc9834e9f8f0228e9e530beb1.cfc91f73.jpeg"},"75ad":function(e,t,a){e.exports=a.p+"static/img/bba284ac05b041a8b8b0d1927868d5c9x.e1b4e64b.jpg"},"7b68":function(e,t,a){e.exports=a.p+"static/img/WhxKECPNujWoWEFNdnJE.4e81901b.png"},"7ba8":function(e,t,a){e.exports=a.p+"static/img/20180414165947.560e443c.jpg"},"7bba":function(e,t,a){e.exports=a.p+"static/img/20180414165754.6fceaa80.jpg"},"7d60":function(e,t,a){e.exports=a.p+"static/img/17e420c250804efe904a09a33796d5a16.7fbeb6cc.jpg"},"810c":function(e,t,a){e.exports=a.p+"static/img/BiazfanxmamNRoxxVxka.fda3837f.png"},"871d":function(e,t,a){e.exports=a.p+"static/img/20180414165821.d0bd77c4.jpg"},"88f2":function(e,t,a){e.exports=a.p+"static/img/ff698bb2d25c4d218b3256b46c706ece.e4ae292b.jpeg"},"8c09":function(e,t,a){e.exports=a.p+"static/img/20180414165840.107d6289.jpg"},"90e2":function(e,t,a){e.exports=a.p+"static/img/964e40b005724165b8cf772355796c8c.bfb030c2.jpeg"},9451:function(e,t,a){"use strict";var s=a("0e6d"),i=a.n(s);i.a},9627:function(e,t,a){e.exports=a.p+"static/img/5997fedcc7bd4cffbd350b40d1b5b9824.dbde56ac.jpg"},"99e7":function(e,t,a){e.exports=a.p+"static/img/8f5b60ef00714a399ee544d331231820.852dafa9.jpeg"},"9e93":function(e,t,a){"use strict";var s=a("1dfa"),i=a.n(s);i.a},"9fb8":function(e,t,a){"use strict";var s=a("5530"),i=a("9256"),r={page:{method:"POST",url:"/user/page"},save:{method:"POST",url:"/user"},update:{method:"PUT",url:"/user"},updateBaseInfo:{method:"PUT",url:"/user/base"},avatar:{method:"PUT",url:"/user/avatar"},delete:{method:"DELETE",url:"/user"},reset:{method:"GET",url:"/user/reset"},updatePassword:{method:"PUT",url:"/user/password"},reload:{method:"POST",url:"/user/reload"},preview:{method:"POST",url:"/user/preview"},export:{method:"POST",url:"/user/export"},import:{method:"POST",url:"/user/import"}};t["a"]={page:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.page),{},{data:e}))},save:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.save),{},{data:e}))},update:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.update),{},{data:e}))},updateBaseInfo:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.updateBaseInfo),{},{data:e}))},updatePassword:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.updatePassword),{},{data:e}))},delete:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.delete),{},{data:e}))},get:function(e){return Object(i["a"])({method:"GET",url:"/user/".concat(e)})},reset:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.reset),{},{data:e}))},avatar:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.avatar),{},{data:e}))},reload:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.reload),{},{formData:!0,data:{userId:e}}))},preview:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.preview),{},{data:e}))},export:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.export),{},{responseType:"blob",data:e}))},import:function(e){return Object(i["a"])(Object(s["a"])(Object(s["a"])({},r.import),{},{data:e}))}}},a0fc:function(e,t,a){var s={"./17e420c250804efe904a09a33796d5a10.jpg":"12f4","./17e420c250804efe904a09a33796d5a16.jpg":"7d60","./19034103295190235.jpg":"242a","./1d22f3e41d284f50b2c8fc32e0788698.jpeg":"bef7","./20180414165754.jpg":"7bba","./20180414165815.jpg":"a69b","./20180414165821.jpg":"871d","./20180414165827.jpg":"c8f3","./20180414165834.jpg":"f04a","./20180414165840.jpg":"8c09","./20180414165846.jpg":"5bad","./20180414165855.jpg":"5a1b","./20180414165909.jpg":"f67c","./20180414165914.jpg":"21a2","./20180414165920.jpg":"a8bc","./20180414165927.jpg":"ab7f","./20180414165936.jpg":"1b90","./20180414165942.jpg":"29df","./20180414165947.jpg":"7ba8","./20180414165955.jpg":"b912","./20180414170003.jpg":"3a3e","./2dd7a2d09fa94bf8b5c52e5318868b4d9.jpg":"d994","./2dd7a2d09fa94bf8b5c52e5318868b4df.jpg":"06b3","./496b3ace787342f7954b7045b8b06804.jpeg":"3578","./595ba7b05f2e485eb50565a50cb6cc3c.jpeg":"3c73","./5997fedcc7bd4cffbd350b40d1b5b9824.jpg":"9627","./5997fedcc7bd4cffbd350b40d1b5b987.jpg":"d1bf","./87d8194bc9834e9f8f0228e9e530beb1.jpeg":"734a","./8f5b60ef00714a399ee544d331231820.jpeg":"99e7","./964e40b005724165b8cf772355796c8c.jpeg":"90e2","./BiazfanxmamNRoxxVxka.png":"810c","./WhxKECPNujWoWEFNdnJE.png":"7b68","./a3b10296862e40edb811418d64455d00.jpeg":"56ad","./a43456282d684e0b9319cf332f8ac468.jpeg":"bc9e","./bba284ac05b041a8b8b0d1927868d5c9x.jpg":"75ad","./c7c4ee7be3eb4e73a19887dc713505145.jpg":"33dd","./cnrhVkzwxjPwAaCfPbdc.png":"24a9","./default.jpg":"fd89","./ff698bb2d25c4d218b3256b46c706ece.jpeg":"88f2","./gaOngJwsRYRaVAuXXcmB.png":"2120","./jZUIxmJycoymBprLOUbT.png":"c57e","./ubnKSIfAJTxIgXOKlciN.png":"71b5"};function i(e){var t=r(e);return a(t)}function r(e){if(!a.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}i.keys=function(){return Object.keys(s)},i.resolve=r,e.exports=i,i.id="a0fc"},a69b:function(e,t,a){e.exports=a.p+"static/img/20180414165815.15139bd3.jpg"},a8bc:function(e,t,a){e.exports=a.p+"static/img/20180414165920.34479a37.jpg"},ab7f:function(e,t,a){e.exports=a.p+"static/img/20180414165927.0072e8f3.jpg"},b728:function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"filter-container"},[a("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.user.account"),clearable:""},model:{value:e.queryParams.model.account,callback:function(t){e.$set(e.queryParams.model,"account",t)},expression:"queryParams.model.account"}}),a("el-select",{staticClass:"filter-item search-item",attrs:{clearable:"",placeholder:e.$t("table.user.nation")},model:{value:e.queryParams.model.nation.key,callback:function(t){e.$set(e.queryParams.model.nation,"key",t)},expression:"queryParams.model.nation.key"}},e._l(e.dicts.NATION,(function(e,t,s){return a("el-option",{key:s,attrs:{label:e,value:t}})})),1),a("treeselect",{staticClass:"filter-item search-item",attrs:{clearable:"","clear-value-text":e.$t("common.clear"),"load-options":e.loadListOptions,multiple:!1,options:e.orgList,searchable:!0,placeholder:"组织"},model:{value:e.queryParams.model.org.key,callback:function(t){e.$set(e.queryParams.model.org,"key",t)},expression:"queryParams.model.org.key"}}),a("el-date-picker",{staticClass:"filter-item search-item date-range-item",attrs:{"range-separator":null,"end-placeholder":"结束日期",format:"yyyy-MM-dd HH:mm:ss","start-placeholder":"开始日期",type:"daterange","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.queryParams.timeRange,callback:function(t){e.$set(e.queryParams,"timeRange",t)},expression:"queryParams.timeRange"}}),a("el-button",{staticClass:"filter-item",attrs:{plain:"",type:"primary"},on:{click:e.search}},[e._v(" "+e._s(e.$t("table.search"))+" ")]),a("el-button",{staticClass:"filter-item",attrs:{plain:"",type:"warning"},on:{click:e.reset}},[e._v(" "+e._s(e.$t("table.reset"))+" ")]),a("el-button",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["user:add"],expression:"['user:add']"}],staticClass:"filter-item",attrs:{plain:"",type:"danger"},on:{click:e.add}},[e._v(" "+e._s(e.$t("table.add"))+" ")]),a("el-dropdown",{directives:[{name:"has-any-permission",rawName:"v-has-any-permission",value:["user:delete","user:rest","user:export","user:import"],expression:"[\n 'user:delete',\n 'user:rest',\n 'user:export',\n 'user:import',\n ]"}],staticClass:"filter-item",attrs:{trigger:"click"}},[a("el-button",[e._v(" "+e._s(e.$t("table.more"))+" "),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["user:delete"],expression:"['user:delete']"}],nativeOn:{click:function(t){return e.batchDelete(t)}}},[e._v(" "+e._s(e.$t("table.delete"))+" ")]),a("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["user:reset"],expression:"['user:reset']"}],nativeOn:{click:function(t){return e.resetPassword(t)}}},[e._v(" "+e._s(e.$t("table.resetPassword"))+" ")]),a("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["user:export"],expression:"['user:export']"}],nativeOn:{click:function(t){return e.exportExcel(t)}}},[e._v(" "+e._s(e.$t("table.export"))+" ")]),a("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["user:export"],expression:"['user:export']"}],nativeOn:{click:function(t){return e.exportExcelPreview(t)}}},[e._v(" "+e._s(e.$t("table.exportPreview"))+" ")]),a("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["user:import"],expression:"['user:import']"}],nativeOn:{click:function(t){return e.importExcel(t)}}},[e._v(" "+e._s(e.$t("table.import"))+" ")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],key:e.tableKey,ref:"table",staticStyle:{width:"100%"},attrs:{data:e.tableData.records,border:"",fit:"","row-key":"id"},on:{"filter-change":e.filterChange,"selection-change":e.onSelectChange,"sort-change":e.sortChange,"cell-click":e.cellClick}},[a("el-table-column",{attrs:{align:"center",type:"selection",width:"40px","reserve-selection":!0}}),a("el-table-column",{attrs:{label:e.$t("table.user.avatar"),align:"center",prop:"avatar",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-avatar",{key:t.row.avatar,attrs:{src:e.myAvatar(t.row.avatar),fit:"fill"}},[a("el-avatar",[e._v(e._s(e._f("userAvatarFilter")(t.row.name)))])],1)]}}])}),a("el-table-column",{attrs:{label:e.$t("table.user.account"),"show-overflow-tooltip":!0,align:"center",prop:"account"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.account))])]}}])}),a("el-table-column",{attrs:{label:e.$t("table.user.name"),"show-overflow-tooltip":!0,align:"center",prop:"name"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.name))])]}}])}),a("el-table-column",{attrs:{"filter-multiple":!1,filters:e.sexList,"column-key":"sex.code",label:e.$t("table.user.sex"),"class-name":"status-col",prop:"sex.desc",width:"70px"},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.row;return[a("el-tag",{attrs:{type:e._f("sexFilter")(s.sex?s.sex["code"]:"")}},[e._v(e._s(s.sex?s.sex.desc:""))])]}}])}),a("el-table-column",{attrs:{label:e.$t("table.user.email"),"show-overflow-tooltip":!0,align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.email))])]}}])}),a("el-table-column",{attrs:{label:e.$t("table.user.nation"),"show-overflow-tooltip":!0,align:"center",width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.nation["data"]?t.row.nation["data"]:t.row.nation["key"]))])]}}])}),a("el-table-column",{attrs:{"filter-multiple":!1,filters:e.educationList,"column-key":"education.key",label:e.$t("table.user.education"),"show-overflow-tooltip":!0,align:"center",width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.education["data"]?t.row.education["data"]:t.row.education["key"]))])]}}])}),a("el-table-column",{attrs:{"filter-multiple":!1,filters:e.positionStatusList,"column-key":"positionStatus.key",label:e.$t("table.user.positionStatus"),"show-overflow-tooltip":!0,align:"center",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.positionStatus["data"]?t.row.positionStatus["data"]:t.row.positionStatus["key"]))])]}}])}),a("el-table-column",{attrs:{label:e.$t("table.user.orgId"),align:"center","show-overflow-tooltip":!0,width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.org["data"]?t.row.org.data.label:t.row.org.key))])]}}])}),a("el-table-column",{attrs:{label:e.$t("table.user.stationId"),align:"center","show-overflow-tooltip":!0,width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.station["data"]?t.row.station.data:t.row.station.key))])]}}])}),a("el-table-column",{attrs:{"filter-multiple":!1,"column-key":"status",filters:[{text:e.$t("common.status.valid"),value:!0},{text:e.$t("common.status.invalid"),value:!1}],label:e.$t("table.user.status"),"class-name":"status-col",width:"70px"},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.row;return[a("el-tag",{attrs:{type:e._f("statusFilter")(s.status)}},[e._v(e._s(s.status?e.$t("common.status.valid"):e.$t("common.status.invalid"))+" ")])]}}])}),a("el-table-column",{attrs:{label:e.$t("table.user.createTime"),align:"center",prop:"createTime",sortable:"custom",width:"170px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.createTime))])]}}])}),a("el-table-column",{attrs:{label:e.$t("table.operation"),align:"center","column-key":"operation","class-name":"small-padding fixed-width",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.row;return[a("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["user:view"],expression:"['user:view']"}],staticClass:"el-icon-view table-operation",staticStyle:{color:"#87d068"},on:{click:function(t){return e.view(s)}}}),a("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["user:update"],expression:"['user:update']"}],staticClass:"el-icon-edit table-operation",staticStyle:{color:"#2db7f5"},on:{click:function(t){return e.edit(s)}}}),a("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["user:delete"],expression:"['user:delete']"}],staticClass:"el-icon-delete table-operation",staticStyle:{color:"#f50"},on:{click:function(t){return e.singleDelete(s)}}}),a("el-link",{directives:[{name:"has-no-permission",rawName:"v-has-no-permission",value:["user:view","user:update","user:delete"],expression:"['user:view', 'user:update', 'user:delete']"}],staticClass:"no-perm"},[e._v(e._s(e.$t("tips.noPermission"))+" ")])]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.tableData.total>0,expression:"tableData.total > 0"}],attrs:{limit:e.queryParams.size,page:e.queryParams.current,total:Number(e.tableData.total)},on:{"update:limit":function(t){return e.$set(e.queryParams,"size",t)},"update:page":function(t){return e.$set(e.queryParams,"current",t)},pagination:e.fetch}}),a("user-edit",{ref:"edit",attrs:{"dialog-visible":e.dialog.isVisible,type:e.dialog.type},on:{close:e.editClose,success:e.editSuccess}}),a("user-view",{ref:"view",attrs:{"dialog-visible":e.userViewVisible},on:{close:e.viewClose}}),a("file-import",{ref:"import",attrs:{"dialog-visible":e.fileImport.isVisible,type:e.fileImport.type,"export-error-url":e.fileImport.exportErrorUrl,action:e.fileImport.action,accept:".xls,.xlsx"},on:{close:e.importClose,success:e.importSuccess}}),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{"close-on-click-modal":!1,"close-on-press-escape":!0,title:"预览",width:"80%",top:"50px",visible:e.preview.isVisible},on:{"update:visible":function(t){return e.$set(e.preview,"isVisible",t)}}},[a("el-scrollbar",[a("div",{domProps:{innerHTML:e._s(e.preview.context)}})])],1)],1)},i=[],r=(a("4160"),a("caad"),a("d81d"),a("d3b7"),a("ac1f"),a("2532"),a("841c"),a("1276"),a("2ca0"),a("159b"),a("5530")),n=a("333d"),o=a("ca17"),l=a.n(o),c=(a("542c"),a("a888")),u=a("6188"),d=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{"close-on-click-modal":!1,"close-on-press-escape":!0,title:e.title,type:e.type,visible:e.isVisible,width:e.width,top:"50px"},on:{"update:visible":function(t){e.isVisible=t}}},[a("el-form",{ref:"form",attrs:{model:e.user,rules:e.rules,"label-position":"right","label-width":"100px"}},[a("el-form-item",{attrs:{label:e.$t("table.user.account"),prop:"account"}},[a("el-input",{attrs:{readonly:"add"!==e.type&&"readonly"},model:{value:e.user.account,callback:function(t){e.$set(e.user,"account",t)},expression:"user.account"}})],1),a("el-form-item",{attrs:{label:e.$t("table.user.name"),prop:"name"}},[a("el-input",{model:{value:e.user.name,callback:function(t){e.$set(e.user,"name",t)},expression:"user.name"}})],1),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:"add"===e.type,expression:"type === 'add'"}],attrs:{label:e.$t("table.user.password"),prop:"password"}},[a("el-tooltip",{staticClass:"item",attrs:{content:e.$t("tips.defaultPassword"),effect:"dark",placement:"top-start"}},[a("el-input",{attrs:{type:"password",value:"123456"}})],1)],1),a("el-form-item",{attrs:{label:e.$t("table.user.avatar"),prop:"avatar"}},[a("imgUpload",{ref:"imgFileRef",attrs:{accept:e.accept,"accept-size":2097152,"auto-upload":!0,data:e.user.avatar,"file-list":e.imgFileList,"show-file-list":!1,"list-type":"picture-card"},on:{setId:e.setIdAndSubmit}},[a("i",{staticClass:"el-icon-plus"})])],1),a("el-form-item",{attrs:{label:e.$t("table.user.orgId"),prop:"orgId"}},[a("treeselect",{staticStyle:{width:"100%"},attrs:{"clear-value-text":e.$t("common.clear"),"load-options":e.loadListOptions,multiple:!1,options:e.orgList,searchable:!0,placeholder:" "},model:{value:e.user.org.key,callback:function(t){e.$set(e.user.org,"key",t)},expression:"user.org.key"}})],1),a("el-form-item",{attrs:{label:e.$t("table.user.stationId"),prop:"stationId"}},[a("el-select",{attrs:{loading:e.remoteStationLoading,multiple:!1,filterable:"",placeholder:"请输入关键词"},model:{value:e.user.station.key,callback:function(t){e.$set(e.user.station,"key",t)},expression:"user.station.key"}},e._l(e.stationList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),a("el-form-item",{attrs:{label:e.$t("table.user.email"),prop:"email"}},[a("el-input",{model:{value:e.user.email,callback:function(t){e.$set(e.user,"email",t)},expression:"user.email"}})],1),a("el-form-item",{attrs:{label:e.$t("table.user.mobile"),prop:"mobile"}},[a("el-input",{model:{value:e.user.mobile,callback:function(t){e.$set(e.user,"mobile",t)},expression:"user.mobile"}})],1),a("el-form-item",{attrs:{label:e.$t("table.user.sex"),prop:"sex"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"",value:""},model:{value:e.user.sex.code,callback:function(t){e.$set(e.user.sex,"code",t)},expression:"user.sex.code"}},e._l(e.enums.Sex,(function(e,t,s){return a("el-option",{key:s,attrs:{label:e,value:t}})})),1)],1),a("el-form-item",{attrs:{label:e.$t("table.user.nation"),prop:"nation"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("table.user.nation"),value:""},model:{value:e.user.nation.key,callback:function(t){e.$set(e.user.nation,"key",t)},expression:"user.nation.key"}},e._l(e.dicts.NATION,(function(e,t,s){return a("el-option",{key:s,attrs:{label:e,value:t}})})),1)],1),a("el-form-item",{attrs:{label:e.$t("table.user.education"),prop:"education"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("table.user.education"),value:""},model:{value:e.user.education.key,callback:function(t){e.$set(e.user.education,"key",t)},expression:"user.education.key"}},e._l(e.dicts.EDUCATION,(function(e,t,s){return a("el-option",{key:s,attrs:{label:e,value:t}})})),1)],1),a("el-form-item",{attrs:{label:e.$t("table.user.positionStatus"),prop:"positionStatus"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("table.user.positionStatus"),value:""},model:{value:e.user.positionStatus.key,callback:function(t){e.$set(e.user.positionStatus,"key",t)},expression:"user.positionStatus.key"}},e._l(e.dicts.POSITION_STATUS,(function(e,t,s){return a("el-option",{key:s,attrs:{label:e,value:t}})})),1)],1),a("el-form-item",{attrs:{label:e.$t("table.user.status"),prop:"status"}},[a("el-radio-group",{model:{value:e.user.status,callback:function(t){e.$set(e.user,"status",t)},expression:"user.status"}},[a("el-radio",{attrs:{label:!0}},[e._v(e._s(e.$t("common.status.valid")))]),a("el-radio",{attrs:{label:!1}},[e._v(e._s(e.$t("common.status.invalid")))])],1)],1),a("el-form-item",{attrs:{label:e.$t("table.user.workDescribe"),prop:"workDescribe"}},[a("el-input",{model:{value:e.user.workDescribe,callback:function(t){e.$set(e.user,"workDescribe",t)},expression:"user.workDescribe"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{plain:"",type:"warning"},on:{click:function(t){e.isVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),a("el-button",{attrs:{plain:"",type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("common.confirm")))])],1)],1)},p=[],m=a("b170"),f=a("24fd"),b=a("9fb8"),h=a("2d64"),g={name:"UserEdit",components:{Treeselect:l.a,imgUpload:f["a"]},props:{dialogVisible:{type:Boolean,default:!1},type:{type:String,default:"add"}},data:function(){var e=this;return{accept:"image/jpeg, image/gif, image/png",remoteStationLoading:!1,user:this.initUser(),screenWidth:0,width:this.initWidth(),orgList:[],stationList:[],imgFileList:[],imgFileData:{bizId:"",bizType:"USER_AVATAR"},imgFileTotal:0,successNum:0,enums:{Sex:{}},dicts:{NATION:{},POSITION_STATUS:{},EDUCATION:{}},rules:{account:[{required:!0,message:this.$t("rules.require"),trigger:"blur"},{min:1,max:255,message:this.$t("rules.range4to10"),trigger:"blur"},{validator:function(t,a,s){e.user.id,s()},trigger:"blur"}],email:{type:"email",message:this.$t("rules.email"),trigger:"blur"},mobile:{validator:function(t,a,s){""===a||Object(m["d"])(a)?s():s(e.$t("rules.mobile"))},trigger:"blur"},sex:{required:!0,message:this.$t("rules.require"),trigger:"change"},status:{required:!0,message:this.$t("rules.require"),trigger:"blur"}}}},computed:{isVisible:{get:function(){return this.dialogVisible},set:function(){this.close(),this.reset()}},title:function(){return"add"===this.type?this.$t("common.add"):this.$t("common.edit")}},watch:{"user.org.key":"orgSelect"},mounted:function(){var e=this;window.onresize=function(){return function(){e.width=e.initWidth()}()}},methods:{myAvatar:function(e){return e?e.startsWith("http://")||e.startsWith("https://")?e:a("a0fc")("./".concat(e)):a("fd89")},initUser:function(){return{id:"",account:"",name:"",org:{key:null},station:{key:null},email:"",mobile:"",sex:{code:"N"},nation:{key:""},education:{key:""},positionStatus:{key:""},status:!0,avatar:"",workDescribe:"",password:"123456"}},initWidth:function(){return this.screenWidth=document.body.clientWidth,this.screenWidth<991?"90%":this.screenWidth<1400?"45%":"800px"},loadListOptions:function(e){var t=e.callback;t()},orgSelect:function(e){this.loadStation(e)},loadStation:function(e){var t=this;this.user.station.key=null,e?h["a"].page({size:1e4,model:{orgId:{key:e},status:!0}}).then((function(e){var a=e.data;t.stationList=a.data.records})):this.stationList=[]},setIdAndSubmit:function(e,t){var a=this;a.successNum+=1,a.imgFileData.bizId=e,a.user.avatar=t,a.user.id=e,a.successNum===a.imgFileTotal&&(a.$store.state.hasLoading=!1)},setUser:function(e,t,a,s){var i=this;e&&(i.user=Object(r["a"])({},e)),i.dicts=a,i.enums=s,i.orgList=t,i.imgFileData.bizId=i.user["id"],i.$nextTick((function(){i.$refs.imgFileRef.init({bizId:i.user["id"],bizType:i.imgFileData.bizType,imageUrl:i.myAvatar(i.user["avatar"]),isSingle:!0,isDetail:!1})}))},close:function(){this.$emit("close")},reset:function(){this.$refs.form.clearValidate(),this.$refs.form.resetFields(),this.user=this.initUser(),this.imgFileData.bizId="",this.$refs.imgFileRef.init({bizId:"",bizType:"",imageUrl:"",isSingle:!0,isDetail:!1})},submitForm:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;e.editSubmit()}))},editSubmit:function(){var e=this;"add"===e.type?e.save():e.update()},save:function(){var e=this;b["a"].save(this.user).then((function(t){var a=t.data;a.isSuccess&&(e.isVisible=!1,e.$message({message:e.$t("tips.createSuccess"),type:"success"}),e.$emit("success"))}))},update:function(){var e=this;b["a"].update(this.user).then((function(t){var a=t.data;a.isSuccess&&(e.isVisible=!1,e.$message({message:e.$t("tips.updateSuccess"),type:"success"}),e.$emit("success"))}))}}},v=g,w=a("2877"),y=Object(w["a"])(v,d,p,!1,null,"3590c23a",null),x=y.exports,$=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{staticClass:"user-view",attrs:{title:e.$t("common.view"),visible:e.isVisible,width:e.width},on:{"update:visible":function(t){e.isVisible=t}}},[a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{sm:24,xs:24}},[a("div",{staticClass:"img-wrapper"},[a("el-avatar",{key:e.user.avatar,attrs:{src:e.user.avatar,fit:"fill"}},[a("el-avatar",[e._v(e._s(e._f("userAvatarFilter")(e.user.name)))])],1)],1)])],1),a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-user"}),a("span",[e._v(e._s(e.$t("table.user.account")+":"))]),e._v(" "+e._s(e.user.account)+" ")])]),a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-suitcase"}),a("span",[e._v(e._s(e.$t("table.user.name")+":"))]),e._v(" "+e._s(e.user.name)+" ")])])],1),a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-user"}),a("span",[e._v(e._s(e.$t("table.user.email")+":"))]),e._v(" "+e._s(e.user.email)+" ")])]),a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-suitcase"}),a("span",[e._v(e._s(e.$t("table.user.mobile")+":"))]),e._v(" "+e._s(e.user.mobile)+" ")])])],1),a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-trophy"}),a("span",[e._v(e._s(e.$t("table.user.orgId")+":"))]),e._v(" "+e._s(e.user.orgId)+" ")])]),a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-phone-outline"}),a("span",[e._v(e._s(e.$t("table.user.stationId")+":"))]),e._v(" "+e._s(e.user.stationId)+" ")])])],1),a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-star-off"}),a("span",[e._v(e._s(e.$t("table.user.sex")+":"))]),e._v(" "+e._s(e.user.sex.desc)+" ")])]),a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-bangzhu"}),a("span",[e._v(e._s(e.$t("table.user.status")+":"))]),e._v(" "+e._s(e.user.status?e.$t("common.status.valid"):e.$t("common.status.invalid"))+" ")])])],1),a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-time"}),a("span",[e._v(e._s(e.$t("table.user.createTime")+":"))]),e._v(" "+e._s(e.user.createTime)+" ")])]),a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-brush"}),a("span",[e._v(e._s(e.$t("table.user.updateTime")+":"))]),e._v(" "+e._s(e.user.updateTime)+" ")])])],1),a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-date"}),a("span",[e._v(e._s(e.$t("table.user.lastLoginTime")+":"))]),e._v(" "+e._s(e.user.lastLoginTime?e.user.lastLoginTime:e.$t("tips.neverLogin"))+" ")])]),a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-date"}),a("span",[e._v(e._s(e.$t("table.user.passwordExpireTime")+":"))]),e._v(" "+e._s(e.user.passwordExpireTime)+" ")])])],1),a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-date"}),a("span",[e._v(e._s(e.$t("table.user.passwordErrorLastTime")+":"))]),e._v(" "+e._s(e.user.passwordErrorLastTime)+" ")])]),a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-date"}),a("span",[e._v(e._s(e.$t("table.user.passwordErrorNum")+":"))]),e._v(" "+e._s(e.user.passwordErrorNum)+" ")])])],1),a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{sm:24,xs:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-document"}),a("span",[e._v(e._s(e.$t("table.user.workDescribe")+":"))]),e._v(" "+e._s(e.user.workDescribe?e.user.workDescribe:e.$t("tips.nothing"))+" ")])])],1)],1)},_=[],j={name:"UserView",filters:{userAvatarFilter:function(e){return e?e.charAt(0):"无"}},props:{dialogVisible:{type:Boolean,default:!1}},data:function(){return{screenWidth:0,width:this.initWidth(),user:{sex:{desc:""}}}},computed:{isVisible:{get:function(){return this.dialogVisible},set:function(){this.close()}}},mounted:function(){var e=this;window.onresize=function(){return function(){e.width=e.initWidth()}()}},methods:{initWidth:function(){return this.screenWidth=document.body.clientWidth,this.screenWidth<550?"95%":this.screenWidth<990?"580px":this.screenWidth<1400?"600px":"650px"},setUser:function(e){this.user=Object(r["a"])({},e)},close:function(){this.$emit("close")}}},O=j,k=(a("9451"),Object(w["a"])(O,$,_,!1,null,"777a74d8",null)),S=k.exports,T=a("c38b"),P=a("fa7d"),C=a("1771"),I={name:"UserManage",directives:{elDragDialog:c["a"]},components:{Pagination:n["a"],UserEdit:x,UserView:S,Treeselect:l.a,FileImport:u["a"]},filters:{userAvatarFilter:function(e){return e.charAt(0)},sexFilter:function(e){var t={W:"success",M:"danger",N:"info"};return t[e]||"info"},statusFilter:function(e){var t={false:"danger",true:"success"};return t[e]||"success"}},data:function(){return{orgList:[],dialog:{isVisible:!1,type:"add"},preview:{isVisible:!1,context:""},fileImport:{isVisible:!1,type:"import",action:"".concat("https://pos.admin.api.lotus-wallet.com","/user/import"),exportErrorUrl:"".concat("https://pos.admin.api.lotus-wallet.com","/user/exportError")},userViewVisible:!1,tableKey:0,queryParams:Object(C["e"])({model:{nation:{key:""},education:{key:""},positionStatus:{key:""},org:{key:null},station:{key:null},sex:{code:""}}}),selection:[],loading:!1,tableData:{total:0},enums:{Sex:{}},dicts:{NATION:{},POSITION_STATUS:{},EDUCATION:{}}}},computed:{currentUser:function(){return this.$store.state.account.user},sexList:function(){return Object(P["a"])(this.enums.Sex)},nationList:function(){return Object(P["a"])(this.dicts.NATION)},educationList:function(){return Object(P["a"])(this.dicts.EDUCATION)},positionStatusList:function(){return Object(P["a"])(this.dicts.POSITION_STATUS)}},watch:{$route:function(){"/user/user"===this.$route.path&&this.initOrg()}},mounted:function(){Object(C["c"])("Sex",this.enums),Object(C["b"])(["NATION","POSITION_STATUS","EDUCATION"],this.dicts),this.fetch(),this.initOrg()},methods:{initOrg:function(){var e=this;T["a"].allTree({status:!0}).then((function(t){var a=t.data;e.orgList=a.data}))},myAvatar:function(e){return e?e.startsWith("http://")||e.startsWith("https://")?e:a("a0fc")("./".concat(e)):a("fd89")},viewClose:function(){this.userViewVisible=!1},editClose:function(){this.dialog.isVisible=!1},editSuccess:function(){this.search()},onSelectChange:function(e){this.selection=e},loadListOptions:function(e){var t=e.callback;t()},search:function(){this.fetch(Object(r["a"])({},this.queryParams))},reset:function(){this.queryParams=Object(C["e"])({model:{nation:{key:""},education:{key:""},positionStatus:{key:""},org:{key:null},station:{key:null},sex:{code:""}}}),this.$refs.table.clearSort(),this.$refs.table.clearFilter(),this.search()},exportExcelPreview:function(){var e=this;this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.map.fileName="导出用户数据",b["a"].preview(this.queryParams).then((function(t){var a=t.data;e.preview.isVisible=!0,e.preview.context=a.data}))},exportExcel:function(){this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.map.fileName="导出用户数据",b["a"].export(this.queryParams).then((function(e){Object(C["a"])(e)}))},importExcel:function(){this.fileImport.type="upload",this.fileImport.isVisible=!0,this.$refs.import.setModel(!1)},importSuccess:function(){this.search()},importClose:function(){this.fileImport.isVisible=!1},resetPassword:function(){var e=this;this.selection.length?this.$confirm(this.$t("tips.confirmRestPassword"),this.$t("common.tips"),{confirmButtonText:this.$t("common.confirm"),cancelButtonText:this.$t("common.cancel"),type:"warning"}).then((function(){var t=[];e.selection.forEach((function(e){t.push(e.id)})),b["a"].reset({ids:t}).then((function(t){var a=t.data;a.isSuccess&&e.$message({message:e.$t("tips.resetPasswordSuccess"),type:"success"}),e.clearSelections()}))})).catch((function(){e.clearSelections()})):this.$message({message:this.$t("tips.noDataSelected"),type:"warning"})},singleDelete:function(e){this.$refs.table.clearSelection(),this.$refs.table.toggleRowSelection(e,!0),this.batchDelete()},batchDelete:function(){var e=this;if(this.selection.length){var t=!1;this.$confirm(this.$t("tips.confirmDelete"),this.$t("common.tips"),{confirmButtonText:this.$t("common.confirm"),cancelButtonText:this.$t("common.cancel"),type:"warning"}).then((function(){var a=[];e.selection.forEach((function(s){s.id!==e.currentUser.id?a.push(s.id):t=!0})),t?(e.$message({message:e.$t("tips.containCurrentUser"),type:"warning"}),e.clearSelections()):e.delete(a)})).catch((function(){e.clearSelections()}))}else this.$message({message:this.$t("tips.noDataSelected"),type:"warning"})},clearSelections:function(){this.$refs.table.clearSelection()},delete:function(e){var t=this;b["a"].delete({ids:e}).then((function(e){var a=e.data;a.isSuccess&&t.$message({message:t.$t("tips.deleteSuccess"),type:"success"}),t.search()}))},add:function(){this.dialog.type="add",this.dialog.isVisible=!0,this.$refs.edit.setUser(!1,this.orgList,this.dicts,this.enums)},view:function(e){this.$refs.view.setUser(e,this.orgList,this.dicts,this.enums),this.userViewVisible=!0},edit:function(e){this.$refs.edit.setUser(e,this.orgList,this.dicts,this.enums),this.dialog.type="edit",this.dialog.isVisible=!0},fetch:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.loading=!0,this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.current=t.current?t.current:this.queryParams.current,this.queryParams.size=t.size?t.size:this.queryParams.size,b["a"].page(this.queryParams).then((function(t){var a=t.data;a.isSuccess&&(e.tableData=a.data)})).finally((function(){return e.loading=!1}))},sortChange:function(e){this.queryParams.sort=e.prop,this.queryParams.order=e.order,this.queryParams.sort&&this.search()},filterChange:function(e){for(var t in e)if(t.includes(".")){var a={};a[t.split(".")[1]]=e[t][0],this.queryParams.model[t.split(".")[0]]=a}else this.queryParams.model[t]=e[t][0];this.search()},cellClick:function(e,t){var a=this;if("operation"!==t["columnKey"]){var s=!1;this.selection.forEach((function(t){t.id===e.id&&(s=!0,a.$refs.table.toggleRowSelection(e))})),s||this.$refs.table.toggleRowSelection(e,!0)}}}},F=I,A=Object(w["a"])(F,s,i,!1,null,"d8721aba",null);t["default"]=A.exports},b912:function(e,t,a){e.exports=a.p+"static/img/20180414165955.b0f83efe.jpg"},bc9e:function(e,t,a){e.exports=a.p+"static/img/a43456282d684e0b9319cf332f8ac468.3f09d564.jpeg"},bef7:function(e,t,a){e.exports=a.p+"static/img/1d22f3e41d284f50b2c8fc32e0788698.e7137955.jpeg"},c57e:function(e,t,a){e.exports=a.p+"static/img/jZUIxmJycoymBprLOUbT.426a2ffe.png"},c8f3:function(e,t,a){e.exports=a.p+"static/img/20180414165827.5ff2d871.jpg"},d1bf:function(e,t,a){e.exports=a.p+"static/img/5997fedcc7bd4cffbd350b40d1b5b987.5b5e21eb.jpg"},d994:function(e,t,a){e.exports=a.p+"static/img/2dd7a2d09fa94bf8b5c52e5318868b4d9.eb7eb7a2.jpg"},f04a:function(e,t,a){e.exports=a.p+"static/img/20180414165834.2008e566.jpg"},f67c:function(e,t,a){e.exports=a.p+"static/img/20180414165909.8eee3edf.jpg"}}]); |