Commit 8dde9c9b by xuyl

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

2 parents e2fbe8f4 c3de0948
<template>
<div class="full-container">
<el-tooltip placement="top" v-if="hoverStatus">
<div slot="content">
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
</template>
</div>
<div :class="[line ? 'full-text-line' : 'full-text']" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }">
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
</template>
</div>
</el-tooltip>
<div :class="[line ? 'full-text-line' : 'full-text', identification]" v-else @mouseenter="hoverFun" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }">
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
</template>
</div>
</div>
</template>
<script>
export default {
name: 'GLFull',
data() {
return {
hoverStatus: false
}
},
props: {
identification: {
type: String,
default: ''
},
label: {
type: String,
default: ''
},
labelWidth: {
type: Number,
default: 100
},
line: {
type: Number,
default: 0
}
},
methods: {
hoverFun() {
this.hoverStatus = this.identification ? document.querySelector(`.${this.identification}`).scrollWidth > this.labelWidth : document.querySelector(`.full-text`).scrollWidth > this.labelWidth
}
}
}
</script>
<style scoped lang="scss">
.full-container {
display: inline-block;
}
.full-text {
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.full-text-line {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
word-break: break-all;
}
</style>
...@@ -3,16 +3,18 @@ import { message } from '@/plugins/element.js' ...@@ -3,16 +3,18 @@ import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import { GLButton, GLTable, GLCombiForm } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLButton, GLTable, GLCombiForm } from 'glsx-components' //权限按钮 (根据权限动态创建)
import GLFull from '@/components/GLFull'
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLCombiForm) Vue.use(GLCombiForm)
Vue.component('GLFull', GLFull)
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
// http:调的是新版标签的接口,http2:调的是客户相关接口;http3:企微授权那边的接口 目前导出接口都测试的:http3 // http:调的是新版标签的接口,http2:调的是客户相关接口;http3:企微授权那边的接口 目前导出接口都测试的:http3
export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) { export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
const { response, request, request2, request3, request4, sign, secret, sign_common, request_common } = await fetchConfig(globalState.configSwitch) //globalState.configSwitch const { response, request, request2, request3, request4, sign, secret, sign_common, request_common } = await fetchConfig(globalState.configSwitch) //globalState.configSwitch
Vue.prototype.$history = history Vue.prototype.$history = history
......
...@@ -13,9 +13,7 @@ ...@@ -13,9 +13,7 @@
</div> </div>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams"> <GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams">
<span slot="customerName" slot-scope="scope"> <span slot="customerName" slot-scope="scope">
<el-tooltip effect="dark" :content="scope.scope.customerName" placement="top"> <GLFull :labelWidth="70" :identification="`node_${scope.scope.id}`">{{ scope.scope.customerName }}</GLFull>
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip>
</span> </span>
<span slot="customerSex" slot-scope="scope"> <span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : scope.scope.customerSex == 2 ? '女' : '' }}</span> <span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : scope.scope.customerSex == 2 ? '女' : '' }}</span>
......
...@@ -343,7 +343,12 @@ export default { ...@@ -343,7 +343,12 @@ export default {
type: 'success', type: 'success',
message: '操作成功!' message: '操作成功!'
}) })
this.$router.push('/crowdManage/index') this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 1
}
})
} else { } else {
this.$message({ this.$message({
type: 'error', type: 'error',
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</div> </div>
<div class="footer-panel"> <div class="footer-panel">
<div> <div>
<el-button type="primary" @click="$router.go(-1)">返回</el-button> <el-button type="primary" @click="goBack">返回</el-button>
</div> </div>
</div> </div>
<el-dialog title="人群规则说明" class="crowd-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogRuleVisible" :show-close="isShowCloseBtn"> <el-dialog title="人群规则说明" class="crowd-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogRuleVisible" :show-close="isShowCloseBtn">
...@@ -153,6 +153,14 @@ export default { ...@@ -153,6 +153,14 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
goBack() {
this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 1
}
})
},
//获取标签数据 //获取标签数据
getCrowdDetails() { getCrowdDetails() {
let params = { let params = {
......
...@@ -135,6 +135,10 @@ export default { ...@@ -135,6 +135,10 @@ export default {
this.searchTable() this.searchTable()
}, },
beforeSearchFn() { beforeSearchFn() {
if (this.$route.query.selectTab) {
this.activeName = 'second'
// window.history.pushState(null, null, location.origin + location.pathname)
}
return new Promise(resolve => { return new Promise(resolve => {
const crowdType = this.activeName == 'first' ? 1 : 2 const crowdType = this.activeName == 'first' ? 1 : 2
this.searchForm = Object.assign(this.searchForm, { 'req.merchantId': this.merchantId, 'req.crowdType': crowdType }) this.searchForm = Object.assign(this.searchForm, { 'req.merchantId': this.merchantId, 'req.crowdType': crowdType })
......
...@@ -7,17 +7,9 @@ ...@@ -7,17 +7,9 @@
<el-tree @check="checkChange" class="tag-tree" ref="tagTree" :data="labelTree" :props="defaultProps" @node-click="nodeClick" show-checkbox node-key="id" :default-expanded-keys="expandId" :expand-on-click-node="false" :filter-node-method="filterNode"> <el-tree @check="checkChange" class="tag-tree" ref="tagTree" :data="labelTree" :props="defaultProps" @node-click="nodeClick" show-checkbox node-key="id" :default-expanded-keys="expandId" :expand-on-click-node="false" :filter-node-method="filterNode">
<div class="custom-tree-node" slot-scope="{ node, data }"> <div class="custom-tree-node" slot-scope="{ node, data }">
<el-tooltip placement="top" v-if="hoverId == data.id && hoverStatus"> <GLFull labelWidth="140" :identification="`node_${data.id}`">
<span :class="['tree-node', `node_${data.id}`]" slot="content">
{{ node.label }} {{ node.label }}
</span> </GLFull>
<span :class="['tree-node', `node_${data.id}`]">
{{ node.label }}
</span>
</el-tooltip>
<span :class="['tree-node', `node_${data.id}`]" v-else @mouseenter="hoverFun(data)">
{{ node.label }}
</span>
<span v-if="data.labelType && data.labelType != '系统标签' && isShowEditBtn(data.labelDTO)" @click.stop="editTree(data)"> <span v-if="data.labelType && data.labelType != '系统标签' && isShowEditBtn(data.labelDTO)" @click.stop="editTree(data)">
<i class="el-icon-edit-outline"></i> <i class="el-icon-edit-outline"></i>
</span> </span>
...@@ -218,11 +210,11 @@ export default { ...@@ -218,11 +210,11 @@ export default {
color: #333; color: #333;
} }
.tree-node { .tree-node {
width: 140px; // width: 140px;
display: inline-block; // display: inline-block;
white-space: nowrap; // white-space: nowrap;
text-overflow: ellipsis; // text-overflow: ellipsis;
overflow: hidden; // overflow: hidden;
} }
.el-tree-node__expand-icon { .el-tree-node__expand-icon {
font-size: 15px; font-size: 15px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!