Commit 84c8367c by 王志慧

commit

1 parent 990effd6
......@@ -26,7 +26,7 @@
</div>
<img src="./assets/logo.png" alt="" srcset="" />
</div> -->
<keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group,viewCustomers">
<keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group,viewCustomers,crowdDetail,crowdAdd,crowdManage">
<router-view></router-view>
</keep-alive>
</div>
......
......@@ -6,17 +6,85 @@
* @param {*} params
* @returns
*/
import { http3 } from '@/main'
import {http, http3 } from '@/main'
// http 对应的域名http://ismv.branch.glsx.com.cn
// 查询推荐人群和自定义人群列表
export function getCrowdList(params) {
const getCrowdList=(params)=> {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http3({
// url: '/rop-scrm-datahub/router',
url:'http://192.168.3.181:9636/rop-scrm-datahub/router',
return http({
url: '/rop-scrm-datahub/router',
// url:'http://192.168.3.181:9636/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
\ No newline at end of file
}
//通过人群Id查询人群详情
const getCrowdDetails=(params) =>{
params.method = 'scrm.api.datahub.user.queryCrowdDetailsById'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//创建人群
const addCrowd=(params) =>{
params.method = 'scrm.api.datahub.user.addCrowd'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//根据标签组合查询人群客户数
const getCrowdCount=(params) =>{
params.method = 'scrm.api.datahub.user.queryCrowdCountByTagCombine'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//搜索框查询
const getSearchBox=(params) =>{
params.method = 'scrm.api.datahub.labelgroup.querySearchBox'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//标签组树查询
const getLabelTreeList=(params) =>{
params.method = 'scrm.api.datahub.labelgroup.queryLabelGroupTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default {
getCrowdList,
getCrowdDetails,
addCrowd,
getCrowdCount,
getSearchBox,
getLabelTreeList
}
......@@ -17,9 +17,10 @@ export const fetchConfig = function (isEnv = true) {
Object.assign(request, { timeout })
return Promise.resolve(cfg)
}
// https://oss-config.test.glsx.com.cn/mock/6136bea6ceeb5a5c2bec6950/base
// https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config
return new Http({request:{timeout:3000}}).get('https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config2')
// return new Http({request:{timeout:3000}}).get('https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config2')
//开发环境mock
return new Http({ request: { timeout: 3000 } }).get('http://192.168.3.171:7300/mock/616d3b131072f92988f05a01/custom/config2')
}
export const config = {
install(vue, cfg) {
......
......@@ -2,17 +2,17 @@
<div class="scrm-sub-client-container">
<div class="container">
<div>
<div class="title">创建人群</div>
<div class="title">人群详情</div>
<div class="info-box">
<el-form class="create-form" :model="groupForm" :rules="groupRules" ref="groupForm" label-width="118px">
<el-form class="create-form" :model="crowdForm" :rules="crowdRules" label-width="118px">
<div class="el-form-line">
<el-form-item label="人群名称:" prop="groupName" class="label-word">
<div class="color-3">年龄为2—40岁,奥迪3系、奔驰4系,2</div>
<el-form-item label="人群名称:" prop="crowdName" class="label-word">
<div class="color-3">{{ crowdForm.crowdName }}</div>
</el-form-item>
</div>
<div class="el-form-line">
<el-form-item label="人群描述:" prop="groupNameRule" class="label-word">
<div class="color-3">人群描述</div>
<div class="color-3">{{ crowdForm.crowdDesc }}</div>
</el-form-item>
</div>
<div class="el-form-line">
......@@ -26,15 +26,12 @@
<div class="el-form-line">
<el-form-item label="已选标签:" prop="groupNameRule" class="label-word">
<div class="pageContent">
<GLTable :tableTotal="tableTotal" :tableData="tableData" :hasNum="hasNum" :hasPage="hasPage" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="labelGroup" slot-scope="scope">
<span>{{ scope.scope.labelGroup.name }}</span>
</span>
<span slot="labelList" slot-scope="scope">
<GLTable :tableData="selectedArray" :hasNum="hasNum" :hasPage="hasPage" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="labelUnitList" slot-scope="scope">
<div class="allTagsWrap flex">
<template v-for="(item, index) in scope.scope.labelList">
<template v-for="(item, index) in scope.scope.labelUnitList">
<span :class="['label', 'color-6', 'white-hide', 'mt10']" :key="index">
{{ item.name }}
{{ item.labelName }}
</span>
</template>
</div>
......@@ -79,11 +76,11 @@
</div>
<div class="crowd-logic-wrap" id="crowd-logic-wrap" :style="{ 'margin-left': this.selectedArray.length > 1 ? '20px' : '55px' }">
<div class="crowd-logic-labels" v-for="(logicTag, index) in this.selectedArray" :key="index">
<div class="crowd-logic-label-group-name font-14 color-3">{{ logicTag.labelGroupName.name }}:</div>
<div class="crowd-logic-label-group-name font-14 color-3">{{ logicTag.groupName }}:</div>
<div class="flex">
<template v-for="(tag, id) in logicTag.children">
<div class="crowd-logic-tag color-6 font-14" :key="id">{{ tag.name }}</div>
<template v-if="id < logicTag.children.length - 1">
<template v-for="(tag, id) in logicTag.labelUnitList">
<div class="crowd-logic-tag color-6 font-14" :key="id">{{ tag.labelName }}</div>
<template v-if="id < logicTag.labelUnitList.length - 1">
<div class="color-3 perhaps" :key="id">或</div>
</template>
</template>
......@@ -96,77 +93,71 @@
</template>
<script>
import { getTableList } from '@/api/modules/tagsManage'
export default {
name: 'crowdDetail',
data() {
return {
groupForm: {
groupName: ''
crowdForm: {
crowdName: '',
crowdDesc: ''
},
pageConf: { pageSize: 'labelTreeReq.pageSize', pageNum: 'labelTreeReq.pageNum', totalCount: 'labelGroupCount' },
crowdId: this.$route.params.id ? this.$route.params.id : '',
tableTotal: '',
isShowCloseBtn: true,
dialogRuleVisible: false,
dialogLogicVisible: false,
tableData: [],
hasPage: false,
hasNum: false,
page: {},
tableParams: {
listName: 'labelTreeRets',
tableColumns: [
{
label: '标签组',
prop: 'labelGroup',
addHtml: 'labelGroup',
width: 180
prop: 'groupName',
width: 180,
//align: 'left'
},
{
label: '标签组类型',
prop: 'labelType',
width: 180
prop: 'groupType',
width: 180,
//align: 'left'
},
{
label: '标签',
prop: 'labelList',
addHtml: 'labelList',
align: 'center'
prop: 'labelUnitList',
addHtml: 'labelUnitList',
//align: 'left'
}
]
},
crowdRules: {
crowdName: [{ required: true }]
},
selectedArray: []
}
},
created() {
if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
this.userType = this.$globalState.session.userType
}
this.searchForm = { 'labelTreeReq.shopId': this.merchantId, 'labelTreeReq.edition': 2 }
this.page[this.pageConf.pageNum] = 1
this.page[this.pageConf.pageSize] = 10
//获取标签数据
this.getLabelData()
console.log(4444444444444444444444)
console.log('this.$route.params.id', this.$route.params.id)
// 通过人群Id查询人群详情
this.getCrowdDetails()
},
mounted() {},
methods: {
//获取标签数据
getLabelData() {
console.log(333333333333)
getCrowdDetails() {
let params = {
...this.searchForm,
...this.page
'req.crowdId': this.crowdId
}
getTableList(params).then(res => {
res.labelTreeRets.forEach(item => {
item.labelList.forEach(label => {
label.checked = false
})
})
this.tableData = res.labelTreeRets
this.$apis.crowdManage.getCrowdDetails(params).then(res => {
console.log(res.code, res)
if (res.code == 0) {
this.crowdForm.crowdName = res.data.crowdName
this.crowdForm.crowdDesc = res.data.crowdDesc
console.log(JSON.parse(res.data.tagCombine))
this.selectedArray = res.data.tagCombine ? JSON.parse(res.data.tagCombine) : []
}
})
},
handleClose() {
......
......@@ -3,7 +3,7 @@
<el-tabs v-model="activeName" @tab-click="handleClick()">
<el-tab-pane label="推荐人群" name="first"></el-tab-pane>
<el-tab-pane label="自定义人群" name="second">
<GLButton class="addBtn" fn="新建人群" @click="addClick">+ 新建人群</GLButton>
<GLButton class="addBtn" fn="新建人群" v-if="!admin" @click="addClick">+ 新建人群</GLButton>
</el-tab-pane>
</el-tabs>
<div class="pageContent">
......@@ -25,7 +25,6 @@
</template>
<script>
import { getCrowdList } from '@/api/modules/crowdManage'
import url from '@/assets/clientDataOverview/nodata.png'
export default {
name: 'crowdManage',
......@@ -57,31 +56,31 @@ export default {
label: '人群名称',
prop: 'crowdName',
// addHtml: 'crowdName',
align: 'left'
//align: 'left'
},
{
label: '人群描述',
prop: 'crowdDesc',
align: 'left'
//align: 'left'
// width: 180
},
{
label: '人数',
prop: 'total',
// addHtml: 'total',
align: 'left'
//align: 'left'
},
{
label: '操作',
prop: 'xxx',
fixed: 'right',
addHtml: 'xxx',
align: 'left',
//align: 'left',
width: 180
}
]
},
getListApi: getCrowdList,
getListApi: this.$apis.crowdManage.getCrowdList,
expande: true,
needShowExpande: false
}
......@@ -91,7 +90,7 @@ export default {
if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId
// this.accountLevel = this.$globalState.session.accountLevel
this.admin = this.$globalState.session.admin
this.userType = this.$globalState.session.userType
}
this.searchForm = { 'req.merchantId': this.merchantId, 'req.crowdType': this.crowdType }
......
......@@ -199,33 +199,33 @@ export default {
label: '客户',
prop: 'customerName',
addHtml: 'customerName',
align: 'left'
//align: 'left'
// width: 200
},
{
label: '创建时间',
prop: 'createdTime',
align: 'left'
//align: 'left'
// width: 200
},
{
label: '现群名称',
prop: 'chatName',
align: 'left'
//align: 'left'
},
{
label: '现群主',
prop: 'createdBy',
// minWidth: '180px',
addHtml: 'groupOwner',
align: 'left'
//align: 'left'
},
{
label: '状态',
prop: 'status',
addHtml: 'status',
// width: 250,
align: 'left'
//align: 'left'
}
]
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!