dcdc9ac6 by zhangmeng

看版

1 parent 1d8088ba
......@@ -27,9 +27,9 @@ const type = ref('是')
const url = ref()
const obj = ref({})
const result = ref()
const router = useRouter()
// url.value = 'http://192.168.1.152:8899/login/sid=fa190207-f8bf-462c-a7f0-f2f0a14abe97#/'
url.value = window.location.href
// const router = useRouter()
url.value = 'http://192.168.1.152:8899/login/sid=0210d28d-3d3b-4534-bdcf-d81aef6e9325#/'
// url.value = window.location.href
result.value = url.value?.split('=')[1]?.split('#')[0];
onMounted(() => {
......
......@@ -318,7 +318,13 @@ async function handelGetYS007() {
}
const firstAbove = list7Y.value.find(v => v.name >= BC.value);
setA(list7Y.value, arr1, arr2, arr3, firstAbove?.value || '', BC.value)
let firstVal = ''
if (firstAbove && firstAbove.value) {
firstVal = firstAbove.value
} else {
firstVal = ''
}
setA(list7Y.value, arr1, arr2, arr3, firstVal, BC.value)
}
function handelSelect7() {
......@@ -347,9 +353,13 @@ function handelSelect7() {
arr3.push(val.EXERATIO)
}
const firstAbove = list7Y.value.find(v => v.name >= BC.value);
setA(list7Y.value, arr1, arr2, arr3, firstAbove?.value || '', BC.value)
let firstVal = ''
if (firstAbove && firstAbove.value) {
firstVal = firstAbove.value
} else {
firstVal = ''
}
setA(list7Y.value, arr1, arr2, arr3, firstVal, BC.value)
}
async function handelGetYS008() {
......@@ -358,6 +368,7 @@ async function handelGetYS008() {
list8Y.value = []
month8.value = []
year8.value = []
list8.value.sort((a, b) => a.HKQKMONTH - b.HKQKMONTH);
for (let i = 0; i < list8.value.length; i++) {
list8.value[i].itemStyle = itemStyleList.value[i % itemStyleList.value.length]
list8Y.value.push(list8.value[i].BASEJC)
......@@ -375,17 +386,21 @@ async function handelGetYS008() {
}
function handelSelect8() {
console.log(list8.value)
month8.value = []
year8.value = []
let arr = list8Y.value.map(val => list8.value.find(item => item.BASEJC === val));
list8Y.value = []
arr.sort((a, b) => a.HKQKMONTH - b.HKQKMONTH);
for (let i = 0; i < arr.length; i++) {
list8Y.value.push(arr[i].BASEJC)
month8.value.push({
value: list8.value[i].HKQKTOTAL / 10000,
itemStyle: list8.value[i].itemStyle,
value: arr[i].HKQKTOTAL / 10000,
itemStyle: arr[i].itemStyle,
})
year8.value.push({
value: list8.value[i].HKQKMONTH / 10000,
itemStyle: list8.value[i].itemStyle,
value: arr[i].HKQKMONTH / 10000,
itemStyle: arr[i].itemStyle,
})
}
let arrc = type8.value == '2' ? month8.value : year8.value
......@@ -493,6 +508,11 @@ const setA = (arrY, arr1, arr2, arr3, markLineName, BC) => {
type: 'category',
data: arrY,
offset: 10,
axisLabel: {
// formatter: '{value}w' // 在数值后添加单位
interval: 0,
fontSize: 10,
},
axisLine: {
show: true,
lineStyle: {
......@@ -656,7 +676,8 @@ const setB = (arrY, arr1, arr2) => {
data: arrY,
axisLabel: {
// formatter: '{value}w' // 在数值后添加单位
interval: 0
interval: 0,
fontSize: 10,
},
axisLine: {
show: true,
......@@ -858,13 +879,19 @@ const setC = (arry, arr1, arr2, arr3) => {
stack: 'Ad',
// data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
data: arry,
axisLabel: {
interval: 0,
// rotate: 45,
fontSize: 10,
},
axisLine: {
show: true,
lineStyle: {
color: '#fff',
width: 2,
type: 'solid'
}
},
},
}
],
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!