Commit 77025180 by 闻闻闻

Merge branch 'front_end_dev' of https://gitee.com/LinkWeChat/link-wechat into front_end_dev

2 parents a99e1b90 fb8755a2
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
}, },
"dependencies": { "dependencies": {
"axios": "^0.21.1", "axios": "^0.21.1",
"clipboard": "^2.0.8",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"vant": "^2.12.2", "vant": "^2.12.2",
......
...@@ -15,6 +15,10 @@ export default { ...@@ -15,6 +15,10 @@ export default {
// console.log('routerbeforeCreate', this.$route); // console.log('routerbeforeCreate', this.$route);
// this.$dialog({ message: 'url' + JSON.stringify(window.location) }) // this.$dialog({ message: 'url' + JSON.stringify(window.location) })
let query = param2Obj(window.location.search) let query = param2Obj(window.location.search)
let hash = param2Obj(window.location.hash)
query = Object.assign(query, hash)
let code = query.code let code = query.code
this.corpId = query.corpId this.corpId = query.corpId
this.agentId = query.agentId this.agentId = query.agentId
...@@ -22,15 +26,17 @@ export default { ...@@ -22,15 +26,17 @@ export default {
this.$toast('未获得授权') this.$toast('未获得授权')
return return
} }
let { data } = await getUserInfo(code, query.agentId) let { data } = await getUserInfo(code, this.agentId)
this.$store.state.userId = data.userId this.$store.state.userId = data.userId
// this.$toast('userId:' + this.$store.state.userId) // this.$toast('userId:' + this.$store.state.userId)
}, },
watch: { watch: {
// 通过config接口注入权限验证配置 // 通过config接口注入权限验证配置
// 所有需要使用JS-SDK的页面必须先注入配置信息,否则将无法调用(同一个url仅需调用一次,对于变化url的SPA(single-page application)的web app可在每次url变化时进行调用) // 所有需要使用JS-SDK的页面必须先注入配置信息,否则将无法调用(同一个url仅需调用一次,对于变化url的SPA(single-page application)的web app可在每次url变化时进行调用)
$route() { $route(route) {
this.wxConfig() // this.wxConfig()
const noAuth = route.meta ? route.meta.noAuth : false
!noAuth && this.wxConfig()
}, },
}, },
methods: { methods: {
...@@ -50,6 +56,9 @@ export default { ...@@ -50,6 +56,9 @@ export default {
'sendChatMessage', 'sendChatMessage',
'getContext', 'getContext',
'getCurExternalContact', 'getCurExternalContact',
'openEnterpriseChat',
'shareToExternalContact',
'shareToExternalChat',
], //必填 ], //必填
success: (res) => { success: (res) => {
// 回调 // 回调
......
import request from '@/utils/request'
const wecom = window.CONFIG.services.wecom
const service = wecom + '/community/h5'
/**
* 获取用户相关的所有任务
* @param {*} userId 用户ID
* @param {*} taskType 0: 全部 1: 老客标签建群 2: 群SOP
* @returns
*/
export function getTasks (userId, taskType) {
return request({
url: service + '/' + userId,
params: {
type: taskType
}
})
}
/**
* 获取任务相关员工及完成情况
* @param {*} taskId 任务ID
* @param {*} taskType 1: 老客标签建群 2: 群SOP
* @returns
*/
export function getState (taskId, taskType) {
return request({
url: service + '/scope/' + taskId,
params: {
type: taskType
}
})
}
/**
* 更新任务状态
* @param {*} userId 用户ID
* @param {*} taskId 任务ID
* @param {*} taskType 0: 老客标签建群 1: 群SOP
* @returns
*/
export function changeStatus (userId, taskId, taskType) {
return request({
url: service + '/changeStatus',
params: {
emplId: userId,
taskId: taskId,
type: taskType
}
})
}
/**
* 获取用户相关的所有关键词任务任务
* @param {*} word 搜索的关键词或活码名称
* @returns
*/
export function getKeywordTasks (word) {
return request({
url: service + '/filter',
params: {
word: word
}
})
}
import request from '@/utils/request'
const wecom = window.CONFIG.services.wecom
const service = wecom + '/groupCode'
// 通过群活码UUID获取群活码详情及可用的实际群码
export function getDetail (uuid) {
return request({
url: service + '/getActualCode/' + uuid
})
}
...@@ -62,6 +62,68 @@ const routes = [ ...@@ -62,6 +62,68 @@ const routes = [
title: '', title: '',
}, },
}, },
// 群活码扫描跳转页面
{
path: '/groupCode',
name: 'groupCode',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/groupCode/index'),
hidden: true,
meta: {
title: '',
noAuth: true
},
},
// 群活码扫描跳转页面
{
path: '/task',
// name: 'task',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/communityOperating/task/index'),
children: [
{
path: '',
component: () => import(/* webpackChunkName: "about" */ '../views/communityOperating/task/list'),
hidden: true,
meta: {
title: '',
// noAuth: true
},
},
{
path: 'state',
name: 'taskState',
component: () => import(/* webpackChunkName: "about" */ '../views/communityOperating/task/state.vue'),
hidden: true,
meta: {
title: '',
noAuth: true
},
},
],
hidden: true,
meta: {
title: '',
noAuth: true
},
},
// 群活码扫描跳转页面
{
path: '/keywords',
name: 'keywords',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/communityOperating/keywords/index'),
hidden: true,
meta: {
title: ''
},
},
] ]
const router = new VueRouter({ const router = new VueRouter({
......
<template>
<div>
<div class="task-wrapper">
<div class="header">
<span> 群SOP </span>
<div> {{ task.createTime }} </div>
</div>
<div class="group">
<van-cell class="group-tags" title="发送给客户群">
<template #default>
<template v-for="group of task.groupList.slice(0, 2)">
<van-tag :key="group.chatId" size="large"> {{ group.groupName }} </van-tag>
</template>
<template v-if="task.groupList.length > 2">
<van-tag size="large"> ... </van-tag>
</template>
</template>
</van-cell>
<van-cell title="发送时间" :value="sendRange"></van-cell>
</div>
<div class="content">
<div @touchstart.prevent="touchStart" @touchend="touchEnd">
{{ task.content }}
</div>
<div class="copy-wrapper" v-show="showCopy">
<van-button :class="'copy-btn_' + task.ruleId" :data-clipboard-text="task.content"> 复制 </van-button>
</div>
</div>
<div class="image-list">
<template v-for="material of task.materialList">
<!-- mediaType: 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本 5 海报 6 海报字体 -->
<van-image v-if="material.mediaType === 0" width="80" :key="material.id" :src="material.materialUrl"></van-image>
</template>
<template v-for="pic of task.picList">
<van-image width="80" :key="pic" :src="pic"></van-image>
</template>
</div>
<div>
<!-- <van-cell title="发送给" is-link value="张三、李四、王五等11人"></van-cell> -->
<van-cell title="已完成成员" is-link :value="showDone" @click="goState(1)"></van-cell>
<van-cell title="未完成成员" is-link :value="showTodo" @click="goState"></van-cell>
</div>
<div class="send-button">
<van-button type="info" size="mini" @click="send">发送</van-button>
</div>
</div>
<div class="bottom-line"></div>
</div>
</template>
<script>
import ClipboardJS from 'clipboard'
import { changeStatus } from '@/api/community'
export default {
name: 'SOPPanel',
props: {
task: {
type: Object,
required: true
},
// true: 已处理 false: 未处理
state: {
type: Boolean,
required: true
},
isAdmin: {
type: Boolean,
default: true
}
},
data () {
return {
showCopy: false, // 展示复制按钮
touchDelay: 750, // 触发显示按钮的长按时常
copyEvent: null,
touch: false,
}
},
methods: {
goState (active) {
if (!this.isAdmin) return
this.$router.push({
name: 'taskState',
query: {
taskId: this.task.ruleId,
active: active === 1 ? 1 : 0,
taskType: 2,
}
})
},
send () {
const userId = this.$store.state.userId
const taskId = this.task.ruleId
wx.invoke("shareToExternalChat", {
title: '',
desc: '',
link: '',
imgUrl: ''
}, function(res) {
if (res.err_msg == "shareToExternalChat:ok") {
changeStatus(userId, taskId, 1).then((res) => {
this.$emit('refresh')
}).catch(() => {
this.$emit('refresh')
})
} else {
}
}
)
},
touchStart () {
    clearTimeout(this.copyEvent)
    this.copyEvent = setTimeout(() => {
        this.touch = true
    }, this.touchDelay)
},
touchEnd () {
clearTimeout(this.copyEvent)
if (this.touch) this.showCopy = true
this.touch = false
}
},
computed: {
sendRange () {
if (!this.task.startExeTime || !this.task.stopExeTime) return ''
return this.task.startExeTime + ' - ' + this.task.stopExeTime
},
todoMembers () {
if (!(this.task && this.task.scopeList && this.task.scopeList.length > 0)) return []
const members = []
for (let member of this.task.scopeList) {
if (!member.done) members.push(member)
}
return members
},
showTodo () {
if (this.todoMembers.length === 0) return '无'
const names = this.todoMembers.map(m => m.name)
if (this.todoMembers.length <= 2) return names.join('、')
return names[0] + '、' + names[1] + '等' + this.todoMembers.length + '人'
},
doneMembers () {
if (!this.task || !this.task.scopeList || this.task.scopeList.length === 0) return []
const members = []
for (let member of this.task.scopeList) {
if (member.done) members.push(member)
}
return members
},
showDone () {
if (this.doneMembers.length === 0) return '无'
const names = this.doneMembers.map(m => m.name)
if (this.doneMembers.length <= 2) return names.join('、')
return names[0] + '、' + names[1] + '等' + this.doneMembers.length + '人'
},
},
mounted() {
this.clipboard = new ClipboardJS('.copy-btn_' + this.task.ruleId)
this.clipboard.on('success', (e) => {
this.showCopy = false
})
this.clipboard.on('error', (e) => {
this.showCopy = false
})
},
}
</script>
<style lang="less" scoped>
.task-wrapper {
padding: 10px 8px;
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin: 5px 0 12px;
span {
font-size: 18px;
font-weight: bold;
}
}
.group {
.group-tags {
:nth-child(n+2) {
margin-left: 5px;
}
.van-tag {
background-color: #f2f2f2;
color: black;
padding: 6px 10px;
}
}
}
.content {
padding: 15px;
background-color: #f2f2f2;
font-size: 16px;
line-height: 20px;
color: #999999;
// margin-bottom: 15px;
min-height: 30px;
position: relative;
.copy-wrapper {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
background-color: rgba(0, 0, 0, 0.4);
display: flex;
align-items: center;
justify-content: space-around;
}
}
.image-list {
.van-image {
padding: 10px 10px 0 0;
}
}
.van-cell {
padding: 10px 6px;
}
.send-button {
padding: 10px 5px 5px;
display: flex;
flex-direction: row-reverse;
.van-button {
padding: 0 12px;
margin-right: 12px;
border-radius: 4px;
font-size: 12px;
}
}
}
.bottom-line {
background-color: #f2f2f2;
height: 15px;
}
</style>
<template>
<div>
<div>
<van-search
v-model="keyword"
placeholder="搜索活码名或关键词"
shape="round"
@search="onSearch"
@clear="clear"
>
</van-search>
</div>
<div class="history-wrapper">
<template v-for="k of history">
<van-tag :key="k" size="large" closeable @click="search(k)" @close="removeHistory(k)"> {{ k }} </van-tag>
</template>
</div>
<div class="bottom-line"></div>
<div>
<template v-if="!tasks || tasks.length === 0">
<van-empty description="暂无数据" />
</template>
<template v-else>
<template v-for="task of tasks">
<KeywordPanel :key="task.taskId" :task="task" :state="false"></KeywordPanel>
</template>
</template>
</div>
<van-overlay :show="loading" class-name="overlay">
<van-loading type="spinner"></van-loading>
</van-overlay>
</div>
</template>
<script>
import KeywordPanel from './panel'
import { getKeywordTasks } from '@/api/community'
export default {
components: { KeywordPanel },
data () {
return {
keyword: '',
storageKey: 'keywords',
history: [],
tasks: [],
loading: false,
focus: false
}
},
methods: {
getTasks () {
this.loading = true
getKeywordTasks(this.keyword).then((res) => {
if (res.code === 200) {
this.tasks = res.rows
}
this.loading = false
}).catch(() => {
this.loading = false
})
},
setHistory (keyword) {
if (!keyword) return
if (!this.history.includes(keyword)) {
this.history.push(keyword)
localStorage.setItem(this.storageKey, JSON.stringify(this.history))
}
},
removeHistory (keyword) {
if (this.history.includes(keyword)) {
this.history.splice(this.history.indexOf(keyword), 1)
localStorage.setItem(this.storageKey, JSON.stringify(this.history))
}
},
getHistory () {
this.history = JSON.parse(localStorage.getItem(this.storageKey)) || []
},
onSearch () {
this.setHistory(this.keyword)
this.getTasks()
},
search (keyword) {
this.keyword = keyword
this.getTasks()
},
clear () {
this.getTasks()
}
},
computed: {
url () {
return window.location.href
}
},
created () {
this.getHistory()
this.getTasks()
}
}
</script>
<style lang="less" scoped>
.history-wrapper {
padding: 0 20px 20px;
.van-tag {
margin: 10px 10px 0 0;
}
}
.bottom-line {
background-color: #f2f2f2;
height: 15px;
}
.overlay {
display: flex;
align-items: center;
.van-loading {
margin: auto;
}
}
</style>
<template>
<div>
<div class="task-wrapper">
<div class="header">
<span> {{ task.taskName }} </span>
</div>
<div class="keywords">
<template v-for="keyword of keywords">
<van-tag size="medium" :key="keyword"> {{ keyword }} </van-tag>
</template>
</div>
<div class="guide" v-if="task.welcomeMsg">
<div @touchstart.prevent="touchStart" @touchend="touchEnd">
{{ task.welcomeMsg }}
</div>
<div class="copy-wrapper" v-show="showCopy">
<van-button :class="'copy-btn_' + task.taskId" :data-clipboard-text="task.welcomeMsg"> 复制 </van-button>
</div>
</div>
<div class="content">
<div>
<van-image width="50" :src="task.groupCodeInfo.codeUrl"></van-image>
</div>
<div class="group">
<span> {{ task.taskName }} </span>
</div>
</div>
<div class="bottom-area">
<span class="time"> {{ task.createTime }} </span>
<van-button type="info" size="mini" @click="send">发送</van-button>
</div>
</div>
<div class="bottom-line"></div>
</div>
</template>
<script>
import ClipboardJS from 'clipboard'
export default {
name: 'KeywordPanel',
props: {
task: {
type: Object,
required: true
},
},
data () {
return {
showCopy: false, // 展示复制按钮
touchDelay: 750, // 触发显示按钮的长按时常
copyEvent: null,
touch: false,
}
},
methods: {
send () {
wx.invoke("sendChatMessage", {
msgtype: 'news',
news: {
link: this.groupCodeUrl,
title: '客户群活码',
desc: '',
imgUrl: '',
}
}, function(res) {
if (res.err_msg == "sendChatMessage:ok") {
} else {
}
}
)
},
touchStart () {
    clearTimeout(this.copyEvent)
    this.copyEvent = setTimeout(() => {
        this.touch = true
    }, this.touchDelay)
},
touchEnd () {
clearTimeout(this.copyEvent)
if (this.touch) this.showCopy = true
this.touch = false
}
},
computed: {
keywords () {
if (!this.task || !this.task.keywordList) return []
const keywords = this.task.keywordList.map((k) => k.keyword)
return keywords
},
groupCodeUrl () {
if (window.location.hash[0] === '#') {
return window.location.origin + '/#/groupCode?id=' + this.task.groupCodeInfo.uuid
}
return window.location.origin + '/groupCode?id=' + this.task.groupCodeInfo.uuid
}
},
mounted() {
this.clipboard = new ClipboardJS('.copy-btn_' + this.task.taskId)
this.clipboard.on('success', (e) => {
this.showCopy = false
})
this.clipboard.on('error', (e) => {
this.showCopy = false
})
},
}
</script>
<style lang="less" scoped>
.task-wrapper {
padding: 10px 8px;
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin: 5px 0 12px;
span {
font-size: 18px;
font-weight: bold;
}
}
.keywords {
margin-bottom: 15px;
.van-tag {
margin-right: 10px;
background-color: #f2f2f2;
color: rgba(0, 0, 0, .6);
}
}
.guide {
padding: 15px;
background-color: #f2f2f2;
font-size: 16px;
line-height: 20px;
color: #999999;
margin-bottom: 15px;
min-height: 30px;
position: relative;
.copy-wrapper {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
background-color: rgba(0, 0, 0, 0.4);
display: flex;
align-items: center;
justify-content: space-around;
}
}
.content {
padding: 10px;
background-color: #f2f2f2;
display: flex;
.group {
padding: 0 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
.group-name {
color: #999999;
}
}
}
.van-cell {
padding: 10px 6px;
}
.bottom-area {
padding: 10px 5px 5px;
display: flex;
justify-content: space-between;
align-items: center;
.time {
color: rgba(0, 0, 0, .3);
}
.van-button {
padding: 0 12px;
margin-right: 12px;
border-radius: 4px;
font-size: 12px;
}
}
}
.bottom-line {
background-color: #f2f2f2;
height: 15px;
}
</style>
<template>
<div>
<div class="task-wrapper">
<div class="header">
<span> 老客标签建群 </span>
<div> {{ task.createTime }} </div>
</div>
<div class="guide" v-if="task.welcomeMsg">
<div @touchstart.prevent="touchStart" @touchend="touchEnd">
{{ task.welcomeMsg }}
</div>
<div class="copy-wrapper" v-show="showCopy">
<van-button :class="'copy-btn_' + task.taskId" :data-clipboard-text="task.welcomeMsg"> 复制 </van-button>
</div>
</div>
<div class="content">
<div>
<van-image width="50" :src="task.groupCodeInfo.codeUrl"></van-image>
</div>
<div class="group">
<span> {{ task.taskName }} </span>
<!-- <span class="group-name"> 测试群 </span> -->
</div>
</div>
<div>
<van-cell title="发送给" is-link :value="showMembers"></van-cell>
<van-cell title="已完成成员" is-link :value="showDone" @click="goState(1)"></van-cell>
<van-cell title="未完成成员" is-link :value="showTodo" @click="goState"></van-cell>
</div>
<div class="send-button" v-if="!state">
<van-button type="info" size="mini" @click="send">发送</van-button>
</div>
</div>
<div class="bottom-line"></div>
</div>
</template>
<script>
import ClipboardJS from 'clipboard'
import { changeStatus } from '@/api/community'
export default {
name: 'OldCustomerPanel',
props: {
task: {
type: Object,
required: true
},
// true: 已处理 false: 未处理
state: {
type: Boolean,
required: true
},
isAdmin: {
type: Boolean,
default: true
}
},
data () {
return {
showCopy: false, // 展示复制按钮
touchDelay: 750, // 触发显示按钮的长按时常
copyEvent: null,
touch: false,
}
},
methods: {
goState (active) {
if (!this.isAdmin) return
this.$router.push({
name: 'taskState',
query: {
taskId: this.task.taskId,
active: active === 1 ? 1 : 0,
taskType: 1,
}
})
},
send () {
const userId = this.$store.state.userId
const taskId = this.task.taskId
wx.invoke("shareToExternalContact", {
title: '客户群活码',
desc: '',
link: this.groupCodeUrl,
imgUrl: ''
}, function(res) {
if (res.err_msg == "shareToExternalContact:ok") {
changeStatus(userId, taskId, 0).then((res) => {
this.$emit('refresh')
}).catch(() => {
this.$emit('refresh')
})
} else {
}
}
)
},
touchStart () {
    clearTimeout(this.copyEvent)
    this.copyEvent = setTimeout(() => {
        this.touch = true
    }, this.touchDelay)
},
touchEnd () {
clearTimeout(this.copyEvent)
if (this.touch) this.showCopy = true
this.touch = false
}
},
computed: {
todoMembers () {
if (!(this.task && this.task.scopeList && this.task.scopeList.length > 0)) return []
const members = []
for (let member of this.task.scopeList) {
if (!member.done) members.push(member)
}
return members
},
showTodo () {
if (this.todoMembers.length === 0) return '无'
const names = this.todoMembers.map(m => m.name)
if (this.todoMembers.length <= 2) return names.join('、')
return names[0] + '、' + names[1] + '等' + this.todoMembers.length + '人'
},
doneMembers () {
if (!this.task || !this.task.scopeList || this.task.scopeList.length === 0) return []
const members = []
for (let member of this.task.scopeList) {
if (member.done) members.push(member)
}
return members
},
showDone () {
if (this.doneMembers.length === 0) return '无'
const names = this.doneMembers.map(m => m.name)
if (this.doneMembers.length <= 2) return names.join('、')
return names[0] + '、' + names[1] + '等' + this.doneMembers.length + '人'
},
showMembers () {
if (!(this.task && this.task.scopeList && this.task.scopeList.length > 0)) return '无'
if (this.task.scopeList.length === 0) return '无'
const names = this.task.scopeList.map(m => m.name)
if (this.task.scopeList.length <= 2) return names.join('、')
return names[0] + '、' + names[1] + '等' + this.task.scopeList.length + '人'
},
groupCodeUrl () {
if (window.location.hash[0] === '#') {
return window.location.origin + '/#/groupCode?id=' + this.task.groupCodeInfo.uuid
}
return window.location.origin + '/groupCode?id=' + this.task.groupCodeInfo.uuid
}
},
mounted() {
this.clipboard = new ClipboardJS('.copy-btn_' + this.task.taskId)
this.clipboard.on('success', (e) => {
this.showCopy = false
})
this.clipboard.on('error', (e) => {
this.showCopy = false
})
},
}
</script>
<style lang="less" scoped>
.task-wrapper {
padding: 10px 8px;
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin: 5px 0 12px;
span {
font-size: 18px;
font-weight: bold;
}
}
.guide {
padding: 15px;
background-color: #f2f2f2;
font-size: 16px;
line-height: 20px;
color: #999999;
margin-bottom: 15px;
min-height: 30px;
position: relative;
.copy-wrapper {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
background-color: rgba(0, 0, 0, 0.4);
display: flex;
align-items: center;
justify-content: space-around;
}
}
.content {
padding: 10px;
background-color: #f2f2f2;
display: flex;
.group {
padding: 0 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
.group-name {
color: #999999;
}
}
}
.van-cell {
padding: 10px 6px;
}
.send-button {
padding: 10px 5px 5px;
display: flex;
flex-direction: row-reverse;
.van-button {
padding: 0 12px;
margin-right: 12px;
border-radius: 4px;
font-size: 12px;
}
}
}
.bottom-line {
background-color: #f2f2f2;
height: 15px;
}
</style>
<template>
<router-view></router-view>
</template>
<template>
<div>
<van-tabs v-model="isDone">
<van-tab :title="'待处理(' + todo.length + ')'" :name="0"></van-tab>
<van-tab :title="'已处理(' + done.length + ')'" :name="1"></van-tab>
</van-tabs>
<div class="type-area">
<van-button round size="small" @click="taskType = 0" :type="taskType === 0 ? 'info' : 'default'">全部</van-button>
<van-button round size="small" @click="taskType = 1" :type="taskType === 1 ? 'info' : 'default'">老客标签建群</van-button>
<van-button round size="small" @click="taskType = 2" :type="taskType === 2 ? 'info' : 'default'">群SOP</van-button>
</div>
<template v-if="!tasks || tasks.length === 0">
<van-empty description="暂无数据" />
</template>
<template v-else>
<template
v-for="task in tasks"
>
<template v-if="task.type === 1">
<OldCustomerPanel :key="task.taskId" :task="task" :state="isDone ? true : false" @refresh="getTasks"></OldCustomerPanel>
</template>
<template v-else>
<SOPPanel :key="task.ruleId" :task="task" :state="isDone ? true : false" @refresh="getTasks"></SOPPanel>
</template>
</template>
</template>
<van-overlay :show="loading" class-name="overlay">
<van-loading type="spinner"></van-loading>
</van-overlay>
</div>
</template>
<script>
import { getTasks } from '@/api/community'
import OldCustomerPanel from '../oldCustomer/panel'
import SOPPanel from '../SOP/panel'
export default {
components: { OldCustomerPanel, SOPPanel },
data () {
return {
isDone: 0, // 0: 待处理 1: 已处理
waitingNum: 0, // 待处理数据量
finishedNum: 0, // 已处理数据量
taskType: 0, // 任务类型 0:全部 1:老客标签建群 2:群SOP
loading: false, // 加载状态
todo: [], // 待处理数据
done: [], // 已处理数据
}
},
methods: {
// 获取老客标签建群和群SOP任务数据
getTasks () {
this.loading = true
getTasks(this.$store.state.userId, this.taskType).then((res) => {
if (res.code === 200) {
this.todo = res.todo || []
this.done = res.done || []
} else {
}
this.loading = false
}).catch((error) => {
this.loading = false
})
},
},
computed: {
userId () {
return this.$store.state.userId
},
tasks () {
if (this.isDone === 1) return this.done
return this.todo
},
},
watch: {
taskType (val) {
if (this.userId) this.getTasks()
},
userId (val) {
if (val) {
this.getTasks()
}
}
},
created () {
this.taskType = parseInt(this.$route.query.type)
}
}
</script>
<style lang="less" scoped>
.type-area {
padding: 8px;
background-color: #f2f2f2;
.van-button {
margin: 0 3px;
}
}
.overlay {
display: flex;
align-items: center;
.van-loading {
margin: auto;
}
}
</style>
<template>
<div>
<van-tabs :active="active" v-model="active">
<van-tab :title="'未完成(' + todoNum + ')'" :name="0">
<template v-if="todoMembers.length === 0">
<van-empty description="暂无数据" />
</template>
<template v-else>
<div v-for="member in todoMembers" :key="member.userId" class="cell">
<van-image width="45" :src="member.avatar"></van-image>
<div class="content"> {{ member.name }} </div>
</div>
</template>
</van-tab>
<van-tab :title="'已完成(' + doneNum + ')'" :name="1">
<template v-if="doneMembers.length === 0">
<van-empty description="暂无数据" />
</template>
<template v-else>
<div v-for="member in doneMembers" :key="member.userId" class="cell">
<van-image width="45" :src="member.avatar"></van-image>
<div class="content"> {{ member.name }} </div>
</div>
</template>
</van-tab>
</van-tabs>
<van-overlay :show="loading" class-name="overlay">
<van-loading type="spinner"></van-loading>
</van-overlay>
</div>
</template>
<script>
import { getState } from '@/api/community'
export default {
data () {
return {
taskId: '', // 任务ID
active: 0, // 0: 未完成 1: 已完成
taskType: 0, // 0: 老客标签建群 1: 群SOP
waitingCustomers: [], // 未完成客户
finishedCustomers: [], // 已完成客户
members: [], // 任务关联员工列表
loading: false, // 加载状态
}
},
methods: {
// 获取任务状态
getState () {
if (!this.taskId) return
this.loading = true
getState(this.taskId, this.taskType).then((res) => {
if (res.code === 200) {
this.members = res.data || []
}
this.loading = false
}).catch(() => {
this.loading = false
})
}
},
computed: {
// 带处理人员
todoMembers () {
const members = this.members.filter((m) => {
return !m.done
})
return members
},
todoNum () {
return this.todoMembers.length
},
// 已处理人员
doneMembers () {
const members = this.members.filter((m) => {
return m.done
})
return members
},
doneNum () {
return this.doneMembers.length
},
},
created () {
this.taskId = this.$route.query.taskId
this.active = this.$route.query.active || 0
this.taskType = this.$route.query.taskType || 0
this.getState()
}
}
</script>
<style lang="less" scoped>
/deep/ .van-tabs__wrap {
border-bottom: 1px solid #EEEEEE;
}
.cell {
display: flex;
align-items: center;
padding: 20px 15px;
border-bottom: 1px solid #EEEEEE;
:nth-child(n+2) {
margin-left: 20px;
}
.content {
font-size: 20px;
// font-weight: bold;
}
}
.overlay {
display: flex;
align-items: center;
.van-loading {
margin: auto;
}
}
</style>
<template>
<div>
<div v-if="!code || !code.actualQRCode">
<van-empty :description="message" />
</div>
<div v-else class="code-wrapper">
<div class="header">
{{ code.activityName }}
</div>
<div class="welcome">
{{ code.guide }}
</div>
<div class="code-name">
{{ code.groupName }}
</div>
<div class="code-image">
<van-image width="300" :src="code.actualQRCode"></van-image>
</div>
<div class="service" v-if="code.isOpenTip === '1'">
<van-button type="danger" @click="dialog = true">无法加群?</van-button>
</div>
<van-dialog
v-model="dialog"
class="service-dialog"
:showConfirmButton="false"
:closeOnClickOverlay="true"
>
<div>
<van-image
:src="code.serviceQrCode"
width="200"
>
</van-image>
<div class="service-message">
{{ code.tipMsg }}
</div>
<div class="tip">
请长按二维码添加客服微信
</div>
</div>
<van-icon name="cross" class="close" @click="dialog = false" />
</van-dialog>
</div>
</div>
</template>
<script>
import { getDetail } from '@/api/groupCode'
export default {
data () {
return {
groupCodeUUID: '', // 群活码ID
code: {
activityName: '', // 活码名称
guide: '', // 加群引导语
actualQRCode: '', // 实际群码
isOpenTip: '', // 是否显示无法加群提示
tipMsg: '', // 无法加群提示语
serviceQrCode: '', // 客服二维码
groupName: '', // 实际群名称
},
dialog: false,
message: '抱歉,暂无可用实际群码',
}
},
methods: {
// 获取群活码详情
getDetail () {
if (!this.groupCodeUUID) return
getDetail(this.groupCodeUUID).then(({ data, msg }) => {
this.code = Object.assign(this.code, data)
if (msg) this.message = msg
}).catch(() => {})
},
},
created () {
this.groupCodeUUID = this.$route.query.id
this.getDetail()
},
}
</script>
<style lang="less" scoped>
.code-wrapper {
margin: 20px 10px;
.header {
font-size: 18px;
margin: 20px 10px;
text-align: center;
}
.welcome {
font-size: 16px;
color: #AAAAAA;
margin: 20px 10px 60px;
}
.code-name {
font-size: 20px;
margin: 20px 10px 2px;
font-weight: bold;
text-align: center;
}
.code-image {
text-align: center;
margin-bottom: 100px;
}
.service {
text-align: center;
.van-button {
border-radius: 4px;
height: 36px;
}
}
}
.service-dialog {
text-align: center;
border-radius: 0;
padding: 20px;
.service-message {
margin-bottom: 30px;
}
.tip {
font-size: 12px;
color: #AAAAAA;
}
.close {
position: absolute;
top: 10px;
right: 10px;
}
}
</style>
...@@ -91,10 +91,9 @@ export function remove(ids) { ...@@ -91,10 +91,9 @@ export function remove(ids) {
* @param {*} params * @param {*} params
* id: 老客标签建群任务ID * id: 老客标签建群任务ID
*/ */
export function getStat(id, params) { export function getStat(id) {
return request({ return request({
url: service + '/stat/' + id, url: service + '/stat/' + id,
method: 'get', method: 'get',
params,
}) })
} }
\ No newline at end of file \ No newline at end of file
...@@ -34,6 +34,13 @@ window.CONFIG = { ...@@ -34,6 +34,13 @@ window.CONFIG = {
common: '/common', common: '/common',
}, },
/**
* 前端生成群活码跳转的H5链接
* 由于群活码是由前端生成,需要配置一下群活码跳转的链接
* 例如: http://xxx.xxx.xx/h5/groupCode
*/
groupCodeH5Link: '',
get headers() { get headers() {
return { Authorization: 'Bearer ' + getToken() } return { Authorization: 'Bearer ' + getToken() }
}, },
......
<template> <template>
<div class="wrap" v-loading="loading"> <div class="wrap" v-loading="loading">
<el-form :model="form" ref="form" label-width="100px"> <el-form :model="form" ref="form" :rules="rules" label-width="100px">
<el-form-item label="规则名称" prop="ruleName"> <el-form-item label="规则名称" prop="ruleName">
<el-input <el-input
v-model="form.ruleName" v-model="form.ruleName"
...@@ -245,7 +245,11 @@ export default { ...@@ -245,7 +245,11 @@ export default {
}, },
uploadImageUrl: '', uploadImageUrl: '',
imageMaterialList: [], imageMaterialList: [],
textMaterialList: [] textMaterialList: [],
rules: Object.freeze({
ruleName: [{ required: true, message: '必填项', trigger: 'blur' }],
title: [{ required: true, message: '必填项', trigger: 'blur' }],
}),
} }
}, },
...@@ -292,23 +296,38 @@ export default { ...@@ -292,23 +296,38 @@ export default {
return return
} }
if (this.ruleId) { if (!this.form.startExeTime || !this.form.stopExeTime) {
update(this.ruleId, this.form).then(({ data }) => { this.msgError('请选择执行时间')
this.msgSuccess('操作成功') return
this.loading = false }
this.$router.back()
}).catch(() => { if (!this.form.content && !this.form.picList && !this.form.materialIdList) {
this.loading = false this.msgError('请输入消息内容')
}) return
} else {
add(this.form).then(({ data }) => {
this.msgSuccess('操作成功')
this.loading = false
this.$router.back()
}).catch(() => {
this.loading = false
})
} }
this.$refs.form.validate((valid) => {
if (valid) {
this.loading = true
if (this.ruleId) {
update(this.ruleId, this.form).then(({ data }) => {
this.msgSuccess('操作成功')
this.loading = false
this.$router.back()
}).catch(() => {
this.loading = false
})
} else {
add(this.form).then(({ data }) => {
this.msgSuccess('操作成功')
this.loading = false
this.$router.back()
}).catch(() => {
this.loading = false
})
}
}
})
}, },
goRoute () { goRoute () {
...@@ -320,7 +339,7 @@ export default { ...@@ -320,7 +339,7 @@ export default {
}, },
removeImage (url) { removeImage (url) {
this.picList.splice(this.picList.indexOf(url), 1) this.form.picList.splice(this.form.picList.indexOf(url), 1)
}, },
removeImageMaterial (image) { removeImageMaterial (image) {
......
<template> <template>
<div class="wrap" v-loading="loading"> <div class="wrap" v-loading="loading">
<el-form :model="form" ref="form" label-width="100px"> <el-form :model="form" ref="form" :rules="rules" label-width="100px">
<el-form-item label="活码名称" prop="taskName"> <el-form-item label="活码名称" prop="taskName">
<el-input <el-input
v-model="form.taskName" v-model="form.taskName"
...@@ -96,7 +96,12 @@ export default { ...@@ -96,7 +96,12 @@ export default {
keywords: '', // 关键词 keywords: '', // 关键词
}, },
codes: [], codes: [],
groupQrCode: {} groupQrCode: {},
rules: Object.freeze({
taskName: [{ required: true, message: '必填项', trigger: 'blur' }],
welcomeMsg: [{ required: true, message: '必填项', trigger: 'blur' }],
keywords: [{ required: true, message: '必填项', trigger: 'blur' }],
}),
} }
}, },
...@@ -121,30 +126,33 @@ export default { ...@@ -121,30 +126,33 @@ export default {
}, },
submit() { submit() {
// if (!this.form.weEmpleCodeUseScops.length) { if (!this.form.groupCodeId) {
// this.msgError('请至少选择一名使用员工') this.msgError('请选择一个群活码')
// return return
// }
this.loading = true
if (this.taskId) {
update(this.taskId, this.form).then(() => {
this.msgSuccess('更新成功')
this.loading = false
this.$router.back()
}).catch(() => {
this.loading = false
})
} else {
add(this.form).then(() => {
this.msgSuccess('添加成功')
this.loading = false
this.$router.back()
}).catch(() => {
this.loading = false
})
} }
this.$refs.form.validate((valid) => {
if (valid) {
this.loading = true
if (this.taskId) {
update(this.taskId, this.form).then(() => {
this.msgSuccess('更新成功')
this.loading = false
this.$router.back()
}).catch(() => {
this.loading = false
})
} else {
add(this.form).then(() => {
this.msgSuccess('添加成功')
this.loading = false
this.$router.back()
}).catch(() => {
this.loading = false
})
}
}
})
}, },
// 选择二维码确认按钮 // 选择二维码确认按钮
......
<template> <template>
<div class="wrap" v-loading="loading"> <div class="wrap" v-loading="loading">
<el-form :model="form" ref="form" label-width="100px"> <el-form :model="form" ref="form" :rules="rules" label-width="100px">
<el-form-item label="任务名称" prop="taskName"> <el-form-item label="任务名称" prop="taskName">
<el-input <el-input
v-model="form.taskName" v-model="form.taskName"
...@@ -192,7 +192,7 @@ export default { ...@@ -192,7 +192,7 @@ export default {
welcomeMsg: '', // 加群引导语 welcomeMsg: '', // 加群引导语
sendType: 0, // 发送方式 sendType: 0, // 发送方式
groupCodeId: '', // 群活码ID groupCodeId: '', // 群活码ID
tagList: [], // 标签 tagList: [], // 标签
scopeList: [], // 员工 scopeList: [], // 员工
sendScope: 0, // 发送范围 sendScope: 0, // 发送范围
sendGender: 0, // 发送性别 sendGender: 0, // 发送性别
...@@ -220,7 +220,11 @@ export default { ...@@ -220,7 +220,11 @@ export default {
{ label: '全部客户', value: 0 }, { label: '全部客户', value: 0 },
{ label: '部分客户', value: 1 }, { label: '部分客户', value: 1 },
], ],
pickerOptions: {} pickerOptions: {},
rules: Object.freeze({
taskName: [{ required: true, message: '必填项', trigger: 'blur' }],
welcomeMsg: [{ required: true, message: '必填项', trigger: 'blur' }],
}),
} }
}, },
...@@ -236,7 +240,6 @@ export default { ...@@ -236,7 +240,6 @@ export default {
this.form.groupCodeId = this.groupQrCode.id this.form.groupCodeId = this.groupQrCode.id
this.dateRange = [this.form.cusBeginTime, this.form.cusEndTime] this.dateRange = [this.form.cusBeginTime, this.form.cusEndTime]
this.codes = [ data.groupCodeInfo ] this.codes = [ data.groupCodeInfo ]
this.loading = false this.loading = false
...@@ -260,12 +263,12 @@ export default { ...@@ -260,12 +263,12 @@ export default {
}, },
submit() { submit() {
if (!this.form.scopeList.length) { if (this.form.sendScope === 1 && !this.form.scopeList.length) {
this.msgError('请至少选择一名使用员工') this.msgError('请至少选择一名使用员工')
return return
} }
if (!this.form.tagList.length) { if (this.form.sendScope === 1 && !this.form.tagList.length) {
this.msgError('请至少选择一个标签') this.msgError('请至少选择一个标签')
return return
} }
...@@ -275,25 +278,28 @@ export default { ...@@ -275,25 +278,28 @@ export default {
return return
} }
this.loading = true this.$refs.form.validate((valid) => {
if (valid) {
if (this.taskId) { this.loading = true
update(this.taskId, this.form).then(() => { if (this.taskId) {
this.msgSuccess('更新成功') update(this.taskId, this.form).then(() => {
this.loading = false this.msgSuccess('更新成功')
this.$router.back() this.loading = false
}).catch(() => { this.$router.back()
this.loading = false }).catch(() => {
}) this.loading = false
} else { })
add(this.form).then(() => { } else {
this.msgSuccess('添加成功') add(this.form).then(() => {
this.loading = false this.msgSuccess('添加成功')
this.$router.back() this.loading = false
}).catch(() => { this.$router.back()
this.loading = false }).catch(() => {
}) this.loading = false
} })
}
}
})
}, },
}, },
......
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
</el-form-item> </el-form-item>
<el-form-item label> <el-form-item label>
<el-button type="primary" @click="getStat(1)">查询</el-button> <el-button type="primary" @click="customerSearch">查询</el-button>
<el-button @click="resetCustomerQuery">重置</el-button> <el-button @click="resetCustomerQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
:total="customerTotal" :total="customerTotal"
:page.sync="customerQuery.pageNum" :page.sync="customerQuery.pageNum"
:limit.sync="customerQuery.pageSize" :limit.sync="customerQuery.pageSize"
@pagination="getStat()" @pagination="customerFilter"
/> />
</div> </div>
</el-dialog> </el-dialog>
...@@ -284,6 +284,8 @@ export default { ...@@ -284,6 +284,8 @@ export default {
customerLoading: false, customerLoading: false,
// 客户统计数据 // 客户统计数据
customerList: [], customerList: [],
// 展示用客户统计数据
customerShowList: [],
// 是否在群选择项 // 是否在群选择项
inGroupOptions: [ inGroupOptions: [
{ label: '在群', value: 1 }, { label: '在群', value: 1 },
...@@ -321,7 +323,7 @@ export default { ...@@ -321,7 +323,7 @@ export default {
page && (this.customerQuery.pageNum = page) page && (this.customerQuery.pageNum = page)
this.customerLoading = true this.customerLoading = true
getStat(this.customerSearchId, this.customerQuery).then(({ rows, total }) => { getStat(this.customerSearchId).then(({ rows, total }) => {
this.customerList = rows this.customerList = rows
this.customerTotal = +total this.customerTotal = +total
this.customerLoading = false this.customerLoading = false
...@@ -398,16 +400,32 @@ export default { ...@@ -398,16 +400,32 @@ export default {
this.getStat(1) this.getStat(1)
}, },
// 过滤客户统计数据
customerFilter () {
const l = []
for (let data of this.customerList) {
if (this.customerQuery.customerName !== '' && !this.customerQuery.customerName.includes(data.customerName)) continue
if (this.customerQuery.isInGroup !== '' && this.customerQuery.isInGroup !== data.isInGroup) continue
if (this.customerQuery.isSent !== '' && this.customerQuery.isSent !== data.isSent) continue
l.push(data)
}
this.customerShowList = l.slice(this.customerQuery.pageNum * this.customerQuery.pageSize, this.customerQuery.pageSize)
},
// 客户统计查询 // 客户统计查询
customerSearch () { customerSearch () {
this.getStat() // this.getStat()
this.customerFilter()
}, },
// 客户统计重置 // 客户统计重置
resetCustomerQuery () { resetCustomerQuery () {
this.$refs['customerForm'].resetFields() this.$refs['customerForm'].resetFields()
this.getStat(1) // this.getStat(1)
this.customerFilter()
} }
}, },
......
<template> <template>
<div class="list" v-loading="loading"> <div class="list" v-loading="loading">
<div v-if="personList"> <div v-if="personList.length>=1">
<ul> <ul>
<li v-for="(item,index) in personList" :key="index" @click="liClick(item)"> <li v-for="(item,index) in personList" :key="index" @click="liClick(item)">
<el-row style="padding:10px"> <el-row style="padding:10px">
......
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
start-placeholder="开始日期" end-placeholder="结束日期" align="right" @change="activeNameThreeClick"> start-placeholder="开始日期" end-placeholder="结束日期" align="right" @change="activeNameThreeClick">
</el-date-picker> </el-date-picker>
</div> </div>
<chat :allChat="allChat" v-if="allChat.length>=1"></chat> <chat :allChat="allChat" v-if="allChat&&allChat.length>=1"></chat>
<el-pagination background v-if="allChat.length>=1" layout="prev, pager, next" class="pagination" <el-pagination background v-if="allChat&&allChat.length>=1" layout="prev, pager, next" class="pagination"
:current-page="currentPage" @current-change="currentChange" :total="total"> :current-page="currentPage" @current-change="currentChange" :total="total">
</el-pagination> </el-pagination>
</div> </div>
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
start-placeholder="开始日期" end-placeholder="结束日期" align="right" @change="activeNameThreeClick"> start-placeholder="开始日期" end-placeholder="结束日期" align="right" @change="activeNameThreeClick">
</el-date-picker> </el-date-picker>
</div> </div>
<chat :allChat="allChatImg" v-if="allChatImg.length>=1"></chat> <chat :allChat="allChatImg" v-if="allChatImg&&allChatImg.length>=1"></chat>
<el-pagination background v-if="allChatImg.length>=1" class="pagination" layout="prev, pager, next" <el-pagination background v-if="allChatImg&&allChatImg.length>=1" class="pagination" layout="prev, pager, next"
:total="total" @current-change="currentChange" :current-page="currentPage"> :total="total" @current-change="currentChange" :current-page="currentPage">
</el-pagination> </el-pagination>
</div> </div>
...@@ -288,14 +288,13 @@ ...@@ -288,14 +288,13 @@
content.chatGrounpList(query).then(res => { content.chatGrounpList(query).then(res => {
this.total = Number(res.total) this.total = Number(res.total)
console.log(res,'this.activeName=') console.log(res,'this.activeName=')
this.resortData(res.data) this.resortData(res)
}) })
} else { } else {
content.chatList(query).then(res => { content.chatList(query).then(res => {
console.log(res,'ssss') console.log(res.rows,'ssss')
this.total = Number(res.total) this.total = Number(res.total)
this.resortData(res.data) this.resortData(res)
}) })
} }
} }
...@@ -348,9 +347,9 @@ ...@@ -348,9 +347,9 @@
content.getTree({ content.getTree({
fromId: this.employId, fromId: this.employId,
searchType: this.activeName searchType: this.activeName
}).then((res) => { }).then(({rows}) => {
this.loading = false this.loading = false
this.personList = res.data.rows this.personList =rows
}).catch(err => { }).catch(err => {
this.loading = false this.loading = false
}) })
...@@ -360,18 +359,7 @@ ...@@ -360,18 +359,7 @@
if (!value) return true; if (!value) return true;
return data.name.indexOf(value) !== -1; return data.name.indexOf(value) !== -1;
}, },
// getAmount(){
// let querys = {
// pageNum: '1',
// pageSize: '999',
// department: ''
// }
// api.getList(querys).then(({
// total
// }) => {
// this.employAmount= total
// })
// },
handleNodeClick(data, add) { handleNodeClick(data, add) {
if (!data.userId) { if (!data.userId) {
let querys = { let querys = {
...@@ -379,9 +367,10 @@ ...@@ -379,9 +367,10 @@
pageSize: '999', pageSize: '999',
department: data.id department: data.id
} }
api.getList(querys).then(res => { api.getList(querys).then(({rows}) => {
this.$set(data, 'children', []); this.$set(data, 'children', []);
data.children = res.data.rows
data.children =rows
}) })
} else { } else {
this.talkName = data.name; this.talkName = data.name;
......
...@@ -144,8 +144,8 @@ ...@@ -144,8 +144,8 @@
} }
content.getChatAllList(query).then(res => { content.getChatAllList(query).then(res => {
console.log(res) console.log(res)
this.fileData = res.data.rows; this.fileData = res.rows;
this.total = Number(res.data.total) this.total = Number(res.total)
}) })
}, },
chechName(e) { chechName(e) {
......
...@@ -231,10 +231,10 @@ ...@@ -231,10 +231,10 @@
fromId: this.employId, fromId: this.employId,
searchType: this.activeName searchType: this.activeName
}).then(( }).then((
res {rows}
) => { ) => {
this.loading = false this.loading = false
this.personList =res.data.rows this.personList =rows
}).catch(err => { }).catch(err => {
this.loading = false this.loading = false
}) })
...@@ -270,13 +270,13 @@ ...@@ -270,13 +270,13 @@
} }
if (group) { if (group) {
content.chatGrounpList(query).then(res => { content.chatGrounpList(query).then(res => {
this.total = Number(res.data.total) this.total = Number(res.total)
this.resortData(res.data) this.resortData(res)
}) })
} else { } else {
content.chatList(query).then(res => { content.chatList(query).then(res => {
this.total = Number(res.data.total) this.total = Number(res.total)
this.resortData(res.data) this.resortData(res)
}) })
} }
}, },
...@@ -310,12 +310,9 @@ ...@@ -310,12 +310,9 @@
isOpenChat: '1' isOpenChat: '1'
} }
content.listByCustomer(querys).then(res => { content.listByCustomer(querys).then(res => {
console.log(res) console.log(res,'rows')
res.rows = res.data.rows.filter((a, b) => { this.CList = res.rows
return a && a.name this.employAmount = res.total;
})
this.CList = res.data.rows
this.employAmount = res.data.total;
}) })
} }
}, },
......
...@@ -328,7 +328,7 @@ export default { ...@@ -328,7 +328,7 @@ export default {
computed: { computed: {
qrCodeText () { qrCodeText () {
return process.env.VUE_APP_BASE_API + this.h5uri + '?id=' + this.form.uuid return window.CONFIG.groupCodeH5Link + '?id=' + this.form.uuid
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!