Pārlūkot izejas kodu

课程管理接口参数调整

zhangjie 1 gadu atpakaļ
vecāks
revīzija
8a1bfc31f3

+ 5 - 11
src/modules/base/components/course-simple/ClazzSimpleManage.vue

@@ -49,12 +49,7 @@
             scope.row.createTime | timestampFilter
           }}</span>
         </el-table-column>
-        <el-table-column
-          v-if="editable"
-          class-name="action-column"
-          label="操作"
-          width="140"
-        >
+        <el-table-column class-name="action-column" label="操作" width="140">
           <template slot-scope="scope">
             <el-button
               class="btn-primary"
@@ -63,6 +58,7 @@
               >管理学生</el-button
             >
             <el-button
+              v-if="editable"
               class="btn-danger"
               type="text"
               @click="toDelete(scope.row)"
@@ -121,8 +117,7 @@ export default {
   data() {
     return {
       filter: {
-        examId: "",
-        courseCode: "",
+        teachCourseId: "",
         teachClazzName: "",
       },
       current: 1,
@@ -145,8 +140,7 @@ export default {
   methods: {
     async initData() {
       Object.assign(this.filter, {
-        examId: this.course.examId,
-        courseCode: this.course.courseCode,
+        teachCourseId: this.course.id,
       });
       await this.getList();
     },
@@ -173,7 +167,7 @@ export default {
     toManageStudent(row) {
       const course = { ...this.course };
       delete course.id;
-      this.curRow = { ...row, ...course };
+      this.curRow = { ...row, ...course, teachCourseId: this.course.id };
       this.$refs.StudentSimpleManage.open();
     },
     async toDelete(row) {

+ 2 - 4
src/modules/base/components/course-simple/CourseEvaluationManage.vue

@@ -73,8 +73,7 @@ export default {
   methods: {
     async getList() {
       const res = await courseEvaluationList({
-        courseCode: this.course.courseCode,
-        examId: this.course.examId,
+        teachCourseId: this.course.id,
       });
       this.dataList = res || [];
     },
@@ -91,8 +90,7 @@ export default {
       }
 
       this.curRow = {
-        courseCode: this.course.courseCode,
-        examId: this.course.examId,
+        teachCourseId: this.course.id,
       };
       this.$refs.ModifyCourseEvaluation.open();
     },

+ 1 - 2
src/modules/base/components/course-simple/CourseSimpleDetail.vue

@@ -100,8 +100,7 @@ export default {
       const statusTabs = ["CourseTargetManage", "CourseEvaluationManage"];
       if (statusTabs.includes(tab)) {
         this.updateCwStatus({
-          examId: this.course.examId,
-          courseCode: this.course.courseCode,
+          teachCourseId: this.course.id,
         });
       }
     },

+ 2 - 4
src/modules/base/components/course-simple/CourseTargetManage.vue

@@ -81,8 +81,7 @@ export default {
   methods: {
     async getList() {
       const res = await courseTargetList({
-        examId: this.course.examId,
-        courseCode: this.course.courseCode,
+        teachCourseId: this.course.id,
       });
       this.dataList = res || [];
     },
@@ -128,8 +127,7 @@ export default {
 
       this.curRow = {
         ...row,
-        courseCode: this.course.courseCode,
-        examId: this.course.examId,
+        teachCourseId: this.course.id,
         disabledDimensionIds: this.getDisabledDimensionIds(row.id),
       };
       this.$refs.ModifyCourseTarget.open();

+ 3 - 6
src/modules/base/components/course-simple/CourseWeightManage.vue

@@ -202,8 +202,7 @@ export default {
     ...mapActions("base", ["updateCwStatus"]),
     async initData() {
       await this.updateCwStatus({
-        examId: this.course.examId,
-        courseCode: this.course.courseCode,
+        teachCourseId: this.course.id,
       });
       await this.getList();
       if (this.cwStatus.currentSettingStatus) {
@@ -212,8 +211,7 @@ export default {
     },
     async getList() {
       const res = await courseWeightDetail({
-        examId: this.course.examId,
-        courseCode: this.course.courseCode,
+        teachCourseId: this.course.id,
       });
       this.defaultRate = res.defaultRate;
       this.customRate = res.customRate;
@@ -407,8 +405,7 @@ export default {
 
       this.loading = true;
       const res = await courseWeightSave({
-        examId: this.course.examId,
-        courseCode: this.course.courseCode,
+        teachCourseId: this.course.id,
         defaultRate: this.defaultRate,
         customRate: this.customRate,
         submitForm: this.dataList,

+ 1 - 2
src/modules/base/components/course-simple/ModifyCourseEvaluation.vue

@@ -49,8 +49,7 @@ import { updateCourseEvaluation } from "../../api";
 
 const initModalForm = {
   evaluationId: null,
-  examId: "",
-  courseCode: "",
+  teachCourseId: "",
   evaluation: "",
   evaluationDesc: "",
 };

+ 2 - 3
src/modules/base/components/course-simple/ModifyCourseTarget.vue

@@ -85,7 +85,7 @@
     <!-- SelectDimensionDialog -->
     <select-dimension-dialog
       ref="SelectDimensionDialog"
-      :course="{ courseCode: instance.courseCode, examId: instance.examId }"
+      :course="{ teachCourseId: instance.teachCourseId }"
       :selected-data="modalForm.dimensionIdList"
       :disabled-data="instance.disabledDimensionIds"
       @confirm="dimensionSelected"
@@ -100,8 +100,7 @@ import SelectDimensionDialog from "./SelectDimensionDialog.vue";
 
 const initModalForm = {
   id: null,
-  examId: "",
-  courseCode: "",
+  teachCourseId: "",
   targetName: "",
   degreeRequirement: "",
   dimensionIdList: [],

+ 3 - 6
src/modules/base/components/course-simple/ModifyTeacherSimple.vue

@@ -67,8 +67,7 @@ import SelectSimpleTeacher from "./SelectSimpleTeacher.vue";
 import templateDownload from "@/mixins/templateDownload";
 
 const initModalForm = {
-  examId: null,
-  courseCode: null,
+  teachCourseId: null,
   teacherName: "",
   teacherCode: "",
 };
@@ -128,8 +127,7 @@ export default {
   methods: {
     visibleChange() {
       this.modalForm = Object.assign({}, initModalForm, {
-        examId: this.course.examId,
-        courseCode: this.course.courseCode,
+        teachCourseId: this.course.id,
       });
     },
     cancel() {
@@ -175,8 +173,7 @@ export default {
       if (this.isSubmit) return;
       this.isSubmit = true;
       const data = await batchAddTeacherSimple({
-        examId: this.course.examId,
-        courseCode: this.course.courseCode,
+        teachCourseId: this.course.id,
         userIdList: this.selectedTeacherIds.join(),
       }).catch(() => {});
       this.isSubmit = false;

+ 4 - 8
src/modules/base/components/course-simple/SelectDimensionDialog.vue

@@ -42,8 +42,7 @@
       title="导入课程知识点"
       :upload-url="uploadUrl"
       :upload-data="{
-        courseCode: course.courseCode,
-        examId: course.examId,
+        teachCourseId: course.teachCourseId,
       }"
       :format="['xls', 'xlsx']"
       :download-handle="() => downloadTemplate('courseProperty')"
@@ -80,8 +79,7 @@ export default {
       type: Object,
       default() {
         return {
-          examId: "",
-          courseCode: "",
+          teachCourseId: "",
         };
       },
     },
@@ -119,8 +117,7 @@ export default {
   methods: {
     async dimensionUploaded() {
       const data = await courseDimensionTree({
-        examId: this.course.examId,
-        courseCode: this.course.courseCode,
+        teachCourseId: this.course.teachCourseId,
       });
       this.treeData = data || [];
 
@@ -139,8 +136,7 @@ export default {
       if (!this.course.examId || !this.course.courseCode) return;
 
       const data = await courseDimensionTree({
-        examId: this.course.examId,
-        courseCode: this.course.courseCode,
+        teachCourseId: this.course.teachCourseId,
       });
       this.treeData = data || [];
       this.updateDisableNode();

+ 2 - 4
src/modules/base/components/course-simple/TeacherSimpleAssignCourseDialog.vue

@@ -75,8 +75,7 @@ export default {
   methods: {
     async getList() {
       const data = await teacherSimpleCourseQuery({
-        examId: this.teacher.examId,
-        courseCode: this.teacher.courseCode,
+        teachCourseId: this.teacher.teachCourseId,
       });
       this.orignDataList = (data || []).map((item) => {
         if (item.teacherList && item.teacherList.length) {
@@ -128,8 +127,7 @@ export default {
       if (this.loading) return;
       this.loading = true;
       const res = await teacherSimpleAssignCourse({
-        examId: this.teacher.examId,
-        courseCode: this.teacher.courseCode,
+        teachCourseId: this.teacher.teachCourseId,
         teacherId: this.teacher.userId,
         clazzIdList,
       }).catch(() => {});

+ 3 - 6
src/modules/base/components/course-simple/TeacherSimpleManage.vue

@@ -112,8 +112,7 @@ export default {
   data() {
     return {
       filter: {
-        examId: "",
-        courseCode: "",
+        teachCourseId: "",
         userInfo: "",
       },
       current: 1,
@@ -135,8 +134,7 @@ export default {
   },
   methods: {
     async initData() {
-      this.filter.examId = this.course.examId;
-      this.filter.courseCode = this.course.courseCode;
+      this.filter.teachCourseId = this.course.id;
       await this.getList();
     },
     async getList() {
@@ -162,8 +160,7 @@ export default {
     toAssignClazz(row) {
       this.curRow = {
         ...row,
-        examId: this.course.examId,
-        courseCode: this.course.courseCode,
+        teachCourseId: this.course.id,
       };
       this.$refs.TeacherSimpleAssignCourseDialog.open();
     },