feat(core): 统一消息提示工具并优化样式和功能

- 新增 useMessage 工具模块,统一封装 Element Plus 的消息提示
- 替换项目中所有 ElMessage 调用为自定义 $message 工具
- 优化 AccessComp.vue 中的布局宽度和间距样式
- 扩展 common.scss 样式库,新增定位、底部等快捷类名
- 更新文件上传 hook 和课程创建组件中的消息提示方式
- 重构 xajax 接口模块,替换 ant-design-vue 消息组件为 element-plus 组件
- 完善 professionalmode.vue 页面路由跳转逻辑
- 清理冗余代码,移除未使用的表格列定义和操作函数
- 在 createCourse.vue 中添加固定底部操作栏和下一步按钮
- 修复 chooseFileList.vue 中的错误提示调用问题
This commit is contained in:
陈昱达
2025-11-26 11:37:23 +08:00
parent c6321027e1
commit 2158c7f0f1
10 changed files with 125 additions and 322 deletions

View File

@@ -1,6 +1,7 @@
<script setup>
import dragCollapse from "./dragCollapse.vue";
import { ElButton, ElCheckbox, ElDialog, ElMessageBox } from "element-plus";
import { $message } from "@/utils/useMessage";
import dragTable from "./dragTable.vue";
import { ref, watch } from "vue";
defineOptions({
@@ -48,11 +49,7 @@ const copyChooseItemData = ref({});
watch(
() => courseMetadata.chooseIndex,
(newVal) => {
console.log(newVal);
console.log(courseList.value[newVal]);
classId.value = courseList.value[newVal].id;
console.log(classId.value);
}
);
@@ -102,6 +99,7 @@ const courseOperations = {
showSettingDialog.value = true;
},
};
// 执行课程操作
const executeCourseOperation = (operationName, data) => {
courseMetadata.chooseIndex = data;
@@ -116,6 +114,7 @@ const executeCourseOperation = (operationName, data) => {
console.warn(`未找到操作: ${operationName}`);
}
};
const chooseItem = (data) => {
console.log(data);
chooseItemData.value = data;
@@ -125,6 +124,7 @@ const chooseItem = (data) => {
}
showSettingDialog.value = true;
};
const choosePreviewItem = (data) => {
chooseItemData.value = data;
showSettingDialog.value = true;
@@ -159,6 +159,7 @@ const saveContent = () => {
// 可以调用保存方法 保存考试
};
const deleteRow = (data) => {
courseMetadata.chooseIndex = data.index;
courseMetadata.selectionIndex = data.selectionIndex;
@@ -173,6 +174,7 @@ const deleteRow = (data) => {
);
});
};
const settingRow = (data) => {
courseMetadata.chooseIndex = data.index;
courseMetadata.selectionIndex = data.selectionIndex;
@@ -181,6 +183,7 @@ const settingRow = (data) => {
isPreview.value = false;
showSettingDialog.value = true;
};
const previewRow = (data) => {
courseMetadata.chooseIndex = data.index;
courseMetadata.selectionIndex = data.selectionIndex;
@@ -195,6 +198,11 @@ const chooseCusExam = (data) => {
chooseItemData.value = data;
showSettingDialog.value = true;
};
const handleNext = () => {
console.log($message);
$message.success("213");
};
</script>
<template>
@@ -284,6 +292,12 @@ const chooseCusExam = (data) => {
</div>
</template>
</el-dialog>
<div class="p10 pst-s bg-w bottom0">
<el-button>取消</el-button>
<el-button type="primary">存草稿</el-button>
<el-button @click="handleNext" type="primary">下一步</el-button>
</div>
</div>
</template>