Commit 801c5970 by 杨明

fixed

1 parent 0d927d0c
Showing 44 changed files with 2018 additions and 12 deletions
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-07 16:54:06 * @Date: 2023-09-07 16:54:06
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-26 10:26:03 * @LastEditTime: 2023-12-22 14:54:37
* @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.js * @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -85,5 +85,14 @@ const activityRelInfo = params => { ...@@ -85,5 +85,14 @@ const activityRelInfo = params => {
sign: true sign: true
}) })
} }
//选择成员
export default { activityPage, byGroupIdSop, getInstIdDetail, setSopInsts, concatActivity, findMarketingTask, getActivityDetailApi, activityRelInfo } const listDepartmentTree = params => {
params.method = 'entmicro.api.department.listDepartmentTree'
return http({
url: 'rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
export default { activityPage, byGroupIdSop, getInstIdDetail, setSopInsts, concatActivity, findMarketingTask, getActivityDetailApi, activityRelInfo, listDepartmentTree }
import { http, http_merchant } from '@/main'
const path = 'entmicro.api.mass.'
const URL = 'rop-scrm-entmicro/router'
//权益卡
const getCard = params => {
params.method = 'scrm.api.equity.open.card.price.list.by.merchantid'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//权益卡
const merchant = params => {
params.method = 'scrm.api.equity.open.card.price.list.by.merchantid'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//是否开通权益
const merchantOpen = params => {
params.method = 'scrm.api.equity.service.merchant.config.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//优惠券
const getCoupon = params => {
params.method = 'scrm.api.boutiquecoupon.coupon.page'
return http({
url: '/rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
//套餐
const getPackage = params => {
params.method = 'scrm.api.equity.package.info.list.with.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getMerchant = params => {
params.method = 'scrm.api.coupon.list.merchant'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
//秒杀活动
const getActivity = params => {
params.method = 'scrm.api.shopmall.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取素材组列表
const getGroupListApi = params => {
params.method = 'marketing.api.material.group.list'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取素材列表
const getMaterialListApi = params => {
// params.method = 'marketing.api.material.page'
params.method = 'marketing.api.material.sop.page'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
// 众筹模式活动
const crowdfundingActivity = params => {
params.method = 'scrm.api.shopmall.crowdfunding.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//膨胀金活动
const bulgeActivity = params => {
params.method = 'scrm.api.shopmall.bulge.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//膨胀金活动
const activityQuestionnaireForm = params => {
params.method = 'marketing.api.activityQuestionnaireForm.page'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//模板列表
const templatePage = params => {
params.method = `${path}template.page.search`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板保存
const templateSave = params => {
params.method = `${path}template.save`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板更新
const templateUpdate = params => {
params.method = `${path}template.update`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板创建人
const createdNameList = params => {
params.method = `${path}template.created.name.list`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const templateDetail = params => {
params.method = `${path}template.detail`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const findMerchantListByPage = params => {
params.method = 'merchants.api.open.findMerchantListByPage'
return http_merchant({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
const channelPreview = params => {
params.method = `scrm.api.shopmall.discover.channel.merchant.preview`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getCard,
merchant,
getActivity,
getPackage,
getMerchant,
getCoupon,
merchantOpen,
getGroupListApi,
getMaterialListApi,
templatePage,
createdNameList,
templateUpdate,
templateSave,
templateDetail,
crowdfundingActivity,
bulgeActivity,
findMerchantListByPage,
channelPreview,
activityQuestionnaireForm
}
...@@ -33,7 +33,18 @@ img { ...@@ -33,7 +33,18 @@ img {
height: 100%; height: 100%;
vertical-align: middle; vertical-align: middle;
} }
.m-b-20 {
margin-bottom: 20px;
}
.m-b-10 {
margin-bottom: 10px;
}
.m-t-20 {
margin-top: 20px;
}
.m-t-10 {
margin-top: 10px;
}
.bg-fff { .bg-fff {
background: #ffffff; background: #ffffff;
} }
......
<template>
<div class="square-main">
<GLDialog bigTitle="选择活动" :append-to-body="true" :hasFooter="true" :visible.sync="dialogVisible" width="1098px" mode="big">
<div class="model-panel" v-loading="loading">
<div class="model-panel-tab">
<el-tabs v-model="activeName" @tab-click="handleClick">
<template v-for="(item, index) in activityList">
<el-tab-pane :label="item.itemName" :name="item.itemValue" v-if="itemType != 'merchant'" :key="index"></el-tab-pane>
<el-tab-pane :label="item.itemName" v-if="openFlag && itemType == 'itemType'" :key="index"></el-tab-pane>
</template>
</el-tabs>
</div>
<div class="model-item-panel" v-if="modelList.length > 0">
<div class="model-item" :class="{ checked: selectItem == item }" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)">
<div class="item-icon" v-if="selectItem == item"><i class="el-icon-check"></i></div>
<div class="item-icon-b" v-else>
<img src="@/assets/welcomeWord/coupon.png" alt="" v-if="selectType == 'coupon'" />
<img src="@/assets/welcomeWord/gift.png" alt="" v-else />
</div>
<template v-if="selectType == 'card'">
<div class="model-item-title" :title="item.equityName">{{ item.equityName }}</div>
<div class="model-item-content">领取方式:免费领用</div>
<div class="model-item-content"></div>
<div class="model-item-content model-item-contents">
试用天数:
<span>{{ item.freeDay }}天</span>
</div>
</template>
<template v-else-if="selectType == 'package'">
<div class="model-item-title" :title="item.packageName">{{ item.packageName }}</div>
<div class="model-item-content">领取方式:付费购买</div>
<div class="model-item-content"></div>
<div class="model-item-content model-item-contents">
销售价格:
<span>{{ item.packagePrice }}元</span>
</div>
</template>
<template v-else-if="selectType == 'coupon'">
<div class="model-item-title" :title="item.couponName">{{ item.couponName }}</div>
<div class="model-item-content" v-if="item.effectiveType == 3">有效期:无限制</div>
<div class="model-item-content" v-if="item.effectiveType == 6">有效期:{{ item.effectiveDays }}天</div>
<div class="model-item-content" v-if="item.effectiveType == 2">有效期:{{ item.effectiveStartTime ? item.effectiveStartTime.split(' ')[0] : '' }}~{{ item.effectiveEndTime ? item.effectiveEndTime.split(' ')[0] : '' }}</div>
<div class="model-item-content">
使用途径:
{{ item.useChannel == 1 ? '线上商品' : '到店核销' }}
</div>
<div class="model-item-content model-item-contents">
数量:
<span>{{ item.residueAmount }}</span>
</div>
</template>
<template v-else-if="selectType == 'activity'">
<div class="model-item-title" :title="item.activityName">{{ item.activityName }}</div>
<div class="model-item-content"></div>
<div class="model-item-content">
开始时间:
{{ item.startTime }}
</div>
<div class="model-item-content">
结束时间:
{{ item.endTime }}
</div>
</template>
<template v-else-if="selectType == 'crowdfunding' || selectType == 'bulge'">
<div class="model-item-title" :title="item.activityName">{{ item.activityName }}</div>
<div class="model-item-content"></div>
<div class="model-item-content">开始时间:{{ item.startTime }}</div>
<div class="model-item-content">结束时间:{{ item.endTime }}</div>
</template>
<template v-else-if="selectType == 'questionnaire'">
<div class="model-item-title" :title="item.name">{{ item.name }}</div>
<div class="model-item-content">卡片标题:</div>
<div class="model-item-content">{{ item.title }}</div>
</template>
<template v-else>
<div class="model-item-title" :title="item.couponName">{{ item.equityName }}</div>
<div class="model-item-content">获取方式:需先购买无忧服务套餐</div>
<div class="model-item-content">获取限制:每个服务套餐限领一次</div>
<div class="model-item-content model-item-weight">
赠送天数:
<span>{{ item.effectiveType == 2 ? item.effectivedDay + '天' : '永久有效' }}</span>
</div>
</template>
</div>
</div>
<div class="model-item-empty" v-else v-loading="loading">
<img src="@/assets/empty.png" />
<div class="empty-item">暂无数据</div>
</div>
<el-pagination v-if="selectType != 'card' && selectType != 'merchant'" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[12, 24, 36, 48]" :page-size="pageSize" :total="tableTotal" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect" v-show="modelList.length">确 定</el-button>
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && selectType == 'coupon' && memberMenu">立即添加</el-button>
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && selectType == 'package' && couponMenu">立即添加</el-button>
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && selectType == 'activity' && activityMenu">立即添加</el-button>
</span>
</GLDialog>
</div>
</template>
<script>
const openUrl = function(url) {
const link = document.createElement('a')
link.href = url
link.target = '_blank'
link.rel = 'opener'
link.click()
}
export default {
name: 'ActivityModel',
data() {
return {
dialogVisible: false,
couponMenu: false,
loading: false,
activeName: 3,
modelList: [],
pageNum: 1,
pageSize: 12,
tableTotal: 0,
openFlag: 0,
selectItem: {
id: ''
}
}
},
props: {
activityList: {
type: Array,
default: () => []
}
},
computed: {
selectType() {
return this.activityList.length ? this.activityList.find(act => act.itemValue == this.activeName).itemType : ''
}
},
methods: {
handleSelectItem(item) {
this.selectItem = item
if (item.equityClassId) {
this.selectItem.id = item.equityClassId
}
console.log(this.selectItem)
},
handleSelect() {
if (!this.selectItem.id) {
this.$message({
type: 'error',
message: '请选择活动'
})
return
}
this.dialogVisible = false
const marketingId = this.selectItem.id ? this.selectItem.id : this.selectItem.equityClassId
let marketingName = ''
switch (this.selectType) {
case 'card':
marketingName = this.selectItem.equityName
break
case 'package':
marketingName = this.selectItem.packageName
break
case 'activity':
case 'crowdfunding':
marketingName = this.selectItem.activityName
break
case 'coupon':
marketingName = this.selectItem.couponName
break
case 'questionnaire':
marketingName = this.selectItem.name
break
default:
marketingName = this.selectItem.equityName
}
//const marketingName = this.selectType == 'card' ? this.selectItem.equityName : this.selectType == 'package' ? this.selectItem.packageName : this.selectType == 'activity' || this.selectType == 'crowdfunding' ? this.selectItem.activityName : this.selectType == 'coupon' ? this.selectItem.couponName : this.selectItem.equityName
const { equityName, packageName, couponName, activityName, name, effectivedDay, effectiveType, endTime, startTime, residueAmount, packagePrice, freeDay } = this.selectItem
const otherContent = { equityName, packageName, couponName, activityName: activityName || name, effectivedDay, effectiveType, endTime, startTime, residueAmount, packagePrice, freeDay }
const marketingContent = { ...otherContent, selectType: this.selectType }
const params = {}
if (this.selectType == 'crowdfunding') {
params.url = this.selectItem.url
params.desc = this.selectItem.promotion
params.title = this.selectItem.forwardTitle
params.picurl = this.selectItem.activityImg
}
if (this.selectType == 'questionnaire') {
params.marketingUrl = this.selectItem.cardCover
params.marketingTitle = this.selectItem.cardTitle
}
this.$emit('selectActivity', { marketingId, marketingType: this.activeName, marketingName, marketingContent, ...params })
},
handleSizeChange(val) {
this.pageSize = val
this.getModelList()
},
handleCurrentChange(val) {
this.pageNum = val
this.getModelList()
},
handleOpen() {
let url
switch (this.selectType) {
case 'coupon':
url = '/marketing/couponManage/index'
break
case 'package':
url = '/marketing/memberCenter/setmealAddUpdate?%24title=%25E5%2588%259B%25E5%25BB%25BA%25E5%25A5%2597%25E9%25A4%2590'
break
case 'activity':
url = '/marketing/seckillActivity/editActivity/1'
break
}
openUrl(location.origin + url)
this.dialogVisible = false
},
getModelList() {
this.modelList = []
this.loading = true
let params = {
pageSize: this.pageSize,
pageNum: this.pageNum
}
const activityChecked = this.activityList.find(act => act.itemValue == this.activeName)
if (activityChecked && activityChecked.params && activityChecked.params.currentPage) {
console.log(activityChecked.params.currentPage)
activityChecked.params.currentPage = this.pageNum
}
Object.assign(params, activityChecked.params)
activityChecked
.getInterfaceApi(params)
.then(res => {
this.modelList = res.list ? res.list : res.data ? res.data : res
this.tableTotal = res.total || res.count || 0
this.loading = false
})
.catch(() => {
this.loading = false
})
},
merchantOpen() {
let channel = null
if (location.host == 'scrm.cgacar.com') {
channel = 2
}
const activityMerchant = this.activityList.find(act => act.itemType == 'merchant')
if (activityMerchant) {
let params = { channel, ...activityMerchant.merchantOpen.params }
activityMerchant.merchantOpen.merchantOpenApi(params).then(res => {
this.openFlag = res.openFlag
})
}
},
init() {
this.merchantOpen()
this.couponMenu = false
this.activityMenu = false
this.memberMenu = false
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menu.forEach(item => {
if (item.name == 'marketing') {
if (!item.children) {
return
}
item.children.forEach(itm => {
console.log(itm.path)
if (itm.path == '/couponManage/index') {
this.couponMenu = true
}
if (itm.path == '/seckillActivity/index') {
this.activityMenu = true
}
if (itm.path == '^') {
this.memberMenu = true
}
})
}
})
this.dialogVisible = true
this.getModelList()
this.selectItem = {}
},
handleClick() {
this.getModelList()
}
}
}
</script>
<style lang="scss" scoped>
.square-main {
/deep/ {
.el-dialog__footer {
text-align: center;
}
.el-dialog__body {
padding: 14px 30px 20px;
}
}
}
.model-panel {
.model-panel-tab {
margin-bottom: 18px;
label {
// font-size: 16px;
// font-weight: 400;
// color: #000000;
// line-height: 24px;
}
/deep/ {
.el-checkbox:last-of-type {
margin-right: 8px;
}
.el-tabs__nav {
// border: 0;
}
.el-tabs__header {
// border: 0;
// background-color: #f4f6fc;
// margin: 0px;
}
.el-tabs__item {
// border: none;
// width: 180px;
// height: 32px;
// line-height: 32px;
// margin: 2px;
// text-align: center;
}
.el-tabs__item.is-active {
font-weight: 600;
padding: 0 20px;
border-bottom: 2px solid #5850ff;
}
}
}
.model-item-empty {
> img {
display: block;
margin: 50px auto 0px;
width: 60px;
height: auto;
}
.empty-item {
text-align: center;
font-size: 14px;
font-weight: 400;
color: #000000;
line-height: 22px;
margin-bottom: 30px;
}
}
.model-item-panel {
// display: grid;
// grid-template-columns: repeat(4, 25%);
// grid-row-gap: 10px;
max-height: 38vh;
overflow: auto;
display: flex;
flex-wrap: wrap;
align-items: stretch;
flex-direction: row;
.model-item {
width: 248px;
margin-right: 16px;
margin-bottom: 16px;
position: relative;
height: 128px;
background: #f9f9f9;
border-radius: 4px;
padding: 14px 16px;
box-sizing: border-box;
.item-icon {
position: absolute;
right: 0px;
bottom: 0px;
width: 16px;
height: 16px;
background: #5850ff;
border-radius: 4px 0px 0px 0px;
display: flex;
justify-content: center;
align-items: center;
i {
color: #fff;
}
}
.item-icon-b {
position: absolute;
right: -1px;
bottom: -1px;
img {
width: 30px;
height: 30px;
}
}
&:nth-child(4n) {
margin-right: 0px;
}
&.checked {
border: 2px solid #5850ff;
}
&-qrcode {
position: absolute;
right: 10px;
bottom: 10px;
width: 60px;
height: 60px;
border: 1px solid #979797;
}
&-title {
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 25px;
margin-bottom: 5px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
&-content {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 16px;
height: 16px;
margin-top: 6px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
&.model-item-weight {
line-height: 20px;
height: 20px;
}
span {
color: #5850ff;
font-size: 20px;
}
}
&-contents {
line-height: 22px;
height: 22px;
}
}
}
}
</style>
<!-- 素材弹窗 -->
<template>
<GLDialog bigTitle="选择素材" :append-to-body="true" :hasFooter="true" :visible.sync="isMaterialVisible" width="1088px" class="relateStore" mode="big">
<GLCombiForm :rowNumber="1" class="material-search" ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="model-panel">
<div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading">
<div class="model-item" :class="{ checked: selectItem.id == item.id }" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)">
<div class="model-image">
<img src="@/assets/welcomeWord/pdf_r.png" v-if="item.materialType == 1" />
<template v-if="item.materialType != 1">
<img v-if="item.materialContent && item.materialContent.urlType == 'img' && item.materialContent.imgSrc.length == 1" class="img-material" :src="item.materialContent.materialUrl" />
<div :style="`background-image: url('${item.materialContent.materialUrl}')`" class="image-panel" v-if="item.materialContent && item.materialContent.urlType == 'img' && item.materialContent.imgSrc.length > 1">
<div class="image-panel-filter"><img src="@/assets/welcomeWord/imgNum.png" /></div>
<div class="image-panel-num">{{ item.materialContent.imgSrc.length }}</div>
</div>
<div class="video-panel" v-if="item.materialContent && item.materialContent.urlType == 'video'">
<video id="video" width="100%" height="100%" preload loop muted>
<source :src="item.materialContent.materialUrl" type="video/mp4" />
</video>
<i class="el-icon-video-play"></i>
</div>
</template>
<img src="@/assets/welcomeWord/text.png" v-if="!item.materialContent.materialUrl && item.materialType != 1" />
</div>
<div class="model-content">
<div class="model-content-title">{{ item.materialContentRpcResponse.materialName }}</div>
<div class="model-content-html" v-html="item.htmlText"></div>
</div>
</div>
</div>
<div class="model-item-empty" v-else v-loading="loading">
<img src="@/assets/empty.png" />
<div class="empty-item">暂无数据</div>
</div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[12, 24, 36, 48]" :page-size="pageSize" :total="tableTotal" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isMaterialVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleMaterialConfirm">确 定</el-button>
</span>
</GLDialog>
</template>
<script>
export default {
name: 'materialModel',
data() {
return {
isMaterialVisible: false,
searchForm: {
groupId: '',
materialType: ''
},
searchFormData: [
{
label: '素材分组',
name: 'groupId',
type: 'select',
optionList: [],
optionId: 'id',
optionLabel: 'materialGroupName',
optionsName: 'groupList'
},
{
label: '素材类型',
name: 'materialType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'materialTypeList'
}
],
modelList: [],
selectItem: {
id: ''
},
// 分页
pageNum: 1,
pageSize: 12,
tableTotal: 0,
baseData: {
groupList: [],
materialTypeList: [
{
confId: 1,
confName: 'PDF'
},
{
confId: 3,
confName: '图文'
}
]
}
}
},
props: {
materialList: Object
},
methods: {
init() {
this.getBaseData()
this.getModelList()
this.isMaterialVisible = true
},
getBaseData() {
const params = this.materialList.params || {}
this.materialList.groupListApi(params).then(res => {
this.baseData.groupList = res
this.getOptionsList('searchFormData')
})
},
handleSelectItem(item) {
this.selectItem = item
},
getimgsrc(htmlstr) {
var reg = /<img.+?src=('|")?([^'"]+)('|")?(?:\s+|\/?>)/gim
var arr = []
var tem
while ((tem = reg.exec(htmlstr))) {
arr.push(tem[2])
}
return arr
},
getvideosrc(htmlstr) {
var reg = /<video.+?src=('|")?([^'"]+)('|")?(?:\s+|\/?>)/gim
var arr = []
var tem
while ((tem = reg.exec(htmlstr))) {
arr.push(tem[2])
}
return arr
},
getModelList() {
var params = {
...this.searchForm,
status: 0,
pageNum: this.pageNum,
pageSize: this.pageSize,
...this.materialList.params
}
this.materialList.materialListApi(params).then(res => {
this.modelList = res.data
this.tableTotal = res.count
let tableData = []
this.modelList.forEach(item => {
if (item.materialType == 1) {
this.$set(item, 'materialContent', { pdfSrc: decodeURIComponent(item.materialContentRpcResponse.materialUrl) })
return
}
let html = decodeURIComponent(item.materialContentRpcResponse.materialUrl)
let imgSrc = this.getimgsrc(html) || []
let videoSrc = this.getvideosrc(html)
if (item.imageUrlList && item.imageUrlList.length) {
imgSrc = [...imgSrc, ...item.imageUrlList]
}
if (item.videoUrl) videoSrc = videoSrc.concat(item.videoUrl)
let imgHtml = html.match(/<img.*?(?:>|\/>)/g) || []
let videoHtml = html.match(/<video.*?<\/video>/g) || []
let materialUrl, urlType, imgCount
if (imgSrc.length) {
materialUrl = imgSrc[0]
urlType = 'img'
imgCount = imgSrc.length
for (let i = 0; i < imgHtml.length; i++) {
html = html.replace(imgHtml[i], '')
}
}
if (videoSrc.length) {
materialUrl = videoSrc[0]
urlType = 'video'
for (let i = 0; i < videoHtml.length; i++) {
html = html.replace(videoHtml[i], '')
}
}
this.$set(item, 'htmlText', html.replace(/<p>/, '<p style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;word-break: break-all;-webkit-box-orient: vertical;">'))
html = html
.replace(/<p><\/p>/g, '')
.replace(/<p>([\s\S]+?)<\/p>/g, '\n$1')
.replace(/<[^>]+>/g, '')
if (materialUrl) {
this.$set(item, 'materialContent', { materialUrl, imgCount, urlType, imgSrc, videoSrc, html })
} else {
this.$set(item, 'materialContent', { html })
}
})
})
},
handleReset() {
this.searchForm = {
groupId: '',
materialType: ''
}
this.handleSearch()
},
handleSearch() {
this.pageNum = 1
this.getModelList()
},
handleSizeChange(val) {
this.pageSize = val
this.getModelList()
},
handleCurrentChange(val) {
this.pageNum = val
this.getModelList()
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
handleMaterialConfirm() {
console.log(this.selectItem)
this.isMaterialVisible = false
this.$emit('handleMaterialConfirm', {
objectId: this.selectItem.id,
objectName: this.selectItem.materialContentRpcResponse.materialName,
materialContent: this.selectItem.materialContent
})
}
}
}
</script>
<style lang="scss" scoped>
.relateStore {
/deep/ {
.gl-operate {
margin-left: 10px;
}
}
}
.material-search {
/deep/ {
.el-form-item--small {
width: auto !important;
}
}
}
.model-panel {
.model-panel-tab {
display: flex;
align-items: center;
margin-bottom: 18px;
label {
font-size: 16px;
font-weight: 400;
color: #000000;
line-height: 24px;
}
/deep/ {
.el-checkbox:last-of-type {
margin-right: 8px;
}
.el-tabs__nav {
border: 0;
}
.el-tabs__header {
border: 0;
background-color: #f4f6fc;
margin: 0px;
}
.el-tabs__item {
border: none;
width: 180px;
height: 32px;
line-height: 32px;
margin: 2px;
text-align: center;
}
.el-tabs__item.is-active {
background-color: #fff;
border-radius: 4px;
font-weight: 600;
}
.el-pagination {
padding: 5px;
}
}
}
.model-item-empty {
> img {
display: block;
margin: 50px auto 0px;
width: 60px;
height: auto;
}
.empty-item {
text-align: center;
font-size: 14px;
font-weight: 400;
color: #000000;
line-height: 22px;
margin-bottom: 30px;
}
}
.model-item-panel {
// display: grid;
// grid-template-columns: repeat(4, 25%);
// grid-row-gap: 10px;
max-height: 38vh;
overflow: auto;
display: flex;
flex-wrap: wrap;
align-items: stretch;
flex-direction: row;
.model-item {
width: 23%;
margin-right: 2%;
margin-bottom: 24px;
padding: 12px 16px;
position: relative;
text-align: center;
// height: 128px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e6e6e6;
padding: 14px 24px;
box-sizing: border-box;
display: flex;
&:nth-child(4n) {
margin-right: 0px;
}
.image-panel {
border-radius: 2px;
background-size: 100% 100%;
position: relative;
width: 60px;
height: 60px;
.image-panel-filter {
position: absolute;
top: 0px;
left: 0px;
width: 60px;
height: 60px;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
img {
width: 36px;
height: 36px;
}
}
.image-panel-num {
position: absolute;
font-size: 12px;
top: 25px;
left: 25px;
color: rgba(255, 255, 255, 0.8);
}
}
.video-panel {
margin-right: 10px;
width: 60px;
height: 60px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
video {
position: absolute;
object-fit: fill;
}
.el-icon-video-play {
z-index: 10;
font-size: 20px;
color: #fff;
cursor: pointer;
}
}
.model-image {
width: 60px;
height: 60px;
img {
width: 60px;
height: 60px;
}
video {
width: 60px;
height: 60px;
object-fit: fill;
}
}
.model-content {
margin-left: 10px;
text-align: left;
width: calc(100% - 60px);
&-title {
font-size: 14px;
color: #333333;
line-height: 21px;
font-weight: 400;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width: 100%;
}
p {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width: calc(100% - 120px);
font-size: 12px !important;
color: #666666;
line-height: 21px;
font-weight: 400;
}
.model-content-html {
line-height: 14px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
word-break: break-all;
-webkit-box-orient: vertical;
> p {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
word-break: break-all;
-webkit-box-orient: vertical;
}
}
}
&:nth-child(4n) {
margin-right: 0px;
}
&.checked {
background: rgba(88, 80, 255, 0.1);
border: 1px solid #5850ff;
}
&-qrcode {
position: absolute;
right: 10px;
bottom: 10px;
width: 60px;
height: 60px;
border: 1px solid #979797;
}
&-title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
margin-bottom: 5px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.img-pdf {
width: 40px;
height: 40px;
margin-top: 10px;
}
.img-material {
width: 72px;
height: 72px;
object-fit: fill;
}
&-content {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 16px;
height: 16px;
margin-top: 6px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
&.model-item-weight {
line-height: 20px;
height: 20px;
}
span {
color: #5850ff;
font-size: 20px;
}
}
&-contents {
line-height: 22px;
height: 22px;
}
}
}
}
</style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08 * @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-18 15:06:40 * @LastEditTime: 2023-12-22 17:40:27
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue * @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class="tab-label"> <div class="tab-label">
{{ stepItem.label }} {{ stepItem.label }}
</div> </div>
<div class="tab-sop"> <div class="tab-sop" @click.stop="showStat">
SOP执行统计 SOP执行统计
</div> </div>
</div> </div>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<img src="@/assets/config/arrow.png" v-if="spiltString(v, 1)" /> <img src="@/assets/config/arrow.png" v-if="spiltString(v, 1)" />
<span>{{ spiltString(v, 1) }}</span> <span>{{ spiltString(v, 1) }}</span>
</div> </div>
<div class="progress-edit">编辑</div> <div class="progress-edit" @click="showEdit">编辑</div>
</div> </div>
<div class="empty-panel" v-else> <div class="empty-panel" v-else>
<div class="empty-img"> <div class="empty-img">
...@@ -68,7 +68,20 @@ ...@@ -68,7 +68,20 @@
<div class="step-item-desc"> <div class="step-item-desc">
<span>[{{ stage_time[value.taskType] }}]发送 | {{ stage[value.taskType] }} |{{ stage_info[value.taskType] }}</span> <span>[{{ stage_time[value.taskType] }}]发送 | {{ stage[value.taskType] }} |{{ stage_info[value.taskType] }}</span>
</div> </div>
<div class="step-item-name" v-if="value.taskType">{{ stage_prefix[value.taskType].key ? activityInfo[stage_prefix[value.taskType].key] : remind(stage_prefix[value.taskType], k) }}</div> <div class="step-item-name flex-column-center " v-if="value.taskType">
<div class="task-type">{{ stage_prefix[value.taskType].key ? activityInfo[stage_prefix[value.taskType].key] : remind(stage_prefix[value.taskType], k) }}</div>
<div class="task-type-edit">
<img src="@/assets/config/icon-edit.png" />
<a>设置条件</a>
</div>
</div>
<div class="step-item-name flex-column-center " v-if="value.taskType">
<div class="task-type">{{ stage_prefix[value.taskType].key ? activityInfo[stage_prefix[value.taskType].key] : remind(stage_prefix[value.taskType], k) }}</div>
<div class="task-type-edit">
<img src="@/assets/config/icon-edit.png" />
<a>编辑内容</a>
</div>
</div>
</div> </div>
<!-- <div class="step-detail-btn" @click="getEmpDetail">详情</div> --> <!-- <div class="step-detail-btn" @click="getEmpDetail">详情</div> -->
</div> </div>
...@@ -122,7 +135,8 @@ ...@@ -122,7 +135,8 @@
</template> </template>
</div> </div>
</div> </div>
<!-- <emp-detail v-if="empVisible" :empVisible="empVisible"></emp-detail> --> <stat-dialog v-if="statVisible" :statVisible="statVisible"></stat-dialog>
<edit-condition v-if="conditionVisible" :conditionVisible="conditionVisible"></edit-condition>
</div> </div>
</template> </template>
<script> <script>
...@@ -179,10 +193,12 @@ const STAGE_PREFIX = Object.freeze({ ...@@ -179,10 +193,12 @@ const STAGE_PREFIX = Object.freeze({
}, },
6: '查询内容:到保日期' 6: '查询内容:到保日期'
}) })
// import empDetail from './empDetail' import statDialog from './statDialog'
import editCondition from './editCondition'
export default { export default {
components: { components: {
// empDetail statDialog,
editCondition
}, },
props: { props: {
stepItem: { stepItem: {
...@@ -201,11 +217,19 @@ export default { ...@@ -201,11 +217,19 @@ export default {
stage_info: STAGE_INFO, stage_info: STAGE_INFO,
stage_time: STAGE_TIME, stage_time: STAGE_TIME,
stage_prefix: STAGE_PREFIX, stage_prefix: STAGE_PREFIX,
empVisible: false empVisible: false,
statVisible: false,
conditionVisible: false
} }
}, },
created() {}, created() {},
methods: { methods: {
showEdit() {
this.conditionVisible = true
},
showStat() {
this.statVisible = true
},
remind(v, k) { remind(v, k) {
if (typeof v == 'string') return v if (typeof v == 'string') return v
if (this.stepItem.label == '保费报价') { if (this.stepItem.label == '保费报价') {
...@@ -396,6 +420,23 @@ export default { ...@@ -396,6 +420,23 @@ export default {
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
margin-top: 8px; margin-top: 8px;
line-height: 20px;
e .task-type {
max-width: calc(100% - 150px);
}
.task-type-edit {
width: 80px;
color: #5850ff;
margin-left: 10px;
img {
width: 14px;
height: 14px;
}
a {
font-size: 12px;
color: #5850ff;
}
}
} }
.calendar-panel { .calendar-panel {
display: grid; display: grid;
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-27 11:29:17
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-22 16:28:03
* @FilePath: \scrm-micro-scene\src\views\journeyConfig\components\relatedActivity.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<GLDialog title="编辑条件" mode="big" class="gl-form-page gl-form-min" @onOk="handleSure" :before-close="handleClose" @onCancel="handleClose" :visible.sync="conditionVisible">
<div class="dialog-body">
<div class="condition-item" v-for="(item, index) in conditionItem" :key="index">
<label>{{ item.label }}:</label>
<span>555</span>
</div>
<div class="condition-panel" v-if="status == 1">
<div class="flex">
<label class="condition-label">企微成员范围:</label>
<div class="condition-select">
<div class="m-b-10">
<el-radio-group v-model="radio">
<el-radio :label="3">全部成员</el-radio>
<el-radio :label="6">指定成员</el-radio>
</el-radio-group>
</div>
<el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i>
选择成员
</el-button>
</div>
</div>
</div>
<div class="condition-panel" v-else-if="status == 2">
<div class="flex">
<label class="condition-label">进入条件:</label>
<div class="condition-select">
<div class="condition-title">自动切换</div>
<div class="condition-input m-t-10">
<span>进入旅程</span>
<el-input></el-input>
<span>天后自动切换到此旅程阶段,排除</span>
<el-input></el-input>
<span>旅程阶段</span>
</div>
</div>
</div>
</div>
<div class="condition-panel" v-else>
<div class="flex-column-center">
<label class="condition-label">进入条件:</label>
<div class="condition-select">
<div class="condition-input">
<span>页面停留</span>
<el-input></el-input>
<span>至</span>
<el-input></el-input>
<span>秒</span>
</div>
</div>
</div>
<div class="flex-column-center">
<label class="require">*</label>
<label class="condition-label">页面配置:</label>
<div class="condition-select">
<div class="condition-input">
<span>当前页面营销活动为</span>
<el-input style="width: 284px;"></el-input>
<a @click="typeVisible=true">编辑页面</a>
</div>
</div>
</div>
</div>
</div>
<GLDialog :bigTitle="'选择成员'" mode="big" :append-to-body="true" :visible.sync="membersVisible" @onOk="handleConfirm" @onCancel="membersVisible = !membersVisible">
<selectEmp ref="membersForm" v-if="membersVisible" :selectData="selectData"></selectEmp>
</GLDialog>
<select-type :typeVisible="typeVisible" v-if="typeVisible" @handleCloseType="handleCloseType"></select-type>
</GLDialog>
</template>
<script>
import selectEmp from './selectEmp'
import selectType from './selectType'
export default {
components: {
selectEmp,
selectType
},
props: {
conditionVisible: Boolean
},
data() {
return {
status: 3,
membersVisible: false,
typeVisible:false,
selectData: [],
conditionItem: [
{
label: '客户旅程'
},
{
label: '旅程阶段'
},
{
label: '手动标记'
},
{
label: '条件类型'
}
]
}
},
methods: {
// 成员弹窗
handleConfirm() {
console.log(this.$refs.membersForm.innerTags)
if (this.$refs.membersForm.innerTags.length) {
// this.basicForm.userList = this.$refs.membersForm.innerTags
this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags)
this.selectData = this.basicForm.userList
this.openMembers()
this.isUpdate = true
this.editStatus = true
} else {
this.$message({
type: 'error',
message: '请选择成员'
})
}
},
handleCloseType() {
this.typeVisible = false
},
handleAddEmp() {
this.membersVisible = true
}
}
}
</script>
<style lang="scss" scoped>
.dialog-body {
padding: 0px 50px;
}
.require {
color: red;
}
.condition-item {
line-height: 30px;
font-size: 14px;
color: #666666;
span {
color: #333333;
}
}
.condition-panel {
background: #f9f9f9;
padding: 20px 80px;
margin-left: 70px;
.flex-column-center {
margin-bottom: 10px;
}
.condition-label {
// width: 100px;
}
.condition-input {
a {
color: #5850ff;
}
/deep/ {
.el-input {
width: 136px;
margin: 0px 4px;
}
.el-input__inner {
height: 32px;
background: #eeeeee;
line-height: 32px;
}
}
}
}
</style>
<template>
<div class="member-wrapper">
<div class="member-left">
<div class="member-title">
预选
<span>仅筛选有外部客户联系人的成员</span>
</div>
<div class="member-content">
<el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent>
<el-form-item label="所在门店/部门" style="margin-bottom: 0;">
<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 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.name" @keyup.enter.native="search" clearable placeholder="请输入姓名搜索"></el-input>
</el-form-item>
<el-form-item label="跟进专员类型">
<el-select v-model="searchForm.status" clearable :size="size" placeholder="全部">
<el-option v-for="item in state" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item>
<el-checkbox v-model="searchForm.checked">仅看跟进专员</el-checkbox>
</el-form-item>-->
<el-form-item style="margin-bottom: 0;">
<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 class="member-checked">
<el-checkbox v-model="checked" @change="checkChange">仅看跟进专员</el-checkbox>
</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(innerTags[idx])">
<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 {
props: ['selectData'],
data() {
return {
state: [],
stateList: [],
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: 'followerName',
formatter: cellValue => {
return cellValue.followerName ? cellValue.followerName : '-'
}
}
]
},
tableEmpData: [],
allTreeData: [],
currentTreeData: [],
innerTags: []
}
},
mounted() {
this.listDepartmentTree(false)
},
methods: {
selectionTable(val) {
console.log(val)
this.innerTags = this.$common.utils.deepClone(val)
// this.$emit('selectTable', val)
},
// 清空搜索条件
resetSearch() {
this.searchForm = {}
this.tableEmpData = this.allTreeData
},
// 显示时触发
onShowPopover() {
this.popoverVisible = true
},
// 隐藏时触发
onHidePopover() {
this.popoverVisible = false
},
unique(arr) {
let res = new Set()
return arr.filter(item => {
let id = JSON.stringify(item)
if (res.has(id)) {
return false
} else {
res.add(id)
return true
}
})
},
listDepartmentTree(isFollowerStaff) {
const params = { addChildrensFlag: true }
this.loading = true
params.isHavCustomer = true
params.isFollowerStaff = isFollowerStaff
this.$apis.journeyConfig.listDepartmentTree(params).then(res => {
console.log(res)
this.loading = false
if (res) {
this.tableEmpData = this.getEmployee(res)
this.allTreeData = this.getEmployee(res)
this.currentTreeData = this.getEmployee(res)
this.treeData = res
this.$refs.empTable.tableHeightValues = this.tableEmpData.length ? '' : '230px'
if (this.selectData && this.selectData.length) {
this.selectData.forEach(item => {
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(item)
})
this.selectData = []
}
res[0].entmicroStaffResponses.forEach(e => {
this.state.push({ value: e.followerTypeId, label: e.followerName })
})
this.state = this.unique(this.state)
} else {
this.treeData = []
}
})
},
handleNodeClick(data) {
console.log(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.tableEmpData = []
const data = this.currentTreeData
const keyword = this.searchForm.name
const status = this.searchForm.status
let arr = []
// this.loading = true
console.log(keyword, data, this.tableEmpData)
if (data instanceof Array) {
if (keyword) {
data.forEach(i => {
if (i.staffName.indexOf(keyword) != -1) {
this.tableEmpData.push(i)
}
})
} else {
console.log(this.allTreeData, '---')
this.tableEmpData = this.allTreeData
}
} else if (data instanceof Object) {
if (data.entmicroStaffResponses) {
if (keyword) {
data.entmicroStaffResponses.forEach(i => {
if (i.staffName.indexOf(keyword) != -1) {
this.tableEmpData.push(i)
}
})
} else {
this.tableEmpData = this.tableEmpData.concat(data.entmicroStaffResponses)
}
}
if (data.children) {
data.children.forEach(i => {
if (i.entmicroStaffResponses) {
i.entmicroStaffResponses.forEach(j => {
if (keyword) {
if (j.staffName.indexOf(keyword) != -1) {
const flag = this.tableEmpData.find(m => m.id == j.id)
if (!flag) {
this.tableEmpData.push(j)
}
}
} else {
const flag = this.tableEmpData.find(m => m.id == j.id)
if (!flag) {
this.tableEmpData.push(j)
}
}
})
}
})
}
}
this.stateList = this.tableEmpData
if (status) {
this.tableEmpData = []
this.stateList.forEach(i => {
if (String(i.followerTypeId).indexOf(status) != -1) {
this.tableEmpData.push(i)
}
})
} else {
this.tableEmpData = this.stateList
}
},
remove(item) {
// var idx = this.innerTags.findIndex(k => k.id == item.id)
// this.innerTags.splice(idx, 1)
if (this.tableEmpData.map(k => k.id).includes(item.id)) {
var i = this.tableEmpData.findIndex(k => k.id == item.id)
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(this.tableEmpData[i])
console.log(item, this.tableEmpData[i])
}
// this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(item)
},
rowClick(row) {
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(row)
},
checkChange(val) {
console.log(val)
this.searchForm = {}
this.listDepartmentTree(val)
}
}
}
</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;
}
}
.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-size: 500;
}
}
.member-left {
width: calc(100% - 286px);
.member-content {
border: 1px solid #eee;
.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>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-22 16:01:13
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-22 17:23:13
* @FilePath: \scrm-micro-scene\src\views\journeyConfig\components\selectType.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<GLDialog title="编辑页面" mode="small" :append-to-body="true" cancelText="取消" okText="下一步" :visible.sync="typeVisible" @onOk="handleConfirm" @onCancel="handleClose" :before-close="handleClose">
<div class="dialog-body flex">
<label>选择页面类型:</label>
<el-radio-group v-model="type">
<el-radio :label="1">营销活动</el-radio>
<el-radio :label="2">营销素材</el-radio>
</el-radio-group>
</div>
<activity-model ref="activity" @selectActivity="selectActivity" :activityList="activityList"></activity-model>
<material-model ref="material" :materialList="materialList" @handleMaterialConfirm="handleMaterialConfirm"></material-model>
</GLDialog>
</template>
<script>
import materialModel from '@/components/model/materialModel'
import activityModel from '@/components/model/activityModel'
export default {
components: {
materialModel,
activityModel
},
props: {
typeVisible: Boolean
},
data() {
return {
type: 1,
materialList: {
name: '素材',
type: 'material',
funName: 'material',
fileType: true,
groupListApi: this.$apis.welcomeword.getGroupListApi,
materialListApi: this.$apis.welcomeword.getMaterialListApi,
params: {
merchant: this.$globalState.session.merchantId
}
},
activityList: [
{
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: {
state: 1
}
},
{
itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid',
status: 2
}
},
{
itemName: '秒杀活动',
itemValue: 5,
itemType: 'activity',
getInterfaceApi: this.$apis.welcomeword.getActivity,
params: {
// activityStatus: 3,
activityStatusList: [1, 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
// }
// },
{
itemName: '众筹活动',
itemValue: 6,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
params: {
currentPage: 1,
activityStatus: 2
}
},
// 膨胀金活动
{
itemName: '膨胀金活动',
itemValue: 7,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.bulgeActivity,
params: {
currentPage: 1,
activityStatus: 2
}
}
]
}
},
methods: {
handleClose() {
this.$emit('handleCloseType')
},
handleConfirm() {
this.$refs.activity.init()
}
}
}
</script>
<style scoped lang="scss"></style>
<template>
<GLDialog title="SOP执行统计" :visible.sync="statVisible" width="70%" :before-close="handleClose" :hasFooter="false">
<div class="dialog-body">
<GLTable v-loading="loading" :hasNum="true" @setTableHeightEvent="setTableHeightEvent" @setTableFinishFun="setTableFinishFun" ref="leadManage" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams"></GLTable>
</div>
</GLDialog>
</template>
<script>
import { getTableList } from '@/api/modules/leadManage'
export default {
props: {
statVisible: Boolean
},
data() {
return {
getListApi: getTableList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'list',
tableColumns: [
{
label: '营销计划',
prop: 'orderNo'
},
{
label: '触达方式',
prop: 'name'
},
{
label: '今日营销客户数',
prop: 'phone'
},
{
label: '今日下发任务数',
prop: 'type',
addHtml: 'type'
},
{
label: '累计营销客户数',
prop: 'status'
},
{
label: '累计下发任务数',
prop: 'userName'
}
]
}
}
},
methods: {
handleClose() {
this.$parent.statVisible = false
}
}
}
</script>
<style scoped lang="scss"></style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!