Commit a0dc23c2 authored by 杨硕's avatar 杨硕

修改下拉框样式

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