接口
This commit is contained in:
@@ -10,24 +10,24 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="item_content">
|
<div class="item_content">
|
||||||
<div class="scroll_wrap">
|
<div class="scroll_wrap">
|
||||||
<ul class="scroll_tab_2">
|
<ul class="scroll_tab_1">
|
||||||
<li style="width: 20%;">客户名称</li>
|
<li style="width: 22%;">客户名称</li>
|
||||||
<li style="width: 20%">规格型号</li>
|
<li style="width: 22%">规格型号</li>
|
||||||
<li style="width: 15%">总根数</li>
|
<li style="width: 14%">总根数</li>
|
||||||
<li style="width: 15%">总托数</li>
|
<li style="width: 14%">总托数</li>
|
||||||
<li style="width: 15%">总重量(吨)</li>
|
<li style="width: 14%">总重量</li>
|
||||||
<li style="width: 15%">总长度(毫米)</li>
|
<li style="width: 14%">总长度</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="scroll_container_2">
|
<div class="scroll_container_1">
|
||||||
<vue-seamless-scroll :data="kc.list" :class-option="defaultOption1">
|
<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">
|
<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: 22%;">{{e.supplierName}}</div>
|
||||||
<div class="scroll-ul_2_div" style="width: 20%">{{e.number}}</div>
|
<div class="scroll-ul_2_div" style="width: 22%">{{e.productDescription}}</div>
|
||||||
<div class="scroll-ul_2_div" style="width: 15%">{{e.percentage}}</div>
|
<div class="scroll-ul_2_div" style="width: 14%">{{e.count1}}</div>
|
||||||
<div class="scroll-ul_2_div" style="width: 15%">{{e.percentage}}</div>
|
<div class="scroll-ul_2_div" style="width: 14%">{{e.count2}}</div>
|
||||||
<div class="scroll-ul_2_div" style="width: 15%">{{e.percentage}}</div>
|
<div class="scroll-ul_2_div" style="width: 14%">{{e.count3}}<span>吨</span></div>
|
||||||
<div class="scroll-ul_2_div" style="width: 15%">{{e.percentage}}</div>
|
<div class="scroll-ul_2_div" style="width: 14%">{{e.count4}}<span>毫米</span></div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</vue-seamless-scroll>
|
</vue-seamless-scroll>
|
||||||
@@ -154,22 +154,18 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
timeOut: null,
|
|
||||||
interTime: this.$store.getters.setTime,
|
interTime: this.$store.getters.setTime,
|
||||||
timer: null,
|
timer: null,
|
||||||
kn: [],
|
kn: [],
|
||||||
wrk: [],
|
wrk: [],
|
||||||
kc: {},
|
kc: {},
|
||||||
hw: {},
|
hw: {},
|
||||||
resData: {},
|
resData: {}
|
||||||
myCharts01: ''
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
defaultOption1 () {
|
defaultOption1 () {
|
||||||
return {
|
return {
|
||||||
timer1: null,
|
|
||||||
timer2: null,
|
|
||||||
step: 0.4, // 数值越大速度滚动越快
|
step: 0.4, // 数值越大速度滚动越快
|
||||||
limitMoveNum: 4, // 开始无缝滚动的数据量 this.dataList.length
|
limitMoveNum: 4, // 开始无缝滚动的数据量 this.dataList.length
|
||||||
hoverStop: true, // 是否开启鼠标悬停stop
|
hoverStop: true, // 是否开启鼠标悬停stop
|
||||||
@@ -182,8 +178,6 @@ export default {
|
|||||||
},
|
},
|
||||||
defaultOption2 () {
|
defaultOption2 () {
|
||||||
return {
|
return {
|
||||||
timer1: null,
|
|
||||||
timer2: null,
|
|
||||||
step: 0.4, // 数值越大速度滚动越快
|
step: 0.4, // 数值越大速度滚动越快
|
||||||
limitMoveNum: 5, // 开始无缝滚动的数据量 this.dataList.length
|
limitMoveNum: 5, // 开始无缝滚动的数据量 this.dataList.length
|
||||||
hoverStop: true, // 是否开启鼠标悬停stop
|
hoverStop: true, // 是否开启鼠标悬停stop
|
||||||
@@ -201,7 +195,6 @@ export default {
|
|||||||
},
|
},
|
||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
clearInterval(this.timer)
|
clearInterval(this.timer)
|
||||||
clearInterval(this.timeOut)
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
refresh () {
|
refresh () {
|
||||||
@@ -211,107 +204,11 @@ export default {
|
|||||||
},
|
},
|
||||||
async initData () {
|
async initData () {
|
||||||
let res = await rk()
|
let res = await rk()
|
||||||
clearInterval(this.timeOut)
|
|
||||||
this.resData = res
|
this.resData = res
|
||||||
this.kn = res.kn
|
this.kn = [...res.kn]
|
||||||
this.wrk = res.wrk
|
this.wrk = [...res.wrk]
|
||||||
this.kc = res.kc
|
this.kc = res.kc
|
||||||
this.hw = res.hw
|
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%
|
width 100%
|
||||||
line-height 40px
|
line-height 40px
|
||||||
span
|
span
|
||||||
_font(14px, 1, #fff,,)
|
_font(12px, 12px, #fff,,)
|
||||||
.scroll_th
|
transform scale(0.8)
|
||||||
color #2ef6ff
|
transform-origin bottom
|
||||||
.item_tip
|
.item_tip
|
||||||
_wh(100%, 32px)
|
_wh(100%, 32px)
|
||||||
line-height 32px
|
line-height 32px
|
||||||
@@ -398,6 +295,19 @@ export default {
|
|||||||
_wh(100%, 100%)
|
_wh(100%, 100%)
|
||||||
overflow hidden
|
overflow hidden
|
||||||
border 1px solid rgba(8,205,248,0.3)
|
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
|
.scroll_tab_2
|
||||||
_wh(100%, 30px)
|
_wh(100%, 30px)
|
||||||
border-bottom 1px solid rgba(8,205,248,0.3)
|
border-bottom 1px solid rgba(8,205,248,0.3)
|
||||||
@@ -411,10 +321,29 @@ export default {
|
|||||||
padding 0 2px
|
padding 0 2px
|
||||||
overflow hidden
|
overflow hidden
|
||||||
box-sizing border-box
|
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
|
.scroll_container_2
|
||||||
width 100%
|
width 100%
|
||||||
// height calc(100% - 40px)
|
|
||||||
// height 230px
|
|
||||||
overflow hidden
|
overflow hidden
|
||||||
.scroll-ul_2
|
.scroll-ul_2
|
||||||
li
|
li
|
||||||
@@ -429,6 +358,7 @@ export default {
|
|||||||
_fj(center)
|
_fj(center)
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 14px;
|
line-height: 14px;
|
||||||
|
text-align: center;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding 0 2px
|
padding 0 2px
|
||||||
word-wrap break-word
|
word-wrap break-word
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
timeOut: null,
|
|
||||||
interTime: this.$store.getters.setTime,
|
interTime: this.$store.getters.setTime,
|
||||||
timer: null,
|
timer: null,
|
||||||
pt: [],
|
pt: [],
|
||||||
@@ -110,8 +109,6 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
defaultOption1 () {
|
defaultOption1 () {
|
||||||
return {
|
return {
|
||||||
timer1: null,
|
|
||||||
timer2: null,
|
|
||||||
step: 0.4, // 数值越大速度滚动越快
|
step: 0.4, // 数值越大速度滚动越快
|
||||||
limitMoveNum: 5, // 开始无缝滚动的数据量 this.dataList.length
|
limitMoveNum: 5, // 开始无缝滚动的数据量 this.dataList.length
|
||||||
hoverStop: true, // 是否开启鼠标悬停stop
|
hoverStop: true, // 是否开启鼠标悬停stop
|
||||||
@@ -129,7 +126,6 @@ export default {
|
|||||||
},
|
},
|
||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
clearInterval(this.timer)
|
clearInterval(this.timer)
|
||||||
clearInterval(this.timeOut)
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
refresh () {
|
refresh () {
|
||||||
@@ -139,13 +135,12 @@ export default {
|
|||||||
},
|
},
|
||||||
async initData () {
|
async initData () {
|
||||||
let res = await sc()
|
let res = await sc()
|
||||||
clearInterval(this.timeOut)
|
|
||||||
this.resData = res
|
this.resData = res
|
||||||
this.pt = res.pt
|
this.pt = res.pt
|
||||||
this.ks = res.ks
|
this.ks = res.ks
|
||||||
let ptnum = res.ptNumber.split('')
|
let ptnum = String(res.ptNumber).split('')
|
||||||
this.ptnum = [...ptnum]
|
this.ptnum = [...ptnum]
|
||||||
let ksnum = res.ksNumber.split('')
|
let ksnum = String(res.ksNumber).split('')
|
||||||
this.ksnum = [...ksnum]
|
this.ksnum = [...ksnum]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user