Explorar o código

fix: 5243 删除掉已发布的考试时,需同时联动删除该考试相关的日程和消息

johnsen hai 6 meses
pai
achega
30abef728d
Modificáronse 1 ficheiros con 12 adicións e 17 borrados
  1. 12 17
      src/views/platform/examination/exam/list.vue

+ 12 - 17
src/views/platform/examination/exam/list.vue

@@ -853,7 +853,8 @@ export default {
             subject: '考试信息提醒',
             content: msgContent,
             receiverId: i,
-            canreplay: '0'
+            canreplay: '0',
+            waiJian: examId
           })
         )
         // 添加日程
@@ -989,27 +990,21 @@ export default {
           ids: ids.join(',')
         })
           .then(() => {
-            // ActionUtils.removeSuccessMessage()
-            this.$common
-              .request('delete', {
+            Promise.all([
+              this.$common.request('delete', {
                 tableName: 'IBPS_PARTY_USER_CALENDAR',
                 paramWhere: { data_source_id_: ids.join(',') }
+              }),
+              this.$common.request('delete', {
+                tableName: 'IBPS_MSG_INNER',
+                paramWhere: { wai_jian_: ids.join(',') }
               })
-              .then(() => {
-                this.search()
-                this.$message.success('删除成功!')
-              })
+            ]).then((res) => {
+              this.search()
+              this.$message.success('删除成功!')
+            })
           })
           .catch(() => {})
-
-        // // 自定义删除方法,弃用,无法联动删除子表数据及考试对应日程数据
-        // this.$common.request('delete', {
-        //     tableName: 't_exams',
-        //     paramWhere: { id_: ids.join(',') }
-        // }).then(() => {
-        //     ActionUtils.removeSuccessMessage()
-        //     this.search()
-        // })
       })
     },
     transformUser(userId) {