看板
Showing
1 changed file
with
40 additions
and
28 deletions
| ... | @@ -236,7 +236,7 @@ const init = () => { | ... | @@ -236,7 +236,7 @@ const init = () => { |
| 236 | async function handelGetYS007() { | 236 | async function handelGetYS007() { |
| 237 | const res = await getYS007() | 237 | const res = await getYS007() |
| 238 | list7.value = res.data.list | 238 | list7.value = res.data.list |
| 239 | list7.value.sort((a, b) => b.EXERATIO - a.EXERATIO); | 239 | list7.value.sort((a, b) => a.EXERATIO - b.EXERATIO); |
| 240 | list7Y.value = [] | 240 | list7Y.value = [] |
| 241 | let arr1 = [] | 241 | let arr1 = [] |
| 242 | let arr2 = [] | 242 | let arr2 = [] |
| ... | @@ -251,7 +251,10 @@ async function handelGetYS007() { | ... | @@ -251,7 +251,10 @@ async function handelGetYS007() { |
| 251 | name: (val.EXERATIO * 100).toFixed() + '%', | 251 | name: (val.EXERATIO * 100).toFixed() + '%', |
| 252 | } | 252 | } |
| 253 | ) | 253 | ) |
| 254 | arr2.push(Math.round(val.EXECOST / 10000)) | 254 | arr2.push({ |
| 255 | value: Math.round(val.EXECOST / 10000), | ||
| 256 | name: (val.EXERATIO * 100).toFixed() + '%', | ||
| 257 | }) | ||
| 255 | arr3.push(val.EXERATIO) | 258 | arr3.push(val.EXERATIO) |
| 256 | num += val.EXERATIO | 259 | num += val.EXERATIO |
| 257 | } | 260 | } |
| ... | @@ -277,7 +280,6 @@ function handelSelect7() { | ... | @@ -277,7 +280,6 @@ function handelSelect7() { |
| 277 | async function handelGetYS008() { | 280 | async function handelGetYS008() { |
| 278 | const res = await getYS008() | 281 | const res = await getYS008() |
| 279 | list8.value = res.data.list | 282 | list8.value = res.data.list |
| 280 | console.log(res) | ||
| 281 | list8Y.value = [] | 283 | list8Y.value = [] |
| 282 | month8.value = [] | 284 | month8.value = [] |
| 283 | year8.value = [] | 285 | year8.value = [] |
| ... | @@ -293,7 +295,7 @@ async function handelGetYS008() { | ... | @@ -293,7 +295,7 @@ async function handelGetYS008() { |
| 293 | itemStyle: list8.value[i].itemStyle, | 295 | itemStyle: list8.value[i].itemStyle, |
| 294 | }) | 296 | }) |
| 295 | } | 297 | } |
| 296 | let arr = type8.value == '1' ? month8.value : year8.value | 298 | let arr = type8.value == '2' ? month8.value : year8.value |
| 297 | setB(list8Y.value, arr) | 299 | setB(list8Y.value, arr) |
| 298 | } | 300 | } |
| 299 | 301 | ||
| ... | @@ -303,26 +305,27 @@ function handelSelect8() { | ... | @@ -303,26 +305,27 @@ function handelSelect8() { |
| 303 | let arr = list8Y.value.map(val => list8.value.find(item => item.BASE === val)); | 305 | let arr = list8Y.value.map(val => list8.value.find(item => item.BASE === val)); |
| 304 | for (let i = 0; i < arr.length; i++) { | 306 | for (let i = 0; i < arr.length; i++) { |
| 305 | month8.value.push({ | 307 | month8.value.push({ |
| 306 | value: list8.value[i].HKQKTOTAL, | 308 | value: list8.value[i].HKQKTOTAL / 10000, |
| 307 | itemStyle: list8.value[i].itemStyle, | 309 | itemStyle: list8.value[i].itemStyle, |
| 308 | }) | 310 | }) |
| 309 | year8.value.push({ | 311 | year8.value.push({ |
| 310 | value: list8.value[i].HKQKMONTH, | 312 | value: list8.value[i].HKQKMONTH / 10000, |
| 311 | itemStyle: list8.value[i].itemStyle, | 313 | itemStyle: list8.value[i].itemStyle, |
| 312 | }) | 314 | }) |
| 313 | } | 315 | } |
| 314 | let arrc = type8.value == '1' ? month8.value : year8.value | 316 | let arrc = type8.value == '2' ? month8.value : year8.value |
| 315 | setB(list8Y.value, arrc) | 317 | setB(list8Y.value, arrc) |
| 316 | } | 318 | } |
| 317 | 319 | ||
| 318 | function handelType8() { | 320 | function handelType8() { |
| 319 | console.log(type8.value) | 321 | console.log(type8.value) |
| 320 | let arrc = type8.value == '1' ? month8.value : year8.value | 322 | let arrc = type8.value == '2' ? month8.value : year8.value |
| 321 | setB(list8Y.value, arrc) | 323 | setB(list8Y.value, arrc) |
| 322 | } | 324 | } |
| 323 | 325 | ||
| 324 | async function handelGetYS009() { | 326 | async function handelGetYS009() { |
| 325 | const res = await getYS009() | 327 | const res = await getYS009() |
| 328 | console.log(res) | ||
| 326 | list9.value = res.data.list | 329 | list9.value = res.data.list |
| 327 | let arrY = [] | 330 | let arrY = [] |
| 328 | let arr1 = [] | 331 | let arr1 = [] |
| ... | @@ -409,22 +412,22 @@ const setA = (arrY, arr1, arr2, arr3) => { | ... | @@ -409,22 +412,22 @@ const setA = (arrY, arr1, arr2, arr3) => { |
| 409 | } | 412 | } |
| 410 | } | 413 | } |
| 411 | }, | 414 | }, |
| 412 | dataZoom: [ | 415 | // dataZoom: [ |
| 413 | { | 416 | // { |
| 414 | type: 'slider', | 417 | // type: 'slider', |
| 415 | show: true, | 418 | // show: true, |
| 416 | yAxisIndex: [0], | 419 | // yAxisIndex: [0], |
| 417 | start: 0, | 420 | // start: 0, |
| 418 | end: 6, //初始值10条数据 | 421 | // end: 6, //初始值10条数据 |
| 419 | // filterMode: 'filter' | 422 | // // filterMode: 'filter' |
| 420 | }, | 423 | // }, |
| 421 | { | 424 | // { |
| 422 | type: 'inside', | 425 | // type: 'inside', |
| 423 | yAxisIndex: [0], | 426 | // yAxisIndex: [0], |
| 424 | start: 0, | 427 | // start: 0, |
| 425 | end: 6, //初始值10条数据 | 428 | // end: 6, //初始值10条数据 |
| 426 | } | 429 | // } |
| 427 | ], | 430 | // ], |
| 428 | yAxis: { | 431 | yAxis: { |
| 429 | type: 'category', | 432 | type: 'category', |
| 430 | // data: ['塘沽', '深圳', '漳江', '上海', '海南', '山西', '陕西', '新疆', '伊拉克'], | 433 | // data: ['塘沽', '深圳', '漳江', '上海', '海南', '山西', '陕西', '新疆', '伊拉克'], |
| ... | @@ -445,7 +448,7 @@ const setA = (arrY, arr1, arr2, arr3) => { | ... | @@ -445,7 +448,7 @@ const setA = (arrY, arr1, arr2, arr3) => { |
| 445 | datasetIndex: 1, | 448 | datasetIndex: 1, |
| 446 | barGap: 0, | 449 | barGap: 0, |
| 447 | label: { | 450 | label: { |
| 448 | show: true, | 451 | show: false, |
| 449 | position: 'right', | 452 | position: 'right', |
| 450 | formatter: function (v1) { | 453 | formatter: function (v1) { |
| 451 | return v1.data.name | 454 | return v1.data.name |
| ... | @@ -476,8 +479,16 @@ const setA = (arrY, arr1, arr2, arr3) => { | ... | @@ -476,8 +479,16 @@ const setA = (arrY, arr1, arr2, arr3) => { |
| 476 | name: '执行金额', | 479 | name: '执行金额', |
| 477 | type: 'bar', | 480 | type: 'bar', |
| 478 | label: { | 481 | label: { |
| 479 | show: false, | 482 | show: true, |
| 480 | // position: 'right', | 483 | position: 'right', |
| 484 | formatter: function (v1) { | ||
| 485 | return v1.data.name | ||
| 486 | // 计算总数 | ||
| 487 | // const total = params.value + /* 其他系列的值 */; | ||
| 488 | // 计算百分比 | ||
| 489 | // const percent = ((params.value / total) * 100).toFixed(1); | ||
| 490 | // return `${percent}%`; | ||
| 491 | } | ||
| 481 | }, | 492 | }, |
| 482 | emphasis: { | 493 | emphasis: { |
| 483 | focus: 'series' | 494 | focus: 'series' |
| ... | @@ -751,7 +762,8 @@ const setC = (arry, arr1, arr2, arr3) => { | ... | @@ -751,7 +762,8 @@ const setC = (arry, arr1, arr2, arr3) => { |
| 751 | { | 762 | { |
| 752 | type: 'category', | 763 | type: 'category', |
| 753 | stack: 'Ad', | 764 | stack: 'Ad', |
| 754 | data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], | 765 | // data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], |
| 766 | data: arry, | ||
| 755 | axisLine: { | 767 | axisLine: { |
| 756 | show: true, | 768 | show: true, |
| 757 | lineStyle: { | 769 | lineStyle: { | ... | ... |
-
Please register or sign in to post a comment