|
|
@@ -32,11 +32,14 @@ const loadingStatus = inject('loadingStatus') as Ref<{
|
|
|
process:boolean,
|
|
|
total:boolean
|
|
|
}>;
|
|
|
-function formatTimeWithMilliseconds(stamp:number ){
|
|
|
+function formatTimeWithMilliseconds(stamp:number,flag = false ){
|
|
|
const date = new Date(stamp);
|
|
|
const hours = date.getHours().toString().padStart(2, '0');
|
|
|
const minutes = date.getMinutes().toString().padStart(2, '0');
|
|
|
const seconds = date.getSeconds().toString().padStart(2, '0');
|
|
|
+ if (flag){
|
|
|
+ return `${hours}:${minutes}:${seconds}`
|
|
|
+ }
|
|
|
const milliseconds = date.getMilliseconds().toString().padStart(3, '0');
|
|
|
return `${hours}:${minutes}:${seconds}.${milliseconds}`;
|
|
|
}
|
|
|
@@ -77,9 +80,14 @@ function getCanvasData(chart:EChartsType){
|
|
|
let rowData = res.data.data.versions[versionIndex.value].events as any[];
|
|
|
console.log("行为数据",rowData);
|
|
|
//数组初始化
|
|
|
- cursorData.length=0;
|
|
|
- productData.length = 0;
|
|
|
- processData.length = 0;
|
|
|
+ let clock = new Date(0);
|
|
|
+ clock.setHours(clock.getHours() + 16);
|
|
|
+ // clock.setFullYear(2025)
|
|
|
+ // clock.setMonth(6)
|
|
|
+ // clock.setDate(26);
|
|
|
+ cursorData = [[clock,0]]
|
|
|
+ productData = [[clock,0]]
|
|
|
+ processData = [[clock,0]]
|
|
|
pauseData.length = 0;
|
|
|
chartData.length = 0;
|
|
|
let processCount = 0;
|
|
|
@@ -115,9 +123,9 @@ function getCanvasData(chart:EChartsType){
|
|
|
}
|
|
|
let clock = new Date(startStamp);
|
|
|
clock.setHours(clock.getHours() + 16);
|
|
|
- clock.setFullYear(2025)
|
|
|
- clock.setMonth(6)
|
|
|
- clock.setDate(26);
|
|
|
+ // clock.setFullYear(2025)
|
|
|
+ // clock.setMonth(6)
|
|
|
+ // clock.setDate(26);
|
|
|
cursorData.push([clock,item.retain+1])
|
|
|
productData.push([clock,item.docLength])
|
|
|
pauseData.push([clock,item.pauseTime])
|
|
|
@@ -150,7 +158,12 @@ function getCanvasData(chart:EChartsType){
|
|
|
show: true,
|
|
|
type: "line"
|
|
|
},
|
|
|
- splitNumber: props.splitNumber
|
|
|
+ splitNumber: props.splitNumber,
|
|
|
+ axisLabel:{
|
|
|
+ formatter: function(value) {
|
|
|
+ return formatTimeWithMilliseconds(value,true);
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
yAxis: [{
|
|
|
type: 'value',
|
|
|
@@ -176,6 +189,11 @@ function getCanvasData(chart:EChartsType){
|
|
|
},
|
|
|
{
|
|
|
type: 'slider',
|
|
|
+ labelFormatter: function (value) {
|
|
|
+ return formatTimeWithMilliseconds(value,true);
|
|
|
+ },
|
|
|
+ left:60,
|
|
|
+ right:60
|
|
|
}
|
|
|
],
|
|
|
legend:{
|