dcdc9ac6 by zhangmeng

看版

1 parent 1d8088ba
...@@ -27,9 +27,9 @@ const type = ref('是') ...@@ -27,9 +27,9 @@ const type = ref('是')
27 const url = ref() 27 const url = ref()
28 const obj = ref({}) 28 const obj = ref({})
29 const result = ref() 29 const result = ref()
30 const router = useRouter() 30 // const router = useRouter()
31 // url.value = 'http://192.168.1.152:8899/login/sid=fa190207-f8bf-462c-a7f0-f2f0a14abe97#/' 31 url.value = 'http://192.168.1.152:8899/login/sid=0210d28d-3d3b-4534-bdcf-d81aef6e9325#/'
32 url.value = window.location.href 32 // url.value = window.location.href
33 result.value = url.value?.split('=')[1]?.split('#')[0]; 33 result.value = url.value?.split('=')[1]?.split('#')[0];
34 34
35 onMounted(() => { 35 onMounted(() => {
......
...@@ -318,7 +318,13 @@ async function handelGetYS007() { ...@@ -318,7 +318,13 @@ async function handelGetYS007() {
318 } 318 }
319 319
320 const firstAbove = list7Y.value.find(v => v.name >= BC.value); 320 const firstAbove = list7Y.value.find(v => v.name >= BC.value);
321 setA(list7Y.value, arr1, arr2, arr3, firstAbove?.value || '', BC.value) 321 let firstVal = ''
322 if (firstAbove && firstAbove.value) {
323 firstVal = firstAbove.value
324 } else {
325 firstVal = ''
326 }
327 setA(list7Y.value, arr1, arr2, arr3, firstVal, BC.value)
322 } 328 }
323 329
324 function handelSelect7() { 330 function handelSelect7() {
...@@ -347,9 +353,13 @@ function handelSelect7() { ...@@ -347,9 +353,13 @@ function handelSelect7() {
347 arr3.push(val.EXERATIO) 353 arr3.push(val.EXERATIO)
348 } 354 }
349 const firstAbove = list7Y.value.find(v => v.name >= BC.value); 355 const firstAbove = list7Y.value.find(v => v.name >= BC.value);
350 356 let firstVal = ''
351 357 if (firstAbove && firstAbove.value) {
352 setA(list7Y.value, arr1, arr2, arr3, firstAbove?.value || '', BC.value) 358 firstVal = firstAbove.value
359 } else {
360 firstVal = ''
361 }
362 setA(list7Y.value, arr1, arr2, arr3, firstVal, BC.value)
353 } 363 }
354 364
355 async function handelGetYS008() { 365 async function handelGetYS008() {
...@@ -358,6 +368,7 @@ async function handelGetYS008() { ...@@ -358,6 +368,7 @@ async function handelGetYS008() {
358 list8Y.value = [] 368 list8Y.value = []
359 month8.value = [] 369 month8.value = []
360 year8.value = [] 370 year8.value = []
371 list8.value.sort((a, b) => a.HKQKMONTH - b.HKQKMONTH);
361 for (let i = 0; i < list8.value.length; i++) { 372 for (let i = 0; i < list8.value.length; i++) {
362 list8.value[i].itemStyle = itemStyleList.value[i % itemStyleList.value.length] 373 list8.value[i].itemStyle = itemStyleList.value[i % itemStyleList.value.length]
363 list8Y.value.push(list8.value[i].BASEJC) 374 list8Y.value.push(list8.value[i].BASEJC)
...@@ -375,17 +386,21 @@ async function handelGetYS008() { ...@@ -375,17 +386,21 @@ async function handelGetYS008() {
375 } 386 }
376 387
377 function handelSelect8() { 388 function handelSelect8() {
389 console.log(list8.value)
378 month8.value = [] 390 month8.value = []
379 year8.value = [] 391 year8.value = []
380 let arr = list8Y.value.map(val => list8.value.find(item => item.BASEJC === val)); 392 let arr = list8Y.value.map(val => list8.value.find(item => item.BASEJC === val));
393 list8Y.value = []
394 arr.sort((a, b) => a.HKQKMONTH - b.HKQKMONTH);
381 for (let i = 0; i < arr.length; i++) { 395 for (let i = 0; i < arr.length; i++) {
396 list8Y.value.push(arr[i].BASEJC)
382 month8.value.push({ 397 month8.value.push({
383 value: list8.value[i].HKQKTOTAL / 10000, 398 value: arr[i].HKQKTOTAL / 10000,
384 itemStyle: list8.value[i].itemStyle, 399 itemStyle: arr[i].itemStyle,
385 }) 400 })
386 year8.value.push({ 401 year8.value.push({
387 value: list8.value[i].HKQKMONTH / 10000, 402 value: arr[i].HKQKMONTH / 10000,
388 itemStyle: list8.value[i].itemStyle, 403 itemStyle: arr[i].itemStyle,
389 }) 404 })
390 } 405 }
391 let arrc = type8.value == '2' ? month8.value : year8.value 406 let arrc = type8.value == '2' ? month8.value : year8.value
...@@ -493,6 +508,11 @@ const setA = (arrY, arr1, arr2, arr3, markLineName, BC) => { ...@@ -493,6 +508,11 @@ const setA = (arrY, arr1, arr2, arr3, markLineName, BC) => {
493 type: 'category', 508 type: 'category',
494 data: arrY, 509 data: arrY,
495 offset: 10, 510 offset: 10,
511 axisLabel: {
512 // formatter: '{value}w' // 在数值后添加单位
513 interval: 0,
514 fontSize: 10,
515 },
496 axisLine: { 516 axisLine: {
497 show: true, 517 show: true,
498 lineStyle: { 518 lineStyle: {
...@@ -656,7 +676,8 @@ const setB = (arrY, arr1, arr2) => { ...@@ -656,7 +676,8 @@ const setB = (arrY, arr1, arr2) => {
656 data: arrY, 676 data: arrY,
657 axisLabel: { 677 axisLabel: {
658 // formatter: '{value}w' // 在数值后添加单位 678 // formatter: '{value}w' // 在数值后添加单位
659 interval: 0 679 interval: 0,
680 fontSize: 10,
660 }, 681 },
661 axisLine: { 682 axisLine: {
662 show: true, 683 show: true,
...@@ -858,13 +879,19 @@ const setC = (arry, arr1, arr2, arr3) => { ...@@ -858,13 +879,19 @@ const setC = (arry, arr1, arr2, arr3) => {
858 stack: 'Ad', 879 stack: 'Ad',
859 // data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], 880 // data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
860 data: arry, 881 data: arry,
882 axisLabel: {
883 interval: 0,
884 // rotate: 45,
885 fontSize: 10,
886 },
861 axisLine: { 887 axisLine: {
862 show: true, 888 show: true,
863 lineStyle: { 889 lineStyle: {
864 color: '#fff', 890 color: '#fff',
865 width: 2, 891 width: 2,
866 type: 'solid' 892 type: 'solid'
867 } 893 },
894
868 }, 895 },
869 } 896 }
870 ], 897 ],
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!