f283443b by zhangmeng

看板

1 parent bcb5ca6d
......@@ -67,7 +67,6 @@ import {autoToolTip} from "@/plugins/auto-toolTip";
import * as echarts from "echarts";
import * as api from "@/apiPc/common"
const queryParams = ref({})
const zhuRef = ref(null)
const lineRef = ref(null)
const overdueRef = ref(null)
......@@ -237,15 +236,24 @@ const init = () => {
async function handelGetYS007() {
const res = await getYS007()
list7.value = res.data.list
list7.value.sort((a, b) => b.EXERATIO - a.EXERATIO);
list7Y.value = []
let arr1 = []
let arr2 = []
let arr3 = []
let num = 0
for (const val of list7.value) {
list7Y.value.push(val.BASE)
arr1.push(Math.round(val.PLANCOST / 10000))
arr1.push(
{
value: Math.round(val.PLANCOST / 10000),
value2: Math.round(val.EXECOST / 10000),
name: (val.EXERATIO * 100).toFixed() + '%',
}
)
arr2.push(Math.round(val.EXECOST / 10000))
arr3.push(val.EXERATIO)
num += val.EXERATIO
}
setA(list7Y.value, arr1, arr2, arr3)
......@@ -350,6 +358,7 @@ const getA = () => {
const setA = (arrY, arr1, arr2, arr3) => {
console.log(arr1)
// console.log(arr1, arr2)
chartA = echarts.init(zhuRef.value)
const option = {
......@@ -433,9 +442,19 @@ const setA = (arrY, arr1, arr2, arr3) => {
{
name: '计划金额',
type: 'bar',
datasetIndex: 1,
barGap: 0,
label: {
show: false
show: true,
position: 'right',
formatter: function (v1) {
return v1.data.name
// 计算总数
// const total = params.value + /* 其他系列的值 */;
// 计算百分比
// const percent = ((params.value / total) * 100).toFixed(1);
// return `${percent}%`;
}
},
emphasis: {
focus: 'series'
......@@ -457,7 +476,8 @@ const setA = (arrY, arr1, arr2, arr3) => {
name: '执行金额',
type: 'bar',
label: {
show: false
show: false,
// position: 'right',
},
emphasis: {
focus: 'series'
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!