Commit 48dd1ef4 by 前端

Merge branch 'v3.5.0' into 'master'

合并V3.5.0

See merge request !454
2 parents e44600e9 837c3fbf
......@@ -89,6 +89,4 @@ const resetCard = params => {
})
}
export {resetCard, getCenterListApi, getMoreMerchant, updateCardContent, getCardContent, memberExportApi, getQrUrl ,getCardtypeList}
export { resetCard,getCenterListApi, getMoreMerchant, updateCardContent, getCardContent, memberExportApi, getQrUrl ,getCardtypeList}
......@@ -51,7 +51,30 @@ const momentStaffCustomers = params => {
sign: true
})
}
//朋友圈任务详情 互动客户列表视图
const momentCommentView = params => {
params.method = 'marketing.api.moment.comment.view'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
// returnAll:true
})
}
// 互动列表导出
const commentExport = params => {
params.method = 'marketing.api.moment.comment.export'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
// returnAll:true
})
}
//朋友圈任务详情统计数据
const momentStatistic = params => {
params.method = 'marketing.api.moment.detail.statistic'
......@@ -152,5 +175,7 @@ export default {
getListApi,
momentCancel,
createStatus,
publicStatus
publicStatus,
momentCommentView,
commentExport
}
......@@ -278,4 +278,15 @@ const liveroomOverview = params => {
sign: true
})
}
export default { exportDailyOrderQuantityStatistics, liveroomDetailexport, liveroomDetailpage, getDailyOrderQuantityStatistics, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getPayListApi, getPayMerchatListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi }
/**众筹活动直播视频列表 */
const getTencentcloudmediaList = params => {
params.method = 'scrm.api.shopmall.tencentcloudmedia.list'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default { exportDailyOrderQuantityStatistics, liveroomDetailexport, liveroomDetailpage, getDailyOrderQuantityStatistics, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getPayListApi, getPayMerchatListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi, getTencentcloudmediaList }
......@@ -600,6 +600,12 @@ html {
.marketing .mt-10 {
margin-top: 10px;
}
.marketing .pd-20 {
padding: 0 20px;
}
.marketing .hand {
cursor: pointer;
}
.el-tooltip__popper.is-light {
background: #ffffff;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08);
......@@ -720,3 +726,14 @@ html {
vertical-align: middle;
margin-right: 8px;
}
.drawerWrap {
.el-drawer {
width: 50%!important;
.el-form .el-select {
width: 200px!important;
.el-input{
width: 200px!important;
}
}
}
}
......@@ -553,7 +553,7 @@ export default {
this.isUpdate = true
this.tagging = val || []
let arr = []
this.tagging.forEach(item => {
this.tagging && this.tagging.forEach(item => {
item.labelList = item.labelList || []
item.labelList.forEach(tag => {
arr.push({
......@@ -578,7 +578,7 @@ export default {
this.tagging.splice(idx, 1)
}
let arr = []
this.tagging.forEach(item => {
this.tagging && this.tagging.forEach(item => {
item.labelList = item.labelList || []
item.labelList.forEach(tag => {
arr.push({
......
<template>
<div class="container">
<div class="title">朋友圈详情</div>
<div class="marketing container">
<div class="title">朋友圈营销</div>
<div class="detail-content">
<div class="content-info">
<div class="content-info-title">朋友圈详情</div>
<div class="content-text">
<div class="detail-item">
<div class="detail-label">朋友圈类型:</div>
......@@ -32,38 +33,81 @@
</div>
</div>
</div>
<div class="title">
<div class="content-info-title">
数据统计
<div class="flex-align">
<span class="info-time">最近更新:{{ this.updatedTime }}</span>
<span class="info-refresh" @click="handleRefresh">
刷新数据
<div class="icon-wrap">
<i :class="{ 'el-icon-refresh': true, 'wait-status': refreshStatus }"></i>
更新数据
</div>
</span>
<span class="info-time">更新于:{{ this.updatedTime }}</span>
</div>
</div>
<div class="statistics-info">
<div class="statistics-ul">
<div class="statistics-li statistics-border">
<div class="statistics-img">
<img src="@/assets/friendGroup/icon-send.png" />
</div>
<div class="statistics-number">
<span>{{ basicInfo.sendStaffCount }}</span>
人
</div>
<div class="statistics-text">已发送成员</div>
<div class="statistics-text">已发送成员/人</div>
</div>
<div class="statistics-li">
<div class="statistics-img">
<img src="@/assets/friendGroup/icon-unsend.png" />
</div>
<div class="statistics-number">
<span>{{ basicInfo.unSendStaffCount }}</span>
{{ form == 'customer' ? '人' : '个' }}
</div>
<div class="statistics-text">未发送成员</div>
<div class="statistics-text">未发送成员/{{ form == 'customer' ? '人' : '个' }}</div>
</div>
</div>
<div v-if="form == 'customer'" class="statistics-ul">
<div v-if="form == 'customer'" class="statistics-ul" @click="getStatistics(1)">
<div class="statistics-li">
<div class="statistics-img">
<img src="@/assets/friendGroup/icon-copy.png" />
</div>
<div class="statistics-number">
<span>{{ basicInfo.copyCustomerCount }}</span>
人
</div>
<div>已送达客户</div>
<div>已送达客户/人</div>
</div>
</div>
<div class="statistics-ul">
<div class="statistics-li statistics-border">
<div class="statistics-img">
<img src="@/assets/friendGroup/icon-interaction.png" />
</div>
<div class="statistics-number">
<span>{{ basicInfo.interactCount }}</span>
</div>
<div class="statistics-text">互动客户/人</div>
<div class="statistics-ratio">互动率:{{ ((basicInfo.interactRatio)*100).toFixed(2) }}%</div>
</div>
<div class="statistics-li statistics-border" @click="getStatistics(2)">
<div class="statistics-img">
<img src="@/assets/friendGroup/icon-like.png" />
</div>
<div class="statistics-number">
<span>{{ basicInfo.likeCount }}</span>
</div>
<div class="statistics-text">点赞客户/人</div>
<div class="statistics-ratio">互动率:{{ ((basicInfo.likeRatio)*100).toFixed(2) }}%</div>
</div>
<div class="statistics-li" @click="getStatistics(3)">
<div class="statistics-img">
<img src="@/assets/friendGroup/icon-comment.png" />
</div>
<div class="statistics-number">
<span>{{ basicInfo.commentCount }}</span>
</div>
<div class="statistics-text">评论客户/人</div>
<div class="statistics-ratio">互动率:{{ ((basicInfo.commentRatio)*100).toFixed(2) }}%</div>
</div>
</div>
</div>
......@@ -112,7 +156,7 @@ export default {
},
watch: {
basicInfo(val) {
if (val.userList.length > 4) {
if (val.userList?.length > 4) {
this.limitUserList = val.userList.slice(0, 4)
} else {
this.limitUserList = val.userList
......@@ -133,7 +177,12 @@ export default {
// }
},
methods: {
handleRefresh: utils.debounce(function() {
getStatistics(value) {
this.$emit('getStatistics', {
activeName: value
})
},
handleRefresh: utils.debounce(function () {
this.publicStatus()
this.refreshStatus = true
setTimeout(() => {
......@@ -152,7 +201,7 @@ export default {
this.$apis.friendGroup.momentDetail({ id }).then(res => {
this.updatedTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
this.basicInfo = res
// console.log(this.basicInfo, '123');
console.log(this.basicInfo, '123')
// this.basicInfo.sendTime = dayjs(this.basicInfo.sendTime).format('YYYY-MM-DD HH:mm:ss')
const previewList = res.attachmentList.map(item => {
if (item.attType == 7 && item.attContent) item.attContent = JSON.parse(item.attContent)
......@@ -212,16 +261,52 @@ export default {
background-color: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
.title {
padding: 20px 0 17px 20px;
height: 56px;
line-height: 56px;
font-size: 16px;
font-weight: 600;
color: #333;
border-bottom: 1px solid #d8d8d8;
padding-left: 20px;
box-sizing: border-box;
}
.detail-content {
display: flex;
// align-items: flex-end;
justify-content: space-between;
box-sizing: border-box;
width: 100%;
height: 100%;
padding: 20px;
.content-info {
width: calc(100% - 323px);
&-title {
font-size: 16px;
color: #333333;
font-weight: 600;
display: flex;
align-items: center;
justify-content: space-between;
.info-refresh {
display: flex;
align-items: center;
font-weight: 400;
.icon-wrap {
width: 24px;
height: 24px;
background: #5850ff;
border-radius: 4px;
margin-left: 4px;
text-align: center;
line-height: 24px;
}
.el-icon-refresh {
color: #fff;
}
font-size: 14px;
color: #5850ff;
cursor: pointer;
margin-left: 20px;
margin-left: 8px;
.wait-status {
transition: all ease-in 1s;
transform: rotate(360deg);
......@@ -229,24 +314,21 @@ export default {
}
.info-time {
font-size: 14px;
color: #7d7d7d;
color: #666666;
margin-left: 10px;
font-weight: 400;
}
}
.detail-content {
display: flex;
align-items: flex-end;
justify-content: space-between;
box-sizing: border-box;
width: 100%;
height: 100%;
padding: 20px 24px 40px 0;
.content-info {
width: calc(100% - 323px);
.content-text {
padding-left: 52px;
height: 400px;
width: 100%;
height: 124px;
padding: 32px 20px;
box-sizing: border-box;
background: #f8f8fc;
border-radius: 2px;
display: flex;
flex-wrap: wrap;
margin: 16px 0 41px;
}
.detail-item {
display: flex;
......@@ -255,10 +337,11 @@ export default {
color: #333;
line-height: 20px;
margin-bottom: 24px;
width: 50%;
.detail-label {
width: 85px;
width: 150px;
text-align: right;
margin-right: 12px;
// margin-right: 12px;
}
.detail-tips {
margin-left: 8px;
......@@ -304,7 +387,6 @@ export default {
background: #f7f7f7;
border: 1px solid #d8d8d8;
min-width: 325px;
.name {
display: inline-block;
width: 68px;
......@@ -314,22 +396,22 @@ export default {
}
}
.statistics-info {
margin-top: 24px;
margin-left: 52px;
margin-top: 16px;
display: flex;
overflow-x: scroll;
.statistics-ul {
display: flex;
border-radius: 2px;
background-color: #f6f6ff;
height: 204px;
background: #f8f8fc;
border: 1px solid rgba(88, 80, 255, 0.8);
margin-right: 20px;
height: 142px;
margin-right: 16px;
&:last-child {
margin-right: 0;
}
}
.statistics-li {
height: 100%;
position: relative;
color: #424242;
font-size: 14px;
......@@ -337,7 +419,6 @@ export default {
width: 142px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
&.statistics-border {
margin-right: 0;
......@@ -347,12 +428,22 @@ export default {
display: inline-block;
position: absolute;
right: 0;
height: 58px;
border-right: 1px solid #5850ff;
height: 156px;
border-right: 1px solid #d8d7ea;
margin: 24px 0;
}
}
.statistics-img {
width: 40px;
height: 40px;
margin-bottom: 16px;
margin-top: 30px;
img {
width: 100%;
}
}
.statistics-number {
margin-bottom: 12px;
margin-bottom: 8px;
font-size: 16px;
color: #333;
span {
......@@ -361,6 +452,13 @@ export default {
}
.statistics-text {
width: 70px;
white-space: nowrap;
}
.statistics-ratio {
font-weight: 400;
font-size: 12px;
color: #666666;
margin-top: 8px;
}
}
}
......
......@@ -78,7 +78,7 @@ export default {
for (let i in previewVal) {
if (previewVal[i].attType == 1) {
const attContent = previewVal[i].attContent
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) {
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) {
let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
......@@ -126,13 +126,15 @@ export default {
}
.img-bg {
position: relative;
width: 290px;
height: 566px;
width: 240px;
height: 445px;
padding: 20px 0;
background-image: url(../../../assets/guestCustom/friend-bg.png);
background-size: 100%;
background-repeat: no-repeat;
.preview-content {
position: absolute;
width: 250px;
width: 224px;
height: 350px;
overflow-y: auto;
top: 90px;
......@@ -157,7 +159,7 @@ export default {
}
.preview-box {
margin-left: 30px;
width: 180px;
width: 165px;
}
.preview-operation {
float: right;
......
......@@ -108,7 +108,6 @@ export default {
},
methods: {
selectionTable(val) {
console.log(val)
this.innerTags = val
// this.$emit('selectTable', val)
},
......
......@@ -2,16 +2,19 @@
<template>
<div class="marketing pro-group">
<div class="m-b-20 friend-title">
<div>
<div class="friend-title-left">
<GLButton :size="size" type="primary" fn="编辑朋友圈" @click="handleEdit(1)">发布朋友圈</GLButton>
<span>管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span>
<span class="friend-tip-text">管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span>
</div>
<div class="title">
<span class="info-time">{{this.sendType}}:{{ this.updatedTime }}</span>
<span class="info-refresh" @click="handleRefresh">
刷新数据
<div class="icon-wrap">
<i :class="{ 'el-icon-refresh': true, 'wait-status': refreshStatus }"></i>
更新数据
</div>
</span>
<span class="info-time">更新于{{ this.updatedTime }}</span>
</div>
</div>
<div class="container">
......@@ -97,6 +100,7 @@ export default {
offReason: [{ required: true, message: '请输入下架备注', trigger: 'change' }]
},
updatedTime: '',
sendType:'',
// 分享
isShareVisible: false,
shareForm: {},
......@@ -241,20 +245,20 @@ export default {
label: '发布方式',
name: 'sendType',
addHtml: 'sendType',
width: '120'
width: '110'
},
{
label: '类型',
name: 'type',
formatter: cellValue => {
console.log(this.baseData.typeStatusList.find(item => item.confId == cellValue.type))
return this.baseData.typeStatusList.find(item => item.confId == cellValue.type).confName
}
},
width: '110'
},
{
label: '创建人',
prop: 'createdName',
width: '180'
width: '190'
},
{
label: '创建时间',
......@@ -275,6 +279,18 @@ export default {
label: '已送达客户',
prop: 'copyCustomerCount',
width: '110'
},
{
label: '互动客户',
prop: 'interactCount'
},
{
label: '点赞客户',
prop: 'likeCount'
},
{
label: '评论客户',
prop: 'commentCount'
}
]
},
......@@ -313,7 +329,7 @@ export default {
},
methods: {
handleRefresh: utils.debounce(function() {
handleRefresh: utils.debounce(function () {
this.createStatus()
this.refreshStatus = true
setTimeout(() => {
......@@ -323,7 +339,10 @@ export default {
async createStatus() {
this.updatedTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
await this.$apis.friendGroup.createStatus({})
await this.$apis.friendGroup.publicStatus({})
let res = await this.$apis.friendGroup.publicStatus({})
this.updatedTime = res.syncTime
this.sendType = res.syncType == 1 ? '更新中' : '已更新'
this.getListData()
},
getListData() {
......@@ -350,9 +369,7 @@ export default {
})
previewListFilter = previewListFilter.reduce((prev, cur) => {
let index = prev.findIndex(item => item.attType == 2)
console.log(prev, cur, index)
if (index != -1 && prev.length) {
console.log(prev[index].attContent.concat(cur.attContent))
return prev.concat({ attType: cur.attType, attContent: prev[index].attContent.concat(cur.attContent) })
}
return prev.concat(cur)
......@@ -517,15 +534,37 @@ export default {
<style scoped lang="scss">
.friend-title {
display: flex;
justify-content: space-between;
align-items: center;
color: #666666;
.friend-title-left {
display: flex;
align-items: center;
}
.title {
display: flex;
align-items: center;
margin-left: 74px;
white-space: nowrap;
.info-refresh {
display: flex;
align-items: center;
.icon-wrap {
width: 24px;
height: 24px;
background: #5850ff;
border-radius: 4px;
margin-left: 4px;
text-align: center;
line-height: 24px;
}
.el-icon-refresh {
color: #fff;
}
font-size: 14px;
color: #5850ff;
cursor: pointer;
margin-left: 20px;
margin-left: 8px;
.wait-status {
transition: all ease-in 1s;
transform: rotate(360deg);
......@@ -541,6 +580,8 @@ export default {
font-size: 14px;
margin-left: 10px;
font-weight: 100;
// display: inline-block;
// width: 80%;
}
}
.attachmentList-box {
......
......@@ -807,7 +807,6 @@ export default {
}
}
}
.pageTitle {
position: relative;
padding: 15px 20px;
......@@ -833,7 +832,6 @@ export default {
box-sizing: border-box;
cursor: pointer;
}
.el-form-item {
margin-bottom: 15px;
}
......@@ -910,7 +908,6 @@ export default {
overflow: hidden;
}
}
.pricesMerge {
display: flex;
width: 1500px;
......
......@@ -513,7 +513,6 @@ export default {
padding-top: 5px;
padding-left: 10px;
box-sizing: border-box;
.choseItem {
position: relative;
min-width: 90px;
......@@ -611,7 +610,6 @@ export default {
font-weight: 400;
color: #666666;
margin-top: 10px;
>span:first-child {
display: inline-block;
min-width: 165px;
......@@ -719,7 +717,6 @@ export default {
margin-left: -110px;
}
}
.give-tip {
font-weight: 400;
font-size: 12px;
......@@ -728,7 +725,7 @@ export default {
margin: -15px 0 20px 154px;
}
}
/deep/ .el-form-item__error {
margin-left: 154px;
}</style>
}
</style>
......@@ -85,6 +85,18 @@
</template>
</div>
<div
slot="joinText"
slot-scope="scope"
>
<el-tooltip
effect="dark"
:content="formatterNumber(scope.scope,scope.prop)"
placement="top"
>
<div class="line-ellipsis">{{formatterNumber(scope.scope,scope.prop)}}</div>
</el-tooltip>
</div>
<div
class="table-btns"
slot="auth-button"
slot-scope="scope"
......@@ -406,25 +418,22 @@ export default {
prop: 'verificationNumber'
},
{
label: '定金(元)',
name: 'activityPrice',
width: 140,
formatter: cellValue => {
return (cellValue.activityPrice / 100).toFixed(2)
}
label: '定金/元',
prop: 'activityPrice',
addHtml: 'joinText',
width: 100
},
{
label: '众筹价(元)',
name: 'crowdFundingPrice',
width: 140,
formatter: cellValue => {
return (cellValue.crowdFundingPrice / 100).toFixed(2)
}
label: '众筹价/元',
prop: 'crowdFundingPrice',
addHtml: 'joinText',
width: 100
},
{
label: '库存',
prop: 'goodsStock',
width: 110
prop: 'activityGoodsStock',
addHtml: 'joinText',
width: 100
},
{
label: '创建日期',
......@@ -646,6 +655,14 @@ export default {
setTableFinishFun () {
//接收到的数据为空
this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun()
},
formatterNumber (cell, key) {
const str = []
cell?.goodsList?.map(e => {
str.push(key != 'activityGoodsStock' ? (e[key] / 100).toFixed(2) : e[key])
})
return str.length > 0 ? str.join(',') : '--'
}
}
}
......
......@@ -66,6 +66,7 @@ export default {
},
jumpEvent(obj) {
console.log(obj)
this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit)
this.$set(this.eventObj, 'info', obj.info)
this.parentCustomerObj = obj.parentCustomerObj
......
......@@ -2,8 +2,11 @@
<div class="img-bg">
<div class="preview-content">
<div class="preview-time">{{ currentTime }}</div>
<div :class="{'preview-info':true,'isMargin':previewList && previewList[2] && previewList[2].attType == 6 && item.attType ==6}" v-for="item in previewList" :key="item.id">
<img class="avatar" src="@/assets/guestCustom/default-customer.png" v-if="!(hasSixType && hasSevenType) || item.attType !== 7" alt/>
<div
:class="{'preview-info':true,'isMargin':(previewList && previewList[2] && previewList[2].attType == 6 && item.attType ==6) || previewList && previewList[1] && previewList[0].attType == 7 && previewList[1].attType ==6 &&item.attType ==6}"
v-for="item in previewList" :key="item.id">
<img class="avatar" src="@/assets/guestCustom/default-customer.png"
v-if="!(hasSixType && hasSevenType) || item.attType !== 7" alt/>
<template v-if="item.attType == 1">
<div class="preview-text text" v-html="item.attContent"></div>
</template>
......@@ -123,7 +126,6 @@ export default {
})
item.attContent = htm
} else if (item.attType != 2 && item.attType != 3 && item.attType != 7) {
// console.log(item.attContent, JSON.parse(item.attContent).fileName)
item.attContent = JSON.parse(item.attContent)
}
})
......@@ -131,7 +133,6 @@ export default {
},
previewVal: {
handler(val) {
console.log(val)
this.previewList = utils.deepClone(val).filter(item => item.attContent)
},
deep: true
......@@ -156,9 +157,10 @@ export default {
</script>
<style lang="scss" scoped>
.isMargin{
.isMargin {
margin-top: -20px;
}
.img-bg {
position: relative;
width: 290px;
......
......@@ -2,73 +2,48 @@
<div class="img-bg">
<div class="preview-content">
<div class="preview-info" v-show="previewListFilter.length">
<img class="avatar" src="@/assets/guestCustom/default-customer.png" alt />
<template v-if="previewListFilter && previewListFilter.length <= 3">
<img class="avatar" src="@/assets/guestCustom/default-customer.png" alt/>
<template>
<div class="preview-box" v-for="item in previewListFilter" :key="item.id">
<div class="preview-box-desc">
<template v-if="item.attType == 1">
<div class="preview-text text" v-html="item.attContent"></div>
</template>
<template v-else-if="item.attType == 7">
<template v-else-if="hasSixType || hasSevenType">
<template v-if="hasSixType && hasSevenType">
<template v-if="item.attType == 6">
<div class="preview-text preview-link">
<img src="@/assets/guestCustom/preview-link.png" alt />
<div>{{item.attContent.marketingName }}</div>
<img src="@/assets/guestCustom/preview-link.png" alt/>
<div>{{ JSON.parse(item.attContent).fileName }}</div>
</div>
</template>
<template v-else-if="item.attType == 6">
<div class="preview-text preview-link">
<img src="@/assets/guestCustom/preview-link.png" alt />
<div>{{JSON.parse(item.attContent).fileName}}</div>
</div>
</template>
<template v-else-if="item.attType == 2" v-for="(imgItem, index) in item.attContent">
<el-image style="width: 52px; height: 52px" class="img-list" :src="imgItem" fit="fit" :key="index" :preview-src-list="item.attContent"></el-image>
</template>
<template v-else-if="item.attType == 3">
<!-- <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image> -->
<div class="video-panel">
<video id="video" width="100%" height="100%" preload loop muted>
<source :src="item.attContent" type="video/mp4" />
</video>
<i
class="el-icon-video-play"
@click="
videoShow = true
videoUrl = item.attContent
"
></i>
<template v-else>
<template v-if="item.attType == 7">
<div class="preview-text preview-link">
<img src="@/assets/guestCustom/preview-link.png" alt/>
<div>{{ item.attContent.marketingName }}</div>
</div>
</template>
</div>
<template v-if="item.attType == 6">
<div class="preview-text preview-link">
<img src="@/assets/guestCustom/preview-link.png" alt/>
<div>{{ JSON.parse(item.attContent).fileName }}</div>
</div>
</template>
<template v-else>
<div class="preview-box" v-for="item in previewListFilter" :key="item.id">
<div class="preview-box-desc">
<template v-if="item.attType == 1">
<div class="preview-text text" v-html="item.attContent"></div>
</template>
<!-- <template v-else-if="item.attType == 7">-->
<!-- <div class="preview-text preview-link">-->
<!-- <img src="@/assets/guestCustom/preview-link.png" alt />-->
<!-- <div>{{item.attContent.marketingName }}</div>-->
<!-- </div>-->
<!-- </template>-->
<template v-else-if="item.attType == 6">
<div class="preview-text preview-link">
<img src="@/assets/guestCustom/preview-link.png" alt />
<div>{{JSON.parse(item.attContent).fileName}}</div>
</div>
</template>
<template v-else-if="item.attType == 2" v-for="(imgItem, index) in item.attContent">
<el-image style="width: 52px; height: 52px" class="img-list" :src="imgItem" fit="fit" :key="index" :preview-src-list="item.attContent"></el-image>
<el-image style="width: 52px; height: 52px" class="img-list" :src="imgItem" fit="fit" :key="index"
:preview-src-list="item.attContent"></el-image>
</template>
<template v-else-if="item.attType == 3">
<!-- <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image> -->
<div class="video-panel">
<video id="video" width="100%" height="100%" preload loop muted>
<source :src="item.attContent" type="video/mp4" />
<source :src="item.attContent" type="video/mp4"/>
</video>
<i
class="el-icon-video-play"
......@@ -105,27 +80,31 @@ const ATT_TYPE = {
ACTIVITY: 7
}
import emoji from '@/utils/emo'
export default {
name: 'Preview',
props: { previewView: Array },
props: {previewView: Array},
data() {
return {
videoShow: false,
previewList: [],
previewListFilter: [],
videoUrl: ''
videoUrl: '',
hasSixType: false,
hasSevenType: false
}
},
watch: {
previewView: {
handler(val) {
const previewVal = this.$common.utils.deepClone(val).filter(item => item)
console.log(previewVal)
this.hasSixType = previewVal.some(item => item.attType == 6)
this.hasSevenType = previewVal.some(item => item.attType == 7)
this.previewListFilter = []
for (let i in previewVal) {
if (previewVal[i].attType == 1) {
const attContent = previewVal[i].attContent
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) {
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) {
let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
......@@ -171,12 +150,14 @@ export default {
.img-list {
margin-right: 3px;
}
.img-bg {
position: relative;
width: 290px;
height: 566px;
background-image: url(../../../../../assets/guestCustom/friend-bg.png);
background-size: 100%;
.preview-content {
position: absolute;
width: 250px;
......@@ -191,9 +172,11 @@ export default {
text-align: center;
margin-bottom: 15px;
}
.preview-info {
padding: 0 0px 20px 9px;
position: relative;
.avatar {
position: absolute;
top: 0px;
......@@ -202,10 +185,12 @@ export default {
height: 26px;
margin-right: 8px;
}
.preview-box {
margin-left: 30px;
width: 180px;
}
.preview-operation {
float: right;
margin-right: 30px;
......@@ -219,6 +204,7 @@ export default {
font-weight: 400;
color: #556993;
}
.video-panel {
width: 100%;
height: 102px;
......@@ -226,9 +212,11 @@ export default {
align-items: center;
justify-content: center;
position: relative;
video {
position: absolute;
}
i {
z-index: 10;
font-size: 20px;
......@@ -236,6 +224,7 @@ export default {
cursor: pointer;
}
}
.preview-text {
font-size: 14px;
position: relative;
......@@ -245,29 +234,34 @@ export default {
word-wrap: break-word;
word-break: break-all;
line-height: 20px;
/deep/ img {
width: 20px;
height: 20px;
vertical-align: middle;
}
}
.text {
width: 100%;
font-size: 12px;
padding: 0px;
margin-bottom: 6px;
}
.preview-link {
padding: 6px 0px;
font-size: 12px;
background: #f7f7f7;
display: flex;
align-items: center;
img {
margin: 0px 12px 0px 5px;
width: 24px;
height: 24px;
}
div {
overflow: hidden;
text-overflow: ellipsis;
......@@ -277,6 +271,7 @@ export default {
-webkit-box-orient: vertical;
}
}
.preview-text::before {
content: '';
position: absolute;
......@@ -287,12 +282,14 @@ export default {
border-color: transparent #fff transparent transparent;
// background-color: cornflowerblue;
}
.preview-applet {
img {
width: 20px;
height: 20px;
margin-right: 4px;
}
&-title {
display: flex;
align-self: center;
......@@ -300,6 +297,7 @@ export default {
margin-bottom: 5px;
}
}
.preview-activity {
width: 160px;
// height: 184px;
......@@ -307,6 +305,7 @@ export default {
border-radius: 4px;
border: 1px solid #dce1e5;
padding: 7px 7px 0;
.activity-name {
font-size: 12px;
color: #333;
......@@ -316,10 +315,12 @@ export default {
overflow: hidden;
white-space: nowrap;
}
.applet-logo {
width: 95px;
height: 24px;
}
.activity-footer {
margin-top: 4px;
border-top: 1px solid #edeff3;
......@@ -328,6 +329,7 @@ export default {
}
}
}
.video-dialog {
z-index: 2001;
position: fixed;
......@@ -337,6 +339,7 @@ export default {
left: 0;
overflow: auto;
background: rgba($color: #000000, $alpha: 0.5);
&-panel {
background: #000000;
position: absolute;
......@@ -348,10 +351,12 @@ export default {
box-sizing: border-box;
padding: 10px 20px 20px;
overflow: hidden;
.video-close {
display: flex;
justify-content: flex-end;
height: 40px;
i {
cursor: pointer;
font-size: 25px;
......
......@@ -71,7 +71,7 @@
</div>
<div class="preview">
<Preview :previewVal="previewList" v-if="editForm.pushChannelType == 1"></Preview>
<!-- <MessagePreview :previewView="previewList" v-if="editForm.pushChannelType == 2"></MessagePreview>-->
<!-- <MessagePreview :previewView="previewList" v-if="editForm.pushChannelType == 2"></MessagePreview>-->
<FriendGroupPreview :previewView="previewList" v-if="editForm.pushChannelType == 3"></FriendGroupPreview>
</div>
</div>
......@@ -594,7 +594,6 @@ export default {
setTimeout(() => {
this.previewList = JSON.parse(JSON.stringify(this.previewList))
})
},
},
......@@ -608,6 +607,7 @@ export default {
},
mounted() {
Object.assign(this.editForm, this.eventObj.info)
this.getStaffTypeList()
this.$nextTick(() => {
......@@ -722,13 +722,13 @@ export default {
let backupContent = typeof (this.editForm.backupContent) == 'string' ? JSON.parse(this.editForm.backupContent) : this.editForm.backupContent
if (backupContent) {
const previewList = backupContent.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
if (item.attType == 7) item.attContent = typeof (item.attContent) == 'string' ? JSON.parse(item.attContent) : item.attContent
return item
})
this.$refs.welcome.updateList(previewList)
} else if (this.editForm.object && this.editForm.object.length != 0) {
const previewList = JSON.parse(this.editForm.backupContent).map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
const previewList = JSON.parse(backupContent).map(item => {
if (item.attType == 7) item.attContent = typeof (item.attContent) == 'string' ? JSON.parse(item.attContent) : item.attContent
return item
})
this.$refs.welcome.updateList(previewList)
......@@ -744,7 +744,7 @@ export default {
handleMarketingContent() {
let params = {}
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
if ((previewList[0] && previewList[0].attType == 1 && previewList[0].attContent == '') || !previewList.length ||(previewList[0] && previewList[0].attType !== 1)) {
if ((previewList[0] && previewList[0].attType == 1 && previewList[0].attContent == '') || !previewList.length || (previewList[0] && previewList[0].attType !== 1)) {
this.hasEventContentDisplaySpecial = true
} else {
this.hasEventContentDisplaySpecial = false
......
......@@ -92,16 +92,16 @@ export default {
// click: row => this.handleEdit('look', row)
// }
// },
// {
// type: 'el-button',
// name: '复制',
// attrs: {
// type: 'text'
// },
// listeners: {
// click: row => this.handleEdit('copy', row)
// }
// },
{
type: 'el-button',
name: '复制',
attrs: {
type: 'text'
},
listeners: {
click: row => this.handleEdit('copy', row)
}
},
{
type: 'el-button',
name: '编辑',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!