Commit a96411a2 by 杨明

fixed

1 parent 12cb5fac
...@@ -17,6 +17,107 @@ const findAllByPage = params => { ...@@ -17,6 +17,107 @@ const findAllByPage = params => {
sign: true 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 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 { export default {
findAllByPage findAllByPage,
activityDetail,
activityPage,
activityPageList,
activityCustomerPage,
assignmentCustomer,
activityInsert,
activityUpdate,
queryCrowdGroupTree,
activityGroupList
} }
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http_common } from '@/main'
const pictureUpload = params => {
params.method = 'glsx.accounts.biz.common.pictureUpload'
return http_common({
url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
export default {
pictureUpload
}
/**
* 新增参数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
}
<template>
<div class="button-panel" v-stat="dataAnalyics">
<slot></slot>
</div>
</template>
<script>
export default {
name: 'collect-button',
data() {
return {}
},
props: { dataAnalyics: Object },
directives: {
stat: function(el, binding, vnode) {
el.addEventListener('click', function() {
console.log(binding.value)
})
}
}
}
</script>
<style scoped lang="scss"></style>
...@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) { ...@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) {
Object.assign(request, { timeout }) Object.assign(request, { timeout })
return Promise.resolve(cfg) return Promise.resolve(cfg)
} }
return new Http({ request: { timeout: 100000 } }).get('https://oss-config.test.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config') return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/62947bd8304f1311a3b76a01/activity/config')
// return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config') // return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
} }
export const config = { export const config = {
......
export default {
data() {
return {
crowdGroupUnitList: []
}
},
mounted() {},
methods: {
async queryCrowdGroupTree() {
let params = {
req: {
pageSize: 1000,
pageNum: 1,
merchantId: this.$globalState.session.merchantId,
keyword: ''
}
}
const crowdGroupUnitList = await this.$apis.activity.queryCrowdGroupTree(params)
return 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
}
}
}
...@@ -2,7 +2,9 @@ const staticRoutes = Object.freeze([ ...@@ -2,7 +2,9 @@ const staticRoutes = Object.freeze([
{ {
name: 'activity', name: 'activity',
path: '/', path: '/',
meta: {}, meta: {
title: '活动管理'
},
component: resolve => require([`@/views/activity/index.vue`], resolve) component: resolve => require([`@/views/activity/index.vue`], resolve)
}, },
{ {
...@@ -20,7 +22,7 @@ const staticRoutes = Object.freeze([ ...@@ -20,7 +22,7 @@ const staticRoutes = Object.freeze([
{ {
name: 'config', name: 'config',
path: '/', path: '/',
meta: {}, meta: { title: '活动配置' },
component: resolve => require([`@/views/activityConfig/index.vue`], resolve) component: resolve => require([`@/views/activityConfig/index.vue`], resolve)
} }
]) ])
......
...@@ -3,12 +3,14 @@ import Vue from 'vue' ...@@ -3,12 +3,14 @@ import Vue from 'vue'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import { GLTable, GLButton, GLFooter, GLCombiForm } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLTable, GLButton, GLFooter, GLCombiForm } from 'glsx-components' //权限按钮 (根据权限动态创建)
import collectButton from '@/components/collect-button'
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLFooter) Vue.use(GLFooter)
Vue.use(GLCombiForm) Vue.use(GLCombiForm)
Vue.component(collectButton.name, collectButton)
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
import '@/assets/css/common.scss' import '@/assets/css/common.scss'
let routes = [] let routes = []
......
import { Message } from 'element-ui'
let util = {} let util = {}
util.cloneText = function(message) {
let input = document.createElement('input')
input.value = message
document.body.appendChild(input)
input.select()
input.setSelectionRange(0, input.value.length), document.execCommand('Copy')
document.body.removeChild(input)
Message.success('复制成功')
}
util.getBeforeDate = function(sign = '-') {
let day = new Date()
let month = day.getMonth() + 1
let date = day.getDate()
if (month < 10) month = '0' + month
if (date < 10) date = '0' + date
var s = day.getFullYear() + sign + month + sign + date
return s
}
util.getBeforeMonth = function(days) {
let month = new Date().getMonth() + 1
let year = new Date().getFullYear()
let arr = new Array()
for (let i = 0; i < days; i++) {
if (month <= 0) {
year = year - 1
month = month + 12
}
if (month < 10) month = '0' + month
arr[i] = year + '年' + month + '月'
month--
}
return arr
}
/**
* 格式化时间
* @param {Array} time
*/
util.formatTime = function(time) {
return {
startTime: time ? time[0] + ' ' + '00:00:00' : '',
endTime: time ? time[1] + ' ' + '23:59:59' : ''
}
}
util.tringToDate = function(dateStr, separator) {
if (!separator) {
separator = '-'
}
var dateArr = dateStr.split(separator)
var year = parseInt(dateArr[0])
var month
//处理月份为04这样的情况
if (dateArr[1].indexOf('0') == 0) {
month = parseInt(dateArr[1].substring(1))
} else {
month = parseInt(dateArr[1])
}
var day = parseInt(dateArr[2])
var date = new Date(year, month - 1, day)
return date
}
util.getDay = function(num, str = '-') {
var today = new Date()
var nowTime = today.getTime()
var ms = 24 * 3600 * 1000 * num
today.setTime(parseInt(nowTime + ms))
var oYear = today.getFullYear()
var oMoth = (today.getMonth() + 1).toString()
if (oMoth.length <= 1) oMoth = '0' + oMoth
var oDay = today.getDate().toString()
if (oDay.length <= 1) oDay = '0' + oDay
return oYear + str + oMoth + str + oDay
}
util.openUrl = function(url) {
const link = document.createElement('a')
link.href = url
link.target = '_blank'
link.rel = 'opener'
link.click()
}
util.downloadUrl = function(url) {
const link = document.createElement('a')
link.href = url
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
}
util.getArrayIsSubset = (arr2, arr1) => {
return arr1.every(item => {
return arr2.includes(item)
})
}
util.downloadIamge = function(imgsrc, name = new Date().getTime()) {
//下载图片地址和图片名
var image = new Image()
// 解决跨域 Canvas 污染问题
image.setAttribute('crossOrigin', 'anonymous')
image.onload = function() {
var canvas = document.createElement('canvas')
canvas.width = image.width
canvas.height = image.height
var context = canvas.getContext('2d')
context.drawImage(image, 0, 0, image.width, image.height)
var url = canvas.toDataURL('image/png') //得到图片的base64编码数据
var a = document.createElement('a') // 生成一个a元素
var event = new MouseEvent('click') // 创建一个单击事件
a.download = name || 'photo' // 设置图片名称
a.href = url // 将生成的URL设置为a.href属性
a.dispatchEvent(event) // 触发a的单击事件
}
image.src = imgsrc
}
export default util export default util
<template> <template>
<div class="activity-main"> <div class="activity-main">
<div class="activity-box-f" :style="{ 'min-height': boxHeight + 'px' }"> <div class="activity-box-f" :style="{ 'min-height': boxHeight + 'px' }" v-loading="addLoading">
<div class="activity-box-title">创建活动</div> <div class="activity-box-title">{{ activityId ? '编辑活动' : '创建活动' }}</div>
<div class="activity-box-form"> <div class="activity-box-form">
<el-form ref="addForm" :model="addForm" class="code-body-form" label-width="120px" :rules="addRules"> <el-form ref="addForm" :model="addForm" class="code-body-form" label-width="120px" :rules="addRules">
<el-form-item label="活动名称" prop="name" size="small"> <el-form-item label="活动名称" prop="configName" size="small">
<el-input size="small" v-model.trim="addForm.name" placeholder="请输入活动名称" maxlength="30"></el-input> <el-input size="small" v-model.trim="addForm.configName" placeholder="请输入活动名称" maxlength="20"></el-input>
<div class="activity-name-tips">例:输入“定保客户”,系统推送任务时将自动追加月份信息“5月招揽-定保客户”</div> <div class="activity-name-tips">例:输入“定保客户”,系统推送任务时将自动追加月份信息“5月招揽-定保客户”</div>
</el-form-item> </el-form-item>
<el-form-item label="推送日期" prop="date" size="small"> <el-form-item label="推送日期" prop="sendDate" size="small">
<div class="activity-date"> <div class="activity-date">
每月 每月
<el-input-number v-model="addForm.date" controls-position="right" :min="1" :max="28"></el-input-number> <el-input-number v-model="addForm.sendDate" controls-position="right" :min="1" :max="28"></el-input-number>
号 号
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="推送月份" prop="month" size="small"> <el-form-item label="推送月份" prop="sendMonth" size="small">
<el-radio-group v-model="addForm.month"> <el-radio-group v-model="addForm.sendMonth">
<el-radio :label="1">次月</el-radio> <el-radio :label="1">次月</el-radio>
<el-radio :label="2">当月</el-radio> <el-radio :label="0">当月</el-radio>
</el-radio-group> </el-radio-group>
<div class="activity-name-tips">例:选择“次月”,系统将在设定的推送日期推送次月的待定保客户</div> <div class="activity-name-tips">例:选择“次月”,系统将在设定的推送日期推送次月的待定保客户</div>
</el-form-item> </el-form-item>
<el-form-item label="状态" size="small"> <el-form-item label="状态" size="small">
<el-switch v-model="addForm.value"></el-switch> <el-switch v-model="activityStatus"></el-switch>
{{ addForm.value ? '启用' : '停用' }} {{ activityStatus ? '启用' : '停用' }}
<el-popover placement="top" width="300" trigger="hover" content="停用活动仅会影响下个周期的营销推送,不影响已经生成的招揽活动。"> <el-popover placement="top" width="300" trigger="hover" content="停用活动仅会影响下个周期的营销推送,不影响已经生成的招揽活动。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover> </el-popover>
</el-form-item> </el-form-item>
<el-form-item label="客群" prop="name" size="small"> <el-form-item label="客群" prop="custGroupId" size="small">
<div class="group-item"> <div class="group-item">
<el-select v-model="addForm.value" placeholder="请选择"> <el-select v-model="addForm.custGroupId" placeholder="请选择" @change="selectCrowd(addForm.custGroupId)">
<el-option v-for="item in optionsGroup" :key="item.value" :label="item.label" :value="item.value"></el-option> <el-option v-for="item in crowdGroupUnitList" :key="item.crowdGroupId" :label="item.crowdGroupName" :value="item.crowdGroupId"></el-option>
</el-select> </el-select>
<div class="edit-group">编辑客群</div> <div class="edit-group" @click="jumpCrowd">编辑客群</div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="配置营销" prop="name" size="small"> <el-form-item label="配置营销" prop="name" size="small" v-if="addForm.custGroupId">
<GLTable :hasPage="false" ref="config" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams"> <GLTable :hasPage="false" ref="config" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleConfig(scope.scope)">配置</el-button> <el-button type="text" @click="handleConfig(scope.scope)">配置</el-button>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<el-button size="small" @click="dialogVisible = false"> <el-button size="small" @click="dialogVisible = false">
否 否
</el-button> </el-button>
<el-button size="small" type="primary" @click="handleSure">是</el-button> <el-button size="small" type="primary" @click="handleSureConfig">是</el-button>
</div> </div>
</el-dialog> </el-dialog>
<GLFooter> <GLFooter>
...@@ -71,13 +71,14 @@ ...@@ -71,13 +71,14 @@
<el-button type="primary" @click="handleSure">提交</el-button> <el-button type="primary" @click="handleSure">提交</el-button>
</GLFooter> </GLFooter>
<el-image class="preview-panel" style="width: 100px; height: 0px" ref="imageForm" :src="url" :preview-src-list="srcList"></el-image> <el-image class="preview-panel" style="width: 100px; height: 0px" ref="imageForm" :src="url" :preview-src-list="srcList"></el-image>
<component title="345" :is="'market-config'" ref="configForm" :boxHeight="boxHeight"></component> <component @handleConfigChecked="handleConfigChecked" :is="'market-config'" ref="configForm" :boxHeight="boxHeight"></component>
</div> </div>
</template> </template>
<script> <script>
import url from '@/assets/img/activity/config.png' import url from '@/assets/img/activity/config.png'
import marketConfig from './components/marketConfig.vue' import marketConfig from './components/marketConfig.vue'
import crowd from '@/mixins/crowd'
const optionsGroup = [ const optionsGroup = [
{ {
value: '1', value: '1',
...@@ -93,6 +94,7 @@ const optionsGroup = [ ...@@ -93,6 +94,7 @@ const optionsGroup = [
} }
] ]
export default { export default {
mixins: [crowd],
name: 'addActivity', name: 'addActivity',
components: { components: {
marketConfig marketConfig
...@@ -100,25 +102,34 @@ export default { ...@@ -100,25 +102,34 @@ export default {
data() { data() {
return { return {
url, url,
activityStatus: true,
boxHeight: '', boxHeight: '',
srcList: [url], srcList: [url],
dialogVisible: false, dialogVisible: false,
addLoading: false,
drawer: false, drawer: false,
addForm: {}, addForm: {
sendMonth: 1,
status: 0
},
activityId: '',
optionsGroup, optionsGroup,
tableData: [{}], tableData: [],
tableIndex: 0,
tableParams: { tableParams: {
listName: 'data', listName: 'data',
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '人群', label: '人群',
prop: 'codeRemark' prop: 'crowdName'
}, },
{ {
label: '状态', label: '状态',
prop: 'yesterdayNum', prop: 'welcomeConfigDTOS',
addHtml: 'yesterdayNum' formatter: cellValue => {
return cellValue.welcomeDTOS && cellValue.welcomeDTOS.length ? '已配置' : '未配置'
}
}, },
{ {
label: '操作', label: '操作',
...@@ -128,30 +139,138 @@ export default { ...@@ -128,30 +139,138 @@ export default {
] ]
}, },
addRules: { addRules: {
name: [{ required: true, message: '请输入活动名称', trigger: 'blur' }], configName: [{ required: true, message: '请输入活动名称', trigger: 'blur' }],
date: [{ required: true, message: '请输入推送日期', trigger: 'change' }], sendDate: [{ required: true, message: '请输入推送日期', trigger: 'change' }],
month: [{ required: true, message: '请选择推送月份', trigger: 'change' }] sendMonth: [{ required: true, message: '请选择推送月份', trigger: 'change' }],
custGroupId: [{ required: true, message: '请选择客群', trigger: 'change' }]
} }
} }
}, },
watch: {
addForm: {
handler() {
if (this.addForm.sendDate < new Date().getDate() && this.addForm.sendMonth == 0) {
this.addForm.sendDate = new Date().getDate()
}
},
deep: true
},
// 'addForm.sendMonth'(val) {
// if (val < new Date().getDate() && this.addForm.sendMonth == 0) {
// this.addForm.sendDate = new Date().getDate()
// }
// },
activityStatus(val) {
this.addForm.status = val ? 0 : -1
}
},
methods: { methods: {
handleReset(scope) { handleReset(scope) {
this.tableIndex = this.tableData.findIndex(item => item.crowdId == scope.crowdId)
this.dialogVisible = true this.dialogVisible = true
}, },
//配置
handleConfig(scope) { handleConfig(scope) {
this.$refs.configForm.init() this.tableIndex = this.tableData.findIndex(item => item.groupId == scope.groupId)
let params = {
groupIdList: [scope.crowdId],
custGroupId: this.addForm.custGroupId
}
this.$apis.activity.activityGroupList(params).then(res => {
console.log(res)
})
console.log(this.tableData[this.tableIndex])
this.$refs.configForm.init(this.tableData[this.tableIndex].welcomeDTOS)
},
handleConfigChecked(dtos) {
let welcome = dtos.filter(item => item.attContent)
this.tableData[this.tableIndex].welcomeDTOS = welcome
},
handleSureConfig() {
this.dialogVisible = false
this.tableData[this.tableIndex].welcomeDTOS = []
}, },
handleSure() { handleSure() {
this.$refs['addForm'].validate(valid => { this.$refs['addForm'].validate(valid => {
if (valid) { if (valid) {
console.log(valid) let params = this.addForm
params.configDetailRpcRequests = this.tableData
let activityParams
if (this.activityId) {
activityParams = 'activityUpdate'
} else {
activityParams = 'activityInsert'
}
this.$apis.activity[activityParams](params).then(res => {
if (res) {
this.$router.push('/activityConfig/index')
}
})
}
})
},
//编辑客群
jumpCrowd() {
this.$history.push('/custom/clientDataOverview/grouping')
},
//选择客群
selectCrowd(val) {
let tableData
this.crowdGroupUnitList.forEach(item => {
if (item.crowdGroupId == val) {
tableData = item.crowdUnitList
} }
}) })
this.tableData = tableData.map(item => {
return {
groupId: item.crowdId,
configId: item.crowdId,
crowdName: item.crowdName,
welcomeDTOS: []
}
})
},
activityDetail(id) {
let params = { id }
this.addLoading = true
this.$apis.activity.activityDetail(params).then(res => {
this.addForm = res
const configDetailRpcRequests = res.configDetailRpcResponses
let tableData
this.crowdGroupUnitList.forEach(item => {
if (item.crowdGroupId == res.custGroupId) {
tableData = item.crowdUnitList
}
})
console.log(configDetailRpcRequests)
this.tableData = tableData.map((item, index) => {
return {
groupId: item.crowdId,
configId: item.crowdId,
crowdName: item.crowdName,
welcomeDTOS: configDetailRpcRequests[index] && configDetailRpcRequests[index].welcomeConfigDTOList ? configDetailRpcRequests[index].welcomeConfigDTOList : []
}
})
console.log(this.tableData)
this.activityStatus = this.addForm.status == -1 ? false : true
this.$nextTick(() => {
this.addLoading = false
})
delete this.addForm.configDetailRpcResponses
})
}, },
goBack() { goBack() {
this.$router.push('/activityConfig/index') this.$router.push('/activityConfig/index')
} }
}, },
async created() {
this.activityId = this.$route.query.id
this.crowdGroupUnitList = await this.queryCrowdGroupTree()
if (this.activityId) {
this.activityDetail(this.activityId)
}
},
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.boxHeight = clientHeight - 160 this.boxHeight = clientHeight - 160
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<slot name="title">{{ title }}</slot> <slot name="title">{{ title }}</slot>
</div> </div>
<div class="market-title">营销内容</div> <div class="market-title">营销内容</div>
<div class="market-content"> <div class="market-content" v-if="drawer">
<WelcomeWords ref="welcome" :form="'customer'" :btnList="btnList" :eventBus="eventBus"></WelcomeWords> <WelcomeWords ref="welcome" :form="'customer'" :btnList="btnList" :eventBus="eventBus"></WelcomeWords>
</div> </div>
</div> </div>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-button @click="drawer = false"> <el-button @click="drawer = false">
取消 取消
</el-button> </el-button>
<el-button type="primary" @click="handleSure">提交</el-button> <el-button type="primary" @click="handleSaveConfig">提交</el-button>
</div> </div>
</el-drawer> </el-drawer>
</div> </div>
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<script> <script>
import WelcomeWords from './welcomeWords.vue' import WelcomeWords from './welcomeWords.vue'
import Vue from 'vue'
export default { export default {
name: 'marketConfig', name: 'marketConfig',
components: { components: {
...@@ -39,7 +40,9 @@ export default { ...@@ -39,7 +40,9 @@ export default {
}, },
data() { data() {
return { return {
eventBus: new Vue(),
drawer: false, drawer: false,
welcomeStatus: false,
btnList: [ btnList: [
{ {
id: 1, id: 1,
...@@ -77,8 +80,15 @@ export default { ...@@ -77,8 +80,15 @@ export default {
} }
}, },
methods: { methods: {
init() { init(previewList) {
this.drawer = true this.drawer = true
this.$nextTick(() => {
this.$refs.welcome.updateList(previewList)
})
},
handleSaveConfig() {
this.$emit('handleConfigChecked', this.$refs.welcome.previewList)
this.drawer = false
} }
} }
} }
......
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
<el-dialog title="选择模板" :visible.sync="dialogVisible" width="1142px" :before-close="handleClose" :close-on-click-modal="false"> <el-dialog title="选择模板" :visible.sync="dialogVisible" width="1142px" :before-close="handleClose" :close-on-click-modal="false">
<div class="model-panel"> <div class="model-panel">
<el-form :inline="true" class="message-form" :model="searchForm" ref="searchForm"> <el-form :inline="true" class="message-form" :model="searchForm" ref="searchForm">
<el-form-item label="模板标题"> <el-form-item label="模板标题" size="small">
<el-input v-model="searchForm.title" :size="size" placeholder="请输入模板名称搜索"></el-input> <el-input v-model="searchForm.title" :size="size" placeholder="请输入模板名称搜索"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="创建者"> <el-form-item label="创建者" size="small" style="margin-left: 10px">
<el-select v-model="searchForm.createdBy" :size="size" placeholder="全部"> <el-select v-model="searchForm.createdBy" :size="size" placeholder="全部">
<el-option v-for="item in createdList" :key="item.id" :label="item.createdName" :value="item.createdBy"></el-option> <el-option v-for="item in createdList" :key="item.id" :label="item.createdName" :value="item.createdBy"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item size="small" style="margin-left: 10px">
<el-button type="primary" :size="size" @click="search">查询</el-button> <el-button type="primary" :size="size" @click="search">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item style="float: right;margin-right: 0;"> <el-form-item style="float: right;margin-right: 0;">
......
...@@ -3,20 +3,20 @@ ...@@ -3,20 +3,20 @@
<el-dialog title="分配任务" :visible.sync="dialogVisible" width="60%"> <el-dialog title="分配任务" :visible.sync="dialogVisible" width="60%">
<div class="member-item"> <div class="member-item">
<label>任务提醒:</label> <label>任务提醒:</label>
<el-radio-group v-model="type"> <el-radio-group v-model="immExecutionFlag">
<el-radio :label="1">立即提醒</el-radio> <el-radio :label="true">立即提醒</el-radio>
<el-radio :label="2">指定日期</el-radio> <el-radio :label="false">指定日期</el-radio>
<el-date-picker v-if="type == 2" v-model="value1" type="date" placeholder="选择日期" size="small"></el-date-picker> <el-date-picker v-if="!immExecutionFlag" value-format="yyyy-MM-dd" v-model="sendDate" type="date" placeholder="选择日期" size="small"></el-date-picker>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="member-item"> <div class="member-item">
<label>跟进员工:</label> <label>跟进员工:</label>
<el-radio-group v-model="staffType"> <el-radio-group v-model="flowFirstFlag">
<el-radio :label="1">上一次跟进员</el-radio> <el-radio :label="true">上一次跟进员</el-radio>
<el-radio :label="2">指定员工</el-radio> <el-radio :label="false">指定员工</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="member-wrapper"> <div class="member-wrapper" v-if="!flowFirstFlag">
<div class="member-left"> <div class="member-left">
<div class="member-content"> <div class="member-content">
<el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent> <el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<el-button type="primary" :size="size" @click="search">查询</el-button> <el-button type="primary" :size="size" @click="search">查询</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="table-content" style="max-height: 456px;"> <div class="table-content" :style="{ 'max-height': boxHeight + 'px' }">
<GLTable v-loading="loading" ref="empTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" :noDataImg="url" @selectionTable="selectionTable" @row-click="rowClick"> <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"> <div slot="staffName" slot-scope="scope">
<span>{{ scope.scope.staffName }}</span> <span>{{ scope.scope.staffName }}</span>
...@@ -76,11 +76,12 @@ ...@@ -76,11 +76,12 @@
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
export default { export default {
name: 'SelectMember', name: 'SelectMember',
props: ['selectData'], props: ['customerIds'],
data() { data() {
return { return {
type: 1, immExecutionFlag: true,
staffType: 1, flowFirstFlag: true,
sendDate: '',
dialogVisible: false, dialogVisible: false,
url: url, url: url,
searchForm: {}, searchForm: {},
...@@ -124,21 +125,49 @@ export default { ...@@ -124,21 +125,49 @@ export default {
tableEmpData: [], tableEmpData: [],
allTreeData: [], allTreeData: [],
currentTreeData: [], currentTreeData: [],
innerTags: [] innerTags: [],
boxHeight: 200
} }
}, },
mounted() { mounted() {
this.boxHeight = document.documentElement.clientHeight - 550
this.listDepartmentTree(false) this.listDepartmentTree(false)
}, },
methods: { methods: {
selectionTable(val) { selectionTable(val) {
console.log(val)
this.innerTags = val this.innerTags = val
// this.$emit('selectTable', val) // this.$emit('selectTable', val)
}, },
init() { init() {
this.immExecutionFlag = true
this.flowFirstFlag = true
this.sendDate = ''
this.innerTags = []
this.dialogVisible = true this.dialogVisible = true
}, },
handleSure() {
const { flowFirstFlag, immExecutionFlag, sendDate, customerIds, innerTags } = this
const staffIds = innerTags.map(item => item.staffId)
const activityId = this.$route.query.id
let params = {
flowFirstFlag,
immExecutionFlag,
sendDate,
activityId,
customerIds,
staffIds
}
this.$apis.activity.assignmentCustomer(params).then(res => {
if (res) {
this.$message({
message: '分配成功',
type: 'success'
})
this.$emit('taskFinish')
this.dialogVisible = false
}
})
},
// 清空搜索条件 // 清空搜索条件
resetSearch() { resetSearch() {
this.searchForm = {} this.searchForm = {}
...@@ -157,7 +186,7 @@ export default { ...@@ -157,7 +186,7 @@ export default {
this.loading = true this.loading = true
params.isHavCustomer = true params.isHavCustomer = true
params.isFollowerStaff = isFollowerStaff params.isFollowerStaff = isFollowerStaff
this.$apis.customerTransform.listDepartmentTree(params).then(res => { this.$apis.custom.listDepartmentTree(params).then(res => {
console.log(res) console.log(res)
this.loading = false this.loading = false
if (res) { if (res) {
...@@ -165,7 +194,10 @@ export default { ...@@ -165,7 +194,10 @@ export default {
this.allTreeData = this.getEmployee(res) this.allTreeData = this.getEmployee(res)
this.currentTreeData = this.getEmployee(res) this.currentTreeData = this.getEmployee(res)
this.treeData = res this.treeData = res
this.$refs.empTable.tableHeightValues = this.tableEmpData.length ? '' : '230px'
this.$nextTick(() => {
this.$refs.empTable.tableHeightValues = this.tableEmpData.length ? '' : '230px'
})
if (this.selectData && this.selectData.length) { if (this.selectData && this.selectData.length) {
this.selectData.forEach(item => { this.selectData.forEach(item => {
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(item) this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(item)
...@@ -271,7 +303,7 @@ export default { ...@@ -271,7 +303,7 @@ export default {
transform: rotate(-180deg); transform: rotate(-180deg);
} }
.select-tree { .select-tree {
max-height: 400px; max-height: 300px;
overflow-y: scroll; overflow-y: scroll;
} }
.staff-title { .staff-title {
...@@ -363,10 +395,9 @@ export default { ...@@ -363,10 +395,9 @@ export default {
line-height: 32px; line-height: 32px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%; width: 100%;
height: calc(100% - 86px); height: calc(100% - 186px);
display: flex; display: flex;
align-items: center; align-items: center;
max-height: 500px;
overflow: auto; overflow: auto;
// margin-bottom: 10px; // margin-bottom: 10px;
i { i {
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</template> </template>
<template v-else-if="itm.attType == 7"> <template v-else-if="itm.attType == 7">
<img src="@/assets/img/guestCustom/icon-applet.png" alt /> <img src="@/assets/img/guestCustom/icon-applet.png" alt />
<span :title="itm.attContent.marketingName">{{ itm.attContent.marketingName }}</span> <span :title="JSON.parse(itm.attContent).marketingName">{{ JSON.parse(itm.attContent).marketingName }}</span>
</template> </template>
<template v-else-if="itm.attType == 5"> <template v-else-if="itm.attType == 5">
<img src="@/assets/img/guestCustom/icon-applet.png" alt /> <img src="@/assets/img/guestCustom/icon-applet.png" alt />
...@@ -126,7 +126,8 @@ export default { ...@@ -126,7 +126,8 @@ export default {
sendTime: '', sendTime: '',
sendDate: '', sendDate: '',
editor: {}, editor: {},
textValue: '' textValue: '',
text: ''
} }
}, },
mounted() { mounted() {
...@@ -144,7 +145,8 @@ export default { ...@@ -144,7 +145,8 @@ export default {
// } // }
// this.editor.config.onchangeTimeout = 500 // this.editor.config.onchangeTimeout = 500
// this.editor.create() // this.editor.create()
this.eventBus.$emit('update', this.previewList) console.log(this.previewList)
// this.eventBus.$emit('update', this.previewList)
}, },
methods: { methods: {
selectEmotion() { selectEmotion() {
...@@ -240,22 +242,21 @@ export default { ...@@ -240,22 +242,21 @@ export default {
this.eventBus.$emit('update', this.previewList) this.eventBus.$emit('update', this.previewList)
}, },
textInput(val) { textInput(val) {
console.log(val)
const hasText = this.previewList.some(item => item.attType == 1) const hasText = this.previewList.some(item => item.attType == 1)
if (val) { console.log(hasText)
if (hasText) { if (hasText) {
this.$set(this.previewList, 0, { this.$set(this.previewList, 0, {
attContent: val, attContent: val,
attType: ATT_TYPE.TEXT attType: ATT_TYPE.TEXT
}) })
} else {
this.previewList.unshift({
attContent: val,
attType: ATT_TYPE.TEXT
})
}
} else { } else {
this.previewList.shift(0) this.previewList.unshift({
attContent: val,
attType: ATT_TYPE.TEXT
})
} }
console.log(this.previewList)
}, },
selectActivity(val) { selectActivity(val) {
let idx let idx
...@@ -268,16 +269,17 @@ export default { ...@@ -268,16 +269,17 @@ export default {
if (val) { if (val) {
if (hasActivity) { if (hasActivity) {
this.$set(this.previewList, idx, { this.$set(this.previewList, idx, {
attContent: val, attContent: JSON.stringify(val),
attType: ATT_TYPE.ACTIVITY attType: ATT_TYPE.ACTIVITY
}) })
} else { } else {
this.previewList.push({ this.previewList.push({
attContent: val, attContent: JSON.stringify(val),
attType: ATT_TYPE.ACTIVITY attType: ATT_TYPE.ACTIVITY
}) })
} }
} }
console.log(this.previewList)
}, },
selectMessage(val) { selectMessage(val) {
console.log(val) console.log(val)
...@@ -330,26 +332,28 @@ export default { ...@@ -330,26 +332,28 @@ export default {
this.textInput(str) this.textInput(str)
}, 300), }, 300),
updateList(val) { updateList(val) {
console.log(val)
this.previewList = val this.previewList = val
this.eventBus.$emit('update', this.previewList) // this.eventBus.$emit('update', this.previewList)
const obj = val.find(item => item.attType == 1) const obj = val.find(item => item.attType == 1)
let attContent = obj.attContent.replaceAll('[@昵称]', '<wise id="1">@昵称</wise>') if (obj) {
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) { let attContent = obj.attContent.replaceAll('[@昵称]', '<wise id="1">@昵称</wise>')
let word = res.replace(/\[|\]/gi, '') const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) {
const list = emoji.flat(Infinity) let word = res.replace(/\[|\]/gi, '')
let index = parseInt(list.indexOf(word)) + 1 const list = emoji.flat(Infinity)
if (index < 10) { let index = parseInt(list.indexOf(word)) + 1
index = '00' + index if (index < 10) {
} else if (index >= 10 && index < 100) { index = '00' + index
index = '0' + 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">` }
}) return `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
document.querySelector('.w-textarea_input').focus() })
setTimeout(() => { setTimeout(() => {
document.querySelector('.w-textarea_input').innerHTML = htm document.querySelector('.w-textarea_input').innerHTML = htm
}, 100) }, 100)
} else {
this.textValue = ''
}
} }
} }
} }
......
...@@ -13,16 +13,16 @@ ...@@ -13,16 +13,16 @@
</div> </div>
<el-button size="small" @click="handleDistribution">分配任务</el-button> <el-button size="small" @click="handleDistribution">分配任务</el-button>
</div> </div>
<GLTable @setTableFinishFun="setTableFinishFun" ref="clientManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :pageConf="pageConf" :tableParams="tableParams"> <GLTable @selectionTable="selectionTable" @setTableFinishFun="setTableFinishFun" ref="customForm" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :pageConf="pageConf" :tableParams="tableParams" :pageSizes="[10, 100, 1000, 2000]">
<span slot="customerName" slot-scope="scope"> <span slot="customerName" slot-scope="scope">
<GLFull :labelWidth="70" :identification="`node_${scope.scope.id}`">{{ scope.scope.customerName }}</GLFull> <GLFull :labelWidth="70" :identification="`node_${scope.scope.id}`">{{ scope.scope.customerName }}</GLFull>
</span> </span>
<span slot="customerSex" slot-scope="scope"> <span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : scope.scope.customerSex == 2 ? '女' : '' }}</span> <span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : scope.scope.customerSex == 2 ? '女' : '' }}</span>
</span> </span>
<div slot="followStaff" class="entmicro" slot-scope="scope"> <div slot="followName" class="entmicro" slot-scope="scope">
<div v-if="!followList(scope.scope.followStaff).length">--</div> <div v-if="!followList(scope.scope.followName).length">--</div>
<div class="entmicro-tag" style="padding-right:3px" v-for="(tag, idx) in followList(scope.scope.followStaff)" :key="idx"> <div class="entmicro-tag" style="padding-right:3px" v-for="(tag, idx) in followList(scope.scope.followName)" :key="idx">
<el-tooltip effect="dark" :content="tag" placement="top"> <el-tooltip effect="dark" :content="tag" placement="top">
<el-tag type="info" class="ellipsis-1" v-if="idx < 2" :disable-transitions="false"> <el-tag type="info" class="ellipsis-1" v-if="idx < 2" :disable-transitions="false">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
...@@ -30,11 +30,11 @@ ...@@ -30,11 +30,11 @@
</el-tag> </el-tag>
</el-tooltip> </el-tooltip>
<el-tag type="info" v-if="followList(scope.scope.followStaff).length > 2 && idx == 2"> <el-tag type="info" v-if="followList(scope.scope.followName).length > 2 && idx == 2">
<el-popover placement="top" width="600" trigger="hover"> <el-popover placement="top" width="600" trigger="hover">
<div slot="reference">...({{ followList(scope.scope.followStaff).length }})</div> <div slot="reference">...({{ followList(scope.scope.followName).length }})</div>
<div class="entmicro-hover"> <div class="entmicro-hover">
<el-tag style="margin-left:4px" type="info" v-for="(i, index) in followList(scope.scope.followStaff)" :key="index" :disable-transitions="false"> <el-tag style="margin-left:4px" type="info" v-for="(i, index) in followList(scope.scope.followName)" :key="index" :disable-transitions="false">
<i class="el-icon-user-solid" style="color: #75acff"></i> <i class="el-icon-user-solid" style="color: #75acff"></i>
{{ i }} {{ i }}
</el-tag> </el-tag>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</div> </div>
<!-- 企微名称 --> <!-- 企微名称 -->
<div slot="nickNameList" slot-scope="scope" class="expandImg"> <div slot="nickNameList" slot-scope="scope" class="expandImg">
<div v-if="!scope.scope.nickNameList.length">--</div> <div v-if="!scope.scope.nickNameList || !scope.scope.nickNameList.length">--</div>
<div v-for="(list, idx) in scope.scope.nickNameList" :key="idx"> <div v-for="(list, idx) in scope.scope.nickNameList" :key="idx">
<div v-if="idx == 0"> <div v-if="idx == 0">
<span>{{ list.nickName }}</span> <span>{{ list.nickName }}</span>
...@@ -64,63 +64,58 @@ ...@@ -64,63 +64,58 @@
<span slot="customerPhone" slot-scope="scope"> <span slot="customerPhone" slot-scope="scope">
<span>{{ scope.scope.customerPhone == null ? '--' : scope.scope.customerPhone }}</span> <span>{{ scope.scope.customerPhone == null ? '--' : scope.scope.customerPhone }}</span>
</span> </span>
<span slot="addWay" slot-scope="scope">
<el-tooltip effect="dark" :content="toLabel(scope.scope.addWay)" placement="top">
<span style="display: inline-block; max-width: 120px; text-align: left">{{ toLabel(scope.scope.addWay) }}</span>
</el-tooltip>
</span>
<span slot="isJoin" slot-scope="scope"> <span slot="isJoin" slot-scope="scope">
<span>{{ scope.scope.isJoin ? '是' : '否' }}</span> <span>{{ scope.scope.isJoin ? '是' : '否' }}</span>
</span> </span>
<span slot="status" slot-scope="scope"> <div slot="followFlag" slot-scope="scope">
<span class="statusText"> <div class="statusText">
<span :class="{ circleStatusGray: scope.scope.status === -1, circleStatusGreen: scope.scope.status == 0 }"></span> <span :class="{ circleStatusGray: scope.scope.followFlag === 0, circleStatusGreen: scope.scope.followFlag == 1 }"></span>
<span>{{ statusText(scope.scope.status) }}</span> <span>{{ statusText(scope.scope.followFlag) }}</span>
</span> </div>
</span> </div>
<!-- <template slot="auth-button" slot-scope="scope" :data="scope.scope"> <!-- <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<auth-button :data="scope.scope"></auth-button> <auth-button :data="scope.scope"></auth-button>
<span @click="goDetail(scope.scope.oneId)" class="blue-text">详情</span> <span @click="goDetail(scope.scope.oneId)" class="blue-text">详情</span>
</template> --> </template> -->
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="goDetail(scope.scope.oneId)">详情</el-button> <el-button type="text" @click="goDetail(scope.scope)">详情</el-button>
<!-- <GLButton @click="goDetail(scope.scope.oneId)" fn="客户详情" type="text">详情</GLButton> --> <!-- <GLButton @click="goDetail(scope.scope.oneId)" fn="客户详情" type="text">详情</GLButton> -->
</div> </div>
</GLTable> </GLTable>
</div> </div>
</div> </div>
<select-member ref="memberForm"></select-member> <select-member ref="memberForm" @taskFinish="taskFinish" :customerIds="customerIds"></select-member>
</div> </div>
</template> </template>
<script> <script>
import selectMember from './components/selectMember.vue' import selectMember from './components/selectMember.vue'
import crowd from '@/mixins/crowd'
export default { export default {
components: { selectMember }, components: { selectMember },
mixins: [crowd],
name: 'clientManage', name: 'clientManage',
data() { data() {
return { return {
isReload: true, isReload: true,
sloading: false, sloading: false,
searchForm: { searchForm: {},
addWay: '', customerIds: [],
isJoin: null
},
searchFormTable: {}, searchFormTable: {},
clientManageFormList: [ clientManageFormList: [
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
// prop: 'customerPhone', // prop: 'customerPhone',
name: 'customerPhone', name: 'keyword',
label: '姓名电话', label: '姓名电话',
placeholder: '输入关键字搜索' placeholder: '输入关键字搜索'
}, },
{ {
type: 'select', type: 'select',
// prop: 'isJoin', // prop: 'isJoin',
name: 'isJoin', name: 'distributeFlag',
label: '是否分配', label: '是否分配',
placeholder: '请选择', placeholder: '请选择',
optionLabel: 'label', optionLabel: 'label',
...@@ -154,8 +149,8 @@ export default { ...@@ -154,8 +149,8 @@ export default {
}, },
{ {
type: 'select', type: 'select',
name: 'followStaff', name: 'staffId',
// prop: 'followStaff', // prop: 'staffId',
noFilter: false, noFilter: false,
optionLabel: 'label', optionLabel: 'label',
optionId: 'value', optionId: 'value',
...@@ -166,7 +161,7 @@ export default { ...@@ -166,7 +161,7 @@ export default {
{ {
type: 'select', type: 'select',
// prop: 'status', // prop: 'status',
name: 'status', name: 'followFlag',
label: '跟进状态', label: '跟进状态',
placeholder: '请选择当前状态', placeholder: '请选择当前状态',
optionLabel: 'optionLabel', optionLabel: 'optionLabel',
...@@ -178,43 +173,34 @@ export default { ...@@ -178,43 +173,34 @@ export default {
}, },
{ {
optionLabel: '已跟进', optionLabel: '已跟进',
optionId: 0 optionId: 1
}, },
{ {
optionLabel: '未跟进', optionLabel: '未跟进',
optionId: -1 optionId: 0
} }
] ]
}, },
{ {
type: 'select',
// prop: 'status',
name: 'status',
label: '人群分组', label: '人群分组',
placeholder: '请选择当前状态', name: 'groupId',
optionLabel: 'optionLabel', type: 'select',
optionId: 'optionId', optionLabel: 'crowdName',
optionList: [ optionId: 'crowdId',
{ optionList: []
optionLabel: '全部',
optionId: null
},
{
optionLabel: '正常',
optionId: 0
},
{
optionLabel: '删除好友',
optionId: -1
}
]
} }
], ],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableParams: { tableParams: {
listName: 'data',
tableOption: false, tableOption: false,
listName: 'data',
// 行数据的key
mutiSelectUniqueKey: 'customerId',
checkSelectKey: 'customerId',
// 多选ref的名称
mutiSelectName: 'activityList',
checkSelectVal: [],
tableColumns: [ tableColumns: [
{ {
label: '客户姓名', label: '客户姓名',
...@@ -232,29 +218,35 @@ export default { ...@@ -232,29 +218,35 @@ export default {
label: '联系电话', label: '联系电话',
prop: 'customerPhone', prop: 'customerPhone',
addHtml: 'customerPhone', addHtml: 'customerPhone',
minWidth: 130 width: 130
}, },
{ {
label: '人群分组', label: '人群分组',
prop: 'customerSex', prop: 'groupName'
addHtml: 'customerSex'
}, },
{ {
label: '是否分配', //1. 加入,0.未加入 label: '是否分配', //1. 加入,0.未加入
prop: 'isJoin', prop: 'distributeFlag',
addHtml: 'isJoin', formatter: cellValue => {
return cellValue.distributeFlag ? '是' : '否'
},
width: 120 width: 120
}, },
{ {
label: '分配日期',
prop: 'distributeDate',
width: 180
},
{
label: '跟进员工', label: '跟进员工',
prop: 'followStaff', prop: 'followName',
addHtml: 'followStaff' addHtml: 'followName'
}, },
{ {
label: '跟进状态', label: '跟进状态',
prop: 'status', prop: 'followFlag',
addHtml: 'status', addHtml: 'followFlag',
minWidth: 130 minWidth: 130
}, },
{ {
...@@ -266,10 +258,10 @@ export default { ...@@ -266,10 +258,10 @@ export default {
} }
] ]
}, },
getListApi: this.$apis.activity.findAllByPage, getListApi: this.$apis.activity.activityCustomerPage,
merchantModel: 1, merchantModel: 1,
sourceList: [], sourceList: [],
followstaffList: [], staffIdList: [],
queryFlag: 0, queryFlag: 0,
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店 accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
flushTime: false flushTime: false
...@@ -278,19 +270,24 @@ export default { ...@@ -278,19 +270,24 @@ export default {
// activated() { // activated() {
// this.searchTable() // this.searchTable()
// }, // },
created() {},
beforeDestroy() { beforeDestroy() {
this.$message.closeAll() this.$message.closeAll()
}, },
methods: { methods: {
selectionTable(val) {
this.customerIds = val.map(item => item.customerId)
},
//分配任务 //分配任务
handleDistribution() { handleDistribution() {
if (this.customerIds.length == 0) {
this.$message({
showClose: true,
duration: 3000,
message: '请勾选需要被分配的客户后,再进行分配任务。'
})
return
}
this.$refs.memberForm.init() this.$refs.memberForm.init()
this.$message({
showClose: true,
duration: 3000,
message: '请勾选需要被分配的客户后,再进行分配任务。'
})
}, },
followList(str) { followList(str) {
if (!str) { if (!str) {
...@@ -299,19 +296,32 @@ export default { ...@@ -299,19 +296,32 @@ export default {
return str.split(',') return str.split(',')
}, },
statusText(text) { statusText(text) {
return text === -1 ? '删除好友' : text === 0 ? '正常' : '' return text === 1 ? '已跟进' : text === 0 ? '未跟进' : '--'
}, },
setTableHeightEvent() { setTableHeightEvent() {
this.$refs.clientManage.setTableHeightFun() this.$refs.customForm.setTableHeightFun()
}, },
setTableFinishFun(content) { setTableFinishFun(content) {
this.$refs.clientManage.data.length ? (this.$refs.clientManage.tableHeightValues = '') : this.$refs.clientManage.setTableHeightFun() if (content && content.length) {
content.forEach(item => {
item.distributeFlag && this.tableParams.checkSelectVal.push(item.customerId)
})
this.$refs.customForm.tableHeightValues = ''
} else {
this.$refs.customForm.setTableHeightFun()
}
}, },
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
if (/^1[3456789]\d{9}$/.test(params.keyword)) {
params.customerPhone = params.keyword
} else {
params.customerName = params.keyword
}
params.id = this.$route.query.id
if (params.daterange) { if (params.daterange) {
params.beginTime = this.searchForm.daterange[0] params.beginTime = this.searchForm.daterange[0].replace(/-/g, '/')
params.endTime = this.searchForm.daterange[1] params.endTime = this.searchForm.daterange[1].replace(/-/g, '/')
} else { } else {
if (params.beginTime) delete params.beginTime && delete params.endTime if (params.beginTime) delete params.beginTime && delete params.endTime
} }
...@@ -319,35 +329,7 @@ export default { ...@@ -319,35 +329,7 @@ export default {
return params return params
}, },
beforeSearchFn() { beforeSearchFn() {
// return new Promise((resolve, reject) => {
// this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// if (this.searchFormTable.daterange) {
// this.searchFormTable.beginTime = this.searchForm.daterange[0]
// this.searchFormTable.endTime = this.searchForm.daterange[1]
// delete this.searchFormTable.daterange
// } else {
// if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
// }
// resolve()
// })
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
if (Object.keys(this.$route.query).length && this.queryFlag == 0) {
const res = JSON.parse(window.localStorage.getItem('sourceList'))
let add_way = this.$route.query.addWay || ''
let isJoinVal = this.$route.query.isJoin || null
let addWayObj = res.find(i => i.label === add_way)
let addWayVal = addWayObj.value
this.searchForm.addWay = addWayVal
this.searchForm.isJoin = isJoinVal === null ? null : Number(isJoinVal)
window.history.pushState(null, null, location.origin + location.pathname)
setTimeout(() => {
this.$refs.combiForm.expandFn()
}, 100)
// document.querySelector('.operate').lastElementChild.click()
this.queryFlag = 1
}
this.searchFormTable = this.getParams() this.searchFormTable = this.getParams()
resolve() resolve()
}) })
...@@ -363,34 +345,86 @@ export default { ...@@ -363,34 +345,86 @@ export default {
return curElement.label return curElement.label
}, },
taskFinish() {
this.searchTable()
},
//搜索表格 //搜索表格
searchTable() { searchTable() {
this.$refs.clientManage.refreshTable() this.$refs.customForm.refreshTable()
}, },
//重置表格 //重置表格
resetTable() { resetTable() {
this.searchForm = {} this.searchForm = {}
this.$refs.clientManage.refreshTable() this.$refs.customForm.refreshTable()
// 点击之后强制页面刷新 // 点击之后强制页面刷新
// this.reload() // this.reload()
// this.$forceUpdate() // 没用 // this.$forceUpdate() // 没用
// this.$router.go(0)//没有预期效果,会出现一段空白页,用户体验不好 // this.$router.go(0)//没有预期效果,会出现一段空白页,用户体验不好
// location.reload() //没有预期效果,会出现一段空白页,用户体验不好 // location.reload() //没有预期效果,会出现一段空白页,用户体验不好
}, },
goDetail(id) { goDetail(scope) {
this.$router.push({ this.$history.push('/custom/clientManage/clientDetail?id=' + scope.nickNameList[0].oneId)
path: '/clientManage/clientDetail', },
query: { //获取跟进员工
id: id getStaffList() {
this.$apis.custom.getStaffList({}).then(res => {
if (res.length == 0) {
return ''
} }
const index = this.clientManageFormList.findIndex(item => {
return item.name == 'staffId'
})
const staff = res.map(item => {
return {
label: item.staffName,
value: item.id
}
})
staff.unshift({ label: '全部', value: '' })
this.clientManageFormList.find(item => item.name == 'staffId').optionList = staff
console.log(this.tagsPartFormList[index])
})
},
queryCrowdTree() {
const params = {
req: {
pageSize: 1000,
pageNum: 1,
merchantId: this.$globalState.session.merchantId,
crowdType: 3
}
}
this.$apis.custom.queryCrowdTree(params).then(res => {
this.clientManageFormList.find(item => item.name == 'groupId').optionList = res.crowdUnitList
}) })
} }
}, },
mounted() {} async mounted() {
this.getStaffList()
this.queryCrowdTree()
this.clientManageFormList.find(item => item.name == 'custGroupId').optionList = await this.queryCrowdGroupTree()
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.statusText {
> span:first-child {
width: 6px;
height: 6px;
border-radius: 50%;
display: inline-block;
vertical-align: middle;
margin-right: 8px;
&.circleStatusGreen {
background: #2cca74;
}
&.circleStatusGray {
background: #c6c6c6;
}
}
}
.expandImg { .expandImg {
display: flex; display: flex;
// justify-content: center; // justify-content: center;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm 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"> <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"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<GLButton type="text" @click="handleDetail(scope.scope)" fn="智能营销配置">查看配置</GLButton> <el-button type="text" @click="handleDistribution(scope.scope)">任务分配</el-button>
<!-- <GLButton :disabled="scope.scope.imStatus!=1" type="text" @click="handleStatistics(scope.scope)" fn="营销统计">营销统计</GLButton> --> <!-- <GLButton :disabled="scope.scope.imStatus!=1" type="text" @click="handleStatistics(scope.scope)" fn="营销统计">营销统计</GLButton> -->
</div> </div>
</GLTable> </GLTable>
...@@ -20,46 +20,31 @@ ...@@ -20,46 +20,31 @@
<script> <script>
import url from '@/assets/img/empty.png' import url from '@/assets/img/empty.png'
import crowd from '@/mixins/crowd'
export default { export default {
name: 'activity', name: 'activity',
mixins: [crowd],
data() { data() {
return { return {
url: url, url: url,
tableSearchForm: { tableSearchForm: {
imName: '', groupTypeId: '',
imStatus: '', activityName: '',
createTime: '' createTime: ''
}, },
searchFormData: [ searchFormData: [
{ {
label: '人群类型', label: '人群类型',
name: 'imStatus', name: 'groupTypeId',
type: 'select', type: 'select',
placeholder: '请选择', placeholder: '请选择',
optionId: 'value', optionId: 'crowdGroupId',
optionLabel: 'label', optionLabel: 'crowdGroupName',
optionList: [ optionList: []
{
value: '',
label: '全部'
},
{
value: '1',
label: '定保'
},
{
value: '2',
label: '首保'
},
{
value: '3',
label: '流失'
}
]
}, },
{ {
label: '活动名称', label: '活动名称',
name: 'imName', name: 'activityName',
type: 'input', type: 'input',
placeholder: '输入关键字搜索' placeholder: '输入关键字搜索'
}, },
...@@ -83,48 +68,43 @@ export default { ...@@ -83,48 +68,43 @@ export default {
}, },
createTime: '', createTime: '',
dialogVisible: true, dialogVisible: true,
getListApi: this.$apis.activity.findAllByPage, getListApi: this.$apis.activity.activityPageList,
tableParams: { tableParams: {
listName: 'data',
tableOption: false, tableOption: false,
checkSelectKey: 'id',
checkSelectVal: [],
hasNum: false,
listName: 'data',
tableColumns: [ tableColumns: [
{ {
label: '门店编号',
prop: 'imName'
},
{
label: '活动名称', label: '活动名称',
prop: 'customerCount', prop: 'activityName'
width: '120px'
}, },
{ {
label: '人群类型', label: '人群类型',
prop: 'imStatusName' prop: 'groupTypeIdName'
}, },
{ {
label: '客户总数', label: '客户总数',
prop: 'createdTime', prop: 'customerCount'
width: '180px'
}, },
{ {
label: '已跟进', label: '已跟进',
prop: 'createdName', prop: 'followCustomerCount'
width: '220px'
}, },
{ {
label: '已返厂', label: '已到店',
prop: 'createdName', prop: 'retCustomerCount'
width: '220px'
}, },
{ {
label: '创建日期', label: '创建日期',
prop: 'createdName', prop: 'createdTime',
width: '220px' width: '220px'
}, },
{ {
label: '操作', label: '操作',
prop: 'optionBtns', prop: 'optionBtns',
width: '180px', width: '90px',
addHtml: 'optionBtns', addHtml: 'optionBtns',
fixed: 'right' fixed: 'right'
} }
...@@ -138,24 +118,16 @@ export default { ...@@ -138,24 +118,16 @@ export default {
} }
} }
}, },
watch: { async mounted() {
// createTime(value) { this.searchFormData.find(item => (item.name = 'groupTypeId')).optionList = await this.queryCrowdGroupTree()
// if (value) {
// this.tableSearchForm.beginTime = value[0]
// this.tableSearchForm.endTime = value[1]
// } else {
// delete this.tableSearchForm.beginTime
// delete this.tableSearchForm.endTime
// }
// }
}, },
methods: { methods: {
handleSearch() { handleSearch() {
this.$refs.employeeRef.refreshTable() this.$refs.taskForm.refreshTable()
}, },
handleReset() { handleReset() {
this.tableSearchForm = {} this.tableSearchForm = {}
this.$refs.employeeRef.refreshTable() this.$refs.taskForm.refreshTable()
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
...@@ -163,22 +135,15 @@ export default { ...@@ -163,22 +135,15 @@ export default {
this.tableSearchForm.beginTime = new Date(this.tableSearchForm.createTime[0]).toLocaleDateString().replace(/-/g, '/') this.tableSearchForm.beginTime = new Date(this.tableSearchForm.createTime[0]).toLocaleDateString().replace(/-/g, '/')
this.tableSearchForm.endTime = new Date(this.tableSearchForm.createTime[1]).toLocaleDateString().replace(/-/g, '/') this.tableSearchForm.endTime = new Date(this.tableSearchForm.createTime[1]).toLocaleDateString().replace(/-/g, '/')
} }
// delete this.tableSearchForm.createTime delete this.tableSearchForm.createTime
resolve() resolve()
}) })
}, },
setTableFinishFun() { setTableFinishFun() {
this.$refs.taskForm.data.length ? (this.$refs.taskForm.tableHeightValues = '') : this.$refs.taskForm.setTableHeightFun() this.$refs.taskForm.data.length ? (this.$refs.taskForm.tableHeightValues = '') : this.$refs.taskForm.setTableHeightFun()
}, },
handleImport() {}, handleDistribution(scope) {
addConfig() { this.$router.push('/activity/distribution?id=' + scope.id)
this.$router.push('/market/config')
},
handleDetail(scope) {
this.$router.push('/market/configDetail/' + scope.id)
},
handleStatistics(scope) {
this.$router.push('/market/effect/' + scope.id)
} }
} }
} }
......
<template> <template>
<div class="activity-main"> <div class="activity-main">
<div class="activity-main-header"> <div class="activity-main-header">
<el-button data-title="新增营销" type="primary" size="small" @click="handleAdd" fn="新增营销"> <collect-button>
<i class="el-icon-plus"></i> <el-button data-title="新增营销" type="primary" size="small" @click="handleAdd()" fn="新增营销">
创建活动 <i class="el-icon-plus"></i>
</el-button> 创建活动
<label>配置门店轻改专家,形成业务活码,客户可通过「精品升级」订单扫码来添加该员工。</label> </el-button>
</collect-button>
<collect-button dataAnalyics="{page:1}">
<label>配置门店轻改专家,形成业务活码,客户可通过「精品升级」订单扫码来添加该员工。</label>
</collect-button>
</div> </div>
<div class="activity-tabel scrm-box-f"> <div class="activity-tabel scrm-box-f">
<div class="activity-tabel-form"> <div class="activity-tabel-form">
<GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable @setTableFinishFun="setTableFinishFun" ref="taskForm" :noDataImg="url" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable @setTableFinishFun="setTableFinishFun" ref="taskForm" :noDataImg="url" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="status" slot-scope="scope">
<el-switch v-model="scope.scope.status" :active-value="0" :inactive-value="-1" @change="changeSwitch(scope.scope)"></el-switch>
{{ scope.scope.status == 0 ? '启用' : '停用' }}
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<GLButton type="text" @click="handleDetail(scope.scope)" fn="智能营销配置">查看配置</GLButton> <el-button type="text" @click="handleAdd(scope.scope)" fn="智能营销配置">编辑</el-button>
<!-- <GLButton :disabled="scope.scope.imStatus!=1" type="text" @click="handleStatistics(scope.scope)" fn="营销统计">营销统计</GLButton> --> <!-- <GLButton :disabled="scope.scope.imStatus!=1" type="text" @click="handleStatistics(scope.scope)" fn="营销统计">营销统计</GLButton> -->
</div> </div>
</GLTable> </GLTable>
<div v-show="false"> <div v-show="false">
<div class="nodata-panel"> <div class="nodata-panel">
尚未创建活动, 尚未创建活动,
<a @click="handleAdd">前往创建</a> <a @click="handleAdd()">前往创建</a>
</div> </div>
</div> </div>
</div> </div>
...@@ -29,46 +37,31 @@ ...@@ -29,46 +37,31 @@
<script> <script>
import url from '@/assets/img/empty.png' import url from '@/assets/img/empty.png'
import crowd from '@/mixins/crowd'
export default { export default {
name: 'config', name: 'activityConfig',
mixins: [crowd],
data() { data() {
return { return {
url: url, url: url,
tableSearchForm: { tableSearchForm: {
imName: '', custGroupId: '',
imStatus: '', configName: '',
createTime: '' createTime: ''
}, },
searchFormData: [ searchFormData: [
{ {
label: '人群类型', label: '人群类型',
name: 'imStatus', name: 'custGroupId',
type: 'select', type: 'select',
placeholder: '请选择', placeholder: '请选择',
optionId: 'value', optionId: 'crowdGroupId',
optionLabel: 'label', optionLabel: 'crowdGroupName',
optionList: [ optionList: []
{
value: '',
label: '全部'
},
{
value: '1',
label: '待定保客户'
},
{
value: '2',
label: '待首保客户'
},
{
value: '3',
label: '流失客户'
}
]
}, },
{ {
label: '活动名称', label: '活动名称',
name: 'imName', name: 'configName',
type: 'input', type: 'input',
placeholder: '输入关键字搜索' placeholder: '输入关键字搜索'
}, },
...@@ -92,44 +85,42 @@ export default { ...@@ -92,44 +85,42 @@ export default {
}, },
createTime: '', createTime: '',
dialogVisible: true, dialogVisible: true,
getListApi: this.$apis.activity.findAllByPage, getListApi: this.$apis.activity.activityPage,
tableParams: { tableParams: {
listName: 'data', listName: 'data',
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '活动名称', label: '活动名称',
prop: 'customerCount', prop: 'configName'
width: '120px'
}, },
{ {
label: '人群类型', label: '人群类型',
prop: 'imStatusName' prop: 'custTypeName'
}, },
{ {
label: '推送日期', label: '推送日期',
prop: 'createdTime', prop: 'sendDate',
width: '180px' width: '180px'
}, },
{ {
label: '创建人', label: '创建人',
prop: 'createdName', prop: 'createdByName'
width: '220px'
}, },
{ {
label: '创建日期', label: '创建日期',
prop: 'createdName', prop: 'createdTime',
width: '220px' width: '220px'
}, },
{ {
label: '状态', label: '状态',
prop: 'createdName', prop: 'status',
width: '220px' addHtml: 'status'
}, },
{ {
label: '操作', label: '操作',
prop: 'optionBtns', prop: 'optionBtns',
width: '180px', width: '100px',
addHtml: 'optionBtns', addHtml: 'optionBtns',
fixed: 'right' fixed: 'right'
} }
...@@ -143,16 +134,8 @@ export default { ...@@ -143,16 +134,8 @@ export default {
} }
} }
}, },
watch: { async mounted() {
// createTime(value) { this.searchFormData.find(item => (item.name = 'custGroupId')).optionList = await this.queryCrowdGroupTree()
// if (value) {
// this.tableSearchForm.beginTime = value[0]
// this.tableSearchForm.endTime = value[1]
// } else {
// delete this.tableSearchForm.beginTime
// delete this.tableSearchForm.endTime
// }
// }
}, },
methods: { methods: {
handleSearch() { handleSearch() {
...@@ -165,16 +148,28 @@ export default { ...@@ -165,16 +148,28 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
if (this.tableSearchForm.createTime) { if (this.tableSearchForm.createTime) {
this.tableSearchForm.beginTime = new Date(this.tableSearchForm.createTime[0]).toLocaleDateString().replace(/-/g, '/') this.tableSearchForm.beginTime = new Date(this.tableSearchForm.createTime[0]).toLocaleDateString().replace(/\//g, '-')
this.tableSearchForm.endTime = new Date(this.tableSearchForm.createTime[1]).toLocaleDateString().replace(/-/g, '/') this.tableSearchForm.endTime = new Date(this.tableSearchForm.createTime[1]).toLocaleDateString().replace(/\//g, '-')
} }
// delete this.tableSearchForm.createTime delete this.tableSearchForm.createTime
resolve() resolve()
}) })
}, },
handleImport() {}, handleAdd(scope) {
handleAdd() { let editParams = scope ? '?id=' + scope.id : ''
// this.$router.push('/activity/addActivity') this.$router.push('/activity/addActivity' + editParams)
},
changeSwitch(scope) {
this.$apis.activity
.activityUpdate({
id: scope.id,
status: scope.status
})
.then(res => {
if (res) {
this.handleSearch()
}
})
}, },
setTableFinishFun() { setTableFinishFun() {
if (this.$refs.taskForm.data.length) { if (this.$refs.taskForm.data.length) {
...@@ -198,12 +193,6 @@ export default { ...@@ -198,12 +193,6 @@ export default {
document.querySelector('.noDataText').append(cloneNode) document.querySelector('.noDataText').append(cloneNode)
this.$refs.taskForm.setTableHeightFun() this.$refs.taskForm.setTableHeightFun()
} }
},
handleDetail(scope) {
this.$router.push('/market/configDetail/' + scope.id)
},
handleStatistics(scope) {
this.$router.push('/market/effect/' + scope.id)
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!