diff --git a/config/vite.config.dev.ts b/config/vite.config.dev.ts
index 6e3a086..75f7f76 100644
--- a/config/vite.config.dev.ts
+++ b/config/vite.config.dev.ts
@@ -13,8 +13,8 @@ export default mergeConfig(
},
proxy: {
'/api': {
- target: 'http://59.110.238.182:8081',
- // target: 'http://192.168.3.158:8081',
+ target: 'http://106.53.179.133:8081',
+ // target: 'http://192.168.243.246:8081',
// target: 'http://localhost:5173',
changeOrigin: true,
},
diff --git a/index.html b/index.html
index 3eeb81f..a8bba25 100644
--- a/index.html
+++ b/index.html
@@ -3,10 +3,9 @@
-
+
- 中山学院学习平台
+ 票据管理系统
diff --git a/package.json b/package.json
index 67786de..a86716a 100644
--- a/package.json
+++ b/package.json
@@ -13,10 +13,7 @@
"type:check": "vue-tsc --noEmit --skipLibCheck",
"lint-staged": "npx lint-staged",
"prepare": "husky install",
-
"start": "npm run dev"
-
-
},
"lint-staged": {
"*.{js,ts,jsx,tsx}": [
@@ -40,6 +37,8 @@
"axios": "^0.24.0",
"dayjs": "^1.11.5",
"echarts": "^5.4.0",
+ "exceljs": "^4.4.0",
+ "file-saver": "^2.0.5",
"lodash": "^4.17.21",
"mitt": "^3.0.0",
"nprogress": "^0.2.0",
@@ -50,12 +49,14 @@
"vue": "^3.2.40",
"vue-echarts": "^6.2.3",
"vue-i18n": "^9.2.2",
- "vue-router": "^4.0.14"
+ "vue-router": "^4.0.14",
+ "xlsx": "^0.18.5"
},
"devDependencies": {
"@arco-plugins/vite-vue": "^1.4.5",
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
+ "@types/file-saver": "^2.0.7",
"@types/lodash": "^4.14.186",
"@types/mockjs": "^1.0.7",
"@types/nprogress": "^0.2.0",
diff --git a/src/api/interceptor.ts b/src/api/interceptor.ts
index 360865f..b9f43c9 100644
--- a/src/api/interceptor.ts
+++ b/src/api/interceptor.ts
@@ -75,10 +75,12 @@ axios.interceptors.response.use(
const { response } = error;
console.log('error', error);
- if (response.status === '401') {
+ if (response.status === 401) {
+
router.push({
name: 'login',
});
+
}
else {
Message.error({
diff --git a/src/api/role.ts b/src/api/role.ts
index 9681312..1587fc2 100644
--- a/src/api/role.ts
+++ b/src/api/role.ts
@@ -18,8 +18,13 @@ export interface RoleListRecord extends RoleRecord {
}
// 查询所有的角色列表、
-export function queryRoleList() {
- return axios.get('/api/rest/role');
+export function queryRoleList(data: any) {
+ // return axios.get('/api/rest/role',data);
+ return axios({
+ url: '/api/rest/role', // 路径
+ method: 'get',
+ params: data, // 参数
+ })
}
// 切换启用状态
diff --git a/src/api/ticket.ts b/src/api/ticket.ts
index d22ebec..d470181 100644
--- a/src/api/ticket.ts
+++ b/src/api/ticket.ts
@@ -7,7 +7,7 @@ export interface TicketCreateRecord {
type: string;
contactEmail: string;
companyName: string;
- attachId: string;
+ attachId: [];
auditorId: string;
submit: boolean;
userId: undefined;
@@ -15,6 +15,9 @@ export interface TicketCreateRecord {
}
export interface TicketRecord extends TicketCreateRecord {
+auditor: any;
+createTime(createTime: any): unknown;
+deptName: any;
value: any;
id: undefined;
status: string
@@ -83,3 +86,8 @@ export function home(data: any){
params: data, // 参数
});
}
+
+// 首页统计图
+export function chart(){
+ return axios.get('/api/rest/bill/trend')
+}
\ No newline at end of file
diff --git a/src/api/user.ts b/src/api/user.ts
index c2b13be..5e532d5 100644
--- a/src/api/user.ts
+++ b/src/api/user.ts
@@ -29,6 +29,8 @@ export interface PasswordReSetModel {
// 添加用户数据
export interface CreateRecord {
+value: any;
+code: any;
username: string;
nickName: string;
@@ -107,10 +109,15 @@ export function resetPassword(data: PasswordReSetModel) {
}
// 注册用户
-export function create(data: CreateRecord) {
+export function register(data: CreateRecord) {
return axios.post('/api/rest/user/register', data);
}
+// 新建用户
+export function create(data: CreateRecord) {
+ return axios.post('/api/rest/user', data);
+}
+
// 模糊查询用户列表
export function queryUserList(params: any) {
return axios({
@@ -158,6 +165,11 @@ export function deptAudit(id: string,roleId:string){
});
}
+// 获取验证码
+export function code(data: string){
+ return axios.get(`/api/rest/user/send-email?email=${data}`);
+}
+
export function switchRole(roleId: number) {
return axios.patch(`/api/user/self/switch-role/${roleId}`);
}
diff --git a/src/components/footer/index.vue b/src/components/footer/index.vue
index 9a250cc..9ba905a 100644
--- a/src/components/footer/index.vue
+++ b/src/components/footer/index.vue
@@ -1,16 +1,16 @@
-
+
diff --git a/src/components/navbar/index.vue b/src/components/navbar/index.vue
index cc2c7ae..70ca45e 100644
--- a/src/components/navbar/index.vue
+++ b/src/components/navbar/index.vue
@@ -2,10 +2,7 @@
-
+
+ {{
+ userStore.nickName
+ }}
({
+ header: item.title,
+ key: item.key,
+ width: 20
+ }));
+ // 表格内容添加
+ rows.map(item => sheet1.addRow(item));
+ workbook.xlsx.writeBuffer().then(buffer => {
+ saveAs(
+ new Blob([buffer], { type: 'application/octet-stream' }),
+ `${name}.xlsx`
+ );
+ });
+};
+
+
+// 读取文件为json格式
+export function readExcle(fileItem:FileItem) {
+ console.log('读取文件...',fileItem);
+ return new Promise((resove,reject)=>{
+ try {
+ let workbook:XLSX.Sheet;
+ const reader = new FileReader();
+ reader.readAsBinaryString(fileItem.file as File); // 发起异步请求
+ reader.onload = function(ev){
+ const data = ev.target?.result;
+ workbook = XLSX.read(data, {type: 'binary'});
+ const sheetNames = workbook.SheetNames; // 工作表名称集合
+ sheetNames.forEach((name:string) => {
+ const worksheet = workbook.Sheets[name]; // 只能通过工作表名称来获取指定工作表
+ const jsonres = XLSX.utils.sheet_to_json(worksheet);
+ resove(jsonres)
+ });
+ } // onload
+ } catch (error) {
+ Message.error('读取失败,请选择正确文件');
+ reject(error);
+ }
+ })
+}
+
diff --git a/src/views/dashboard/workplace/components/data-panel.vue b/src/views/dashboard/workplace/components/data-panel.vue
index 53ccd03..460efa5 100644
--- a/src/views/dashboard/workplace/components/data-panel.vue
+++ b/src/views/dashboard/workplace/components/data-panel.vue
@@ -1,114 +1,122 @@
-
-
-
-
-
-
-
-
- {{ $t('workplace.pecs') }}
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('workplace.pecs') }}
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('workplace.pecs') }}
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('workplace.pecs') }}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {{ $t('workplace.pecs') }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('workplace.pecs') }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('workplace.pecs') }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('workplace.pecs') }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/login/locale/en-US.ts b/src/views/login/locale/en-US.ts
index 8611b12..f7f36e1 100644
--- a/src/views/login/locale/en-US.ts
+++ b/src/views/login/locale/en-US.ts
@@ -1,11 +1,11 @@
export default {
'login.form.title': 'ZSC Learning Platform',
- 'login.form.userName.errMsg': 'Username cannot be empty',
+ 'login.form.userName.errMsg': 'Username cannot be empty(Email)',
'login.form.password.errMsg': 'Password cannot be empty',
'login.form.login.errMsg': 'Login error, refresh and try again',
'login.form.login.success': 'welcome to use',
- 'login.form.userName.placeholder': 'Username: admin',
- 'login.form.password.placeholder': 'Password: admin',
+ 'login.form.userName.placeholder': 'Username(Email)',
+ 'login.form.password.placeholder': 'Password',
'login.form.rememberPassword': 'Remember password',
'login.form.forgetPassword': 'Forgot password',
'login.form.login': 'login',
diff --git a/src/views/login/locale/zh-CN.ts b/src/views/login/locale/zh-CN.ts
index eb6d97c..b9b32be 100644
--- a/src/views/login/locale/zh-CN.ts
+++ b/src/views/login/locale/zh-CN.ts
@@ -1,6 +1,6 @@
export default {
- 'login.form.title': '中山学院学习平台',
- 'login.form.userName.errMsg': '用户名不能为空',
+ 'login.form.title': '票据管理系统',
+ 'login.form.userName.errMsg': '账号不能为空',
'login.form.password.errMsg': '密码不能为空',
'login.form.login.errMsg': '登录出错,请刷新重试',
'login.form.login.success': '欢迎使用',
@@ -10,11 +10,15 @@ export default {
'login.form.forgetPassword': '忘记密码',
'login.form.login': '登录',
'login.form.register': '注册账号',
- 'login.banner.slogan1': '开箱即用的高质量模板',
- 'login.banner.subSlogan1': '丰富的的页面模板,覆盖大多数典型业务场景',
- 'login.banner.slogan2': '内置了常见问题的解决方案',
- 'login.banner.subSlogan2': '国际化,路由配置,状态管理应有尽有',
- 'login.banner.slogan3': '接入可视化增强工具AUX',
- 'login.banner.subSlogan3': '实现灵活的区块式开发',
- 'create.user': '注册用户'
+
+ 'login.banner.slogan1': '数据查询',
+ 'login.banner.subSlogan1': '用户可以通过关键词、条件组合等方式进行快速查询和检索',
+ 'login.banner.slogan2': '数据存储',
+ 'login.banner.subSlogan2': '系统具备强大的数据存储功能,能够将海量数据存储在数据库中',
+ 'login.banner.slogan3': '数据输出',
+ 'login.banner.subSlogan3': '系统可以将查询和分析结果以表格和图表导出',
+
+ 'create.user': '注册用户',
+ 'user.info.emailCode.placeholder':'请输入Email(用于获取验证码)',
+ 'user.info.email.required':'Email不能为空',
};
diff --git a/src/views/system/dept/components/dept-edit.vue b/src/views/system/dept/components/dept-edit.vue
index 8b1a3f8..8d3e690 100644
--- a/src/views/system/dept/components/dept-edit.vue
+++ b/src/views/system/dept/components/dept-edit.vue
@@ -1,25 +1,26 @@
- {{ modalTitle }}
+ {{ t('create') }}
- {{ modalTitle }}
+
+ {{ t('edit') }}
{{ modalTitle }}
-
+
@@ -58,7 +60,7 @@ const props = defineProps({
});
const { t } = useI18n();
const modalTitle = computed(() => {
- return props.isCreate ? t('create') : t('edit');
+ return props.isCreate ? t('createDept') : t('editDept');
});
const { visible, setVisible } = useVisible(false);
const deptStore = useDeptStore();
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index 7182660..771ff40 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -1,13 +1,13 @@
-
+
@@ -118,6 +118,8 @@
:data="renderData"
:bordered="false"
:size="size"
+ :pagination="false"
+ style="margin-bottom: 40px"
>
{{ rowIndex + 1 }}
@@ -146,12 +148,28 @@
type="error"
@ok="handleDelete(record)"
>
-
+
+
{{ $t('delete') }}
+
@@ -161,6 +179,7 @@ import { computed, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import useLoading from '@/hooks/loading';
import useTableOption from '@/hooks/table-option';
+import { Pagination } from '@/types/global';
import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
import dayjs from 'dayjs';
import { Message } from '@arco-design/web-vue';
@@ -187,6 +206,12 @@ const generateFormModel = () => {
code: '',
};
};
+const pagination: Pagination = {
+ page: 1,
+ size: 10,
+ current: 1,
+ total: 10,
+};
const { t } = useI18n();
const renderData = ref([]);
@@ -202,10 +227,16 @@ const columns = computed(() => [
{
title: t('deptTable.columns.name'),
dataIndex: 'name',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
},
{
title: t('deptTable.columns.id'),
dataIndex: 'id',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
},
{
title: t('deptTable.columns.remark'),
@@ -215,6 +246,9 @@ const columns = computed(() => [
title: t('deptTable.columns.createTime'),
dataIndex: 'createTime',
slotName: 'createTime',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
},
{
title: t('deptTable.columns.enabled'),
@@ -233,8 +267,11 @@ const fetchData = async (params?: Partial) => {
setLoading(true);
try {
const res = await deptStore.getDeptList(params);
- const { data } = res;
- renderData.value = data;
+
+ renderData.value = res.data.records;
+ pagination.page = res.data.page;
+ pagination.current = res.data.current;
+ pagination.total = res.data.total;
} catch (err) {
// you can report use errorHandler or other
} finally {
@@ -245,12 +282,26 @@ const fetchData = async (params?: Partial) => {
// 查询
const search = () => {
fetchData({
+ ...pagination,
...formModel.value,
- });
+ } as unknown as any);
};
search();
+// 分页发生改变
+const onPageChange = (current: number) => {
+ pagination.page = current;
+ pagination.current = current;
+ search();
+};
+
+// 数据条数改变
+const onSizeChange = (size: number) => {
+ pagination.size = size;
+ search();
+};
+
// 重置
const reset = () => {
formModel.value = generateFormModel();
diff --git a/src/views/system/dept/locale/en-US.ts b/src/views/system/dept/locale/en-US.ts
index 8e0c5ba..221edab 100644
--- a/src/views/system/dept/locale/en-US.ts
+++ b/src/views/system/dept/locale/en-US.ts
@@ -21,5 +21,9 @@ export default {
'dept.info.remark': 'Remark',
'dept.info.remark.placeholder': 'Please enter Remark',
- 'Confirm the deletion of this department' :'Confirm the deletion of this department?'
+ 'Confirm the deletion of this department' :'Confirm the deletion of this department?',
+
+ // modalTitle
+ 'createDept': 'Create Dept',
+ 'editDept': 'Edit Dept Info'
};
diff --git a/src/views/system/dept/locale/zh-CN.ts b/src/views/system/dept/locale/zh-CN.ts
index ccf02a0..586576a 100644
--- a/src/views/system/dept/locale/zh-CN.ts
+++ b/src/views/system/dept/locale/zh-CN.ts
@@ -5,8 +5,8 @@ export default {
'searchTable.form.deptName.placeholder': '请输入部门名称',
'deptTable.columns.index': '序号',
- 'deptTable.columns.name': '区域名称',
- 'deptTable.columns.id': '区域ID',
+ 'deptTable.columns.name': '部门名称',
+ 'deptTable.columns.id': '部门ID',
'deptTable.columns.remark': '备注',
'deptTable.columns.enabled': '是否启用',
'deptTable.columns.createTime': '创建时间',
@@ -21,5 +21,10 @@ export default {
'dept.info.remark': '备注',
'dept.info.remark.placeholder': '请输入备注',
- 'Confirm the deletion of this department' :'确认删除此部门?'
+ 'Confirm the deletion of this department' :'确认删除此部门?',
+
+
+ // modalTitle
+ 'createDept': '新增部门',
+ 'editDept': '修改部门信息'
};
diff --git a/src/views/system/role/components/role-edit.vue b/src/views/system/role/components/role-edit.vue
index 6304321..eb45b3f 100644
--- a/src/views/system/role/components/role-edit.vue
+++ b/src/views/system/role/components/role-edit.vue
@@ -1,25 +1,26 @@
- {{ modalTitle }}
+ {{ t('create') }}
- {{ modalTitle }}
+
+ {{ t('edit') }}
{{ modalTitle }}
-
+
@@ -60,7 +63,7 @@ const props = defineProps({
});
const { t } = useI18n();
const modalTitle = computed(() => {
- return props.isCreate ? t('create') : t('edit');
+ return props.isCreate ? t('createRole') : t('editRole');
});
const { visible, setVisible } = useVisible(false);
const createEditRef = ref();
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index 5e867d6..bca158d 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -1,7 +1,46 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('searchTable.form.search') }}
+
+
+
+
+
+ {{ $t('searchTable.form.reset') }}
+
+
+
+
+
@@ -77,6 +116,7 @@
:bordered="false"
:size="size"
@page-change="onPageChange"
+ style="margin-bottom: 40px"
>
{{ rowIndex + 1 }}
@@ -105,12 +145,28 @@
type="error"
@ok="handleDelete(record)"
>
-
+
+
{{ $t('delete') }}
+
@@ -119,6 +175,7 @@
import { computed, ref, reactive, watch, nextTick } from 'vue';
import { useI18n } from 'vue-i18n';
import useLoading from '@/hooks/loading';
+import { Pagination } from '@/types/global';
import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
import { Message } from '@arco-design/web-vue';
import useTableOption from '@/hooks/table-option';
@@ -143,6 +200,19 @@ const {
deepClone,
} = useTableOption();
const roleStore = useRoleStore();
+const generateFormModel = () => {
+ return {
+ name: undefined,
+ };
+};
+
+const formModel = ref(generateFormModel());
+const pagination: Pagination = {
+ page: 1,
+ size: 10,
+ current: 1,
+ total: 10,
+};
// 表格头部
const columns = computed(() => [
@@ -154,19 +224,21 @@ const columns = computed(() => [
{
title: t('roleTable.columns.name'),
dataIndex: 'name',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
},
{
title: t('roleTable.columns.remark'),
dataIndex: 'remark',
},
- // {
- // title: t('roleTable.columns.authorities'),
- // dataIndex: 'authorities',
- // },
{
title: t('roleTable.columns.createTime'),
dataIndex: 'createTime',
slotName: 'createTime',
+ sortable: {
+ sortDirections: ['ascend', 'descend'],
+ },
},
{
title: t('roleTable.columns.enabled'),
@@ -181,11 +253,15 @@ const columns = computed(() => [
]);
// 获取表格数据
-const fetchData = async () => {
+const fetchData = async (params: any) => {
setLoading(true);
try {
- const res = await roleStore.getRoleList();
- renderData.value = res.data;
+ const res = await roleStore.getRoleList(params);
+ console.log('info', res.data);
+ renderData.value = res.data.records;
+ pagination.page = res.data.page;
+ pagination.current = res.data.current;
+ pagination.total = res.data.total;
} catch (err) {
// you can report use errorHandler or other
} finally {
@@ -193,7 +269,33 @@ const fetchData = async () => {
}
};
-fetchData();
+// 模糊查询
+const search = () => {
+ fetchData({
+ ...pagination,
+ ...formModel.value,
+ } as unknown as any);
+};
+
+search();
+
+// 分页发生改变
+const onPageChange = (current: number) => {
+ pagination.page = current;
+ pagination.current = current;
+ search();
+};
+
+// 数据条数改变
+const onSizeChange = (size: number) => {
+ pagination.size = size;
+ search();
+};
+
+// 重置
+const reset = () => {
+ formModel.value = generateFormModel();
+};
// 是否启用
const enabledStatus = async (record: string) => {
@@ -220,7 +322,7 @@ const handleDelete = async (record: RoleRecord) => {
content: t('delete.role.sucess'),
duration: 5 * 1000,
});
- fetchData();
+ search();
} else {
Message.error({
content: t('delete.role.fail'),
diff --git a/src/views/system/role/locale/en-US.ts b/src/views/system/role/locale/en-US.ts
index 22a7d1d..d78ea57 100644
--- a/src/views/system/role/locale/en-US.ts
+++ b/src/views/system/role/locale/en-US.ts
@@ -14,6 +14,9 @@ export default {
'delete.role.sucess': 'Delete Role Sucess',
'delete.role.fail': 'Delete Role Fail',
+ 'searchTable.form.name':'Name',
+ 'searchTable.form.name.placeholder':'Please enter Name',
+
'role.info.name': 'Name',
'role.info.name.placeholder': 'Please enter Name',
'role.info.name.required': 'Name is required',
@@ -27,4 +30,9 @@ export default {
'modify.status.sucess':'Modify status sucess',
'modify.status.fail':'Modify status fail',
+
+
+ // modalTitle
+ 'createRole': 'Create Role',
+ 'editRole': 'Edit Role Info',
};
diff --git a/src/views/system/role/locale/zh-CN.ts b/src/views/system/role/locale/zh-CN.ts
index 48599b6..5906d53 100644
--- a/src/views/system/role/locale/zh-CN.ts
+++ b/src/views/system/role/locale/zh-CN.ts
@@ -14,6 +14,9 @@ export default {
'delete.role.sucess': '删除角色成功',
'delete.role.fail': '删除角色失败',
+ 'searchTable.form.name':'角色名称',
+ 'searchTable.form.name.placeholder':'请输入角色名称',
+
'role.info.name': '角色名称',
'role.info.name.placeholder': '请输入角色名称',
'role.info.name.required': '角色不能为空',
@@ -27,4 +30,9 @@ export default {
'modify.status.sucess':'修改状态成功',
'modify.status.fail':'修改状态失败',
+
+
+ // modalTitle
+ 'createRole': '新增角色',
+ 'editRole': '修改角色信息'
};
diff --git a/src/views/system/user/components/user-edit.vue b/src/views/system/user/components/user-edit.vue
index 243a337..91065d6 100644
--- a/src/views/system/user/components/user-edit.vue
+++ b/src/views/system/user/components/user-edit.vue
@@ -1,26 +1,27 @@
- {{ modalTitle }}
+ {{ t('create') }}
- {{ modalTitle }}
+
+ {{ t('edit') }}
{{ modalTitle }}
-
+
{{ formData.username }}
-
-
-
+
+
+
+
{
- return props.isCreate ? t('create') : t('edit');
+ return props.isCreate ? t('createUser') : t('editUser');
});
const { visible, setVisible } = useVisible(false);
const checkKeys = ref([]);
@@ -180,32 +181,16 @@ let formDifer = {};
const userStore = useUserStore();
// 部门数据
-// const deptOptions = computedAsync(async () => {
-// const { data } = await deptList();
-// const deptData = data.filter((item: any) => {
-// return item.enabled !== false;
-// });
-// return deptData;
-// });
-
const deptOptions = ref();
const getDeptData = async () => {
const res = await deptList();
- deptOptions.value = res.data;
+ deptOptions.value = res.data.records;
};
// 角色数据
-// const roleOptions = computedAsync(async () => {
-// const res = await queryRoleList();
-// const roleData = res.data.filter((item: any) => {
-// return item.enabled !== false;
-// });
-// return roleData;
-// });
-
const roleOptions = ref();
const getRoleData = async () => {
- const res = await queryRoleList();
- roleOptions.value = res.data.filter((item: any) => {
+ const res = await queryRoleList('');
+ roleOptions.value = res.data.records.filter((item: any) => {
return item.enabled !== false;
});
};
@@ -215,7 +200,6 @@ const handleClick = () => {
getDeptData();
getRoleData();
const userId = props.prem?.id;
-
// 编辑
if (!props.isCreate && userId) {
formData.value = props.prem;
@@ -242,6 +226,7 @@ const handleSubmit = async () => {
formData.value.permissionIds = checkKeys.value;
// 新增
if (props.isCreate) {
+ // formData.value.username = formData.value.email;
const res = await userStore.createUser(formData.value);
if (res.status === 200) {
Message.success({
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index cb882c5..2567fc0 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -1,7 +1,7 @@
-
+
-
+
+
+
+
+
+ {{ $t('searchTable.operation.download') }}
+
@@ -152,12 +163,15 @@
{{ rowIndex + 1 + (pagination.current - 1) * pagination.size }}
@@ -177,12 +191,12 @@
:is-create="false"
@refresh="fetchData"
/>
-
+ />
+