2a95d8c5 by zhangmeng

看板

1 parent 3827e126
......@@ -236,7 +236,7 @@ const init = () => {
async function handelGetYS007() {
const res = await getYS007()
list7.value = res.data.list
list7.value.sort((a, b) => b.EXERATIO - a.EXERATIO);
list7.value.sort((a, b) => a.EXERATIO - b.EXERATIO);
list7Y.value = []
let arr1 = []
let arr2 = []
......@@ -251,7 +251,10 @@ async function handelGetYS007() {
name: (val.EXERATIO * 100).toFixed() + '%',
}
)
arr2.push(Math.round(val.EXECOST / 10000))
arr2.push({
value: Math.round(val.EXECOST / 10000),
name: (val.EXERATIO * 100).toFixed() + '%',
})
arr3.push(val.EXERATIO)
num += val.EXERATIO
}
......@@ -277,7 +280,6 @@ function handelSelect7() {
async function handelGetYS008() {
const res = await getYS008()
list8.value = res.data.list
console.log(res)
list8Y.value = []
month8.value = []
year8.value = []
......@@ -293,7 +295,7 @@ async function handelGetYS008() {
itemStyle: list8.value[i].itemStyle,
})
}
let arr = type8.value == '1' ? month8.value : year8.value
let arr = type8.value == '2' ? month8.value : year8.value
setB(list8Y.value, arr)
}
......@@ -303,26 +305,27 @@ function handelSelect8() {
let arr = list8Y.value.map(val => list8.value.find(item => item.BASE === val));
for (let i = 0; i < arr.length; i++) {
month8.value.push({
value: list8.value[i].HKQKTOTAL,
value: list8.value[i].HKQKTOTAL / 10000,
itemStyle: list8.value[i].itemStyle,
})
year8.value.push({
value: list8.value[i].HKQKMONTH,
value: list8.value[i].HKQKMONTH / 10000,
itemStyle: list8.value[i].itemStyle,
})
}
let arrc = type8.value == '1' ? month8.value : year8.value
let arrc = type8.value == '2' ? month8.value : year8.value
setB(list8Y.value, arrc)
}
function handelType8() {
console.log(type8.value)
let arrc = type8.value == '1' ? month8.value : year8.value
let arrc = type8.value == '2' ? month8.value : year8.value
setB(list8Y.value, arrc)
}
async function handelGetYS009() {
const res = await getYS009()
console.log(res)
list9.value = res.data.list
let arrY = []
let arr1 = []
......@@ -409,22 +412,22 @@ const setA = (arrY, arr1, arr2, arr3) => {
}
}
},
dataZoom: [
{
type: 'slider',
show: true,
yAxisIndex: [0],
start: 0,
end: 6, //初始值10条数据
// filterMode: 'filter'
},
{
type: 'inside',
yAxisIndex: [0],
start: 0,
end: 6, //初始值10条数据
}
],
// dataZoom: [
// {
// type: 'slider',
// show: true,
// yAxisIndex: [0],
// start: 0,
// end: 6, //初始值10条数据
// // filterMode: 'filter'
// },
// {
// type: 'inside',
// yAxisIndex: [0],
// start: 0,
// end: 6, //初始值10条数据
// }
// ],
yAxis: {
type: 'category',
// data: ['塘沽', '深圳', '漳江', '上海', '海南', '山西', '陕西', '新疆', '伊拉克'],
......@@ -445,7 +448,7 @@ const setA = (arrY, arr1, arr2, arr3) => {
datasetIndex: 1,
barGap: 0,
label: {
show: true,
show: false,
position: 'right',
formatter: function (v1) {
return v1.data.name
......@@ -476,8 +479,16 @@ const setA = (arrY, arr1, arr2, arr3) => {
name: '执行金额',
type: 'bar',
label: {
show: false,
// position: 'right',
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'
......@@ -751,7 +762,8 @@ const setC = (arry, arr1, arr2, arr3) => {
{
type: 'category',
stack: 'Ad',
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
// data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
data: arry,
axisLine: {
show: true,
lineStyle: {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!