This commit is contained in:
guiyangyang 2025-01-15 16:22:14 +08:00
parent 7289f01132
commit 7694d65ef8
2 changed files with 13 additions and 16 deletions

View File

@ -107,7 +107,7 @@ watch(
// usageOption.series[2].lineStyle.color = 'rgba(139,175,227,1)';
}
theme = newVal;
console.log(datasetOption);
// console.log(datasetOption);
// usageChart.setOption(usageOption);
myChart.setOption(datasetOption);
@ -140,7 +140,7 @@ let algorithmService = ref({});
let allCallService = ref({});
let networkService = ref({});
const changeServe = (value) => {
console.log('🚀 ~ changeServe ~ value:', value);
// console.log('🚀 ~ changeServe ~ value:', value);
if (value === 'net') {
setBar(networkService);
} else if (value === 'alg') {
@ -150,8 +150,8 @@ const changeServe = (value) => {
}
};
let [startTime, endTime] = LAST_7_DAYS;
console.log('🚀 ~ endTime:', endTime + ' 23:59:59');
console.log('🚀 ~ startTime:', startTime + ' 00:00:00');
// console.log('🚀 ~ endTime:', endTime + ' 23:59:59');
// console.log('🚀 ~ startTime:', startTime + ' 00:00:00');
// startTime = startTime +
startTime = startTime + ' 00:00:00';
endTime = endTime + ' 23:59:59';
@ -193,11 +193,9 @@ const setBar = (serve) => {
let yData = [];
Object.keys(serve.value).forEach((item, index) => {
if (index < 7) {
console.log(item, serve.value[item]);
Xdata.push(item);
yData.push(serve.value[item]);
datasetOption.xAxis.data = Xdata;
console.log('🚀 ~ Object.keys ~ Xdata:', Xdata);
datasetOption.series[0].data = yData;
myChart.setOption(datasetOption);
}
@ -266,7 +264,7 @@ const nameMap = {
OTHER: 'OTHER',
};
const handleEchartData = (res) => {
console.log('🚀 ~ handleEchartData ~ res:', res);
// console.log('🚀 ~ handleEchartData ~ res:', res);
historyPeakAndRealTime.value = res.currentCount ? res.currentCount : {};
// if (!historyPeakAndRealTime.value) {
// hasUsageData.value = false;
@ -308,7 +306,7 @@ const handleEchartData = (res) => {
],
});
usageChart.on('legendselectchanged', (params) => {
console.log('图例变化', params);
// console.log('', params);
let arr = [];
for (let [key, value] of Object.entries(params.selected)) {
if (value) {
@ -344,7 +342,7 @@ const datasetOption = {
formatter(str) {
const contentLength = str.length;
let result;
result = `${str.slice(0, contentLength / 2)}\n${str.slice(contentLength / 2)}`
result = `${str.slice(0, contentLength / 2)}\n${str.slice(contentLength / 2)}`;
// if (contentLength === 4) {
// result = `${str.slice(0, 2)}\n${str.slice(2)}`;
// } else if (contentLength === 6) {
@ -565,7 +563,6 @@ const renderEventChart = () => {
usageChart.setOption(usageOption);
};
onMounted(() => {
if (designStore.appThemeDetail.cssName == 'theme-blue') {
datasetOption.color = ['rgba(0,98,217,0.3)'];
datasetOption.series[0].itemStyle.borderColor = 'rgba(0,98,217,1)';
@ -596,7 +593,7 @@ onMounted(() => {
// debugger
handleEchartData(lineNet.value);
});
request
.get({
url: `/y4_sys/y4/main/callCount`,
@ -605,7 +602,7 @@ onMounted(() => {
},
})
.then((res2) => {
console.log('🚀 ~ res:', res2);
// console.log('🚀 ~ res:', res2);
serveCall.value = res2;
allCallService.value = res2.allCallService;
algorithmService.value = res2.algorithmService;
@ -621,7 +618,7 @@ onMounted(() => {
},
})
.then((res3) => {
console.log('🚀 ~ res3:', res3);
// console.log('🚀 ~ res3:', res3);
let data = res3.nums || [];
let arr = [];
data.forEach((item) => {
@ -663,7 +660,7 @@ onMounted(() => {
arr.push(obj);
}
socialData.value = arr;
console.log('🚀 ~ data.forEach ~ socialData:', socialData);
// console.log('🚀 ~ data.forEach ~ socialData:', socialData);
// networkStatData[item.name] = item.count;
});
});
@ -1054,7 +1051,7 @@ function switchOption(index) {
}
.assets-chart {
// margin-top: -46px;
width: 560.5px;
width: 560.5px;
height: 244px;
z-index: 2;
}

View File

@ -79,7 +79,7 @@ export default ({ mode }: ConfigEnv): UserConfig => {
target: 'http://172.16.20.1:8091', // 线上测试
// target: 'http://localhost:12344', // wky测试
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
rewrite: (path) => path.replace(/^\/y4_sys/, ''),
},
},
},