This commit is contained in:
张宁 2024-05-26 21:17:54 +08:00
parent 3984d334de
commit 2db21bf40d
1 changed files with 19 additions and 11 deletions

View File

@ -2,14 +2,14 @@
import { ElMessage } from "element-plus";
const activeTab = ref(0);
const tabs = [
{ title: '本科', value: 3900 ,dateList : ['11-6', '11-7', '11-8', '11-9', '11-10', "11-11"],numList: [1, 5, 2, 4, 9, 6]},
{ title: '专科', value: 4500 ,dateList : ['1-6', '1-7', '1-8', '1-9', '1-10', "1-11"],numList: [4, 9, 6,1, 5, 2]},
{ title: '专升本', value: 6000 ,dateList : ['2-6', '2-7', '2-8', '2-9', '2-10', "2-11"],numList: [1, 6,5, 2, 4, 9,]},
{ title: '本科', value: 3900, dateList: ['11-6', '11-7', '11-8', '11-9', '11-10', "11-11"], numList: [1, 5, 2, 4, 9, 6] },
{ title: '专科', value: 4500, dateList: ['1-6', '1-7', '1-8', '1-9', '1-10', "1-11"], numList: [4, 9, 6, 1, 5, 2] },
{ title: '专升本', value: 6000, dateList: ['2-6', '2-7', '2-8', '2-9', '2-10', "2-11"], numList: [1, 6, 5, 2, 4, 9,] },
];
const changeTab = (index: number) => {
activeTab.value = index;
setOption(tabs[index].dateList,tabs[index].numList)
setOption(tabs[index].dateList, tabs[index].numList)
};
const option = ref({});
@ -40,6 +40,14 @@ const setOption = async (xData: any[], yData: any[]) => {
color: "#fff",
fontWeight: "500",
},
axisPointer: {
type: 'line',
lineStyle: {
color: 'rgb(0, 148, 168)',
type: 'solid',
extraCssText: 'height:0;',
},
},
},
yAxis: {
type: "value",
@ -73,7 +81,7 @@ const setOption = async (xData: any[], yData: any[]) => {
show: false,
left: "10px",
right: "30px",
bottom: "0px",
bottom: "10px",
top: "30px",
containLabel: true,
// borderColor: "#1F63A3",
@ -102,13 +110,13 @@ const setOption = async (xData: any[], yData: any[]) => {
},
label: {
color: "#09CAF3",
backgroundColor: "rgba(9,202,243,0.1)",
borderRadius: 6,
borderColor: "rgba(9,202,243,.5)",
padding: [7, 14],
fontSize: '16',
// backgroundColor: "rgba(9,202,243,0.1)",
// borderRadius: 6,
// borderColor: "rgba(9,202,243,.5)",
// padding: [7, 14],
// formatter: "2{c}",
borderWidth: 0.5,
// borderWidth: 0.5,
},
},
{