Browse Source

课表列表展示 优化

1
mo 2 years ago
parent
commit
b85ceff079
1 changed files with 28 additions and 9 deletions
  1. 28 9
      src/views/teamDetail/teamCourseList.vue

+ 28 - 9
src/views/teamDetail/teamCourseList.vue

@@ -137,27 +137,37 @@
                             "
                             >合并课
                           </span>
-                          <el-button
-                            type="text"
-                            @click="common(props.row)"
+                          <p
                             v-if="
                               props.row.newCourseId > 0 &&
                               props.row.newCourseId != props.row.id
                             "
                           >
                             被合并课
-                          </el-button>
+                          </p>
                           <p v-if="props.row.newCourseId == 0">无</p>
                         </div>
                       </span>
                     </el-form-item>
                   </el-col>
-                  <el-col :span="4"  v-if="
-                              props.row.newCourseId > 0 &&
-                              props.row.newCourseId != props.row.id
-                            ">
+                  <el-col
+                    :span="4"
+                    v-if="
+                      props.row.newCourseId > 0 &&
+                      props.row.newCourseId != props.row.id
+                    "
+                  >
                     <el-form-item label="主课编号:">
-                      {{ props.row.newCourseId}}
+                      <el-button type="text" @click="common(props.row)">
+                        {{ props.row.newCourseId }}
+                      </el-button>
+                    </el-form-item></el-col
+                  >
+                  <el-col :span="4" v-if="props.row.mergedCourseIds > 0">
+                    <el-form-item label="被合并课编号:">
+                      <el-button type="text" @click="common1(props.row)">
+                        {{ props.row.mergedCourseIds }}
+                      </el-button>
                     </el-form-item></el-col
                   >
                   <el-col :span="4">
@@ -1082,6 +1092,15 @@ export default {
       };
       this.search();
     },
+
+    common1(row) {
+      this.searchForm = {
+        ...initSearch,
+        timer: [],
+        courseIdSearch: row.mergedCourseIds,
+      };
+      this.search();
+    },
     getSearchForm() {
       let searchForm = this.searchForm;
       if (!searchForm.timer || searchForm.timer.length <= 0) {