Commit 1636882d by xuyl

更新2.3.0需求代码

1 parent 1eaa7684
...@@ -15,9 +15,9 @@ export default { ...@@ -15,9 +15,9 @@ export default {
type: String, type: String,
default: '' default: ''
}, },
isCloseShowNumTag:{ isCloseShowNumTag: {
type:Boolean, type: Boolean,
default:false default: false
}, },
totalData: { totalData: {
type: Array, type: Array,
...@@ -44,7 +44,7 @@ export default { ...@@ -44,7 +44,7 @@ export default {
this.customerRatio = this.totalData.map(item => item.customerRatio * 100) this.customerRatio = this.totalData.map(item => item.customerRatio * 100)
this.entmicroCount = this.totalData.map(item => item.newEntmicroCount) this.entmicroCount = this.totalData.map(item => item.newEntmicroCount)
this.entmicroRatio = this.totalData.map(item => item.entmicroRatio * 100) this.entmicroRatio = this.totalData.map(item => item.entmicroRatio * 100)
this.initChart() this.initChart()
} }
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
this.customerRatio = this.totalData.map(item => item.customerRatio * 100) this.customerRatio = this.totalData.map(item => item.customerRatio * 100)
this.entmicroCount = this.totalData.map(item => item.newEntmicroCount) this.entmicroCount = this.totalData.map(item => item.newEntmicroCount)
this.entmicroRatio = this.totalData.map(item => item.entmicroRatio * 100) this.entmicroRatio = this.totalData.map(item => item.entmicroRatio * 100)
this.initChart() this.initChart()
} }
...@@ -80,12 +80,29 @@ export default { ...@@ -80,12 +80,29 @@ export default {
} }
}, },
formatter: function(datas) { formatter: function(datas) {
var res = datas[0].name + '<br/>' var res = datas[0].name + ' | 新增' + '<br/>'
let circleColor
for (var i = 0, length = datas.length; i < length; i++) { for (var i = 0, length = datas.length; i < length; i++) {
if (datas[i].seriesName == '新增客户' || datas[i].seriesName == '新增企微客户') { // if (datas[i].seriesName == '新增客户' || datas[i].seriesName == '新增企微客户') {
res += datas[i].seriesName + ':' + datas[i].data + '人' + '<br/>' // res += datas[i].seriesName + ':' + datas[i].data + '人' + '<br/>'
} else { // } else {
res += datas[i].seriesName + ':' + datas[i].data + '%' + '<br/>' // res += datas[i].seriesName + ':' + datas[i].data + '%' + '<br/>'
// }
if (datas[i].seriesName == '全部客户') {
circleColor = '#928DFF'
res += `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${circleColor};"></span>` + datas[i].seriesName + ':' + datas[i].data + '人' + '<br/>'
}
if (datas[i].seriesName == '全部客户环比') {
circleColor = '#5850FF'
res += `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${circleColor};"></span>` + datas[i].seriesName + ':' + datas[i].data + '%' + '<br/>'
}
if (datas[i].seriesName == '企微客户') {
circleColor = '#FEBE6B'
res += `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${circleColor};"></span>` + datas[i].seriesName + ':' + datas[i].data + '人' + '<br/>'
}
if (datas[i].seriesName == '企微客户环比') {
circleColor = '#FE9C1C'
res += `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${circleColor};"></span>` + datas[i].seriesName + ':' + datas[i].data + '%' + '<br/>'
} }
} }
return res return res
...@@ -116,7 +133,8 @@ export default { ...@@ -116,7 +133,8 @@ export default {
// }, // },
itemGap: 20, //图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。 itemGap: 20, //图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。
// data: ['全部客户', '全部客户环比', '企微客户', '企微客户环比'], //图例的数据数组。 // data: ['全部客户', '全部客户环比', '企微客户', '企微客户环比'], //图例的数据数组。
data: ['新增客户', '新增客户环比', '新增企微客户', '新增企微客户环比'], //图例的数据数组。 // data: ['新增客户', '新增客户环比', '新增企微客户', '新增企微客户环比'], //图例的数据数组。
data: ['全部客户', '全部客户环比', '企微客户', '企微客户环比'], //图例的数据数组。
inactiveColor: '#ccc' //图例关闭时的颜色。 inactiveColor: '#ccc' //图例关闭时的颜色。
}, },
grid: { grid: {
...@@ -210,7 +228,7 @@ export default { ...@@ -210,7 +228,7 @@ export default {
], ],
series: [ series: [
{ {
name: '新增客户', name: '全部客户',
type: 'bar', type: 'bar',
data: this.customerCount, //[33600, 18000, 17500, 20000, 17000, 480, 1000, 800, 520, 650, 920, 600], data: this.customerCount, //[33600, 18000, 17500, 20000, 17000, 480, 1000, 800, 520, 650, 920, 600],
label: { label: {
...@@ -220,11 +238,11 @@ export default { ...@@ -220,11 +238,11 @@ export default {
position: 'top' position: 'top'
}, },
itemStyle: { itemStyle: {
color: '#5850ff' color: '#928DFF'
} }
}, },
{ {
name: '新增客户环比', name: '全部客户环比',
type: 'line', type: 'line',
yAxisIndex: 1, yAxisIndex: 1,
data: this.customerRatio, //[2.0, 2.2, -3.3, 4.5, 6.3, -10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2], data: this.customerRatio, //[2.0, 2.2, -3.3, 4.5, 6.3, -10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2],
...@@ -233,11 +251,11 @@ export default { ...@@ -233,11 +251,11 @@ export default {
} }
}, },
{ {
name: '新增企微客户', name: '企微客户',
type: 'bar', type: 'bar',
data: this.entmicroCount, //[22000, 10000, 10000, 13000, 11500, 4000, 7000, 6500, 4500, 5500, 7000, 6000], data: this.entmicroCount, //[22000, 10000, 10000, 13000, 11500, 4000, 7000, 6500, 4500, 5500, 7000, 6000],
itemStyle: { itemStyle: {
color: '#FE9C1C' color: '#FEBE6B'
}, },
label: { label: {
show: this.isCloseShowNumTag ? false : true, show: this.isCloseShowNumTag ? false : true,
...@@ -246,7 +264,7 @@ export default { ...@@ -246,7 +264,7 @@ export default {
} }
}, },
{ {
name: '新增企微客户环比', name: '企微客户环比',
type: 'line', type: 'line',
yAxisIndex: 1, yAxisIndex: 1,
data: this.entmicroRatio, //[2.6, 2.2, 3.0, 3.8, 6.8, 10.9, 18.3, 23.0, 23.9, 16.0, 10.0, 8.2], data: this.entmicroRatio, //[2.6, 2.2, 3.0, 3.8, 6.8, 10.9, 18.3, 23.0, 23.9, 16.0, 10.0, 8.2],
......
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
trigger: 'item', //模板变量有 {a}、{b}、{c}、{d},分别表示系列名,数据名,数据值,百分比。{d}数据会根据value值计算百分比 trigger: 'item', //模板变量有 {a}、{b}、{c}、{d},分别表示系列名,数据名,数据值,百分比。{d}数据会根据value值计算百分比
formatter: '{b} : {c}人 ({d}%)' formatter: '{b} : {c}人 ({d}%)'
}, },
color: ['#FFB21F', '#5850FF'], color: ['#5850FF', '#FFB21F'],
// legend: { // legend: {
// orient: "vertical", // orient: "vertical",
// bottom: "bottom", // bottom: "bottom",
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
type: 'pie', type: 'pie',
// radius: '118px', // radius: '118px',
center: ['50%', '25%'], center: ['50%', '25%'],
radius: ['27%', '42%'], radius: ['24%', '38%'],
stillShowZeroSum: false, stillShowZeroSum: false,
data: this.pieData, data: this.pieData,
// data: [ // data: [
...@@ -99,13 +99,13 @@ export default { ...@@ -99,13 +99,13 @@ export default {
// }, // },
label: { label: {
position: 'inner', // position: 'inner',
formatter: '{d}%', // formatter: '{d}%',
show: true, // show: true,
color: '#fff' // color: '#fff'
// formatter: "{b}:\n{c}人({d}%)", // formatter: "{b}:\n{c}人({d}%)",
// fontWeight: "bold", // fontWeight: "bold",
// color:'red' color: '#666666'
// color: ["#1296db", "#d42378"], // color: ["#1296db", "#d42378"],
}, },
labelLine: { show: true } labelLine: { show: true }
......
<template>
<div class="contain">
<!-- :style="{ width: width, height: height }" -->
<div class="echart" ref="myChart" :style="{ width: width, height: height }"></div>
</div>
</template>
<script>
export default {
props: {
width: {
type: String,
// default: () => {
// return "";
// },
default: ''
},
height: {
type: String,
default: ''
},
topDataObj: {
type: Object,
default: () => {}
}
},
data() {
return {
pieData: [
{ value: 0, name: '未加企微' },
{ value: 0, name: '已加企微' }
]
}
},
mounted() {
this.$nextTick(() => {
console.log(this.topDataObj, '饼图')
this.pieData[0].value = this.topDataObj.entmicroNotAddCustomerCount
this.pieData[1].value = this.topDataObj.entmicroAddCustomerCount
this.initChart()
})
},
methods: {
initChart() {
// 基于准备好的dom,初始化echarts实例
let myChart = this.$echarts.init(this.$refs.myChart)
// 绘制图表
myChart.setOption({
/* title: {
text: '客户总数',
subtext: '已加和未加企微的所有潜客和已购买客户',
left: '20',
top: '20',
textStyle: {
},
subtextStyle: {
fontSize: '12px',
fontWeight: '400',
color: '#808080'
}
},*/
tooltip: {
trigger: 'item', //模板变量有 {a}、{b}、{c}、{d},分别表示系列名,数据名,数据值,百分比。{d}数据会根据value值计算百分比
formatter: '{b} : {c}人 ({d}%)'
},
color: ['#5850FF', '#FFB21F'],
// legend: {
// orient: "vertical",
// bottom: "bottom",
// },
series: [
{
name: '客户总数',
type: 'pie',
// radius: '118px',
center: ['50%', '25%'],
radius: ['24%', '38%'],
stillShowZeroSum: false,
data: this.pieData,
// data: [
// { value: 3000, name: '未加企微' },
// { value: 7000, name: '已加企微' }
// ],
// emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
//下面控制显示饼状图上百分比
normal: {
// color: function (params) {
// //自定义颜色
// var colorList = [
// "#00FFFF",
// "#00FF00"
// ];
// return colorList[params.dataIndex];
// },
label: {
position: 'inner',
formatter: '{d}%',
// show: true,
color: '#fff',
// fontSize:14,
// formatter: "{b}:\n{c}人({d}%)",
// fontWeight: "bold",
// color: '#666666'
// color: ["#1296db", "#d42378"],
},
labelLine: { show: true }
}
}
// },
}
]
})
}
}
}
</script>
<style lang="scss" scoped>
.contain {
position: relative;
z-index: 9;
}
</style>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
全部客户 全部客户
<span class="main-container-head-number font-14">{{ totalCount }}个</span> <span class="main-container-head-number font-14">{{ totalCount }}个</span>
</div> </div>
<GLButton size="small" @click="handleExport" class="export" fn="导出">导出</GLButton> <el-button size="small" @click="handleExport" class="export">导出</el-button>
</div> </div>
<GLTable ref="groupRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :noDataImg="url" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="groupRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :noDataImg="url" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<span slot="customerName" slot-scope="scope" style="display:flex;align-items:center"> <span slot="customerName" slot-scope="scope" style="display:flex;align-items:center">
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</span> </span>
<span slot="delFlag" slot-scope="scope"> <span slot="delFlag" slot-scope="scope">
<span :class="{ circleStatusGreen: scope.scope.delFlag == 0, circleStatusGray: scope.scope.delFlag == -1 }"></span> <span :class="{ circleStatusGreen: scope.scope.delFlag == 0, circleStatusGray: scope.scope.delFlag == -1 }"></span>
<span>{{ scope.scope.delFlag == -1 ? '已解散' : scope.scope.delFlag == 0 ? '正常' : '' }}</span> <span> {{ scope.scope.delFlag == -1 ? '已解散' : scope.scope.delFlag == 0 ? '正常' : '' }}</span>
</span> </span>
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <auth-button :data="scope.scope"></auth-button> --> <!-- <auth-button :data="scope.scope"></auth-button> -->
...@@ -133,7 +133,7 @@ export default { ...@@ -133,7 +133,7 @@ export default {
label: '群聊名称', label: '群聊名称',
prop: 'custGroupName', prop: 'custGroupName',
line: 1, line: 1,
minWidth: 160 width: 160
}, },
{ {
label: '当前成员总数', label: '当前成员总数',
......
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
<div v-if="!followList(scope.scope.followStaff).length">--</div> <div v-if="!followList(scope.scope.followStaff).length">--</div>
<div class="entmicro-tag" style="padding-right:3px" v-for="(tag, idx) in followList(scope.scope.followStaff)" :key="idx"> <div class="entmicro-tag" style="padding-right:3px" v-for="(tag, idx) in followList(scope.scope.followStaff)" :key="idx">
<el-tooltip effect="dark" :content="tag" placement="top"> <el-tooltip effect="dark" :content="tag" placement="top">
<el-tag type="info" class="ellipsis-1" v-if="idx < 2" :disable-transitions="false"> <el-tag type="info" class="ellipsis-1" v-if="idx < 3" :disable-transitions="false">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ tag }} {{ tag }}
</el-tag> </el-tag>
</el-tooltip> </el-tooltip>
<el-tag type="info" v-if="followList(scope.scope.followStaff).length > 2 && idx == 2"> <el-tag type="info" v-if="followList(scope.scope.followStaff).length > 3 && idx == 3">
<el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"> <el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<div slot="reference">...({{ followList(scope.scope.followStaff).length }})</div> <div slot="reference">...({{ followList(scope.scope.followStaff).length }})</div>
<div class="entmicro-hover"> <div class="entmicro-hover">
...@@ -222,6 +222,32 @@ export default { ...@@ -222,6 +222,32 @@ export default {
optionId: 'value', optionId: 'value',
placeholder: '请选择性别', placeholder: '请选择性别',
optionList: this.$Constants.GENDER_OPTION optionList: this.$Constants.GENDER_OPTION
},
{
type: 'datePicker',
// prop: 'daterange',
name: 'daterange',
label: '购车时间',
valueFormat: 'yyyy-MM-dd',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
},
{
type: 'input',
inputType: 'text',
// prop: 'nickName',
name: 'nickName',
label: '车架号'
},
{
type: 'input',
inputType: 'text',
// prop: 'nickName',
name: 'nickName',
label: '车牌号'
} }
], ],
...@@ -229,11 +255,13 @@ export default { ...@@ -229,11 +255,13 @@ export default {
tableParams: { tableParams: {
listName: 'data', listName: 'data',
tableOption: false, tableOption: false,
// mutiSelectName: 'employeeList',
// mutiSelectUniqueKey: 'id',
tableColumns: [ tableColumns: [
{ {
label: '客户ID', label: '客户ID',
prop: 'oneId', prop: 'oneId',
minWidth: 170, width: 170,
line: 1 line: 1
}, },
{ {
...@@ -246,13 +274,13 @@ export default { ...@@ -246,13 +274,13 @@ export default {
label: '企微名称', label: '企微名称',
prop: 'nickNameList', prop: 'nickNameList',
addHtml: 'nickNameList', addHtml: 'nickNameList',
minWidth: 190 width: 190
}, },
{ {
label: '联系电话', label: '联系电话',
prop: 'customerPhone', prop: 'customerPhone',
addHtml: 'customerPhone', addHtml: 'customerPhone',
minWidth: 130 width: 130
}, },
{ {
label: '性别', label: '性别',
...@@ -263,7 +291,7 @@ export default { ...@@ -263,7 +291,7 @@ export default {
label: '跟进员工', label: '跟进员工',
prop: 'followStaff', prop: 'followStaff',
addHtml: 'followStaff', addHtml: 'followStaff',
minWidth: 280 width: 280
}, },
{ {
label: '是否加企微', //1. 加入,0.未加入 label: '是否加企微', //1. 加入,0.未加入
...@@ -275,17 +303,18 @@ export default { ...@@ -275,17 +303,18 @@ export default {
label: '当前状态', label: '当前状态',
prop: 'status', prop: 'status',
addHtml: 'status', addHtml: 'status',
minWidth: 130 width: 130
}, },
{ {
label: '所属渠道', label: '所属渠道',
prop: 'sourceChannel', prop: 'sourceChannel',
minWidth: 100 width: 140,
line:1
}, },
{ {
label: '添加来源', label: '添加来源',
prop: 'addWayName', prop: 'addWayName',
minWidth: 120 width: 120
}, },
{ {
label: '添加时间', label: '添加时间',
...@@ -293,6 +322,26 @@ export default { ...@@ -293,6 +322,26 @@ export default {
width: 170 width: 170
}, },
{ {
label: '车系',
prop: 'addTime',
width: 110
},
{
label: '车架号',
prop: 'addTime',
width: 110
},
{
label: '车牌号',
prop: 'addTime',
width: 170
},
{
label: '购车时间',
prop: 'addTime',
width: 170
},
{
label: '操作', label: '操作',
prop: 'optionBtns', prop: 'optionBtns',
width: '65px', width: '65px',
......
...@@ -65,30 +65,25 @@ export default { ...@@ -65,30 +65,25 @@ export default {
{ {
label: '人群名称', label: '人群名称',
prop: 'crowdName', prop: 'crowdName',
addHtml: 'crowdName', addHtml: 'crowdName'
align: 'left', // width: 160
minWidth: 160
// width: 431 // width: 431
}, },
{ {
label: '人群描述', label: '人群描述',
prop: 'crowdDesc', prop: 'crowdDesc',
addHtml: 'crowdDesc', addHtml: 'crowdDesc'
align: 'left', // width: 160
minWidth: 160
}, },
{ {
label: '人数', label: '人数',
prop: 'total', prop: 'total'
// addHtml: 'total',
align: 'left'
}, },
{ {
label: '操作', label: '操作',
prop: 'xxx', prop: 'xxx',
fixed: 'right', fixed: 'right',
addHtml: 'xxx', addHtml: 'xxx',
align: 'left',
width: 180 width: 180
} }
] ]
...@@ -107,6 +102,11 @@ export default { ...@@ -107,6 +102,11 @@ export default {
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 }
//标签管理保存初始化保存自定义人群状态
if (this.$route.query.selectTab) {
this.activeName = 'second'
// window.history.pushState(null, null, location.origin + location.pathname)
}
}, },
mounted() {}, mounted() {},
methods: { methods: {
...@@ -123,22 +123,20 @@ export default { ...@@ -123,22 +123,20 @@ export default {
this.$router.push('/crowdManage/crowdAdd') this.$router.push('/crowdManage/crowdAdd')
}, },
setTableFinishFun() { setTableFinishFun() {
console.log(this.$refs.crowdManage.data.length)
if (!this.$refs.crowdManage.data.length) { if (!this.$refs.crowdManage.data.length) {
this.$nextTick(() => this.$refs.crowdManage.setTableHeightFun()) this.$nextTick(() => this.$refs.crowdManage.setTableHeightFun())
} else { } else {
this.$refs.crowdManage.tableHeightValues = '' this.$refs.crowdManage.tableHeightValues = ''
} }
}, },
setTableHeightEvent() {
this.$refs.crowdManage.setTableHeightFun()
},
handleClick() { handleClick() {
this.searchForm = { 'req.keyword': '' } this.searchForm = { 'req.keyword': '' }
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 })
...@@ -184,7 +182,7 @@ export default { ...@@ -184,7 +182,7 @@ export default {
} }
} }
/deep/ .el-tabs__header { /deep/ .el-tabs__header {
margin: 0 0 20px; margin: 0 0 10px;
} }
/deep/ .el-tabs__nav-wrap::after { /deep/ .el-tabs__nav-wrap::after {
content: none; content: none;
......
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
<GLTable ref="gueastGroup" @setTableFinishFun="setTableFinishFun" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf"> <GLTable ref="gueastGroup" @setTableFinishFun="setTableFinishFun" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
<div slot="entmicro-name" class="entmicro" slot-scope="scope"> <div slot="entmicro-name" class="entmicro" slot-scope="scope">
<div class="entmicro-tag" v-for="(tag, idx) in scope.scope.userList" :key="idx"> <div class="entmicro-tag" v-for="(tag, idx) in scope.scope.userList" :key="idx">
<el-tag type="info" v-if="idx < 2" :disable-transitions="false"> <el-tag type="info" v-if="idx < 3" :disable-transitions="false">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ tag.staffName }}{{ tag.departmentName ? `(${tag.departmentName})` : '' }} {{ tag.staffName }}{{ tag.departmentName ? `(${tag.departmentName})` : '' }}
</el-tag> </el-tag>
<el-tag type="info" v-if="scope.scope.userList.length > 2 && idx == 2"> <el-tag type="info" v-if="scope.scope.userList.length > 3 && idx == 3">
<el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"> <el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<span slot="reference">...({{ scope.scope.userList.length }})</span> <span slot="reference">...({{ scope.scope.userList.length }})</span>
<div class="entmicro-hover"> <div class="entmicro-hover">
...@@ -92,19 +92,19 @@ export default { ...@@ -92,19 +92,19 @@ export default {
{ {
label: '默认成员', label: '默认成员',
prop: 'entmicroName', prop: 'entmicroName',
minWidth: 250, minWidth: 320,
addHtml: 'entmicro-name' addHtml: 'entmicro-name'
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'createdTime', prop: 'createdTime',
line: 1, line: 1,
minWidth: 110 // minWidth: 110
}, },
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
minWidth: 130, // minWidth: 130,
addHtml: 'status' addHtml: 'status'
}, },
{ {
...@@ -342,7 +342,7 @@ export default { ...@@ -342,7 +342,7 @@ export default {
} }
} }
.btn-header { .btn-header {
margin-bottom: 20px; margin-bottom: 10px;
} }
.container { .container {
margin-bottom: 20px; margin-bottom: 20px;
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<el-input placeholder="请输入标签组或标签关键字" v-model="filterText" size="small"><i slot="suffix" class="el-input__icon el-icon-search"></i></el-input> <el-input placeholder="请输入标签组或标签关键字" v-model="filterText" size="small"><i slot="suffix" class="el-input__icon el-icon-search"></i></el-input>
<span @click="resetTree">重置</span> <span @click="resetTree">重置</span>
</div> </div>
<el-tree @node-expand="nodeExpand" accordion @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 @node-expand="nodeExpand" accordion @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"> <el-tooltip placement="top" v-if="hoverId == data.id && hoverStatus">
...@@ -25,7 +24,6 @@ ...@@ -25,7 +24,6 @@
</el-tree> </el-tree>
</div> </div>
</template> </template>
<script> <script>
import { getTableList } from '@/api/modules/tagsManage' import { getTableList } from '@/api/modules/tagsManage'
export default { export default {
...@@ -53,7 +51,6 @@ export default { ...@@ -53,7 +51,6 @@ export default {
this.$refs.tagTree.filter(val) this.$refs.tagTree.filter(val)
} }
}, },
methods: { methods: {
hoverFun(data) { hoverFun(data) {
this.hoverId = data.id this.hoverId = data.id
...@@ -162,18 +159,22 @@ export default { ...@@ -162,18 +159,22 @@ export default {
this.expandId.push(item.id) this.expandId.push(item.id)
}) })
} }
this.$nextTick(() => { this.$nextTick(() => {
status && this.updateTreeNode() status && this.updateTreeNode()
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.maxHeight = this.$parent.heightBox - 205 + 'px' this.setTreeHeight()
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.overflow = 'auto'
}) })
this.loading = false this.loading = false
}) })
}, },
nodeExpand() { setTreeHeight() {
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.maxHeight = this.$parent.heightBox - 205 + 'px' const nodeHeight = document.querySelectorAll('.el-tree>.el-tree-node').length * 30
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.maxHeight = this.$parent.heightBox - 80 - nodeHeight + 'px'
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.overflow = 'auto' document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.overflow = 'auto'
},
nodeExpand() {
this.$nextTick(() => {
this.setTreeHeight()
})
} }
}, },
mounted() { mounted() {
...@@ -181,10 +182,9 @@ export default { ...@@ -181,10 +182,9 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content-wrap { .content-wrap {
padding: 16px 3px 16px 16px; padding: 16px 3px 0px 16px;
box-sizing: border-box; box-sizing: border-box;
height: 100%; height: 100%;
.tree-input { .tree-input {
...@@ -201,7 +201,6 @@ export default { ...@@ -201,7 +201,6 @@ export default {
} }
.tag-tree { .tag-tree {
margin-top: 20px; margin-top: 20px;
height: calc(100% - 80px);
overflow-y: auto; overflow-y: auto;
/deep/ { /deep/ {
.el-tree-node { .el-tree-node {
...@@ -212,7 +211,6 @@ export default { ...@@ -212,7 +211,6 @@ export default {
} }
} }
} }
.el-tree-node__children { .el-tree-node__children {
.el-tree-node__content { .el-tree-node__content {
.el-checkbox { .el-checkbox {
...@@ -253,4 +251,4 @@ export default { ...@@ -253,4 +251,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<i class="el-icon-close" @click="closeInitPanel"></i> <i class="el-icon-close" @click="closeInitPanel"></i>
</div> </div>
<div class="client-main-box"> <div class="client-main-box">
<div class="client-tag" :style="{ height: heightBox + 'px' }"> <div class="client-tag">
<tag-group @getCheckItem="getCheckItem" ref="tagTree" @editTag="btnClick"></tag-group> <tag-group @getCheckItem="getCheckItem" ref="tagTree" @editTag="btnClick"></tag-group>
</div> </div>
<div class="client-tabel"> <div class="client-tabel">
...@@ -732,7 +732,7 @@ export default { ...@@ -732,7 +732,7 @@ export default {
this.$message.error('不能提交相同的标签,请修改') this.$message.error('不能提交相同的标签,请修改')
return return
} }
this.newAddTagFun() this.newAddTagFun(1)
//this.handleClose() //这里不管 //this.handleClose() //这里不管
} else { } else {
//修改标签(允许同时增加标签) //修改标签(允许同时增加标签)
...@@ -783,7 +783,7 @@ export default { ...@@ -783,7 +783,7 @@ export default {
this.tagForm.tagsList = [] //取消时清空新增标签 this.tagForm.tagsList = [] //取消时清空新增标签
this.tagVisible = !this.tagVisible this.tagVisible = !this.tagVisible
}, },
newAddTagFun() { newAddTagFun(status) {
//满足条件进行提交 //满足条件进行提交
let params = {} let params = {}
params['labelDTO.dataFrom'] = 'cs' params['labelDTO.dataFrom'] = 'cs'
...@@ -801,7 +801,8 @@ export default { ...@@ -801,7 +801,8 @@ export default {
} }
if (res.data.code == 0) { if (res.data.code == 0) {
if (this.tagForm.tagsList.length > 0) { if (this.tagForm.tagsList.length > 0) {
this.$message.success('添加成功') // this.$message.success('添加成功')
status && this.$message.success('添加成功')
} }
if (this.tagDialogTitle == '编辑标签组') { if (this.tagDialogTitle == '编辑标签组') {
this.tagForm.tagsName = '' this.tagForm.tagsName = ''
...@@ -1218,7 +1219,7 @@ export default { ...@@ -1218,7 +1219,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding-top: 14px; padding-top: 14px;
padding-bottom: 20px; padding-bottom: 10px;
letter-spacing: 1px; letter-spacing: 1px;
.clientNum { .clientNum {
// display: flex; // display: flex;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!