Files
qhmes/deploy-qhmes/frontend/js/user.data-CkfG18fs.js
2026-05-15 11:34:12 +08:00

2 lines
9.2 KiB
Java

var g=Object.defineProperty,y=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var b=(e,t,n)=>t in e?g(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,i=(e,t)=>{for(var n in t||(t={}))x.call(t,n)&&b(e,n,t[n]);if(P)for(var n of P(t))S.call(t,n)&&b(e,n,t[n]);return e},p=(e,t)=>y(e,w(t));var c=(e,t,n)=>new Promise((r,a)=>{var l=s=>{try{o(n.next(s))}catch(h){a(h)}},u=s=>{try{o(n.throw(s))}catch(h){a(h)}},o=s=>s.done?r(s.value):Promise.resolve(s.value).then(l,u);o((n=n.apply(e,t)).next())});import{e as R,f as T}from"./user.api-C1eRtqao.js";import{rules as d}from"./validator-D5SvXAAX.js";import{getSysLoginPasswordRules as D}from"./sysPasswordRules-C_oGkupc.js";import{render as I}from"./renderUtils-BumghUlZ.js";import{cg as m,cl as f,ck as C,aG as z}from"./index-BI6CMai0.js";import{l as J}from"./vue-vendor-C7Zq48Yl.js";import{X as N}from"./antd-vue-vendor-BPnV8VqP.js";const L=[{title:"用户账号",dataIndex:"username",width:120,resizable:!0},{title:"用户姓名",dataIndex:"realname",width:100,resizable:!0},{title:"性别",dataIndex:"sex",width:80,resizable:!0,sorter:!0,customRender:({text:e})=>I.renderDict(e,"sex")},{title:"手机号",dataIndex:"phone",width:100,resizable:!0,customRender:({record:e,text:t})=>e.izHideContact&&e.izHideContact==="1"?"/":t},{title:"部门",width:150,resizable:!0,dataIndex:"belongDepIds",customRender:({record:e,text:t})=>t?m(f(e.orgCodeTxt,t)):""},{title:"负责部门",width:150,resizable:!0,dataIndex:"departIds",customRender:({record:e,text:t})=>t?m(f(e.departIds_dictText,t)):""},{title:"主岗位",width:150,resizable:!0,dataIndex:"mainDepPostId",customRender:({record:e,text:t})=>m(C(e.mainDepPostId_dictText,t,!1))},{title:"兼职岗位",width:150,resizable:!0,dataIndex:"otherDepPostId",customRender:({record:e,text:t})=>t?m(f(e.otherDepPostId_dictText,t)):""},{title:"状态",dataIndex:"status_dictText",width:80,resizable:!0}],j=[{title:"用户账号",dataIndex:"username",width:100},{title:"用户姓名",dataIndex:"realname",width:100},{title:"头像",dataIndex:"avatar",width:80,customRender:I.renderAvatar},{title:"性别",dataIndex:"sex",width:80,sorter:!0,customRender:({text:e})=>I.renderDict(e,"sex")}],G=[{label:"账号",field:"username",component:"JInput"},{label:"名字",field:"realname",component:"JInput"},{label:"性别",field:"sex",component:"JDictSelectTag",componentProps:{dictCode:"sex",placeholder:"请选择性别",stringToNumber:!0}},{label:"手机号码",field:"phone",component:"Input"},{label:"用户状态",field:"status",component:"JDictSelectTag",componentProps:{dictCode:"user_status",placeholder:"请选择状态",stringToNumber:!0}},{label:"所属部门",field:"departId",component:"JSelectDept",componentProps:{placeholder:"请选择所属部门",showButton:!1,checkStrictly:!0}}],K=[{label:"",field:"id",component:"Input",show:!1},{label:"用户账号",field:"username",component:"Input",required:!0,dynamicDisabled:({values:e})=>!!e.id,dynamicRules:({model:e,schema:t})=>d.duplicateCheckRule("sys_user","username",e,t,!0)},{label:"登录密码",field:"password",component:"StrengthMeter",componentProps:{autocomplete:"new-password"},rules:D()},{label:"确认密码",field:"confirmPassword",component:"InputPassword",dynamicRules:({values:e})=>d.confirmPassword(e,!0)},{label:"用户姓名",field:"realname",required:!0,component:"Input"},{label:"工号",field:"workNo",required:!1,component:"Input",dynamicRules:({model:e,schema:t})=>d.duplicateCheckRule("sys_user","work_no",e,t,!1)},{label:"职务",field:"positionType",required:!1,component:"JDictSelectTag",componentProps:{dictCode:"user_position",mode:"multiple"}},{label:"角色",field:"selectedroles",component:"ApiSelect",componentProps:{mode:"multiple",api:R,labelField:"roleName",valueField:"id",immediate:!1}},{label:"所属部门",field:"selecteddeparts",component:"JSelectDept",componentProps:({formActionType:e,formModel:t})=>({sync:!1,checkStrictly:!0,defaultExpandLevel:2,onSelect:(n,r)=>{const{updateSchema:a}=e;if(a([{field:"mainDepPostId",componentProps:{params:{departIds:r?r.value.join(","):""}}},{field:"otherDepPostId",componentProps:{params:{departIds:r?r.value.join(","):""}}}]),_(n,a),!r){t.departIds=[],t.mainDepPostId="",t.otherDepPostId="";return}t.departIds&&(t.departIds=t.departIds.filter(l=>r.value.indexOf(l)>-1))},onChange:n=>c(null,null,function*(){yield k(t,n,e)})})},{label:"主岗位",field:"mainDepPostId",component:"JSelectDepartPost",componentProps:{rowKey:"id",multiple:!1,izShowDepPath:!0},ifShow:({values:e})=>e.selecteddeparts?!(e.selecteddeparts instanceof Array&&e.selecteddeparts.length==0):!1},{label:"兼职岗位",field:"otherDepPostId",component:"JSelectDepartPost",componentProps:{rowKey:"id",izShowDepPath:!0},ifShow:({values:e})=>e.selecteddeparts?!(e.selecteddeparts instanceof Array&&e.selecteddeparts.length==0):!1},{label:"租户",field:"relTenantIds",component:"JSearchSelect",componentProps:{dict:"sys_tenant,name,id",async:!0,multiple:!0}},{label:"身份",field:"userIdentity",component:"RadioGroup",defaultValue:1,componentProps:({formModel:e})=>({options:[{label:"普通用户",value:1,key:"1"},{label:"上级",value:2,key:"2"}],onChange:()=>{e.userIdentity==1&&(e.departIds=[])}})},{label:"负责部门",field:"departIds",component:"Select",componentProps:{mode:"multiple",tagRender:({label:e,value:t,closable:n,onClose:r})=>{let a=e;return a&&e.length>=20&&(a="..."+a.substring(e.length-20)),J(N,{style:{position:"relative",boxSizing:"border-box",height:"24px",marginTop:"2px",fontSize:"14px",marginBottom:"2px",lineHeight:"22px",background:"rgba(51, 51, 51, 0.06)",border:"1px solid rgba(5, 5, 5, 0.06)",borderRadius:"4px",cursor:"default"},title:e,closable:n,onClose:l=>{l.stopPropagation(),r()}},()=>a)}},ifShow:({values:e})=>e.userIdentity==2},{label:"排序",field:"sort",component:"InputNumber",defaultValue:1e3,componentProps:{min:1,max:999999,step:1,precision:0}},{label:"头像",field:"avatar",component:"JImageUpload",componentProps:{fileMax:1}},{label:"生日",field:"birthday",component:"DatePicker"},{label:"性别",field:"sex",component:"JDictSelectTag",componentProps:{dictCode:"sex",placeholder:"请选择性别",stringToNumber:!0}},{label:"邮箱",field:"email",component:"Input",required:!1,dynamicRules:({model:e,schema:t})=>[p(i({},d.duplicateCheckRule("sys_user","email",e,t,!1)[0]),{trigger:"blur"}),p(i({},d.rule("email",!1)[0]),{trigger:"blur"})]},{label:"手机号码",field:"phone",component:"Input",required:!0,dynamicRules:({model:e,schema:t})=>[p(i({},d.duplicateCheckRule("sys_user","phone",e,t,!0)[0]),{trigger:"blur"}),{pattern:/^1[3456789]\d{9}$/,message:"手机号码格式有误",trigger:"blur"}]},{label:"座机",field:"telephone",component:"Input",rules:[{pattern:/^0\d{2,3}-[1-9]\d{6,7}$/,message:"请输入正确的座机号码"}]},{label:"工作流引擎",field:"activitiSync",defaultValue:1,component:"JDictSelectTag",componentProps:{dictCode:"activiti_sync",type:"radio",stringToNumber:!0}},{label:"隐藏联系方式",field:"izHideContact",defaultValue:"0",component:"JDictSelectTag",componentProps:{dictCode:"yn",type:"radio"}}],$=[{label:"用户账号",field:"username",component:"Input",componentProps:{readOnly:!0}},{label:"登录密码",field:"password",component:"StrengthMeter",componentProps:{placeholder:"请输入登录密码"},rules:D()},{label:"确认密码",field:"confirmPassword",component:"InputPassword",dynamicRules:({values:e})=>d.confirmPassword(e,!0)}],E=[{title:"用户账号",dataIndex:"username",width:120},{title:"用户姓名",dataIndex:"realname",width:100},{title:"头像",dataIndex:"avatar",width:120,customRender:I.renderAvatar},{title:"手机号",dataIndex:"phone",width:100},{title:"部门",width:150,dataIndex:"orgCodeTxt"},{title:"状态",dataIndex:"status",width:80,customRender:({text:e})=>e==="1"?"正常":e==="3"?"审批中":"已拒绝"}],U=[{label:"账号",field:"username",component:"Input",colProps:{span:6}},{label:"名字",field:"realname",component:"Input",colProps:{span:6}},{label:"性别",field:"sex",component:"JDictSelectTag",componentProps:{dictCode:"sex",placeholder:"请选择性别",stringToNumber:!0},colProps:{span:6}}];function k(e,t,n){return c(this,null,function*(){const{setFieldsValue:r}=n;if(t){let a="";if(t instanceof Array?a=t.join(","):a=t,a)try{const{result:l}=yield T({depIds:a}),u=l.split(",")||[];if(e.mainDepPostId){const o=Array.isArray(e.mainDepPostId)?e.mainDepPostId[0]:e.mainDepPostId;o&&!u.includes(o)&&(r({mainDepPostId:null}),e.mainDepPostId=null)}if(typeof e.otherDepPostId=="string"&&(e.otherDepPostId=e.otherDepPostId.split(",")),e.otherDepPostId&&Array.isArray(e.otherDepPostId)){const o=e.otherDepPostId.filter(s=>u.includes(s));r({otherDepPostId:o}),e.otherDepPostId=o}}catch(l){r({mainDepPostId:null,otherDepPostId:[]}),e.mainDepPostId=null,e.otherDepPostId=[]}else r({mainDepPostId:null,otherDepPostId:[]}),e.mainDepPostId=null,e.otherDepPostId=[]}})}function _(e,t){return c(this,null,function*(){if(e&&e.length>0){const n=yield Promise.all(e.map(r=>c(null,null,function*(){const a=yield z("",r.label,r.value);return p(i({},r),{label:a})})));t([{field:"departIds",componentProps:{options:n}}])}else t([{field:"departIds",componentProps:{options:[]}}])})}export{E as a,$ as b,L as c,K as f,j as r,G as s,U as u};