|
@@ -30,6 +30,9 @@
|
30
|
30
|
<div class="flex" style="justify-content:center">
|
31
|
31
|
<div v-if="scope.row.group_id != 0" class="c-00B38A pointer table_button" @click="onClickEditGroup(scope.row)">编辑</div>
|
32
|
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
|
36
|
</div>
|
34
|
37
|
</template>
|
35
|
38
|
</el-table-column>
|
|
@@ -106,13 +109,34 @@ export default {
|
106
|
109
|
onClickCreatedRule () {
|
107
|
110
|
this.massMsgFlag = true
|
108
|
111
|
},
|
109
|
|
- // 监听点击"推送记录"
|
|
112
|
+ // 监听点击"详情"
|
110
|
113
|
onClickGroupDetail(data) {
|
111
|
114
|
this.$router.push({
|
112
|
115
|
path: '/pushDetailV3',
|
113
|
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
|
141
|
onClickStatus(row) {
|
118
|
142
|
this.$confirm(`确定${row.status == 0 ? '启用' : '禁用'}【${row.title}】?`, '提示', {
|