|
@@ -32,7 +32,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
- <div class="part-box-action">
|
|
|
|
|
|
+ <!-- <div class="part-box-action">
|
|
<div>
|
|
<div>
|
|
<el-button
|
|
<el-button
|
|
type="danger"
|
|
type="danger"
|
|
@@ -65,10 +65,23 @@
|
|
@click="insertCourse"
|
|
@click="insertCourse"
|
|
>新增</el-button
|
|
>新增</el-button
|
|
>
|
|
>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="part-box">
|
|
<div class="part-box">
|
|
|
|
+ <div class="icon-btn-group">
|
|
|
|
+ <svg-btn
|
|
|
|
+ name="xinzeng"
|
|
|
|
+ v-if="authButtons.includes('index_course-add_course')"
|
|
|
|
+ @click="insertCourse"
|
|
|
|
+ >新增</svg-btn
|
|
|
|
+ >
|
|
|
|
+ <svg-btn name="daoru" @click="importCourse">导入</svg-btn>
|
|
|
|
+ <svg-btn name="daochu" @click="exportCourse">导出</svg-btn>
|
|
|
|
+ <svg-btn name="shanchu" :disabled="noBatchSelected" @click="deleteByIds"
|
|
|
|
+ >删除</svg-btn
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
<!-- 页面列表 -->
|
|
<!-- 页面列表 -->
|
|
<!-- FIXME: element-ui style bug https://github.com/ElemeFE/element/issues/16167 -->
|
|
<!-- FIXME: element-ui style bug https://github.com/ElemeFE/element/issues/16167 -->
|
|
<el-table :data="tableData" resizable @selection-change="selectChange">
|
|
<el-table :data="tableData" resizable @selection-change="selectChange">
|
|
@@ -97,28 +110,28 @@
|
|
关联专业
|
|
关联专业
|
|
</el-button> -->
|
|
</el-button> -->
|
|
<el-button
|
|
<el-button
|
|
- size="mini"
|
|
|
|
- type="primary"
|
|
|
|
- plain
|
|
|
|
|
|
+ size="medium"
|
|
|
|
+ type="text"
|
|
|
|
+ class="normal"
|
|
@click="editCourse(scope.row)"
|
|
@click="editCourse(scope.row)"
|
|
>
|
|
>
|
|
编辑
|
|
编辑
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
- size="mini"
|
|
|
|
- plain
|
|
|
|
- type="danger"
|
|
|
|
- @click="deleteById(scope.row)"
|
|
|
|
|
|
+ size="medium"
|
|
|
|
+ type="text"
|
|
|
|
+ class="normal"
|
|
|
|
+ @click="toKnowledge(scope.row)"
|
|
>
|
|
>
|
|
- 删除
|
|
|
|
|
|
+ 知识点
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
- size="mini"
|
|
|
|
- plain
|
|
|
|
- type="danger"
|
|
|
|
- @click="toKnowledge(scope.row)"
|
|
|
|
|
|
+ size="medium"
|
|
|
|
+ type="text"
|
|
|
|
+ class="normal"
|
|
|
|
+ @click="deleteById(scope.row)"
|
|
>
|
|
>
|
|
- 知识点
|
|
|
|
|
|
+ 删除
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -140,7 +153,7 @@
|
|
<!-- 添加或新增课程弹出框 -->
|
|
<!-- 添加或新增课程弹出框 -->
|
|
<el-dialog
|
|
<el-dialog
|
|
title="课程"
|
|
title="课程"
|
|
- width="630px"
|
|
|
|
|
|
+ width="450px"
|
|
:visible.sync="courseDialog"
|
|
:visible.sync="courseDialog"
|
|
:modal="true"
|
|
:modal="true"
|
|
append-to-body
|
|
append-to-body
|
|
@@ -149,8 +162,6 @@
|
|
>
|
|
>
|
|
<el-form
|
|
<el-form
|
|
ref="courseForm"
|
|
ref="courseForm"
|
|
- :inline="true"
|
|
|
|
- inline-message
|
|
|
|
class="form-tight"
|
|
class="form-tight"
|
|
:model="courseForm"
|
|
:model="courseForm"
|
|
:rules="rules"
|
|
:rules="rules"
|
|
@@ -159,7 +170,6 @@
|
|
<el-form-item label="课程名称" prop="name">
|
|
<el-form-item label="课程名称" prop="name">
|
|
<el-input
|
|
<el-input
|
|
v-model="courseForm.name"
|
|
v-model="courseForm.name"
|
|
- class="dialog-input-width"
|
|
|
|
auto-complete="off"
|
|
auto-complete="off"
|
|
placeholder="请输入课程名称"
|
|
placeholder="请输入课程名称"
|
|
/>
|
|
/>
|
|
@@ -168,18 +178,13 @@
|
|
<el-form-item label="课程代码" prop="code">
|
|
<el-form-item label="课程代码" prop="code">
|
|
<el-input
|
|
<el-input
|
|
v-model="courseForm.code"
|
|
v-model="courseForm.code"
|
|
- class="dialog-input-width"
|
|
|
|
auto-complete="off"
|
|
auto-complete="off"
|
|
placeholder="请输入课程代码"
|
|
placeholder="请输入课程代码"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<br />
|
|
<br />
|
|
<el-form-item label="层次" prop="level">
|
|
<el-form-item label="层次" prop="level">
|
|
- <el-select
|
|
|
|
- v-model="courseForm.level"
|
|
|
|
- class="dialog-input-width"
|
|
|
|
- placeholder="请选择"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-select v-model="courseForm.level" placeholder="请选择">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in levelList"
|
|
v-for="item in levelList"
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -230,10 +235,11 @@ import { mapState, mapGetters } from "vuex";
|
|
import { courseExportApi } from "../api";
|
|
import { courseExportApi } from "../api";
|
|
import { downloadByApi } from "@/plugins/download";
|
|
import { downloadByApi } from "@/plugins/download";
|
|
import ImportFileDialog from "@/components/ImportFileDialog.vue";
|
|
import ImportFileDialog from "@/components/ImportFileDialog.vue";
|
|
|
|
+import SvgBtn from "@/components/SvgBtn.vue";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "Course",
|
|
name: "Course",
|
|
- components: { ImportFileDialog },
|
|
|
|
|
|
+ components: { ImportFileDialog, SvgBtn },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
formSearch: {
|
|
formSearch: {
|
|
@@ -522,7 +528,7 @@ export default {
|
|
},
|
|
},
|
|
//删除单个数据
|
|
//删除单个数据
|
|
deleteById(row) {
|
|
deleteById(row) {
|
|
- this.$confirm("是否删除该课程?", "提示", {
|
|
|
|
|
|
+ this.$confirm("是否删除该课程?", "系统通知", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning",
|
|
type: "warning",
|
|
@@ -555,7 +561,7 @@ export default {
|
|
message: "请选择要删除的课程",
|
|
message: "请选择要删除的课程",
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- this.$confirm("是否删除这些课程?", "提示", {
|
|
|
|
|
|
+ this.$confirm("确定要删除所选课程吗?", "提示", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "error",
|
|
type: "error",
|
|
@@ -584,7 +590,7 @@ export default {
|
|
message: "请选择要启用的课程",
|
|
message: "请选择要启用的课程",
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- this.$confirm("是否启用这些课程?", "提示", {
|
|
|
|
|
|
+ this.$confirm("确定要启用所选课程吗?", "系统通知", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning",
|
|
type: "warning",
|
|
@@ -601,7 +607,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
enableById(row) {
|
|
enableById(row) {
|
|
- this.$confirm("是否启用该课程?", "提示", {
|
|
|
|
|
|
+ this.$confirm("是否启用该课程?", "系统通知", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning",
|
|
type: "warning",
|
|
@@ -624,7 +630,7 @@ export default {
|
|
message: "请选择要禁用的课程",
|
|
message: "请选择要禁用的课程",
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- this.$confirm("是否禁用这些课程?", "提示", {
|
|
|
|
|
|
+ this.$confirm("确定要禁用所选课程吗?", "系统通知", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "error",
|
|
type: "error",
|
|
@@ -642,7 +648,7 @@ export default {
|
|
},
|
|
},
|
|
//禁用
|
|
//禁用
|
|
disableById(row) {
|
|
disableById(row) {
|
|
- this.$confirm("是否禁用该课程?", "提示", {
|
|
|
|
|
|
+ this.$confirm("是否禁用该课程?", "系统通知", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "error",
|
|
type: "error",
|