提交 5f28a418 作者: 毛细亚

合并分支 'cbl_6.9.1' 到 'release'

Cbl 6.9.1

查看合并请求 !24
......@@ -276,3 +276,11 @@ export function corp_activity_procedure_copyUsed(data) {
data,
});
}
// 跨主体客服二维码
export function getUserQrCode(data) {
return request({
url: returnApi('/session/getUserQrCode'),
method: 'post',
data,
});
}
<template>
<div class="service-message-dialog">
<el-popover placement="top" trigger="hover" content="发送客服二维码">
<svg-icon slot="reference" icon-class="kfworks" class="service-message-dialog__icon" @click="show" />
</el-popover>
<el-dialog title="客服号添加二维码" :visible.sync="visible" width="500px" @close="handleClose">
<div v-if="taskStatus.is_band">
<div class="service-message-dialog__title">
VIP客服:
......@@ -12,20 +8,34 @@
</span>
</div>
<div class="service-message-dialog__info">
<i class="el-icon-info"></i>
当前有转VIP/SVIP任务,请推送指定客服的客服号
</div>
</div>
<div v-else class="service-message-dialog__info">
<i class="el-icon-info"></i>
当前无分配转VIP/SVIP任务
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="客服类型" prop="service_type">
<el-form ref="form" :model="form" label-position="top" :rules="rules" label-width="100px" style="margin-top: 10px;">
<el-form-item prop="source_type">
<template slot="label">
来源
<el-tooltip placement="top" content="只有通过企微活码添加的客户会自动绑定W账号">
<i class="el-icon-question"></i>
</el-tooltip>
</template>
<el-radio-group v-model="form.source_type" @change="handleSourceTypeChange">
<el-radio label="game_code">掌游</el-radio>
<el-radio label="wx_code">企微活码</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="客服类型:" prop="service_type">
<el-select v-model="form.service_type" :clearable="false" placeholder="请选择客服类型" style="width:100%;"
@change="handleServiceTypeChange">
<el-option v-for="item in serviceTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="客服号" prop="service_id">
<el-form-item label="客服号:" prop="service_id">
<el-select v-model="form.service_id" style="width:100%;" :clearable="false" :loading="loading"
placeholder="请选择客服号">
<el-option v-for="item in serviceList" :key="item.id" :label="item.service_wechat_number_name"
......@@ -33,26 +43,25 @@
</el-select>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="handleClose">取 消</el-button>
<el-button type="primary" :loading="submitting" @click="handleSubmit">确 定</el-button>
<div class="rowFlex rowEnd" style="margin-top: 20px;">
<el-button class="sendQrCodeBtn" style="width: 100%;" type="primary" :loading="submitting" @click="handleSubmitBtn">发送二维码</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchcondition, getTaskTracer, memberTaskStatus, getTaskTracerTouch, getTaskTracerTouchAdd } from '@/api/game'
import { mapState, mapMutations } from 'vuex'
import { mapState } from 'vuex'
import { sendChatMessage } from '@/utils/index'
import { getUserQrCode } from '@/api/works'
export default {
name: 'ServiceMessageDialog',
data() {
return {
visible: false,
loading: false,
submitting: false,
form: {
source_type:'game_code',
service_type: '',
service_id: '',
send_text: ''
......@@ -61,6 +70,7 @@ export default {
taskStatus: {},
rules: {
service_type: [{ required: true, message: '请选择客服类型', trigger: 'change' }],
source_type: [{ required: true, message: '请选择来源', trigger: 'change' }],
service_id: [{ required: true, message: '请选择客服号', trigger: 'change' }]
},
serviceTypeOptions: [
......@@ -73,7 +83,7 @@ export default {
},
computed: {
...mapState('game', ['accountSelect']),
...mapState('user', ['userInfo'])
...mapState('user', ['cser_name','corp_id','external_userid','userid'])
},
watch: {
accountSelect: {
......@@ -81,24 +91,27 @@ export default {
immediate: true
}
},
mounted() {
if (this.accountSelect) {
this.initData()
}else {
this.$message.error('请关联W账号')
}
},
methods: {
...mapMutations('common', ['set_sendSkillMessage']),
// 初始化数据
async initData() {
if (!this.accountSelect) return
await Promise.all([
this.getTaskTracer(),
this.memberTaskStatus()
])
},
show() {
if (this.accountSelect && this.accountSelect !== '') {
this.visible = true
this.initData()
} else {
this.$message.error('请关联W账号')
handleSourceTypeChange() {
this.form.service_type = ''
if(this.form.source_type === 'wx_code'){
this.serviceTypeOptions = [ { label: '掌微工作台', value: 4 },{ label: '企微工作台', value: 5 }]
}else{
this.serviceTypeOptions = [ { label: '个微', value: 3 },{ label: '掌微工作台', value: 4 },{ label: '企微工作台', value: 5 }]
}
},
// 获取任务状态
......@@ -133,7 +146,6 @@ export default {
handleClose() {
this.$refs.form.resetFields()
this.visible = false
this.loading = false
this.submitting = false
},
......@@ -169,24 +181,23 @@ export default {
// 发送消息
async sendMessage(image_url) {
const list = [{
msgtype: 'image',
image: { picurl: image_url }
}]
// 发送掌游客服号的时候 需要添加日志
if(this.form.source_type === 'game_code'){
await this.getTaskTracerTouch()
if (this.taskStatus.is_band) {
if (this.taskStatus.is_band ) {
await this.getTaskTracerTouchAdd()
}
}
await sendChatMessage(image_url, 'image')
// 生成二维码有延迟 立即发送会导致二维码加载失败 加个小延迟解决问题
setTimeout(() => {
this.submitting = false
this.set_sendSkillMessage(list)
this.handleClose()
}, 2000)
},
// 发送的时候如果当前W 账号如果有 转 vip/svip的任务 记录一条发送日志
async getTaskTracerTouchAdd() {
const res = await getTaskTracerTouchAdd({ member_id: this.accountSelect, zw_user_name: this.userInfo.username })
const res = await getTaskTracerTouchAdd({ member_id: this.accountSelect, zw_user_name: this.cser_name })
},
// 获取任务追踪者接触信息记录日志
async getTaskTracerTouch() {
......@@ -200,13 +211,52 @@ export default {
this.$message.error('更新任务追踪者接触信息失败')
}
},
handleSubmitBtn() {
this.$refs.form.validate(async valid => {
if (valid) {
if(this.form.source_type === 'wx_code'){
await this.handleSubmitWxCode()
}else{
await this.handleSubmit()
}
}
})
},
async handleSubmitWxCode() {
if (this.submitting) return
try {
const serve_info = this.serviceList.find(item => item.id === this.form.service_id)
console.log(serve_info, 'serve_info')
if (!serve_info) {
this.$message.error('未找到选中的客服信息')
return
}
this.submitting = true
const data = {
corp_id: this.corp_id,
external_userid: this.external_userid,
userid: this.userid,
target_corp_id: serve_info.corp_id,
target_userid: serve_info.service_wechat_number
}
const res = await getUserQrCode(data)
if (!res.data) {
this.$message.error('当前客服号未维护添加二维码,请维护后再发送')
return
}
setTimeout(async () => {
await this.sendMessage(res.data)
}, 2000)
} catch (error) {
this.submitting = false
console.error('提交失败:', error)
this.$message.error('提交失败')
}
},
// 提交表单
async handleSubmit() {
if (this.submitting) return
try {
await this.$refs.form.validate()
const serve_info = this.serviceList.find(item => item.id === this.form.service_id)
if (!serve_info) {
this.$message.error('未找到选中的客服信息')
......@@ -230,6 +280,11 @@ export default {
<style lang="scss" scoped>
.service-message-dialog {
padding-top: 30px;
position: relative;
::v-deep .el-form-item__label{
line-height: 35px;
}
&__icon {
font-size: 23px;
margin-left: 20px;
......@@ -258,6 +313,21 @@ export default {
text-align: justify;
font-style: normal;
margin-bottom: 10px;
position: absolute;
left: 0;
top: 0px;
width: 100%;
height: 28px;
background: #F4F4F5;
border-radius: 0px 0px 0px 0px;
display: flex;
align-items: center;
padding-left: 10px;
border-radius: 5px;
i{
font-size: 18px;
margin-right: 5px;
}
}
}
......
......@@ -1159,13 +1159,9 @@ export default {
width: 100%;
height: 100%;
overflow: auto;
margin-top: -10px;
.createChannel {
font-size: 14px;
margin-top: 16px;
padding: 0 16px;
.label {
color: #878787;
font-size: 12px;
......
......@@ -2,7 +2,7 @@
* @Author: maoxiya 937667504@qq.com
* @Date: 2025-09-22 18:18:27
* @LastEditors: maoxiya 937667504@qq.com
* @LastEditTime: 2025-09-23 15:11:25
* @LastEditTime: 2025-09-24 14:21:10
* @FilePath: /company_wx_frontend/src/views/works/component/gameInfo/lastLogin.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......
......@@ -324,7 +324,7 @@ export default {
width: 100%;
height: 100%;
overflow: auto;
padding-top: 15px;
.sendLink {
width: 150px;
height: 25px;
......
......@@ -14,12 +14,12 @@
>
<sendGame v-if="activeName === 'sendGame'"/>
</el-tab-pane>
<!-- <el-tab-pane
<el-tab-pane
label="客服二维码"
name="sendQrCode"
>
<sendQrCode v-if="activeName === 'sendQrCode'"/>
</el-tab-pane> -->
</el-tab-pane>
<el-tab-pane
label="发送 SVIP 海报"
name="sendVipPoster"
......@@ -97,9 +97,6 @@ export default {
.content {
width: 100%;
height: calc(100% - 10px);
::v-deep .el-tabs__header {
margin: 0 0 20px;
}
}
::v-deep .el-tabs--border-card .is-active {
border: none !important;
......
......@@ -2,7 +2,7 @@
* @Author: maoxiya 937667504@qq.com
* @Date: 2025-09-13 14:05:01
* @LastEditors: maoxiya 937667504@qq.com
* @LastEditTime: 2025-09-22 17:23:01
* @LastEditTime: 2025-09-22 17:24:19
* @FilePath: /company_wx_frontend/src/views/works/component/gameInfo/vipLevel.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -61,7 +61,6 @@ export default {
mounted() {
if(this.roleInfo && Object.keys(this.roleInfo).length > 0) {
this.vip_role_info = this.roleInfo
// 将VIP信息存储到Vuex中
} else {
this.marketingMemberRoleGrade()
}
......@@ -82,7 +81,6 @@ export default {
const res = await marketingMemberRoleGrade({ member_id:this.accountSelect})
if(res.data.data.role_id){
this.vip_role_info = res.data.data
// 将VIP信息存储到Vuex中,供其他组件使用
}else{
this.vip_role_info = {}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论