Commit c3de0948 by 前端

Merge branch 'yangm_dev_v2.1.0' into 'v2.1.0'

fixed

See merge request !57
2 parents 3d6cb570 0ab8b6a2
<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,50 +3,52 @@ import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import ElementUI from 'element-ui'
import { GLButton, GLTable, GLCombiForm } from 'glsx-components' //权限按钮 (根据权限动态创建)
import GLFull from '@/components/GLFull'
import { getRoutes } from '@/router'
import render from './render'
Vue.use(ElementUI)
Vue.use(GLTable)
Vue.use(GLCombiForm)
Vue.component('GLFull', GLFull)
import 'glsx-components/dist/glsx-components.css'
let routes = []
let router = null
let instance = null
// http:调的是新版标签的接口,http2:调的是客户相关接口;http3:企微授权那边的接口 目前导出接口都测试的:http3
// http:调的是新版标签的接口,http2:调的是客户相关接口;http3:企微授权那边的接口 目前导出接口都测试的:http3
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
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http3 = new common.Http({ response, request: request3, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http4 = new common.Http({ response, request: request4, sign, secret, alert: message.error, headers: { token: 'scrm-base-e2d4f962-4ca3-4044-83e7-01ba314d8e3d-rop' } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: "mini-14eda653-4284-4165-bb85-325bb82a516d-rop" } })
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.$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)
routes = getRoutes(routesData)
// { name, id, }
subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase })
const { response, request, request2, request3, request4, sign, secret, sign_common, request_common } = await fetchConfig(globalState.configSwitch) //globalState.configSwitch
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http3 = new common.Http({ response, request: request3, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http4 = new common.Http({ response, request: request4, sign, secret, alert: message.error, headers: { token: 'scrm-base-e2d4f962-4ca3-4044-83e7-01ba314d8e3d-rop' } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: "mini-14eda653-4284-4165-bb85-325bb82a516d-rop" } })
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.$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)
routes = getRoutes(routesData)
// { name, id, }
subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase })
}
export async function mount(props) {
const insts = render(props.routerBase, routes)
router = insts.router
instance = insts.vm
const insts = render(props.routerBase, routes)
router = insts.router
instance = insts.vm
}
export async function unmount() {
instance.$destroy()
instance.$el.innerHTML = ''
instance = null
router = null
instance.$destroy()
instance.$el.innerHTML = ''
instance = null
router = null
}
function subscribe({ messenger }) {
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
\ No newline at end of file
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
<template>
<div>
<div class="scrm-sub-client-container">
<!-- <p class="pageTitle">客户管理</p> -->
<div class="pageContent" :style="{ 'min-height': heightBox + 'px' }">
<GLCombiForm :formObj="searchForm" :formData="clientManageFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<div class="leadList">
......@@ -12,9 +11,7 @@
</div>
<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">
<el-tooltip effect="dark" :content="scope.scope.customerName" placement="top">
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip>
<GLFull :labelWidth="70" :identification="`node_${scope.scope.id}`">{{ scope.scope.customerName }}</GLFull>
</span>
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : scope.scope.customerSex == 2 ? '女' : '' }}</span>
......
......@@ -343,7 +343,12 @@ export default {
type: 'success',
message: '操作成功!'
})
this.$router.push('/crowdManage/index')
this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 1
}
})
} else {
this.$message({
type: 'error',
......
......@@ -46,7 +46,7 @@
</div>
<div class="footer-panel">
<div>
<el-button type="primary" @click="$router.go(-1)">返回</el-button>
<el-button type="primary" @click="goBack">返回</el-button>
</div>
</div>
<el-dialog title="人群规则说明" class="crowd-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogRuleVisible" :show-close="isShowCloseBtn">
......@@ -153,6 +153,14 @@ export default {
},
mounted() {},
methods: {
goBack() {
this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 1
}
})
},
//获取标签数据
getCrowdDetails() {
let params = {
......
......@@ -135,6 +135,10 @@ export default {
this.searchTable()
},
beforeSearchFn() {
if (this.$route.query.selectTab) {
this.activeName = 'second'
// window.history.pushState(null, null, location.origin + location.pathname)
}
return new Promise(resolve => {
const crowdType = this.activeName == 'first' ? 1 : 2
this.searchForm = Object.assign(this.searchForm, { 'req.merchantId': this.merchantId, 'req.crowdType': crowdType })
......
......@@ -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">
<div class="custom-tree-node" slot-scope="{ node, data }">
<el-tooltip placement="top" v-if="hoverId == data.id && hoverStatus">
<span :class="['tree-node', `node_${data.id}`]" slot="content">
{{ node.label }}
</span>
<span :class="['tree-node', `node_${data.id}`]">
{{ node.label }}
</span>
</el-tooltip>
<span :class="['tree-node', `node_${data.id}`]" v-else @mouseenter="hoverFun(data)">
<GLFull labelWidth="140" :identification="`node_${data.id}`">
{{ node.label }}
</span>
</GLFull>
<span v-if="data.labelType && data.labelType != '系统标签' && isShowEditBtn(data.labelDTO)" @click.stop="editTree(data)">
<i class="el-icon-edit-outline"></i>
</span>
......@@ -218,11 +210,11 @@ export default {
color: #333;
}
.tree-node {
width: 140px;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
// width: 140px;
// display: inline-block;
// white-space: nowrap;
// text-overflow: ellipsis;
// overflow: hidden;
}
.el-tree-node__expand-icon {
font-size: 15px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!