فهرست منبع

master dispatch

shilipojs 2 سال پیش
والد
کامیت
338ab639a6

+ 12 - 3
src/api/webApi/elective/dispatch.js

@@ -111,7 +111,7 @@ export function saveTeacherSettings(params) {
 }
 
 // 获取当前学生分班或者班主任分班设置
-export function publish(params) {
+export function getPublish(params) {
   return request({
     url: '/front/elective/classes/publish',
     method: 'get',
@@ -120,11 +120,20 @@ export function publish(params) {
 }
 
 // 分配完毕后发布,锁定分班流程,与班主任分班共享设置时间
-export function lockPublish(params) {
+export function lockPublish(data) {
   return request({
     url: '/front/elective/classes/publish',
     method: 'post',
-    params
+    data
+  })
+}
+
+// 锁定班主任分班流程,与学生分班共享设置时间
+export function lockPublishTeachers(data) {
+  return request({
+    url: '/front/elective/classes/publicTeachers',
+    method: 'post',
+    data
   })
 }
 // getDispatchSharedSetting

+ 18 - 7
src/views/elective/dispatch/index.vue

@@ -12,7 +12,7 @@
 </template>
 <script>
 import DispatchTable from "./components/dispatch-table.vue";
-import { getRound,getSettings,lockDispatch } from '@/api/webApi/elective/dispatch'
+import { getRound,getSettings,lockDispatch,getPublish,lockPublish} from '@/api/webApi/elective/dispatch'
 import MxCondition from '@/components/MxCondition/mx-condition'
 
 export default {
@@ -30,6 +30,7 @@ export default {
       loading: false,
       settings: [],
       round: { },
+      publish: {}
     };
   },
   computed: {
@@ -47,8 +48,17 @@ export default {
   methods: {
     handleQuery() {
       this.getRound()
+      this.getPublish()
       this.getSettings()
     },
+    getPublish() {
+      getPublish({
+        roundId: this.queryParams.roundId
+      }).then(res => {
+        this.publish = res.data
+        console.log(res)
+      })
+    },
     async lockDispatch() {
       // 班级数累计
       const classCounts = this.round.roundGroups.reduce((prev,cur) => {
@@ -61,13 +71,14 @@ export default {
       }
       // 分班锁定
       await this.$confirm(`确定要发布分班?`)
-      lockDispatch({roundId:this.queryParams.roundId}).then(res => {
-         if(res.code == '200'){
-           this.$message.success('成功发布分班')
-           this.handleQuery()
-         }
+      this.toLockPublish()
+    },
+    toLockPublish() {
+      lockPublish({
+        setting:this.publish
+      }).then(res=> {
+        console.log(res)
       })
-
     },
     // 获取批次的setting
     getSettings() {

+ 4 - 4
src/views/elective/master/index.vue

@@ -34,7 +34,7 @@
   </div>
 </template>
 <script>
-import {getTeacherSettings,keepAllOfTeacher,publish,saveTeacherSettings} from  '@/api/webApi/elective/dispatch'
+import {getTeacherSettings,keepAllOfTeacher,getPublish,saveTeacherSettings,lockPublishTeachers} from  '@/api/webApi/elective/dispatch'
 import ChooseMasterTeacher from './components/choose-master-teacher'
 import classTreeMixin from '@/components/Cache/modules/mx-classTree-translate-mixin'
 import ChooseClass from './components/choose-class'
@@ -104,7 +104,7 @@ export default  {
   },
   methods: {
     getPublish() {
-      publish({
+      getPublish({
         roundId:this.queryParams.roundId
       }).then(res => {
          console.log(res)
@@ -138,7 +138,7 @@ export default  {
     },
     send() {
       if(true) {
-        this.$message.warning('还有班级未分配')
+        this.$message.warning('还有班级未分配新班主任和新班级号')
         return
       }
 
@@ -149,7 +149,7 @@ export default  {
         this.$message.warning('请先设定新班级')
         return
       }
-      await this.$confirm(`是否取消?`)
+      await this.$confirm(`是否撤回你对该班级(原${row.className})的操作?`)
       saveTeacherSettings({
         roundId: this.queryParams.roundId,
         classId: row.newClassId,

+ 1 - 1
src/views/permission/teacher-manage.vue

@@ -106,7 +106,7 @@ export default {
       const settingsValue = Object.values(this.headTeacherSettings)
       const headTeacherSettings = this.headTeacherSettings
       for (const key in headTeacherSettings) {
-        if(headTeacherSettings[key].headteacherCode ==  row.customerCode) {
+        if(headTeacherSettings[key].customerCode ==  row.customerCode) {
           return this.getClassName(key)
         }
       }