diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/SysUser.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/SysUser.java
index 819c042..7a935fb 100644
--- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/SysUser.java
+++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/SysUser.java
@@ -222,4 +222,7 @@ public class SysUser implements Serializable {
*/
@TableField(exist = false)
private boolean izBindThird;
+
+ @TableField(exist = false)
+ private String roleCode;
}
diff --git a/jeecgboot-vue3/src/views/declarant/user.data.ts b/jeecgboot-vue3/src/views/declarant/user.data.ts
index 3fdc867..9c1276f 100644
--- a/jeecgboot-vue3/src/views/declarant/user.data.ts
+++ b/jeecgboot-vue3/src/views/declarant/user.data.ts
@@ -51,7 +51,7 @@ export const columns: BasicColumn[] = [
// },
{
title: '状态',
- //dataIndex: 'orgCategory_dictText',
+ // dataIndex: 'orgCategory_dictText',
dataIndex: 'status_dictText',
width: 80,
},
@@ -96,7 +96,7 @@ export const searchFormSchema: FormSchema[] = [
label: '名字',
field: 'realname',
component: 'JInput',
- //colProps: { span: 6 },
+ //colProps: { span: 6 },
},
// {
// label: '性别',
@@ -124,7 +124,7 @@ export const searchFormSchema: FormSchema[] = [
placeholder: '请选择状态',
stringToNumber: true,
},
- //colProps: { span: 6 },
+ //colProps: { span: 6 },
},
];
@@ -175,7 +175,7 @@ export const formSchema: FormSchema[] = [
required: true,
component: 'Input',
},
- {
+ /*{
label: '工号',
field: 'workNo',
required: true,
@@ -190,7 +190,7 @@ export const formSchema: FormSchema[] = [
componentProps: {
labelKey: 'name',
},
- },
+ },*/
{
label: '角色',
field: 'selectedroles',
@@ -234,7 +234,7 @@ export const formSchema: FormSchema[] = [
};
},
},
- {
+ /*{
label: '租户',
field: 'relTenantIds',
component: 'ApiSelect',
@@ -263,8 +263,8 @@ export const formSchema: FormSchema[] = [
},
};
},
- },
- {
+ },*/
+ /*{
label: '负责部门',
field: 'departIds',
component: 'Select',
@@ -272,7 +272,7 @@ export const formSchema: FormSchema[] = [
mode: 'multiple',
},
ifShow: ({ values }) => values.userIdentity == 2,
- },
+ },*/
{
label: '头像',
field: 'avatar',
@@ -320,13 +320,13 @@ export const formSchema: FormSchema[] = [
];
},
},
- {
+ /*{
label: '座机',
field: 'telephone',
component: 'Input',
rules: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请输入正确的座机号码' }],
- },
- {
+ },*/
+ /*{
label: '工作流引擎',
field: 'activitiSync',
defaultValue: 1,
@@ -336,7 +336,7 @@ export const formSchema: FormSchema[] = [
type: 'radio',
stringToNumber: true,
},
- },
+ },*/
];
export const formPasswordSchema: FormSchema[] = [
diff --git a/jeecgboot-vue3/src/views/declarantUnit/declarantUnitList.vue b/jeecgboot-vue3/src/views/declarantUnit/declarantUnitList.vue
index 2518599..fc51348 100644
--- a/jeecgboot-vue3/src/views/declarantUnit/declarantUnitList.vue
+++ b/jeecgboot-vue3/src/views/declarantUnit/declarantUnitList.vue
@@ -22,7 +22,7 @@
-
+
@@ -38,212 +38,215 @@
diff --git a/jeecgboot-vue3/src/views/system/depart/components/DepartLeftTree.vue b/jeecgboot-vue3/src/views/system/depart/components/DepartLeftTree.vue
index e9dd0b9..780d137 100644
--- a/jeecgboot-vue3/src/views/system/depart/components/DepartLeftTree.vue
+++ b/jeecgboot-vue3/src/views/system/depart/components/DepartLeftTree.vue
@@ -3,12 +3,12 @@
新增
添加下级
-
- 导入
-
+
导出
-
+
@@ -92,10 +92,11 @@
import { useModal } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage';
import { useMethods } from '/@/hooks/system/useMethods';
- import { Api, deleteBatchDepart, queryDepartTreeSync } from '../depart.api';
+ import { Api, deleteBatchDepart, queryDepartTreeSync4ZhuGuanBuMen } from '../depart.api';
import { searchByKeywords } from '/@/views/system/departUser/depart.user.api';
import DepartFormModal from '/@/views/system/depart/components/DepartFormModal.vue';
import { Popconfirm } from 'ant-design-vue';
+ import {useUserStore} from "@/store/modules/user";
const prefixCls = inject('prefixCls');
const emit = defineEmits(['select', 'rootTreeData']);
@@ -124,13 +125,16 @@
// 注册 modal
const [registerModal, { openModal }] = useModal();
+ const userStore = useUserStore();
// 加载顶级部门信息
async function loadRootTreeData() {
try {
loading.value = true;
treeData.value = [];
- const result = await queryDepartTreeSync();
+ const result = await queryDepartTreeSync4ZhuGuanBuMen({
+ parentOrgCode: userStore.getUserInfo.orgCode,
+ });
if (Array.isArray(result)) {
treeData.value = result;
}
@@ -158,8 +162,9 @@
// 加载子级部门信息
async function loadChildrenTreeData(treeNode) {
try {
- const result = await queryDepartTreeSync({
- pid: treeNode.dataRef.id,
+ const result = await queryDepartTreeSync4ZhuGuanBuMen({
+ // pid: treeNode.dataRef.id,
+ parentOrgCode: treeNode.dataRef.orgCode,
});
if (result.length == 0) {
treeNode.dataRef.isLeaf = true;
diff --git a/jeecgboot-vue3/src/views/system/depart/depart.api.ts b/jeecgboot-vue3/src/views/system/depart/depart.api.ts
index f224f49..53fcaae 100644
--- a/jeecgboot-vue3/src/views/system/depart/depart.api.ts
+++ b/jeecgboot-vue3/src/views/system/depart/depart.api.ts
@@ -6,6 +6,7 @@ const { createConfirm } = useMessage();
export enum Api {
queryDepartTreeSync = '/sys/sysDepart/queryDepartTreeSync',
+ queryDepartTreeSync4ZhuGuanBuMen = '/sys/sysDepart/queryDepartTreeSync4ZhuGuanBuMen',
save = '/sys/sysDepart/add',
edit = '/sys/sysDepart/edit',
delete = '/sys/sysDepart/delete',
@@ -31,6 +32,9 @@ export enum Api {
*/
export const queryDepartTreeSync = (params?) => defHttp.get({ url: Api.queryDepartTreeSync, params });
+// 根据当前登录角色查询 主管部门数据 add by zhc 11.09
+export const queryDepartTreeSync4ZhuGuanBuMen = (params?) => defHttp.get({ url: Api.queryDepartTreeSync4ZhuGuanBuMen, params });
+
/**
* 保存或者更新部门角色
*/
diff --git a/jeecgboot-vue3/src/views/system/depart/depart.data.ts b/jeecgboot-vue3/src/views/system/depart/depart.data.ts
index 1912498..8aa40a3 100644
--- a/jeecgboot-vue3/src/views/system/depart/depart.data.ts
+++ b/jeecgboot-vue3/src/views/system/depart/depart.data.ts
@@ -81,10 +81,13 @@ export function useBasicFormSchema() {
// 机构类型选项
export const orgCategoryOptions = {
// 一级部门
- root: [{ value: '1', label: '市直' }],
+ // root: [{ value: '1', label: '公司' }],
+ root: [{ value: '1', label: '管理单位' }],
// 子级部门
child: [
- { value: '2', label: '市直' },
- { value: '3', label: '县区' },
+ // { value: '2', label: '部门' },
+ { value: '2', label: '直属法人单位' },
+ // { value: '3', label: '岗位' },
+ { value: '3', label: '县区法人单位' },
],
};
diff --git a/jeecgboot-vue3/src/views/system/departUser/depart.user.data.ts b/jeecgboot-vue3/src/views/system/departUser/depart.user.data.ts
index 4294d06..b6b860e 100644
--- a/jeecgboot-vue3/src/views/system/departUser/depart.user.data.ts
+++ b/jeecgboot-vue3/src/views/system/departUser/depart.user.data.ts
@@ -163,11 +163,14 @@ export function useBaseInfoForm(treeData: Ref) {
label: '机构类型',
render(val) {
if (val === '1') {
- return '市直';
+ // return '公司';
+ return '管理单位';
} else if (val === '2') {
- return '市直';
+ // return '部门';
+ return '直属法人单位';
} else if (val === '3') {
- return '县区';
+ // return '岗位';
+ return '县区法人单位';
}
return val;
},
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 @@
+
+
+
+
diff --git a/jeecgboot-vue3/types/store.d.ts b/jeecgboot-vue3/types/store.d.ts
index 7b9349a..96e2661 100644
--- a/jeecgboot-vue3/types/store.d.ts
+++ b/jeecgboot-vue3/types/store.d.ts
@@ -40,6 +40,7 @@ export interface UserInfo {
homePath?: string;
tenantid?: string | number;
roles: RoleInfo[];
+ roleCode: string;
orgCode?: string;
}