|
@@ -16,8 +16,15 @@
|
16
|
16
|
<el-table-column label="操作" min-width="210" align="center" fixed="right">
|
17
|
17
|
<template slot-scope="{ row }">
|
18
|
18
|
<span class="btn" @click="onClickEditGroup(row)">编辑</span>
|
19
|
|
- <span class="btn">创建群发</span>
|
20
|
|
- <span class="btn">创建欢迎语</span>
|
|
19
|
+ <el-popconfirm @confirm="onClickCreateSend(row, { jumpPath: routePathType.GROUP_SEND })" :title="`【${row.name}】确定创建群发?`">
|
|
20
|
+ <span slot="reference" class="btn">创建群发</span>
|
|
21
|
+ </el-popconfirm>
|
|
22
|
+ <el-popconfirm @confirm="onClickCreateSend(row, { jumpPath: routePathType.WELCOME_MSG })" :title="`【${row.name}】确定创建欢迎语?`">
|
|
23
|
+ <span slot="reference" class="btn">创建欢迎语</span>
|
|
24
|
+ </el-popconfirm>
|
|
25
|
+ <!-- <span class="btn" @click="onClickCreateSend(row, { jumpPath: routePathType.GROUP_SEND })">创建群发</span> -->
|
|
26
|
+ <!-- <span class="btn" @click="onClickCreateSend(row, { jumpPath: routePathType.WELCOME_MSG })">创建欢迎语</span> -->
|
|
27
|
+
|
21
|
28
|
</template>
|
22
|
29
|
</el-table-column>
|
23
|
30
|
</el-table>
|
|
@@ -36,6 +43,7 @@
|
36
|
43
|
</template>
|
37
|
44
|
<script>
|
38
|
45
|
import groupDialog from './dialog/groupDialog.vue'
|
|
46
|
+import { pageFromType, routePathType } from '@/assets/js/staticTypes'
|
39
|
47
|
|
40
|
48
|
export default {
|
41
|
49
|
name: 'playletGroup',
|
|
@@ -44,6 +52,7 @@ export default {
|
44
|
52
|
},
|
45
|
53
|
data () {
|
46
|
54
|
return {
|
|
55
|
+ routePathType,
|
47
|
56
|
height: '',
|
48
|
57
|
loading: false,
|
49
|
58
|
pagination: {
|
|
@@ -123,6 +132,42 @@ export default {
|
123
|
132
|
onCancelGroupDialog() {
|
124
|
133
|
this.groupDialogVisible = false
|
125
|
134
|
},
|
|
135
|
+
|
|
136
|
+ // 监听点击"创建群发"、"创建欢迎语"
|
|
137
|
+ async onClickCreateSend(groupInfo, { jumpPath }) {
|
|
138
|
+ try {
|
|
139
|
+ this.loading = true
|
|
140
|
+ const url = `${this.URL.BASEURL}${this.URL.playletManage_createPlayletGroupLink}`
|
|
141
|
+ const params = {
|
|
142
|
+ group_id: groupInfo.group_id,
|
|
143
|
+ }
|
|
144
|
+ const { data: res = {} } = await this.$axios.get(url, { params })
|
|
145
|
+ if (res && res.errno == 0 && res.rst) {
|
|
146
|
+ this.handleJump({
|
|
147
|
+ routePath: jumpPath,
|
|
148
|
+ h5Link: res.rst,
|
|
149
|
+ })
|
|
150
|
+ } else if (res.errno != 4002) {
|
|
151
|
+ this.$message.warning(res.err)
|
|
152
|
+ }
|
|
153
|
+ } catch (error) {
|
|
154
|
+ console.log(error)
|
|
155
|
+ } finally {
|
|
156
|
+ this.loading = false
|
|
157
|
+ }
|
|
158
|
+ },
|
|
159
|
+ handleJump({ routePath, h5Link }) {
|
|
160
|
+ const path = this.$router.resolve({
|
|
161
|
+ path: routePath,
|
|
162
|
+ query: {
|
|
163
|
+ from: pageFromType.PLAYLET_LINK_H5,
|
|
164
|
+ h5Path: encodeURIComponent(h5Link),
|
|
165
|
+ h5Desc: '',
|
|
166
|
+ h5Cover: '',
|
|
167
|
+ }
|
|
168
|
+ })
|
|
169
|
+ window.open(path.href, '_blank')
|
|
170
|
+ }
|
126
|
171
|
}
|
127
|
172
|
}
|
128
|
173
|
</script>
|