|
@@ -0,0 +1,243 @@
|
|
1
|
+<template>
|
|
2
|
+ <div>
|
|
3
|
+ <div class="backBox" @click="$router.go(-1)">
|
|
4
|
+ <div class="back">
|
|
5
|
+ <i class="el-icon-back"></i>
|
|
6
|
+ <span>返回</span>
|
|
7
|
+ </div>
|
|
8
|
+ </div>
|
|
9
|
+
|
|
10
|
+ <div v-if="!loading" class="bg-ffffff createMassMsg" style="padding: 15px 30px;">
|
|
11
|
+ <div class="self-hint" style="margin-top:10px;width:730px">
|
|
12
|
+ <i class="el-icon-message-solid"></i>
|
|
13
|
+ <div>
|
|
14
|
+ <div>1.新建渠道活码最多可发送10条消息(包含1条文字消息和9条附加消息)</div>
|
|
15
|
+ <div>2.附加消息包括图片、连接、小程序</div>
|
|
16
|
+ <div>3.渠道欢迎语将在客户加为好友后20秒内发送,网络延迟可能造成发送失败</div>
|
|
17
|
+ </div>
|
|
18
|
+ </div>
|
|
19
|
+ <div class="line" style="margin-top:20px"></div>
|
|
20
|
+ <h3 class="bigTitle">基础信息</h3>
|
|
21
|
+ <div class="regulations">
|
|
22
|
+ <label><em>*</em>渠道名称</label>
|
|
23
|
+ <el-input placeholder="请输入渠道名称" style="width:300px" v-model.trim="channelName" clearable size="small"></el-input>
|
|
24
|
+ </div>
|
|
25
|
+ <div class="regulations">
|
|
26
|
+ <label><em>*</em>选择分组</label>
|
|
27
|
+ <el-select v-model="group_val" clearable placeholder="请选择">
|
|
28
|
+ <el-option
|
|
29
|
+ v-for="item in groupArrs"
|
|
30
|
+ :key="item.value"
|
|
31
|
+ :label="item.label"
|
|
32
|
+ :value="item.value">
|
|
33
|
+ </el-option>
|
|
34
|
+ </el-select>
|
|
35
|
+ <div class="newGroupCss">新建分组</div>
|
|
36
|
+ </div>
|
|
37
|
+ <div class="regulations">
|
|
38
|
+ <label><em>*</em>使用客服</label>
|
|
39
|
+ <self-customerservice title='' width="300px"
|
|
40
|
+ :afferent_users='user_id_list'
|
|
41
|
+ @customerDefine="(val)=>{user_id_list=val;}"></self-customerservice>
|
|
42
|
+ </div>
|
|
43
|
+ <div class="regulations">
|
|
44
|
+ <label><em>*</em>选择标签</label>
|
|
45
|
+ <enterprise-tag title="" width="300px"
|
|
46
|
+ :afferent_obj='afferent_tag_obj'
|
|
47
|
+ :reset='resetFlag' @tagDefine="tagDefine" style="margin:0;margin-top: 10px"></enterprise-tag>
|
|
48
|
+ </div>
|
|
49
|
+ <div class="regulations">
|
|
50
|
+ <label><em>*</em>渠道欢迎语</label>
|
|
51
|
+ <edit-con source="welcom"
|
|
52
|
+ :afferent_content='main_msg_data.content'
|
|
53
|
+ :afferent_attachments='main_msg_data.attachments'
|
|
54
|
+ @editContent="(val)=>{main_msg_data.content = val}"
|
|
55
|
+ @changeAttachment='getAttachment'></edit-con>
|
|
56
|
+ </div>
|
|
57
|
+ <h3 class="bigTitle" style="margin-top:20px">
|
|
58
|
+ 分时段欢迎语:
|
|
59
|
+ <el-switch v-model="is_day_parting"
|
|
60
|
+ @change="switchChange" active-color="#13ce66"
|
|
61
|
+ inactive-color="#ddd"></el-switch>
|
|
62
|
+ </h3>
|
|
63
|
+ <template v-if="is_day_parting">
|
|
64
|
+ <div class="self-hint" style="margin-top:10px;width:750px;margin-left:70px;margin-top:20px">
|
|
65
|
+ <p>分时段欢迎语 :</p>
|
|
66
|
+ <div>
|
|
67
|
+ <p>1、员工上下班不同时间段可设置不同欢迎语;</p>
|
|
68
|
+ <p>2、分时段之外的时间将发送欢迎语。</p>
|
|
69
|
+ </div>
|
|
70
|
+ </div>
|
|
71
|
+ <div class="regulations regulations2" v-for="(item,index) in timeIntervalList" :key="index+'fenshiduan'">
|
|
72
|
+ <label style="margin-top:30px;text-align:right">时段{{index+1}}:</label>
|
|
73
|
+ <welcom-edit :deleteFlag='timeIntervalList.length==1?false:true'
|
|
74
|
+ :editInfo="item"
|
|
75
|
+ @welcomEditCon='(val)=>{getWelcomEdit(val,index)}'
|
|
76
|
+ @deleteWelcomCon='deleteWelcomCon(index)'></welcom-edit>
|
|
77
|
+ </div>
|
|
78
|
+ <div class="add_welcom_hint" @click="addWelcom">
|
|
79
|
+ <i class="el-icon-circle-plus-outline"></i>
|
|
80
|
+ <span>添加分时段欢迎语</span>
|
|
81
|
+ </div>
|
|
82
|
+ </template>
|
|
83
|
+ <div class="self-hint" style="margin-top:20px;width:750px;margin-left:70px">
|
|
84
|
+ <i class="el-icon-message-solid"></i>
|
|
85
|
+ <div>
|
|
86
|
+ <p>1、新建欢迎语最多可发送1条文字消息和9个附件</p>
|
|
87
|
+ <p>2、文字消息和附件不能同时为空,当两者均填写时用户会收到多条消息</p>
|
|
88
|
+ <p>3、欢迎语将在客户加为好友后20秒内下发,因网络延迟可能造成发送不成功</p>
|
|
89
|
+ </div>
|
|
90
|
+ </div>
|
|
91
|
+ <div class="line" style="margin-top:20px"></div>
|
|
92
|
+ <h3 class="bigTitle" style="margin-top:20px">高级设置: </h3>
|
|
93
|
+ <div class="regulations">
|
|
94
|
+ <label><em>*</em>客户备注</label>
|
|
95
|
+ <template>
|
|
96
|
+ <el-input style="width: 300px"
|
|
97
|
+ v-if="node_radio==2"
|
|
98
|
+ placeholder="请输入客户备注"
|
|
99
|
+ size="small"
|
|
100
|
+ v-model="customerNote">
|
|
101
|
+ <template slot="prepend">客户昵称-</template>
|
|
102
|
+ </el-input>
|
|
103
|
+ <el-input style="width: 300px"
|
|
104
|
+ size="small"
|
|
105
|
+ v-if="node_radio==1"
|
|
106
|
+ placeholder="请输入客户备注"
|
|
107
|
+ v-model="customerNote">
|
|
108
|
+ <template slot="append">-客户昵称</template>
|
|
109
|
+ </el-input>
|
|
110
|
+ </template>
|
|
111
|
+ <div style="display: flex;margin-left: 20px">
|
|
112
|
+ <el-radio v-model="node_radio" :label="1">备注在昵称后</el-radio>
|
|
113
|
+ <el-radio v-model="node_radio" :label="2">备注在昵称前</el-radio>
|
|
114
|
+ </div>
|
|
115
|
+ </div>
|
|
116
|
+ <div class="regulations" style="margin-left: 100px">
|
|
117
|
+ <div>示例</div>
|
|
118
|
+ <div class="customerNoteBox">
|
|
119
|
+ <img src="../../assets/img/cs_logo.png" alt="" style="width: 30px;height: 30px;margin-right: 8px">
|
|
120
|
+ <div class="flex-align-center">
|
|
121
|
+ <template v-if="node_radio==2"><span class="c-000">{{customerNote}}</span> -客户昵称</template>
|
|
122
|
+ <template v-if="node_radio==1">客户昵称- <span class="c-000">{{customerNote}}</span></template>
|
|
123
|
+ </div>
|
|
124
|
+ </div>
|
|
125
|
+ </div>
|
|
126
|
+ <div class="regulations">
|
|
127
|
+ <label>客服添加上限</label>
|
|
128
|
+ <el-switch v-model="add_limit"
|
|
129
|
+ @change="switchLimit" active-color="#13ce66"
|
|
130
|
+ inactive-color="#ddd"></el-switch>
|
|
131
|
+ </div>
|
|
132
|
+ <template v-if="add_limit">
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+ </template>
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+ </div>
|
|
141
|
+ </div>
|
|
142
|
+</template>
|
|
143
|
+
|
|
144
|
+<script>
|
|
145
|
+import selfCustomerservice from '@/components/assembly/screen/customerService.vue'
|
|
146
|
+import enterpriseTag from '@/components/assembly/screen/enterpriseTagFC.vue'
|
|
147
|
+import editCon from '@/components/assembly/editCon.vue'
|
|
148
|
+import welcomEdit from '@/components/assembly/welcom_edit.vue'
|
|
149
|
+export default {
|
|
150
|
+ name: "createChannelCode",
|
|
151
|
+ components:{
|
|
152
|
+ selfCustomerservice,
|
|
153
|
+ enterpriseTag,
|
|
154
|
+ editCon,
|
|
155
|
+ welcomEdit
|
|
156
|
+ },
|
|
157
|
+ data(){
|
|
158
|
+ return{
|
|
159
|
+ loading:false,
|
|
160
|
+ channelName:'',
|
|
161
|
+ is_day_parting: false,
|
|
162
|
+ group_val:0,
|
|
163
|
+ groupArrs:[
|
|
164
|
+ {
|
|
165
|
+ label:'分组一',
|
|
166
|
+ value:0
|
|
167
|
+ }
|
|
168
|
+ ],
|
|
169
|
+
|
|
170
|
+ user_id_list: [],
|
|
171
|
+ afferent_tag_obj: {
|
|
172
|
+ tag_id_list: []
|
|
173
|
+ },
|
|
174
|
+ resetFlag: false,
|
|
175
|
+ main_msg_data: {
|
|
176
|
+ "is_day_parting": 0,
|
|
177
|
+ "weeks": [],
|
|
178
|
+ "start_time": "",
|
|
179
|
+ "end_time": "",
|
|
180
|
+ "content": '',
|
|
181
|
+ "attachments": []
|
|
182
|
+ },
|
|
183
|
+ deleteTimeIntervalList: [],//删除的分时段列表
|
|
184
|
+ timeIntervalList: [],//分时段列表
|
|
185
|
+ customerNote:'',//客户备注
|
|
186
|
+ node_radio:1,
|
|
187
|
+ add_limit:true
|
|
188
|
+ }
|
|
189
|
+ },
|
|
190
|
+ created(){
|
|
191
|
+
|
|
192
|
+ },
|
|
193
|
+ methods:{
|
|
194
|
+ tagDefine (data) {//标签选择回调
|
|
195
|
+ if (data.tag_id_list && data.tag_id_list.length != 0) {
|
|
196
|
+ this.tag_info = data.tag_id_list
|
|
197
|
+ } else {
|
|
198
|
+ this.tag_info = []
|
|
199
|
+ }
|
|
200
|
+ },
|
|
201
|
+ getAttachment (val) {
|
|
202
|
+ this.main_msg_data.attachments = val;
|
|
203
|
+ },
|
|
204
|
+ switchChange () {//分时段开关打开
|
|
205
|
+ if (this.is_day_parting && this.timeIntervalList.length == 0) {
|
|
206
|
+ this.timeIntervalList.push(this.init_welcom_con)
|
|
207
|
+ }
|
|
208
|
+ },
|
|
209
|
+ getWelcomEdit (val, index) {//分时段编辑
|
|
210
|
+ this.$set(this.timeIntervalList, index, val)
|
|
211
|
+ },
|
|
212
|
+ deleteWelcomCon (index) {//删除分时段
|
|
213
|
+ if (this.$route.params.rule_id && this.timeIntervalList[index].msg_id) {//删除的分时段内容
|
|
214
|
+ let obj = JSON.parse(JSON.stringify(this.timeIntervalList[index]))
|
|
215
|
+ obj.operate = 'del';
|
|
216
|
+ this.deleteTimeIntervalList.push(obj)
|
|
217
|
+ }
|
|
218
|
+ this.timeIntervalList.splice(index, 1)
|
|
219
|
+ },
|
|
220
|
+ addWelcom () {//添加分时段
|
|
221
|
+ this.timeIntervalList.push(this.init_welcom_con)
|
|
222
|
+ },
|
|
223
|
+ switchLimit(){
|
|
224
|
+
|
|
225
|
+ }
|
|
226
|
+ }
|
|
227
|
+}
|
|
228
|
+</script>
|
|
229
|
+
|
|
230
|
+<style lang="scss" scoped>
|
|
231
|
+@import "../customOperate/create.scss";
|
|
232
|
+.customerNoteBox{
|
|
233
|
+ display: flex;
|
|
234
|
+ padding:10px;
|
|
235
|
+ border: 1px solid #ddd;
|
|
236
|
+ margin-left: 20px;
|
|
237
|
+}
|
|
238
|
+.newGroupCss{
|
|
239
|
+ color: #00b38a;
|
|
240
|
+ font-size: 14px;
|
|
241
|
+ margin-left: 10px;
|
|
242
|
+}
|
|
243
|
+</style>
|