91e152cb by zhangmeng

看板

1 parent 9835b057
......@@ -29,8 +29,7 @@
<div ref="bing1" style="width: 100%;height:13vh;">
</div>
<div class="bingBottom">
<div>{{ activeName1 }}年营业收入</div>
<div>(万元)</div>
<div style="text-align: center">{{ `${dayjs().format('YYYY')}年` }}营业收入 <br>(万元)</div>
</div>
</div>
<div ref="zhuRef1" class="zhu" style="width:70%;height: 17vh"/>
......@@ -48,8 +47,9 @@
<div ref="bing2" style="width: 100%;height:13vh;">
</div>
<div class="bingBottom">
<div>{{ `${dayjs().format('YYYY')}年${dayjs().format('MM')}月` }}前累计应收余额</div>
<div>(万元)</div>
<div style="text-align: center;">{{ `${dayjs().format('YYYY')}年${dayjs().format('MM')}月` }} <br>
累计应收余额 <br>(万元)
</div>
</div>
</div>
<div ref="zhuRef2" class="zhu" style="width:70%;height: 17vh"/>
......@@ -67,8 +67,8 @@
<div ref="bing3" style="width: 100%;height:13vh;">
</div>
<div class="bingBottom">
<div>{{ `${dayjs().format('YYYY')}年${dayjs().format('MM')}月` }}前累计应收余额</div>
<div>(万元)</div>
<div style="text-align: center">{{ `${dayjs().format('YYYY')}年${dayjs().format('MM')}月` }} <br> 累计应收余额<br>(万元)
</div>
</div>
</div>
<div ref="zhuRef3" class="zhu" style="width:70%;height: 17vh"/>
......@@ -97,8 +97,6 @@ import * as api from "@/apiPc/common"
import {onMounted, ref} from 'vue'
import {dayjs} from 'element-plus'
import {getYS001, getYS002, getYS003, getYS004, getYS005} from '@/api/server.js'
import yy from '@/assets/image/yy1.png'
import {getLocalList} from "/@/apiPc/local";
const dataItems = ref([]);
......@@ -110,6 +108,7 @@ const bing1 = ref(null)
const bing2 = ref(null)
const bing3 = ref(null)
const textRef = ref(null)
const form = ref({
leaderinfo: []
})
......@@ -136,23 +135,36 @@ let total = 0
let intervalA = null
onMounted(() => {
// init()
init()
window.addEventListener('resize', handleResize);
// handelBing1()
// handelZhu1()
handelGetYS001()
handelGetYS002()
handelGetYS003()
handelGetYS004()
handelGetYS005()
// handelGetYS001()
// handelGetYS002()
// handelGetYS003()
// handelGetYS004()
// handelGetYS005()
// handelBing2()
// handelZhu2()
// handelBing3()
// handelZhu3()
// handelZhu4()
})
const init = () => {
clear()
if (!intervalA) {
handelGetYS001()
handelGetYS002()
handelGetYS003()
handelGetYS004()
handelGetYS005()
}
intervalA = setInterval(getdata, 1000 * 60 * 60);
}
async function handelGetYS001() {
const res = await getYS001()
resYear1.value = res.data.yeargroup
......@@ -161,7 +173,6 @@ async function handelGetYS001() {
activeName1.value = res.data.yeargroup[1].YEAR
}
async function handelGetYS002() {
const res = await getYS002()
resYear2.value = res.data.yeargroup
......@@ -272,6 +283,7 @@ async function handelGetYS004() {
let dataList = arr.map(v => ({
value: v.DSO,
day: v.DAYS,
itemStyle: v.type == 2 ? styleItem1 : styleItem2,
name: v.type == 2 ? "陆地" : '海上'
}))
......@@ -287,12 +299,6 @@ async function handelGetYS005() {
form.value = res.data
}
const init = () => {
if (!intervalA) {
getdata()
}
intervalA = setInterval(getdata, 1000 * 60 * 60);
}
function getdata() {
total = 0
......@@ -315,12 +321,21 @@ function handleResize() {
}
const handelBing1 = (arr1, arr2) => {
// arr1 2025
// arr2 2024
chart1 = echarts.init(bing1.value)
const option = {
tooltip: {
trigger: ''
trigger: 'item',
valueFormatter: (value) => value + '万',
backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
borderWidth: 1, // 边框宽度
textStyle: {
color: '#fff', // 文字颜色
fontSize: 12, // 文字大小
}
},
series: [
{
name: '',
......@@ -332,7 +347,10 @@ const handelBing1 = (arr1, arr2) => {
},
emphasis: {
scale: false
scale: false,
// label: {
// show: true,
// }
},
startAngle: 180,
endAngle: 360,
......@@ -347,189 +365,251 @@ const handelBing1 = (arr1, arr2) => {
barWidth: 2
},
{
name: arr1.YEAR,
name: '营业收入',
type: 'pie',
radius: ['75%', '95%'],
center: ['50%', '60%'],
label: {
show: false
show: true, // 显示标签
position: 'center', // 位置居中
formatter: (arr1.TOTAL / 10000).toFixed(), // 文字内容
rich: {
total: {
fontSize: 5,
color: '#fff'
}
}
},
// adjust the start and end angle
startAngle: 180,
endAngle: 360,
emphasis: {
scale: false
scale: true,
label: {
show: true,
}
},
data: [
{value: arr1.TOTAL, name: '营业收入', itemStyle: {color: "rgb(255,217,0)"}},
{value: arr1.TOTAL ? arr1.TOTAL * 2 : 1, name: '营业收入'},
{
value: (arr1.TOTAL / 10000).toFixed(),
name: arr1.YEAR,
itemStyle: {color: "rgb(255,217,0)"}
},
{
value: (arr2.TOTAL / 10000).toFixed(),
name: arr2.YEAR
},
],
itemStyle: {
color: 'rgba(1, 162, 237, .3)',
},
},
{
name: arr2.YEAR,
name: '营业收入',
type: 'pie',
radius: ['55%', '70%'],
center: ['50%', '60%'],
label: {
show: true,
position: 'center',
formatter: '{b}'
show: false, // 显示标签
position: 'center', // 位置居中
formatter: (arr1.TOTAL / 10000).toFixed(), // 文字内容
rich: {
total: {
fontSize: 5,
color: '#fff'
}
}
},
emphasis: {
scale: false
scale: true,
label: {
show: true,
}
},
// adjust the start and end angle
startAngle: 180,
endAngle: 360,
data: [
{value: arr2.TOTAL, name: '', itemStyle: {color: "rgba(240, 255, 0, .5)"}},
{value: arr2.TOTAL ? arr2.TOTAL * 2 : 1, name: (arr2.TOTAL / 10000).toFixed(0) + 'W'}
{
value: (arr2.TOTAL / 10000).toFixed() || 0,
name: arr2.YEAR,
itemStyle: {color: "rgba(240, 255, 0, .5)"}
},
// {value: arr2.TOTAL, name: (arr2.TOTAL / 10000).toFixed(0) + 'W'}
{
value: (arr1.TOTAL / 10000).toFixed() || 0,
name: arr1.YEAR
}
],
itemStyle: {
color: 'rgba(1, 162, 237, .3)',
},
},
{
name: '4',
type: 'pie',
radius: ['38%', '50%'],
center: ['50%', '60%'],
label: {
show: false
},
emphasis: {
scale: false
},
// adjust the start and end angle
startAngle: 180,
endAngle: 360,
data: [{value: 1048, name: ''}],
itemStyle: {
color: {
image: 'yy',
// repeat: 'repeat'
}
}
// itemStyle: {
// color: {
// type: 'linear',
// x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变
// colorStops: [
// {offset: 0, color: 'rgba(1, 162, 237, 1)'}, // 顶部颜色
// {offset: 1, color: 'rgba(16, 123, 184, 1)'} // 底部颜色
// ]
// {
// name: '4',
// type: 'pie',
// radius: ['38%', '50%'],
// center: ['50%', '60%'],
// label: {
// show: false
// },
// emphasis: {
// scale: false
// },
}
// // adjust the start and end angle
// startAngle: 180,
// endAngle: 360,
// data: [{value: 1048, name: ''}],
// itemStyle: {
// color: {
// image: yy,
// repeat: 'repeat'
// }
// }
// // itemStyle: {
// // color: {
// // type: 'linear',
// // x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变
// // colorStops: [
// // {offset: 0, color: 'rgba(1, 162, 237, 1)'}, // 顶部颜色
// // {offset: 1, color: 'rgba(16, 123, 184, 1)'} // 底部颜色
// // ]
// // },
// // },
// }
]
}
chart1.setOption(option)
autoHover(chart1, option, 3, 2000)
autoHover(chart1, option, 0, 2000)
}
const handelBing2 = (row1, row2) => {
chart2 = echarts.init(bing2.value)
const option = {
tooltip: {
trigger: ''
trigger: 'item',
valueFormatter: (value) => value + '万',
backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
borderWidth: 1, // 边框宽度
textStyle: {
color: '#fff', // 文字颜色
fontSize: 12, // 文字大小
}
},
series: [
{
name: '1',
name: '应收余额',
type: 'pie',
radius: ['99%', '100%'],
center: ['50%', '60%'],
label: {
show: false
show: false,
},
emphasis: {
scale: false
},
startAngle: 180,
endAngle: 360,
data: [
{value: 48, name: '1'},
{value: 1, name: '1'},
{value: 48, name: '1'}
],
data: [1],
itemStyle: {
color: 'rgba(1, 162, 237, 1)',
},
barWidth: 2
},
{
name: row2.YEAR,
name: '应收余额',
type: 'pie',
radius: ['75%', '95%'],
center: ['50%', '60%'],
label: {
show: false
show: true, // 显示标签
position: 'center', // 位置居中
formatter: (row1.TOTAL / 10000).toFixed() || 0, // 文字内容
rich: {
total: {
fontSize: 5,
color: '#fff'
}
}
},
// adjust the start and end angle
startAngle: 180,
endAngle: 360,
emphasis: {
scale: false
scale: true
},
data: [
{value: row1.TOTAL, name: (row1.TOTAL / 10000).toFixed(0) + 'W', itemStyle: {color: "rgba(0, 255, 190,1)"}},
{value: row2.TOTAL, name: (row2.TOTAL / 10000).toFixed(0) + 'W'}
],
itemStyle: {
color: 'rgba(1, 162, 237, .5)',
},
},
{
name: '3',
type: 'pie',
radius: ['55%', '70%'],
center: ['50%', '60%'],
label: {
show: true,
position: 'center',
formatter: '{b}'
},
emphasis: {
scale: false
value: (row1.TOTAL / 10000).toFixed() || 0,
name: row1.YEAR,
itemStyle: {color: "rgba(0, 255, 190,1)"}
},
// adjust the start and end angle
startAngle: 180,
endAngle: 360,
data: [
{value: 1048,},
{
value: (row2.TOTAL / 10000).toFixed() || 0,
name: row2.YEAR
}
],
itemStyle: {
color: {
type: 'linear',
x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变
colorStops: [
{offset: 0, color: 'rgba(1, 162, 237, 1)'}, // 顶部颜色
{offset: 1, color: 'rgba(16, 123, 184, 1)'} // 底部颜色
]
},
color: 'rgba(1, 162, 237, .5)',
},
},
// {
// name: '3',
// type: 'pie',
// radius: ['55%', '70%'],
// center: ['50%', '60%'],
// label: {
// show: true,
// position: 'center',
// formatter: '{b}'
// },
// emphasis: {
// scale: false
// },
// // adjust the start and end angle
// startAngle: 180,
// endAngle: 360,
// data: [
// {value: 1048,},
// ],
// itemStyle: {
// color: {
// type: 'linear',
// x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变
// colorStops: [
// {offset: 0, color: 'rgba(1, 162, 237, 1)'}, // 顶部颜色
// {offset: 1, color: 'rgba(16, 123, 184, 1)'} // 底部颜色
// ]
// },
// },
// },
]
}
chart2.setOption(option)
autoHover(chart2, option, 2, 2000)
autoHover(chart2, option, 0, 2000)
}
const handelBing3 = (row1, row2) => {
chart3 = echarts.init(bing3.value)
const option = {
tooltip: {
trigger: ''
trigger: 'item',
valueFormatter: (value) => value + '万',
backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
borderWidth: 1, // 边框宽度
textStyle: {
color: '#fff', // 文字颜色
fontSize: 12, // 文字大小
}
},
series: [
{
name: '1',
name: '现金余额',
type: 'pie',
radius: ['99%', '100%'],
center: ['50%', '60%'],
......@@ -541,22 +621,26 @@ const handelBing3 = (row1, row2) => {
},
startAngle: 180,
endAngle: 360,
data: [
{value: 48, name: '1'},
{value: 1, name: '1'},
{value: 48, name: '1'}
],
data: [1],
itemStyle: {
color: 'rgba(1, 162, 237, 1)',
},
},
{
name: '2',
name: '现金余额',
type: 'pie',
radius: ['75%', '95%'],
center: ['50%', '60%'],
label: {
show: false
show: true, // 显示标签
position: 'center', // 位置居中
formatter: (row1.TOTAL / 10000).toFixed() || 0, // 文字内容
rich: {
total: {
fontSize: 5,
color: '#fff'
}
}
},
// adjust the start and end angle
startAngle: 180,
......@@ -566,7 +650,7 @@ const handelBing3 = (row1, row2) => {
},
data: [
{
value: row2.TOTAL, name: row2.YEAR,
value: (row1.TOTAL / 10000).toFixed(), name: row1.YEAR,
itemStyle: {
color: {
type: 'linear',
......@@ -578,50 +662,51 @@ const handelBing3 = (row1, row2) => {
}
}
},
{value: row1.TOTAL, name: row1.YEAR}
{value: (row2.TOTAL / 10000).toFixed(), name: row2.YEAR}
],
itemStyle: {
color: 'rgba(1, 162, 237, .3)',
},
},
{
name: '3',
type: 'pie',
radius: ['55%', '70%'],
center: ['50%', '60%'],
label: {
show: true,
position: 'center',
formatter: '{b}'
},
emphasis: {
scale: false
},
// adjust the start and end angle
startAngle: 180,
endAngle: 360,
data: [
{value: 1048, name: ''},
],
itemStyle: {
color: {
type: 'linear',
x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变
colorStops: [
{offset: 0, color: 'rgba(1, 162, 237, 1)'}, // 顶部颜色
{offset: 1, color: 'rgba(16, 123, 184, 1)'} // 底部颜色
]
},
},
},
// {
// name: '3',
// type: 'pie',
// radius: ['55%', '70%'],
// center: ['50%', '60%'],
// label: {
// show: true,
// position: 'center',
// formatter: '{b}'
// },
// emphasis: {
// scale: false
// },
// // adjust the start and end angle
// startAngle: 180,
// endAngle: 360,
// data: [
// {value: 1048, name: ''},
// ],
// itemStyle: {
// color: {
// type: 'linear',
// x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变
// colorStops: [
// {offset: 0, color: 'rgba(1, 162, 237, 1)'}, // 顶部颜色
// {offset: 1, color: 'rgba(16, 123, 184, 1)'} // 底部颜色
// ]
// },
// },
// },
]
}
chart3.setOption(option)
autoHover(chart3, option, 0, 2000)
autoHover(chart3, option, 1, 2000)
}
const handelZhu1 = (row1, row2) => {
console.log(row1, row2)
chart11 = echarts.init(zhuRef1.value)
const option = {
tooltip: {
......@@ -629,7 +714,14 @@ const handelZhu1 = (row1, row2) => {
axisPointer: {
type: 'shadow'
},
// formatter: '{a0},{b0},{c}W <br /> {a1},{b1},{c1}W '
valueFormatter: (value) => value + '万',
backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
borderWidth: 1, // 边框宽度
textStyle: {
color: '#fff', // 文字颜色
fontSize: 12, // 文字大小
}
},
legend: {
top: '0',
......@@ -687,7 +779,7 @@ const handelZhu1 = (row1, row2) => {
focus: 'series'
},
data: row1.list.map(val => {
return (val.SRJE / 10000).toFixed(2)
return (val.SRJE / 10000).toFixed()
}),
itemStyle: {
color: {
......@@ -711,7 +803,7 @@ const handelZhu1 = (row1, row2) => {
focus: 'series'
},
data: row2.list.map(val => {
return (val.SRJE / 10000).toFixed(2)
return (val.SRJE / 10000).toFixed()
}),
itemStyle: {
color: {
......@@ -739,6 +831,14 @@ const handelZhu2 = (row1, row2) => {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
valueFormatter: (value) => value + '万',
backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
borderWidth: 1, // 边框宽度
textStyle: {
color: '#fff', // 文字颜色
fontSize: 12, // 文字大小
}
},
legend: {
......@@ -798,7 +898,7 @@ const handelZhu2 = (row1, row2) => {
},
// data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290,],
data: row1.list.map(val => {
return (val.YSCOST / 10000).toFixed(2)
return (val.YSCOST / 10000).toFixed()
}),
itemStyle: {
color: {
......@@ -822,7 +922,7 @@ const handelZhu2 = (row1, row2) => {
},
// data: [150, 232, 201, 154, 190, 330, 410, 201, 154, 190, 330, 410],
data: row2.list.map(val => {
return (val.YSCOST / 10000).toFixed(2)
return (val.YSCOST / 10000).toFixed()
}),
itemStyle: {
color: {
......@@ -859,6 +959,14 @@ const handelZhu3 = (row1, row2) => {
label: {
backgroundColor: '#6a7985'
}
},
valueFormatter: (value) => value + '万',
backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
borderWidth: 1, // 边框宽度
textStyle: {
color: '#fff', // 文字颜色
fontSize: 12, // 文字大小
}
},
legend: {
......@@ -1009,6 +1117,14 @@ const handelZhu4 = (listX, dataList) => {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
valueFormatter: (value) => value + '天',
backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
borderWidth: 1, // 边框宽度
textStyle: {
color: '#fff', // 文字颜色
fontSize: 12, // 文字大小
}
},
legend: {
......@@ -1118,6 +1234,12 @@ function autoHover(myChart, option, index, time) {
seriesIndex: index, // 第1个被轮播的序列下标
});
}
const clear = () => {
if (autoToolTip) {
clearTimeout(autoToolTip);
}
}
</script>
<style lang="scss" scoped>
......@@ -1312,7 +1434,7 @@ function autoHover(myChart, option, index, time) {
div {
font-family: PingFang SC;
font-weight: 400;
font-size: calc(14 * 100vw / 1920);
font-size: calc(12 * 100vw / 1920);
color: #FFFFFF;
}
}
......
......@@ -104,7 +104,8 @@ let intervalA = null;
onMounted(() => {
// init()
window.addEventListener('resize', handleResize);
handelGetYS006()
init()
// handelGetYS006()
// setA()
// setB()
// setC()
......@@ -131,13 +132,13 @@ async function handelGetYS006() {
type2.value.push(v1.BASE)
for (const v2 of v1.list) {
const i2 = v2.MONTH - 1; // 转为 0~11 的索引
h1.value[i2] += v2.YSDSK || 0;
h2.value[i2] += v2.SFDDQ || 0;
h3.value[i2] += v2.HTDQ || 0;
s1.value[i2] += v2.INCOME || 0;
s2.value[i2] += v2.LASTINCOME || 0;
s3.value[i2] += v2.LASTYSBALANCE || 0;
s4.value[i2] += v2.YSBALANCE || 0;
h1.value[i2] += v2.YSDSK / 10000 || 0;
h2.value[i2] += v2.SFDDQ / 10000 || 0;
h3.value[i2] += v2.HTDQ / 10000 || 0;
s1.value[i2] += v2.INCOME / 10000 || 0;
s2.value[i2] += v2.LASTINCOME / 10000 || 0;
s3.value[i2] += v2.LASTYSBALANCE / 10000 || 0;
s4.value[i2] += v2.YSBALANCE / 10000 || 0;
}
}
......@@ -187,10 +188,10 @@ function handelSelect2() {
for (const v1 of arr) {
for (const v2 of v1.list) {
const i2 = v2.MONTH - 1; // 转为 0~11 的索引
s1.value[i2] += v2.INCOME || 0;
s2.value[i2] += v2.LASTINCOME || 0;
s3.value[i2] += v2.LASTYSBALANCE || 0;
s4.value[i2] += v2.YSBALANCE || 0;
s1.value[i2] += v2.INCOME / 10000 || 0;
s2.value[i2] += v2.LASTINCOME / 10000 || 0;
s3.value[i2] += v2.LASTYSBALANCE / 10000 || 0;
s4.value[i2] += v2.YSBALANCE / 10000 || 0;
}
}
......@@ -218,9 +219,9 @@ function handelSelect3() {
for (const department of list.value) {
for (const monthData of department.list) {
const monthIndex = monthData.MONTH - 1; // 转为 0~11 的索引
h1.value[monthIndex] += monthData.YSDSK || 0;
h2.value[monthIndex] += monthData.SFDDQ || 0;
h3.value[monthIndex] += monthData.HTDQ || 0;
h1.value[monthIndex] += monthData.YSDSK / 10000 || 0;
h2.value[monthIndex] += monthData.SFDDQ / 10000 || 0;
h3.value[monthIndex] += monthData.HTDQ / 10000 || 0;
}
}
......@@ -239,8 +240,9 @@ function handelSelect3() {
const init = () => {
clear()
if (!intervalA) {
getdata()
handelGetYS006()
}
intervalA = setInterval(getdata, 1000 * 60 * 60);
}
......@@ -284,6 +286,14 @@ const setA = (arr) => {
const option = {
tooltip: {
trigger: 'item',
valueFormatter: (value) => (value / 10000).toFixed() + '万',
backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
borderWidth: 1, // 边框宽度
textStyle: {
color: '#fff', // 文字颜色
fontSize: 12, // 文字大小
}
},
legend: {
orient: 'vertical',
......@@ -402,6 +412,14 @@ const setB = (arr1, arr2, arr3, arr4) => {
const option = {
tooltip: {
trigger: 'axis',
valueFormatter: (value) => (value / 10000).toFixed() + '万',
backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
borderWidth: 1, // 边框宽度
textStyle: {
color: '#fff', // 文字颜色
fontSize: 12, // 文字大小
},
axisPointer: {
type: 'shadow'
}
......@@ -559,6 +577,14 @@ const setC = (h1, h2, h3) => {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
valueFormatter: (value) => (value / 10000).toFixed() + '万',
backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
borderWidth: 1, // 边框宽度
textStyle: {
color: '#fff', // 文字颜色
fontSize: 12, // 文字大小
}
},
legend: {
......
......@@ -216,13 +216,23 @@ let chartC
let intervalA = null
onMounted(() => {
// init()
init()
window.addEventListener('resize', handleResize);
// handelGetYS007()
// handelGetYS008()
// handelGetYS009()
})
const init = () => {
clear()
if (!intervalA) {
handelGetYS007()
handelGetYS008()
handelGetYS009()
}
intervalA = setInterval(getdata, 1000 * 60 * 60);
}
})
async function handelGetYS007() {
const res = await getYS007()
......@@ -256,7 +266,6 @@ function handelSelect7() {
setA(list7Y.value, arr1, arr2, arr3)
}
async function handelGetYS008() {
const res = await getYS008()
list8Y.value = []
......@@ -311,20 +320,13 @@ async function handelGetYS009() {
let arr3 = []
for (const val of list9.value) {
arrY.push(val.BASE)
arr1.push(val.WKPCOSTONE)
arr2.push(val.WKPCOSTTWO)
arr3.push(val.WKPCOSTTHREE)
arr1.push(Math.round(val.WKPCOSTONE / 10000))
arr2.push(Math.round(val.WKPCOSTTWO / 10000))
arr3.push(Math.round(val.WKPCOSTTHREE / 10000))
}
setC(arrY, arr1, arr2, arr3)
}
const init = () => {
clear()
if (!intervalA) {
getdata()
}
intervalA = setInterval(getdata, 1000 * 60 * 60);
}
const getdata = () => {
getA()
getB()
......@@ -353,6 +355,14 @@ const setA = (arrY, arr1, arr2, arr3) => {
trigger: 'axis',
axisPointer: {
type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
},
valueFormatter: (value) => value + '万',
backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
borderWidth: 1, // 边框宽度
textStyle: {
color: '#fff', // 文字颜色
fontSize: 12, // 文字大小
}
},
legend: {
......@@ -492,6 +502,14 @@ const setB = (arrY, arr1, arr2) => {
axisPointer: {
// Use axis to trigger tooltip
type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
},
valueFormatter: (value) => value + '万',
backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
borderWidth: 1, // 边框宽度
textStyle: {
color: '#fff', // 文字颜色
fontSize: 12, // 文字大小
}
},
grid: {
......@@ -685,6 +703,14 @@ const setC = (arry, arr1, arr2, arr3) => {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
valueFormatter: (value) => value + '万',
backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
borderWidth: 1, // 边框宽度
textStyle: {
color: '#fff', // 文字颜色
fontSize: 12, // 文字大小
}
},
legend: {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!