chore: 同步工作区变更
- 登录控制器、布局及前端页面调整 - 学校/会员/学生/基础数据等视图与组件更新 - Mock 与 ruoyi-ui 配置更新
This commit is contained in:
parent
fc2da87baf
commit
1983a65cfc
|
|
@ -68,13 +68,19 @@ public class LoginController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取路由信息(菜单)
|
* 获取路由信息(菜单),与需求文档 3.2 功能模块一致:学校管理、会员管理、学生管理、应用管理、基础数据、系统管理、系统监控、系统工具
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getRouters")
|
@GetMapping("/getRouters")
|
||||||
public AjaxResult getRouters() {
|
public AjaxResult getRouters() {
|
||||||
List<Map<String, Object>> menus = new ArrayList<>();
|
List<Map<String, Object>> menus = new ArrayList<>();
|
||||||
|
|
||||||
// 基础数据菜单
|
// 需求文档:学校管理、会员管理、学生管理、应用管理、基础数据(与系统管理同级)。Vue Router 要求 path 以 / 开头
|
||||||
|
menus.add(createMenuItem("School", "/school", "school/index", "学校管理", "education"));
|
||||||
|
menus.add(createMenuItem("Member", "/member", "member/index", "会员管理", "peoples"));
|
||||||
|
menus.add(createMenuItem("Student", "/student", "student/index", "学生管理", "people"));
|
||||||
|
menus.add(createMenuItem("Application", "/application", "application/index", "应用管理", "component"));
|
||||||
|
|
||||||
|
// 基础数据(目录,子菜单:年级、班级、学科、区域)
|
||||||
Map<String, Object> baseData = new HashMap<>();
|
Map<String, Object> baseData = new HashMap<>();
|
||||||
baseData.put("name", "Base");
|
baseData.put("name", "Base");
|
||||||
baseData.put("path", "/base");
|
baseData.put("path", "/base");
|
||||||
|
|
@ -83,51 +89,83 @@ public class LoginController {
|
||||||
baseData.put("component", "Layout");
|
baseData.put("component", "Layout");
|
||||||
baseData.put("alwaysShow", true);
|
baseData.put("alwaysShow", true);
|
||||||
baseData.put("meta", createMeta("基础数据", "dict", false, null));
|
baseData.put("meta", createMeta("基础数据", "dict", false, null));
|
||||||
|
|
||||||
List<Map<String, Object>> baseChildren = new ArrayList<>();
|
List<Map<String, Object>> baseChildren = new ArrayList<>();
|
||||||
|
baseChildren.add(createMenuItem("Grade", "grade", "base/grade/index", "年级管理", "tree-table"));
|
||||||
// 年级管理
|
baseChildren.add(createMenuItem("Class", "class", "base/class/index", "班级管理", "list"));
|
||||||
Map<String, Object> grade = new HashMap<>();
|
baseChildren.add(createMenuItem("Subject", "subject", "base/subject/index", "学科管理", "education"));
|
||||||
grade.put("name", "Grade");
|
baseChildren.add(createMenuItem("Region", "region", "base/region/index", "区域管理", "tree"));
|
||||||
grade.put("path", "grade");
|
|
||||||
grade.put("hidden", false);
|
|
||||||
grade.put("component", "base/grade/index");
|
|
||||||
grade.put("meta", createMeta("年级管理", "tree", false, null));
|
|
||||||
baseChildren.add(grade);
|
|
||||||
|
|
||||||
// 班级管理
|
|
||||||
Map<String, Object> pgClass = new HashMap<>();
|
|
||||||
pgClass.put("name", "Class");
|
|
||||||
pgClass.put("path", "class");
|
|
||||||
pgClass.put("hidden", false);
|
|
||||||
pgClass.put("component", "base/class/index");
|
|
||||||
pgClass.put("meta", createMeta("班级管理", "peoples", false, null));
|
|
||||||
baseChildren.add(pgClass);
|
|
||||||
|
|
||||||
// 学科管理
|
|
||||||
Map<String, Object> subject = new HashMap<>();
|
|
||||||
subject.put("name", "Subject");
|
|
||||||
subject.put("path", "subject");
|
|
||||||
subject.put("hidden", false);
|
|
||||||
subject.put("component", "base/subject/index");
|
|
||||||
subject.put("meta", createMeta("学科管理", "education", false, null));
|
|
||||||
baseChildren.add(subject);
|
|
||||||
|
|
||||||
// 区域管理
|
|
||||||
Map<String, Object> region = new HashMap<>();
|
|
||||||
region.put("name", "Region");
|
|
||||||
region.put("path", "region");
|
|
||||||
region.put("hidden", false);
|
|
||||||
region.put("component", "base/region/index");
|
|
||||||
region.put("meta", createMeta("区域管理", "tree-table", false, null));
|
|
||||||
baseChildren.add(region);
|
|
||||||
|
|
||||||
baseData.put("children", baseChildren);
|
baseData.put("children", baseChildren);
|
||||||
menus.add(baseData);
|
menus.add(baseData);
|
||||||
|
|
||||||
|
// RuoYi 系统管理
|
||||||
|
Map<String, Object> system = new HashMap<>();
|
||||||
|
system.put("name", "System");
|
||||||
|
system.put("path", "/system");
|
||||||
|
system.put("hidden", false);
|
||||||
|
system.put("redirect", "noRedirect");
|
||||||
|
system.put("component", "Layout");
|
||||||
|
system.put("alwaysShow", true);
|
||||||
|
system.put("meta", createMeta("系统管理", "system", false, null));
|
||||||
|
List<Map<String, Object>> systemChildren = new ArrayList<>();
|
||||||
|
systemChildren.add(createMenuItem("User", "user", "system/user/index", "用户管理", "user"));
|
||||||
|
systemChildren.add(createMenuItem("Role", "role", "system/role/index", "角色管理", "peoples"));
|
||||||
|
systemChildren.add(createMenuItem("Menu", "menu", "system/menu/index", "菜单管理", "tree-table"));
|
||||||
|
systemChildren.add(createMenuItem("Dept", "dept", "system/dept/index", "部门管理", "tree"));
|
||||||
|
systemChildren.add(createMenuItem("Post", "post", "system/post/index", "岗位管理", "post"));
|
||||||
|
systemChildren.add(createMenuItem("Dict", "dict", "system/dict/index", "字典管理", "dict"));
|
||||||
|
systemChildren.add(createMenuItem("Config", "config", "system/config/index", "参数设置", "edit"));
|
||||||
|
systemChildren.add(createMenuItem("Notice", "notice", "system/notice/index", "通知公告", "message"));
|
||||||
|
system.put("children", systemChildren);
|
||||||
|
menus.add(system);
|
||||||
|
|
||||||
|
// RuoYi 系统监控
|
||||||
|
Map<String, Object> monitor = new HashMap<>();
|
||||||
|
monitor.put("name", "Monitor");
|
||||||
|
monitor.put("path", "/monitor");
|
||||||
|
monitor.put("hidden", false);
|
||||||
|
monitor.put("redirect", "noRedirect");
|
||||||
|
monitor.put("component", "Layout");
|
||||||
|
monitor.put("alwaysShow", true);
|
||||||
|
monitor.put("meta", createMeta("系统监控", "monitor", false, null));
|
||||||
|
List<Map<String, Object>> monitorChildren = new ArrayList<>();
|
||||||
|
monitorChildren.add(createMenuItem("Online", "online", "monitor/online/index", "在线用户", "online"));
|
||||||
|
monitorChildren.add(createMenuItem("Job", "job", "monitor/job/index", "定时任务", "job"));
|
||||||
|
monitorChildren.add(createMenuItem("Druid", "druid", "monitor/druid/index", "数据监控", "druid"));
|
||||||
|
monitorChildren.add(createMenuItem("Server", "server", "monitor/server/index", "服务监控", "server"));
|
||||||
|
monitorChildren.add(createMenuItem("Cache", "cache", "monitor/cache/index", "缓存监控", "redis"));
|
||||||
|
monitorChildren.add(createMenuItem("Operlog", "operlog", "monitor/operlog/index", "操作日志", "form"));
|
||||||
|
monitorChildren.add(createMenuItem("Logininfor", "logininfor", "monitor/logininfor/index", "登录日志", "logininfor"));
|
||||||
|
monitor.put("children", monitorChildren);
|
||||||
|
menus.add(monitor);
|
||||||
|
|
||||||
|
// RuoYi 系统工具
|
||||||
|
Map<String, Object> tool = new HashMap<>();
|
||||||
|
tool.put("name", "Tool");
|
||||||
|
tool.put("path", "/tool");
|
||||||
|
tool.put("hidden", false);
|
||||||
|
tool.put("redirect", "noRedirect");
|
||||||
|
tool.put("component", "Layout");
|
||||||
|
tool.put("alwaysShow", true);
|
||||||
|
tool.put("meta", createMeta("系统工具", "guide", false, null));
|
||||||
|
List<Map<String, Object>> toolChildren = new ArrayList<>();
|
||||||
|
toolChildren.add(createMenuItem("Gen", "gen", "tool/gen/index", "代码生成", "code"));
|
||||||
|
toolChildren.add(createMenuItem("Swagger", "swagger", "tool/swagger/index", "系统接口", "swagger"));
|
||||||
|
tool.put("children", toolChildren);
|
||||||
|
menus.add(tool);
|
||||||
|
|
||||||
return AjaxResult.success(menus);
|
return AjaxResult.success(menus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Map<String, Object> createMenuItem(String name, String path, String component, String title, String icon) {
|
||||||
|
Map<String, Object> item = new HashMap<>();
|
||||||
|
item.put("name", name);
|
||||||
|
item.put("path", path);
|
||||||
|
item.put("hidden", false);
|
||||||
|
item.put("component", component);
|
||||||
|
item.put("meta", createMeta(title, icon, false, null));
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
private Map<String, Object> createMeta(String title, String icon, boolean noCache, String link) {
|
private Map<String, Object> createMeta(String title, String icon, boolean noCache, String link) {
|
||||||
Map<String, Object> meta = new HashMap<>();
|
Map<String, Object> meta = new HashMap<>();
|
||||||
meta.put("title", title);
|
meta.put("title", title);
|
||||||
|
|
|
||||||
|
|
@ -88,12 +88,12 @@
|
||||||
* 布局组件(占位版本,待Agent-1完善)
|
* 布局组件(占位版本,待Agent-1完善)
|
||||||
* @author pangu
|
* @author pangu
|
||||||
*/
|
*/
|
||||||
import { Expand, Fold, Grid, HomeFilled, School, Setting, User, UserFilled } from '@element-plus/icons-vue'
|
import { getInfo, logout } from '@/api/user'
|
||||||
|
import { useUserStore } from '@/store/user'
|
||||||
|
import { Grid, HomeFilled, School, Setting, User, UserFilled } from '@element-plus/icons-vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { getInfo, logout } from '@/api/user'
|
|
||||||
import { useUserStore } from '@/store/user'
|
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
|
||||||
|
|
@ -89,10 +89,10 @@
|
||||||
* 班级管理页面
|
* 班级管理页面
|
||||||
* @author pangu
|
* @author pangu
|
||||||
*/
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
import { Delete, Edit, Plus, Refresh, Search } from '@element-plus/icons-vue'
|
import { Delete, Edit, Plus, Refresh, Search } from '@element-plus/icons-vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const tableData = ref([])
|
const tableData = ref([])
|
||||||
|
|
|
||||||
|
|
@ -89,10 +89,10 @@
|
||||||
* 年级管理页面
|
* 年级管理页面
|
||||||
* @author pangu
|
* @author pangu
|
||||||
*/
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
import { Delete, Edit, Plus, Refresh, Search } from '@element-plus/icons-vue'
|
import { Delete, Edit, Plus, Refresh, Search } from '@element-plus/icons-vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const tableData = ref([])
|
const tableData = ref([])
|
||||||
|
|
|
||||||
|
|
@ -99,10 +99,10 @@
|
||||||
* 区域管理页面
|
* 区域管理页面
|
||||||
* @author pangu
|
* @author pangu
|
||||||
*/
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
import { Delete, Edit, Plus, Refresh, Search, Sort } from '@element-plus/icons-vue'
|
import { Delete, Edit, Plus, Refresh, Search, Sort } from '@element-plus/icons-vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const tableData = ref([])
|
const tableData = ref([])
|
||||||
|
|
|
||||||
|
|
@ -89,10 +89,10 @@
|
||||||
* 学科管理页面
|
* 学科管理页面
|
||||||
* @author pangu
|
* @author pangu
|
||||||
*/
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
import { Delete, Edit, Plus, Refresh, Search } from '@element-plus/icons-vue'
|
import { Delete, Edit, Plus, Refresh, Search } from '@element-plus/icons-vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const tableData = ref([])
|
const tableData = ref([])
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,8 @@
|
||||||
* 首页(占位版本,待Agent-1完善)
|
* 首页(占位版本,待Agent-1完善)
|
||||||
* @author pangu
|
* @author pangu
|
||||||
*/
|
*/
|
||||||
import { Grid, School, User, UserFilled } from '@element-plus/icons-vue'
|
import { Grid, School, User, UserFilled } from '@element-plus/icons-vue';
|
||||||
import { reactive } from 'vue'
|
import { reactive } from 'vue';
|
||||||
|
|
||||||
const stats = reactive({
|
const stats = reactive({
|
||||||
schoolCount: 128,
|
schoolCount: 128,
|
||||||
|
|
|
||||||
|
|
@ -112,10 +112,10 @@
|
||||||
* 会员管理页面
|
* 会员管理页面
|
||||||
* @author pangu
|
* @author pangu
|
||||||
*/
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
import { Delete, Edit, Key, Plus, Refresh, Search } from '@element-plus/icons-vue'
|
import { Delete, Edit, Key, Plus, Refresh, Search } from '@element-plus/icons-vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import request from '@/utils/request'
|
|
||||||
import MemberDialog from './components/MemberDialog.vue'
|
import MemberDialog from './components/MemberDialog.vue'
|
||||||
import ResetPwdDialog from './components/ResetPwdDialog.vue'
|
import ResetPwdDialog from './components/ResetPwdDialog.vue'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,9 @@
|
||||||
* 新增班级弹窗
|
* 新增班级弹窗
|
||||||
* @author pangu
|
* @author pangu
|
||||||
*/
|
*/
|
||||||
|
import { addGradeClass, getClassOptions, getGradeOptions } from '@/api/school'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import { addGradeClass, getClassOptions, getGradeOptions } from '@/api/school'
|
|
||||||
|
|
||||||
const emit = defineEmits(['success'])
|
const emit = defineEmits(['success'])
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,9 @@
|
||||||
* 新增年级弹窗
|
* 新增年级弹窗
|
||||||
* @author pangu
|
* @author pangu
|
||||||
*/
|
*/
|
||||||
|
import { addSchoolGrade, getGradeOptions } from '@/api/school'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import { addSchoolGrade, getGradeOptions } from '@/api/school'
|
|
||||||
|
|
||||||
const emit = defineEmits(['success'])
|
const emit = defineEmits(['success'])
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,9 +62,9 @@
|
||||||
* 学校新增/编辑弹窗
|
* 学校新增/编辑弹窗
|
||||||
* @author pangu
|
* @author pangu
|
||||||
*/
|
*/
|
||||||
|
import { addSchool, updateSchool } from '@/api/school'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import { addSchool, updateSchool } from '@/api/school'
|
|
||||||
|
|
||||||
// 接收父组件传递的区域树
|
// 接收父组件传递的区域树
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
|
||||||
|
|
@ -105,10 +105,10 @@
|
||||||
* 学校管理页面
|
* 学校管理页面
|
||||||
* @author pangu
|
* @author pangu
|
||||||
*/
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
import { Collection, Delete, Edit, Files, Plus, Refresh, Search } from '@element-plus/icons-vue'
|
import { Collection, Delete, Edit, Files, Plus, Refresh, Search } from '@element-plus/icons-vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { onMounted, ref, watch } from 'vue'
|
import { onMounted, ref, watch } from 'vue'
|
||||||
import request from '@/utils/request'
|
|
||||||
import ClassDialog from './components/ClassDialog.vue'
|
import ClassDialog from './components/ClassDialog.vue'
|
||||||
import GradeDialog from './components/GradeDialog.vue'
|
import GradeDialog from './components/GradeDialog.vue'
|
||||||
import SchoolDialog from './components/SchoolDialog.vue'
|
import SchoolDialog from './components/SchoolDialog.vue'
|
||||||
|
|
|
||||||
|
|
@ -108,10 +108,10 @@
|
||||||
* 学生管理页面
|
* 学生管理页面
|
||||||
* @author pangu
|
* @author pangu
|
||||||
*/
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
import { Delete, Edit, Plus, Refresh, Search, Upload } from '@element-plus/icons-vue'
|
import { Delete, Edit, Plus, Refresh, Search, Upload } from '@element-plus/icons-vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { onMounted, ref, watch } from 'vue'
|
import { onMounted, ref, watch } from 'vue'
|
||||||
import request from '@/utils/request'
|
|
||||||
import ImportDialog from './components/ImportDialog.vue'
|
import ImportDialog from './components/ImportDialog.vue'
|
||||||
import StudentDialog from './components/StudentDialog.vue'
|
import StudentDialog from './components/StudentDialog.vue'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="tableData" border stripe :header-cell-style="{ background: '#f5f7fa', color: '#606266' }" style="width: 100%">
|
<el-table v-loading="loading" :data="tableData" border stripe :header-cell-style="{ background: '#f5f7fa', color: '#606266' }" style="width: 100%">
|
||||||
<el-table-column prop="gradeName" label="年级名称" min-width="150" />
|
<el-table-column prop="name" label="年级名称" min-width="150" />
|
||||||
<el-table-column prop="gradeCode" label="年级编码" width="120" />
|
<el-table-column prop="code" label="年级编码" width="120" />
|
||||||
<el-table-column prop="sort" label="排序" width="80" align="center" />
|
<el-table-column prop="sort" label="排序" width="80" align="center" />
|
||||||
<el-table-column prop="status" label="状态" width="80" align="center">
|
<el-table-column prop="status" label="状态" width="80" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
|
@ -63,11 +63,11 @@
|
||||||
<!-- 新增/编辑弹窗 -->
|
<!-- 新增/编辑弹窗 -->
|
||||||
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="500px" :close-on-click-modal="false" destroy-on-close>
|
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="500px" :close-on-click-modal="false" destroy-on-close>
|
||||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="年级名称" prop="gradeName">
|
<el-form-item label="年级名称" prop="name">
|
||||||
<el-input v-model="form.gradeName" placeholder="请输入年级名称" />
|
<el-input v-model="form.name" placeholder="请输入年级名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="年级编码" prop="gradeCode">
|
<el-form-item label="年级编码" prop="code">
|
||||||
<el-input v-model="form.gradeCode" placeholder="自动生成" disabled />
|
<el-input v-model="form.code" placeholder="自动生成" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-input-number v-model="form.sort" :min="0" :max="999" />
|
<el-input-number v-model="form.sort" :min="0" :max="999" />
|
||||||
|
|
@ -111,14 +111,14 @@ const dialogTitle = ref('')
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const form = ref({
|
const form = ref({
|
||||||
id: null,
|
id: null,
|
||||||
gradeName: '',
|
name: '',
|
||||||
gradeCode: '',
|
code: '',
|
||||||
sort: 0,
|
sort: 0,
|
||||||
status: '0'
|
status: '0'
|
||||||
})
|
})
|
||||||
|
|
||||||
const rules = {
|
const rules = {
|
||||||
gradeName: [{ required: true, message: '请输入年级名称', trigger: 'blur' }]
|
name: [{ required: true, message: '请输入年级名称', trigger: 'blur' }]
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取年级列表
|
// 获取年级列表
|
||||||
|
|
@ -150,7 +150,7 @@ const resetQuery = () => {
|
||||||
// 新增
|
// 新增
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
dialogTitle.value = '新增年级'
|
dialogTitle.value = '新增年级'
|
||||||
form.value = { id: null, gradeName: '', gradeCode: 'G' + Date.now(), sort: 0, status: '0' }
|
form.value = { id: null, name: '', code: '', sort: 0, status: '0' }
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -177,7 +177,7 @@ const handleSubmit = async () => {
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
const handleDelete = (row) => {
|
const handleDelete = (row) => {
|
||||||
ElMessageBox.confirm(`确定要删除年级"${row.gradeName}"吗?`, '提示', {
|
ElMessageBox.confirm(`确定要删除年级"${row.name}"吗?`, '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue