Tang 1 year ago
parent
commit
02f436bfb7
2 changed files with 25 additions and 5 deletions
  1. 9 0
      src/newApi/classTab.js
  2. 16 5
      src/views/education/classManageMent/studentMenu/index.vue

+ 9 - 0
src/newApi/classTab.js

@@ -356,4 +356,13 @@ export default {
             data
         })
     },
+    //强制推送
+    gradestudentpushForceInfo(data) {
+        return request({
+            url: '/grade/student/pushForceInfo',
+            method: 'post',
+            data
+        })
+    },
+    
 }

+ 16 - 5
src/views/education/classManageMent/studentMenu/index.vue

@@ -16,7 +16,16 @@
         >
       </div>
       <div>
-        <el-button size="small" v-if="statusShow.includes(1)" @click="uploadGF"
+        <el-button
+          size="small"
+          v-if="statusShow.includes(1)"
+          @click="uploadGF(2)"
+          >强制上报</el-button
+        >
+        <el-button
+          size="small"
+          v-if="statusShow.includes(1)"
+          @click="uploadGF(1)"
           >上报注册中心</el-button
         >
         <span
@@ -898,7 +907,7 @@ export default {
         pageSize: 10,
         pageNum: 1,
       };
-      this.search(3)
+      this.search(3);
     },
     changeClass(row) {
       this.dialogVisibleClass = true;
@@ -911,19 +920,21 @@ export default {
       this.search();
       this.$refs.tableList.clearMoreActive();
     },
-    uploadGF() {
+    uploadGF(type) {
       if (!this.$refs.tableList.allCheckData.length) {
         this.$message.warning("请勾选需要官方信息推送的学员");
         return;
       }
       let arr = this.$refs.tableList.allCheckData.map((item) => {
         return {
-          orderGoodsId:item.orderGoodsId,
+          orderGoodsId: item.orderGoodsId,
           userId: item.userId,
           gradeId: item.gradeId,
         };
       });
-      this.$api.editGradeUsereditpushInfo(arr).then((res) => {
+      this.$api[
+        type == 1 ? "editGradeUsereditpushInfo" : "gradestudentpushForceInfo"
+      ](arr).then((res) => {
         if (res.code === 200) {
           if (!res.msg) {
             this.$message.success("推送成功");