浏览代码

分班详情--增加原班级

shilipojs 2 年之前
父节点
当前提交
34fcba0e04

+ 26 - 0
src/components/MxCondition/condition-object/condition-class-tree.js

@@ -0,0 +1,26 @@
+import conditionObjectBase from '../condition-object-base.js'
+import classTreeMixin from '@/components/Cache/modules/mx-classTree-translate-mixin'
+import { getAllGradeClasses } from '@/api/webApi/grade'
+export default {
+  mixins: [classTreeMixin],
+  ...conditionObjectBase,
+  key: 'localClassId',
+  title: '原班级',
+  getList: function(param, $vue) {
+    console.log(param)
+    return new Promise((resolve,reject) => {
+      getAllGradeClasses().then(res =>{
+        // 暂时写死
+        resolve(res.data[0].classList)
+      }).catch(
+        e => reject(e)
+      )
+    })
+  },
+  getCode: function(item) {
+    return item.classId
+  },
+  getLabel: function(item) {
+    return item.className
+  }
+}

+ 1 - 1
src/components/MxCondition/condition-object/condition-dispatch-class.js

@@ -4,7 +4,7 @@ export default {
   ...conditionObjectBase,
   dependentKeys: ['localGroupId'],
   key: 'dispatchClassId',
-  title: '班级',
+  title: '班级',
   isDependencyReady(params) {
     return params.localGroupId
   },

+ 1 - 1
src/views/elective/dispatch/master/info/student.vue

@@ -49,7 +49,7 @@ export default {
           label: '录取组合'
         },
         newTeacher: {
-          label: '班主任'
+          label: '当前班主任'
         },
         time: {
           label: '分班信息生效时间'

+ 16 - 2
src/views/elective/dispatch/student/components/class-table.vue

@@ -7,6 +7,14 @@
       @selection-change="handleSelectionChange"
       style="width: 100%"
     >
+      <el-table-column
+        label="序号"
+        v-if="type  != '1'"
+      >
+        <template slot-scope="scope">
+          {{ (pageForm.pageNum - 1) * pageForm.pageSize + scope.$index + 1 }}
+        </template>
+      </el-table-column>
       <el-table-column
         label="选择"
         type="selection"
@@ -42,10 +50,16 @@
         prop="sex"
       >
       </el-table-column>
+<!--      <el-table-column-->
+<!--        :label="dispatchClassId ==  '' ? '组合排名' : '班级排名'"-->
+<!--        prop="rankInClass"-->
+<!--        v-if="type != '1'"-->
+<!--      >-->
+<!--      </el-table-column>-->
       <el-table-column
-        :label="dispatchClassId ==  '' ? '组合排名' : '班级排名'"
+        label="班级排名"
         prop="rankInClass"
-        v-if="type != '1'"
+        v-if="type == '1'"
       >
       </el-table-column>
       <el-table-column

+ 3 - 3
src/views/elective/dispatch/student/detail.vue

@@ -15,8 +15,6 @@
     <class-table :dispatchClassId="queryParams.dispatchClassId" :pageForm="pageForm"  type="2" :list="studentList"></class-table>
   </div>
 </template>
-<!--:setting-model="settingModel" :group-model-index="groupModelIndex"-->
-<!--:group-model="groupModel" :default-group-id="scoreQueryGroupId"-->
 <script>
 import MxSelectTranslateMixin from '@/components/Cache/modules/mx-select-translate-mixin.js'
 import MxCondition from '@/components/MxCondition/mx-condition'
@@ -66,9 +64,10 @@ export default {
       }
       this.$nextTick(_ => this.queryParams = {
         localGroupId: this.prevData.group.groupId,
+        localClassId: '',
         dispatchClassId: this.prevData.classId || '',
         dispatchGender: '',
-        dispatchRoundId: this.prevData.group.roundId
+        dispatchRoundId: this.prevData.group.roundId,
       })
       return source
     },
@@ -94,6 +93,7 @@ export default {
         pageSize: this.pageForm.pageSize,
         pageNum: this.pageForm.pageNum,
         roundId: this.queryParams.dispatchRoundId,
+        oldClassId: this.queryParams.localClassId,
         sex: this.queryParams.dispatchGender || null,
       }).then(res => {
         console.log(res)