阅片页面加载网速监控
continuous-integration/drone/push Build encountered an error
Details
continuous-integration/drone/push Build encountered an error
Details
parent
f8b4dd70c8
commit
edf1377374
|
@ -12,7 +12,7 @@ import { getCustomTag } from '@/api/reading'
|
|||
|
||||
import requestPoolManager from '@/utils/request-pool'
|
||||
import { getReadingVisitStudyList } from '@/api/trials'
|
||||
import { getNetWorkSpeed, setNetWorkSpeedSize, workSpeedclose } from "@/utils"
|
||||
import { getNetWorkSpeed, setNetWorkSpeedSizeAll, workSpeedclose } from "@/utils"
|
||||
const hangingAgreement = [
|
||||
{ name: 'A', row: 1, col: 1 },
|
||||
{ name: 'A|A', row: 1, col: 2 },
|
||||
|
@ -1076,7 +1076,7 @@ const actions = {
|
|||
let file = series.instanceInfoList.find(item => item.ImageId === obj.imageId)
|
||||
if (file) {
|
||||
getNetWorkSpeed()
|
||||
setNetWorkSpeedSize(obj.percentComplete, file.FileSize, obj.imageId)
|
||||
setNetWorkSpeedSizeAll(obj.percentComplete, file.FileSize, obj.imageId)
|
||||
}
|
||||
if (prefetchInstanceCount >= instanceCount * 100) {
|
||||
series.prefetchInstanceCount = instanceCount * 100
|
||||
|
|
|
@ -105,6 +105,7 @@ export function formatSize(size, fixed = 2) {
|
|||
|
||||
let timer = null, // 网速定时器
|
||||
lastPercentage = 0,
|
||||
percentageById = {},
|
||||
imageId = null,
|
||||
bytesReceivedPerSecond = {}; // 时间节点上传文件总量
|
||||
// 获取网速
|
||||
|
@ -154,6 +155,32 @@ export function setNetWorkSpeedSize(totalPercentage, total, Id) {
|
|||
}
|
||||
store.state.trials.uploadSize = `${formatSize(totalPercentage / 100 * total)}/${formatSize(total)}`
|
||||
}
|
||||
export function setNetWorkSpeedSizeAll(totalPercentage, total, Id) {
|
||||
if (!percentageById[Id]) {
|
||||
percentageById[Id] = 0
|
||||
}
|
||||
let percentage = totalPercentage - percentageById[Id]
|
||||
percentage = percentage / 100
|
||||
percentageById[Id] = totalPercentage
|
||||
// console.log(percentage, totalPercentage, total)
|
||||
let time = new Date().getTime();
|
||||
let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b);
|
||||
let bytesTime = timeList.find(item => time - item < 1000);
|
||||
if (bytesTime) {
|
||||
bytesReceivedPerSecond[bytesTime] += total * percentage;
|
||||
} else {
|
||||
// console.log("未查询到时间")
|
||||
if (timeList.length > 0) {
|
||||
bytesReceivedPerSecond[timeList[timeList.length - 1]] += total * percentage;
|
||||
} else {
|
||||
bytesReceivedPerSecond[time] = total * percentage;
|
||||
}
|
||||
}
|
||||
let isComplete = Object.keys(percentageById).every(key => percentageById[key >= 100])
|
||||
if (isComplete) {
|
||||
workSpeedclose(true)
|
||||
}
|
||||
}
|
||||
export function workSpeedclose(isForce = false) {
|
||||
if (!isForce && lastPercentage < 100) {
|
||||
return false
|
||||
|
@ -167,5 +194,6 @@ export function workSpeedclose(isForce = false) {
|
|||
}
|
||||
bytesReceivedPerSecond = {};
|
||||
lastPercentage = 0;
|
||||
imageId = null
|
||||
imageId = null;
|
||||
percentageById = {};
|
||||
}
|
|
@ -193,7 +193,8 @@ export default {
|
|||
showSeriesList: [],
|
||||
currentLoadIns: [],
|
||||
isFromCRCUpload: false,
|
||||
isReading: null
|
||||
isReading: null,
|
||||
activeSeriesId: null
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
|
@ -444,6 +445,8 @@ export default {
|
|||
}
|
||||
},
|
||||
showSeriesImage(e, seriesIndex, series) {
|
||||
this.activeSeriesId = series.seriesId
|
||||
workSpeedclose(true)
|
||||
// if (seriesIndex === this.currentSeriesIndex) return
|
||||
const element = e.currentTarget
|
||||
const elements = document.querySelectorAll('[series-type]')
|
||||
|
@ -833,6 +836,9 @@ export default {
|
|||
const seriesIndex = params.seriesIndex
|
||||
var prefetchInstanceCount = this.seriesList[seriesIndex].prefetchInstanceCount
|
||||
var instanceCount = this.seriesList[seriesIndex].instanceCount
|
||||
if (!this.activeSeriesId) {
|
||||
this.activeSeriesId = this.seriesList[seriesIndex].seriesId
|
||||
}
|
||||
if (this.seriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0 && this.seriesList[seriesIndex].imageloadedArr.length < this.seriesList[seriesIndex].instanceCount) {
|
||||
const i = this.currentLoadIns.findIndex(i => i.imageId === imageId)
|
||||
if (i > -1) {
|
||||
|
@ -853,7 +859,7 @@ export default {
|
|||
}
|
||||
}
|
||||
let file = this.seriesList[seriesIndex].instanceInfoList.find(item => item.ImageId === imageId)
|
||||
if (file) {
|
||||
if (file && this.activeSeriesId === this.seriesList[seriesIndex].seriesId) {
|
||||
getNetWorkSpeed()
|
||||
setNetWorkSpeedSize(percentComplete, file.FileSize, imageId)
|
||||
}
|
||||
|
|
|
@ -299,7 +299,7 @@ export default {
|
|||
computed: {
|
||||
...mapGetters(['visitTaskList', 'currentReadingTaskState']),
|
||||
NSTip() {
|
||||
return `${this.$store.state.trials.uploadSize},NS: ${this.$store.state.trials.uploadTip}`
|
||||
return `NS: ${this.$store.state.trials.uploadTip}`
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
|
@ -297,7 +297,7 @@ export default {
|
|||
computed: {
|
||||
...mapGetters(['visitTaskList', 'currentReadingTaskState']),
|
||||
NSTip() {
|
||||
return `${this.$store.state.trials.uploadSize},NS: ${this.$store.state.trials.uploadTip}`
|
||||
return `NS: ${this.$store.state.trials.uploadTip}`
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
|
@ -789,7 +789,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
NSTip() {
|
||||
return `${this.$store.state.trials.uploadSize},NS: ${this.$store.state.trials.uploadTip}`
|
||||
return `NS: ${this.$store.state.trials.uploadTip}`
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
@ -617,7 +617,7 @@ import colorMap from './colorMap.vue'
|
|||
import RectangleROITool from './tools/RectangleROITool'
|
||||
import uploadDicomAndNonedicom from '@/components/uploadDicomAndNonedicom'
|
||||
import downloadDicomAndNonedicom from '@/components/downloadDicomAndNonedicom'
|
||||
import { getNetWorkSpeed, setNetWorkSpeedSize, workSpeedclose } from "@/utils"
|
||||
import { getNetWorkSpeed, setNetWorkSpeedSizeAll, workSpeedclose } from "@/utils"
|
||||
const { visibility } = annotation
|
||||
const { ViewportType, Events } = Enums
|
||||
const renderingEngineId = 'myRenderingEngine'
|
||||
|
@ -1326,7 +1326,7 @@ export default {
|
|||
let file = series.find(item => item.ImageId === imageId)
|
||||
if (file) {
|
||||
getNetWorkSpeed()
|
||||
setNetWorkSpeedSize(percentComplete, file.FileSize, imageId)
|
||||
setNetWorkSpeedSizeAll(percentComplete, file.FileSize, imageId)
|
||||
}
|
||||
if (percentComplete === 100) {
|
||||
workSpeedclose()
|
||||
|
|
|
@ -540,7 +540,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
NSTip() {
|
||||
return `${this.$store.state.trials.uploadSize},NS: ${this.$store.state.trials.uploadTip}`
|
||||
return `NS: ${this.$store.state.trials.uploadTip}`
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
@ -407,15 +407,19 @@
|
|||
</el-card>
|
||||
<!-- 复核问题查看 -->
|
||||
<el-card shadow="hover" style="margin-top: 10px" v-else>
|
||||
<el-tabs v-model="secondReviewActiveName" type="card" v-if="secondReviewList.length > 0">
|
||||
<el-tab-pane v-for="item in secondReviewList" :key="item.SecondReviewTime"
|
||||
:label="`${item.SecondReviewTime} ${item.UserName}(${item.FullName})`" :name="item.SecondReviewTime">
|
||||
<h3>{{ $t('trials:audit:title:resetQuestions') }}</h3>
|
||||
<div style="overflow-y: auto">
|
||||
<QuestionForm :trial-id="trialId" :subject-visit-id="data.Id" :qc-process-enum="data.QCProcessEnum"
|
||||
:current-q-c-enum="currentQCType" :is-audit="isAudit" :SecondReviewTime="item.SecondReviewTime" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tabs v-model="secondReviewActiveName" type="card"
|
||||
v-if="secondReviewList.length > 0 && secondReviewList.find(item => item.SignTime)">
|
||||
<template v-for="item in secondReviewList">
|
||||
<el-tab-pane :key="item.SecondReviewTime" v-if="item.SignTime"
|
||||
:label="`${$t('trials:audit:tab:title:resetQuestions')} ${item.FullName}(${item.SignTime})`"
|
||||
:name="item.SecondReviewTime">
|
||||
<h3>{{ $t('trials:audit:title:resetQuestions') }}</h3>
|
||||
<div style="overflow-y: auto">
|
||||
<QuestionForm :trial-id="trialId" :subject-visit-id="data.Id" :qc-process-enum="data.QCProcessEnum"
|
||||
:current-q-c-enum="currentQCType" :is-audit="isAudit" :SecondReviewTime="item.SecondReviewTime" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
<!-- 发起质疑 -->
|
||||
|
|
Loading…
Reference in New Issue