diff --git a/src/api/system/user/types.ts b/src/api/system/user/types.ts
index 77e9c32..ad47a1f 100644
--- a/src/api/system/user/types.ts
+++ b/src/api/system/user/types.ts
@@ -54,6 +54,7 @@ export interface UserVO extends BaseEntity {
export interface UserForm {
id?: string;
userId?: string;
+ userType?: string;
deptId?: number;
userName: string;
nickName?: string;
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 100b5a7..7c59671 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -5,52 +5,42 @@
-
+
-
+
-
+
+
+
+
+
+
-
+
-
+
-
+
搜索
@@ -65,54 +55,79 @@
- 新增
+ 新增
-
+
修改
-
+
删除
+
+ 下载模板
+
+
+
+
+ 导入数据
+
+
+
+
+ 学生密码导出
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+ 老师
+ 学生
+
+
+
+
-
+
@@ -125,36 +140,36 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -164,14 +179,9 @@
-
+
@@ -203,7 +213,8 @@
-
+
@@ -220,26 +231,25 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
@@ -262,18 +272,9 @@
-
+
@@ -282,7 +283,8 @@
是否更新已经存在的用户数据
仅允许导入xls、xlsx格式文件。
-
下载模板
+
下载模板
@@ -340,15 +342,26 @@ const upload = reactive({
})
// 列显隐信息
const columns = ref([
- { key: 0, label: `用户编号`, visible: false,children: [] },
- { key: 1, label: `用户名称`, visible: true,children: [] },
- { key: 2, label: `用户昵称`, visible: true,children: [] },
- { key: 3, label: `部门`, visible: true,children: [] },
- { key: 4, label: `手机号码`, visible: true,children: [] },
- { key: 5, label: `状态`, visible: true,children: [] },
- { key: 6, label: `创建时间`, visible: true,children: [] }
+ { key: 0, label: `用户编号`, visible: false, children: [] },
+ { key: 1, label: `用户名称`, visible: true, children: [] },
+ { key: 2, label: `用户昵称`, visible: true, children: [] },
+ { key: 3, label: `部门`, visible: true, children: [] },
+ { key: 4, label: `手机号码`, visible: true, children: [] },
+ { key: 5, label: `状态`, visible: true, children: [] },
+ { key: 6, label: `创建时间`, visible: true, children: [] },
+ { key: 7, label: `用户类型`, visible: true, children: [] }
])
+const userTypeOptions = [
+ {
+ value: 'teacher',
+ label: '老师',
+ },
+ {
+ value: 'student',
+ label: '学生',
+ }
+]
const deptTreeRef = ref();
const queryFormRef = ref();
@@ -381,6 +394,7 @@ const data = reactive>({
pageNum: 1,
pageSize: 10,
userName: '',
+ userType: '',
phonenumber: '',
status: '',
deptId: ''
@@ -424,8 +438,14 @@ const getList = async () => {
total.value = res.total;
}
+const showStudenExport = ref(false)
/** 节点单击事件 */
const handleNodeClick = (data: DeptVO) => {
+ if (!data.hasOwnProperty('children')) {
+ showStudenExport.value = true
+ } else {
+ showStudenExport.value = false
+ }
queryParams.value.deptId = data.id;
handleQuery()
}
@@ -503,9 +523,13 @@ const handleImport = () => {
}
/** 导出按钮操作 */
const handleExport = () => {
- proxy?.download("system/user/export", {
- ...queryParams.value,
- }, `user_${new Date().getTime()}.xlsx`);
+ // proxy?.download("system/user/export", {
+ // ...queryParams.value,
+ // }, `user_${new Date().getTime()}.xlsx`);
+
+ proxy?.download("system/user/export/password", {
+ deptId: queryParams.value.deptId,
+ }, `学生信息_${new Date().getTime()}.xlsx`);
};
/** 下载模板操作 */
const importTemplate = () => {