浏览代码

班级合并 课程合并加id

1
mo 4 年之前
父节点
当前提交
1685be1e4f

+ 85 - 83
src/views/teamDetail/componentClass/classCompound.vue

@@ -15,77 +15,82 @@
             <el-divider></el-divider>
           </div>
           <div class="topWrap">
-             <el-select
-            placeholder="请选择主班"
-            v-model="radio"
-            clearable
-            @change="changeMasterClass"
-          >
-            <el-option
-              v-for="(item, index) in dataList"
-              :label="item.name"
-              :value="item.id"
-              :key="index"
-            ></el-option>
-          </el-select>
-             <el-button type="text" style="float: right" @click="clearCom"
-            >清空列表</el-button
-          >
+            <el-select
+              placeholder="请选择主班"
+              v-model="radio"
+              clearable
+              @change="changeMasterClass"
+            >
+              <el-option
+                v-for="(item, index) in dataList"
+                :label="item.name"
+                :value="item.id"
+                :key="index"
+              >
+                <span style="float: left">{{ item.name }}</span>
+                <span style="float: right; color: #8492a6; font-size: 13px">{{
+                  String(item.id)
+                }}</span>
+              </el-option>
+            </el-select>
+            <el-button type="text" style="float: right" @click="clearCom"
+              >清空列表</el-button
+            >
           </div>
 
           <div>
             <!-- <el-radio-group v-model="radio" @change="changeMasterClass"> -->
-              <el-table
-                :data="dataList"
-                height="300px"
-                :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+            <el-table
+              :data="dataList"
+              height="300px"
+              :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+            >
+              <el-table-column align="center" label="班级编号" width="110">
+                <template slot-scope="scope">
+                  {{ scope.row.id }}
+                  <!-- <el-radio :label="scope.row.id"></el-radio> -->
+                </template>
+              </el-table-column>
+              <el-table-column
+                align="center"
+                width="180px"
+                label="班级名称"
+                prop="name"
+              ></el-table-column>
+              <el-table-column align="center" label="班级类型">
+                <template slot-scope="scope">
+                  <div>{{ scope.row.type | classType }}</div>
+                </template>
+              </el-table-column>
+              <el-table-column
+                align="center"
+                width="180px"
+                prop="teacherName"
+                label="已选学生数"
               >
-                <el-table-column align="center" label="班级编号" width="110">
-                  <template slot-scope="scope">
-                    {{scope.row.id}}
-                    <!-- <el-radio :label="scope.row.id"></el-radio> -->
-                  </template>
-                </el-table-column>
-                <el-table-column
-                  align="center"
-                  width="180px"
-                  label="班级名称"
-                  prop="name"
-                ></el-table-column>
-                <el-table-column align="center" label="班级类型">
-                  <template slot-scope="scope">
-                    <div>{{ scope.row.type | classType }}</div>
-                  </template>
-                </el-table-column>
-                <el-table-column
-                  align="center"
-                  width="180px"
-                  prop="teacherName"
-                  label="已选学生数"
-                >
-                  <!--    -->
-                  <template slot-scope="scope">
-                    <div>
-                      {{
-                        scope.row.studentList ? scope.row.studentList.length : 0
-                      }}
-                    </div>
-                  </template>
-                </el-table-column>
-                <el-table-column align="center" label="操作" width="200px">
-                  <template slot-scope="scope">
-                    <el-button type="text" @click="cancleCom(scope.row)"
-                      >取消</el-button
-                    >
-                    <el-button
-                      type="text"
-                      @click="showStudentList(scope.row)"
-                      :disabled="scope.row.id == radio"
-                      >添加学生</el-button
-                    >
-                  </template>
-                </el-table-column>
-              </el-table>
+                <!--    -->
+                <template slot-scope="scope">
+                  <div>
+                    {{
+                      scope.row.studentList ? scope.row.studentList.length : 0
+                    }}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column align="center" label="操作" width="200px">
+                <template slot-scope="scope">
+                  <el-button type="text" @click="cancleCom(scope.row)"
+                    >取消</el-button
+                  >
+                  <el-button
+                    type="text"
+                    @click="showStudentList(scope.row)"
+                    :disabled="scope.row.id == radio"
+                    >添加学生</el-button
+                  >
+                </template>
+              </el-table-column>
+            </el-table>
             <!-- </el-radio-group> -->
           </div>
           <el-button
@@ -131,20 +136,18 @@
       masterClassGroupId:'',
       classGroupStudents:[] -->
       <calenderStudentList
-      ref='calenderStudentList'
+        ref="calenderStudentList"
         v-if="calenderStudentVisible"
         :classList="dataList"
         :studentIds="studentIds"
         :masterClassGroupId="masterClassGroupId"
         :classGroupStudents="classGroupStudents"
         :mergeInfo="mergeInfo"
-        @refresh='refresh'
+        @refresh="refresh"
       />
       <span slot="footer" class="dialog-footer">
         <el-button @click="calenderStudentVisible = false">取 消</el-button>
-        <el-button type="primary" @click="submitInfo"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitInfo">确 定</el-button>
       </span>
     </el-dialog>
   </div>
@@ -181,14 +184,13 @@ export default {
   },
   methods: {
     cancleCom(row) {
-      if(row.id== this.radio){
-        this.radio = ''
+      if (row.id == this.radio) {
+        this.radio = "";
       }
       this.$emit("cancleCompound", row);
     },
     clearCom() {
       this.$emit("clearCom");
-
     },
     async submitClass() {
       if (!this.radio) {
@@ -212,7 +214,7 @@ export default {
           flag = true;
         }
 
-        if (com.id != this.radio&&com.studentList?.length>0) {
+        if (com.id != this.radio && com.studentList?.length > 0) {
           this.classGroupStudents.push({
             [com.id]: com.studentList.map((stu) => stu.userId).join(","),
           });
@@ -250,12 +252,12 @@ export default {
       // 试着请求
     },
     getList() {
-       this.$emit("getList");
+      this.$emit("getList");
     },
-    refresh(){
+    refresh() {
       this.calenderStudentVisible = false;
-      this.clearCom()
-      this.getList()
+      this.clearCom();
+      this.getList();
     },
     closeReset() {
       this.clearCom();
@@ -293,9 +295,9 @@ export default {
         }
       });
     },
-    submitInfo(){
-      this.$refs.calenderStudentList.submit()
-    }
+    submitInfo() {
+      this.$refs.calenderStudentList.submit();
+    },
   },
   watch: {
     compoundList(val) {
@@ -346,7 +348,7 @@ export default {
 /deep/.el-divider--horizontal {
   margin: 0 !important;
 }
-.topWrap{
+.topWrap {
   margin: 10px 0;
   padding: 0 20px 0 0;
 }

+ 5 - 4
src/views/teamDetail/componentCourse/compoundClass.vue

@@ -25,6 +25,10 @@
                 :value="item.id"
                 :label="item.name"
               >
+                <span style="float: left">{{ item.name }}</span>
+                <span style="float: right; color: #8492a6; font-size: 13px">{{
+                  String(item.id)
+                }}</span>
               </el-option>
             </el-select>
           </el-form-item>
@@ -80,10 +84,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item
-            label="助教老师"
-            prop="assistant"
-          >
+          <el-form-item label="助教老师" prop="assistant">
             <!-- :multiple="true" -->
             <remote-search
               :commit="'setTeachers'"

+ 5 - 0
src/views/teamDetail/teamClassList.vue

@@ -88,6 +88,11 @@
               <copy-text>{{ scope.row.musicGroupId }}</copy-text>
             </template>
           </el-table-column>
+                   <el-table-column align="center" prop="musicGroupId" label="程组编号">
+            <template slot-scope="scope">
+              <copy-text>{{ scope.row.id }}</copy-text>
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             prop="musicGroupName"