Browse Source

校长分班提示

shilipojs 2 years ago
parent
commit
dfbb87ee1b

+ 6 - 1
src/components/MxDialog/DispatchMaster.vue

@@ -27,7 +27,8 @@
       return {
         show:false,
         value: '',
-        settings: {}
+        settings: {},
+        round:{}
       }
     },
     methods: {
@@ -42,6 +43,10 @@
         this.lock()
       },
       lock() {
+        if(this.round.is.teacherDone) {
+          this.$message.error('已经发布')
+          return
+        }
         lockPublishTeachers({
           ...this.settings
         }).then(res => {

+ 6 - 2
src/components/MxDialog/DispatchStudent.vue

@@ -26,7 +26,8 @@ export default {
   data(){
     return {
       show:false,
-      settings: {}
+      settings: {},
+      round:{}
     }
   },
   methods: {
@@ -46,7 +47,10 @@ export default {
       this.lock()
     },
     lock() {
-      console.log(this.settings)
+      if(this.round.is.teacherDone) {
+        this.$message.error('已经发布')
+        return
+      }
       lockPublish({
         ...this.settings
       }).then(res => {

+ 2 - 2
src/views/elective/dispatch/master/index.vue

@@ -61,7 +61,6 @@ export default {
   mixins: [classTreeMixin],
   data() {
     return {
-
       round: {},
       requireFields: ['year', 'roundId'],
       queryParams: {
@@ -211,7 +210,8 @@ export default {
       }
 
       this.$Dialog('DispatchMaster',{
-        settings: this.settings
+        settings: this.settings,
+        round:this.round
       },(val) => {
         this.handleQuery()
       })

+ 2 - 1
src/views/elective/dispatch/student/index.vue

@@ -75,7 +75,8 @@ export default {
 
       // 分班锁定
       this.$Dialog('DispatchStudent',{
-        settings: this.publishSettings
+        settings: this.publishSettings,
+        round:this.round
       },(val) => {
         this.$message.success('发布成功')
         this.handleQuery()