(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fd3f6a64"],{1481:function(e,t,a){},"173b":function(e,t,a){"use strict";a("1481")},"4bed":function(e,t,a){},7683:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c;return t("a-form-model",{ref:"ruleForm",attrs:{model:e.form,rules:e.rules,labelCol:{span:7},wrapperCol:{span:14}}},[t("a-form-model-item",{attrs:{label:"登录密码",prop:"password"}},[t("a-input-password",{attrs:{placeholder:"请输入登录密码"},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1)],1)},i=[],o=a("5530"),r=(a("d3b7"),a("b7a6")),s={props:["modelData"],computed:{},data:function(){return{form:{password:""},rules:{password:[{required:!0,message:"请输入账号密码",trigger:"change"}]}}},created:function(){this.form.id=this.modelData.id},methods:{onSubmit:function(){var e=this;return new Promise((function(t,a){e.$refs.ruleForm.validate((function(n){if(!n)return a(),!1;Object(r["u"])(Object(o["a"])({},e.form)).then((function(a){a.msg;e.$notification.success({message:"成功",description:"修改成功!"}),t()})).catch((function(t){e.$notification.error({message:"失败",description:t.msg}),a()}))}))}))}}},c=s,l=(a("173b"),a("2877")),d=Object(l["a"])(c,n,i,!1,null,"50e28346",null);t["default"]=d.exports},ad66:function(e,t,a){"use strict";a.r(t);a("99af");var n=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{border:!1}},[t("div",{staticClass:"project-content"},[t("div",{staticClass:"menu"},[t("h2",[t("a-icon",{attrs:{type:"file-text"}}),e._v("部门列表")],1),e.projectList.length>0?[e.visibleTree?t("a-tree",{attrs:{defaultExpandAll:!0,defaultExpandParent:!0,"tree-data":e.projectList,replaceFields:{children:"children",title:"deptName",key:"deptId",value:"deptId"}},on:{select:e.selectTree},scopedSlots:e._u([{key:"title",fn:function(t){var a=t.deptName;t.deptId;return[[e._v(e._s(a))]]}}],null,!1,2141744056)}):e._e()]:e._e()],2),t("div",{staticClass:"right"},[t("div",{staticClass:"table-operator"},[t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:function(t){return e.handleShowModel("account",!1)}}},[e._v(" 新增用户 ")]),t("a-button",{staticStyle:{"margin-left":"8px"},on:{click:e.handleReset}},[e._v("重置")])],1),t("a-table",{attrs:{columns:e.columns,"row-key":"userId","data-source":e.tableData,loading:e.tableLoading,pagination:!1,scroll:{x:"max-content"}},scopedSlots:e._u([{key:"userId",fn:function(a,n,i){return[t("span",[e._v(e._s(parseInt(i)+1))])]}},{key:"operation",fn:function(a,n){return[t("a",{staticStyle:{color:"#1890ff"},on:{click:function(t){return e.handleShowModel("account",!0,n)}}},[e._v("编辑")]),t("a-divider",{attrs:{type:"vertical"}}),t("a",{staticStyle:{color:"#1890ff"},on:{click:function(t){return e.handleShowModel("password",!0,n)}}},[e._v("重置密码")]),t("a-divider",{attrs:{type:"vertical"}}),t("a",{staticStyle:{color:"#ff4949"},on:{click:function(t){return e.handleDelAccount(n.userId,n.userName)}}},[e._v("删除")])]}}])}),t("div",{staticStyle:{"text-align":"right","margin-top":"24px"}},[t("a-pagination",{attrs:{total:e.total,"show-size-changer":"","show-quick-jumper":"","show-total":function(t){return"共".concat(t,"条记录  第 ").concat(e.pageNum,"页")}},on:{change:e.handleCurrentChange,showSizeChange:e.onPageShowSizeChange},model:{value:e.pageNum,callback:function(t){e.pageNum=t},expression:"pageNum"}})],1)],1)]),t("a-modal",{attrs:{title:e.modelTitle,width:"40%",destroyOnClose:!0,maskClosable:!1,visible:e.modelVisible,"confirm-loading":e.modelConfirmLoading},on:{ok:e.handleModelOk,cancel:function(t){e.modelVisible=!1}}},["account"==e.modelType?t("account-form",{ref:"accountForm",attrs:{modelData:e.modelData}}):e._e(),"password"==e.modelType?t("password-form",{ref:"accountForm",attrs:{modelData:e.modelData}}):e._e(),t("div",{attrs:{slot:"footer"},slot:"footer"},[t("a-button",{on:{click:function(t){e.modelVisible=!1}}},[e._v("取消")]),t("a-button",{attrs:{type:"primary"},on:{click:e.handleModelOk}},[e._v("保存")])],1)],1)],1)},i=[],o=(a("d3b7"),a("8ded")),r=a.n(o),s=a("b018"),c=a("c37c"),l=a("7683"),d=a("b7a6"),u=[{title:"序号",dataIndex:"userId",align:"center",width:70,ellipsis:!0,scopedSlots:{customRender:"userId"}},{title:"登录账号",dataIndex:"userName",align:"center",ellipsis:!0},{title:"用户昵称",dataIndex:"nickName",align:"center",ellipsis:!0},{title:"部门",dataIndex:"dept.deptName",align:"center",ellipsis:!0},{title:"手机号",dataIndex:"phonenumber",align:"center",ellipsis:!0},{title:"创建时间",dataIndex:"createTime",align:"center",ellipsis:!0},{title:"操作",dataIndex:"operation",align:"center",fixed:"right",scopedSlots:{customRender:"operation"},width:180}],m={name:"AccountNumber",mixins:[s["a"]],components:{accountForm:c["default"],passwordForm:l["default"]},data:function(){return{columns:u,visibleTree:!0,queryUrl:"/api/system/user/list",modelType:"account ",modelTitle:"新增用户",modelData:{},modelVisible:!1,modelConfirmLoading:!1,queryParams:{},otherParams:{method:"get"},projectList:[],userId:null,searchValue:"",autoExpandParent:!0}},created:function(){this.getDept()},methods:{selectTree:function(e,t){this.queryParams.deptId=e.concat(t.halfCheckedKeys)[0],this.loadData()},getDept:function(){var e=this;Object(d["o"])({id:1}).then((function(t){200===t.code&&(e.projectList=e.listToTree(t.data,0,"deptId"))}))},handleReset:function(){var e=this;this.queryParams.pageNum=1,this.queryParams.pageSize=10,this.queryParams.deptId="",this.visibleTree=!1,setTimeout((function(){e.visibleTree=!0}),10),this.loadData()},moduleHref:function(e){this.$router.push({path:e})},handleDelAccount:function(e,t){var a=this;this.$confirm({title:"确认提示",content:"您确定要删除".concat(e?t:"所选账号","吗"),okType:"danger",onOk:function(){return new Promise((function(){Object(d["f"])({userId:e}).then((function(e){a.$notification.success({message:"成功",description:"删除成功"}),a.loadData()})).cache((function(e){a.$notification.error({message:"失败",description:e.msg})}))})).catch((function(){}))}})},handleModelOk:function(){var e=this;this.modelConfirmLoading=!0,this.$refs.accountForm.onSubmit().then((function(t){e.loadData(),e.modelVisible=!1,r.a.remove("content")})).catch((function(e){})).finally((function(){e.modelConfirmLoading=!1}))},handleShowModel:function(e,t,a){var n={modelType:e,modelVisible:!0,modelTitle:"新增用户",modelData:{}};"account"==e&&t&&(n.modelData=Object.assign({},a),n.modelTitle="修改用户"),"bmd"==e&&t&&(n.modelData=Object.assign({},a),n.modelTitle="设置白名单"),"password"==e&&t&&(n.modelData=Object.assign({},a),n.modelTitle="重置密码"),Object.assign(this,n)}}},h=m,f=(a("e2eb"),a("2877")),p=Object(f["a"])(h,n,i,!1,null,"2bc9b063",null);t["default"]=p.exports},b018:function(e,t,a){"use strict";var n=a("5530"),i=(a("99af"),a("a15b"),a("d3b7"),a("ac1f"),a("5319"),a("c1df")),o=a.n(i),r={data:function(){return{advanced:!1,exportLoading:!1,selectedRowKeys:[],pageNum:1,pageSize:10,total:0,tableData:[],tableLoading:!1,queryParams:{},otherParams:{}}},mounted:function(){this.isCancelHttp||this.loadData()},methods:{handleSubmit:function(e){e&&e.preventDefault();var t=this.queryParams,a={};for(var n in t)(t[n]||0===t[n])&&("rangeTime"===n?(a.beginTime=o()(t[n][0]).format("YYYY-MM-DD"),a.endTime=o()(t[n][1]).format("YYYY-MM-DD")):"f3"===n?a.startTime=o()(t[n]).format("YYYY-MM-DD"):a[n]=t[n]);this.queryParams=a,1!==this.pageNum&&(this.pageNum=1),this.loadData()},handleReset:function(){"{}"!==JSON.stringify(this.queryParams)&&(this.queryParams={},this.handleSubmit())},toggleAdvanced:function(){this.advanced=!this.advanced},setUrlQuery:function(e){var t=e.query,a="";if(t){var n=[];for(var i in t)t.hasOwnProperty(i)&&n.push("".concat(i,"=").concat(t[i]));a=-1!==a.indexOf("?")?"".concat(a,"&").concat(n.join("&")):"".concat(a,"?").concat(n.join("&"))}return a},loadData:function(){var e=this;if(this.queryUrl||this.otherParams.queryUrl){var t=Object.assign({pageNum:this.pageNum,pageSize:this.pageSize},this.queryParams,this.otherParams);this.tableLoading=!0;var a=this.otherParams.method||"POST",i="";"get"==a&&(i=this.setUrlQuery({query:Object(n["a"])(Object(n["a"])({},this.queryParams),{},{pageNum:this.pageNum,pageSize:this.pageSize})}),i=i.replace(/undefined/g,"")),this.$http({url:this.otherParams.queryUrl||this.queryUrl+i,method:a,data:"POST"==a?t:{},params:"GET"==a?t:{}}).then((function(t){if(Array.isArray(t.data)){var a=t.data;e.tableData=a}else if(t.data){var n=t.data,i=n.rows,o=n.total,r=n.records,s=n.items;e.tableData=i||r||s||[],e.total=o||0}else{var c=t.rows,l=t.total,d=t.records,u=t.items;e.tableData=c||d||u||[],e.total=l||0}})).catch((function(t){e.$notification.error({message:"失败",description:t.msg})})).finally((function(){e.tableLoading=!1}))}},handleCurrentChange:function(e){this.loadData()},onPageShowSizeChange:function(e,t){Object.assign(this,{pageNum:e,pageSize:t}),this.loadData()},onSelectChange:function(e){this.selectedRowKeys=e},pcsChangeHandle:function(e,t){var a={},n=Object.assign({},this.queryParams);t||(delete n.provinceId,delete n.provinceName,delete n.cityId,delete n.cityName,delete n.strictId,delete n.strictName),t&&1===t.length&&(a.provinceId=t[0].code,a.provinceName=t[0].label,delete n.cityId,delete n.cityName,delete n.strictId,delete n.strictName),t&&2===t.length&&(a.cityId=t[1].code,a.cityName=t[1].label,delete n.strictId,delete n.strictName),t&&3===t.length&&(a.strictId=t[2].code,a.strictName=t[2].label),this.queryParams=Object.assign({},n,a)},rangDateChangeHandle:function(e,t){var a={},n=Object.assign({},this.queryParams);t&&t[0]&&(a.beginTime=t[0]),t&&t[1]&&(a.endTime=t[1]),"{}"===JSON.stringify(a)&&(delete n.beginTime,delete n.endTime),this.queryParams=Object.assign({},n,a)},handleDateQuickChange:function(e){e.startDate?(this.$set(this.queryParams,"rangDate",[o()(e.startDate),o()(e.endDate)]),this.queryParams.beginTime=e.startDate,this.queryParams.endTime=e.endDate):(delete this.queryParams.beginTime,delete this.queryParams.endTime,this.$set(this.queryParams,"rangDate",void 0))}}};t["a"]=r},e2eb:function(e,t,a){"use strict";a("4bed")}}]);