Commit f2139e31 by xinla

v5.10.0

1 parent a8841162
# 更新日志
## v5.10.0
2023.09.17
1. 新增 pc 端客户拉黑,移出黑名单功能
2. 新增 pc 端轨迹素材添加客户标签功能
3. 修复 移动端素材预览问题;预览、查看详情整合,统一为 metrialDetail 页面,去除 previewDetail 页面
4. 修复 小程序路径校验问题
5. 修复 订单信息新增禁用问题
6. 修复 门店活码地图回显问题
7. 修复 sop 问题
8. 优化 文件预览路径处理
9. 优化 pc 端 config.js 配置文件目录位置等
10. 优化 门店活码详情统计也调整
11. 优化 移动端素材中心
12. 其他已知 bug 修改和组件优化
## v5.9.0
2023.09.17
......
......@@ -156,6 +156,9 @@ export default {
treeFormRules: {
name: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
dialogVisibleSelectTag: false,
selectedTagList: [],
}
},
watch: {
......@@ -324,6 +327,19 @@ export default {
this.loading = true
getList(this.query)
.then(({ rows, total }) => {
rows.forEach((element) => {
if (element.tagIds && element.tagNames) {
element.tagIds = element.tagIds.split(',')
element.tagNames = element.tagNames.split(',')
element.tags = []
element.tagIds.forEach((unit, index) => {
element.tags.push({
tagId: unit,
name: element.tagNames[index],
})
})
}
})
this.list = rows.sort((a, b) => +new Date(b.updateTime) - +new Date(a.updateTime))
this.total = +total
this.loading = false
......@@ -446,6 +462,7 @@ export default {
item.materialName = item.name
})
}
this.form.tagIds = this.form.tags?.map((item, index) => item.tagId) + ''
this.$refs['form'].validate((valid) => {
if (valid) {
this.times = setTimeout(() => {
......@@ -558,6 +575,13 @@ export default {
this.form['memorySize'] = data.memorySize
this.form['pixelSize'] = data.pixelSize
},
submitSelectTag(data) {
this.form.tags = data.map((d) => ({
tagId: d.tagId,
name: d.name,
}))
},
},
}
</script>
......@@ -688,6 +712,21 @@ export default {
<el-cascader v-model="form.categoryId" :options="treeData[0].children" :props="groupProps"></el-cascader>
</el-form-item>
<el-form-item label="客户标签" v-if="[2, 3, 8, 9, 13, 19].includes(+type)">
<TagEllipsis :list="form.tags" limit="4"></TagEllipsis>
<div>
<el-button type="primary" @click="dialogVisibleSelectTag = true">
{{ form.tags?.length ? '编辑' : '添加' }}标签
</el-button>
<!-- 选择标签弹窗 -->
<SelectTag
v-model:visible="dialogVisibleSelectTag"
:defaultValues="form.tags"
@success="submitSelectTag"></SelectTag>
</div>
<div class="sub-des">素材打开后,该客户将会自动设置以上选择标签</div>
</el-form-item>
<!-- 文本 -->
<template v-if="type === '4'">
<el-form-item :label="typeTitle[type] + '标题'" prop="materialName">
......@@ -820,7 +859,7 @@ export default {
</el-form-item>
</template>
<!-- 小程序标题 -->
<!-- 小程序 -->
<template v-else-if="type === '11'">
<el-form-item label="小程序标题" prop="materialName">
<el-input
......@@ -850,6 +889,7 @@ export default {
</el-form-item>
</template>
<!-- 语音 -->
<template v-else-if="type === '1'">
<el-form-item label="语音" prop="materialUrl">
<Voice v-if="form.materialUrl" :amrUrl="form.materialUrl"></Voice>
......
......@@ -6,8 +6,7 @@
<el-tooltip
:content="row.materialName"
placement="top"
:disabled="row.materialName ? row.materialName.length < 12 : true"
>
:disabled="row.materialName ? row.materialName.length < 12 : true">
<span class="title">{{ coverContent(row.materialName, 12) }}</span>
</el-tooltip>
<!-- 文本 -->
......@@ -23,20 +22,11 @@
</div>
<!-- 图文 -->
<div v-if="row.mediaType === '9'" style="display: flex">
<el-image
:src="row.coverUrl"
fit="contain"
class="imgsize"
v-if="row.coverUrl"
></el-image>
<el-image :src="row.coverUrl" fit="contain" class="imgsize" v-if="row.coverUrl"></el-image>
<div class="icon-style" v-else>
<svg-icon class="icon-style" icon="imgText"></svg-icon>
</div>
<el-tooltip
:content="row.content"
placement="top"
:disabled="row.content ? row.content.length < 50 : true"
>
<el-tooltip :content="row.content" placement="top" :disabled="row.content ? row.content.length < 50 : true">
<span class="twosplice distStyle">{{ coverContent(row.content, 50) }}</span>
</el-tooltip>
</div>
......@@ -46,31 +36,18 @@
</div>
<!-- 文章 -->
<div v-if="row.mediaType === '12'" style="display: flex">
<el-image
:src="row.coverUrl"
fit="contain"
class="imgsize"
v-if="row.coverUrl"
></el-image>
<el-image :src="row.coverUrl" fit="contain" class="imgsize" v-if="row.coverUrl"></el-image>
<div class="icon-style" v-else>
<svg-icon class="icon-style" icon="article"></svg-icon>
</div>
<el-tooltip
:content="row.digest"
placement="top"
:disabled="row.digest ? row.digest.length < 50 : true"
>
<el-tooltip :content="row.digest" placement="top" :disabled="row.digest ? row.digest.length < 50 : true">
<span class="twosplice distStyle">{{ coverContent(row.digest, 50) }}</span>
</el-tooltip>
</div>
<!-- 视频 -->
<div v-if="row.mediaType === '2'" style="display: flex">
<el-image :src="row.coverUrl" fit="contain" class="imgsize"></el-image>
<el-tooltip
:content="row.digest"
placement="top"
:disabled="row.digest ? row.digest.length < 50 : true"
>
<el-tooltip :content="row.digest" placement="top" :disabled="row.digest ? row.digest.length < 50 : true">
<span class="twosplice distStyle">{{ coverContent(row.digest, 50) }}</span>
</el-tooltip>
</div>
......@@ -78,27 +55,16 @@
<div v-if="row.mediaType === '3'" style="display: flex">
<!-- <el-image :src="row.coverUrl" fit="contain" class="imgsize"></el-image> -->
<div class="icon-style" v-if="row.materialUrl">
<svg-icon
class="icon-style"
:icon="row.materialUrl ? filType(row.materialUrl) : ''"
></svg-icon>
<svg-icon class="icon-style" :icon="row.materialUrl ? filType(row.materialUrl) : ''"></svg-icon>
</div>
<el-tooltip
:content="row.digest"
placement="top"
:disabled="row.digest ? row.digest.length < 50 : true"
>
<el-tooltip :content="row.digest" placement="top" :disabled="row.digest ? row.digest.length < 50 : true">
<span class="twosplice distStyle">{{ coverContent(row.digest, 50) }}</span>
</el-tooltip>
</div>
<!-- 海报 -->
<div v-if="row.mediaType === '5'" style="display: flex">
<el-image :src="row.materialUrl" fit="contain" class="imgsize"></el-image>
<el-tooltip
:content="row.digest"
placement="top"
:disabled="row.digest ? row.digest.length < 50 : true"
>
<el-tooltip :content="row.digest" placement="top" :disabled="row.digest ? row.digest.length < 50 : true">
<span class="twosplice distStyle">{{ coverContent(row.digest, 50) }}</span>
</el-tooltip>
</div>
......@@ -113,21 +79,17 @@
</el-table-column>
<el-table-column prop="height" label="操作" align="center">
<template #default="scope">
<el-button text>
<el-button text>
<el-button text v-if="['2', '5', '9'].includes(scope.row.mediaType)">
<!-- 视频,海报,图文 -->
<a :href="scope.row.materialUrl" target="_blank">预览</a>
</el-button>
<!-- 文件 -->
<el-button text v-if="scope.row.mediaType == '3'">
<a :href="dealUrl(scope.row.materialUrl)" target="_blank">预览</a>
</el-button>
<!-- 文章 -->
<el-button text v-if="scope.row.mediaType == '12'" @click="preview(scope.row)">
<span>预览</span>
</el-button>
</el-button>
<el-button text v-if="['2', '5', '9'].includes(scope.row.mediaType)">
<!-- 视频,海报,图文 -->
<a :href="scope.row.materialUrl" target="_blank">预览</a>
</el-button>
<!-- 文件 -->
<el-button text v-if="scope.row.mediaType == '3'">
<a :href="$previewFile(scope.row.materialUrl)" target="_blank">预览</a>
</el-button>
<!-- 文章 -->
<el-button text v-if="scope.row.mediaType == '12'" @click="preview(scope.row)">
<span>预览</span>
</el-button>
</template>
</el-table-column>
......@@ -145,19 +107,6 @@ export default {
},
},
methods: {
dealUrl(url) {
return window.lwConfig.PRIVIEW_URL + encodeURIComponent(this.base64Encode(url))
},
base64Encode(str) {
if (str === undefined || str === '' || str === null) {
return str
}
return btoa(
encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function toSolidBytes(match, p1) {
return String.fromCharCode('0x' + p1)
})
)
},
preview(row) {
// let routeData = this.$router.resolve({
// path: '/preview',
......
......@@ -391,7 +391,7 @@ export default {
</script>
<template>
<div class="page height100">
<div class="page h100">
<div class="g-left-right">
<div class="left g-card">
<div class="title">
......
......@@ -33,6 +33,22 @@ export default {
<PicTitContent :row="row" />
</template>
</el-table-column>
<el-table-column prop="tagNames" label="客户标签" align="center" width="">
<template #header>
<el-popover placement="top" trigger="hover">
<template #reference>
<div>
客户标签
<el-icon-QuestionFilled class="el-icon-QuestionFilled"></el-icon-QuestionFilled>
</div>
</template>
<div>客户查看素材时自动打标签</div>
</el-popover>
</template>
<template #default="{ row }">
<TagEllipsis :list="row.tagNames"></TagEllipsis>
</template>
</el-table-column>
<el-table-column label="发送总次数" align="center" prop="sendNum" :show-overflow-tooltip="true">
<template #header>
<el-popover placement="top" trigger="hover">
......@@ -87,7 +103,7 @@ export default {
<span>{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="160px" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" width="160px" class-name="small-padding fixed-width" fixed="right">
<template #default="scope">
<el-button text @click="$refs.page.detail(scope.row)" v-hasPermi="['wechat:material:detail']">
详情|统计
......
......@@ -57,6 +57,22 @@ export default {
<PicTitContent :row="row" />
</template>
</el-table-column>
<el-table-column prop="tagNames" label="客户标签" align="center" width="">
<template #header>
<el-popover placement="top" trigger="hover">
<template #reference>
<div>
客户标签
<el-icon-QuestionFilled class="el-icon-QuestionFilled"></el-icon-QuestionFilled>
</div>
</template>
<div>客户查看素材时自动打标签</div>
</el-popover>
</template>
<template #default="{ row }">
<TagEllipsis :list="row.tagNames" emptyText="无标签"></TagEllipsis>
</template>
</el-table-column>
<el-table-column label="发送总次数" align="center" prop="sendNum" :show-overflow-tooltip="true">
<template #header>
<el-popover placement="top" trigger="hover">
......
......@@ -40,12 +40,23 @@ export default {
<PicTitContent :row="row" />
</template>
</el-table-column>
<el-table-column
label="发送总次数"
align="center"
prop="sendNum"
:show-overflow-tooltip="true"
>
<el-table-column prop="tagNames" label="客户标签" align="center" width="">
<template #header>
<el-popover placement="top" trigger="hover">
<template #reference>
<div>
客户标签
<el-icon-QuestionFilled class="el-icon-QuestionFilled"></el-icon-QuestionFilled>
</div>
</template>
<div>客户查看素材时自动打标签</div>
</el-popover>
</template>
<template #default="{ row }">
<TagEllipsis :list="row.tagNames" emptyText="无标签"></TagEllipsis>
</template>
</el-table-column>
<el-table-column label="发送总次数" align="center" prop="sendNum" :show-overflow-tooltip="true">
<template #header>
<el-popover placement="top" trigger="hover">
<template #reference>
......@@ -61,12 +72,7 @@ export default {
{{ row.sendNum }}
</template>
</el-table-column>
<el-table-column
label="查看总次数"
align="center"
prop="viewNum"
:show-overflow-tooltip="true"
>
<el-table-column label="查看总次数" align="center" prop="viewNum" :show-overflow-tooltip="true">
<template #header>
<el-popover placement="top" trigger="hover">
<template #reference>
......@@ -82,12 +88,7 @@ export default {
{{ row.viewNum }}
</template>
</el-table-column>
<el-table-column
label="查看总人数"
align="center"
prop="viewByNum"
:show-overflow-tooltip="true"
>
<el-table-column label="查看总人数" align="center" prop="viewByNum" :show-overflow-tooltip="true">
<template #header>
<el-popover placement="top" trigger="hover">
<template #reference>
......@@ -110,18 +111,9 @@ export default {
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="160px"
>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160px" fixed="right">
<template #default="scope">
<el-button
text
@click="$refs.page.detail(scope.row)"
v-hasPermi="['wechat:material:detail']"
>
<el-button text @click="$refs.page.detail(scope.row)" v-hasPermi="['wechat:material:detail']">
详情|统计
</el-button>
<el-button text @click="$refs.page.edit(scope.row)">编辑</el-button>
......
......@@ -97,6 +97,22 @@ export default {
</div> -->
</template>
</el-table-column>
<el-table-column prop="tagNames" label="客户标签" align="center" width="">
<template #header>
<el-popover placement="top" trigger="hover">
<template #reference>
<div>
客户标签
<el-icon-QuestionFilled class="el-icon-QuestionFilled"></el-icon-QuestionFilled>
</div>
</template>
<div>客户查看素材时自动打标签</div>
</el-popover>
</template>
<template #default="{ row }">
<TagEllipsis :list="row.tagNames" emptyText="无标签"></TagEllipsis>
</template>
</el-table-column>
<el-table-column label="海报类型" align="center" prop="materialName">
<template #default="{ row }">
{{ row.type === '1' ? '通用海报' : '裂变海报' }}
......@@ -157,7 +173,7 @@ export default {
<span>{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="160px" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" width="160px" class-name="small-padding fixed-width" fixed="right">
<template #default="scope">
<el-button text @click="$refs.page.detail(scope.row)" v-hasPermi="['wechat:material:detail']">
详情|统计
......
......@@ -53,6 +53,22 @@ export default {
</div> -->
</template>
</el-table-column>
<el-table-column prop="tagNames" label="客户标签" align="center" width="">
<template #header>
<el-popover placement="top" trigger="hover">
<template #reference>
<div>
客户标签
<el-icon-QuestionFilled class="el-icon-QuestionFilled"></el-icon-QuestionFilled>
</div>
</template>
<div>客户查看素材时自动打标签</div>
</el-popover>
</template>
<template #default="{ row }">
<TagEllipsis :list="row.tagNames" emptyText="无标签"></TagEllipsis>
</template>
</el-table-column>
<el-table-column label="发送总次数" align="center" prop="sendNum" :show-overflow-tooltip="true">
<template #header>
<el-popover placement="top" trigger="hover">
......@@ -108,7 +124,7 @@ export default {
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160px">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="160px">
<template #default="scope">
<el-button text @click="$refs.page.detail(scope.row)" v-hasPermi="['wechat:material:detail']">
详情|统计
......
......@@ -320,22 +320,6 @@ export default {
console.log(fail)
})
},
// /** 导出按钮操作 */
// exportCustomer() {
// const queryParams = this.query
// this.$confirm('是否确认导出所有客户数据项?', '警告', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(function() {
// return api.exportCustomer(queryParams)
// })
// .then((response) => {
// this.download(response.msg)
// })
// .catch(function() {})
// },
selectedUser(list) {
this.queryUser = list
},
......@@ -429,6 +413,24 @@ export default {
exportData() {
this.$exportData(api.exportData.bind(null, this.query), '导出客户.xlsx')
},
// 设置客户黑名单
setBlackList(row) {
this.$confirm(row.isJoinBlacklist == 1 ? '是否确认拉黑,拉黑后客户无法收到群发消息' : '是否确认该操作', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.loading = true
return api.setBlackList({ isJoinBlacklist: row.isJoinBlacklist == 1 ? 0 : 1, customerIds: row.id })
})
.then((res) => {
this.msgSuccess('操作成功')
this.getList()
this.loading = false
})
.catch(function () {})
},
},
}
</script>
......@@ -487,19 +489,13 @@ export default {
</el-form-item>
<el-form-item>
<el-checkbox v-model="query.noTagCheck" @change="setData">无标签客户</el-checkbox>
<el-checkbox v-model="query.isJoinBlacklist">黑名单客户</el-checkbox>
</el-form-item>
<el-form-item label="">
<!-- v-hasPermi="['customerManage:customer:query']" -->
<el-button type="primary" @click="getList(1)">查询</el-button>
<el-button @click="resetForm()">重置</el-button>
<!-- v-hasPermi="['customerManage:customer:query']" -->
<!-- <el-button
v-hasPermi="['customerManage:customer:export']"
type="info"
@click="exportCustomer"
>导出列表</el-button
> -->
</el-form-item>
</el-form>
......@@ -552,10 +548,7 @@ export default {
</el-table-column>
<el-table-column prop="tagNames" label="客户标签" align="center" width="220">
<template #default="{ row }">
<div v-if="row.tagNames">
<TagEllipsis :list="row.tagNames"></TagEllipsis>
</div>
<span v-else>无标签</span>
<TagEllipsis :list="row.tagNames" emptyText="无标签"></TagEllipsis>
</template>
</el-table-column>
<!-- <el-table-column prop="corpName" label="公司名称" align="center"></el-table-column> -->
......@@ -584,13 +577,17 @@ export default {
</el-table-column>
<el-table-column label="操作" width="200" align="center">
<template #default="{ row }">
<!-- v-hasPermi="['customerManage:customer:view']" -->
<el-button @click="goRoute(row)" text>查看</el-button>
<el-button text @click="makeTag(row)">标签管理</el-button>
<!-- v-hasPermi="['customerManage/customer:makeTag']" -->
<el-button text :disabled="row.isTransfer" @click=";(dialogVisibleExtend = true), (currentEidt = row)">
在职继承
<template #default="{ row, $index }">
<el-button text @click="goRoute(row)">查看</el-button>
<template v-if="row.isJoinBlacklist == 1">
<el-button text @click="makeTag(row)">标签管理</el-button>
<!-- v-hasPermi="['customerManage/customer:makeTag']" -->
<el-button text :disabled="row.isTransfer" @click=";(dialogVisibleExtend = true), (currentEidt = row)">
在职继承
</el-button>
</template>
<el-button text @click="setBlackList(row)">
{{ row.isJoinBlacklist == 1 ? '拉黑' : '移出黑名单' }}
</el-button>
</template>
</el-table-column>
......
......@@ -4,12 +4,7 @@
<div class="title">{{ weMaterialVo.materialName }}</div>
<!-- 文章 -->
<div class="centerStyle" v-if="weMaterialVo.mediaType == 12">
<el-image
class="img-style"
fit="contain"
:src="weMaterialVo.coverUrl"
v-if="weMaterialVo.coverUrl"
/>
<el-image class="img-style" fit="contain" :src="weMaterialVo.coverUrl" v-if="weMaterialVo.coverUrl" />
<svg-icon class="icon-style" icon="article" v-else></svg-icon>
<div class="contentStyle">{{ weMaterialVo.digest }}</div>
</div>
......@@ -20,12 +15,7 @@
</div>
<!-- 海报 -->
<div class="centerStyle" v-if="weMaterialVo.mediaType == 5">
<el-image
class="img-style"
fit="contain"
:src="weMaterialVo.materialUrl"
v-if="weMaterialVo.materialUrl"
/>
<el-image class="img-style" fit="contain" :src="weMaterialVo.materialUrl" v-if="weMaterialVo.materialUrl" />
<svg-icon class="icon-style" icon="pic" v-else></svg-icon>
<div class="contentStyle">{{ weMaterialVo.digest }}</div>
</div>
......@@ -34,8 +24,7 @@
<svg-icon
class="icon-style"
:icon="weMaterialVo.materialUrl ? filType(weMaterialVo.materialUrl) : ''"
v-if="weMaterialVo.materialUrl"
></svg-icon>
v-if="weMaterialVo.materialUrl"></svg-icon>
<span class="contentStyle">{{ weMaterialVo.digest }}</span>
</div>
</div>
......@@ -45,15 +34,12 @@
<a :href="weMaterialVo.materialUrl" target="_blank">预览</a>
</div>
<div v-if="weMaterialVo.mediaType === '12'" class="preview" @click="preview(weMaterialVo)">
预览
</div>
<div v-if="weMaterialVo.mediaType === '12'" class="preview" @click="preview(weMaterialVo)">预览</div>
<a
target="_blank"
:href="dealUrl(weMaterialVo.materialUrl)"
:href="$previewFile(weMaterialVo.materialUrl)"
class="preview"
v-if="weMaterialVo.mediaType == '3'"
>
v-if="weMaterialVo.mediaType == '3'">
预览
</a>
</div>
......@@ -77,19 +63,6 @@ export default {
// })
// }
// },
dealUrl(url) {
return window.lwConfig.PRIVIEW_URL + encodeURIComponent(this.base64Encode(url))
},
base64Encode(str) {
if (str === undefined || str === '' || str === null) {
return str
}
return btoa(
encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function toSolidBytes(match, p1) {
return String.fromCharCode('0x' + p1)
})
)
},
preview(row) {
// let routeData = this.$router.resolve({
// path: '/preview',
......
......@@ -13,17 +13,13 @@
></el-date-picker> -->
<div class="list">
<template v-if="list.length">
<chatList
:queryChat="queryChat"
v-if="'all,image,video,link,'.includes(type)"
:data="list"
></chatList>
<chatList :queryChat="queryChat" v-if="'all,image,video,link,'.includes(type)" :data="list"></chatList>
<el-table
v-else-if="type == 'file'"
:data="list"
stripe
style="width: 100%"
style="width: 100%;"
:header-cell-style="{ background: '#fff' }"
>
<!-- <el-table-column prop="msgtype" label="类型"> </el-table-column> -->
......@@ -118,128 +114,129 @@
</template>
<script>
import chatList from './chatList.vue'
import * as api from '@/api/conversation/content.js'
import Voice from '@/components/Voice'
import { download } from '@/api/common.js'
import { diffDate } from '@/utils/index'
import { parseTime } from '@/utils/common'
export default {
name: '',
components: { chatList, Voice },
props: {
// 消息收发者
queryChat: {
type: Object,
default: () => ({}),
import chatList from './chatList.vue'
import * as api from '@/api/conversation/content.js'
import Voice from '@/components/Voice'
import { download } from '@/api/common.js'
import { diffDate } from '@/utils/index'
import { parseTime } from '@/utils/common'
export default {
name: '',
components: { chatList, Voice },
props: {
// 消息收发者
queryChat: {
type: Object,
default: () => ({})
},
// 消息类型
type: {
type: [String, Number],
default: 0
}
},
// 消息类型
type: {
type: [String, Number],
default: 0,
data() {
return {
loading: false,
currentPage: 1,
// dateRange: [],
list: [],
total: 0
}
},
},
data() {
return {
loading: false,
currentPage: 1,
// dateRange: [],
list: [],
total: 0,
}
},
computed: {},
watch: {
queryChat() {
this.getList(1)
computed: {},
watch: {
queryChat() {
this.getList(1)
},
type() {
this.getList(1)
},
},
type() {
created() {
this.getList(1)
},
},
created() {
this.getList(1)
},
mounted() {},
methods: {
setDate(start, end) {
return diffDate(end, parseTime(start))
},
getList(page) {
// if (!this.queryChat.fromId) {
// return //没有选择人
// }
this.loading = true
console.log(this.type)
let query = {
msgType: this.type == 'all' ? '' : this.type,
pageSize: '10',
orderByColumn: 't.msg_time',
isAsc: 'desc',
}
// if (this.dateRange) {
// query.beginTime = this.dateRange[0]
// query.endTime = this.dateRange[1]
// } else {
// query.beginTime = ''
// query.endTime = ''
// }
page && (query.pageNum = this.currentPage = page)
Object.assign(query, this.queryChat)
api
.getChatList(query)
.then((res) => {
this.total = ~~res.total
this.list = res.rows
this.loading = false
})
.catch((err) => {
this.loading = false
mounted() {},
methods: {
setDate(start, end) {
return diffDate(end, parseTime(start))
},
getList(page) {
// if (!this.queryChat.fromId) {
// return //没有选择人
// }
this.loading = true
console.log(this.type)
let query = {
msgType: this.type == 'all' ? '' : this.type,
pageSize: '10',
orderByColumn: 't.msg_time',
isAsc: 'desc'
}
// if (this.dateRange) {
// query.beginTime = this.dateRange[0]
// query.endTime = this.dateRange[1]
// } else {
// query.beginTime = ''
// query.endTime = ''
// }
page && (query.pageNum = this.currentPage = page)
Object.assign(query, this.queryChat)
api
.getChatList(query)
.then((res) => {
this.total = ~~res.total
this.list = res.rows
this.loading = false
})
.catch((err) => {
this.loading = false
})
},
filterSize(size) {
if (!size) return ''
if (size < pow1024(1)) return size + ' B'
if (size < pow1024(2)) return (size / pow1024(1)).toFixed(2) + ' KB'
if (size < pow1024(3)) return (size / pow1024(2)).toFixed(2) + ' MB'
if (size < pow1024(4)) return (size / pow1024(3)).toFixed(2) + ' GB'
return (size / pow1024(4)).toFixed(2) + ' TB'
function pow1024(num) {
return Math.pow(1024, num)
}
},
downloadFile(row) {
this.$confirm('是否确认下载该文件?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
},
filterSize(size) {
if (!size) return ''
if (size < pow1024(1)) return size + ' B'
if (size < pow1024(2)) return (size / pow1024(1)).toFixed(2) + ' KB'
if (size < pow1024(3)) return (size / pow1024(2)).toFixed(2) + ' MB'
if (size < pow1024(4)) return (size / pow1024(3)).toFixed(2) + ' GB'
return (size / pow1024(4)).toFixed(2) + ' TB'
function pow1024(num) {
return Math.pow(1024, num)
.then((response) => {
this.downloadNet(JSON.parse(row.contact).attachment, JSON.parse(row.contact).filename)
})
.catch(function () {})
}
},
downloadFile(row) {
this.$confirm('是否确认下载该文件?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then((response) => {
this.downloadNet(JSON.parse(row.contact).attachment, JSON.parse(row.contact).filename)
})
.catch(function () {})
},
},
}
}
}
</script>
<style lang="scss" scoped>
.list {
height: calc(100vh - 370px);
margin-top: 10px;
background: var(--bg-white);
overflow-y: scroll;
border-bottom: 1px solid var(--border-black-10);
color: var(--font-black-6);
text-align: center;
.list {
height: calc(100vh - 370px);
margin-top: 10px;
background: var(--bg-white);
overflow-y: scroll;
border-bottom: 1px solid var(--border-black-10);
color: var(--font-black-6);
text-align: center;
::-webkit-scrollbar {
display: none;
::-webkit-scrollbar {
display: none;
}
}
.chatListClassTab {
padding: 10px 10px 0;
background: var(--bg-white);
text-align: left;
}
}
.chatListClassTab {
padding: 10px 10px 0;
background: var(--bg-white);
text-align: left;
}
</style>
......@@ -230,13 +230,13 @@ export default {
changeTab(tab) {
this.openedTabs.includes(tab.index) || this.openedTabs.push(tab.index)
},
changeTrack(type) {
this.openTrack.includes(type) || this.openTrack.push(type)
this.active = type
},
sync() {
this.$refs['record'][this.active].sync()
},
// changeTrack(type) {
// this.openTrack.includes(type) || this.openTrack.push(type)
// this.active = type
// },
// sync() {
// this.$refs['record'][this.active].sync()
// },
// 根据生日计算年龄
jsGetAge(strBirthday) {
if (!strBirthday) {
......
<script>
import {
updateBirthday,
getDetail,
getSummary,
getFollowUpRecord,
getCustomerInfoByUserId,
} from '@/api/customer'
import { updateBirthday, getDetail, getSummary, getFollowUpRecord, getCustomerInfoByUserId } from '@/api/customer'
import { getList } from '@/api/salesCenter/businessConver.js'
import { dictAddType, dictJoinGroupType, dictTrackState } from '@/utils/dictionary'
......@@ -87,17 +81,15 @@ export default {
* userId 是 当前跟进人id
*/
getDetail() {
getDetail({ ...this.$route.query, delFlag: this.$route.query.isDelete ? 1 : 0 }).then(
({ data }) => {
data.companyTags && (data.companyTags = data.companyTags.split(','))
this.customer = data
getDetail({ ...this.$route.query, delFlag: this.$route.query.isDelete ? 1 : 0 }).then(({ data }) => {
data.companyTags && (data.companyTags = data.companyTags.split(','))
this.customer = data
// if (data.trackUsers && data.trackUsers.length === 1) {
// this.openedTabs = [data.trackUsers[0].trackUserId]
// }
this.birthday = data.birthday
}
)
// if (data.trackUsers && data.trackUsers.length === 1) {
// this.openedTabs = [data.trackUsers[0].trackUserId]
// }
this.birthday = data.birthday
})
},
// changeTab(tab) {
// this.openedTabs.includes(tab.paneName) || this.openedTabs.push(tab.paneName)
......@@ -110,10 +102,12 @@ export default {
// )
// }
changeTrack(type) {
console.log(114, type)
this.openTrack.includes(type) || this.openTrack.push(type)
this.active = type
},
sync() {
this.$refs['record'][this.active].sync()
},
},
}
</script>
......@@ -149,10 +143,7 @@ export default {
<div class="g-card">
<div class="g-card-title">社交关系</div>
<el-tabs model-value="1">
<el-tab-pane
:label="`跟进员工(${customer.trackUsers ? customer.trackUsers.length : 0})`"
name="1"
>
<el-tab-pane :label="`跟进员工(${customer.trackUsers ? customer.trackUsers.length : 0})`" name="1">
<el-table :data="customer.trackUsers">
<el-table-column label="员工" align="center" prop="userName" />
<el-table-column prop="addMethod" label="添加方式" align="center">
......@@ -171,18 +162,13 @@ export default {
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane
:label="`所在客群(${customer.groups ? customer.groups.length : 0})`"
name="2"
>
<el-tab-pane :label="`所在客群(${customer.groups ? customer.groups.length : 0})`" name="2">
<el-table :data="customer.groups">
<el-table-column label="群名" align="center" prop="groupName" />
<el-table-column label="群主" align="center" prop="leaderName" />
<el-table-column label="入群时间" align="center" prop="joinTime" />
<el-table-column prop="joinScene" label="入群方式" align="center">
<template #default="{ row }">{{
dictJoinGroupType[row.joinScene + '']
}}</template>
<template #default="{ row }">{{ dictJoinGroupType[row.joinScene + ''] }}</template>
</el-table-column>
</el-table>
</el-tab-pane>
......@@ -205,21 +191,18 @@ export default {
:key="index"
:label="item.userName"
lazy
:data-id="item.trackUserId"
>
:data-id="item.trackUserId">
<info-tab :stageList="stageList" :userId="item.trackUserId"></info-tab>
</el-tab-pane>
</el-tabs>
</div>
</div>
<div style="width: 425px; margin-top: 0">
<el-card>
<el-card class="g-card" style="padding: 0">
<template #header>
<div class="fcbw">
<span class="card-title" @click="sync">客户轨迹</span>
<ButtonSync class="btn-sync" :lastSyncTime="lastSyncTime" @click="sync"
>同步</ButtonSync
>
<div class="g-card-title fcbw">
<span class="card-title">客户轨迹</span>
<ButtonSync class="btn-sync" :lastSyncTime="lastSyncTime" @click="sync">同步</ButtonSync>
</div>
</template>
<div class="flex track-tab-wrap mb15">
......@@ -233,13 +216,7 @@ export default {
{{ type }}
</div> -->
<el-select v-model="active" placeholder="请选择" @change="changeTrack">
<el-option
v-for="(value, type) of trajectoryType"
:key="type"
:label="value"
:value="type"
>
</el-option>
<el-option v-for="(value, type) of trajectoryType" :key="type" :label="value" :value="type"></el-option>
</el-select>
</div>
<template v-for="(item, index) in openTrack" :key="index">
......@@ -250,8 +227,7 @@ export default {
:userId="userId"
:userIdAll="customer.trackUsers.map((e) => e.trackUserId).join()"
v-model:lastSyncTime="lastSyncTime"
:trajectoryType="item == 0 ? null : item"
></record>
:trajectoryType="item == 0 ? null : item"></record>
</template>
</el-card>
</div>
......
......@@ -22,35 +22,31 @@
<div class="g-card">
<div class="mid-action">
<el-button type="primary" @click="goRoute('', '', '', 'add')">新建群发</el-button>
<el-button type="primary" @click="goRoute('add')">新建群发</el-button>
</div>
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column label="群发内容" align="center" prop="content" />
<el-table-column label="群发类型" align="center">
<template #default="scope">
{{ pushType[scope.row.chatType] }}
<template #default="{ row }">
{{ pushType[row.chatType] }}
</template>
</el-table-column>
<el-table-column label="发送类型" align="center">
<template #default="scope">
{{ timedTask[scope.row.isTask] }}
<template #default="{ row }">
{{ timedTask[row.isTask] }}
</template>
</el-table-column>
<el-table-column label="发送时间" align="center" prop="sendTime" width="180"></el-table-column>
<el-table-column label="最近更新时间" align="center" prop="createTime" width="180"></el-table-column>
<el-table-column label="操作" align="center" width="180">
<template #default="scope">
<!-- v-hasPermi="['enterpriseWechat:view']" -->
<el-button text @click="goRoute(scope.row.id, scope.row.isTask, scope.row.status, 'detail')">
详情
</el-button>
<el-button v-if="scope.row.isTask === 1 && scope.row.status === 0" text @click="cancelSend(scope.row)">
取消发送
</el-button>
<template #default="{ row }">
<el-button text @click="goRoute('detail', row.id, row.isTask, row.status)">详情</el-button>
<!-- <el-button text @click="goRoute('add', row.id)">复制</el-button> -->
<el-button v-if="row.isTask === 1 && row.status === 0" text @click="cancelSend(row)">取消发送</el-button>
<!-- <el-button v-hasPermi="['enterpriseWechat:edit']" text disabled=""
@click="goRoute(scope.row, 1)">编辑</el-button>
@click="goRoute(row, 1)">编辑</el-button>
<el-button v-hasPermi="['enterpriseWechat:edit']" text
@click="syncMsg(scope.row)">同步</el-button> -->
@click="syncMsg(row)">同步</el-button> -->
</template>
</el-table-column>
</el-table>
......@@ -156,7 +152,7 @@ export default {
})
.catch(function () {})
},
goRoute(id, isTask, status, path) {
goRoute(path, id, isTask, status) {
const query = {}
if (id) {
query.id = id
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!