diff --git a/kicc-platform/kicc-platform-biz/kicc-system-biz/src/main/java/com/cloud/kicc/system/controller/UserController.java b/kicc-platform/kicc-platform-biz/kicc-system-biz/src/main/java/com/cloud/kicc/system/controller/UserController.java
index 24f77ba6..2f882624 100644
--- a/kicc-platform/kicc-platform-biz/kicc-system-biz/src/main/java/com/cloud/kicc/system/controller/UserController.java
+++ b/kicc-platform/kicc-platform-biz/kicc-system-biz/src/main/java/com/cloud/kicc/system/controller/UserController.java
@@ -26,6 +26,7 @@ import com.cloud.kicc.common.security.util.SecurityUtils;
import com.pig4cloud.plugin.excel.annotation.ResponseExcel;
import com.pig4cloud.plugin.excel.annotation.Sheet;
import lombok.AllArgsConstructor;
+import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
@@ -45,8 +46,8 @@ import java.util.stream.Collectors;
* @Date: 2022/2/24
*/
@RestController
+@RequiredArgsConstructor
@RequestMapping(AppConstants.APP_SYSTEM + "/user")
-@AllArgsConstructor
public class UserController {
private final UserService userService;
@@ -134,10 +135,10 @@ public class UserController {
@GetMapping("/profile")
public R profile() {
- KiccUser entfrmUser = SecurityUtils.getUser();
- if (entfrmUser != null) {
+ KiccUser kiccUser = SecurityUtils.getUser();
+ if (kiccUser != null) {
ResultVo resultVo = new ResultVo();
- User user = userService.getById(entfrmUser.getId() + "");
+ User user = userService.getById(kiccUser.getId() + "");
if (user != null) {
String roleNames = SecurityUtils.getRoles().stream().map(roleId -> roleService.getById(roleId).getName())
.collect(Collectors.joining(","));
diff --git a/kicc-register/src/main/resources/bootstrap.yml b/kicc-register/src/main/resources/bootstrap.yml
index 8f8d08c7..529290f1 100644
--- a/kicc-register/src/main/resources/bootstrap.yml
+++ b/kicc-register/src/main/resources/bootstrap.yml
@@ -7,7 +7,7 @@ db:
user: ${MYSQL_USER:root}
password: ${MYSQL_PWD:root}
url:
- 0: jdbc:mysql://${MYSQL_HOST:120.26.168.56}:${MYSQL_PORT:8052}/${MYSQL_DB:kicc_config}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+ 0: jdbc:mysql://${MYSQL_HOST:127.0.0.1}:${MYSQL_PORT:3306}/${MYSQL_DB:kicc_config}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
nacos:
core:
diff --git a/kicc-ui/src/views/system/user/DeptTree.vue b/kicc-ui/src/views/system/user/DeptTree.vue
index 6e0a6a46..41c7f291 100644
--- a/kicc-ui/src/views/system/user/DeptTree.vue
+++ b/kicc-ui/src/views/system/user/DeptTree.vue
@@ -13,7 +13,8 @@
diff --git a/kicc-ui/src/views/system/user/UserDetail.vue b/kicc-ui/src/views/system/user/UserDetail.vue
deleted file mode 100644
index 8a5d68ea..00000000
--- a/kicc-ui/src/views/system/user/UserDetail.vue
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
- 禁用账号
- 修改密码
-
-
-
-
-
-
-
-
-
- 这是用户{{ userId }}资料Tab
-
-
- 这是用户{{ userId }}操作日志Tab
-
-
-
-
-
-
-
-
diff --git a/kicc-ui/src/views/system/user/UserModal.vue b/kicc-ui/src/views/system/user/UserModal.vue
index 58b6ccb0..b5fcfe81 100644
--- a/kicc-ui/src/views/system/user/UserModal.vue
+++ b/kicc-ui/src/views/system/user/UserModal.vue
@@ -1,73 +1,95 @@
-
-
+
+
diff --git a/kicc-ui/src/views/system/user/index.vue b/kicc-ui/src/views/system/user/index.vue
index 63b64743..a6886fbe 100644
--- a/kicc-ui/src/views/system/user/index.vue
+++ b/kicc-ui/src/views/system/user/index.vue
@@ -1,155 +1,182 @@
-
+
-
+
- 新增用户
- 新增用户
+ 修改用户
- 删除用户
-
-
-
+
+
+
diff --git a/kicc-ui/src/views/system/user/user.data.ts b/kicc-ui/src/views/system/user/user.data.ts
index 711ffd5a..54959cd3 100644
--- a/kicc-ui/src/views/system/user/user.data.ts
+++ b/kicc-ui/src/views/system/user/user.data.ts
@@ -1,8 +1,8 @@
-// import { roleAllList } from './../../../api/system/role';
import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { h } from 'vue';
import { Tag } from 'ant-design-vue';
+import { listRole } from '/@/api/system/role';
export const columns: BasicColumn[] = [
{
@@ -55,113 +55,155 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 8 },
},
{
- field: 'startDate',
- label: '起始时间',
- component: 'DatePicker',
- colProps: { span: 8 },
- },
- {
- field: 'endDate',
- label: '截止时间',
- component: 'DatePicker',
- colProps: { span: 8 },
- },
+ field: 'dateRange',
+ label: '创建时间',
+ component: 'RangePicker',
+ componentProps: {
+ style: { width:'100%' },
+ valueFormat: 'YYYY-MM-DD',
+ placeholder: ['开始日期','结束日期']
+ },
+ colProps: { span: 8 }
+ }
];
-export const accountFormSchema: FormSchema[] = [
+export const userFormSchema: FormSchema[] = [
{
field: 'id',
label: 'ID',
component: 'Input',
- show: false,
+ show: false
},
{
- field: 'account',
- label: '用户名',
+ field: 'nickName',
+ label: '用户昵称',
component: 'Input',
- helpMessage: ['本字段演示异步验证', '不能输入带有admin的用户名'],
- },
- {
- field: 'pwd',
- label: '密码',
- component: 'InputPassword',
- required: true,
- ifShow: false,
- },
- {
- field: 'sex',
- label: '性别',
- component: 'RadioButtonGroup',
- defaultValue: 1,
- componentProps: {
- options: [
- { label: '男', value: 1 },
- { label: '女', value: 2 },
- ],
- },
- },
- {
- label: '授权角色',
- field: 'roleId',
- component: 'ApiSelect',
- componentProps: {
- // api: roleAllList,
- resultField: 'list',
- labelField: 'roleName',
- valueField: 'id',
- },
required: true,
+ colProps: {
+ span: 12
+ }
},
{
- field: 'departId',
- label: '所属部门',
+ field: 'deptId',
+ label: '归属机构',
component: 'TreeSelect',
componentProps: {
replaceFields: {
title: 'name',
key: 'id',
- value: 'id',
+ value: 'id'
},
- getPopupContainer: () => document.body,
+ getPopupContainer: () => document.body
},
required: true,
+ colProps: {
+ span: 12
+ }
},
{
- field: 'realName',
- label: '姓名',
+ field: 'phone',
+ label: '手机号',
component: 'Input',
required: true,
+ rules: [
+ {
+ required: true,
+ message: '请输入手机号!',
+ },
+ {
+ pattern: new RegExp('^1[3|4|5|6|7|8|9][0-9]\\d{8}$'),
+ message: '请输入正确的手机号码!',
+ validateTrigger: 'blur'
+ }
+ ]
},
{
- field: 'name',
- label: '昵称',
+ field: 'email',
+ label: '邮箱',
component: 'Input',
required: true,
+ rules: [
+ {
+ required: true,
+ message: '请输入邮箱!',
+ },
+ {
+ type: 'email',
+ message: '请输入正确的邮箱地址!',
+ validateTrigger: ['blur', 'change']
+ }
+ ]
},
-
{
- label: '邮箱',
- field: 'email',
+ field: 'userName',
+ label: '用户名',
component: 'Input',
required: true,
+ colProps: {
+ span: 12
+ }
+ },
+ {
+ field: 'password',
+ label: '密码',
+ component: 'InputPassword',
+ required: true,
+ colProps: {
+ span: 12
+ }
+ },
+ {
+ field: 'sex',
+ label: '性别',
+ component: 'Select',
+ required: true,
+ componentProps: {
+ options: [
+ { label: '男', value: '0' },
+ { label: '女', value: '1' }
+ ]
+ },
+ colProps: {
+ span: 12
+ }
},
{
field: 'status',
label: '状态',
- component: 'RadioButtonGroup',
+ component: 'RadioGroup',
defaultValue: '0',
componentProps: {
options: [
- { label: '在职', value: '0' },
- { label: '离职', value: '1' },
- ],
+ { label: '正常', value: '0' },
+ { label: '停用', value: '1' }
+ ]
},
+ colProps: {
+ span: 12
+ }
+ },
+ {
+ field: 'roleIds',
+ label: '授权角色',
+ component: 'ApiSelect',
+ componentProps: {
+ mode: 'multiple',
+ api: listRole,
+ labelField: 'name',
+ valueField: 'id'
+ },
+ colProps: {
+ span: 12
+ }
},
{
label: '备注',
- field: 'remark',
+ field: 'remarks',
component: 'InputTextArea',
- },
+ colProps: {
+ span: 24
+ }
+ }
];
export const passwordFormSchema: FormSchema[] = [