Commit 56bc67f3 by xuyl

更新代码

1 parent e7f00739
...@@ -72,7 +72,7 @@ export function customerClusterListExport(params) { ...@@ -72,7 +72,7 @@ export function customerClusterListExport(params) {
export function customerClusterListShow(params) { export function customerClusterListShow(params) {
params.method = 'scrm.api.datahub.crowdgroup.queryCrowdGroupList' params.method = 'scrm.api.datahub.crowdgroup.queryCrowdGroupList'
return http3({ return http3({
// https://scrm.dev.glsx.com.cn // http://scrm.dev.glsx.com.cn
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
...@@ -83,10 +83,10 @@ export function customerClusterListShow(params) { ...@@ -83,10 +83,10 @@ export function customerClusterListShow(params) {
// 通过分群Id查询人群列表详情请求 // 通过分群Id查询人群列表详情请求
export function marketingPeopleListShow(params) { export function marketingPeopleListShow(params) {
params.method = 'scrm.api.datahub.crowdgroup.queryCrowdListByCrowdGroupId' params.method = 'scrm.api.sop.crowd.listWithSop'
return http3({ return http3({
// http://192.168.3.226:9636 // http://192.168.3.226:9636
url: '/rop-scrm-datahub/router', url: '/rop-scrm-sop/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
...@@ -109,7 +109,7 @@ export function searchCrowdIdByCrowdname(params) { ...@@ -109,7 +109,7 @@ export function searchCrowdIdByCrowdname(params) {
const deleteSopEventApi = params => { const deleteSopEventApi = params => {
params.method = 'scrm.api.sop.sopInfo.delete' params.method = 'scrm.api.sop.sopInfo.delete'
return http({ return http({
url: 'rop-scrm-sop/router', url: '/rop-scrm-sop/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
...@@ -121,7 +121,7 @@ const deleteSopEventApi = params => { ...@@ -121,7 +121,7 @@ const deleteSopEventApi = params => {
const endSopEventApi = params => { const endSopEventApi = params => {
params.method = 'scrm.api.sop.sopInfo.updateEndStatus' params.method = 'scrm.api.sop.sopInfo.updateEndStatus'
return http({ return http({
url: 'rop-scrm-sop/router', url: '/rop-scrm-sop/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
...@@ -129,8 +129,8 @@ const endSopEventApi = params => { ...@@ -129,8 +129,8 @@ const endSopEventApi = params => {
}) })
} }
const getSopInfoListApi = params => { export function getSopInfoListApi(params) {
params.method = 'scrm.api.sop.sopInfo.listWithPage' params.method = 'scrm.api.sop.crowd.sopList'
return http({ return http({
url: '/rop-scrm-sop/router', url: '/rop-scrm-sop/router',
method: 'POST', method: 'POST',
...@@ -139,4 +139,4 @@ const getSopInfoListApi = params => { ...@@ -139,4 +139,4 @@ const getSopInfoListApi = params => {
}) })
} }
export default { deleteSopEventApi, endSopEventApi, getSopInfoListApi }
\ No newline at end of file \ No newline at end of file
export default { endSopEventApi, deleteSopEventApi }
\ No newline at end of file \ No newline at end of file
...@@ -33,25 +33,20 @@ export function debounce(fn, delay, triggerNow) { ...@@ -33,25 +33,20 @@ export function debounce(fn, delay, triggerNow) {
return debounced return debounced
} }
//格式化日期 //格式化日期
export const formatDate = (date, fmt) => { export const formatDate = (date, fmt = '-') => {
if (!date) { //shijianchuo是整数,否则要parseInt转换
date = new Date() var time = new Date(date)
} var y = time.getFullYear()
var m = time.getMonth() + 1
var d = time.getDate()
var h = time.getHours()
var mm = time.getMinutes()
var s = time.getSeconds()
return y + fmt + add0(m) + fmt + add0(d) + ' ' + add0(h) + ':' + add0(mm)
}
let o = { function add0(m) {
'M+': date.getMonth() + 1, //月份 return m < 10 ? '0' + m : m
'd+': date.getDate(), //日
'h+': date.getHours(), //小时
'm+': date.getMinutes(), //分
's+': date.getSeconds(), //秒
'q+': Math.floor((date.getMonth() + 3) / 3), //季度
S: date.getMilliseconds(), //毫秒  1-3 位  只能一位占位符
'U+': date.getMilliseconds() //毫秒   可以1-3位占位符
}
fmt = fmt || 'yyyy-MM-dd hh:mm'
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
for (let k in o) if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length))
return fmt
} }
//正则表示式是干什么的? 字符串匹配利器(难,规则多) //正则表示式是干什么的? 字符串匹配利器(难,规则多)
......
...@@ -8,18 +8,17 @@ ...@@ -8,18 +8,17 @@
<el-form-item label="分群描述" size="small"> <el-form-item label="分群描述" size="small">
<el-input v-model="ruleForm.crowdGroupDesc" placeholder="请输入分群描述" maxlength="100"></el-input> <el-input v-model="ruleForm.crowdGroupDesc" placeholder="请输入分群描述" maxlength="100"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="概览是否展示" size="small"> <el-form-item label="概览是否展示" size="small">
<el-radio-group v-model="ruleForm.isDisplay"> <el-radio-group v-model="ruleForm.isDisplay">
<el-radio label="1">是</el-radio> <el-radio :label="1">是</el-radio>
<el-radio :label="2">否</el-radio>
<el-radio label="2">否</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="选择展示位" size="small" v-show="ruleForm.expand == 1"> <el-form-item label="选择展示位" size="small" v-show="ruleForm.isDisplay == 1">
<el-select v-model="ruleForm.expandNum" placeholder="请选择"> <el-select v-model="ruleForm.displayLoc" placeholder="请选择">
<el-option v-for="item in 12" :key="item" :label="`${item}号展示位`" :value="item"></el-option> <el-option v-for="item in 12" :key="item" :label="`${item}号展示位`" :value="item"></el-option>
</el-select> </el-select>
</el-form-item> --> </el-form-item>
<el-form-item label="选择人群" size="small"> <el-form-item label="选择人群" size="small">
<div class="group-tree-container"> <div class="group-tree-container">
<div class="group-tree-panel" :style="{ height: heightBox + 'px' }"> <div class="group-tree-panel" :style="{ height: heightBox + 'px' }">
...@@ -206,8 +205,10 @@ export default { ...@@ -206,8 +205,10 @@ export default {
crowdGroup = 'addCrowdGroup' crowdGroup = 'addCrowdGroup'
} }
this.$apis.crowdManage[crowdGroup](params).then(res => { this.$apis.crowdManage[crowdGroup](params).then(res => {
if (res) {
this.groupVisible = false this.groupVisible = false
this.$parent.searchTable() this.$parent.searchTable()
}
}) })
} }
}) })
...@@ -217,9 +218,9 @@ export default { ...@@ -217,9 +218,9 @@ export default {
this.leftSelectNum = 0 this.leftSelectNum = 0
this.crowdUnitList = this.$common.utils.deepClone(this.crowdUnitListReset) this.crowdUnitList = this.$common.utils.deepClone(this.crowdUnitListReset)
this.ruleForm = { this.ruleForm = {
isDisplay: 2 isDisplay: 1,
displayLoc: 1
} }
if (row) { if (row) {
this.ruleForm.crowdGroupId = row.crowdGroupId this.ruleForm.crowdGroupId = row.crowdGroupId
this.dialogTitle = '编辑分群' this.dialogTitle = '编辑分群'
...@@ -230,11 +231,13 @@ export default { ...@@ -230,11 +231,13 @@ export default {
this.groupVisible = true this.groupVisible = true
}, },
queryCrowdGroupDetailsByCrowdGroupId(row) { queryCrowdGroupDetailsByCrowdGroupId(row) {
const { crowdGroupName, crowdGroupDesc, crowdGroupId, crowdUnitList } = row const { crowdGroupName, crowdGroupDesc, crowdGroupId, crowdUnitList, isDisplay, displayLoc } = row
this.ruleForm = { this.ruleForm = {
crowdGroupName, crowdGroupName,
crowdGroupDesc, crowdGroupDesc,
crowdGroupId crowdGroupId,
displayLoc,
isDisplay
} }
const arr1 = [], const arr1 = [],
arr2 = [] arr2 = []
......
...@@ -2,16 +2,12 @@ ...@@ -2,16 +2,12 @@
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<div class="pageContent"> <div class="pageContent">
<GLCombiForm :formObj="searchForm" :formData="searchFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm> <GLCombiForm :formObj="searchForm" :formData="searchFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<GLTable v-loading="loading" :hasNum="true" @setTableHeightEvent="setTableHeightEvent" @setTableFinishFun="setTableFinishFun" ref="marketingPlan" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams"> <GLTable :hasNum="true" @setTableFinishFun="setTableFinishFun" :beforeSearchFn="beforeSearchFn" ref="marketingPlan" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :tableParams="tableParams">
<template slot="options" slot-scope="scope"> <template slot="options" slot-scope="scope">
<el-button class="blue-text" type="text" @click="goSOPAnalysis(scope.scope.id)">SOP分析</el-button> <el-button v-if="scope.scope.sopStatus != 1" type="text" @click="handleJump(scope.scope.id)">SOP分析</el-button>
<el-button class="blue-text" type="text" @click="goSOPEdit(scope.scope.id)">编辑</el-button>
<el-button class="blue-text" type="text" @click="handleDelete(scope.scope)">删除</el-button>
<el-button class="blue-text" type="text" @click="handleEnd(scope.scope)">结束</el-button>
<!-- <el-button v-if="scope.scope.sopStatus != 1" type="text" @click="handleJump('sopAnalysisList', scope.scope)">SOP分析</el-button>
<el-button v-if="scope.scope.sopStatus == 2" type="text" @click="handleEnd(scope.scope)">结束</el-button> <el-button v-if="scope.scope.sopStatus == 2" type="text" @click="handleEnd(scope.scope)">结束</el-button>
<el-button v-if="scope.scope.sopStatus != 3" type="text" @click="handleEdit('edit', scope.scope)">编辑</el-button> <el-button v-if="scope.scope.sopStatus != 3" type="text" @click="handleEdit(scope.scope.id)">编辑</el-button>
<el-button v-if="scope.scope.sopStatus == 1" type="text" @click="handleDelete(scope.scope)">删除</el-button> --> <el-button v-if="scope.scope.sopStatus == 1" type="text" @click="handleDelete(scope.scope)">删除</el-button>
</template> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -19,21 +15,25 @@ ...@@ -19,21 +15,25 @@
</template> </template>
<script> <script>
import { getTableList } from '@/api/modules/clientManage' import { getSopInfoListApi } from '@/api/modules/clientDataOverview'
export default { export default {
props: ['crowdGroupId'],
data() { data() {
return { return {
searchForm: {}, searchForm: {
crowdGroupId: this.crowdGroupId
},
searchFormList: [ searchFormList: [
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
// name: 'keyword', name: 'sopName',
label: '人群名称' label: '人群名称'
}, },
{ {
type: 'select', type: 'select',
// name: 'type', name: 'sopStatus',
label: '营销状态', label: '营销状态',
optionLabel: 'label', optionLabel: 'label',
optionId: 'value', optionId: 'value',
...@@ -41,55 +41,87 @@ export default { ...@@ -41,55 +41,87 @@ export default {
{ {
label: '全部', label: '全部',
value: '' value: ''
},
{
label: '未开始',
value: '1'
},
{
label: '进行中',
value: '2'
},
{
label: '已结束',
value: '3'
} }
], ],
placeholder: '请选择' placeholder: '请选择'
} }
], ],
getListApi: this.$apis.clientDataOverview.getSopInfoListApi, baseData: {
sopStatusList: [
{
confId: 1,
confName: '未开始'
},
{
confId: 2,
confName: '进行中'
},
{
confId: 3,
confName: '已结束'
}
]
},
getListApi: getSopInfoListApi,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: { tableParams: {
listName: 'data', listName: 'list',
tableColumns: [ tableColumns: [
{ {
label: '人群名称', label: '人群名称',
prop: 'orderNo' prop: 'crowdName'
// line: 1,
// width: 220
}, },
{ {
label: 'SOP名称', label: 'SOP名称',
prop: 'name' prop: 'sopName'
// width: 240,
// line: 1
}, },
{ {
label: '营销时间', label: '营销时间',
prop: 'phone' prop: 'startDate',
width: 220,
line: 1
}, },
{ {
label: '完成度', label: '营销状态',
prop: 'dsdasd' prop: 'sopStatus',
formatter: cellValue => {
return this.baseData.sopStatusList.map(item => item.confId).includes(cellValue.sopStatus) ? this.baseData.sopStatusList.find(item => item.confId == cellValue.sopStatus).confName : '-'
}
}, },
{ {
label: '营销状态', label: '完成度',
prop: 'dsdasds' prop: 'sopStatistics',
formatter: cellValue => {
return cellValue.sopStatistics ? Math.round((cellValue.sopStatistics.finishEventCount / cellValue.sopStatistics.eventCount) * 100).toFixed(0) + '%' : '-'
}
}, },
{ {
label: '操作', label: '操作',
prop: 'options', prop: 'options',
addHtml: 'options' addHtml: 'options',
width: 180
} }
] ]
} }
} }
}, },
mounted() { mounted() {},
//没数据的时候要算高度
setTimeout(() => {
if (!this.$refs.marketingPlan.data.length) {
this.loading = true
this.$refs.marketingPlan.setTableHeightFun()
this.loading = false
}
}, 200)
},
methods: { methods: {
// 结束 // 结束
handleEnd(row) { handleEnd(row) {
...@@ -121,29 +153,25 @@ export default { ...@@ -121,29 +153,25 @@ export default {
}) })
}, },
// 跳转SOP分析 // 跳转SOP分析
goSOPAnalysis(id) { handleJump(id) {
this.$history.push(`/marketing/sop/sopAnalysisList?fromPage=${encodeURI('/custom/clientDataOverview/marketingPeople?selectTab=second')}&id=${id}`) let query = JSON.stringify({
}, crowdId: this.crowdGroupId,
// 跳转SOP编辑页面 selectTab: 'second'
// goSOPEdit(id) { })
// var params = { this.$history.push(`/marketing/sop/sopAnalysisList?fromPage=${encodeURI(`/custom/clientDataOverview/marketingPeople?crowQuery=${query}`)}&id=${id}`)
// addOrEdit: 'edit', },
// fromPage: '/custom/clientDataOverview/marketingPeople?selectTab=second',
// $title: encodeURI('编辑SOP')
// }
// // addOrEdit != 'add' && (params.id = row.id)
// this.$router.push({
// path: '/sop/editSop',
// query: params
// })
// },
// 跳转到营销SOP // 跳转到营销SOP
goSOPEdit() { handleEdit(info) {
let marketQuery console.log(info)
let marketQuery = {
crowdDesc: info.crowdDesc,
crowdId: info.crowdId,
crowdName: info.crowdName,
total: info.customerCount
}
var params = { var params = {
addOrEdit: 'edit', addOrEdit: 'edit',
fromPage: `/custom/clientDataOverview/marketingPeople?crowdId=${this.crowdGroupId}&selectTab=2`, fromPage: `/custom/clientDataOverview/marketingPeople?crowdId=${this.crowdGroupId}&selectTab=second`,
$title: encodeURI('编辑SOP'), $title: encodeURI('编辑SOP'),
info: { info: {
// 人群 // 人群
...@@ -158,26 +186,7 @@ export default { ...@@ -158,26 +186,7 @@ export default {
path: 'marketing/sop/editSop' path: 'marketing/sop/editSop'
}) })
}, },
// 确认删除或结束
confirm(type) {
this.$confirm(`是否确认${type == 'delete' ? '删除' : '结束'}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$message({
type: 'success',
message: '操作成功!'
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
setTableFinishFun() { setTableFinishFun() {
this.$refs.marketingPlan.data.length ? (this.$refs.marketingPlan.tableHeightValues = '') : this.$refs.marketingPlan.setTableHeightFun() this.$refs.marketingPlan.data.length ? (this.$refs.marketingPlan.tableHeightValues = '') : this.$refs.marketingPlan.setTableHeightFun()
}, },
...@@ -192,8 +201,7 @@ export default { ...@@ -192,8 +201,7 @@ export default {
//重置表格 //重置表格
resetTable() { resetTable() {
this.searchForm = { this.searchForm = {
status: '', crowdGroupId: this.crowdGroupId
type: ''
} }
this.$refs.marketingPlan.refreshTable() this.$refs.marketingPlan.refreshTable()
} }
......
...@@ -22,15 +22,15 @@ ...@@ -22,15 +22,15 @@
</div> </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> -->
<el-button type="text" @click="goDetail(scope.scope.id)" class="blue-text"> <el-button type="text" @click="goDetail(scope.scope.crowdGroupId)" class="blue-text">
查看客户 查看客户
</el-button> </el-button>
<el-button type="text" @click="handleAdd(scope.scope)" class="blue-text"> <el-button type="text" @click="handleAdd(scope.scope)" class="blue-text">
编辑 编辑
</el-button> </el-button>
<el-button type="text" @click="handleDelete(scope.scope)" class="blue-text"> <!-- <el-button type="text" @click="handleDelete(scope.scope)" class="blue-text">
删除 删除
</el-button> </el-button> -->
<!-- <GLButton @click="goDetail(scope.scope.id, scope.scope.custGroupName)" fn="客户群详情" type="text">详情</GLButton> --> <!-- <GLButton @click="goDetail(scope.scope.id, scope.scope.custGroupName)" fn="客户群详情" type="text">详情</GLButton> -->
</template> </template>
</GLTable> </GLTable>
......
...@@ -14,7 +14,10 @@ ...@@ -14,7 +14,10 @@
</map> </map>
</div> </div>
<div class="topmsg"> <div class="topmsg">
<span class="normalTitle">客户分层</span> <span class="normalTitle">
客户分层
<span>| 数据统计截止时间:{{ updateTime }}</span>
</span>
<div style="display: flex"> <div style="display: flex">
<div class="leftPieEcharts"> <div class="leftPieEcharts">
<div class="leftIntro"> <div class="leftIntro">
...@@ -227,18 +230,9 @@ ...@@ -227,18 +230,9 @@
<div class="settiongBox"> <div class="settiongBox">
<span class="normalTitle"> <span class="normalTitle">
客户分群 客户分群
<span class="setting" @click="goToGrouping()">设置</span> <span>| 数据统计截止时间:{{ updateTime }}</span>
</span>
<div class="set">
<span v-if="customerSegmentation && customerSegmentation.length > 4 && !closeFlag" @click="expandClick('expand')">
展开
<i class="el-icon-arrow-down color-58"></i>
</span>
<span v-if="closeFlag" @click="expandClick('close')">
收起
<i class="el-icon-arrow-up color-58"></i>
</span> </span>
</div> <span class="setting" @click="goToGrouping()">设置</span>
</div> </div>
<div class="itembox"> <div class="itembox">
<template v-for="(item, index) in customerSegmentation"> <template v-for="(item, index) in customerSegmentation">
...@@ -276,10 +270,24 @@ ...@@ -276,10 +270,24 @@
</div> </div>
</template> </template>
</div> </div>
<div class="set">
<span v-if="customerSegmentation && customerSegmentation.length > 4 && !closeFlag" @click="expandClick('expand')">
展开
<i class="el-icon-arrow-down color-58"></i>
</span>
<span v-if="closeFlag" @click="expandClick('close')">
收起
<i class="el-icon-arrow-up color-58"></i>
</span>
</div>
</div> </div>
<!-- <h3 class="pageSubTitle">客户增长趋势</h3> --> <!-- <h3 class="pageSubTitle">客户增长趋势</h3> -->
<div class="bottommsg"> <div class="bottommsg">
<span class="normalTitle">客户增长趋势</span> <span class="normalTitle">
客户增长趋势
<span>| 数据统计截止时间:{{ updateTime }}</span>
</span>
<no-data :type="'hasIconText'" v-if="!isShowBarMap"></no-data> <no-data :type="'hasIconText'" v-if="!isShowBarMap"></no-data>
<template v-if="isShowBarMap"> <template v-if="isShowBarMap">
<span class="timeDuring">{{ allMapList[0].dateTime }}~{{ allMapList[allMapList.length - 1].dateTime }}</span> <span class="timeDuring">{{ allMapList[0].dateTime }}~{{ allMapList[allMapList.length - 1].dateTime }}</span>
...@@ -328,6 +336,7 @@ import pieEchart from '@/components/echarts/pieEchart' ...@@ -328,6 +336,7 @@ import pieEchart from '@/components/echarts/pieEchart'
// import pieEchartCopy from '@/components/echarts/pieEchartCopy' // import pieEchartCopy from '@/components/echarts/pieEchartCopy'
import multipleEchart from '@/components/echarts/multipleEchart' import multipleEchart from '@/components/echarts/multipleEchart'
import noData from '@/components/noData/noData' import noData from '@/components/noData/noData'
import { formatDate } from '@/utils'
export default { export default {
name: 'clientDataOverview', name: 'clientDataOverview',
components: { components: {
...@@ -499,6 +508,7 @@ export default { ...@@ -499,6 +508,7 @@ export default {
} }
customerClusterListShow(param).then(res => { customerClusterListShow(param).then(res => {
this.customerSegmentation = res.crowdGroupUnitList this.customerSegmentation = res.crowdGroupUnitList
this.updateTime = formatDate(res.updateTime)
console.log(this.customerSegmentation) console.log(this.customerSegmentation)
}) })
}, },
...@@ -712,7 +722,15 @@ export default { ...@@ -712,7 +722,15 @@ export default {
.person-text { .person-text {
font-size: 16px !important; font-size: 16px !important;
} }
.normalTitle {
span {
margin-left: 6px;
font-size: 14px;
color: #666666;
letter-spacing: 0;
font-weight: 400;
}
}
.modalLayer { .modalLayer {
position: fixed; position: fixed;
z-index: 99; z-index: 99;
...@@ -1135,6 +1153,7 @@ export default { ...@@ -1135,6 +1153,7 @@ export default {
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
.normalTitle { .normalTitle {
border-bottom: none; border-bottom: none;
}
.setting { .setting {
font-size: 16px; font-size: 16px;
color: #5850ff; color: #5850ff;
...@@ -1143,13 +1162,13 @@ export default { ...@@ -1143,13 +1162,13 @@ export default {
} }
} }
.set { .set {
text-align: center;
font-size: 16px; font-size: 16px;
color: #5850ff; color: #5850ff;
margin-right: 20px; margin-bottom: 20px;
}
} }
.itembox { .itembox {
margin: 20px; margin: 20px 20px 0 20px;
// display: flex; // display: flex;
// justify-content: space-between; // justify-content: space-between;
display: grid; display: grid;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<span>人</span> <span>人</span>
</p> </p>
<p class="peopledesc">{{ item.crowdDesc }}</p> <p class="peopledesc">{{ item.crowdDesc }}</p>
<el-button class="createSOP" @click.stop="createMarketSOP(item)" :disabled="item.type">创建营销SOP</el-button> <el-button :class="['createSOP', { isDisableSOP: item.sop == 'Y' }]" @click.stop="createMarketSOP(item)" :disabled="item.sop == 'Y' ? true : false">创建营销SOP</el-button>
</div> </div>
</template> </template>
</div> </div>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<span>人</span> <span>人</span>
</p> </p>
<p class="peopledesc">{{ item.crowdDesc }}</p> <p class="peopledesc">{{ item.crowdDesc }}</p>
<el-button class="createSOP" @click.stop="createMarketSOP(item)" :disabled="item.type">创建营销SOP</el-button> <el-button :class="['createSOP', { isDisableSOP: item.sop == 'Y' }]" @click.stop="createMarketSOP(item)" :disabled="item.sop == 'Y' ? true : false">创建营销SOP</el-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="营销计划" name="second"> <el-tab-pane label="营销计划" name="second">
<template v-if="activeName == 'second'"><marketing-plan></marketing-plan></template> <template v-if="activeName == 'second'"><marketing-plan :crowdGroupId="crowdGroupId"></marketing-plan></template>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
...@@ -299,6 +299,12 @@ export default { ...@@ -299,6 +299,12 @@ export default {
if (this.queryTab) { if (this.queryTab) {
this.activeName = this.queryTab == 'first' ? 'first' : 'second' this.activeName = this.queryTab == 'first' ? 'first' : 'second'
} }
// 判断分析SOP回来的页面
if (this.$route.query.crowQuery) {
let crowInfo = JSON.parse(this.$route.query.crowQuery)
this.crowdGroupId = crowInfo.crowdId
this.activeName = crowInfo.selectTab == 'first' ? 'first' : 'second'
}
this.getStaffList() this.getStaffList()
}, },
mounted() { mounted() {
...@@ -334,8 +340,7 @@ export default { ...@@ -334,8 +340,7 @@ export default {
}, },
// 处理时间参数 // 处理时间参数
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) let params = JSON.parse(JSON.stringify(this.searchForm))
console.log(params)
if (params.carBuyDate) { if (params.carBuyDate) {
params.beginCarBuyDate = this.searchForm.carBuyDate[0] params.beginCarBuyDate = this.searchForm.carBuyDate[0]
params.endCarBuyDate = this.searchForm.carBuyDate[1] params.endCarBuyDate = this.searchForm.carBuyDate[1]
...@@ -356,10 +361,10 @@ export default { ...@@ -356,10 +361,10 @@ export default {
if (this.status) { if (this.status) {
this.status = false this.status = false
let params = { let params = {
'req.crowdGroupId': this.crowdGroupId croupGroupId: this.crowdGroupId
} }
await marketingPeopleListShow(params).then(res => { await marketingPeopleListShow(params).then(res => {
this.itemArr = res.crowdUnitList this.itemArr = res
this.showTitle = this.itemArr[0].crowdName this.showTitle = this.itemArr[0].crowdName
this.searchForm.crowdId = this.itemArr[0].crowdId this.searchForm.crowdId = this.itemArr[0].crowdId
}) })
...@@ -553,6 +558,10 @@ export default { ...@@ -553,6 +558,10 @@ export default {
color: #5850ff; color: #5850ff;
padding: 9px 20px; padding: 9px 20px;
} }
.isDisableSOP {
color: #c0bcff;
border: 1px solid #c0bcff;
}
} }
} }
} }
...@@ -643,6 +652,10 @@ export default { ...@@ -643,6 +652,10 @@ export default {
color: #5850ff; color: #5850ff;
padding: 9px 20px; padding: 9px 20px;
} }
.isDisableSOP {
color: #c0bcff;
border: 1px solid #c0bcff;
}
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!