hare8999@163.com 2 years ago
parent
commit
80753c9090

+ 11 - 0
src/views/elective/generation/components/elective-generation-commands.vue

@@ -102,8 +102,10 @@ export default {
     },
     applyAlgorithm() {
       // 暂时只支持一种算法,不排队以后会支持多种
+      this.lockPage()
       const algorithm = config.electiveDMAlgorithm.rankFirst.value
       applyElectiveDMAlgorithm(algorithm, this.commitParams.roundId).finally(() => {
+        this.unlockPage()
         this.notifyRootRefresh()
       })
     },
@@ -112,7 +114,9 @@ export default {
       this.$emit('jumpDetail')
     },
     flushIntoDM() {
+      this.lockPage()
       flushIntoGenerationDM(this.commitParams).finally(() => {
+        this.unlockPage()
         this.notifyRootRefresh(true)
       })
     },
@@ -122,20 +126,27 @@ export default {
       this.pushSettingFormVisible = true
     },
     async commitPushSetting() {
+      this.lockPage()
       const setting = await this.$refs.settingForm.validate()
       setting.roundId = this.status.roundId
       pushGenerationSetting(setting).finally(() => {
+        this.pushSettingFormVisible = false
+        this.unlockPage()
         this.notifyRootRefresh(true)
       })
     },
     async jumpForceAdjust() {
       await this.$confirm('确认进入调剂阶段?')
+      this.lockPage()
       jumpGenerationForceAdjust(this.commitParams).finally(() => {
+        this.unlockPage()
         this.notifyRootRefresh(true)
       })
     },
     async jumpRankBalance() {
+      this.lockPage()
       jumpGenerationRankBalance(this.commitParams).finally(() => {
+        this.unlockPage()
         this.notifyRootRefresh(true)
       })
     },

+ 26 - 1
src/views/elective/generation/detail.vue

@@ -63,6 +63,25 @@
     <el-dialog :title="'查看分析 '+activeOpt.title" :visible.sync="studentTableVisible" :width="logDialogWidth">
       <elective-ai-table :generation="studentGeneration" :optional-majors="studentMajors" readonly></elective-ai-table>
     </el-dialog>
+    <el-dialog title="调剂确认" :visible.sync="forceConfirmVisible">
+      <div class="fx-column">
+        <div>
+          <span>目标组合:</span>
+          <el-radio-group v-model="forceConfirmGroupId">
+            <el-radio-button v-for="g in prevData.groups" :key="g.groupId" :value="g.groupId"
+                             :label="g.groupName"></el-radio-button>
+          </el-radio-group>
+        </div>
+        <div>
+          <span>操作学生:</span>
+          {{ forceConfirmStudents.map(s => `${s.studentName}${s.groupName ? `(${s.groupName})` : ''}`).join('、') }}
+        </div>
+        <div>
+          <span>调剂原因:</span>
+          <el-input v-model="force" type="textarea" autosize></el-input>
+        </div>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -136,6 +155,7 @@ export default {
       const queryCategory = this.prevData.queryableCategories.find(i => i.id == this.queryParams.generationQueryCode)
       const ignoreGroups = this.prevData.ignoreGroupCategories.includes(this.queryParams.generationQueryCode)
       const columns = {
+        select: { type: 'selection' },
         index: { label: '序号', slot: 'pagedIndex' },
         className: { label: '班级' },
         studentName: { label: '姓名', slot: 'studentName' },
@@ -216,7 +236,12 @@ export default {
       logRow: {},
       studentTableVisible: false,
       studentGeneration: {},
-      studentMajors: []
+      studentMajors: [],
+      // force adjust
+      forceConfirmVisible: false,
+      forceConfirmReason: '',
+      forceConfirmStudents: [],
+      forceConfirmGroupId: ''
     }
   },
   methods: {