Commit 7a240226 by xuyl

更新2.0.0人群管理代码

1 parent f0272010
...@@ -12,7 +12,7 @@ import { http3 } from '@/main' ...@@ -12,7 +12,7 @@ import { http3 } from '@/main'
export function getCrowdList(params) { export function getCrowdList(params) {
params.method = 'scrm.api.datahub.user.queryCrowdTree' params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http3({ return http3({
url: 'http://192.168.3.181:9636/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
......
<template> <template>
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container" v-loading=loading>
<el-tabs v-model="activeName" @tab-click="handleClick()"> <el-tabs v-model="activeName" @tab-click="handleClick()">
<el-tab-pane label="推荐人群" name="first"></el-tab-pane> <el-tab-pane label="推荐人群" name="first"></el-tab-pane>
<el-tab-pane label="自定义人群" name="second"> <el-tab-pane label="自定义人群" name="second">
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<template slot="xxx" slot-scope="scope"> <template slot="xxx" slot-scope="scope">
<span @click="btnClick('edit', scope.scope)" class="blue-text">查看详情</span> <span @click="btnClick('edit', scope.scope)" class="blue-text">查看详情</span>
<span style="margin-left: 20px" @click="btnClick('edit', scope.scope)" class="blue-text">查看客户</span> <span style="margin-left: 20px" @click="btnClick('edit', scope.scope)" class="blue-text">查看客户</span>
<!-- <GLButton class="blue-text leftDistance" type="text" fn="查看客户" v-if="userType!==2" @click="toViewCustomer(scope.scope)" >查看客户</GLButton> --> <!-- <GLButton class="blue-text leftDistance" type="text" fn="查看客户" v-if="userType !== 2" @click="toViewCustomer(scope.scope)">查看客户</GLButton> -->
</template> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -31,13 +31,14 @@ export default { ...@@ -31,13 +31,14 @@ export default {
name: 'crowdManage', name: 'crowdManage',
data() { data() {
return { return {
loading: false,
activeName: 'first', activeName: 'first',
isReload: true, isReload: true,
url: url, url: url,
searchForm: {}, searchForm: {},
merchantId: '', //商户号 merchantId: '', //商户号
// crowdType:1,//人群类型 // crowdType:1,//人群类型
totalCount: 0, // totalCount: 0,
tagsPartFormList: [ tagsPartFormList: [
{ {
type: 'input', type: 'input',
...@@ -48,26 +49,26 @@ export default { ...@@ -48,26 +49,26 @@ export default {
clearable: true clearable: true
} }
], ],
pageConf: { pageSize: 'req.pageSize', pageNum: 'req.pageNum', totalCount: 'count' }, pageConf: { pageSize: 'req.pageSize', pageNum: 'req.pageNum', totalCount: 'data.total' },
tableParams: { tableParams: {
listName: 'labelTreeRets', listName: 'data.crowdUnitList',
tableColumns: [ tableColumns: [
{ {
label: '人群名称', label: '人群名称',
prop: 'labelGroup', prop: 'crowdName',
addHtml: 'labelGroup', // addHtml: 'crowdName',
align: 'left' align: 'left'
}, },
{ {
label: '人群描述', label: '人群描述',
prop: 'labelType', prop: 'crowdDesc',
align: 'left' align: 'left'
// width: 180 // width: 180
}, },
{ {
label: '人数', label: '人数',
prop: 'labelList', prop: 'total',
addHtml: 'labelList', // addHtml: 'total',
align: 'left' align: 'left'
}, },
{ {
...@@ -91,21 +92,33 @@ export default { ...@@ -91,21 +92,33 @@ export default {
//运行在qiankun容器中 //运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId this.merchantId = this.$globalState.session.merchantId
// this.accountLevel = this.$globalState.session.accountLevel // this.accountLevel = this.$globalState.session.accountLevel
// this.userType = this.$globalState.session.userType this.userType = this.$globalState.session.userType
} }
this.searchForm = { 'req.merchantId': this.merchantId, 'req.crowdType': this.crowdType } this.searchForm = { 'req.merchantId': this.merchantId, 'req.crowdType': this.crowdType }
}, },
mounted() { mounted() {
//没数据的时候要算高度 //没数据的时候要算高度
setTimeout(() => { setTimeout(() => {
if (!this.$refs.crowdManage.data.length) { if (!this.$refs.crowdManage.data.length) {
this.loading = true
this.$refs.crowdManage.setTableHeightFun() this.$refs.crowdManage.setTableHeightFun()
this.loading = false
} }
}, 200) }, 200)
}, },
methods: { methods: {
setTableHeightEvent() {
this.$refs.clientGroupDetail.setTableHeightFun()
},
handleClick() { handleClick() {
this.searchTable() this.searchTable()
// setTimeout(() =>{
// if(this.$refs.crowdManage.data.length == 0){
// this.$refs.crowdManage.setTableHeightFun()
// }
// this.loading =false
// },200)
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
...@@ -113,6 +126,7 @@ export default { ...@@ -113,6 +126,7 @@ export default {
this.searchForm = Object.assign(this.searchForm, { 'req.merchantId': this.merchantId, 'req.crowdType': crowdType }) this.searchForm = Object.assign(this.searchForm, { 'req.merchantId': this.merchantId, 'req.crowdType': crowdType })
resolve() resolve()
}) })
}, },
//搜索表格 //搜索表格
searchTable() { searchTable() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!