Commit 88e66561 by 前端

Merge branch 'huy_dev_v2.4.0' into 'v2.4.0'

Huy dev v2.4.0

See merge request !179
2 parents 273a5d5f d398ada1
import { http, http2 } from '@/main'
import { http, http2, http_xiaolong } from '@/main'
const path = 'entmicro.api.mass.'
const URL = 'rop-scrm-entmicro/router'
......@@ -87,6 +87,7 @@ const groupList = params => {
}
const customerCount = params => {
params.method = 'entmicro.api.mass.detail.customer.filter.count'
// return http({
return http({
url: URL,
method: 'POST',
......@@ -336,6 +337,26 @@ const followerType = params => {
})
}
const queryCrowdtree = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http({
url: 'rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
const followerEcho = params => {
params.method = 'entmicro.api.mass.follower.echo'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
customerList,
customerGroupList,
......@@ -369,5 +390,7 @@ export default {
templateDetail,
groupDetailUpdate,
findLordGroup,
followerType
followerType,
queryCrowdtree,
followerEcho
}
......@@ -3,8 +3,8 @@
* @version: 1.0.0
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: limin
* @LastEditTime: 2021-09-24 10:41:31
* @LastEditors: huyue
* @LastEditTime: 2022-05-27 16:23:01
* @FilePath: \scrm\scrm-sub-blog\src\main.js
*/
import Vue from 'vue'
......@@ -23,3 +23,4 @@ export const http = params => Vue.prototype.$http(params)
export const http2 = params => Vue.prototype.$http2(params)
export const http_common = params => Vue.prototype.$http_common(params)
export const http_merchant = params => Vue.prototype.$http_merchant(params)
export const http_xiaolong = params => Vue.prototype.$http_xiaolong(params)
/*
* @Description:
* @Author: huyue
* @Date: 2022-01-20 18:06:46
* @LastEditors: huyue
* @LastEditTime: 2022-05-27 16:28:40
*/
import Vue from 'vue'
import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
......@@ -15,7 +22,7 @@ Vue.use(ElementUI)
Vue.use(GLTable)
Vue.use(GLFooter)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request2, sign, secret, sign_common, request_common, request_merchant } = await fetchConfig(false)
const { response, request, request2, sign, secret, sign_common, request_common, request_merchant, xiaolong_req } = await fetchConfig(false)
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
......@@ -28,6 +35,7 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.prototype.$http_xiaolong = new common.Http({ response, request: xiaolong_req, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers)
......
......@@ -104,6 +104,22 @@
</span>
</div>
</div>
<div class="detail-condition" v-if="form == 'customer' && basicInfo.selectType == 3">
<div class="detail-condition-item" style="width: 100%;">
<span class="name">人群</span>
<span v-for="(ite, index) in basicInfo.conditionResponses" class="el-tag-item" :key="index">
<el-tag v-if="index < 2" type="info">{{ ite.crowdName }}</el-tag>
<el-tag type="info" v-if="basicInfo.conditionResponses.length > 2 && index == 2">
<el-popover placement="top" width="300" trigger="hover">
<span slot="reference">...({{ basicInfo.conditionResponses.length }})</span>
<div class="entmicro-hover">
<el-tag type="info" v-for="(ins, index) in basicInfo.conditionResponses" :key="index" :disable-transitions="false">{{ ins.crowdName }}</el-tag>
</div>
</el-popover>
</el-tag>
</span>
</div>
</div>
</div>
<div class="title">数据统计</div>
<div class="statistics-info">
......@@ -241,7 +257,7 @@ export default {
}
}
</script>
<style lang="scss" scope>
<style lang="scss">
.container {
margin-bottom: 20px;
background-color: #ffffff;
......
<!--
* @Description:
* @Author: huyue
* @Date: 2022-05-24 18:18:53
* @LastEditors: huyue
* @LastEditTime: 2022-06-08 18:47:26
-->
<template>
<div>
<el-dialog :title="'人群筛选'" :width="'1080px'" :visible.sync="crowdVisible">
<div class="member-wrapper">
<div class="member-left">
<div class="member-title">
人群列表
</div>
<div class="member-content">
<el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent>
<el-form-item label="人群名称" style="margin-bottom: 0" size="small">
<el-input :size="size" v-model.trim="searchForm.req.keyword" @keyup.enter.native="search" clearable
placeholder="请输入关键字搜索"></el-input>
</el-form-item>
<el-form-item label style="margin-bottom: 0;margin-left:10px" size="small">
<el-button type="primary" :size="size" @click="search">搜索</el-button>
</el-form-item>
</el-form>
<div class="table-content">
<GLTable v-loading="loading" ref="crowdTable" :getListApi="getCrowdList" :tableParams="crowdTableParams"
:hasNum="true" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url"
:beforeSearchFn="beforeSearchFn" @selectionTable="selectionTable" @row-click="rowClick"></GLTable>
</div>
</div>
</div>
<div class="member-right">
<div class="member-title">已选</div>
<div class="member-name">人群({{ innerTags.length }}项)</div>
<div class="input-tag-wrapper">
<div class="tag-box">
<el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false"
@close="remove(tag)">
{{ tag.crowdName }}
</el-tag>
</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleClose">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleConfirm">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'SelectCrowd',
props: ['selectCrowdData'],
data() {
return {
url,
crowdVisible: false,
searchForm: { req: {} },
innerTags: [],
getCrowdList: this.$apis.customerTransform.queryCrowdtree,
pageConf: { pageSize: 'req.pageSize', pageNum: 'req.pageNum', totalCount: 'total' },
crowdTableParams: {
checkSelectKey: 'id',
checkSelectVal: [],
hasNum: false,
listName: 'crowdUnitList',
// 行数据的key
mutiSelectUniqueKey: 'crowdId',
// 多选ref的名称
mutiSelectName: 'crowdlist',
tableColumns: [
{
label: '人群名称',
prop: 'crowdName'
},
{
label: '人群描述',
prop: 'crowdDesc'
},
{
label: '人数',
prop: 'total'
}
]
}
}
},
watch: {
selectCrowdData(val) {
this.$emit('crowdData', val)
this.$refs.crowdTable.$refs.crowdlistMutiTable.clearSelection()
if (val.length) {
val.forEach(item => {
this.rowClick(item)
})
}
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
Object.assign(this.searchForm.req, {
merchantId: this.$globalState.session.merchantId,
crowdType: 3,
filterType: 2
})
resolve()
})
},
selectionTable(val) {
this.innerTags = val
},
remove(item) {
this.$refs.crowdTable.$refs.crowdlistMutiTable.toggleRowSelection(item)
},
rowClick(row) {
console.log(this.$refs.crowdTable)
this.$refs.crowdTable.$refs.crowdlistMutiTable.toggleRowSelection(row)
},
search() {
this.$refs.crowdTable.refreshTable()
},
handleConfirm() {
this.$emit('crowdData', this.innerTags)
this.crowdVisible = false
this.searchForm = { req: {} }
},
handleClose() {
this.crowdVisible = false
this.innerTags = []
this.$refs.crowdTable.$refs.crowdlistMutiTable.clearSelection()
}
}
}
</script>
<style lang="scss" scoped>
.member-wrapper {
display: flex;
.member-title {
font-size: 16px;
color: #333;
font-weight: 600;
line-height: 22px;
margin-bottom: 6px;
span {
display: inline-block;
padding-left: 5px;
font-size: 12px;
color: #999;
font-weight: 500;
}
}
.member-left {
width: 780px;
.member-content {
border: 1px solid #eee;
padding-bottom: 20px;
/deep/ {
.el-table {
height: 40vh;
overflow-y: auto;
}
}
.member-form {
padding: 10px 20px;
}
.table-content {
max-height: 456px;
overflow: auto;
border-top: 1px solid #eee;
}
}
.member-checked {
text-align: right;
margin-top: 10px;
}
}
.member-right {
width: 248px;
margin-left: 14px;
.member-name {
font-size: 14px;
color: #333;
line-height: 20px;
padding: 18px;
border: 1px solid #eee;
}
}
}
.tag-box {
height: 100%;
width: 100%;
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
border: 1px solid #eee;
border-top: none;
box-sizing: border-box;
color: #606266;
display: inline-block;
padding: 8px 10px;
line-height: 32px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%;
height: calc(100% - 86px);
display: flex;
align-items: center;
max-height: 500px;
overflow: auto;
// margin-bottom: 10px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
/deep/ input {
/* input { */
/* background-color: red!important; 调试用的样式 */
outline: none !important;
border: none !important;
}
/deep/ .el-input {
min-width: 150px;
width: auto;
flex: 1;
}
}
.el-tag {
margin-right: 10px;
line-height: 22px;
margin-bottom: 5px;
height: 24px;
background: #FAFBFE !important;
}
/deep/.el-dialog__title {
font-weight: 600;
}
</style>
......@@ -260,7 +260,7 @@ export default {
.table-content {
max-height: 456px;
overflow: auto;
border: 1px solid #eee;
border-top: 1px solid #eee;
}
}
.member-checked {
......
......@@ -291,7 +291,7 @@ export default {
.table-content {
max-height: 456px;
overflow: auto;
border: 1px solid #eee;
border-top: 1px solid #eee;
}
}
.member-checked {
......
......@@ -260,7 +260,7 @@ export default {
.table-content {
max-height: 456px;
overflow: auto;
border: 1px solid #eee;
border-top: 1px solid #eee;
}
}
.member-checked {
......
......@@ -292,7 +292,7 @@ export default {
.table-content {
max-height: 456px;
overflow: auto;
border: 1px solid #eee;
border-top: 1px solid #eee;
}
}
.member-checked {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!