91e152cb by zhangmeng

看板

1 parent 9835b057
......@@ -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!