|
|
@ -241,8 +241,7 @@ |
|
|
|
setTimeout(() => { |
|
|
|
changeColor() |
|
|
|
},0) |
|
|
|
reloadQualityComparison() |
|
|
|
reloadQualityInterpolation() |
|
|
|
reloadData() |
|
|
|
}) |
|
|
|
|
|
|
|
// const onTabClick = (name) => { |
|
|
@ -257,6 +256,7 @@ |
|
|
|
const onTabClick = (name) => { |
|
|
|
options.currentTab = name; |
|
|
|
options.currentElement = 'six-minute' |
|
|
|
reloadData() |
|
|
|
// initTimeLine() |
|
|
|
// if ( options.currentTab === 'MWR' ) { |
|
|
|
// options.date = moment('2021-11-10').format('YYYY-MM-DD'); |
|
|
@ -484,8 +484,7 @@ |
|
|
|
// options.currentTime = time.date; |
|
|
|
options.titleStartTime = moment(time.date).add(options.apiTimeLength, 'h').add(options.apiTimeInterval, 'm').format('YYYY-MM-DD HH:mm:ss') |
|
|
|
options.titleEndTime = time.date |
|
|
|
reloadQualityComparison() |
|
|
|
reloadQualityInterpolation() |
|
|
|
reloadData() |
|
|
|
// options.index = index; |
|
|
|
// test() |
|
|
|
// cancelActive(); |
|
|
@ -507,19 +506,19 @@ |
|
|
|
//上一天 |
|
|
|
const onPrevDayClick = () => { |
|
|
|
options.date = moment(options.date).add(-1, 'day').format('YYYY-MM-DD'); |
|
|
|
initTimeLine() |
|
|
|
options.titleStartTime = moment(options.date).hour(parseInt(options.currentHour) + options.apiTimeLength).minute(options.currentElement === 'six-minute' ? 36 : 30).format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
options.titleEndTime = moment(options.date).hour(parseInt(options.currentHour)).minute(options.currentElement === 'six-minute' ? 30 : 0).format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
reloadQualityComparison() |
|
|
|
reloadQualityInterpolation() |
|
|
|
reloadData() |
|
|
|
} |
|
|
|
|
|
|
|
//下一天 |
|
|
|
const onNextDayClick = () => { |
|
|
|
options.date = moment(options.date).add(1, 'day').format('YYYY-MM-DD'); |
|
|
|
initTimeLine() |
|
|
|
options.titleStartTime = moment(options.date).hour(parseInt(options.currentHour) + options.apiTimeLength).minute(options.currentElement === 'six-minute' ? 36 : 30).format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
options.titleEndTime = moment(options.date).hour(parseInt(options.currentHour)).minute(options.currentElement === 'six-minute' ? 30 : 0).format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
reloadQualityComparison() |
|
|
|
reloadQualityInterpolation() |
|
|
|
reloadData() |
|
|
|
} |
|
|
|
|
|
|
|
// const onPrevImgClick = () => { |
|
|
@ -578,7 +577,6 @@ |
|
|
|
|
|
|
|
const timeExcute = () => { |
|
|
|
clearTimer(); |
|
|
|
|
|
|
|
let element = getCurrentElement(); |
|
|
|
|
|
|
|
timer = setInterval( () => { |
|
|
@ -614,7 +612,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const onChange = (e) => { |
|
|
|
const onChange = () => { |
|
|
|
initTimeLine(reloadData); |
|
|
|
|
|
|
|
// if(options.currentTab === 'MWR') { |
|
|
@ -629,32 +627,32 @@ |
|
|
|
reloadQualityInterpolation() |
|
|
|
} |
|
|
|
|
|
|
|
const onSaveClick = () => { |
|
|
|
let pictures = document.getElementById('pictures'); |
|
|
|
options.urls = [options.contrast.noQCImgUrl, options.contrast.checkImgUrl, options.contrast.fillingImgUrl]; |
|
|
|
for (let i = 0; i < options.urls.length; i++) { |
|
|
|
let img = new Image(); |
|
|
|
img.src = options.urls[i]; |
|
|
|
let canvas = document.createElement("canvas") as HTMLCanvasElement; |
|
|
|
canvas.width = img.width; |
|
|
|
canvas.height = img.height; |
|
|
|
|
|
|
|
let ctx = canvas.getContext("2d"); |
|
|
|
let base64 = ''; |
|
|
|
|
|
|
|
img.setAttribute("crossOrigin",'Anonymous'); |
|
|
|
img.onload = function() { |
|
|
|
ctx.drawImage(img, 0, 0); |
|
|
|
base64 = canvas.toDataURL("image/png"); |
|
|
|
pictures.children[i].setAttribute('href', base64); |
|
|
|
|
|
|
|
let button: HTMLElement = pictures.children[i] as HTMLElement; |
|
|
|
setTimeout(() => { |
|
|
|
button.click(); |
|
|
|
}, 500); |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
// const onSaveClick = () => { |
|
|
|
// let pictures = document.getElementById('pictures'); |
|
|
|
// options.urls = [options.contrast.noQCImgUrl, options.contrast.checkImgUrl, options.contrast.fillingImgUrl]; |
|
|
|
// for (let i = 0; i < options.urls.length; i++) { |
|
|
|
// let img = new Image(); |
|
|
|
// img.src = options.urls[i]; |
|
|
|
// let canvas = document.createElement("canvas") as HTMLCanvasElement; |
|
|
|
// canvas.width = img.width; |
|
|
|
// canvas.height = img.height; |
|
|
|
// |
|
|
|
// let ctx = canvas.getContext("2d"); |
|
|
|
// let base64 = ''; |
|
|
|
// |
|
|
|
// img.setAttribute("crossOrigin",'Anonymous'); |
|
|
|
// img.onload = function() { |
|
|
|
// ctx.drawImage(img, 0, 0); |
|
|
|
// base64 = canvas.toDataURL("image/png"); |
|
|
|
// pictures.children[i].setAttribute('href', base64); |
|
|
|
// |
|
|
|
// let button: HTMLElement = pictures.children[i] as HTMLElement; |
|
|
|
// setTimeout(() => { |
|
|
|
// button.click(); |
|
|
|
// }, 500); |
|
|
|
// }; |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
const changeColor = () => { |
|
|
|
let timeLine = document.querySelectorAll('.time-item') |
|
|
@ -666,6 +664,8 @@ |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 重新加载质控对比数据 |
|
|
|
const reloadQualityComparison = () => { |
|
|
|
const startTime = moment(options.currentTime).add(options.apiTimeLength, 'h').add(options.apiTimeInterval, 'm').format('YYYY-MM-DD HH:mm:00'); |
|
|
@ -737,9 +737,9 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const onImageMove = (e) => { |
|
|
|
console.log(e); |
|
|
|
} |
|
|
|
// const onImageMove = (e) => { |
|
|
|
// console.log(e); |
|
|
|
// } |
|
|
|
|
|
|
|
return { |
|
|
|
...toRefs(options), |
|
|
@ -757,9 +757,9 @@ |
|
|
|
onChange, |
|
|
|
onImageLoad, |
|
|
|
// onDownloadClick, |
|
|
|
onSaveClick, |
|
|
|
// onSaveClick, |
|
|
|
changeColor, |
|
|
|
onImageMove |
|
|
|
// onImageMove |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|