Commit 194d226b by xuyl

修复人群管理和数据概览bug

1 parent c0941c84
......@@ -120,7 +120,7 @@ const staticRoutes = Object.freeze([{
},
{
name: 'crowdDetail',
path: '/crowdManage/crowdDetail:id',
path: '/crowdManage/crowdDetail/:id/:type',
component: resolve => require([`@/views/crowdManage/crowdDetail.vue`], resolve),
meta: {}
},
......
<template>
<div class="scrm-sub-client-container">
<div class="head-container">
<template v-if="crowdType == ''">
<template v-if="crowdType == '3'">
<div class="head-container-title color-3 font-20">{{ $Constants.DESCRIBEDATA.find(item => item.id == id) ? $Constants.DESCRIBEDATA.find(item => item.id == id).name : '' }}</div>
<div class="head-container-content color-6 font-14">{{ $Constants.DESCRIBEDATA.find(item => item.id == id) ? $Constants.DESCRIBEDATA.find(item => item.id == id).info : '' }}</div>
</template>
......@@ -62,7 +62,7 @@ export default {
name: 'group',
data() {
return {
getListApi: this.$route.params.crowdType ? getcrowdManageList : getCustomerList,
getListApi: this.$route.params.crowdType == '1' || this.$route.params.crowdType == '2' ? getcrowdManageList : getCustomerList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableSearchForm: {
customerPhone: '',
......@@ -191,7 +191,6 @@ export default {
}
]
},
url: url
}
},
......@@ -199,7 +198,7 @@ export default {
let { id } = this
this.init(id)
// 针对广汇替换字段
if (this.id == 1 && location.host == 'scrm.cgacar.com') {
if (this.id == 1 && location.host.includes('cgacar')) {
this.tableParams.tableColumns.splice(
3,
3,
......@@ -301,7 +300,23 @@ export default {
this.$refs.groupRef.data.length ? (this.$refs.groupRef.tableHeightValues = '') : this.$refs.groupRef.setTableHeightFun()
},
goBack() {
this.$router.push('/clientDataOverview/index')
if (this.crowdType == 1) {
this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 1
}
})
} else if (this.crowdType == 2) {
this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 2
}
})
} else {
this.$router.push('/clientDataOverview/index')
}
}
}
}
......
......@@ -383,6 +383,7 @@ export default {
},
data() {
return {
crowdType:3,
isCloseShowNumTag: false,
isReload: true,
isShowModal: false,
......@@ -714,7 +715,8 @@ export default {
//跳转到人群客户列表
goto(id) {
if (this.userType == 2) return
this.$router.push('/clientDataOverview/group/' + id)
// this.$router.push('/clientDataOverview/group/' + id )
this.$router.push(`/clientDataOverview/group/${id}/${this.crowdType}` )
}
}
}
......
......@@ -107,6 +107,7 @@ export default {
crowdDesc: ''
},
crowdId: this.$route.params.id ? this.$route.params.id : '',
crowdPage: this.$route.params.crowdType ? this.$route.params.crowdType : '',
tableTotal: '',
isShowCloseBtn: true,
dialogRuleVisible: false,
......@@ -147,17 +148,18 @@ export default {
}
},
created() {
console.log('this.$route.params.id', this.$route.params.id)
// 通过人群Id查询人群详情
this.getCrowdDetails()
},
mounted() {},
mounted() {
console.log(this.$route.params)
},
methods: {
goBack() {
this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 1
selectTab: this.crowdPage
}
})
},
......
......@@ -103,19 +103,24 @@ export default {
}
this.searchForm = { 'req.merchantId': this.merchantId, 'req.crowdType': this.crowdType }
//标签管理保存初始化保存自定义人群状态
// if (this.$route.query.selectTab == 1) {
// this.activeName = 'second'
// // window.history.pushState(null, null, location.origin + location.pathname)
// }
if (this.$route.query.selectTab) {
this.activeName = 'second'
// window.history.pushState(null, null, location.origin + location.pathname)
this.$route.query.selectTab == 1 ? (this.activeName = 'first') : (this.activeName = 'second')
}
},
mounted() {},
mounted() {
console.log(this.$route.params)
},
methods: {
btnClick(type, data) {
const crowdType = this.activeName == 'first' ? 1 : 2
if (type == 'detail') {
this.$router.push(`/crowdManage/crowdDetail/${data.crowdId}`)
this.$router.push(`/crowdManage/crowdDetail/${data.crowdId}/${crowdType}`)
}
if (type == 'view') {
const crowdType = this.activeName == 'first' ? 1 : 2
this.$router.push(`/clientDataOverview/group/${data.crowdId}/${crowdType}`)
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!