Ver Código Fonte

feat: 短剧组推广 - 短剧库&短剧组

zhengxy 2 anos atrás
pai
commit
64a4c83905

+ 260 - 0
project/src/components/manage/playletManageV2/dialog/playletSendDialog.vue

@@ -0,0 +1,260 @@
1
+<template>
2
+  <el-dialog
3
+    :visible.sync="dialogVisible"
4
+    :before-close="handleCancel"
5
+    class="playletSend-dialog"
6
+    :title="dialogTitle"
7
+    width="450px"
8
+  >
9
+    <div class="form-wrap" v-loading="loading">
10
+      <div class="form-item">
11
+        <span class="lable"><em>*</em>推广链接名称</span>
12
+        <el-input v-model="form.name" size="small" placeholder="请输入推广链接名称" clearable />
13
+      </div>
14
+      <div class="form-item">
15
+        <span class="lable"><em>*</em>剧集</span>
16
+        <el-input v-model="form.episode_num" size="small" placeholder="请输入剧集数" clearable @input="onInputEpisodeNum" />
17
+        <span class="total">共{{ playletInfo.section_count || '-' }}集</span>
18
+      </div>
19
+      <div class="form-item">
20
+        <span class="lable"><em>*</em>公众号</span>
21
+        <el-select v-model="form.app_id" size="small" placeholder="请选择公众号" clearable filterable>
22
+          <el-option v-for="item in mpAccountOptions" :key="item.mp_app_id" :label="item.mp_name" :value="item.mp_app_id" />
23
+        </el-select>
24
+      </div>
25
+      <div class="form-item">
26
+        <span class="lable"><em>*</em>账号</span>
27
+        <el-select v-model="form.account_id" size="small" placeholder="请选择账号" clearable filterable>
28
+          <el-option v-for="item in accountOptions" :key="item.account_id" :label="item.account" :value="item.account_id" />
29
+        </el-select>
30
+      </div>
31
+      <div class="form-item">
32
+        <span class="lable"><em>*</em>推广类型</span>
33
+        <el-radio-group v-model="form.promotionType">
34
+          <el-radio :label="1">H5</el-radio>
35
+          <el-radio :label="2">小程序</el-radio>
36
+        </el-radio-group>
37
+      </div>
38
+      <div v-if="isShowMiniApp" class="form-item">
39
+        <span class="lable"><em>*</em>小程序</span>
40
+        <el-select v-model="form.mini_app_id" size="small" placeholder="请选择小程序" clearable filterable>
41
+          <el-option v-for="item in miniProOptions" :key="item.app_id" :label="item.app_name" :value="item.app_id" />
42
+        </el-select>
43
+      </div>
44
+    </div>
45
+    <div slot="footer" class="dialog-footer">
46
+      <el-button size="mini" @click="handleCancel">取 消</el-button>
47
+      <el-button size="mini" type="primary" @click="handleConfirm" :disabled="loading">确 定</el-button>
48
+    </div>
49
+  </el-dialog>
50
+</template>
51
+
52
+<script>
53
+import { getIntegerNumber } from '@/assets/js/common'
54
+
55
+export default {
56
+  name: "playletSendDialog",
57
+  props: {
58
+    // 控制弹框是否显示
59
+    dialogVisible: {
60
+      type: Boolean,
61
+      default: () => false
62
+    },
63
+    // 剧集信息
64
+    playletInfo: {
65
+      type: Object,
66
+      default: () => ({})
67
+    },
68
+  },
69
+  data() {
70
+    return {
71
+      loading: false,
72
+      mpAccountOptions: [], // 公众号选项
73
+      accountOptions: [], // 账号选项
74
+      miniProOptions: [], // 小程序选项
75
+      form: {
76
+        name: '', // 推广链接名称
77
+        episode_num: '', // 剧集数
78
+        app_id: '', // 公众号
79
+        account_id: '', // 账号
80
+        promotionType: 1, // 推广类型 1H5、2小程序
81
+        mini_app_id: '', // 小程序
82
+      }
83
+    }
84
+  },
85
+  computed: {
86
+    // 弹框标题
87
+    dialogTitle() {
88
+      return `剧集群发${this.playletInfo.name ? ('-' + this.playletInfo.name) : ''}`
89
+    },
90
+    // 控制是否展示"小程序" => 目前"嘉书(新)"平台不需要展示
91
+    isShowMiniApp() {
92
+      // return this.playletInfo.platform_id != 4
93
+      return this.form.promotionType === 2
94
+    },
95
+  },
96
+  watch: {
97
+    dialogVisible(isShow) {
98
+      // 弹框显示 => 初始化表单数据
99
+      if (isShow) {
100
+        this.handleGetMpAccountOptions()
101
+        this.handleGetAccountOptions()
102
+        this.handleGetMiniProOptions()
103
+        this.handleInitData()
104
+      }
105
+    },
106
+  },
107
+  methods: {
108
+    // 获取公众号选项列表
109
+    async handleGetMpAccountOptions() {
110
+      const { data: res = {} } = await this.$axios.post(this.URL.BASEURL + this.URL.playletManage_appList, {})
111
+      if (res && res.errno == 0) {
112
+        this.mpAccountOptions = res.rst
113
+      } else if (res.errno != 4002) {
114
+        this.$message.warning(res.err)
115
+      }
116
+    },
117
+    // 获取账号选项列表
118
+    async handleGetAccountOptions() {
119
+      const { data: res = {} } = await this.$axios.post(this.URL.BASEURL + this.URL.playletManage_accountList, {
120
+        platform_id: this.playletInfo.platform_id
121
+      })
122
+      if (res && res.errno == 0) {
123
+        this.accountOptions = res.rst
124
+      } else if (res.errno != 4002) {
125
+        this.$message.warning(res.err)
126
+      }
127
+    },
128
+    // 获取小程序选项列表
129
+    async handleGetMiniProOptions() {
130
+      const { data: res = {} } = await this.$axios.post(this.URL.BASEURL + this.URL.playletManage_smallAppList, {
131
+        platform_id: this.playletInfo.platform_id
132
+      })
133
+      if (res && res.errno == 0) {
134
+        this.miniProOptions = res.rst
135
+      } else if (res.errno != 4002) {
136
+        this.$message.warning(res.err)
137
+      }
138
+    },
139
+    // 获取弹框表单数据
140
+    handleInitData() {
141
+      this.loading = false
142
+      this.form.name = ''
143
+      this.form.episode_num = ''
144
+      this.form.app_id = ''
145
+      this.form.account_id = ''
146
+      this.form.mini_app_id = ''
147
+    },
148
+    async handleConfirm() {
149
+      console.log('handleConfirm => ')
150
+      console.log('form => ', this.form)
151
+      console.log('playletInfo => ', this.playletInfo)
152
+      try {
153
+        // 表单校验
154
+        await this.handleFormValidate()
155
+        let url = `${this.URL.BASEURL}${this.URL.playletManage_createLink}`
156
+        const params = {
157
+          ...this.form,
158
+          platform_id: this.playletInfo.platform_id,
159
+          playlet_id: this.playletInfo.playlet_id,
160
+        }
161
+        this.loading = true
162
+        const { data: res = {} } = await this.$axios.get(url, { params })
163
+        if (res && res.errno == 0) {
164
+          this.$message.success('操作成功')
165
+          this.$emit('confirm', {
166
+            miniProPath: res.rst.path, // 迈步平台 - 目前生成的是"小程序路径链接"
167
+            miniProAppId: this.form.mini_app_id,
168
+            miniProDesc: res.rst.desc,
169
+            miniProCover: res.rst.cover,
170
+
171
+            h5Path: res.rst.path, // 嘉书(新)平台 - 目前生成的是"h5推广链接"
172
+            h5Desc: res.rst.desc,
173
+            h5Cover: res.rst.cover,
174
+          })
175
+        } else if (res.errno != 4002) {
176
+          this.$message.warning(res.err || '操作失败')
177
+        }
178
+      } catch (error) {
179
+        console.log('error => ', error)
180
+      } finally {
181
+        this.loading = false
182
+      }
183
+    },
184
+    handleCancel() {
185
+      this.$emit('cancel')
186
+    },
187
+    // 执行表单校验
188
+    handleFormValidate() {
189
+      return new Promise((resolve, reject) => {
190
+        const { name, episode_num, app_id, account_id, mini_app_id } = this.form
191
+        const isShowMiniApp = this.isShowMiniApp
192
+        if (!name) {
193
+          this.$message.warning('请输入推广链接名称')
194
+          reject('表单校验未通过')
195
+        } else if (!episode_num) {
196
+          this.$message.warning('请输入剧集数')
197
+          reject('表单校验未通过')
198
+        } else if (!app_id) {
199
+          this.$message.warning('请选择公众号')
200
+          reject('表单校验未通过')
201
+        } else if (!account_id) {
202
+          this.$message.warning('请选择账号')
203
+          reject('表单校验未通过')
204
+        } else if (isShowMiniApp && !mini_app_id) {
205
+          this.$message.warning('请选择小程序')
206
+          reject('表单校验未通过')
207
+        } else {
208
+          resolve('表单校验通过')
209
+        }
210
+      })
211
+    },
212
+    // 监听剧集数输入
213
+    onInputEpisodeNum(inputVal) {
214
+      this.form.episode_num = getIntegerNumber(inputVal)
215
+    }
216
+  },
217
+};
218
+</script>
219
+
220
+<style lang="scss" scoped>
221
+.playletSend-dialog {
222
+  /deep/ .el-dialog__title {
223
+    display: inline-block;
224
+    width: 90%;
225
+  }
226
+  /deep/ .el-dialog__body {
227
+    padding: 20px 30px 30px 14px;
228
+  }
229
+  .form-wrap {
230
+    .form-item {
231
+      display: flex;
232
+      align-items: center;
233
+      margin-top: 16px;
234
+      &:first-child {
235
+        margin-top: 0;
236
+      }
237
+      .lable {
238
+        width: 100px;
239
+        margin-right: 10px;
240
+        font-weight: 500;
241
+        flex-shrink: 0;
242
+        text-align: right;
243
+        em {
244
+          color: red;
245
+        }
246
+      }
247
+      .el-select {
248
+        width: 100%;
249
+      }
250
+    }
251
+  }
252
+  .dialog-footer {
253
+    text-align: center;
254
+  }
255
+  .total {
256
+    flex-shrink: 0;
257
+    margin-left: 16px;
258
+  }
259
+}
260
+</style>

+ 31 - 0
project/src/components/manage/playletManageV2/index.vue

@@ -0,0 +1,31 @@
1
+<template>
2
+  <div>
3
+    <div class="topTagBox flex" id="customerAnalysis">
4
+      <div class="left flex-align-center">
5
+        <div :class="['tagItem',tagType==1?'tagItem_active':'']" @click="changeType(1);">短剧库</div>
6
+        <div :class="['tagItem',tagType==2?'tagItem_active':'']" @click="changeType(2);">短剧组</div>
7
+      </div>
8
+    </div>
9
+    <playletManage v-if="tagType==1" />
10
+    <playletGroup v-if="tagType==2" />
11
+  </div>
12
+</template>
13
+
14
+<script>
15
+import playletManage from './playletManage.vue'
16
+import playletGroup from './playletGroup.vue'
17
+export default {
18
+  name: "playletManageV2",
19
+  components: { playletManage, playletGroup },
20
+  data() {
21
+    return {
22
+      tagType: 1
23
+    }
24
+  },
25
+  methods:{
26
+    changeType(type){
27
+      this.tagType = type
28
+    }
29
+  }
30
+}
31
+</script>

+ 151 - 0
project/src/components/manage/playletManageV2/playletGroup.vue

@@ -0,0 +1,151 @@
1
+<template>
2
+  <div v-loading="loading" class="playletManage-wrap">
3
+    <div class="screenBox">
4
+      <el-button type="primary" size="mini">创建组</el-button>
5
+    </div>
6
+    <el-table ref="tableDom" :height="height" :data="playletList" tooltip-effect="dark" style="width: 100%;margin-top:10px">
7
+      <el-table-column label="短剧组名称" prop="name" min-width="200" align="left" fixed="left" />
8
+      <el-table-column label="短剧" min-width="500" align="left">
9
+        <template slot-scope="{ row }">
10
+          <div class="playlet-wrap">
11
+            <span class="playlet-item" v-for="item in 3" :key="item">短剧1111111</span>
12
+          </div>
13
+        </template>
14
+      </el-table-column>
15
+      <el-table-column label="操作" min-width="210" align="center" fixed="right">
16
+        <template slot-scope="{ row }">
17
+          <span class="btn">编辑</span>
18
+          <span class="btn">创建群发</span>
19
+          <span class="btn">创建欢迎语</span>
20
+        </template>
21
+      </el-table-column>
22
+    </el-table>
23
+    <div class="pagination" v-show="pagination.total > 0">
24
+      <el-pagination background :current-page="pagination.page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count="Number(pagination.pages)">
25
+      </el-pagination>
26
+    </div>
27
+  </div>
28
+</template>
29
+<script>
30
+export default {
31
+  name: 'playletManage',
32
+  components: {},
33
+  data () {
34
+    return {
35
+      height: '',
36
+      loading: false,
37
+      pagination: {
38
+        page: 1,
39
+        page_size: 20,
40
+        pages: 0,
41
+        total: 0,
42
+      },
43
+      filter: {
44
+        platform_id: '',
45
+        account_id: '',
46
+        keyword: '',
47
+      },
48
+      playletList: [],
49
+    }
50
+  },
51
+  created () {
52
+    this.height = document.documentElement.clientHeight - 200 > 400 ? document.documentElement.clientHeight - 200 : 400
53
+    this.handleGetPlaylet()
54
+  },
55
+  methods: {
56
+    // 获取列表数据
57
+    async handleGetPlaylet() {
58
+      try {
59
+        this.loading = true
60
+        const url = `${this.URL.BASEURL}${this.URL.playletManage_playletList}`
61
+        const params = {
62
+          platform_id: this.filter.platform_id,
63
+          keyword: this.filter.keyword,
64
+          account_id: this.filter.account_id,
65
+          page: this.pagination.page,
66
+          page_size: this.pagination.page_size,
67
+        }
68
+        const { data: res = {} } = await this.$axios.get(url, { params })
69
+        if (res && res.errno == 0 && Array.isArray(res.rst.data)) {
70
+          this.playletList = res.rst.data;
71
+          this.pagination.total = res.rst.pageInfo.total;
72
+          this.pagination.pages = res.rst.pageInfo.pages;
73
+          this.$refs.tableDom.bodyWrapper.scrollTop = 0
74
+        } else if (res.errno != 4002) {
75
+          this.$message.warning(res.err)
76
+          this.playletList = [];
77
+          this.pagination.total = 0;
78
+          this.pagination.pages = 0;
79
+        }
80
+      } catch (error) {
81
+        console.log(error)
82
+        this.playletList = [];
83
+        this.pagination.total = 0;
84
+        this.pagination.pages = 0;
85
+      } finally {
86
+        this.loading = false
87
+      }
88
+    },
89
+    // 监听当前页数变化
90
+    handleCurrentChange(currentPage) {
91
+      this.pagination.page = currentPage
92
+      this.handleGetPlaylet()
93
+    },
94
+  }
95
+}
96
+</script>
97
+<style lang="scss" scoped>
98
+.screenBox {
99
+  background: #fff;
100
+  padding: 5px 20px;
101
+}
102
+/deep/ .el-select .el-input.is-focus .el-input__inner,
103
+/deep/ .el-select .el-input__inner:focus {
104
+  border-color: #DCDFE6;
105
+}
106
+.playletManage-wrap {
107
+  .playlet-wrap {
108
+    display: flex;
109
+    flex-wrap: wrap;
110
+    .playlet-item {
111
+      background-color: #F2F2F2;
112
+      color: #333;
113
+      padding: 2px 10px;
114
+      margin: 0 6px 6px 0;
115
+      border-radius: 4px;
116
+    }
117
+  }
118
+
119
+  .select-cls {
120
+    /deep/ .el-input__suffix {
121
+      border-top-right-radius: 4px;
122
+      border-bottom-right-radius: 4px;
123
+      border: 1px solid #DCDFE6;
124
+      right: 0;
125
+      width: 30px;
126
+      background-color: #F1F1F1;
127
+      .el-input__icon {
128
+        color: #909399;
129
+      }
130
+    }
131
+  }
132
+  .playlet-name {
133
+    color: #32B38A;
134
+    // cursor: pointer;
135
+  }
136
+  .status {
137
+    margin: 2px auto;
138
+    padding: 0 6px;
139
+    color: #32B38A;
140
+    border: 1px solid #32B38A;
141
+  }
142
+  .btn {
143
+    color: #32B38A;
144
+    cursor: pointer;
145
+    margin-right: 4px;
146
+    &:last-child {
147
+      margin-right: 0;
148
+    }
149
+  }
150
+}
151
+</style>

+ 284 - 0
project/src/components/manage/playletManageV2/playletManage.vue

@@ -0,0 +1,284 @@
1
+<template>
2
+  <div v-loading="loading" class="playletManage-wrap">
3
+    <div class="screenBox flex">
4
+      <div class="flex">
5
+        <selfChannel title="平台" type="platform" labelWidth @channelDefine="onChangePlatform" />
6
+        <div class="flex" style="margin-left: 30px;">
7
+          <span style="font-size: 14px; color: #666; margin-right: 8px;">账号</span>
8
+          <el-select class="select-cls" v-model="filter.account_id" size="small" placeholder="平台账号" clearable filterable :style="{width: '210px'}" @change="onChangeAccountId">
9
+            <el-option v-for="item in accountOptions" :key="item.account_id" :label="item.account" :value="item.account_id" />
10
+          </el-select>
11
+        </div>
12
+        <selfInput label_name="搜索剧集" @inputChange="onInputKeyword" />
13
+      </div>
14
+      <div class="right">
15
+        <el-badge :value="9" :hidden="false">
16
+          <el-button type="primary" plain size="mini">创建组</el-button>
17
+        </el-badge>
18
+      </div>
19
+    </div>
20
+    <el-table ref="tableDom" :height="height" :data="playletList" tooltip-effect="dark" style="width: 100%;margin-top:10px">
21
+      <el-table-column label="剧名" prop="name" min-width="160" align="center" fixed="left" />
22
+      <el-table-column label="封面" min-width="160" align="center">
23
+        <template slot-scope="{ row }">
24
+          <el-image style="width: 40px; height: 60px;" :src="row.cover_url" :preview-src-list="[row.cover_url]" />
25
+        </template>
26
+      </el-table-column>
27
+      <el-table-column label="平台" prop="platform_name" min-width="160" align="center">
28
+        <template slot-scope="{ row }">
29
+          <span>{{ row.platform_name }}</span>
30
+        </template>
31
+      </el-table-column>
32
+      <el-table-column label="账号" prop="account" min-width="160" align="center" />
33
+      <el-table-column label="分类" prop="category" min-width="160" align="center">
34
+        <template slot-scope="{ row }">
35
+          <span>{{ row.category || '-' }}</span>
36
+        </template>
37
+      </el-table-column>
38
+      <el-table-column label="集数" prop="section_count" min-width="160" align="center" />
39
+      <el-table-column label="发布时间" prop="create_date" min-width="160" align="center" />
40
+      <el-table-column label="状态" min-width="160" align="center">
41
+        <template slot-scope="{ row }">
42
+          <span v-if="row.finish_state == 1" class="status">已完结</span>
43
+          <span v-else class="status">连载中</span>
44
+        </template>
45
+      </el-table-column>
46
+      <el-table-column label="操作" min-width="210" align="center" fixed="right">
47
+        <template slot-scope="{ row }">
48
+          <span class="btn" @click="onClickCreateGroupSend(row, { type: 'employee_bulk_messaging_log' })">创建群发</span>
49
+          <span class="btn" @click="onClickCreateGroupSend(row, { type: 'welcom_message_create' })">创建欢迎语</span>
50
+          <template>
51
+            <span v-if="true" class="btn">加入剧组</span>
52
+            <span v-else class="btn disabled">已加入</span>
53
+          </template>
54
+        </template>
55
+      </el-table-column>
56
+    </el-table>
57
+    <div class="pagination" v-show="pagination.total > 0">
58
+      <el-pagination background :current-page="pagination.page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count="Number(pagination.pages)">
59
+      </el-pagination>
60
+    </div>
61
+
62
+    <!-- S 创建群发 -->
63
+    <playletSendDialog
64
+      :dialogVisible="playletSendDialogVisible"
65
+      :playletInfo="currentPlayletInfo"
66
+      @confirm="handlePlayletSendConfirm"
67
+      @cancel="handlePlayletSendCancel"
68
+    />
69
+    <!-- E 创建群发 -->
70
+  </div>
71
+</template>
72
+<script>
73
+import selfChannel from '@/components/assembly/screen/channel.vue'
74
+import selfInput from '@/components/assembly/screen/input.vue'
75
+import playletSendDialog from './dialog/playletSendDialog.vue'
76
+import { pageFromType } from '@/assets/js/staticTypes'
77
+export default {
78
+  name: 'playletManage',
79
+  components: {
80
+    selfChannel,
81
+    selfInput,
82
+    playletSendDialog,
83
+  },
84
+  data () {
85
+    return {
86
+      height: '',
87
+      loading: false,
88
+      pagination: {
89
+        page: 1,
90
+        page_size: 20,
91
+        pages: 0,
92
+        total: 0,
93
+      },
94
+      filter: {
95
+        platform_id: '',
96
+        account_id: '',
97
+        keyword: '',
98
+      },
99
+      playletList: [],
100
+      accountOptions: [], // 账号选项
101
+
102
+      playletSendDialogVisible: false, // 控制"添加账号"弹框显示
103
+      currentPlayletInfo: {}, // 当前编辑的账号信息
104
+      currentCreateType: '', // 当前创建类型 创建群发 & 创建欢迎语
105
+    }
106
+  },
107
+  created () {
108
+    this.height = document.documentElement.clientHeight - 200 > 400 ? document.documentElement.clientHeight - 200 : 400
109
+    this.handleGetPlaylet()
110
+  },
111
+  methods: {
112
+    // 获取列表数据
113
+    async handleGetPlaylet() {
114
+      try {
115
+        this.loading = true
116
+        const url = `${this.URL.BASEURL}${this.URL.playletManage_playletList}`
117
+        const params = {
118
+          platform_id: this.filter.platform_id,
119
+          keyword: this.filter.keyword,
120
+          account_id: this.filter.account_id,
121
+          page: this.pagination.page,
122
+          page_size: this.pagination.page_size,
123
+        }
124
+        const { data: res = {} } = await this.$axios.get(url, { params })
125
+        if (res && res.errno == 0 && Array.isArray(res.rst.data)) {
126
+          this.playletList = res.rst.data;
127
+          this.pagination.total = res.rst.pageInfo.total;
128
+          this.pagination.pages = res.rst.pageInfo.pages;
129
+          this.$refs.tableDom.bodyWrapper.scrollTop = 0
130
+        } else if (res.errno != 4002) {
131
+          this.$message.warning(res.err)
132
+          this.playletList = [];
133
+          this.pagination.total = 0;
134
+          this.pagination.pages = 0;
135
+        }
136
+      } catch (error) {
137
+        console.log(error)
138
+        this.playletList = [];
139
+        this.pagination.total = 0;
140
+        this.pagination.pages = 0;
141
+      } finally {
142
+        this.loading = false
143
+      }
144
+    },
145
+    // 监听当前页数变化
146
+    handleCurrentChange(currentPage) {
147
+      this.pagination.page = currentPage
148
+      this.handleGetPlaylet()
149
+    },
150
+    // 监听"平台"筛选变化
151
+    async onChangePlatform(val) {
152
+      this.filter.platform_id = val || ''
153
+
154
+      // 清空“账号”筛选值 => 根据最新平台值 获取 账号选项
155
+      this.filter.account_id = ''
156
+      this.accountOptions = []
157
+      if (this.filter.platform_id) {
158
+        this.handleGetAccountOptions()
159
+      }
160
+
161
+      await this.$nextTick()
162
+      this.pagination.page = 1
163
+      this.handleGetPlaylet()
164
+    },
165
+    // 监听"账号"筛选变化
166
+    onChangeAccountId(val) {
167
+      this.filter.account_id = val || ''
168
+      this.pagination.page = 1
169
+      this.handleGetPlaylet()
170
+    },
171
+    // 监听"搜索剧集"变化
172
+    onInputKeyword(val) {
173
+      this.filter.keyword = val || ''
174
+      this.pagination.page = 1
175
+      this.handleGetPlaylet()
176
+    },
177
+    // 获取账号选项列表
178
+    async handleGetAccountOptions() {
179
+      const { data: res = {} } = await this.$axios.post(this.URL.BASEURL + this.URL.playletManage_accountList, {
180
+        platform_id: this.filter.platform_id
181
+      })
182
+      if (res && res.errno == 0) {
183
+        this.accountOptions = res.rst
184
+      } else if (res.errno != 4002) {
185
+        this.$message.warning(res.err)
186
+      }
187
+    },
188
+
189
+    // S 创建群发
190
+    // 监听点击"创建群发"
191
+    onClickCreateGroupSend(playletInfo, { type }) {
192
+      this.currentPlayletInfo = playletInfo
193
+      this.currentCreateType = type
194
+      this.playletSendDialogVisible = true
195
+    },
196
+    // 创建群发 => 确定
197
+    handlePlayletSendConfirm({ miniProPath, miniProAppId, miniProDesc, miniProCover, h5Path, h5Desc, h5Cover }) {
198
+      console.log('handlePlayletSendConfirm => ')
199
+      this.playletSendDialogVisible = false
200
+      this.handleGetPlaylet()
201
+      // 跳转"客户群发" && 新建群发
202
+      if (this.currentPlayletInfo.platform_id == 4) { // 嘉书(新)平台 H5推广链接
203
+        const path = this.$router.resolve({
204
+          path: '/employee_bulk_messaging_log',
205
+          query: {
206
+            from: pageFromType.PLAYLET_LINK_H5,
207
+            h5Path: encodeURIComponent(h5Path),
208
+            h5Desc: encodeURIComponent(h5Desc),
209
+            h5Cover: encodeURIComponent(h5Cover),
210
+          }
211
+        })
212
+        window.open(path.href, '_blank')
213
+      } else { // 其他平台 小程序链接
214
+        const path = this.$router.resolve({
215
+          path: '/employee_bulk_messaging_log',
216
+          query: {
217
+            from: pageFromType.PLAYLET_LINK_MINIAPP,
218
+            miniProPath: encodeURIComponent(miniProPath),
219
+            miniProAppId: encodeURIComponent(miniProAppId),
220
+            miniProDesc: encodeURIComponent(miniProDesc),
221
+            miniProCover: encodeURIComponent(miniProCover),
222
+          }
223
+        })
224
+        window.open(path.href, '_blank')
225
+      }
226
+    },
227
+    // 创建群发 => 取消
228
+    handlePlayletSendCancel() {
229
+      this.playletSendDialogVisible = false
230
+    },
231
+    // E 创建群发
232
+  }
233
+}
234
+</script>
235
+<style lang="scss" scoped>
236
+.screenBox {
237
+  background: #fff;
238
+  padding: 5px 20px;
239
+  .right {
240
+    padding-right: 14px;
241
+  }
242
+}
243
+/deep/ .el-select .el-input.is-focus .el-input__inner,
244
+/deep/ .el-select .el-input__inner:focus {
245
+  border-color: #DCDFE6;
246
+}
247
+.playletManage-wrap {
248
+  .select-cls {
249
+    /deep/ .el-input__suffix {
250
+      border-top-right-radius: 4px;
251
+      border-bottom-right-radius: 4px;
252
+      border: 1px solid #DCDFE6;
253
+      right: 0;
254
+      width: 30px;
255
+      background-color: #F1F1F1;
256
+      .el-input__icon {
257
+        color: #909399;
258
+      }
259
+    }
260
+  }
261
+  .playlet-name {
262
+    color: #32B38A;
263
+    // cursor: pointer;
264
+  }
265
+  .status {
266
+    margin: 2px auto;
267
+    padding: 0 6px;
268
+    color: #32B38A;
269
+    border: 1px solid #32B38A;
270
+  }
271
+  .btn {
272
+    color: #32B38A;
273
+    cursor: pointer;
274
+    margin-right: 4px;
275
+    &.disabled {
276
+      color: #999;
277
+      cursor: not-allowed;
278
+    }
279
+    &:last-child {
280
+      margin-right: 0;
281
+    }
282
+  }
283
+}
284
+</style>

+ 2 - 1
project/src/router/allRouter.js

@@ -73,7 +73,8 @@ const accountManage = () => import(/* webpackChunkName: 'accountManage' */ '@/co
73 73
 // 小程序管理
74 74
 const miniProManage = () => import(/* webpackChunkName: 'miniProManage' */ '@/components/manage/miniProManage/miniProManage.vue')
75 75
 // 企微助手 - 剧集管理
76
-const playletManage = () => import(/* webpackChunkName: 'playletManage' */ '@/components/manage/playletManage/playletManage.vue')
76
+// const playletManage = () => import(/* webpackChunkName: 'playletManage' */ '@/components/manage/playletManage/playletManage.vue')
77
+const playletManage = () => import(/* webpackChunkName: 'playletManage' */ '@/components/manage/playletManageV2/index.vue')
77 78
 // 数据看板 - 平台推广数据
78 79
 const platformPromote = () => import(/* webpackChunkName: 'platformPromote' */ '@/components/dataBoard/platformPromote/index.vue')
79 80
 // 企微助手 - 客户分析