Commit bb6de49a by 王志慧

朋友圈需求开发

1 parent 24193971
......@@ -600,6 +600,9 @@ html {
.marketing .mt-10 {
margin-top: 10px;
}
.marketing .pd-20 {
padding: 0 20px;
}
.el-tooltip__popper.is-light {
background: #ffffff;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08);
......@@ -720,3 +723,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;
}
}
}
}
......@@ -11,9 +11,9 @@ export const fetchConfig = function(isEnv = true) {
// }
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=marketing').then(res => res.data)
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
}
export const config = {
install(vue, cfg) {
......
<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">
数据统计
<span class="info-refresh" @click="handleRefresh">
<i :class="{ 'el-icon-refresh': true, 'wait-status': refreshStatus }"></i>
更新数据
</span>
<span class="info-time">更新于:{{ this.updatedTime }}</span>
<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>
</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.sendStaffCount }}</span>
</div>
<div class="statistics-text">互动客户/人</div>
<div class="statistics-ratio">互动率:78.35%</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.unSendStaffCount }}</span>
</div>
<div class="statistics-text">点赞客户/人</div>
<div class="statistics-ratio">互动率:78.35%</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.unSendStaffCount }}</span>
</div>
<div class="statistics-text">评论客户/人</div>
<div class="statistics-ratio">互动率:78.35%</div>
</div>
</div>
</div>
......@@ -133,7 +177,10 @@ export default {
// }
},
methods: {
handleRefresh: utils.debounce(function() {
getStatistics(value) {
this.$emit('getStatistics', value)
},
handleRefresh: utils.debounce(function () {
this.publicStatus()
this.refreshStatus = true
setTimeout(() => {
......@@ -212,41 +259,74 @@ 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;
.info-refresh {
font-size: 14px;
color: #5850ff;
cursor: pointer;
margin-left: 20px;
.wait-status {
transition: all ease-in 1s;
transform: rotate(360deg);
}
}
.info-time {
font-size: 14px;
color: #7d7d7d;
margin-left: 10px;
}
padding-left: 20px;
box-sizing: border-box;
}
.detail-content {
display: flex;
align-items: flex-end;
// align-items: flex-end;
justify-content: space-between;
box-sizing: border-box;
width: 100%;
height: 100%;
padding: 20px 24px 40px 0;
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: 8px;
.wait-status {
transition: all ease-in 1s;
transform: rotate(360deg);
}
}
.info-time {
font-size: 14px;
color: #666666;
margin-left: 10px;
font-weight: 400;
}
}
.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 +335,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 +385,6 @@ export default {
background: #f7f7f7;
border: 1px solid #d8d8d8;
min-width: 325px;
.name {
display: inline-block;
width: 68px;
......@@ -314,22 +394,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 +417,6 @@ export default {
width: 142px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
&.statistics-border {
margin-right: 0;
......@@ -347,12 +426,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 +450,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;
......
<template>
<div>
<BasicInof :id="$route.query.id" :form="'customer'" @refreshList="refreshList"></BasicInof>
<BasicInof :id="$route.query.id" :form="'customer'" @refreshList="refreshList" @getStatistics="getStatistics"></BasicInof>
<div class="detail-container">
<div class="detail-modular">
<div class="title">成员详情</div>
......@@ -12,7 +12,7 @@
</el-menu>
<GLTable style="margin-top: 20px" ref="table" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :hasPage="false" :pageConf="pageConf">
<div class="table-btns" slot="customerCount" slot-scope="scope">
<span class="customer-detail" @click="handleCustomer(scope.scope.id)" v-if="scope.scope.customerCount">{{ scope.scope.customerCount }}</span>
<span class="customer-detail" @click="handleCustomer(scope.scope.id, 4)" v-if="scope.scope.customerCount">{{ scope.scope.customerCount }}</span>
<span v-else>{{ scope.scope.customerCount }}</span>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
......@@ -31,7 +31,7 @@
>
<el-button type="primary" @click="handleCancel">取消</el-button>
</div> -->
<el-dialog title="已送达客户" :visible.sync="dialogVisible" width="576px" :before-close="handleClose" class="user-dialog">
<!-- <el-dialog title="已送达客户" :visible.sync="dialogVisible" width="576px" :before-close="handleClose" class="user-dialog">
<div class="user-list">
<div class="user-item" v-for="(item, index) in userList" :key="index">
<div class="user-image">
......@@ -43,20 +43,43 @@
</div>
</div>
</div>
</el-dialog>
</el-dialog> -->
<el-drawer class="drawerWrap marketing" :title="infoTitle" :visible.sync="dialogVisible" direction="rtl" :before-close="handleClose">
<div class="gl-form-page">
<el-form :inline="true" :model="drawerSearchForm" size="small" class="demo-form-inline">
<el-form-item label="是否互动:">
<el-select v-model="drawerSearchForm.region" placeholder="">
<el-option label="是" value="shanghai"></el-option>
<el-option label="否" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>
</div>
<div class="flex-between m-b-10 m-t-10 pd-20">
<div class="text-16 color-3 weight-6">客户列表</div>
<div class="export" @click="handleExport">导出</div>
</div>
<GLTable class="pd-20" refs="drawerRef" :tableData="userList" :searchForm="drawerSearchForm" :tableParams="drawerTableParams" :hasPage="false" :pageConf="pageConf"></GLTable>
</el-drawer>
</div>
</template>
<script>
import Vue from 'vue'
import BasicInof from './components/basicInfo.vue'
import { exportFn } from '@/common/constant'
export default {
components: {
BasicInof
},
data() {
return {
activeName: '1',
infoTitle: '已送达客户',
userList: [],
dialogVisible: false,
dialogVisible: true,
activeIndex: '',
customIndex: '',
employeelist: [],
......@@ -95,13 +118,44 @@ export default {
}
},
{
label: '已送达客户',
label: '已发送客户',
prop: 'customerCount',
addHtml: 'customerCount'
// formatter: cellValue => {
// return new Date(cellValue.createdDate).toLocaleDateString().replace(/\//g, '-')
// }
},
{
label: '互动客户',
prop: 'sendStaffCount',
width: '110'
},
{
label: '互动率',
prop: 'sendStaffCount',
width: '110'
},
{
label: '点赞客户',
prop: 'unSendStaffCount',
width: '110'
},
{
label: '点赞率',
prop: 'copyCustomerCount',
width: '110'
},
{
label: '评论客户',
prop: 'copyCustomerCount',
width: '110'
},
{
label: '评论率',
prop: 'copyCustomerCount',
width: '110'
},
{
label: '操作',
prop: 'optionBtns',
......@@ -110,6 +164,108 @@ export default {
}
]
},
searchFormData: [
{
label: '发布方式',
name: 'sendType',
type: 'select',
placeholder: '请选择',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'interactionList'
}
],
drawerSearchForm: {},
tableData: [],
drawerTableParams: {
tableColumns: []
},
tableColumns: [
{
label: '送达客户',
prop: 'staffName',
filter: '1,2,4'
},
{
label: '评论客户',
prop: 'staffName',
filter: '3'
},
{
label: '是否互动',
prop: 'status',
formatter: cellValue => {
return {
0: '未发送',
1: '已发送',
2: '发送失败'
}[cellValue.status]
},
filter: '1,2,3,4'
},
{
label: '累计点赞次数',
prop: 'sendTime',
filter: '1'
},
{
label: '累计评论次数',
prop: 'customerCount',
filter: '1'
},
{
label: '员工',
prop: 'sendStaffCount',
width: '110',
filter: '2,3'
},
{
label: '点赞时间',
prop: 'sendStaffCount',
filter: '2'
},
{
label: '评论时间',
prop: 'sendStaffCount',
filter: '3'
},
{
label: '评论内容',
prop: 'sendStaffCount',
filter: '3'
},
{
label: '最近点赞时间',
prop: 'sendStaffCount',
filter: '4'
},
{
label: '评论次数',
prop: 'unSendStaffCount',
width: '110',
filter: '4'
},
{
label: '最近评论时间',
prop: 'copyCustomerCount',
width: '110',
filter: '4'
}
],
baseData: {
interactionList: [
{
confId: '1',
confName: '是'
},
{
confId: '2',
confName: '否'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
getListApi: this.$apis.friendGroup.momentStaff,
footerLeft: 0,
......@@ -127,6 +283,19 @@ export default {
this.boxHeight = clientHeight - 200
},
methods: {
handleExport(row) {
var params = this.getParams()
// memberExportApi(params).then(res => {
// exportFn(res)
// })
},
handleSearch() {
this.$refs.drawerRef.refreshTable()
},
handleReset() {
this.drawerSearchForm = {}
this.handleSearch()
},
handleSelect(val) {
this.searchForm.status = val
this.$refs.table.refreshTable()
......@@ -158,11 +327,24 @@ export default {
})
}
},
handleCustomer(id) {
initParams() {
this.drawerTableParams.tableColumns = this.tableColumns.filter(item => {
return !item.filter || item.filter.indexOf(this.activeName) != -1
})
},
getStatistics(value) {
this.activeName = value
this.initParams()
this.dialogVisible = true
},
handleCustomer(id, value) {
this.activeName = value
this.$apis.friendGroup.momentStaffCustomers({ id }).then(res => {
if (res) {
this.initParams()
this.dialogVisible = true
this.userList = res
console.log(this.userList)
}
})
},
......@@ -191,6 +373,9 @@ export default {
remindUserGroup() {
const id = this.$route.params.id
this.$apis.friendGroup.remindUserGroup({ id, type: 1 }).then(res => {})
},
handleClose() {
this.dialogVisible = false
}
}
}
......@@ -423,4 +608,18 @@ export default {
margin-bottom: 30px;
}
}
.drawerWrap {
.export {
height: 32px;
border-radius: 4px;
border: 1px solid #5850ff;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 14px;
padding: 9px 20px;
box-sizing: border-box;
cursor: pointer;
}
}
</style>
......@@ -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.updatedTime }}</span>
<span class="info-refresh" @click="handleRefresh">
<i :class="{ 'el-icon-refresh': true, 'wait-status': refreshStatus }"></i>
更新数据
刷新数据
<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">
......@@ -241,20 +244,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 +278,21 @@ export default {
label: '已送达客户',
prop: 'copyCustomerCount',
width: '110'
},
{
label: '互动客户',
prop: 'sendStaffCount',
width: '110'
},
{
label: '点赞客户',
prop: 'unSendStaffCount',
width: '110'
},
{
label: '评论客户',
prop: 'copyCustomerCount',
width: '110'
}
]
},
......@@ -313,7 +331,7 @@ export default {
},
methods: {
handleRefresh: utils.debounce(function() {
handleRefresh: utils.debounce(function () {
this.createStatus()
this.refreshStatus = true
setTimeout(() => {
......@@ -517,15 +535,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 +581,8 @@ export default {
font-size: 14px;
margin-left: 10px;
font-weight: 100;
// display: inline-block;
// width: 80%;
}
}
.attachmentList-box {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!