From 103dd9a0862dd3782f134062a127efee149dd752 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Fri, 8 Nov 2024 15:30:15 +0800 Subject: [PATCH] =?UTF-8?q?logo=E3=80=81=E5=85=B3=E9=94=AE=E5=AD=97?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9=2011.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/controller/SysUserController.java | 20 + .../src/views/declarant/user.data.ts | 5 +- .../views/system/kejijuuser/PasswordModal.vue | 42 ++ .../system/kejijuuser/UserAgentModal.vue | 45 ++ .../views/system/kejijuuser/UserDrawer.vue | 178 ++++++ .../system/kejijuuser/UserQuitAgentModal.vue | 81 +++ .../views/system/kejijuuser/UserQuitModal.vue | 110 ++++ .../system/kejijuuser/UserRecycleBinModal.vue | 166 +++++ .../src/views/system/kejijuuser/index.vue | 301 +++++++++ .../src/views/system/kejijuuser/user.api.ts | 254 ++++++++ .../src/views/system/kejijuuser/user.data.ts | 569 ++++++++++++++++++ .../views/system/kejijuuser/userDetails.vue | 54 ++ 12 files changed, 1823 insertions(+), 2 deletions(-) create mode 100644 jeecgboot-vue3/src/views/system/kejijuuser/PasswordModal.vue create mode 100644 jeecgboot-vue3/src/views/system/kejijuuser/UserAgentModal.vue create mode 100644 jeecgboot-vue3/src/views/system/kejijuuser/UserDrawer.vue create mode 100644 jeecgboot-vue3/src/views/system/kejijuuser/UserQuitAgentModal.vue create mode 100644 jeecgboot-vue3/src/views/system/kejijuuser/UserQuitModal.vue create mode 100644 jeecgboot-vue3/src/views/system/kejijuuser/UserRecycleBinModal.vue create mode 100644 jeecgboot-vue3/src/views/system/kejijuuser/index.vue create mode 100644 jeecgboot-vue3/src/views/system/kejijuuser/user.api.ts create mode 100644 jeecgboot-vue3/src/views/system/kejijuuser/user.data.ts create mode 100644 jeecgboot-vue3/src/views/system/kejijuuser/userDetails.vue diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java index 6daa6a2..1ac5577 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java @@ -163,6 +163,26 @@ public class SysUserController { return sysUserService.queryPageList(req, queryWrapper, pageSize, pageNo); } + /** + * @description: 根据用户角色查询下属用户 + * @param: [user, pageNo, pageSize, req] + * @return: org.jeecg.common.api.vo.Result> + * @author: z.h.c + * @date: 24/11/8 15:19 + */ +// @RequiresPermissions("system:user:listAll") + @RequestMapping(value = "/listByRollCode", method = RequestMethod.GET) + public Result> listByRollCode(SysUser user, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { + + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap()); + LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); +// SysDepart sysDepart = sysDepartService.getById(loginUser.getOrgId()); + + queryWrapper.likeRight("org_code", loginUser.getOrgCode()); + return sysUserService.queryPageList(req, queryWrapper, pageSize, pageNo); + } + /** * @description: 根据用户权限查询申报人列表 * @param: [user, pageNo, pageSize, req] diff --git a/jeecgboot-vue3/src/views/declarant/user.data.ts b/jeecgboot-vue3/src/views/declarant/user.data.ts index ede01ad..3a80a8b 100644 --- a/jeecgboot-vue3/src/views/declarant/user.data.ts +++ b/jeecgboot-vue3/src/views/declarant/user.data.ts @@ -40,7 +40,7 @@ export const columns: BasicColumn[] = [ width: 100, }, { - title: '部门', + title: '单位', width: 150, dataIndex: 'orgCodeTxt', }, @@ -51,7 +51,8 @@ export const columns: BasicColumn[] = [ // }, { title: '状态', - dataIndex: 'orgCategory_dictText', + // dataIndex: 'orgCategory_dictText', + dataIndex: 'status_dictText', width: 80, }, ]; diff --git a/jeecgboot-vue3/src/views/system/kejijuuser/PasswordModal.vue b/jeecgboot-vue3/src/views/system/kejijuuser/PasswordModal.vue new file mode 100644 index 0000000..d638c86 --- /dev/null +++ b/jeecgboot-vue3/src/views/system/kejijuuser/PasswordModal.vue @@ -0,0 +1,42 @@ + + diff --git a/jeecgboot-vue3/src/views/system/kejijuuser/UserAgentModal.vue b/jeecgboot-vue3/src/views/system/kejijuuser/UserAgentModal.vue new file mode 100644 index 0000000..4f3c50d --- /dev/null +++ b/jeecgboot-vue3/src/views/system/kejijuuser/UserAgentModal.vue @@ -0,0 +1,45 @@ + + diff --git a/jeecgboot-vue3/src/views/system/kejijuuser/UserDrawer.vue b/jeecgboot-vue3/src/views/system/kejijuuser/UserDrawer.vue new file mode 100644 index 0000000..a4aa708 --- /dev/null +++ b/jeecgboot-vue3/src/views/system/kejijuuser/UserDrawer.vue @@ -0,0 +1,178 @@ + + diff --git a/jeecgboot-vue3/src/views/system/kejijuuser/UserQuitAgentModal.vue b/jeecgboot-vue3/src/views/system/kejijuuser/UserQuitAgentModal.vue new file mode 100644 index 0000000..a1bc4d3 --- /dev/null +++ b/jeecgboot-vue3/src/views/system/kejijuuser/UserQuitAgentModal.vue @@ -0,0 +1,81 @@ + + diff --git a/jeecgboot-vue3/src/views/system/kejijuuser/UserQuitModal.vue b/jeecgboot-vue3/src/views/system/kejijuuser/UserQuitModal.vue new file mode 100644 index 0000000..7822269 --- /dev/null +++ b/jeecgboot-vue3/src/views/system/kejijuuser/UserQuitModal.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/system/kejijuuser/UserRecycleBinModal.vue b/jeecgboot-vue3/src/views/system/kejijuuser/UserRecycleBinModal.vue new file mode 100644 index 0000000..7b709f1 --- /dev/null +++ b/jeecgboot-vue3/src/views/system/kejijuuser/UserRecycleBinModal.vue @@ -0,0 +1,166 @@ + + diff --git a/jeecgboot-vue3/src/views/system/kejijuuser/index.vue b/jeecgboot-vue3/src/views/system/kejijuuser/index.vue new file mode 100644 index 0000000..b8150bc --- /dev/null +++ b/jeecgboot-vue3/src/views/system/kejijuuser/index.vue @@ -0,0 +1,301 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/system/kejijuuser/user.api.ts b/jeecgboot-vue3/src/views/system/kejijuuser/user.api.ts new file mode 100644 index 0000000..fea5d59 --- /dev/null +++ b/jeecgboot-vue3/src/views/system/kejijuuser/user.api.ts @@ -0,0 +1,254 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; +import { isObject } from '/@/utils/is'; +enum Api { + listNoCareTenant = '/sys/user/listAll', + + // 根据用户角色查询所属用户 add by zhc 11.08 + listByRollCode = '/sys/user/listByRollCode', + list = '/sys/user/list', + save = '/sys/user/add', + edit = '/sys/user/edit', + agentSave = '/sys/sysUserAgent/add', + agentEdit = '/sys/sysUserAgent/edit', + getUserRole = '/sys/user/queryUserRole', + duplicateCheck = '/sys/duplicate/check', + deleteUser = '/sys/user/delete', + deleteBatch = '/sys/user/deleteBatch', + importExcel = '/sys/user/importExcel', + exportXls = '/sys/user/exportXls', + recycleBinList = '/sys/user/recycleBin', + putRecycleBin = '/sys/user/putRecycleBin', + deleteRecycleBin = '/sys/user/deleteRecycleBin', + allRolesList = '/sys/role/queryall', + allRolesListNoByTenant = '/sys/role/queryallNoByTenant', + allTenantList = '/sys/tenant/queryList', + allPostList = '/sys/position/list', + userDepartList = '/sys/user/userDepartList', + changePassword = '/sys/user/changePassword', + frozenBatch = '/sys/user/frozenBatch', + getUserAgent = '/sys/sysUserAgent/queryByUserName', + userQuitAgent = '/sys/user/userQuitAgent', + getQuitList = '/sys/user/getQuitList', + putCancelQuit = '/sys/user/putCancelQuit', + updateUserTenantStatus='/sys/tenant/updateUserTenantStatus', + getUserTenantPageList='/sys/tenant/getUserTenantPageList', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口(查询用户,通过租户隔离) + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 列表接口(查询全部用户,不通过租户隔离) + * @param params + */ +export const listNoCareTenant = (params) => defHttp.get({ url: Api.listByRollCode, params }); + +/** + * 用户角色接口 + * @param params + */ +export const getUserRoles = (params) => defHttp.get({ url: Api.getUserRole, params }, { errorMessageMode: 'none' }); + +/** + * 删除用户 + */ +export const deleteUser = (params, handleSuccess) => { + return defHttp.delete({ url: Api.deleteUser, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; +/** + * 批量删除用户 + * @param params + */ +export const batchDeleteUser = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; +/** + * 保存或者更新用户 + * @param params + */ +export const saveOrUpdateUser = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }); +}; +/** + * 唯一校验 + * @param params + */ +export const duplicateCheck = (params) => defHttp.get({ url: Api.duplicateCheck, params }, { isTransformResponse: false }); + +/** + * 20231215 + * liaozhiyang + * 唯一校验( 延迟【防抖】) + * @param params + */ +const timer = {}; +export const duplicateCheckDelay = (params) => { + return new Promise((resove, rejected) => { + // -update-begin--author:liaozhiyang---date:20240619---for:【TV360X-1380】表单中使用多个duplicateCheckDelay,validate方法调用时会导致promise被挂起保存不了 + let key; + if (isObject(params)) { + key = `${params.tableName}_${params.fieldName}`; + } else { + key = params; + } + clearTimeout(timer[key]); + // -update-end--author:liaozhiyang---date:20240619---for:【TV360X-1380】表单中使用多个duplicateCheckDelay,validate方法调用时会导致promise被挂起保存不了 + timer[key] = setTimeout(() => { + defHttp + .get({ url: Api.duplicateCheck, params }, { isTransformResponse: false }) + .then((res: any) => { + resove(res as any); + }) + .catch((error) => { + rejected(error); + }); + delete timer[key]; + }, 500); + }); +}; +/** + * 获取全部角色(租户隔离) + * @param params + */ +export const getAllRolesList = (params) => defHttp.get({ url: Api.allRolesList, params }); +/** + * 获取全部角色(不租户隔离) + * @param params + */ +export const getAllRolesListNoByTenant = (params) => defHttp.get({ url: Api.allRolesListNoByTenant, params }); +/** + * 获取全部租户 + */ +export const getAllTenantList = (params) => defHttp.get({ url: Api.allTenantList, params }); +/** + * 获取指定用户负责部门 + */ +export const getUserDepartList = (params) => defHttp.get({ url: Api.userDepartList, params }, { successMessageMode: 'none' }); +/** + * 获取全部职务 + */ +export const getAllPostList = (params) => { + return new Promise((resolve) => { + defHttp.get({ url: Api.allPostList, params }).then((res) => { + resolve(res.records); + }); + }); +}; +/** + * 回收站列表 + * @param params + */ +export const getRecycleBinList = (params) => defHttp.get({ url: Api.recycleBinList, params }); +/** + * 回收站还原 + * @param params + */ +export const putRecycleBin = (params, handleSuccess) => { + return defHttp.put({ url: Api.putRecycleBin, params }).then(() => { + handleSuccess(); + }); +}; +/** + * 回收站删除 + * @param params + */ +export const deleteRecycleBin = (params, handleSuccess) => { + return defHttp.delete({ url: Api.deleteRecycleBin, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; +/** + * 修改密码 + * @param params + */ +export const changePassword = (params) => { + return defHttp.put({ url: Api.changePassword, params }); +}; +/** + * 冻结解冻 + * @param params + */ +export const frozenBatch = (params, handleSuccess) => { + return defHttp.put({ url: Api.frozenBatch, params }).then(() => { + handleSuccess(); + }); +}; +/** + * 获取用户代理 + * @param params + */ +export const getUserAgent = (params) => defHttp.get({ url: Api.getUserAgent, params }, { isTransformResponse: false }); +/** + * 保存或者更新用户代理 + * @param params + */ +export const saveOrUpdateAgent = (params) => { + let url = params.id ? Api.agentEdit : Api.agentSave; + return defHttp.post({ url: url, params }); +}; + +/** + * 用户离职(新增代理人和用户状态变更操作) + * @param params + */ +export const userQuitAgent = (params) => { + return defHttp.put({ url: Api.userQuitAgent, params }); +}; + +/** + * 用户离职列表 + * @param params + */ +export const getQuitList = (params) => { + return defHttp.get({ url: Api.getQuitList, params }); +}; + +/** + * 取消离职 + * @param params + */ +export const putCancelQuit = (params, handleSuccess) => { + return defHttp.put({ url: Api.putCancelQuit, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; + +/** + * 待审批获取列表数据 + */ +export const getUserTenantPageList = (params) => { + return defHttp.get({ url: Api.getUserTenantPageList, params }); +}; + +/** + * 更新租户状态 + * @param params + */ +export const updateUserTenantStatus = (params) => { + return defHttp.put({ url: Api.updateUserTenantStatus, params }, { joinParamsToUrl: true, isTransformResponse: false }); +}; diff --git a/jeecgboot-vue3/src/views/system/kejijuuser/user.data.ts b/jeecgboot-vue3/src/views/system/kejijuuser/user.data.ts new file mode 100644 index 0000000..9ec1313 --- /dev/null +++ b/jeecgboot-vue3/src/views/system/kejijuuser/user.data.ts @@ -0,0 +1,569 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { getAllRolesListNoByTenant, getAllTenantList } from './user.api'; +import { rules } from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +export const columns: BasicColumn[] = [ + { + title: '用户账号', + dataIndex: 'username', + width: 120, + }, + { + title: '用户姓名', + dataIndex: 'realname', + width: 100, + }, + { + title: '头像', + dataIndex: 'avatar', + width: 120, + customRender: render.renderAvatar, + }, + { + title: '性别', + dataIndex: 'sex', + width: 80, + sorter: true, + customRender: ({ text }) => { + return render.renderDict(text, 'sex'); + }, + }, + /*{ + title: '生日', + dataIndex: 'birthday', + width: 100, + },*/ + { + title: '手机号', + dataIndex: 'phone', + width: 100, + }, + { + title: '部门', + width: 150, + dataIndex: 'orgCodeTxt', + }, + /*{ + title: '负责部门', + width: 150, + dataIndex: 'departIds_dictText', + },*/ + { + title: '状态', + dataIndex: 'status_dictText', + width: 80, + }, +]; + +export const recycleColumns: BasicColumn[] = [ + { + title: '用户账号', + dataIndex: 'username', + width: 100, + }, + { + title: '用户姓名', + dataIndex: 'realname', + width: 100, + }, + { + title: '头像', + dataIndex: 'avatar', + width: 80, + customRender: render.renderAvatar, + }, + { + title: '性别', + dataIndex: 'sex', + width: 80, + sorter: true, + customRender: ({ text }) => { + return render.renderDict(text, 'sex'); + }, + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + label: '账号', + field: 'username', + component: 'JInput', + //colProps: { span: 6 }, + }, + { + label: '名字', + field: 'realname', + component: 'JInput', + //colProps: { span: 6 }, + }, + { + label: '性别', + field: 'sex', + component: 'JDictSelectTag', + componentProps: { + dictCode: 'sex', + placeholder: '请选择性别', + stringToNumber: true, + }, + //colProps: { span: 6 }, + }, + { + label: '手机号码', + field: 'phone', + component: 'Input', + //colProps: { span: 6 }, + }, + { + label: '用户状态', + field: 'status', + component: 'JDictSelectTag', + componentProps: { + dictCode: 'user_status', + placeholder: '请选择状态', + stringToNumber: true, + }, + //colProps: { span: 6 }, + }, +]; + +export const formSchema: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '用户账号', + field: 'username', + component: 'Input', + required: true, + dynamicDisabled: ({ values }) => { + return !!values.id; + }, + dynamicRules: ({ model, schema }) => rules.duplicateCheckRule('sys_user', 'username', model, schema, true), + }, + { + label: '登录密码', + field: 'password', + component: 'StrengthMeter', + componentProps:{ + autocomplete: 'new-password', + }, + rules: [ + { + required: true, + message: '请输入登录密码', + }, + { + pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, + message: '密码由8位数字、大小写字母和特殊符号组成!', + }, + ], + }, + { + label: '确认密码', + field: 'confirmPassword', + component: 'InputPassword', + dynamicRules: ({ values }) => rules.confirmPassword(values, true), + }, + { + label: '用户姓名', + field: 'realname', + required: true, + component: 'Input', + }, + /*{ + label: '工号', + field: 'workNo', + required: true, + component: 'Input', + dynamicRules: ({ model, schema }) => rules.duplicateCheckRule('sys_user', 'work_no', model, schema, true), + }, + { + label: '职务', + field: 'post', + required: false, + component: 'JSelectPosition', + componentProps: { + labelKey: 'name', + }, + },*/ + { + label: '角色', + field: 'selectedroles', + component: 'ApiSelect', + componentProps: { + mode: 'multiple', + api: getAllRolesListNoByTenant, + labelField: 'roleName', + valueField: 'id', + immediate: false, + }, + }, + { + label: '所属部门', + field: 'selecteddeparts', + component: 'JSelectDept', + componentProps: ({ formActionType, formModel }) => { + return { + sync: false, + checkStrictly: true, + defaultExpandLevel: 2, + + onSelect: (options, values) => { + const { updateSchema } = formActionType; + //所属部门修改后更新负责部门下拉框数据 + updateSchema([ + { + field: 'departIds', + componentProps: { options }, + }, + ]); + //update-begin---author:wangshuai---date:2024-05-11---for:【issues/1222】用户编辑界面“所属部门”与“负责部门”联动出错整--- + if(!values){ + formModel.departIds = []; + return; + } + //update-end---author:wangshuai---date:2024-05-11---for:【issues/1222】用户编辑界面“所属部门”与“负责部门”联动出错整--- + //所属部门修改后更新负责部门数据 + formModel.departIds && (formModel.departIds = formModel.departIds.filter((item) => values.value.indexOf(item) > -1)); + }, + }; + }, + }, + /*{ + label: '租户', + field: 'relTenantIds', + component: 'ApiSelect', + componentProps: { + mode: 'multiple', + api: getAllTenantList, + numberToString: true, + labelField: 'name', + valueField: 'id', + immediate: false, + }, + }, + { + label: '身份', + field: 'userIdentity', + component: 'RadioGroup', + defaultValue: 1, + componentProps: ({ formModel }) => { + return { + options: [ + { label: '普通用户', value: 1, key: '1' }, + { label: '上级', value: 2, key: '2' }, + ], + onChange: () => { + formModel.userIdentity == 1 && (formModel.departIds = []); + }, + }; + }, + },*/ + { + label: '负责部门', + field: 'departIds', + component: 'Select', + componentProps: { + mode: 'multiple', + }, + ifShow: ({ values }) => values.userIdentity == 2, + }, + { + label: '头像', + field: 'avatar', + component: 'JImageUpload', + componentProps: { + fileMax: 1, + }, + }, + { + label: '生日', + field: 'birthday', + component: 'DatePicker', + }, + { + label: '性别', + field: 'sex', + component: 'JDictSelectTag', + componentProps: { + dictCode: 'sex', + placeholder: '请选择性别', + stringToNumber: true, + }, + }, + { + label: '邮箱', + field: 'email', + component: 'Input', + required: true, + dynamicRules: ({ model, schema }) => { + return [ + { ...rules.duplicateCheckRule('sys_user', 'email', model, schema, true)[0], trigger: 'blur' }, + { ...rules.rule('email', false)[0], trigger: 'blur' }, + ]; + }, + }, + { + label: '手机号码', + field: 'phone', + component: 'Input', + required: true, + dynamicRules: ({ model, schema }) => { + return [ + { ...rules.duplicateCheckRule('sys_user', 'phone', model, schema, true)[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: true, + }, + },*/ +]; + +export const formPasswordSchema: FormSchema[] = [ + { + label: '用户账号', + field: 'username', + component: 'Input', + componentProps: { readOnly: true }, + }, + { + label: '登录密码', + field: 'password', + component: 'StrengthMeter', + componentProps: { + placeholder: '请输入登录密码', + }, + rules: [ + { + required: true, + message: '请输入登录密码', + }, + { + pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, + message: '密码由8位数字、大小写字母和特殊符号组成!', + }, + ], + }, + { + label: '确认密码', + field: 'confirmPassword', + component: 'InputPassword', + dynamicRules: ({ values }) => rules.confirmPassword(values, true), + }, +]; + +export const formAgentSchema: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, + { + field: 'userName', + label: '用户名', + component: 'Input', + componentProps: { + readOnly: true, + allowClear: false, + }, + }, + { + field: 'agentUserName', + label: '代理人用户名', + required: true, + component: 'JSelectUser', + componentProps: { + rowKey: 'username', + labelKey: 'realname', + maxSelectCount: 10, + }, + }, + { + field: 'startTime', + label: '代理开始时间', + component: 'DatePicker', + required: true, + componentProps: { + showTime: true, + valueFormat: 'YYYY-MM-DD HH:mm:ss', + placeholder: '请选择代理开始时间', + getPopupContainer: () => document.body, + }, + }, + { + field: 'endTime', + label: '代理结束时间', + component: 'DatePicker', + required: true, + componentProps: { + showTime: true, + valueFormat: 'YYYY-MM-DD HH:mm:ss', + placeholder: '请选择代理结束时间', + getPopupContainer: () => document.body, + }, + }, + { + field: 'status', + label: '状态', + component: 'JDictSelectTag', + defaultValue: '1', + componentProps: { + dictCode: 'valid_status', + type: 'radioButton', + }, + }, +]; + +export const formQuitAgentSchema: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, + { + field: 'userName', + label: '用户名', + component: 'Input', + componentProps: { + readOnly: true, + allowClear: false, + }, + }, + { + field: 'agentUserName', + label: '交接人员', + //required: true, + component: 'JSelectUser', + componentProps: { + rowKey: 'username', + labelKey: 'realname', + maxSelectCount: 1, + }, + }, + { + field: 'startTime', + label: '交接开始时间', + component: 'DatePicker', + //required: true, + componentProps: { + showTime: true, + valueFormat: 'YYYY-MM-DD HH:mm:ss', + placeholder: '请选择交接开始时间', + getPopupContainer: () => document.body, + }, + }, + { + field: 'endTime', + label: '交接结束时间', + component: 'DatePicker', + //required: true, + componentProps: { + showTime: true, + valueFormat: 'YYYY-MM-DD HH:mm:ss', + placeholder: '请选择交接结束时间', + getPopupContainer: () => document.body, + }, + }, + { + field: 'status', + label: '状态', + component: 'JDictSelectTag', + defaultValue: '1', + componentProps: { + dictCode: 'valid_status', + type: 'radioButton', + }, + }, +]; + +//租户用户列表 +export const userTenantColumns: BasicColumn[] = [ + { + title: '用户账号', + dataIndex: 'username', + width: 120, + }, + { + title: '用户姓名', + dataIndex: 'realname', + width: 100, + }, + { + title: '头像', + dataIndex: 'avatar', + width: 120, + customRender: render.renderAvatar, + }, + { + title: '手机号', + dataIndex: 'phone', + width: 100, + }, + { + title: '部门', + width: 150, + dataIndex: 'orgCodeTxt', + }, + { + title: '状态', + dataIndex: 'status', + width: 80, + customRender: ({ text }) => { + if (text === '1') { + return '正常'; + } else if (text === '3') { + return '审批中'; + } else { + return '已拒绝'; + } + }, + }, +]; + +//用户租户搜索表单 +export const userTenantFormSchema: FormSchema[] = [ + { + 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: true, + }, + colProps: { span: 6 }, + }, +]; diff --git a/jeecgboot-vue3/src/views/system/kejijuuser/userDetails.vue b/jeecgboot-vue3/src/views/system/kejijuuser/userDetails.vue new file mode 100644 index 0000000..c0a8cd4 --- /dev/null +++ b/jeecgboot-vue3/src/views/system/kejijuuser/userDetails.vue @@ -0,0 +1,54 @@ + +