Commit a0dc23c2 authored by 杨硕's avatar 杨硕

修改下拉框样式

parent a542c222
......@@ -17,15 +17,15 @@ body .el-table th.gutter{
.el-upload__input {
display: none;
}
.el-tag.el-tag--info {
max-width: 90%;
.el-select__tags-text{
max-width: 90%;
display: inline-flex;
overflow: hidden;
text-overflow: ellipsis;
}
}
//.el-tag.el-tag--info {
// max-width: 90%;
// .el-select__tags-text{
// max-width: 100%;
// display: inline-flex;
// overflow: hidden;
// text-overflow: ellipsis;
// }
// }
// to fixed https://github.com/ElemeFE/element/issues/2461
// 弹出框dialog 公共样式修改
......
......@@ -643,4 +643,13 @@ export default {
margin-bottom: 10px
}
}
::v-deep .el-tag.el-tag--info {
max-width: 90%;
.el-select__tags-text{
max-width: 90%;
display: inline-flex;
overflow: hidden;
text-overflow: ellipsis;
}
}
</style>
......@@ -1914,5 +1914,14 @@ input::-webkit-inner-spin-button {
}
}
}
::v-deep .el-tag.el-tag--info {
max-width: 90%;
.el-select__tags-text{
max-width: 90%;
display: inline-flex;
overflow: hidden;
text-overflow: ellipsis;
}
}
</style>
......@@ -818,7 +818,6 @@ input::-webkit-inner-spin-button {
.shopselect{
width: 100%;
}
</style>
<style lang="scss" scoped>
::v-deep .dialogWarnText{
......@@ -828,4 +827,13 @@ input::-webkit-inner-spin-button {
::v-deep .img_content{
text-align: center;
}
::v-deep .el-tag.el-tag--info {
max-width: 90%;
.el-select__tags-text{
max-width: 90%;
display: inline-flex;
overflow: hidden;
text-overflow: ellipsis;
}
}
</style>
......@@ -55,7 +55,7 @@
<div style="float: right">
<el-form-item>
<!-- //新增按钮-->
<!-- v-has-permi="hasAddPerm"-->
<!-- v-has-permi="hasAddPerm"-->
<el-button
:class="commonField.addClass"
:type="commonField.typePrimary"
......@@ -382,7 +382,9 @@ export default {
},
handleShareShop(row) {
if (row.unitId) {
this.ruleForm.shops = JSON.parse(row.unitId)
const unitId = row.unitId
// this.ruleForm.shops = JSON.parse(row.unitId)
this.ruleForm.shops = unitId.split(',').map(Number)
} else {
this.ruleForm.shops = []
}
......@@ -655,3 +657,14 @@ input::-webkit-inner-spin-button {
}
</style>
<style lang="scss" scoped>
::v-deep .el-tag.el-tag--info {
max-width: 90%;
.el-select__tags-text{
max-width: 90%;
display: inline-flex;
overflow: hidden;
text-overflow: ellipsis;
}
}
</style>
......@@ -146,8 +146,13 @@
<div class="videNum">视频总推广次数:</div>
</div>
</div>
<div v-show="pieShow" id="echarts-textPieChart" v-loading="loading" class="span_1">
<div id="dataCharts_textPieChart" style="height: 16vh" />
<div style="display: flex">
<div v-show="pieShow" id="echarts-textPieChart" v-loading="loading" style="flex: 1" class="span_1">
<div id="dataCharts_textPieChart" style="height: 16vh" />
</div>
<div v-show="pieShow" id="echarts-textPieChart" v-loading="loading" style="flex: 1" class="span_1">
<div id="dataCharts_textPieChart1" style="height: 16vh" />
</div>
</div>
<div v-show="!pieShow" class="nodata" style="height: 16vh">
暂无数据
......@@ -246,7 +251,7 @@ export default {
]),
classOption() {
return {
step: 0.4, // 数值越大速度滚动越快
step: 0.2, // 数值越大速度滚动越快
limitMoveNum: 2, // 开始无缝滚动的数据量 this.dataList.length
hoverStop: true, // 是否开启鼠标悬停stop
direction: 1, // 0向下 1向上 2向左 3向右
......@@ -301,6 +306,7 @@ export default {
console.log('Size: ' + width + 'x' + height)
// 使echarts尺寸重置
echarts.init(document.getElementById('dataCharts_textPieChart')).resize()
echarts.init(document.getElementById('dataCharts_textPieChart1')).resize()
})
})
},
......@@ -323,15 +329,22 @@ export default {
return new Promise(resolve => {
listAllShop().then(res => {
if (res.code === 200) {
this.deptList = res.data.filter(item => item.flag === '1')
this.company = this.deptList[0].businessId
this.companyName = this.deptList[0].unitName
this.getTableData() // 代言人,文章,视频数据
this.handleGetTextVideoEcharts() // 文章视频echarts更新
this.handleGetPeoplePromotionFrequency() // 代言人文章视频推广次数统计
this.handlePieData()
// this.handleGetPeopleTextPie() // 代言人文章视频饼图
this.getPromotionArticle() // 滚动表格数据
if (res.data.length > 0) {
this.deptList = res.data.filter(item => item.flag === '1')
this.company = this.deptList[0].businessId
this.companyName = this.deptList[0].unitName
this.getTableData() // 代言人,文章,视频数据
this.handleGetTextVideoEcharts() // 文章视频echarts更新
this.handleGetPeoplePromotionFrequency() // 代言人文章视频推广次数统计
this.handlePieData()
// this.handleGetPeopleTextPie() // 代言人文章视频饼图
this.getPromotionArticle() // 滚动表格数据
} else {
this.loading = false
this.barShow = false
this.pieShow = false
this.promotionShow = false
}
}
})
})
......@@ -396,8 +409,10 @@ export default {
axisLabel: {
formatter: function(value) {
// 使用 15 个字符作为换行的阈值
if (value.length > 10) {
if (value.length > 10 && value.length <= 20) {
return value.substring(0, 10) + '\n' + value.substring(10)
} else if (value.length > 20) {
return value.substring(0, 10) + '\n' + value.substring(11, 12) + '...'
} else {
return value
}
......@@ -529,6 +544,10 @@ export default {
handlePieData() {
this.pieShow = true
this.loading = true
if (this.company === '' || this.company === null) {
this.loading = false
this.pieShow = false
}
pieChart({ businessId: this.company, type: 0 }).then(res => {
if (res.code === 200) {
if (res.data === null || res.data.length <= 0) {
......@@ -569,9 +588,67 @@ export default {
setTimeout(() => {
this.loading = false
this.handleGetPeopleTextPie()
this.handleGetVedioTextPie()
this.handleGetTextVideoEcharts()
}, 2000)
},
handleGetVedioTextPie() {
const myChartPeopleTextPie = echarts.init(document.getElementById('dataCharts_textPieChart1'))
const optionAverage = {
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
legend: {
show: false
},
series: [
// {
// name: '文章',
// type: 'pie',
// radius: '85%',
// avoidLabelOverlap: true, // 是否启用防止标签重叠策略
// center: ['50%', '50%'], // 设置饼图的中心位置
// // data: [
// // { value: 19, name: '文章1', itemStyle: { color: '#54C0D8' }},
// // { value: 11, name: '文章2', itemStyle: { color: '#BF50E5' }},
// // { value: 23, name: '文章3', itemStyle: { color: '#E56250' }},
// // { value: 9, name: '文章4', itemStyle: { color: '#54D871' }},
// // { value: 18, name: '文章5', itemStyle: { color: '#91CC75' }}
// // ]
// data: this.pieArticle,
// // label: {
// // normal: {
// // position: 'inner',
// // show: false
// // }
// // }
// },
{
name: '视频',
type: 'pie',
radius: '85%',
avoidLabelOverlap: true, // 是否启用防止标签重叠策略
center: ['50%', '50%'], // 设置饼图的中心位置
// data: [
// { value: 11, name: '视频1', itemStyle: { color: '#54C0D8' }},
// { value: 10, name: '视频2', itemStyle: { color: '#BF50E5' }},
// { value: 6, name: '视频3', itemStyle: { color: '#E56250' }},
// { value: 9, name: '视频4', itemStyle: { color: '#54D871' }},
// { value: 7, name: '视频5', itemStyle: { color: '#91CC75' }}
// ]
data: this.pieVideo
// label: {
// normal: {
// position: 'inner',
// show: false
// }
// }
}
]
}
myChartPeopleTextPie.setOption(optionAverage)
},
/** 代言人文章饼图*/
handleGetPeopleTextPie() {
const myChartPeopleTextPie = echarts.init(document.getElementById('dataCharts_textPieChart'))
......@@ -588,7 +665,8 @@ export default {
name: '文章',
type: 'pie',
radius: '85%',
center: ['25%', '50%'], // 设置饼图的中心位置
avoidLabelOverlap: true, // 是否启用防止标签重叠策略
center: ['50%', '50%'], // 设置饼图的中心位置
// data: [
// { value: 19, name: '文章1', itemStyle: { color: '#54C0D8' }},
// { value: 11, name: '文章2', itemStyle: { color: '#BF50E5' }},
......@@ -597,21 +675,34 @@ export default {
// { value: 18, name: '文章5', itemStyle: { color: '#91CC75' }}
// ]
data: this.pieArticle
},
{
name: '视频',
type: 'pie',
radius: '85%',
center: ['75%', '50%'], // 设置饼图的中心位置
// data: [
// { value: 11, name: '视频1', itemStyle: { color: '#54C0D8' }},
// { value: 10, name: '视频2', itemStyle: { color: '#BF50E5' }},
// { value: 6, name: '视频3', itemStyle: { color: '#E56250' }},
// { value: 9, name: '视频4', itemStyle: { color: '#54D871' }},
// { value: 7, name: '视频5', itemStyle: { color: '#91CC75' }}
// ]
data: this.pieVideo
// label: {
// normal: {
// position: 'inner',
// show: false
// }
// }
}
// {
// name: '视频',
// type: 'pie',
// radius: '85%',
// avoidLabelOverlap: true, // 是否启用防止标签重叠策略
// center: ['75%', '50%'], // 设置饼图的中心位置
// // data: [
// // { value: 11, name: '视频1', itemStyle: { color: '#54C0D8' }},
// // { value: 10, name: '视频2', itemStyle: { color: '#BF50E5' }},
// // { value: 6, name: '视频3', itemStyle: { color: '#E56250' }},
// // { value: 9, name: '视频4', itemStyle: { color: '#54D871' }},
// // { value: 7, name: '视频5', itemStyle: { color: '#91CC75' }}
// // ]
// data: this.pieVideo,
// // label: {
// // normal: {
// // position: 'inner',
// // show: false
// // }
// // }
// }
]
}
myChartPeopleTextPie.setOption(optionAverage)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment