Parcourir la Source

feat: 智能推送 - 删除分组

zhengxy il y a 1 an
Parent
commit
d2e31495bb

+ 1 - 0
project/src/assets/config/interface_api.js

383
   smartPushV3_templateDetail: "/api/PeriodMassMsg/templateDetail", // 企微助手 - 智能推送V3 - 模板详情
383
   smartPushV3_templateDetail: "/api/PeriodMassMsg/templateDetail", // 企微助手 - 智能推送V3 - 模板详情
384
   smartPushV3_groupList: "/api/PeriodMassMsg/groupList", // 企微助手 - 智能推送V3 - 分组列表
384
   smartPushV3_groupList: "/api/PeriodMassMsg/groupList", // 企微助手 - 智能推送V3 - 分组列表
385
   smartPushV3_changeGroupStatus: "/api/PeriodMassMsg/changeGroupStatus", // 企微助手 - 智能推送V3 - 分组状态
385
   smartPushV3_changeGroupStatus: "/api/PeriodMassMsg/changeGroupStatus", // 企微助手 - 智能推送V3 - 分组状态
386
+  smartPushV3_delGroup: "/api/PeriodMassMsg/delGroup", // 企微助手 - 智能推送V3 - 删除分组
386
   smartPushV3_editGroup: "/api/PeriodMassMsg/editGroup", // 企微助手 - 智能推送V3 - 新建/编辑模板
387
   smartPushV3_editGroup: "/api/PeriodMassMsg/editGroup", // 企微助手 - 智能推送V3 - 新建/编辑模板
387
   smartPushV3_changeGroupBatch: "/api/PeriodMassMsg/changeGroupBatch", // 企微助手 - 智能推送V3 - 批量设置分组
388
   smartPushV3_changeGroupBatch: "/api/PeriodMassMsg/changeGroupBatch", // 企微助手 - 智能推送V3 - 批量设置分组
388
 
389
 

+ 25 - 1
project/src/components/smartPushV3/pushGroupList.vue

30
           <div class="flex" style="justify-content:center">
30
           <div class="flex" style="justify-content:center">
31
             <div v-if="scope.row.group_id != 0" class="c-00B38A pointer table_button" @click="onClickEditGroup(scope.row)">编辑</div>
31
             <div v-if="scope.row.group_id != 0" class="c-00B38A pointer table_button" @click="onClickEditGroup(scope.row)">编辑</div>
32
             <div class="c-00B38A pointer table_button" @click="onClickGroupDetail(scope.row)">详情</div>
32
             <div class="c-00B38A pointer table_button" @click="onClickGroupDetail(scope.row)">详情</div>
33
+            <el-popconfirm @confirm="onClickDelGroup(scope.row)" :title="`确定删除【${scope.row.title}】分组吗?`">
34
+              <div slot="reference" class="c-FF604D pointer table_button">删除</div>
35
+            </el-popconfirm>
33
           </div>
36
           </div>
34
         </template>
37
         </template>
35
       </el-table-column>
38
       </el-table-column>
106
     onClickCreatedRule () {
109
     onClickCreatedRule () {
107
       this.massMsgFlag = true
110
       this.massMsgFlag = true
108
     },
111
     },
109
-    // 监听点击"推送记录"
112
+    // 监听点击"详情"
110
     onClickGroupDetail(data) {
113
     onClickGroupDetail(data) {
111
       this.$router.push({
114
       this.$router.push({
112
         path: '/pushDetailV3',
115
         path: '/pushDetailV3',
113
         query: { group_id: data.group_id }
116
         query: { group_id: data.group_id }
114
       })
117
       })
115
     },
118
     },
119
+    // 监听点击“删除”分组
120
+    async onClickDelGroup(row) {
121
+      try {
122
+        const url = `${this.URL.BASEURL}${this.URL.smartPushV3_delGroup}`
123
+        const params = {
124
+          group_id: row.group_id
125
+        }
126
+        this.$loading(this.$loadingConfig);
127
+        const { data: res = {} } = await this.$axios.get(url, { params })
128
+        if (res && res.errno == 0) {
129
+          this.$message.success('操作成功')
130
+          this.init()
131
+        } else if (res.errno != 4002) {
132
+          this.$message.warning(res.err)
133
+        }
134
+      } catch (error) {
135
+        console.log('error => ', error)
136
+      } finally {
137
+        this.$loading(this.$loadingConfig).close()
138
+      }
139
+    },
116
     // 监听点击切换"状态"
140
     // 监听点击切换"状态"
117
     onClickStatus(row) {
141
     onClickStatus(row) {
118
       this.$confirm(`确定${row.status == 0 ? '启用' : '禁用'}【${row.title}】?`, '提示', {
142
       this.$confirm(`确定${row.status == 0 ? '启用' : '禁用'}【${row.title}】?`, '提示', {