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
11 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-69a533eb"],{"08e1":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-form",{ref:"editFrom",staticClass:"yuebon-setting-form",attrs:{model:e.editFrom,rules:e.rules}},[a("el-tabs",{attrs:{type:"border-card"},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"基本信息",name:"first"}},[a("el-form-item",{attrs:{label:"头像","label-width":e.formLabelWidth,prop:"HeadIcon"}},[a("el-upload",{staticClass:"avatar-uploader",attrs:{action:e.httpFileUploadUrl,headers:e.headers,"show-file-list":!1,"on-success":e.uploadFileSuccess}},[e.editFrom.HeadIcon?a("img",{staticClass:"avatar",attrs:{src:e.editFrom.HeadIcon}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1),a("el-form-item",{attrs:{label:"账号","label-width":e.formLabelWidth,prop:"Account"}},[a("el-input",{attrs:{placeholder:"请输入登录系统账号",autocomplete:"off",clearable:""},model:{value:e.editFrom.Account,callback:function(t){e.$set(e.editFrom,"Account",t)},expression:"editFrom.Account"}})],1),a("el-form-item",{attrs:{label:"姓名","label-width":e.formLabelWidth,prop:"UserName"}},[a("el-input",{attrs:{placeholder:"请输入姓名",autocomplete:"off",clearable:""},model:{value:e.editFrom.UserName,callback:function(t){e.$set(e.editFrom,"UserName",t)},expression:"editFrom.UserName"}})],1),a("el-form-item",{attrs:{label:"性别","label-width":e.formLabelWidth,prop:"Gender"}},[a("el-radio-group",{model:{value:e.editFrom.Gender,callback:function(t){e.$set(e.editFrom,"Gender",t)},expression:"editFrom.Gender"}},[a("el-radio",{attrs:{label:"1"}},[e._v("男")]),a("el-radio",{attrs:{label:"0"}},[e._v("女")])],1)],1),a("el-form-item",{attrs:{label:"手机号","label-width":e.formLabelWidth,prop:"MobilePhone"}},[a("el-input",{attrs:{placeholder:"请输入手机号",autocomplete:"off",clearable:""},model:{value:e.editFrom.MobilePhone,callback:function(t){e.$set(e.editFrom,"MobilePhone",t)},expression:"editFrom.MobilePhone"}})],1),a("el-form-item",{attrs:{label:"选项","label-width":e.formLabelWidth,prop:""}},[a("el-checkbox",{model:{value:e.editFrom.IsEnabled,callback:function(t){e.$set(e.editFrom,"IsEnabled",t)},expression:"editFrom.IsEnabled"}},[e._v("启用")]),a("el-checkbox",{model:{value:e.editFrom.IsAdministrator,callback:function(t){e.$set(e.editFrom,"IsAdministrator",t)},expression:"editFrom.IsAdministrator"}},[e._v("管理员")])],1),a("el-form-item",{staticStyle:{width:"500px"},attrs:{label:"所属组织","label-width":e.formLabelWidth,prop:"DepartmentId"}},[a("el-cascader",{staticStyle:{width:"500px"},attrs:{options:e.selectOrganize,filterable:"",props:{label:"FullName",value:"Id",children:"Children",emitPath:!1,checkStrictly:!0,expandTrigger:"hover"},clearable:""},on:{change:e.handleSelectOrganizeChange},model:{value:e.selectedOrganizeOptions,callback:function(t){e.selectedOrganizeOptions=t},expression:"selectedOrganizeOptions"}})],1),a("el-form-item",{attrs:{label:"岗位角色","label-width":e.formLabelWidth,prop:"RoleId"}},[a("el-select",{staticStyle:{width:"500px"},attrs:{multiple:"",clearable:"",disabled:"",placeholder:"请选择"},model:{value:e.editFrom.RoleId,callback:function(t){e.$set(e.editFrom,"RoleId",t)},expression:"editFrom.RoleId"}},e._l(e.selectRole,(function(e){return a("el-option",{key:e.Id,attrs:{label:e.FullName,value:e.Id}})})),1)],1),a("el-form-item",{attrs:{label:"备注","label-width":e.formLabelWidth,prop:"Description"}},[a("el-input",{staticStyle:{width:"500px"},attrs:{placeholder:"",autocomplete:"off",clearable:""},model:{value:e.editFrom.Description,callback:function(t){e.$set(e.editFrom,"Description",t)},expression:"editFrom.Description"}})],1)],1)],1),a("el-form-item",[a("el-button",{staticClass:"btnset",attrs:{type:"primary"},on:{click:function(t){return e.saveEditForm()}}},[e._v("保 存")])],1)],1)],1)},i=[],o=a("5530"),n=(a("b0c0"),a("d81d"),a("1276"),a("ac1f"),a("a9e3"),a("a15b"),a("2f62")),l=a("83d6"),d=a.n(l),s=a("da02"),c=a("dfa7"),u=a("7359"),m=a("5f87"),b={name:"Usercenter",data:function(){return{editFrom:{Account:"",HeadIcon:"",UserName:"",Gender:"1",Birthday:"",MobilePhone:"",Email:"",WeChat:"",DepartmentId:"",RoleId:"",IsAdministrator:!0,IsEnabled:!0,Description:"",currentId:0},rules:{UserName:[{required:!0,message:"请输入姓名",trigger:"blur"},{min:2,max:10,message:"长度在2 到 10 个字符",trigger:"blur"}],MobilePhone:[{required:!0,message:"请输入电话号码",trigger:"blur"},{min:2,max:11,message:"长度在 6 到 32 个字符",trigger:"blur"}]},activeName:"first",selectedOrganizeOptions:"",selectOrganize:[],formLabelWidth:"100px",selectRole:[],headers:[],httpFileUploadUrl:d.a.fileUploadUrl}},computed:Object(o["a"])({},Object(n["b"])(["name"])),created:function(){this.InitDictItem(),this.bindEditInfo(),this.headers={Authorization:"Bearer "+(Object(m["a"])()||"")}},methods:{InitDictItem:function(){var e=this;Object(c["e"])().then((function(t){e.selectRole=t.ResData})),Object(u["c"])().then((function(t){e.selectOrganize=t.ResData}))},bindEditInfo:function(){var e=this;Object(s["b"])(this.name).then((function(t){e.editFrom.Account=t.ResData.Account,e.editFrom.UserName=t.ResData.UserName,e.editFrom.NickName=t.ResData.NickName,e.editFrom.Gender=t.ResData.Gender+"",e.editFrom.Birthday=t.ResData.Birthday,e.editFrom.MobilePhone=t.ResData.MobilePhone,e.editFrom.Email=t.ResData.Email,e.editFrom.WeChat=t.ResData.WeChat,e.editFrom.DepartmentId=t.ResData.DepartmentId,e.editFrom.IsAdministrator=t.ResData.IsAdministrator,e.editFrom.IsEnabled=t.ResData.IsEnabled,e.editFrom.RoleId=t.ResData.RoleId.split(",").map(Number),e.editFrom.Description=t.ResData.Description,e.selectedOrganizeOptions=t.ResData.DepartmentId,e.currentId=t.ResData.Id,e.editFrom.HeadIcon=t.ResData.HeadIcon}))},handleSelectOrganizeChange:function(){this.editFrom.OrganizeId=this.selectedOrganizeOptions},saveEditForm:function(){var e=this;this.$refs["editFrom"].validate((function(t){if(!t)return!1;var a={Account:e.editFrom.Account,UserName:e.editFrom.UserName,NickName:e.editFrom.NickName,Gender:e.editFrom.Gender,Birthday:e.editFrom.Birthday,MobilePhone:e.editFrom.MobilePhone,Email:e.editFrom.Email,WeChat:e.editFrom.WeChat,DepartmentId:e.editFrom.DepartmentId,IsAdministrator:e.editFrom.IsAdministrator,IsEnabled:e.editFrom.IsEnabled,RoleId:e.editFrom.RoleId.join(","),Description:e.editFrom.Description,HeadIcon:e.editFrom.HeadIcon,Id:e.currentId},r="AdminUser/Update";Object(s["g"])(a,r).then((function(t){t.Success?(e.$message({message:"恭喜你,操作成功",type:"success"}),e.selectedOrganizeOptions="",e.$refs["editFrom"].resetFields(),e.bindEditInfo()):e.$message({message:t.ErrMsg,type:"error"})}))}))},uploadFileSuccess:function(e,t,a){this.editFrom.HeadIcon=d.a.fileUrl+e.ResData.FilePath}}},p=b,f=(a("8c60"),a("2877")),h=Object(f["a"])(p,r,i,!1,null,"b69b4234",null);t["default"]=h.exports},7359:function(e,t,a){"use strict";a.d(t,"c",(function(){return n})),a.d(t,"e",(function(){return l})),a.d(t,"d",(function(){return d})),a.d(t,"f",(function(){return s})),a.d(t,"b",(function(){return c})),a.d(t,"a",(function(){return u}));var r=a("b775"),i=a("83d6"),o=a.n(i);function n(){return r["a"].request({url:"Organize/GetAllOrganizeTreeTable",method:"get",baseURL:o.a.apiSecurityUrl})}function l(e,t){return r["a"].request({url:t,method:"post",data:e,baseURL:o.a.apiSecurityUrl})}function d(e){return Object(r["a"])({url:"Organize/GetById",method:"get",params:{id:e},baseURL:o.a.apiSecurityUrl})}function s(e){return Object(r["a"])({url:"Organize/SetIsEnabledtBatchAsync",method:"post",data:e,baseURL:o.a.apiSecurityUrl})}function c(e){return Object(r["a"])({url:"Organize/DeleteSoftBatchAsync",method:"post",data:e,baseURL:o.a.apiSecurityUrl})}function u(e){return Object(r["a"])({url:"Organize/DeleteBatchAsync",method:"delete",data:e,baseURL:o.a.apiSecurityUrl})}},"8c60":function(e,t,a){"use strict";a("911d")},"911d":function(e,t,a){var r=a("a86a");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var i=a("499e").default;i("682bcdce",r,!0,{sourceMap:!1,shadowMode:!1})},a86a:function(e,t,a){var r=a("24fb");t=r(!1),t.push([e.i,".yuebon-setting-form .el-tab-pane[data-v-b69b4234]{width:40%}.yuebon-setting-form .el-cascader .el-input[data-v-b69b4234],.yuebon-setting-form .el-input[data-v-b69b4234],.yuebon-setting-form .el-select .el-input[data-v-b69b4234]{width:100%}.yuebon-setting-form .btnset[data-v-b69b4234]{float:right;margin-right:30px;margin-top:20px}.avatar-uploader .el-upload[data-v-b69b4234]{border:1px solid #eceaea;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload[data-v-b69b4234]:hover{border-color:#409eff}.avatar-uploader-icon[data-v-b69b4234]{font-size:28px;color:#8c939d;line-height:130px;text-align:center}.avatar[data-v-b69b4234],.avatar-uploader-icon[data-v-b69b4234]{width:130px;height:130px;border:1px solid #eceaea}.avatar[data-v-b69b4234]{display:block}",""]),e.exports=t},dfa7:function(e,t,a){"use strict";a.d(t,"h",(function(){return n})),a.d(t,"e",(function(){return l})),a.d(t,"i",(function(){return d})),a.d(t,"g",(function(){return s})),a.d(t,"k",(function(){return c})),a.d(t,"b",(function(){return u})),a.d(t,"a",(function(){return m})),a.d(t,"c",(function(){return b})),a.d(t,"f",(function(){return p})),a.d(t,"d",(function(){return f})),a.d(t,"j",(function(){return h}));var r=a("b775"),i=a("83d6"),o=a.n(i);function n(e){return r["a"].request({url:"Role/FindWithPagerAsync",method:"post",data:e,baseURL:o.a.apiSecurityUrl})}function l(){return r["a"].request({url:"Role/GetAllEnable",method:"get",baseURL:o.a.apiSecurityUrl})}function d(e,t){return r["a"].request({url:t,method:"post",data:e,baseURL:o.a.apiSecurityUrl})}function s(e){return Object(r["a"])({url:"Role/GetById",method:"get",params:{id:e},baseURL:o.a.apiSecurityUrl})}function c(e){return Object(r["a"])({url:"Role/SetIsEnabledtBatchAsync",method:"post",data:e,baseURL:o.a.apiSecurityUrl})}function u(e){return Object(r["a"])({url:"Role/DeleteSoftBatchAsync",method:"post",data:e,baseURL:o.a.apiSecurityUrl})}function m(e){return Object(r["a"])({url:"Role/DeleteBatchAsync",method:"delete",data:e,baseURL:o.a.apiSecurityUrl})}function b(){return Object(r["a"])({url:"RoleAuthorize/GetAllFunctionTree",method:"get",baseURL:o.a.apiSecurityUrl})}function p(e){return Object(r["a"])({url:"RoleAuthorize/GetRoleAuthorizeFunction",method:"get",params:e,baseURL:o.a.apiSecurityUrl})}function f(e){return Object(r["a"])({url:"RoleData/GetAllRoleDataByRoleId",method:"get",params:e,baseURL:o.a.apiSecurityUrl})}function h(e){return r["a"].request({url:"RoleAuthorize/SaveRoleAuthorize",method:"post",data:e,timeout:0,baseURL:o.a.apiSecurityUrl})}}}]);