Commit 84c8367c by 王志慧

commit

1 parent 990effd6
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
<img src="./assets/logo.png" alt="" srcset="" /> <img src="./assets/logo.png" alt="" srcset="" />
</div> --> </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> <router-view></router-view>
</keep-alive> </keep-alive>
</div> </div>
......
...@@ -6,17 +6,85 @@ ...@@ -6,17 +6,85 @@
* @param {*} params * @param {*} params
* @returns * @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' params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http3({ return http({
// url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
url:'http://192.168.3.181:9636/rop-scrm-datahub/router', // url:'http://192.168.3.181:9636/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll: true returnAll: true
}) })
}
\ No newline at end of file \ 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) { ...@@ -17,9 +17,10 @@ export const fetchConfig = function (isEnv = true) {
Object.assign(request, { timeout }) Object.assign(request, { timeout })
return Promise.resolve(cfg) 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 = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<div class="container"> <div class="container">
<div> <div>
<div class="title">创建人群</div> <div class="title">人群详情</div>
<div class="info-box"> <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"> <div class="el-form-line">
<el-form-item label="人群名称:" prop="groupName" class="label-word"> <el-form-item label="人群名称:" prop="crowdName" class="label-word">
<div class="color-3">年龄为2—40岁,奥迪3系、奔驰4系,2</div> <div class="color-3">{{ crowdForm.crowdName }}</div>
</el-form-item> </el-form-item>
</div> </div>
<div class="el-form-line"> <div class="el-form-line">
<el-form-item label="人群描述:" prop="groupNameRule" class="label-word"> <el-form-item label="人群描述:" prop="groupNameRule" class="label-word">
<div class="color-3">人群描述</div> <div class="color-3">{{ crowdForm.crowdDesc }}</div>
</el-form-item> </el-form-item>
</div> </div>
<div class="el-form-line"> <div class="el-form-line">
...@@ -26,15 +26,12 @@ ...@@ -26,15 +26,12 @@
<div class="el-form-line"> <div class="el-form-line">
<el-form-item label="已选标签:" prop="groupNameRule" class="label-word"> <el-form-item label="已选标签:" prop="groupNameRule" class="label-word">
<div class="pageContent"> <div class="pageContent">
<GLTable :tableTotal="tableTotal" :tableData="tableData" :hasNum="hasNum" :hasPage="hasPage" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }"> <GLTable :tableData="selectedArray" :hasNum="hasNum" :hasPage="hasPage" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="labelGroup" slot-scope="scope"> <span slot="labelUnitList" slot-scope="scope">
<span>{{ scope.scope.labelGroup.name }}</span>
</span>
<span slot="labelList" slot-scope="scope">
<div class="allTagsWrap flex"> <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"> <span :class="['label', 'color-6', 'white-hide', 'mt10']" :key="index">
{{ item.name }} {{ item.labelName }}
</span> </span>
</template> </template>
</div> </div>
...@@ -79,11 +76,11 @@ ...@@ -79,11 +76,11 @@
</div> </div>
<div class="crowd-logic-wrap" id="crowd-logic-wrap" :style="{ 'margin-left': this.selectedArray.length > 1 ? '20px' : '55px' }"> <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-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"> <div class="flex">
<template v-for="(tag, id) in logicTag.children"> <template v-for="(tag, id) in logicTag.labelUnitList">
<div class="crowd-logic-tag color-6 font-14" :key="id">{{ tag.name }}</div> <div class="crowd-logic-tag color-6 font-14" :key="id">{{ tag.labelName }}</div>
<template v-if="id < logicTag.children.length - 1"> <template v-if="id < logicTag.labelUnitList.length - 1">
<div class="color-3 perhaps" :key="id">或</div> <div class="color-3 perhaps" :key="id">或</div>
</template> </template>
</template> </template>
...@@ -96,77 +93,71 @@ ...@@ -96,77 +93,71 @@
</template> </template>
<script> <script>
import { getTableList } from '@/api/modules/tagsManage'
export default { export default {
name: 'crowdDetail', name: 'crowdDetail',
data() { data() {
return { return {
groupForm: { crowdForm: {
groupName: '' crowdName: '',
crowdDesc: ''
}, },
pageConf: { pageSize: 'labelTreeReq.pageSize', pageNum: 'labelTreeReq.pageNum', totalCount: 'labelGroupCount' }, crowdId: this.$route.params.id ? this.$route.params.id : '',
tableTotal: '', tableTotal: '',
isShowCloseBtn: true, isShowCloseBtn: true,
dialogRuleVisible: false,
dialogLogicVisible: false,
tableData: [], tableData: [],
hasPage: false, hasPage: false,
hasNum: false, hasNum: false,
page: {}, page: {},
tableParams: { tableParams: {
listName: 'labelTreeRets',
tableColumns: [ tableColumns: [
{ {
label: '标签组', label: '标签组',
prop: 'labelGroup', prop: 'groupName',
addHtml: 'labelGroup', width: 180,
width: 180 //align: 'left'
}, },
{ {
label: '标签组类型', label: '标签组类型',
prop: 'labelType', prop: 'groupType',
width: 180 width: 180,
//align: 'left'
}, },
{ {
label: '标签', label: '标签',
prop: 'labelList', prop: 'labelUnitList',
addHtml: 'labelList', addHtml: 'labelUnitList',
align: 'center' //align: 'left'
} }
] ]
}, },
crowdRules: {
crowdName: [{ required: true }]
},
selectedArray: [] selectedArray: []
} }
}, },
created() { created() {
if (window.__POWERED_BY_QIANKUN__) { console.log('this.$route.params.id', this.$route.params.id)
//运行在qiankun容器中 // 通过人群Id查询人群详情
this.merchantId = this.$globalState.session.merchantId this.getCrowdDetails()
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)
}, },
mounted() {}, mounted() {},
methods: { methods: {
//获取标签数据 //获取标签数据
getLabelData() { getCrowdDetails() {
console.log(333333333333)
let params = { let params = {
...this.searchForm, 'req.crowdId': this.crowdId
...this.page
} }
getTableList(params).then(res => { this.$apis.crowdManage.getCrowdDetails(params).then(res => {
res.labelTreeRets.forEach(item => { console.log(res.code, res)
item.labelList.forEach(label => { if (res.code == 0) {
label.checked = false this.crowdForm.crowdName = res.data.crowdName
}) this.crowdForm.crowdDesc = res.data.crowdDesc
}) console.log(JSON.parse(res.data.tagCombine))
this.tableData = res.labelTreeRets this.selectedArray = res.data.tagCombine ? JSON.parse(res.data.tagCombine) : []
}
}) })
}, },
handleClose() { handleClose() {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<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">
<GLButton class="addBtn" fn="新建人群" @click="addClick">+ 新建人群</GLButton> <GLButton class="addBtn" fn="新建人群" v-if="!admin" @click="addClick">+ 新建人群</GLButton>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div class="pageContent"> <div class="pageContent">
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
</template> </template>
<script> <script>
import { getCrowdList } from '@/api/modules/crowdManage'
import url from '@/assets/clientDataOverview/nodata.png' import url from '@/assets/clientDataOverview/nodata.png'
export default { export default {
name: 'crowdManage', name: 'crowdManage',
...@@ -57,31 +56,31 @@ export default { ...@@ -57,31 +56,31 @@ export default {
label: '人群名称', label: '人群名称',
prop: 'crowdName', prop: 'crowdName',
// addHtml: 'crowdName', // addHtml: 'crowdName',
align: 'left' //align: 'left'
}, },
{ {
label: '人群描述', label: '人群描述',
prop: 'crowdDesc', prop: 'crowdDesc',
align: 'left' //align: 'left'
// width: 180 // width: 180
}, },
{ {
label: '人数', label: '人数',
prop: 'total', prop: 'total',
// addHtml: 'total', // addHtml: 'total',
align: 'left' //align: 'left'
}, },
{ {
label: '操作', label: '操作',
prop: 'xxx', prop: 'xxx',
fixed: 'right', fixed: 'right',
addHtml: 'xxx', addHtml: 'xxx',
align: 'left', //align: 'left',
width: 180 width: 180
} }
] ]
}, },
getListApi: getCrowdList, getListApi: this.$apis.crowdManage.getCrowdList,
expande: true, expande: true,
needShowExpande: false needShowExpande: false
} }
...@@ -91,7 +90,7 @@ export default { ...@@ -91,7 +90,7 @@ export default {
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中 //运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId 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.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 }
......
...@@ -199,33 +199,33 @@ export default { ...@@ -199,33 +199,33 @@ export default {
label: '客户', label: '客户',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName', addHtml: 'customerName',
align: 'left' //align: 'left'
// width: 200 // width: 200
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'createdTime', prop: 'createdTime',
align: 'left' //align: 'left'
// width: 200 // width: 200
}, },
{ {
label: '现群名称', label: '现群名称',
prop: 'chatName', prop: 'chatName',
align: 'left' //align: 'left'
}, },
{ {
label: '现群主', label: '现群主',
prop: 'createdBy', prop: 'createdBy',
// minWidth: '180px', // minWidth: '180px',
addHtml: 'groupOwner', addHtml: 'groupOwner',
align: 'left' //align: 'left'
}, },
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
addHtml: 'status', addHtml: 'status',
// width: 250, // 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!