Commit 7a240226 by xuyl

更新2.0.0人群管理代码

1 parent f0272010
......@@ -12,7 +12,7 @@ import { http3 } from '@/main'
export function getCrowdList(params) {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http3({
url: 'http://192.168.3.181:9636/rop-scrm-datahub/router',
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
......
<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-tab-pane label="推荐人群" name="first"></el-tab-pane>
<el-tab-pane label="自定义人群" name="second">
......@@ -7,17 +7,17 @@
</el-tab-pane>
</el-tabs>
<div class="pageContent">
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="tagsPartFormList" @setTableHeightEvent="setTableHeightEvent">
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="tagsPartFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot">
<!-- <el-button @click="resetTable" plain>重置</el-button> -->
<el-button class="searchBtn" type="primary" @click="searchTable">查询</el-button>
</span>
</search-form>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="crowdManage" :hasNum="false" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="crowdManage" :hasNum="false" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<template slot="xxx" slot-scope="scope">
<span @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>
</GLTable>
</div>
......@@ -31,13 +31,14 @@ export default {
name: 'crowdManage',
data() {
return {
loading: false,
activeName: 'first',
isReload: true,
url: url,
searchForm: {},
merchantId: '', //商户号
// crowdType:1,//人群类型
totalCount: 0,
// totalCount: 0,
tagsPartFormList: [
{
type: 'input',
......@@ -48,26 +49,26 @@ export default {
clearable: true
}
],
pageConf: { pageSize: 'req.pageSize', pageNum: 'req.pageNum', totalCount: 'count' },
pageConf: { pageSize: 'req.pageSize', pageNum: 'req.pageNum', totalCount: 'data.total' },
tableParams: {
listName: 'labelTreeRets',
listName: 'data.crowdUnitList',
tableColumns: [
{
label: '人群名称',
prop: 'labelGroup',
addHtml: 'labelGroup',
prop: 'crowdName',
// addHtml: 'crowdName',
align: 'left'
},
{
label: '人群描述',
prop: 'labelType',
prop: 'crowdDesc',
align: 'left'
// width: 180
},
{
label: '人数',
prop: 'labelList',
addHtml: 'labelList',
prop: 'total',
// addHtml: 'total',
align: 'left'
},
{
......@@ -91,21 +92,33 @@ export default {
//运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId
// 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 }
},
mounted() {
//没数据的时候要算高度
setTimeout(() => {
if (!this.$refs.crowdManage.data.length) {
this.loading = true
this.$refs.crowdManage.setTableHeightFun()
this.loading = false
}
}, 200)
},
methods: {
setTableHeightEvent() {
this.$refs.clientGroupDetail.setTableHeightFun()
},
handleClick() {
this.searchTable()
// setTimeout(() =>{
// if(this.$refs.crowdManage.data.length == 0){
// this.$refs.crowdManage.setTableHeightFun()
// }
// this.loading =false
// },200)
},
beforeSearchFn() {
return new Promise(resolve => {
......@@ -113,6 +126,7 @@ export default {
this.searchForm = Object.assign(this.searchForm, { 'req.merchantId': this.merchantId, 'req.crowdType': crowdType })
resolve()
})
},
//搜索表格
searchTable() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!