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.
2 lines
5.4 KiB
2 lines
5.4 KiB
|
2 years ago
|
import{u as _,r as a,I as T,b as w,B as m,h as n,o as D,c as B,m as i,w as x,M as L}from"./index-3679850f.js";const C={__name:"user",setup(E){const p=_(),r=a(),u=a({list:[{type:"input",control:{modelValue:"",placeholder:"请输入登录名称"},config:{},name:"userName",item:{label:"登录名称"}},{type:"input",control:{modelValue:"",placeholder:"请输入昵称"},config:{},name:"nickName",item:{label:"昵称"}},{type:"input",control:{modelValue:"",placeholder:"请输入手机号码"},config:{},name:"phone",item:{label:"手机号"}},{type:"select",control:{modelValue:"",appendToBody:!0},options:[],config:{optionsType:2,optionsFun:"status"},name:"status",item:{label:"用户状态"}},{type:"select",control:{modelValue:[],appendToBody:!0},options:[],config:{optionsType:1,optionsFun:"roleList",method:"post",label:"name",value:"id"},name:"role",item:{label:"角色"}},{type:"button",control:{label:"查询",type:"primary",key:"submit"},config:{}},{type:"button",control:{label:"清空",key:"reset"},config:{}}],form:{size:"default"},config:{}}),f=a({columns:[{label:"多选",type:"selection"},{label:"序号",type:"index",width:"70px"},{label:"登录名称",prop:"userName"},{label:"昵称",prop:"nickName"},{label:"手机号码",prop:"phone"},{label:"角色",prop:"role"},{label:"状态",prop:"status",config:{dictKey:"status",tagList:{1:"success",0:"info"}}},{prop:"dateTime",label:"创建时间",config:{formatter:"{y}-{m}-{d} {h}:{i}:{s}"}},{label:"操作",prop:"__control"}],config:{openType:"dialog"},operateBtn:[{label:"编辑",key:"edit"},{label:"删除",key:"del"}],controlBtn:[{label:"新增",key:"add",type:"primary",size:"small",icon:"plus"},{label:"批量删除",key:"del",type:"danger",size:"small",icon:"delete"}],treeData:{show:!0,treeProps:{props:{label:"name"}},name:"department",method:"post",requestUrl:"deptList",afterResponse:"transformDataToChild"}}),d=a(),y=a({list:[{type:"input",control:{modelValue:"",placeholder:"请输入用户名称"},config:{},name:"userName",item:{label:"用户名称"},customRules:[{type:"required",message:"请输入用户名称",trigger:"blur"}]},{type:"input",control:{modelValue:"",placeholder:"请输入用户昵称"},config:{},name:"nickName",item:{label:"用户昵称"}},{type:"password",control:{modelValue:"",placeholder:"请输入登录密码"},config:{},name:"password",item:{label:"登录密码"},customRules:[{type:"required",message:"请输入登录密码",trigger:"blur"}]},{type:"password",control:{modelValue:"",placeholder:"请输入确认登录密码"},config:{},name:"password2",item:{label:"确认密码",rules:[{validator:(e,l,t)=>{const s=getuserFormValueByName("password");console.log(s),l===""?t(new Error("请输入密码")):l!==s?t(new Error("两次密码不一样")):t()},trigger:"change"}]},customRules:[{type:"required",message:"请输入确认密码",trigger:"blur"}]},{type:"input",control:{modelValue:"",placeholder:"请输入手机号码"},config:{},name:"phone",item:{label:"手机号码"},customRules:[{type:"mobile",message:"请输入手机号码",trigger:"blur"}]},{type:"treeSelect",control:{modelValue:"",data:[],renderAfterExpand:!1},config:{optionsType:1,optionsFun:"deptList",method:"post",afterResponse:"transformDataToChild"},name:"department",item:{label:"归属部门"}},{type:"select",control:{modelValue:"",appendToBody:!0},options:[],config:{optionsType:0},name:"post",item:{label:"岗位"}},{type:"radio",control:{modelValue:1},options:[],config:{optionsType:2,optionsFun:"status"},name:"status",item:{label:"状态"}},{type:"select",control:{modelValue:[],appendToBody:!0,multiple:!0},options:[],config:{optionsType:1,optionsFun:"roleList",method:"post",label:"name",value:"id",transformData:"string"},name:"role",item:{label:"角色"}},{type:"textarea",control:{modelValue:""},config:{span:24},name:"remark",item:{label:"备注"}},{type:"div",control:{},config:{span:24,textAlign:"center"},list:[{type:"button",control:{label:"确定",type:"primary",key:"submit"},config:{span:0}},{type:"button",control:{label:"取消",key:"reset"},config:{span:0}}]}],form:{size:"default",class:"for
|