Commit eb32bc5f by 杨明

fixed

1 parent ae2c20b2
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
const findAllByPage = params => {
params.method = 'entmicro.api.dracIm.findAllByPage'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//活动配置详情
const activityDetail = params => {
params.method = 'marketing.api.activity.config.detail'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//活动配置列表
const activityPage = params => {
params.method = 'marketing.api.activity.config.page'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//活动配置创建
const activityInsert = params => {
params.method = 'marketing.api.activity.config.insert'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//活动配置创建
const activityGroupList = params => {
params.method = 'marketing.api.activity.config.group.list'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//活动配置创建
const machetes = params => {
params.method = 'marketing.api.activity.customer.machetes'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//活动配置编辑
const activityUpdate = params => {
params.method = 'marketing.api.activity.config.update'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//查询活动列表
const activityPageList = params => {
params.method = 'marketing.api.activity.activityPage'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//查询活动客户列表
const activityCustomerPage = params => {
params.method = 'marketing.api.activity.activityCustomerPage'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//分配客户
const assignmentCustomer = params => {
params.method = 'marketing.api.activity.assignmentCustomer'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//活动配置编辑
const queryCrowdGroupTree = params => {
params.method = 'scrm.api.datahub.crowdgroup.queryCrowdGroupTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
findAllByPage,
activityDetail,
activityPage,
activityPageList,
activityCustomerPage,
assignmentCustomer,
activityInsert,
activityUpdate,
queryCrowdGroupTree,
activityGroupList,
machetes
}
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
const getStaffList = params => {
params.method = 'entmicro.api.staff.findStaffByMerchantId'
return http({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
const listDepartmentTree = params => {
params.method = 'entmicro.api.department.listDepartmentTree'
return http({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
const queryCrowdTree = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getStaffList,
listDepartmentTree,
queryCrowdTree
}
......@@ -66,7 +66,7 @@ html {
}
.ellipsis-2-text:after {
content: '...';
content: "...";
position: absolute;
bottom: 0;
right: 15px;
......@@ -120,7 +120,7 @@ html {
.marketing .edit-container {
// margin-bottom: 84px;
// min-height: calc(100vh - 156px);
// min-height: calc(100vh - 156px);
margin-bottom: 16px;
}
.marketing .approval-container {
......@@ -300,7 +300,7 @@ html {
}
.marketing .m-l-10 {
margin-left: 10px;
margin-left: 10px;
}
.marketing .m-l-20 {
......@@ -583,7 +583,7 @@ html {
font-weight: 400;
}
.marketing .mt-10 {
margin-top:10px;
margin-top: 10px;
}
.el-tooltip__popper.is-light {
background: #ffffff;
......@@ -592,10 +592,10 @@ html {
width: 177px;
box-sizing: border-box;
}
.el-tooltip__popper[x-placement^='top'] .popper__arrow {
.el-tooltip__popper[x-placement^="top"] .popper__arrow {
border-top-color: #e4e7ed !important;
}
.el-tooltip__popper[x-placement^='top'] .popper__arrow:after {
.el-tooltip__popper[x-placement^="top"] .popper__arrow:after {
border-top-color: #e4e7ed !important;
}
/* tab */
......@@ -652,3 +652,6 @@ html {
color: #5850ff !important;
}
}
.scrm-box-f {
background: #ffffff;
}
......@@ -231,5 +231,20 @@ function setMinHeight(calssName = '.edit-container') {
let minHeight = 'calc(100vh - ' + height + ')'
document.querySelector(calssName).style.minHeight = minHeight
}
export { limitPrice, getExplorer, exportFn, aToExport, downloadIamge, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, setMinHeight }
function isShowBtn(value) {
let isShowStatus = false
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menuLevel(menu)
function menuLevel(item) {
item.forEach(itm => {
if (itm.path == value) {
isShowStatus = true
}
if (itm.children) {
menuLevel(itm.children)
}
})
}
return isShowStatus
}
export { isShowBtn, limitPrice, getExplorer, exportFn, aToExport, downloadIamge, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, setMinHeight }
......@@ -11,7 +11,7 @@
let cfg = require('./conf.js')
import { Http } from 'glsx-common'
let timeout = 30000 //超时时间
export const fetchConfig = function (isEnv = true) {
export const fetchConfig = function(isEnv = true) {
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
......@@ -19,7 +19,7 @@ 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.dev.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')
}
......
export default {
data() {
return {
crowdGroupUnitList: []
}
},
mounted() {},
methods: {
async queryCrowdGroupTree(isHead) {
let params = {
req: {
pageSize: 1000,
pageNum: 1,
merchantId: this.$globalState.session.merchantId,
keyword: ''
}
}
const crowdGroupUnitList = await this.$apis.activity.queryCrowdGroupTree(params)
console.log(crowdGroupUnitList)
return isHead ? [{ crowdGroupName: '默认客群', crowdGroupId: '0' }].concat(crowdGroupUnitList.crowdGroupUnitList) : crowdGroupUnitList.crowdGroupUnitList
},
async queryCrowdTree() {
const commonParam = { pageSize: 1000, pageNum: 1, merchantId: this.$globalState.session.merchantId }
const params1 = {
req: {
crowdType: 1,
...commonParam
}
}
const params2 = {
req: {
...commonParam,
crowdType: 2
}
}
const crowdUnitList1 = this.$apis.activity.queryCrowdTree(params1)
const crowdUnitList2 = this.$apis.activity.queryCrowdTree(params2)
const crowdUnitList = await Promise.all([crowdUnitList1, crowdUnitList2])
/*
groupArr: 勾选的人群
checked: 是否展开
isIndeterminateGroup:树节点选中
gruopCheckAll: 全选
selectGroup:右边树的选中数据
*/
this.crowdUnitList = [
{ crowdName: '推荐人群', children: crowdUnitList[0] },
{ crowdName: '自定义人群', children: crowdUnitList[1] }
]
return this.crowdUnitList
}
}
}
<template>
<div class="activity-main">
<el-drawer class="activity-drawer" size="50%" title="配置企微营销" :visible.sync="drawer" :before-close="handleClose">
<div class="market-container">
<div v-if="title || $slots.title">
<slot name="title">{{ title }}</slot>
</div>
<div class="market-title">营销内容</div>
<div class="market-content" v-if="drawer">
<GLEditor ref="welcome" :form="'customer'" :btnList="btnList" @previewWord="previewForm"></GLEditor>
</div>
</div>
<div class="drawer-btn">
<el-button @click="drawer = false" size="small">
取消
</el-button>
<el-button type="primary" @click="handleSaveConfig" size="small">提交</el-button>
</div>
</el-drawer>
</div>
</template>
<script>
const ATT_TYPE = {
TEXT: 1,
IMAGE: 2,
VEDIO: 3,
URL: 4,
MINIPROGRAM: 5,
FILE: 6,
ACTIVITY: 7,
MATERIAL: 10
}
export default {
name: 'marketConfig',
props: {
title: {
type: String,
default: ''
},
boxHeight: {
type: Number,
default: 200
}
},
data() {
return {
drawer: false,
welcomeStatus: false,
btnList: [
{
name: '表情',
funcName: '',
type: 'expression',
limitSize: 10
},
{
name: '图片',
funcName: '',
type: 'img',
// togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
// limitSize: 10, //限制图片大小
// limitNum: 2, //限制图片数量
// limitWidth: 10000, //限制单张图片宽度
// limitHeight: 10000,//限制单张图片高度
// Isdraggable: true, //图片拖拽
uploadApi: this.$apis.common.pictureUpload
},
// {
// name: '视频',
// funcName: '',
// type: 'video',
// // limitSize: 10,//限制视频大小
// // togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
// // limitNum: 2,//限制视频数量
// // limitWidth: 10000,//限制视频宽度
// // limitHeight: 10000,//限制视频高度
// // limitTime: 2,//限制视频时长
// uploadApi: this.$apis.common.pictureUpload
// },
// {
// name: '昵称',
// type: 'nickname',
// funName: 'nickname'
// },
{
name: '活动',
type: 'activity',
funName: 'activity',
funParams: [
{
itemName: '权益卡试用',
itemValue: 3,
itemType: 'card',
getInterfaceApi: this.$apis.welcomeword.getCard,
params: {
tryAble: 1,
merchantId: this.$globalState.session.merchantId
}
},
{
itemName: '权益套餐',
itemValue: 4,
itemType: 'package',
getInterfaceApi: this.$apis.welcomeword.getPackage,
params: {}
},
{
itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid'
}
},
{
itemName: '秒杀活动',
itemValue: 5,
itemType: 'activity',
getInterfaceApi: this.$apis.welcomeword.getActivity,
params: {
activityStatus: 2,
currentPage: 1
}
},
{
itemName: '无忧服务',
itemValue: 6,
itemType: 'merchant',
getInterfaceApi: this.$apis.welcomeword.merchant,
merchantOpen: {
merchantOpenApi: this.$apis.welcomeword.merchantOpen,
params: {
merchantId: this.$globalState.session.merchantId
}
},
params: {
merchantId: this.$globalState.session.merchantId
}
}
]
},
// {
// name: '质保卡',
// type: 'link',
// funName: 'link',
// text: '车主朋友,您好!<br>我是您的福利官,欢迎您领取电子质保卡,<br>请点击下方链接进行领取及查看:<br><span style="color:#409eff;">https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/</span><br>祝您用车愉快!<br>'
// },
// {
// name: '素材',
// type: 'material',
// funName: 'material',
// groupListApi: this.$apis.welcomeword.getGroupListApi,
// materialListApi: this.$apis.welcomeword.getMaterialListApi,
// // videoNo: true
// pdfNo: true
// },
{
name: '模板',
type: 'message',
funName: 'message',
getSearchApi: this.$apis.welcomeword.createdNameList,
templateApi: this.$apis.welcomeword.templatePage,
templateUpdateApi: this.$apis.welcomeword.templateUpdate,
templateSaveApi: this.$apis.welcomeword.templateSave,
templateDetailApi: this.$apis.welcomeword.templateDetail
}
]
}
},
watch: {
drawer(val) {
if (!val) {
let previewList = this.$refs.welcome.previewList
previewList.map(item => {
if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
})
this.$emit('handleConfigChecked', previewList)
}
}
},
methods: {
init(previewList) {
this.drawer = true
this.$nextTick(() => {
previewList.map(item => {
if (item.attType == 7) {
item.attContent = JSON.parse(item.attContent)
}
})
this.$refs.welcome.updateList(previewList)
})
},
handleSaveConfig() {
this.drawer = false
}
}
}
</script>
<style lang="scss" scoped>
.activity-drawer {
z-index: 3000 !important;
/deep/ .el-drawer__header {
border-bottom: 1px solid #e6e6e6;
padding: 18px 20px;
margin-bottom: 20px;
}
}
.market-container {
padding: 0px 20px 20px;
height: calc(100% - 64px);
}
.market-title {
font-size: 16px;
font-weight: 400;
color: #333333;
line-height: 24px;
margin-bottom: 10px;
}
.drawer-btn {
display: flex;
align-items: center;
justify-content: flex-end;
padding-right: 20px;
height: 64px;
border-top: 1px solid #e6e6e6;
}
</style>
<style>
.el-select-dropdown {
z-index: 3001 !important;
}
</style>
<template>
<div class="activity-main">
<div class="activity-main-header">
活动管理
<label>系统将自动推送基于门店重点招揽人群的活动清单,门店可将客户批量分配给指定员工进行跟进。</label>
</div>
<div class="activity-tabel scrm-box-f">
<div class="activity-tabel-form">
<GLCombiForm :rowNumber="1" ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable @setTableFinishFun="setTableFinishFun" :noDataImg="url" ref="taskForm" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDistribution(scope.scope)">任务分配</el-button>
<!-- <GLButton :disabled="scope.scope.imStatus!=1" type="text" @click="handleStatistics(scope.scope)" fn="营销统计">营销统计</GLButton> -->
</div>
</GLTable>
</div>
</div>
</div>
</template>
<script>
import url from '@/assets/activity/empty.png'
import crowd from '@/mixins/crowd'
export default {
name: 'activity',
mixins: [crowd],
data() {
return {
url: url,
tableSearchForm: {
groupTypeId: '',
activityName: '',
createTime: ''
},
searchFormData: [
{
label: '人群类型',
name: 'groupTypeId',
type: 'select',
placeholder: '请选择',
optionId: 'crowdGroupId',
optionLabel: 'crowdGroupName',
optionList: []
},
{
label: '活动名称',
name: 'activityName',
type: 'input',
placeholder: '输入关键字搜索'
},
{
label: '创建时间',
name: 'createTime',
type: 'datePicker',
placeholder: '',
isClear: true,
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
}
}
],
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
},
createTime: '',
dialogVisible: true,
getListApi: this.$apis.activity.activityPageList,
tableParams: {
tableOption: false,
checkSelectKey: 'id',
checkSelectVal: [],
hasNum: false,
listName: 'data',
tableColumns: [
{
label: '活动名称',
prop: 'activityName',
width: 300,
line: 1
},
{
label: '人群类型',
prop: 'groupTypeIdName',
width: 200,
line: 1
},
{
label: '客户总数',
prop: 'customerCount'
},
{
label: '已跟进',
prop: 'followCustomerCount'
},
{
label: '已到店',
prop: 'retCustomerCount'
},
{
label: '创建日期',
prop: 'createdTime',
width: '220px'
},
{
label: '操作',
prop: 'optionBtns',
width: '90px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: []
}
}
},
async mounted() {
this.searchFormData.find(item => (item.name = 'groupTypeId')).optionList = await this.queryCrowdGroupTree(1)
},
methods: {
handleSearch() {
this.$refs.taskForm.refreshTable()
},
handleReset() {
this.tableSearchForm = {}
this.$refs.taskForm.refreshTable()
},
beforeSearchFn() {
return new Promise(resolve => {
if (this.tableSearchForm.createTime) {
this.tableSearchForm.startTime = new Date(this.tableSearchForm.createTime[0]).toLocaleDateString().replace(/-/g, '/')
this.tableSearchForm.endTime = new Date(this.tableSearchForm.createTime[1]).toLocaleDateString().replace(/-/g, '/')
} else {
delete this.tableSearchForm.startTime
delete this.tableSearchForm.endTime
}
delete this.tableSearchForm.createTime
resolve()
})
},
setTableFinishFun() {
this.$refs.taskForm.data.length ? (this.$refs.taskForm.tableHeightValues = '') : this.$refs.taskForm.setTableHeightFun()
},
handleDistribution(scope) {
this.$router.push('/activity/distribution?id=' + scope.id)
}
}
}
</script>
<style lang="scss" scoped>
.activity-main-header {
font-size: 20px;
color: #333333;
line-height: 32px;
font-weight: 600;
label {
font-size: 14px;
color: #666666;
line-height: 32px;
font-weight: 400;
margin-left: 16px;
}
img {
width: 14px;
height: 14px;
margin-top: 8px;
}
}
.dialog-wrap-box {
z-index: 2001;
position: fixed;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
background: rgba(0, 0, 0, 0.5);
.dialog-wrap-panel {
background: #ffffff;
position: absolute;
top: 50%;
left: 10%;
transform: translateY(-50%);
height: 360px;
width: 80%;
.dialog-wrap-items {
position: relative;
display: flex;
width: 100%;
height: 360px;
.footer-btn {
cursor: pointer;
position: absolute;
bottom: -50px;
left: 50%;
text-align: center;
width: 120px;
margin-left: -60px;
height: 34px;
line-height: 34px;
background: #5850ff;
border-radius: 4px;
font-size: 14px;
color: #ffffff;
}
}
.dialog-wrap-item {
padding: 30px;
width: 33.33%;
text-align: center;
border-right: 1px solid #eeeeee;
.dialog-item-title {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 22px;
}
img {
width: 200px;
height: auto;
margin: 20px;
}
.dialog-item-content {
font-size: 14px;
width: 240px;
margin: 0 auto;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
}
}
.activity-title {
font-size: 20px;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
img {
width: 14px;
height: 14px;
margin-top: 5px;
}
}
.activity-num-box {
height: 102px;
margin: 20px 0px;
background: #ffffff;
display: flex;
.activity-num-item {
width: 33.33%;
padding-left: 20px;
.activity-num-title {
margin-top: 20px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
}
.activity-num-count {
font-size: 30px;
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
line-height: 38px;
}
}
}
.coustom-box {
margin-top: 20px;
display: flex;
&-item {
box-sizing: border-box;
width: 25%;
margin-right: 20px;
padding: 20px;
height: 334px;
background: #ffffff;
text-align: center;
&:last-child {
margin-right: 0px;
}
.coustom-box-title {
font-size: 20px;
font-weight: 500;
color: #424242;
line-height: 28px;
letter-spacing: 1px;
margin: 10px;
}
.coustom-echart {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
.coustom-echart-desc {
margin-left: 10px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
.coustom-echart-num {
font-size: 20px;
}
}
}
.coustom-box-content {
font-size: 14px;
font-weight: 500;
color: #a3a3a3;
line-height: 20px;
text-align: left;
height: 110px;
}
.coustom-box-config {
margin: 10px auto;
display: inline-block;
border-radius: 4px;
border: 1px solid #5850ff;
padding: 7px 28px;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 14px;
}
}
}
.activity-tabel {
padding: 20px;
margin-top: 20px;
/deep/ {
.el-date-editor.el-input,
.el-date-editor.el-input__inner {
// width: 220px;
}
.el-form-item {
margin-right: 20px;
}
.noDataImg {
width: 400px;
height: 160px;
}
}
}
</style>
<template>
<div class="ly-emotion">
<slot></slot>
</div>
</template>
<script>
import emoji from '@/utils/emo'
export default {
name: 'ly-emotion',
mounted() {
const name = this.$el.innerHTML
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(name)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
let imgHTML = `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
this.$nextTick(() => {
this.$el.innerHTML = imgHTML
})
}
}
</script>
<style scoped>
.ly-emotion {
display: inline-block;
}
.ly-static-emotion {
width: 24px;
height: 24px;
display: inline-block;
}
</style>
......@@ -68,7 +68,7 @@
</div>
</div>
</div>
<Preview :eventBus="eventBus" :list.sync="basicInfo.attachmentList"></Preview>
<Preview :previewView="previewView" :list.sync="basicInfo.attachmentList"></Preview>
</div>
</div>
</template>
......@@ -98,6 +98,7 @@ export default {
},
data() {
return {
previewView: '',
updatedTime: '',
refreshStatus: false,
STATUS_TYPE: STATUS,
......@@ -153,33 +154,34 @@ export default {
// }
return item
})
this.previewView = previewList
//图片合并
let previewListFilter = previewList.map(item => {
return {
attContent: [item.attContent],
attType: item.attType
}
})
previewListFilter = previewListFilter.reduce((prev, cur) => {
let index = prev.findIndex(item => item.attType == 2)
if (index != -1 && prev.length) {
const prevArr = prev.map(tag => {
let attContent
if (tag.attType == 2) {
attContent = tag.attContent.concat(cur.attContent)
} else {
attContent = tag.attContent
}
return {
attType: tag.attType,
attContent
}
})
return prevArr
}
return prev.concat(cur)
}, [])
this.eventBus.$emit('update', previewListFilter)
// let previewListFilter = previewList.map(item => {
// return {
// attContent: [item.attContent],
// attType: item.attType
// }
// })
// previewListFilter = previewListFilter.reduce((prev, cur) => {
// let index = prev.findIndex(item => item.attType == 2)
// if (index != -1 && prev.length) {
// const prevArr = prev.map(tag => {
// let attContent
// if (tag.attType == 2) {
// attContent = tag.attContent.concat(cur.attContent)
// } else {
// attContent = tag.attContent
// }
// return {
// attType: tag.attType,
// attContent
// }
// })
// return prevArr
// }
// return prev.concat(cur)
// }, [])
// this.eventBus.$emit('update', previewListFilter)
})
},
getStatistic() {
......
<!-- 查看产品 - 评价信息 -->
<template>
<div class="comment-detail container edit-container">
<div style="padding: 20px">
<!-- 表格区域 开始 -->
<GLTable ref="commentRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="starLevel" slot-scope="scope">
<img v-for="(item, index) in scope.scope.starLevel" :key="index" class="icon-star" src="@/assets/icon-star.png" />
</div>
<div slot="goodsImage" class="table-image" slot-scope="scope">
<span v-if="!scope.scope.imgUrls">-</span>
<img v-else class="img-60" :src="scope.scope.imgUrls[0]" @click="handleImgLook(scope.scope.imgUrls)" />
</div>
</GLTable>
<el-dialog v-if="isImgVisible" title="查看" :visible.sync="isImgVisible" :close-on-click-modal="false">
<div class="dialog-look">
<span v-for="(item, index) in dialogObj.imgUrls" :key="index">
<el-image style="width: 200px; height: 200px; margin-right: 10px" :src="item" :preview-src-list="[item]"></el-image>
</span>
</div>
</el-dialog>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'commentDetail',
data() {
return {
size: 'small',
url: url,
searchForm: {
goodsId: ''
},
isImgVisible: false,
// imgUrls: [],,
dialogObj: {
imgUrls: [],
uploadType: 'img'
},
// 表格
getListApi: this.$apis.proManage.getGoodsCommentListApi,
tableParams: {
listName: 'list',
tableColumns: [
{
label: '评价用户名称',
prop: 'customerName'
},
{
label: '评价时间',
prop: 'createdDateStr'
},
{
label: '评价星级',
prop: 'starLevel',
addHtml: 'starLevel'
},
{
label: '评价内容',
prop: 'commentContent',
line: 3
},
{
label: '图片',
prop: 'goodsImage',
addHtml: 'goodsImage'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
props: {
goodsId: {
type: Object,
default: () => {}
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm.goodsId = this.goodsId
resolve()
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.commentRef.data.length ? (this.$refs.commentRef.tableHeightValues = '') : this.$refs.commentRef.setTableHeightFun()
},
handleImgLook(imgUrls) {
this.isImgVisible = !this.isImgVisible
this.dialogObj = {
imgUrls: imgUrls,
uploadType: 'img'
}
}
}
}
</script>
<style></style>
<template>
<div>
<div class="emotion-box" :style="{ height: height + 'px' }">
<div class="emotion-box-line" v-for="(line, i) in list" :key="i">
<emotion class="emotion-item" v-for="(item, i) in line" :key="i" @click.native="clickHandler(item)">{{ item }}</emotion>
</div>
</div>
</div>
</template>
<script>
import emoji from '@/utils/emo'
import Emotion from './Emotion'
export default {
props: {
height: {
type: Number,
default: 200
}
},
data() {
return {
list: emoji
}
},
methods: {
clickHandler(i) {
let emotion = `${i}`
this.$emit('emotion', emotion)
}
},
components: {
Emotion
}
}
</script>
<style scoped lang="scss">
.emotion-box {
z-index: 2004;
background-color: #fff;
border-radius: 2px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
width: 300px;
box-sizing: border-box;
padding: 5px;
overflow: hidden;
overflow-y: auto;
}
.emotion-box-line {
display: flex;
}
.emotion-item {
flex: 1;
text-align: center;
cursor: pointer;
line-height: 23px;
/deep/ {
img {
width: 24px;
-webkit-user-select: none;
cursor: default;
pointer-events: none;
}
}
}
</style>
<template>
<div class="img-bg">
<div class="preview-content">
<div class="preview-info" v-show="previewList.length">
<div class="preview-info" v-show="previewListFilter.length">
<img class="avatar" src="@/assets/guestCustom/default-customer.png" alt />
<div class="preview-box" v-for="item in previewList" :key="item.id">
<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[0]"></div>
<div class="preview-text text" v-html="item.attContent"></div>
</template>
<template v-else-if="item.attType == 7">
<div class="preview-text preview-link">
......@@ -14,20 +14,20 @@
<div>{{ item.attContent[0].marketingName }}</div>
</div>
</template>
<template v-else-if="item.attType == 2 && !previewList.map(k => k.attType).includes(3)" v-for="(imgItem, index) in item.attContent">
<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[0]" type="video/mp4" />
<source :src="item.attContent" type="video/mp4" />
</video>
<i
class="el-icon-video-play"
@click="
videoShow = true
videoUrl = item.attContent[0]
videoUrl = item.attContent
"
></i>
</div>
......@@ -60,7 +60,7 @@ const ATT_TYPE = {
import emoji from '@/utils/emo'
export default {
name: 'Preview',
props: { eventBus: Object },
props: { previewView: Array },
data() {
return {
videoShow: false,
......@@ -70,48 +70,53 @@ export default {
}
},
watch: {
previewList(val) {
console.log(val)
if (val.length && val[0].attType == 1) {
const attContent = val[0].attContent[0]
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
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
previewView: {
handler(val) {
const previewVal = this.$common.utils.deepClone(val).filter(item => item)
console.log(previewVal)
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) {
let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
return `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
})
this.previewListFilter.push({
attType: 1,
attContent: htm
})
} else if (previewVal[i].attType == 2) {
const pindex = this.previewListFilter.findIndex(item => item.attType == 2)
if (pindex == -1) {
this.previewListFilter.push({
attType: 2,
attContent: [previewVal[i].attContent]
})
} else {
this.previewListFilter[pindex].attContent.push(previewVal[i].attContent)
}
} else {
this.previewListFilter.push({
attType: previewVal[i].attType,
attContent: previewVal[i].attContent
})
}
return `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
}
this.$nextTick(() => {
this.previewListFilter = this.previewListFilter.filter(item => item)
})
val[0].attContent[0] = htm
}
//图片合并
// const previewListFilter = val.map(item=>{
// return {
// attContent: [item.attContent],
// attType: item.attType
// }
// })
// this.previewListFilter = previewListFilter.reduce((prev, cur) => {
// let index = prev.find(item=>item.attType == ATT_TYPE.IMAGE)
// if(index != -1 && prev.length) {
// return prev[index].attContent.concat(cur.attContent)
// }
// return prev.concat(cur)
// },[])
// console.log(this.previewListFilter)
},
deep: true
}
},
created() {
this.eventBus.$on('update', val => {
setTimeout(() => {
this.previewList = val
}, 100)
})
},
mounted() {}
}
}
</script>
......
<template>
<div class="select-emp-panel">
<div class="scrm-p10 emp-tree-panel">
<div class="popper-arrow"></div>
<div
class="emp-scroll-panel"
:style="{
height: treeHeight + 'px'
}"
>
<div class="tree-title">所在门店/部门</div>
<el-tree v-loading="loading" :data="listTree" :expand-on-click-node="false" highlight-current :props="defaultProps" @node-click="handleNodeClick"></el-tree>
</div>
</div>
<el-col
class="scrm-p10 emp-table-panel"
:style="{
height: treeHeight + 20 + 'px'
}"
>
<GLTable v-loading="loading" ref="saleTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" @selectionTable="selectionTable"></GLTable>
</el-col>
</div>
</template>
<script>
export default {
name: 'selectEmp',
props: ['selectData', 'islord'],
data() {
return {
treeHeight: 0,
staffName: '',
listTree: [],
defaultProps: {
children: 'children',
label: 'departmentName'
},
// 表格参数
tableParams: {
checkSelectKey: 'id',
checkSelectVal: [],
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'id',
// 多选ref的名称
mutiSelectName: 'salelist',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '职务',
prop: 'staffTitle'
}
]
},
tableEmpData: [],
currentArr: [],
loading: true
}
},
methods: {
selectionTable(val) {
this.$emit('selectTable', val)
},
listDepartmentTree() {
const params = { merchantId: 10001001, addChildrensFlag: true }
if (this.islord) {
params.islord = this.islord
}
params.isHavCustomer = true
this.$apis.customerTransform.listDepartmentTree(params).then(res => {
this.listTree = res
this.loading = false
if (this.listTree.length) {
this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree)
this.currentArr = this.$common.utils.deepClone(this.listTree[0].entmicroStaffResponses)
}
if (this.selectData && this.selectData.length) {
this.selectData.forEach(i => {
const row = this.getEmployee(this.listTree).find(j => j.id == i.staffId)
this.clearSelect(row)
})
}
this.$nextTick(() => {
document.getElementsByClassName('el-tree-node__expand-icon')[0].click()
document.getElementsByClassName('el-tree-node__content')[0].click()
})
})
},
clearSelect(row) {
this.$refs.saleTable.$refs.salelistMutiTable.toggleRowSelection(row)
},
clearSelection() {
this.$refs.saleTable.$refs.salelistMutiTable.clearSelection()
},
handleNodeClick(data) {
this.departmentId = data.id
this.tableEmpData = data.entmicroStaffResponses
// this.currentArr = this.$common.utils.deepClone(data.entmicroStaffResponses)
// this.listEntmicroStaff()
},
getEmployee(d, arr = []) {
d.forEach(i => {
if (i.entmicroStaffResponses) {
i.entmicroStaffResponses.forEach(j => {
const flag = arr.find(m => m.id == j.id)
if (!flag) {
arr.push(j)
}
})
}
if (i.children) {
this.getEmployee(i.children, arr)
}
})
return arr
},
searchTable(search) {
const arr = []
if (this.currentArr && this.currentArr.length != 0) {
this.currentArr.forEach(item => {
if (item.staffName.indexOf(search) != -1) {
arr.push(item)
}
})
}
this.tableEmpData = arr
}
// listEntmicroStaff(staffName) {
// let params = {
// departmentId: this.departmentId,
// staffName: staffName ? staffName : this.staffName,
// merchantid: this.$globalState.session.merchantId
// }
// this.$apis.emp.listEntmicroStaff(params).then(res => {
// this.tableEmpData = res
// })
// }
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.treeHeight = clientHeight - 650
this.listDepartmentTree()
}
}
</script>
<style scoped lang="scss">
.select-emp-panel {
display: flex;
.emp-tree-panel {
margin-top: 10px;
width: 200px;
position: relative;
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
border: 1px solid #e4e7ed;
.emp-scroll-panel {
min-height: 200px;
overflow: auto;
box-sizing: border-box;
}
.popper-arrow {
border-top-width: 0;
border-width: 6px;
position: absolute;
top: -12px;
left: 30px;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-bottom-color: #e4e7ed;
&:after {
content: ' ';
border-width: 6px;
top: 1px;
margin-left: -6px;
border-top-width: 0;
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-bottom-color: #fff;
}
}
}
.emp-table-panel {
flex: 1;
min-height: 200px;
overflow: auto;
margin-top: 10px;
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
border: 1px solid #e4e7ed;
/deep/ .el-checkbox__input.is-disabled .el-checkbox__inner {
background-color: #999999;
}
}
.emp-tree-panel {
margin-right: 10px;
font-size: 15px;
/deep/ .el-tree-node:focus > .el-tree-node__content {
color: #5850ff;
background: #f2f5fa;
}
}
.tree-title {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 14px;
padding: 10px;
}
}
</style>
<template>
<div class="member-wrapper">
<div class="member-left">
<div class="member-title">
预选
<span>共{{ chatGroupCount }}个群聊,{{ tableEmpData.length }}个群主成员</span>
</div>
<div class="member-content">
<el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent>
<el-form-item style="margin-bottom: 0">
<span class="lord-label" slot="label">所在门店/部门</span>
<el-popover ref="popover" placement="bottom" width="215" trigger="click" v-model="popoverVisible" @show="onShowPopover" @hide="onHidePopover">
<el-tree class="select-tree" :data="treeData" :props="defaultProps" default-expand-all @node-click="handleNodeClick"></el-tree>
<el-input v-model="searchForm.department" slot="reference" :size="size" readonly style="width: 215px" placeholder="请选择所在门店/部门" :class="{ rotate: popoverVisible }" suffix-icon="el-icon-arrow-down" @keyup.enter.native="search"></el-input>
</el-popover>
</el-form-item>
<el-form-item label="姓名" style="margin-bottom: 0">
<el-input :size="size" v-model.trim="searchForm.lordName" @keyup.enter.native="search" clearable placeholder="请输入姓名搜索"></el-input>
</el-form-item>
<el-form-item style="margin-bottom: 0">
<span class="lord-label" slot="label">跟进专员类型</span>
<el-select v-model="searchForm.followerId" style="width: 215px" :size="size" placeholder="请选择">
<el-option v-for="item in followTypeList" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item>
<el-checkbox v-model="searchForm.checked">仅看跟进专员</el-checkbox>
</el-form-item>-->
<el-form-item label style="margin-bottom: 0; margin-left: 40px">
<el-button :size="size" @click="handleReset">重置</el-button>
<el-button type="primary" :size="size" @click="search">搜索</el-button>
</el-form-item>
</el-form>
<div class="table-content" style="max-height: 456px">
<GLTable v-loading="loading" ref="empTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" :noDataImg="url" @selectionTable="selectionTable" @row-click="rowClick">
<div slot="staffName" slot-scope="scope">
<span>{{ scope.scope.staffName }}</span>
<span class="staff-title" v-show="scope.scope.staffTitle">{{ scope.scope.staffTitle }}</span>
</div>
</GLTable>
</div>
</div>
</div>
<div class="member-right">
<div class="member-title">已选</div>
<div class="member-name">成员名称({{ innerTags.length }}项)</div>
<div class="input-tag-wrapper">
<div class="tag-box">
<el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false" @close="remove(tag)">
<i class="el-icon-user-solid"></i>
{{ tag.staffName }}
</el-tag>
</div>
</div>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'SelectLord',
props: ['selectData'],
data() {
return {
url: url,
searchForm: {},
checked: '',
treeData: [],
defaultProps: {
children: 'children',
label: 'departmentName'
},
popoverVisible: false,
loading: false,
// 表格参数
tableParams: {
checkSelectKey: 'id',
checkSelectVal: [],
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'id',
// 多选ref的名称
mutiSelectName: 'salelist',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName',
addHtml: 'staffName'
},
{
label: '所在门店/部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName',
formatter: cellValue => {
return cellValue.followerTypeName ? cellValue.followerTypeName : '-'
}
},
{
label: '群数量',
prop: 'chatCount'
}
]
},
tableEmpData: [],
allTreeData: [],
currentTreeData: [],
innerTags: [],
followTypeList: [],
chatGroupCount: 0
}
},
mounted() {
this.getFindLordGroup({}, true)
this.getFollowerType()
this.listDepartmentTree()
},
methods: {
selectionTable(val) {
this.innerTags = val
},
// 清空搜索条件
resetSearch() {
this.searchForm = {}
this.tableEmpData = this.allTreeData
},
// 显示时触发
onShowPopover() {
this.popoverVisible = true
},
// 隐藏时触发
onHidePopover() {
this.popoverVisible = false
},
getFindLordGroup(params, isFirst) {
this.$apis.customerTransform.findLordGroup(params).then(res => {
this.loading = false
if (res) {
this.tableEmpData = res
this.tableEmpData.map(item => (this.chatGroupCount += item.chatCount))
this.$refs.empTable.tableHeightValues = this.tableEmpData.length ? '' : '230px'
if (isFirst && this.selectData && this.selectData.length) {
this.selectData.forEach(item => {
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(item)
})
}
} else {
this.treeData = []
}
})
},
listDepartmentTree() {
const params = { addChildrensFlag: true }
params.islord = true
this.$apis.customerTransform.listDepartmentTree(params).then(res => {
this.treeData = res
})
},
handleNodeClick(data) {
this.searchForm.department = data.departmentName
this.currentTreeData = data
this.onHidePopover()
},
getEmployee(d, arr = []) {
d.reverse().forEach(i => {
if (i.entmicroStaffResponses) {
i.entmicroStaffResponses.forEach(j => {
const flag = arr.find(m => m.id == j.id)
if (!flag) {
arr.push(j)
}
})
}
if (i.children) {
this.getEmployee(i.children, arr)
}
})
return arr
},
search() {
this.getFindLordGroup(this.searchForm)
},
remove(item) {
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(item)
},
rowClick(row) {
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(row)
},
getFollowerType() {
this.$apis.customerTransform.followerType({}).then(res => {
this.followTypeList = res
})
},
handleReset() {
this.searchForm = {}
this.search()
}
}
}
</script>
<style lang="scss">
.el-input.el-input--suffix.rotate .el-input__suffix .el-icon-arrow-down {
transform: rotate(-180deg);
}
.select-tree {
max-height: 400px;
overflow-y: scroll;
}
.staff-title {
position: relative;
font-size: 12px;
padding: 0 10px;
line-height: 12px;
color: #999;
&::before {
content: '';
position: absolute;
top: 50%;
left: 5px;
transform: translateY(-50%);
display: inline-block;
width: 1px;
height: 12px;
background-color: #999;
}
}
.lord-label {
display: inline-block;
width: 110px;
}
.member-wrapper {
display: flex;
.member-title {
font-size: 16px;
font-weight: 600;
line-height: 22px;
margin-bottom: 6px;
span {
display: inline-block;
padding-left: 5px;
font-size: 12px;
color: #999;
font-weight: 500;
}
}
.member-left {
width: 800px;
.member-content {
border: 1px solid #eee;
border-bottom: none;
.member-form {
padding: 10px 20px;
}
.table-content {
max-height: 456px;
overflow: auto;
border-top: 1px solid #eee;
}
}
.member-checked {
text-align: right;
margin-top: 10px;
}
}
.member-right {
width: 286px;
margin-left: 14px;
.member-name {
font-size: 14px;
color: #333;
line-height: 20px;
padding: 18px;
border: 1px solid #eee;
}
}
}
.tag-box {
height: 100%;
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
border: 1px solid #eee;
border-top: none;
box-sizing: border-box;
color: #606266;
display: inline-block;
padding: 8px 10px;
line-height: 32px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%;
height: calc(100% - 86px);
display: flex;
align-items: center;
max-height: 500px;
overflow: auto;
// margin-bottom: 10px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
/deep/ input {
/* input { */
/* background-color: red!important; 调试用的样式 */
outline: none !important;
border: none !important;
}
/deep/ .el-input {
min-width: 150px;
width: auto;
flex: 1;
}
}
.el-tag {
margin-right: 10px;
line-height: 22px;
margin-bottom: 5px;
height: 24px;
}
</style>
<template>
<div class="drawer-sale-panel">
<el-form label-width="100px" :model="addForm" @submit.native.prevent>
<el-form-item label="请选择成员">
<div class="sale-select">
<div class="el-input-tag input-tag-wrapper" @click="foucusTagInput">
<div class="tag-box">
<el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false" @close="remove(tag)">
<i class="el-icon-user-solid"></i>
{{ tag.staffName }}
</el-tag>
</div>
<el-input size="small" v-model.trim="newTag" placeholder="选择员工" @input="inputTag" style="outline: none; border: none" @keyup.enter.native="searchEmp"></el-input>
</div>
<div>
<el-button size="small" class="sale-select-btn" type="primary" @click="searchEmp">查询</el-button>
</div>
</div>
<div>
<div class="select-sale-panel">
<select-emp :selectData="selectData" :islord="islord" @selectTable="selectTable" ref="selectEmpTabel"></select-emp>
<div class="popper__arrow"></div>
</div>
</div>
</el-form-item>
</el-form>
</div>
</template>
<script>
import selectEmp from './selectEmp.vue'
export default {
name: 'SelectMembers',
props: ['selectData', 'islord'],
components: {
selectEmp
},
data() {
return {
addForm: {},
typeIndex: 0,
empType: [],
// empTypeValue: '',
newTag: '',
innerTags: [],
dialog_temp: {}
}
},
methods: {
init() {
this.newTag = ''
this.innerTags = []
this.empTypeValue = ''
if (this.$refs.selectEmpTabel.listTree.length != 0) {
this.$refs.selectEmpTabel.listEntmicroStaff()
this.$refs.selectEmpTabel.clearSelection()
}
},
selectTable(val) {
this.innerTags = val
},
foucusTagInput() {
if (this.readOnly || !this.$el.querySelector('.tag-input')) {
return
} else {
this.$el.querySelector('.tag-input').focus()
}
},
remove(row) {
this.$refs.selectEmpTabel.clearSelect(row)
},
//查询
searchEmp() {
this.$refs.selectEmpTabel.searchTable(this.newTag)
},
onSubmit() {
if (this.innerTags.length == 0) {
this.$message({
message: '请选择成员',
type: 'error'
})
return
}
let userIds = []
this.innerTags.forEach(item => {
userIds.push(item.userId)
})
// this.$emit('handSelectdEmp', this.empType[this.typeIndex].id, userIds)
}
// onCancel() {
// this.$emit('closeDrawer')
// }
},
mounted() {}
}
</script>
<style scoped lang="scss">
.drawer-sale-panel {
padding: 0px 20px;
.sale-reload {
margin-bottom: 10px;
}
.sale-select {
display: flex;
align-items: center;
}
.sale-select-btn {
margin-left: 8px;
}
.sale-type-desc {
font-size: 14px;
font-weight: 400;
color: #adadad;
line-height: 17px;
margin-top: 10px;
}
}
.emp-type {
margin-bottom: 10px;
&-btn {
cursor: pointer;
display: inline-block;
padding: 8px 10px;
margin-bottom: 10px;
margin-right: 10px;
position: relative;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e8e8ea;
line-height: 1;
font-size: 14px;
color: #7d7d7d;
&.checked {
border: 1px solid #5850ff;
color: #5850ff;
}
i {
position: absolute;
right: -6px;
top: -6px;
font-size: 12px;
color: #999999;
}
}
}
.tag-box {
max-height: 66px;
overflow: auto;
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #606266;
display: inline-block;
outline: none;
padding: 0 0 0 5px;
flex-wrap: wrap;
line-height: 32px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%;
display: flex;
align-items: center;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
/deep/ input {
/* input { */
/* background-color: red!important; 调试用的样式 */
outline: none !important;
border: none !important;
}
/deep/ .el-input {
min-width: 150px;
width: auto;
flex: 1;
}
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
}
.tag-input {
background: transparent;
border: none !important;
font-size: 14px;
height: 32px;
outline: none;
padding-left: 0;
width: 100px;
}
.el-input-tag--mini .tag-input {
height: 24px;
line-height: 24px;
}
.el-input-tag--small .tag-input {
height: 32px;
line-height: 32px;
}
.el-input-tag--medium .tag-input {
height: 32px;
line-height: 32px;
}
::-webkit-scrollbar {
/*滚动条整体样式*/
width: 6px;
height: 4px;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 4px;
background-color: rgba(144, 147, 153, 0.3);
}
</style>
<!-- 树形搜索 -->
<template>
<div>
<el-popover ref="popover" placement="bottom-start" trigger="click" v-model="popoverVisible" :disabled="targetItem.isDisabled" @show="onShowPopover" @hide="onHidePopover">
<el-tree ref="tree" class="select-tree" highlight-current default-expand-all node-key="id" :expand-on-click-node="isExpand" :style="`min-width: ${treeWidth}`" :data="treeData" :current-node-key="form[targetItem.name]" :props="defaultProps" :filter-node-method="handleFilterNode" @current-change="handleNodeClick"></el-tree>
<el-input slot="reference" ref="input" v-model="form[targetItem.nameLabel]" clearable :disabled="targetItem.isDisabled" :style="`width: ${width}px`" :class="{ rotate: popoverVisible }" suffix-icon="el-icon-arrow-down" :placeholder="'请选择' + targetItem.label" @change="handleClear"></el-input>
</el-popover>
</div>
</template>
<script>
export default {
name: 'SelectTree',
data() {
return {
isExpand: false,
// 树状菜单显示状态
popoverVisible: false,
treeWidth: 'auto'
}
},
props: {
// 输入框宽度
width: String,
form: {
type: Object,
default: () => {}
},
targetItem: {
type: Object,
default: () => {}
},
treeData: {
type: Array,
default: () => []
},
defaultProps: {
type: Object,
default: () => ({
parent: 'parentId',
value: 'id',
label: 'menuName',
children: 'childlist'
})
}
},
watch: {
form(val) {
if (this.form[this.targetItem.name]) {
this.form[this.targetItem.nameLabel] = this.queryTree(this.treeData, this.form[this.targetItem.name])
this.$nextTick().then(() => {
this.$refs.tree.setCheckedKeys([this.form[this.targetItem.name]])
})
}
}
},
created() {
// 获取输入框宽度同步至树状菜单宽度
this.$nextTick(() => {
this.treeWidth = `${(this.width || this.$refs.input.$refs.input.clientWidth) - 24}px`
})
},
mounted() {
if (this.form[this.targetItem.name]) {
// console.log(this.treeData)
// console.log(this.form)
this.form[this.targetItem.nameLabel] = this.queryTree(this.treeData, this.form[this.targetItem.name])
this.$nextTick().then(() => {
this.$refs.tree.setCheckedKeys([this.form[this.targetItem.name]])
})
}
},
methods: {
// 显示时触发
onShowPopover() {
this.popoverVisible = true
this.$refs.tree.filter(false)
},
// 隐藏时触发
onHidePopover() {
this.popoverVisible = false
},
// 树节点过滤方法
handleFilterNode(query, data) {
if (!query) return true
return data[this.defaultProps.label].indexOf(query) !== -1
},
handleNodeClick(val) {
this.$emit('selected', { val: val, targetItem: this.targetItem, formName: this.targetItem.formName })
this.onHidePopover()
},
handleClear(val) {
this.$emit('selected', { val: val, targetItem: this.targetItem, formName: this.targetItem.formName })
window.event.stopPropagation()
},
// 搜索树状数据中的 ID
queryTree(tree, id) {
let stark = []
stark = stark.concat(tree)
while (stark.length) {
const temp = stark.shift()
if (temp[this.defaultProps.children]) {
stark = stark.concat(temp[this.defaultProps.children])
}
if (temp[this.defaultProps.value] === id) {
return temp[this.defaultProps.label]
}
}
return
}
}
}
</script>
<style>
.el-input.el-input--suffix.rotate .el-input__suffix .el-icon-arrow-down {
transform: rotate(-180deg);
}
.select-tree {
max-height: 400px;
overflow-y: scroll;
}
</style>
<!-- 分享弹窗 -->
<template>
<glsx-dialog title="分享" width="806px" :noCancel="true" btnOkLabel="关闭" :isVisible="isShareVisible" @closeDialog="handleShareClose" @confirmDialog="handleShareClose">
<div class="share-dialog">
<div class="flex">
<div class="flex box poster">
<div>
<p class="share-txt">海报</p>
<!-- <p>小程序码不带参数</p> -->
<el-button :size="size" type="primary" @click="handleSaveImg(shareForm.posterUrl)">保存图片</el-button>
</div>
<img :src="shareForm.posterUrl" />
</div>
<div class="flex box poster">
<div>
<p class="share-txt">小程序码</p>
<!-- <p>小程序码不带参数</p> -->
<el-button :size="size" type="primary" @click="handleSaveImg(shareForm.qrCodeUrl)">保存图片</el-button>
</div>
<img style="width: 180px; height: 180px" :src="shareForm.qrCodeUrl" />
</div>
</div>
<div class="box page-route">
<div>
<p class="route-txt">短链</p>
<div class="flex">
<p style="width: 426px;">{{ shareForm.linkUrl }}</p>
<el-button :size="size" type="primary" @click="handleSaveTxt(shareForm.linkUrl)">复制链接</el-button>
<!-- <p>链接是直播间原始页面路径,如需加入参数,详见使用方法</p> -->
</div>
</div>
</div>
</div>
</glsx-dialog>
</template>
<script>
export default {
name: 'share',
data() {
return {}
},
props: {
isShareVisible: {
type: Boolean,
default: false
},
shareForm: {
type: Object,
default: () => {}
}
},
mounted() {},
methods: {
handleSaveImg(url) {
var alink = document.createElement('a')
alink.href = url
alink.setAttribute('target', '_blank')
alink.download = '海报'
alink.click()
alink.remove()
},
handleSaveTxt(txt) {
this.$message({
message: '复制成功',
type: 'success',
customClass: 'message-Z-zinde'
})
const input = document.createElement('input')
document.body.appendChild(input)
input.setAttribute('value', txt)
input.select()
document.execCommand('Copy')
document.body.removeChild(input)
},
handleShareClose() {
this.$emit('handleShareClose')
}
}
}
</script>
<style scoped>
.share-dialog .box {
background: #f7f7f7;
border-radius: 6px;
padding: 30px;
}
.share-dialog .poster img {
width: 180px;
height: 297px;
margin-left: 45px;
}
.share-dialog .page-route {
margin-top: 16px;
}
.share-dialog .page-route .route-txt {
font-weight: bold;
padding-bottom: 10px;
}
.share-dialog .share-txt {
font-weight: bold;
margin-bottom: 50px;
}
</style>
<template>
<div class>
<div class="container">
<div class="edit-container">
<div>
<!-- 基础信息 -->
<div class="title">
编辑朋友圈
......@@ -41,8 +41,12 @@
<el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="120px">
<el-form-item prop="attachmentList">
<label slot="label" class="required">内容正文</label>
<WelcomeWords ref="welcome" :form="'customer'" :btnList="btnList" :eventBus="eventBus"></WelcomeWords>
<GLEditor ref="welcome" :form="'customer'" :btnList="btnList" @previewWord="previewForm"></GLEditor>
<div v-show="attachmentShow" class="el-form-item__error">{{ attachmentText }}</div>
<div class="tips-text">
<img src="@/assets/guestCustom/tips.png" class="tips-icon" alt />
<span>因企业微信限制,普通图片:总像素不超过1555200,大小不超过10M,数量不超过9张。视频建议不超过1280x720,帧率30FPS,视频码率1.67 Mbps,最长不超过30S,最大不超过10MB</span>
</div>
</el-form-item>
<el-form-item label="发送时间" prop="sendType">
<el-radio-group v-model="basicForm.sendType">
......@@ -59,7 +63,7 @@
</div>
</div>
<div class="preview">
<Preview :eventBus="eventBus"></Preview>
<Preview :previewView="previewView"></Preview>
</div>
</div>
</div>
......@@ -87,14 +91,11 @@ const ATT_TYPE = {
}
import Vue from 'vue'
import emoji from '@/utils/emo'
import WelcomeWords from './components/welcomeWords.vue'
import SelectMember from './components/selectMember.vue'
import Preview from './components/preview.vue'
import SelectLabel from './components/selectLabel.vue'
import * as dayjs from 'dayjs'
export default {
components: {
WelcomeWords,
SelectMember,
Preview
},
......@@ -128,32 +129,47 @@ export default {
addLoading: false,
eventBus: new Vue(),
taggingList: [],
previewView: [],
btnList: [
{
id: 1,
name: '表情',
funcName: '',
type: 'expression',
limitSize: 10
},
{
id: 2,
name: '图片',
funcName: '',
type: 'img',
limitSize: 10
togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
limitSize: 10, //限制图片大小
limitNum: 9, //限制图片数量
// limitWidth: 10000, //限制单张图片宽度
// limitHeight: 10000,//限制单张图片高度
Isdraggable: true, //图片拖拽
uploadApi: this.$apis.common.pictureUpload
},
{
id: 3,
name: '视频',
funcName: '',
type: 'video',
funName: 'video'
limitSize: 10, //限制视频大小
togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
limitNum: 1, //限制视频数量
limitWidth: 1280, //限制视频宽度
limitHeight: 720, //限制视频高度
limitTime: 30, //限制视频时长
uploadApi: this.$apis.common.pictureUpload
}
// {
// id: 4,
// name: '活动',
// type: 'acivity',
// funName: 'activity'
// name: '模板',
// type: 'message',
// funName: 'message',
// getSearchApi: this.$apis.welcomeword.createdNameList,
// templateApi: this.$apis.welcomeword.templatePage,
// templateUpdateApi: this.$apis.welcomeword.templateUpdate,
// templateSaveApi: this.$apis.welcomeword.templateSave,
// templateDetailApi: this.$apis.welcomeword.templateDetail
// }
],
basicForm: {
......@@ -219,10 +235,12 @@ export default {
deep: true
}
},
mounted() {
this.setMinHeight()
},
mounted() {},
methods: {
previewForm(val) {
console.log(val)
this.previewView = val
},
openMembers() {
this.membersVisible = !this.membersVisible
},
......@@ -438,6 +456,24 @@ export default {
font-weight: 100;
}
}
.tips-text {
display: flex;
align-items: center;
justify-self: center;
color: #000;
font-size: 14px;
padding: 6px 16px;
margin-top: 10px;
background-color: rgba(230, 233, 255, 0.49);
border: 1px solid rgba(88, 80, 255, 0.49);
border-radius: 4px;
line-height: 24px;
.tips-icon {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
.info-box {
display: inline-flex;
width: 100%;
......
......@@ -22,17 +22,15 @@
</div>
</div>
</div>
<div
<!-- <div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<!-- <el-button type="primary" @click="handle
Next">确定</el-button>-->
<el-button type="primary" @click="handleCancel">取消</el-button>
</div>
</div> -->
<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">
......
......@@ -138,7 +138,7 @@ export default {
return row.status == 2 || row.status == 1
},
listeners: {
click: () => { }
click: () => {}
}
},
{
......@@ -152,7 +152,7 @@ export default {
return row.status == -1
},
listeners: {
click: () => { }
click: () => {}
}
},
{
......@@ -166,7 +166,7 @@ export default {
return row.status == 4
},
listeners: {
click: () => { }
click: () => {}
}
},
{
......@@ -252,17 +252,17 @@ export default {
{
label: '已发送成员',
prop: 'sendStaffCount',
width: '100'
width: '110'
},
{
label: '未发送成员',
prop: 'unSendStaffCount',
width: '100'
width: '110'
},
{
label: '已送达客户',
prop: 'copyCustomerCount',
width: '100'
width: '110'
}
]
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!