Commit 7c8368ea by xuyl

Merge branch 'v2.0.0' of http://192.168.3.233:8090/saas/scrm-micro-custom into xuyl_dev_v2.0.0

2 parents 12d5e724 990effd6
......@@ -12,7 +12,8 @@ import { http3 } from '@/main'
export function getCrowdList(params) {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http3({
url: '/rop-scrm-datahub/router',
// url: '/rop-scrm-datahub/router',
url:'http://192.168.3.181:9636/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
......
......@@ -73,10 +73,6 @@ background: transparent !important;
align-items: center;
justify-content: space-between;
}
.flex-satrt{
display: flex;
align-items: flex-start;
}
.font-20{
font-size: 20px;
}
......
......@@ -4,7 +4,7 @@
<div>
<div class="title">创建人群</div>
<div class="info-box">
<el-form :model="groupForm" :rules="groupRules" ref="groupForm" label-width="118px">
<el-form class="create-form" :model="groupForm" :rules="groupRules" ref="groupForm" label-width="118px">
<div class="el-form-line">
<el-form-item label="人群名称:" prop="groupName">
<el-input v-model.trim="groupForm.groupName" size="small" placeholder="请输入人群名称" maxlength="30"></el-input>
......@@ -20,16 +20,16 @@
<div class="el-form-line">
<el-form-item label="标签筛选:" prop="groupNameRule" class="label-word">
<div class="flex">
<div class="font-14 color-58 mr2 hand">人群规则说明</div>
<div class="font-14 color-58 hand">人群规则逻辑</div>
<div class="font-14 color-58 mr2 hand" @click="open('dialogRuleVisible')">人群规则说明</div>
<div class="font-14 color-58 hand" @click="open('dialogLogicVisible')">人群规则逻辑</div>
</div>
</el-form-item>
</div>
</el-form>
<div class="label-wrap">
<div :class="{ 'fixed-box': true, is_fixed: isFixed, is_pb: isDom }" id="boxFixed">
<div :class="{ 'fixed-box': true, is_fixed: isFixed, is_pb: isDom, is_auto: !isFixed }" id="boxFixed">
<template v-if="this.selectedArray.length > 0">
<div class="select-label-wrap font-14 flex-satrt" id="tagBox">
<div class="select-label-wrap font-14 flex-start" id="tagBox">
<div class="select-label color-3">已选标签:</div>
<div class="flex">
<div class="selects" v-for="(selectTag, index) in selectedArray" :key="index">
......@@ -55,12 +55,22 @@
</div>
</div>
</template>
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="tagsPartFormList" @setTableHeightEvent="setTableHeightEvent" labelWidth="54px">
<span class="inline-b" slot="form-slot">
<el-form :model="searchForm" size="small" :inline="true" @submit.native.prevent label-position="right" label-width="auto">
<el-form-item label="标签组名称">
<el-select v-model="searchForm.labelTypesStr" filterable placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="标签名称">
<el-select v-model="searchForm.labelGroupName" filterable placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="resetTable" plain>重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button>
</span>
</search-form>
</el-form-item>
</el-form>
<div class="expande-button-wrap" v-if="isFixed">
<div class="expande-button" @click="expandeClick" v-if="!expande && isDom">
<i class="el-icon-arrow-down"></i>
......@@ -73,6 +83,7 @@
</div>
</div>
<div class="pageContent">
<div class="color-3 font-14 forecast">查看预估人数<span class="color-58">刷新</span></div>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="tagsManage" :hasNum="false" :tableTotal="tableTotal" :tableData="tableData" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" @refreshTable="refreshTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="labelGroup" slot-scope="scope">
<span>{{ scope.scope.labelGroup.name }}</span>
......@@ -105,6 +116,51 @@
<el-button type="primary" @click="handleSubmit">确定</el-button>
<el-button @click="handleCancel">取消</el-button>
</div>
<el-dialog title="人群规则说明" class="crowd-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogRuleVisible" :show-close="isShowCloseBtn">
<div class="crowd-dialog-wrap color-3">
<div class="condition font-14">
<b>说明:</b>
<br />
<span>
标签组内已选标签取
<b>并集(或)</b>
,即满足一个条件即可、标签组之间取
<b>交集(且)</b>
,即同时满足标签组条件。
</span>
</div>
<div class="flex-between">
<div class="static-image">
<img src="@/assets/crowdManage/sum.png" alt="" />
</div>
<div class="static-image">
<img src="@/assets/crowdManage/intersection.png" alt="" />
</div>
</div>
</div>
</el-dialog>
<el-dialog title="人群规则逻辑" class="crowd-logic-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogLogicVisible" :show-close="isShowCloseBtn">
<div class="crowd-logic-dialog-wrap">
<div :class="{ 'crowd-flex': true }" v-if="this.selectedArray.length > 1">
<div class="crowd-line" id="lineHeight"></div>
<div class="moreover">且</div>
<div class="crowd-line" id="lineHeight2"></div>
</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="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">
<div class="color-3 perhaps" :key="id">或</div>
</template>
</template>
</div>
</div>
</div>
</div>
</el-dialog>
</div>
</template>
......@@ -114,12 +170,16 @@ export default {
name: 'crowdAdd',
data() {
return {
isFixed: true,
isFixed: false,
offsetTop: 0,
expande: false,
isClick: false,
isDom: false,
isShowCloseBtn: true,
tableData: [],
isReload: true,
dialogRuleVisible: false,
dialogLogicVisible: false,
groupForm: {
groupName: ''
},
......@@ -201,11 +261,15 @@ export default {
},
watch: {
selectedArray: function () {
this.$nextTick(function () {
this.$nextTick(() => {
//条件重置
document.getElementById('tagBox').style.height = 'auto'
if (!this.expande || !this.isFixed) {
if (!this.isFixed) {
//判断是否可以触发
this.isClick = false
this.expande = false
}
if (!this.isClick || !this.isFixed) {
//获取当前元素的高
let height = document.getElementById('tagBox').offsetHeight
if (height > 127) {
......@@ -225,20 +289,49 @@ export default {
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 200
//初始化数据
window.addEventListener('scroll', this.initHeight, true)
this.$nextTick(() => {
this.offsetTop = document.querySelector('#boxFixed').offsetTop
})
},
methods: {
delayScrollFunc(fn, delay) {
const now = new Date().getTime()
if (now - this.lastScrollCall < delay) return
this.lastScrollCall = now
setTimeout(() => {
fn()
}, 60) // 在实际项目中,我发现这里再延迟一点时间执行效果更好(针对监听scroll)
},
open(value) {
this[value] = true
if (this.dialogLogicVisible == true && this.selectedArray.length > 1) {
this.$nextTick(() => {
let height = document.getElementById('crowd-logic-wrap').offsetHeight
if (height >= 650) {
document.getElementById('lineHeight').style.height = 308 + 'px'
document.getElementById('lineHeight2').style.height = 308 + 'px'
this.logicFix = true
} else {
let lineHeight = (height - 35) / 2
document.getElementById('lineHeight').style.height = lineHeight + 'px'
document.getElementById('lineHeight2').style.height = lineHeight + 'px'
}
})
}
},
handleClose() {
this.dialogRuleVisible = false
this.dialogLogicVisible = false
},
refreshTable(page) {
console.log(page)
this.page = page
this.getLabelData()
},
expandeClick() {
this.expande = !this.expande
this.isClick = this.expande
if (this.expande) {
document.getElementById('tagBox').style.height = 'auto'
} else {
......@@ -248,18 +341,6 @@ export default {
initHeight() {
var scrollTop = document.querySelector('#container').scrollTop
this.isFixed = scrollTop > this.offsetTop ? true : false
document.getElementById('tagBox').style.height = 'auto'
let height = document.getElementById('tagBox').offsetHeight
if (!this.isFixed) {
//条件重置
if (height > 127) {
this.expande = true
this.isDom = true
} else {
this.expande = false
this.isDom = false
}
}
},
//获取标签数据
getLabelData() {
......@@ -350,11 +431,9 @@ export default {
}
this.selectedArray[i].combination = array.join('、')
let length = 20 - this.selectedArray[i].labelGroupName.name.length
console.log(this.selectedArray[i].combination)
this.selectedArray[i].combinationtext = this.selectedArray[i].combination.substring(0, length)
this.$set(this.selectedArray, i, this.selectedArray[i])
}
console.log(this.selectedArray)
},
//删除选中标签
closeTag(data, index) {
......@@ -407,6 +486,7 @@ export default {
height: calc(100vh - 150px);
overflow-y: auto;
// padding: 20px;
.title {
padding: 20px 0 17px 20px;
font-size: 16px;
......@@ -421,7 +501,7 @@ export default {
width: 100%;
padding: 30px 0;
box-sizing: border-box;
.el-form {
.create-form {
width: 100%;
height: 246px;
box-sizing: border-box;
......@@ -473,7 +553,6 @@ export default {
width: 100%;
.fixed-box {
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
box-sizing: border-box;
padding: 0 30px;
}
......@@ -483,10 +562,14 @@ export default {
top: 60px;
z-index: 999;
padding: 20px 30px 20px 30px;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
}
.is_pb {
padding: 20px 30px 52px 30px !important;
}
.is_auto {
height: auto !important;
}
.select-label-wrap {
margin-bottom: 20px;
overflow: hidden;
......@@ -546,8 +629,19 @@ export default {
padding: 0 0 2px 0;
}
.pageContent {
position:relative;
padding: 0 30px;
}
.forecast{
position: absolute;
right:40px;
top:-56px;
line-height: 36px;
span{
margin-left:4px;
cursor: pointer;
}
}
.expande-button-wrap {
position: absolute;
bottom: 16px;
......@@ -630,4 +724,99 @@ export default {
.tooltip-text {
line-height: 18px;
}
.crowd-dialog {
/deep/.el-dialog__header {
padding: 15px 20px;
}
/deep/.el-dialog__body {
padding: 20px;
}
}
.crowd-logic-dialog {
/deep/.el-dialog__header {
padding: 15px 20px;
}
/deep/.el-dialog__body {
padding: 20px;
min-height: 260px;
max-height: 690px;
overflow: auto;
}
}
.crowd-dialog-wrap {
.condition {
margin-bottom: 16px;
line-height: 21px;
b {
color: #666666;
}
}
.static-image {
width: 335px;
height: 325px;
img {
width: 100%;
}
}
}
.crowd-logic-dialog-wrap {
display: flex;
.crowd-flex {
display: flex;
flex-direction: column;
align-items: center;
}
.crowd-line {
width: 1px;
background: #5850ff;
}
.moreover {
text-align: center;
font-size: 16px;
font-weight: 500;
color: #5850ff;
line-height: 35px;
width: 35px;
height: 35px;
background: #efeeff;
border-radius: 4px;
border: 1px solid #5850ff;
}
.crowd-logic-wrap {
width: 100%;
height: auto;
.crowd-logic-labels {
width: 625px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e5e5e5;
padding: 10px;
box-sizing: border-box;
margin-top: 10px;
.crowd-logic-label-group-name {
line-height: 21px;
}
.crowd-logic-tag {
padding: 1px 8px;
line-height: 24px;
height: 26px;
background: #f4f6fc;
border-radius: 4px;
border: 1px solid #e8e8ea;
margin-top: 8px;
margin-right: 8px;
}
.perhaps {
margin-top: 8px;
margin-right: 8px;
font-weight: 400;
}
}
}
.crowd-logic-wrap :nth-child(1) {
margin-top: 0;
}
}
</style>
<template>
<div class="scrm-sub-client-container">
<div class="container">
<div>
<div class="title">创建人群</div>
<div class="info-box">
<el-form class="create-form" :model="groupForm" :rules="groupRules" ref="groupForm" 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>
</div>
<div class="el-form-line">
<el-form-item label="人群描述:" prop="groupNameRule" class="label-word">
<div class="color-3">人群描述</div>
</el-form-item>
</div>
<div class="el-form-line">
<el-form-item label="标签筛选:" prop="groupNameRule" class="label-word">
<div class="flex">
<div class="font-14 color-58 mr2 hand" @click="open('dialogRuleVisible')">人群规则说明</div>
<div class="font-14 color-58 hand" @click="open('dialogLogicVisible')">人群规则逻辑</div>
</div>
</el-form-item>
</div>
<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">
<div class="allTagsWrap flex">
<template v-for="(item, index) in scope.scope.labelList">
<span :class="['label', 'color-6', 'white-hide', 'mt10']" :key="index">
{{ item.name }}
</span>
</template>
</div>
</span>
</GLTable>
</div>
</el-form-item>
</div>
</el-form>
</div>
</div>
</div>
<el-dialog title="人群规则说明" class="crowd-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogRuleVisible" :show-close="isShowCloseBtn">
<div class="crowd-dialog-wrap color-3">
<div class="condition font-14">
<b>说明:</b>
<br />
<span>
标签组内已选标签取
<b>并集(或)</b>
,即满足一个条件即可、标签组之间取
<b>交集(且)</b>
,即同时满足标签组条件。
</span>
</div>
<div class="flex-between">
<div class="static-image">
<img src="@/assets/crowdManage/sum.png" alt="" />
</div>
<div class="static-image">
<img src="@/assets/crowdManage/intersection.png" alt="" />
</div>
</div>
</div>
</el-dialog>
<el-dialog title="人群规则逻辑" class="crowd-logic-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogLogicVisible" :show-close="isShowCloseBtn">
<div class="crowd-logic-dialog-wrap">
<div :class="{ 'crowd-flex': true }" v-if="this.selectedArray.length > 1">
<div class="crowd-line" id="lineHeight"></div>
<div class="moreover">且</div>
<div class="crowd-line" id="lineHeight2"></div>
</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="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">
<div class="color-3 perhaps" :key="id">或</div>
</template>
</template>
</div>
</div>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { getTableList } from '@/api/modules/tagsManage'
export default {
name: 'crowdDetail',
data() {
return {
groupForm: {
groupName: ''
},
pageConf: { pageSize: 'labelTreeReq.pageSize', pageNum: 'labelTreeReq.pageNum', totalCount: 'labelGroupCount' },
tableTotal: '',
isShowCloseBtn: true,
tableData: [],
hasPage: false,
hasNum: false,
page: {},
tableParams: {
listName: 'labelTreeRets',
tableColumns: [
{
label: '标签组',
prop: 'labelGroup',
addHtml: 'labelGroup',
width: 180
},
{
label: '标签组类型',
prop: 'labelType',
width: 180
},
{
label: '标签',
prop: 'labelList',
addHtml: 'labelList',
align: 'center'
}
]
},
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)
},
mounted() {},
methods: {
//获取标签数据
getLabelData() {
console.log(333333333333)
let params = {
...this.searchForm,
...this.page
}
getTableList(params).then(res => {
res.labelTreeRets.forEach(item => {
item.labelList.forEach(label => {
label.checked = false
})
})
this.tableData = res.labelTreeRets
})
},
handleClose() {
this.dialogRuleVisible = false
this.dialogLogicVisible = false
},
open(value) {
this[value] = true
if (this.dialogLogicVisible == true && this.selectedArray.length > 1) {
this.$nextTick(() => {
let height = document.getElementById('crowd-logic-wrap').offsetHeight
if (height >= 650) {
document.getElementById('lineHeight').style.height = 308 + 'px'
document.getElementById('lineHeight2').style.height = 308 + 'px'
this.logicFix = true
} else {
let lineHeight = (height - 35) / 2
document.getElementById('lineHeight').style.height = lineHeight + 'px'
document.getElementById('lineHeight2').style.height = lineHeight + 'px'
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
.container {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
height: calc(100vh - 80px);
overflow-y: auto;
// padding: 20px;
.title {
padding: 20px 0 17px 20px;
font-size: 16px;
color: #333;
font-weight: 600;
border-bottom: 1px solid #d8d8d8;
&::after {
content: '';
}
}
.info-box {
width: 100%;
padding: 30px 0;
box-sizing: border-box;
.create-form {
width: 100%;
box-sizing: border-box;
padding: 0 30px;
}
.el-form-line {
margin-bottom: 20px;
.label-word {
/deep/ .el-form-item__content {
line-height: 20px;
}
/deep/ .el-form-item__label {
line-height: 20px;
margin-right: 0;
}
}
}
.mr2 {
margin-right: 20px;
}
.allTagsWrap {
.label {
background: #f4f6fc;
border-radius: 4px;
border: 1px solid #e8e8ea;
text-align: center;
margin-right: 4px;
margin-top: 4px;
position: relative;
padding: 0 8px;
height: 26px;
line-height: 26px;
box-sizing: border-box;
display: inline-block;
}
.isChecked {
border: 1px solid #5850ff !important;
color: #5850ff;
.select-icon {
width: 16px;
height: 16px;
position: absolute;
top: 0;
right: 0;
}
}
}
}
}
.crowd-dialog {
/deep/.el-dialog__header {
padding: 15px 20px;
}
/deep/.el-dialog__body {
padding: 20px;
}
}
.crowd-logic-dialog {
/deep/.el-dialog__header {
padding: 15px 20px;
}
/deep/.el-dialog__body {
padding: 20px;
min-height: 260px;
max-height: 690px;
overflow: auto;
}
}
.crowd-dialog-wrap {
.condition {
margin-bottom: 16px;
line-height: 21px;
b {
color: #666666;
}
}
.static-image {
width: 335px;
height: 325px;
img {
width: 100%;
}
}
}
.crowd-logic-dialog-wrap {
display: flex;
.crowd-flex {
display: flex;
flex-direction: column;
align-items: center;
}
.crowd-line {
width: 1px;
background: #5850ff;
}
.moreover {
text-align: center;
font-size: 16px;
font-weight: 500;
color: #5850ff;
line-height: 35px;
width: 35px;
height: 35px;
background: #efeeff;
border-radius: 4px;
border: 1px solid #5850ff;
}
.crowd-logic-wrap {
width: 100%;
height: auto;
.crowd-logic-labels {
width: 625px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e5e5e5;
padding: 10px;
box-sizing: border-box;
margin-top: 10px;
.crowd-logic-label-group-name {
line-height: 21px;
}
.crowd-logic-tag {
padding: 1px 8px;
line-height: 24px;
height: 26px;
background: #f4f6fc;
border-radius: 4px;
border: 1px solid #e8e8ea;
margin-top: 8px;
margin-right: 8px;
}
.perhaps {
margin-top: 8px;
margin-right: 8px;
font-weight: 400;
}
}
}
.crowd-logic-wrap :nth-child(1) {
margin-top: 0;
}
}
</style>
<template>
<div class="scrm-sub-client-container" v-loading=loading>
<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">
<el-button type="primary">+ 新建人群</el-button>
<GLButton class="addBtn" fn="新建人群" @click="addClick">+ 新建人群</GLButton>
</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>
<span @click="btnClick('detail', scope.scope)" class="blue-text">查看详情</span>
<span style="margin-left: 20px" @click="btnClick('view', scope.scope)" class="blue-text">查看客户</span>
<!-- <GLButton class="blue-text leftDistance" type="text" fn="查看客户" v-if="userType !== 2" @click="toViewCustomer(scope.scope)">查看客户</GLButton> -->
</template>
</GLTable>
......@@ -108,7 +108,20 @@ export default {
}, 200)
},
methods: {
setTableHeightEvent() {
btnClick(type, data) {
console.log(data)
if (type == 'detail') {
console.log(`/crowdManage/crowdDetail/${data.crowdId}`)
this.$router.push(`/crowdManage/crowdDetail/${data.crowdId}`)
}
if (type == 'view') {
this.$router.push(`/clientDataOverview/group/${data.crowdId}`)
}
},
addClick() {
this.$router.push('/crowdManage/crowdAdd')
},
setTableHeightEvent() {
this.$refs.clientGroupDetail.setTableHeightFun()
},
handleClick() {
......@@ -126,7 +139,6 @@ export default {
this.searchForm = Object.assign(this.searchForm, { 'req.merchantId': this.merchantId, 'req.crowdType': crowdType })
resolve()
})
},
//搜索表格
searchTable() {
......@@ -145,6 +157,17 @@ export default {
<style lang="scss" scoped>
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.addBtn {
height: 32px;
background: $btnBlue;
border-radius: 3px;
padding: 5px 16px;
color: #fff;
font-size: 16px;
&:hover {
background-color: $lightBtnBlue;
}
}
/deep/ .el-tabs__nav-wrap::after {
content: none;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!