|
@@ -3,7 +3,7 @@
|
|
<div class="part-box part-box-pad box-justify">
|
|
<div class="part-box part-box-pad box-justify">
|
|
<p>请根据《课程教学大纲》中的课程对“毕业要求”进行填写</p>
|
|
<p>请根据《课程教学大纲》中的课程对“毕业要求”进行填写</p>
|
|
<div>
|
|
<div>
|
|
- <el-button type="success">导入课程知识点</el-button>
|
|
|
|
|
|
+ <el-button type="success" @click="toImport">导入课程知识点</el-button>
|
|
<el-button type="primary" @click="toAdd">新增目标</el-button>
|
|
<el-button type="primary" @click="toAdd">新增目标</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -47,18 +47,30 @@
|
|
:instance="curRow"
|
|
:instance="curRow"
|
|
@modified="getList"
|
|
@modified="getList"
|
|
></modify-course-target>
|
|
></modify-course-target>
|
|
|
|
+ <!-- ImportFile -->
|
|
|
|
+ <import-file
|
|
|
|
+ ref="ImportFile"
|
|
|
|
+ title="导入课程知识点"
|
|
|
|
+ :upload-url="uploadUrl"
|
|
|
|
+ :format="['xls', 'xlsx']"
|
|
|
|
+ :download-handle="() => downloadTemplate('courseProperty')"
|
|
|
|
+ :download-filename="dfilename"
|
|
|
|
+ :auto-upload="false"
|
|
|
|
+ @upload-success="getList"
|
|
|
|
+ ></import-file>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { courseTargetList, deleteCourseTarget } from "../../api";
|
|
import { courseTargetList, deleteCourseTarget } from "../../api";
|
|
import ModifyCourseTarget from "./ModifyCourseTarget.vue";
|
|
import ModifyCourseTarget from "./ModifyCourseTarget.vue";
|
|
|
|
+import ImportFile from "@/components/ImportFile.vue";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "CourseTargetManage",
|
|
name: "CourseTargetManage",
|
|
- components: { ModifyCourseTarget },
|
|
|
|
|
|
+ components: { ModifyCourseTarget, ImportFile },
|
|
props: {
|
|
props: {
|
|
- instance: {
|
|
|
|
|
|
+ course: {
|
|
type: Object,
|
|
type: Object,
|
|
default() {
|
|
default() {
|
|
return {};
|
|
return {};
|
|
@@ -69,6 +81,9 @@ export default {
|
|
return {
|
|
return {
|
|
dataList: [],
|
|
dataList: [],
|
|
curRow: {},
|
|
curRow: {},
|
|
|
|
+ // import
|
|
|
|
+ uploadUrl: "/api/admin/teach/coure_target/dimension_import",
|
|
|
|
+ dfilename: "课程知识点导入模板.xlsx",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -76,15 +91,18 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
async getList() {
|
|
async getList() {
|
|
- const res = await courseTargetList(this.instance.courseCode);
|
|
|
|
|
|
+ const res = await courseTargetList(this.course.courseCode);
|
|
this.dataList = res || [];
|
|
this.dataList = res || [];
|
|
},
|
|
},
|
|
|
|
+ toImport() {
|
|
|
|
+ this.$refs.ImportFile.open();
|
|
|
|
+ },
|
|
toAdd() {
|
|
toAdd() {
|
|
- this.curRow = { courseCode: this.instance.courseCode };
|
|
|
|
|
|
+ this.curRow = { courseCode: this.course.courseCode };
|
|
this.$refs.ModifyCourseTarget.open();
|
|
this.$refs.ModifyCourseTarget.open();
|
|
},
|
|
},
|
|
toEdit(row) {
|
|
toEdit(row) {
|
|
- this.curRow = { ...row, courseCode: this.instance.courseCode };
|
|
|
|
|
|
+ this.curRow = { ...row, courseCode: this.course.courseCode };
|
|
this.$refs.ModifyCourseTarget.open();
|
|
this.$refs.ModifyCourseTarget.open();
|
|
},
|
|
},
|
|
async toDelete(row) {
|
|
async toDelete(row) {
|