Commit 3050a4129cbb0d476e1bdd2fe8514fc4790f2f9b

Authored by xp.Huang
2 parents b764a398 2f2173a3

Merge branch 'perf/application-call' into 'main_dev'

fix: 修复调用统计数据排序

See merge request yunteng/thingskit-front!1502
@@ -34,4 +34,7 @@ @@ -34,4 +34,7 @@
34 "vueuse", 34 "vueuse",
35 "windicss" 35 "windicss"
36 ], 36 ],
  37 + "[vue]": {
  38 + "editor.defaultFormatter": "Vue.volar"
  39 + },
37 } 40 }
@@ -54,8 +54,12 @@ export const formSchema: DescItem[] = [ @@ -54,8 +54,12 @@ export const formSchema: DescItem[] = [
54 54
55 function generateFullXAxis(type: DateInterval) { 55 function generateFullXAxis(type: DateInterval) {
56 if (type === 'hour') { 56 if (type === 'hour') {
  57 + let minute = dateUtil().minute();
  58 + minute = minute - (minute % 10);
  59 +
57 return Array.from({ length: 60 / 5 }, (_, index) => 60 return Array.from({ length: 60 / 5 }, (_, index) =>
58 dateUtil() 61 dateUtil()
  62 + .minute(minute)
59 .subtract(index * 5, 'minute') 63 .subtract(index * 5, 'minute')
60 .startOf('minute') 64 .startOf('minute')
61 .valueOf() 65 .valueOf()
@@ -119,14 +123,14 @@ export function transformChartsOptionsByClassifyRecord( @@ -119,14 +123,14 @@ export function transformChartsOptionsByClassifyRecord(
119 return { 123 return {
120 type: 'line', 124 type: 'line',
121 name: formatClassifyText[classify], 125 name: formatClassifyText[classify],
122 - data: dts.map(({ count }) => count), 126 + data: dts.map(({ count }) => count).reverse(),
123 }; 127 };
124 }); 128 });
125 129
126 const xAxisData = generateFullXAxis(type).map((timeSpan) => formatDateFromType(timeSpan, type)); 130 const xAxisData = generateFullXAxis(type).map((timeSpan) => formatDateFromType(timeSpan, type));
127 131
128 return { 132 return {
129 - series: series.reverse(), 133 + series,
130 xAxis: { 134 xAxis: {
131 type: 'category', 135 type: 'category',
132 data: xAxisData.reverse(), 136 data: xAxisData.reverse(),
@@ -90,8 +90,6 @@ @@ -90,8 +90,6 @@
90 // 接口调用历史 90 // 接口调用历史
91 const getClassify = async (type: DateInterval) => { 91 const getClassify = async (type: DateInterval) => {
92 timeType.value = type; 92 timeType.value = type;
93 - // const findValue = configTime.find((configItem) => configItem.name === type)?.value;  
94 - // chartData.timeLineXAxisData = timeFormat(type, findValue);  
95 const res = await getApplicationRecordClassify(type); 93 const res = await getApplicationRecordClassify(type);
96 94
97 const transformData = transformClassifyItem(res, type); 95 const transformData = transformClassifyItem(res, type);