播放速度默认值更改

uat_us
caiyiling 2024-06-11 18:04:11 +08:00
parent 4c98f91677
commit 134fba1e77
3 changed files with 22 additions and 14 deletions

View File

@ -247,7 +247,7 @@
<svg-icon icon-class="previousframe" style="font-size:20px;" />
</button>
<!-- 播放 -->
<button class="btn-link" :title="$t('trials:dicom-show:play')" @click="currentDicomCanvas.toggleClipPlay()">
<button class="btn-link" :title="$t('trials:dicom-show:play')" @click="clipPlay">
<svg-icon
:icon-class="currentDicomCanvas.toolState.clipPlaying ? 'stop' : 'play'"
style="font-size:20px;"
@ -261,9 +261,10 @@
<button class="btn-link" :title="$t('trials:dicom-show:lastframe')" @click="currentDicomCanvas.scrollPage(9999)">
<svg-icon icon-class="lastframe" style="font-size:20px;" />
</button>
<select class="sidetool-select" style="width:60px" @change="setDicomCanvasfps($event)">
<select v-model="fps" class="sidetool-select" style="width:60px" @change="setDicomCanvasfps($event)">
<!-- 默认值 -->
<option :value="10">{{ $t('trials:dicom-show:default') }}</option>
<option :value="5">5</option>
<option :value="10">10</option>
<option :value="15">15</option>
<option :value="20">20</option>
<option :value="30">30</option>
@ -386,7 +387,8 @@ export default {
wwwcList: [],
layout: null,
seriesList: [],
customWwc: { visible: false, title: null }
customWwc: { visible: false, title: null },
fps: 15
}
},
mounted() {
@ -566,6 +568,10 @@ export default {
setDicomCanvasfps(event) {
this.currentDicomCanvas.setFps(event.target.value)
},
clipPlay() {
this.currentDicomCanvas.setFps(this.fps)
this.currentDicomCanvas.toggleClipPlay()
},
fitToType(e, type) {
const toolButtons = document.querySelectorAll('[data-tool]')
Array.from(toolButtons).forEach((toolBtn) => {

View File

@ -328,9 +328,9 @@
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:speed')" placement="bottom">
<select class="select-wrapper" :disabled="clipPlaying" @change="setDicomCanvasfps($event)">
<select v-model="fps" class="select-wrapper" :disabled="clipPlaying" @change="setDicomCanvasfps($event)">
<!-- 默认值 -->
<option :value="5">{{ $t('trials:dicom-show:default') }}</option>
<!-- <option :value="5">{{ $t('trials:dicom-show:default') }}</option> -->
<option :value="5">5</option>
<option :value="10">10</option>
<option :value="15">15</option>
@ -838,7 +838,8 @@ export default {
activeCanvasWW: null,
activeCanvasWC: null,
activeTaskInfo: {},
clipPlaying: false
clipPlaying: false,
fps: 15
}
},
@ -902,6 +903,7 @@ export default {
this.clipPlaying = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].toolState.clipPlaying
} else {
this.clipPlaying = false
this.fps = 15
}
}
}
@ -1258,6 +1260,7 @@ export default {
},
loadImageStack(dicomSeries) {
this.clipPlaying = false
this.fps = 15
this.canvasObj[this.currentDicomCanvasIndex] = dicomSeries
this.$nextTick(() => {
this.activeSeries = dicomSeries
@ -1948,6 +1951,7 @@ export default {
const isLoaded = this.getSeriesLoadStatus()
if (!isLoaded) return
this.clipPlaying = isPlay
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].setFps(this.fps)
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].toggleClipPlay(isPlay)
},
getSeriesLoadStatus() {

View File

@ -448,9 +448,8 @@
class="select-wrapper"
:disabled="clipPlaying"
@change="setDicomCanvasfps($event)"
v-model="fps"
>
<!-- 默认值 -->
<option :value="5">{{ $t("trials:dicom-show:default") }}</option>
<option :value="5">5</option>
<option :value="10">10</option>
<option :value="15">15</option>
@ -857,7 +856,7 @@ export default {
isFullscreen: false,
manualsDialog: { visible: false },
clipPlaying: false,
fps: 15,
//
uploadImageVisible: false,
trialCriterion: {},
@ -900,6 +899,7 @@ export default {
][0].toolState.clipPlaying;
} else {
this.clipPlaying = false;
this.fps = 15
}
},
},
@ -1358,6 +1358,7 @@ export default {
},
loadImageStack(dicomSeries) {
this.clipPlaying = false;
this.fps = 15
this.canvasObj[this.currentDicomCanvasIndex] = dicomSeries;
if (this.activeTool) {
if (dicomSeries.isCurrentTask && dicomSeries.readingTaskState < 2) {
@ -2053,7 +2054,6 @@ export default {
dicomSeries.readingTaskState < 2
) {
if (this.activeTool && !type) {
console.log(1111122222);
this.measuredTools.forEach((item) => {
this.$refs[
`dicomCanvas${this.currentDicomCanvasIndex}`
@ -2068,7 +2068,6 @@ export default {
`dicomCanvas${this.currentDicomCanvasIndex}`
][0].setToolActive(toolName);
} else {
console.log(222233333);
this.measuredTools.forEach((item) => {
this.$refs[
`dicomCanvas${this.currentDicomCanvasIndex}`
@ -2080,7 +2079,6 @@ export default {
][0].setToolActive(toolName);
}
} else {
console.log(3333344444);
if (!this.activeTool) return;
this.measuredTools.forEach((item) => {
this.$refs[
@ -2093,7 +2091,6 @@ export default {
this.activeTool = "";
}
} else {
console.log(44445555);
if (this.activeTool === toolName) {
this.$refs[
`dicomCanvas${this.currentDicomCanvasIndex}`
@ -2160,6 +2157,7 @@ export default {
const isLoaded = this.getSeriesLoadStatus();
if (!isLoaded) return;
this.clipPlaying = isPlay;
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].setFps(this.fps)
this.$refs[
`dicomCanvas${this.currentDicomCanvasIndex}`
][0].toggleClipPlay(isPlay);