看板
Showing
1 changed file
with
24 additions
and
4 deletions
| ... | @@ -67,7 +67,6 @@ import {autoToolTip} from "@/plugins/auto-toolTip"; | ... | @@ -67,7 +67,6 @@ import {autoToolTip} from "@/plugins/auto-toolTip"; |
| 67 | import * as echarts from "echarts"; | 67 | import * as echarts from "echarts"; |
| 68 | import * as api from "@/apiPc/common" | 68 | import * as api from "@/apiPc/common" |
| 69 | 69 | ||
| 70 | const queryParams = ref({}) | ||
| 71 | const zhuRef = ref(null) | 70 | const zhuRef = ref(null) |
| 72 | const lineRef = ref(null) | 71 | const lineRef = ref(null) |
| 73 | const overdueRef = ref(null) | 72 | const overdueRef = ref(null) |
| ... | @@ -237,15 +236,24 @@ const init = () => { | ... | @@ -237,15 +236,24 @@ const init = () => { |
| 237 | async function handelGetYS007() { | 236 | async function handelGetYS007() { |
| 238 | const res = await getYS007() | 237 | const res = await getYS007() |
| 239 | list7.value = res.data.list | 238 | list7.value = res.data.list |
| 239 | list7.value.sort((a, b) => b.EXERATIO - a.EXERATIO); | ||
| 240 | list7Y.value = [] | 240 | list7Y.value = [] |
| 241 | let arr1 = [] | 241 | let arr1 = [] |
| 242 | let arr2 = [] | 242 | let arr2 = [] |
| 243 | let arr3 = [] | 243 | let arr3 = [] |
| 244 | let num = 0 | ||
| 244 | for (const val of list7.value) { | 245 | for (const val of list7.value) { |
| 245 | list7Y.value.push(val.BASE) | 246 | list7Y.value.push(val.BASE) |
| 246 | arr1.push(Math.round(val.PLANCOST / 10000)) | 247 | arr1.push( |
| 248 | { | ||
| 249 | value: Math.round(val.PLANCOST / 10000), | ||
| 250 | value2: Math.round(val.EXECOST / 10000), | ||
| 251 | name: (val.EXERATIO * 100).toFixed() + '%', | ||
| 252 | } | ||
| 253 | ) | ||
| 247 | arr2.push(Math.round(val.EXECOST / 10000)) | 254 | arr2.push(Math.round(val.EXECOST / 10000)) |
| 248 | arr3.push(val.EXERATIO) | 255 | arr3.push(val.EXERATIO) |
| 256 | num += val.EXERATIO | ||
| 249 | } | 257 | } |
| 250 | setA(list7Y.value, arr1, arr2, arr3) | 258 | setA(list7Y.value, arr1, arr2, arr3) |
| 251 | 259 | ||
| ... | @@ -350,6 +358,7 @@ const getA = () => { | ... | @@ -350,6 +358,7 @@ const getA = () => { |
| 350 | 358 | ||
| 351 | 359 | ||
| 352 | const setA = (arrY, arr1, arr2, arr3) => { | 360 | const setA = (arrY, arr1, arr2, arr3) => { |
| 361 | console.log(arr1) | ||
| 353 | // console.log(arr1, arr2) | 362 | // console.log(arr1, arr2) |
| 354 | chartA = echarts.init(zhuRef.value) | 363 | chartA = echarts.init(zhuRef.value) |
| 355 | const option = { | 364 | const option = { |
| ... | @@ -433,9 +442,19 @@ const setA = (arrY, arr1, arr2, arr3) => { | ... | @@ -433,9 +442,19 @@ const setA = (arrY, arr1, arr2, arr3) => { |
| 433 | { | 442 | { |
| 434 | name: '计划金额', | 443 | name: '计划金额', |
| 435 | type: 'bar', | 444 | type: 'bar', |
| 445 | datasetIndex: 1, | ||
| 436 | barGap: 0, | 446 | barGap: 0, |
| 437 | label: { | 447 | label: { |
| 438 | show: false | 448 | show: true, |
| 449 | position: 'right', | ||
| 450 | formatter: function (v1) { | ||
| 451 | return v1.data.name | ||
| 452 | // 计算总数 | ||
| 453 | // const total = params.value + /* 其他系列的值 */; | ||
| 454 | // 计算百分比 | ||
| 455 | // const percent = ((params.value / total) * 100).toFixed(1); | ||
| 456 | // return `${percent}%`; | ||
| 457 | } | ||
| 439 | }, | 458 | }, |
| 440 | emphasis: { | 459 | emphasis: { |
| 441 | focus: 'series' | 460 | focus: 'series' |
| ... | @@ -457,7 +476,8 @@ const setA = (arrY, arr1, arr2, arr3) => { | ... | @@ -457,7 +476,8 @@ const setA = (arrY, arr1, arr2, arr3) => { |
| 457 | name: '执行金额', | 476 | name: '执行金额', |
| 458 | type: 'bar', | 477 | type: 'bar', |
| 459 | label: { | 478 | label: { |
| 460 | show: false | 479 | show: false, |
| 480 | // position: 'right', | ||
| 461 | }, | 481 | }, |
| 462 | emphasis: { | 482 | emphasis: { |
| 463 | focus: 'series' | 483 | focus: 'series' | ... | ... |
-
Please register or sign in to post a comment