This commit is contained in:
2024-08-02 11:10:41 +08:00
parent 2a774259bc
commit b233c9b191
2 changed files with 58 additions and 133 deletions

View File

@@ -10,24 +10,24 @@
</div>
<div class="item_content">
<div class="scroll_wrap">
<ul class="scroll_tab_2">
<li style="width: 20%;">客户名称</li>
<li style="width: 20%">规格型号</li>
<li style="width: 15%">总根数</li>
<li style="width: 15%">总托数</li>
<li style="width: 15%">总重量</li>
<li style="width: 15%">总长度毫米</li>
<ul class="scroll_tab_1">
<li style="width: 22%;">客户名称</li>
<li style="width: 22%">规格型号</li>
<li style="width: 14%">总根数</li>
<li style="width: 14%">总托数</li>
<li style="width: 14%">总重量</li>
<li style="width: 14%">总长度</li>
</ul>
<div class="scroll_container_2">
<div class="scroll_container_1">
<vue-seamless-scroll :data="kc.list" :class-option="defaultOption1">
<ul class="scroll-ul_2">
<ul class="scroll-ul_1">
<li v-for="(e, i) in kc.list" :key="i">
<div class="scroll-ul_2_div" style="width: 20%;">{{e.name}}</div>
<div class="scroll-ul_2_div" style="width: 20%">{{e.number}}</div>
<div class="scroll-ul_2_div" style="width: 15%">{{e.percentage}}</div>
<div class="scroll-ul_2_div" style="width: 15%">{{e.percentage}}</div>
<div class="scroll-ul_2_div" style="width: 15%">{{e.percentage}}</div>
<div class="scroll-ul_2_div" style="width: 15%">{{e.percentage}}</div>
<div class="scroll-ul_2_div" style="width: 22%;">{{e.supplierName}}</div>
<div class="scroll-ul_2_div" style="width: 22%">{{e.productDescription}}</div>
<div class="scroll-ul_2_div" style="width: 14%">{{e.count1}}</div>
<div class="scroll-ul_2_div" style="width: 14%">{{e.count2}}</div>
<div class="scroll-ul_2_div" style="width: 14%">{{e.count3}}<span></span></div>
<div class="scroll-ul_2_div" style="width: 14%">{{e.count4}}<span>毫米</span></div>
</li>
</ul>
</vue-seamless-scroll>
@@ -154,22 +154,18 @@ export default {
},
data () {
return {
timeOut: null,
interTime: this.$store.getters.setTime,
timer: null,
kn: [],
wrk: [],
kc: {},
hw: {},
resData: {},
myCharts01: ''
resData: {}
}
},
computed: {
defaultOption1 () {
return {
timer1: null,
timer2: null,
step: 0.4, // 数值越大速度滚动越快
limitMoveNum: 4, // 开始无缝滚动的数据量 this.dataList.length
hoverStop: true, // 是否开启鼠标悬停stop
@@ -182,8 +178,6 @@ export default {
},
defaultOption2 () {
return {
timer1: null,
timer2: null,
step: 0.4, // 数值越大速度滚动越快
limitMoveNum: 5, // 开始无缝滚动的数据量 this.dataList.length
hoverStop: true, // 是否开启鼠标悬停stop
@@ -201,7 +195,6 @@ export default {
},
beforeDestroy () {
clearInterval(this.timer)
clearInterval(this.timeOut)
},
methods: {
refresh () {
@@ -211,107 +204,11 @@ export default {
},
async initData () {
let res = await rk()
clearInterval(this.timeOut)
this.resData = res
this.kn = res.kn
this.wrk = res.wrk
this.kn = [...res.kn]
this.wrk = [...res.wrk]
this.kc = res.kc
this.hw = res.hw
// let total = 0
// this.kc.list.map(el => {
// total += Number(el.number)
// if (total > 0) {
// el.zhanbi = Number(el.number) / total
// }
// })
},
setEchart01 () {
// let data = [
// {
// value: 10,
// name: '1号砖'
// },
// {
// value: 20,
// name: '2号砖'
// },
// {
// value: 30,
// name: '3号砖'
// },
// {
// value: 40,
// name: '4号砖'
// },
// {
// value: 50,
// name: '5号砖'
// },
// {
// value: 60,
// name: '6号砖'
// }
// ]
let dataName = []
// this.resData.mixProduction.map(el => {
// dataName.push(el.name)
// })
// let data = this.resData.mixProduction
let data = []
this.kc.list.map(el => {
dataName.push(el.name)
data.push({
value: el.number + '',
name: el.name
})
})
var option = {
legend: {
// orient: 'vertical',
orient: 'horizontal',
top: '0%',
// right: 0,
textStyle: {
color: '#fff',
fontWeight: 'bold',
fontSize: 12
},
itemGap: 10.86,
itemWidth: 14.16,
itemHeight: 7.38,
data: dataName
// data: ['1号砖', '2号砖', '3号砖', '4号砖', '5号砖', '6号砖']
},
color: ['#0966E8', '#39E083', '#ffee0e', '#f975aa', '#32c5ff', '#f7b502'],
series: [
{
type: 'pie',
radius: ['43%', '70%'],
label: {
normal: {
show: true,
// position: 'inner',
formatter: '{d}%',
textStyle: {
color: '#fff',
fontWeight: 'bold',
fontSize: 12
}
}
},
labelLine: {
show: true
},
data: data
}
]
}
let echart = document.getElementById('echart_d01')
this.myCharts01 = this.$echarts.init(echart)
this.myCharts01.setOption(option)
window.addEventListener('resize', () => {
this.myCharts01.resize()
})
}
}
}
@@ -366,9 +263,9 @@ export default {
width 100%
line-height 40px
span
_font(14px, 1, #fff,,)
.scroll_th
color #2ef6ff
_font(12px, 12px, #fff,,)
transform scale(0.8)
transform-origin bottom
.item_tip
_wh(100%, 32px)
line-height 32px
@@ -398,6 +295,19 @@ export default {
_wh(100%, 100%)
overflow hidden
border 1px solid rgba(8,205,248,0.3)
.scroll_tab_1
_wh(100%, 30px)
border-bottom 1px solid rgba(8,205,248,0.3)
li
float left
width 23%
_font(12px,30px,#78B1DE,,center)
word-wrap break-word
word-break break-all
white-space nowrap
padding 0 2px
overflow hidden
box-sizing border-box
.scroll_tab_2
_wh(100%, 30px)
border-bottom 1px solid rgba(8,205,248,0.3)
@@ -411,10 +321,29 @@ export default {
padding 0 2px
overflow hidden
box-sizing border-box
.scroll_container_1
width 100%
overflow hidden
.scroll-ul_1
li
_wh(100%, 32px)
border-bottom 1px solid rgba(8,205,248,0.3)
&:nth-child(even)
background rgba(1,24,52,0.60)
box-shadow inset 0px 1px 0px 0px rgba(13,89,115,0.3)
.scroll-ul_2_div
float left
_wh(23%, 32px)
_fj(center)
font-size: 12px;
line-height: 13px;
text-align: center;
color: #fff;
padding 0 2px
word-wrap break-word
overflow-wrap break-word
.scroll_container_2
width 100%
// height calc(100% - 40px)
// height 230px
overflow hidden
.scroll-ul_2
li
@@ -429,6 +358,7 @@ export default {
_fj(center)
font-size: 13px;
line-height: 14px;
text-align: center;
color: #fff;
padding 0 2px
word-wrap break-word

View File

@@ -97,7 +97,6 @@ export default {
},
data () {
return {
timeOut: null,
interTime: this.$store.getters.setTime,
timer: null,
pt: [],
@@ -110,8 +109,6 @@ export default {
computed: {
defaultOption1 () {
return {
timer1: null,
timer2: null,
step: 0.4, // 数值越大速度滚动越快
limitMoveNum: 5, // 开始无缝滚动的数据量 this.dataList.length
hoverStop: true, // 是否开启鼠标悬停stop
@@ -129,7 +126,6 @@ export default {
},
beforeDestroy () {
clearInterval(this.timer)
clearInterval(this.timeOut)
},
methods: {
refresh () {
@@ -139,13 +135,12 @@ export default {
},
async initData () {
let res = await sc()
clearInterval(this.timeOut)
this.resData = res
this.pt = res.pt
this.ks = res.ks
let ptnum = res.ptNumber.split('')
let ptnum = String(res.ptNumber).split('')
this.ptnum = [...ptnum]
let ksnum = res.ksNumber.split('')
let ksnum = String(res.ksNumber).split('')
this.ksnum = [...ksnum]
}
}