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