diff --git a/public/favicon.ico b/public/favicon.ico index 68177d68..70e9d37f 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/src/App.vue b/src/App.vue index 50e0010b..b4b11701 100644 --- a/src/App.vue +++ b/src/App.vue @@ -89,6 +89,7 @@ import { batchAddOrUpdateFrontInternationalization, getFrontInternationalizationList, } from "@/api/dictionary/dictionary"; +import { getTrialExtralConfig } from "@/api/trials"; import Vue from "vue"; import i18n from "./lang"; export default { @@ -105,6 +106,28 @@ export default { mounted() { this.show = process.env.VUE_APP_OSS_PATH === "/test/dist"; }, + watch: { + "$route.query": { + async handler() { + if ( + this.$route.query.trialId && + this.$route.query.trialId !== this.$store.state.trials.config.trialId + ) { + let res = await getTrialExtralConfig({ + TrialId: this.$route.query.trialId, + }); + if (res.IsSuccess) { + this.$store.dispatch("trials/setConfig", { + trialId: this.$route.query.trialId, + ...res.Result, + }); + } + } + }, + immediate: true, + deep: true, + }, + }, methods: { changeValue(target, attr, e) { this.$set(target, attr, e); diff --git a/src/api/reading.js b/src/api/reading.js index 9fb24d6b..0f670256 100644 --- a/src/api/reading.js +++ b/src/api/reading.js @@ -171,3 +171,19 @@ export function getCustomTag(param) { data: param }) } + +export function clearSkipReadingCache(param) { + return request({ + url: `/ReadingImageTask/clearSkipReadingCache`, + method: 'post', + data: param + }) +} + +export function setSkipReadingCache(param) { + return request({ + url: `/ReadingImageTask/setSkipReadingCache`, + method: 'post', + data: param + }) +} diff --git a/src/api/trials.js b/src/api/trials.js index 8d017e4a..35bc26ce 100644 --- a/src/api/trials.js +++ b/src/api/trials.js @@ -3675,3 +3675,11 @@ export function getTrialSiteSelectList(params) { params }) } +// 获取项目配置 +export function getTrialExtralConfig(params) { + return request({ + url: `/TrialConfig/getTrialExtralConfig`, + method: 'get', + params + }) +} diff --git a/src/main.js b/src/main.js index ca6f2088..65322394 100644 --- a/src/main.js +++ b/src/main.js @@ -44,7 +44,6 @@ Viewer.setDefaults({ 'rotatable': true, 'scalable': true, 'transition': true, - 'fullscreen': true, 'keyboard': true, 'url': 'data-source' } @@ -368,7 +367,9 @@ async function VueInit() { } _vm.$store.dispatch('user/logout').then(res => { // window.location.href = `/login` - _vm.$msgbox.close(); + if(_vm.$msgbox){ + _vm.$msgbox.close(); + } isOpen = false isLock = null zzSessionStorage.removeItem('isLock') diff --git a/src/permission.js b/src/permission.js index db67208e..5ed14a2f 100644 --- a/src/permission.js +++ b/src/permission.js @@ -12,7 +12,7 @@ NProgress.configure({ showSpinner: false }) const whiteList = ['/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms'] -router.beforeEach(async(to, from, next) => { +router.beforeEach(async (to, from, next) => { NProgress.start() // 设置页面标题 // document.title = getPageTitle(to.meta.title) @@ -56,7 +56,7 @@ router.beforeEach(async(to, from, next) => { /* has no token*/ if (whiteList.indexOf(to.path) !== -1) { // 在免登录whiteList中,直接进入 - if (to.path === '/readingDicoms' || to.path === '/noneDicomReading'){ + if (to.path === '/readingDicoms' || to.path === '/noneDicomReading') { OSSclient() } next() @@ -68,7 +68,7 @@ router.beforeEach(async(to, from, next) => { next(`/ReviewersResearch?`) NProgress.done() } else { - // 其他无权访问的页面将重定向到登录页面。 + // 其他无权访问的页面将重定向到登录页面。 next(`/login?`) NProgress.done() } diff --git a/src/store/modules/reading.js b/src/store/modules/reading.js index 8418f231..6ca73932 100644 --- a/src/store/modules/reading.js +++ b/src/store/modules/reading.js @@ -493,11 +493,10 @@ const actions = { }) }, removeCustomizeMeasuredData({ state }, obj) { - return new Promise(async resolve => { var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId) var measureData = state.visitTaskList[index].MeasureData - console.log('removeCustomizeMeasuredData',obj, state.visitTaskList[index].MeasureData) + console.log('removeCustomizeMeasuredData', obj, state.visitTaskList[index].MeasureData) // var uuid = obj.measureData.data.uuid // var idx = measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === uuid) // console.log(obj, measureData) @@ -682,7 +681,7 @@ const actions = { } else { // state.visitTaskList[index].MeasureData.push(obj.MeasureData.data) state.visitTaskList[index].MeasureData.push({ - MeasureData: obj.measureData , + MeasureData: obj.measureData, SeriesId: obj.measureData.seriesId, StudyId: obj.measureData.studyId, InstanceId: obj.measureData.instanceId, @@ -898,7 +897,7 @@ const actions = { }, setImageloadedInfo({ state }, obj) { var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId) - let prefetchInstanceCount = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount + const prefetchInstanceCount = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount = prefetchInstanceCount + 100 state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].imageloadedArr.push(obj.imageId) }, diff --git a/src/store/modules/trials.js b/src/store/modules/trials.js index ed8ba8e1..609faffa 100644 --- a/src/store/modules/trials.js +++ b/src/store/modules/trials.js @@ -8,6 +8,7 @@ const getDefaultState = () => { visitPointQuery: null, studyListQuery: null, unlock: false, + config: {}, } } @@ -20,6 +21,9 @@ const mutations = { SET_UNLOCK: (state, unlock) => { state.unlock = unlock }, + SET_CONFIG: (state, config) => { + state.config = config + }, SET_ACTIVENAME: (state, activeName) => { state.trialDetailActiveName = activeName }, @@ -44,6 +48,9 @@ const actions = { setUnLock({ commit }, unlock) { commit('SET_UNLOCK', unlock) }, + setConfig({ commit }, config) { + commit('SET_CONFIG', config) + }, setActiveName({ commit }, activeName) { commit('SET_ACTIVENAME', activeName) }, diff --git a/src/utils/uploadZip.js b/src/utils/uploadZip.js index 89f309ea..45b6f563 100644 --- a/src/utils/uploadZip.js +++ b/src/utils/uploadZip.js @@ -2,44 +2,55 @@ import JSZip from "jszip"; import axios from "axios"; import { saveAs } from "file-saver"; import Vue from 'vue'; +import store from "@/store"; import { requestPackageAndAnonymizImage, } from "@/api/load.js"; let flag = {}; -export const downloadImage = async (id, id2) => { - if (flag[id2]) return - flag[id2] = true +export const resetFlag = () => { + flag = {}; + store.dispatch("trials/setUnLock", false); +} +export const downloadImage = async (id, id2, IsDicom = true) => { + if (flag[`${id2}_${IsDicom}`]) return Vue.prototype.$message.warning(Vue.prototype.$t('trials:upload:tip:uploading')); + flag[`${id2}_${IsDicom}`] = true try { let params = { TrialId: id, - SubjectVisitId: id2 + SubjectVisitId: id2, + IsDicom: IsDicom } + store.dispatch("trials/setUnLock", true); let res = await requestPackageAndAnonymizImage(params); - flag[id2] = false; if (res.IsSuccess) { if (!res.Result) { + flag[`${id2}_${IsDicom}`] = false; Vue.prototype.$message.warning(Vue.prototype.$t("trials:upload:message:not")) return 1; } - let a = document.createElement("a"); + Vue.prototype.$message.success(Vue.prototype.$t("trials:upload:message:startUpload")); let href = Vue.prototype.OSSclientConfig.basePath + res.Result; - let fileName = - res.Result.split("/")[res.Result.split("/").length - 1]; - a.download = fileName; - a.href = href; - a.click(); - URL.revokeObjectURL(href); - let timer = setTimeout(() => { - a = null; - href = null; - timer = null; - }, 500) + download(href, res.OtherInfo.FileName, { id2, IsDicom }) return 2; + // let a = document.createElement("a"); + // // let fileName = + // // res.Result.split("/")[res.Result.split("/").length - 1]; + // a.download = res.OtherInfo.FileName; + // a.href = href; + // a.click(); + // URL.revokeObjectURL(href); + // let timer = setTimeout(() => { + // a = null; + // href = null; + // timer = null; + // }, 500) + // return 2; } else { + flag[`${id2}_${IsDicom}`] = false; return false; } } catch (err) { - flag[id2] = false; + flag[`${id2}_${IsDicom}`] = false; console.log(err); } }; @@ -101,11 +112,11 @@ const setfolder = async (item) => { }) .then((res) => { saveAs(res, zipName + ".zip"); // 使用FileSaver.saveAs保存文件,文件名可自定义 - flag[id2] = false; + flag[`${id2}_${IsDicom}`] = false; zipObj = null; }); }) - .catch((reason) => { flag[id2] = false; }); + .catch((reason) => { flag[`${id2}_${IsDicom}`] = false; }); }; const handleBatchDown = async (item, zip) => { return new Promise((resolve) => { @@ -141,4 +152,48 @@ export const fileDownload = (content, filename) => { document.body.appendChild(eleLink); eleLink.click(); document.body.removeChild(eleLink); -}; \ No newline at end of file +}; +let download = async (downloadUrl, downloadFileName, res) => { + const blob = await getBlob(downloadUrl); + flag[`${res.id2}_${res.IsDicom}`] = false; + store.dispatch("trials/setUnLock", false); + saveAsB(blob, downloadFileName); +} + +let getBlob = (url) => { + return new Promise((resolve, reject) => { + const xhr = new XMLHttpRequest(); + + xhr.open('GET', url, true); + xhr.responseType = 'blob'; + xhr.onload = () => { + if (xhr.status === 200) { + resolve(xhr.response); + } else { + reject(new Error(`Request failed with status ${xhr.status}`)); + } + }; + xhr.onerror = () => { + reject(new Error('Request failed')); + }; + + xhr.send(); + }); +} + +let saveAsB = (blob, filename) => { + const link = document.createElement('a'); + const body = document.body; + + link.href = window.URL.createObjectURL(blob); + link.download = filename; + + // hide the link + link.style.display = 'none'; + body.appendChild(link); + + link.click(); + body.removeChild(link); + + window.URL.revokeObjectURL(link.href); +} \ No newline at end of file diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 30a0efb2..4d8142b0 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -183,7 +183,7 @@ {{ $t("login:title:system_title") }}
{{ $t("login:title:system") }}
-V1.5.2.001
+V1.5.3.001
Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司 版权所有 diff --git a/src/views/none-dicom-show/index.vue b/src/views/none-dicom-show/index.vue index 84277cd8..7dae2175 100644 --- a/src/views/none-dicom-show/index.vue +++ b/src/views/none-dicom-show/index.vue @@ -121,7 +121,7 @@ export default { // 获取非Dicom检查信息 getNoneDicomList() { this.loading = true - getNoneDicomStudyList(this.subjectVisitId, this.studyId, true).then(res => { + getNoneDicomStudyList(this.subjectVisitId, this.studyId).then(res => { this.studyList = res.Result this.loading = false const studyIndex = this.studyList.findIndex(item => { diff --git a/src/views/none-dicom-show/multiple.vue b/src/views/none-dicom-show/multiple.vue index 9099021e..49e4d774 100644 --- a/src/views/none-dicom-show/multiple.vue +++ b/src/views/none-dicom-show/multiple.vue @@ -62,7 +62,7 @@ export default { // 获取非Dicom检查信息 getNoneDicomList() { this.loading = true - getNoneDicomStudyList(this.subjectVisitId, '', true).then(res => { + getNoneDicomStudyList(this.subjectVisitId, '').then(res => { this.noneDicomStudyList = res.Result this.loading = false const study = this.noneDicomStudyList.find((item, index) => { diff --git a/src/views/trials/trials-panel/reading/ad-review/index.vue b/src/views/trials/trials-panel/reading/ad-review/index.vue index cb33fb79..435edc96 100644 --- a/src/views/trials/trials-panel/reading/ad-review/index.vue +++ b/src/views/trials/trials-panel/reading/ad-review/index.vue @@ -203,45 +203,40 @@ >
-
+{{ $t('trials:readingReport:title:sysEvaluationRes') }}{{ $fd('ExistDisease',isExistDisease) }}{{ $t('trials:readingReport:message:msg1') }}
@@ -262,6 +270,7 @@ diff --git a/src/views/trials/trials-panel/visit/crc-upload/components/uploadNonDicomFiles.vue b/src/views/trials/trials-panel/visit/crc-upload/components/uploadNonDicomFiles.vue index 29ed0a46..d577d26d 100644 --- a/src/views/trials/trials-panel/visit/crc-upload/components/uploadNonDicomFiles.vue +++ b/src/views/trials/trials-panel/visit/crc-upload/components/uploadNonDicomFiles.vue @@ -412,6 +412,7 @@ import { getToken } from '@/utils/auth' // import PreviewFiles from './previewFiles' import uploadVideos from '@/components/videos' import moment from 'moment' +import store from "@/store"; export default { name: 'UploadNonDicomFiles', components: { uploadVideos }, @@ -470,7 +471,8 @@ export default { uploadVideoVisible: false, trialId: this.$route.query.trialId, moment, - BodyPart:{} + BodyPart:{}, + studyMonitorId: null }; }, async mounted() { @@ -497,6 +499,12 @@ export default { }); } }, + btnLoading(){ + store.dispatch("trials/setUnLock", this.btnLoading); + } + }, + beforeDestroy(){ + store.dispatch("trials/setUnLock", false); }, methods: { // 初始化非Dicom列表数据 @@ -752,11 +760,20 @@ export default { this.selectArr.forEach(item=>item.status = 0); let num = this.selectArr.length > 6 ? 6 : this.selectArr.length; let funArr = []; - for (let i = 0; i < num; i++) { - funArr.push(this.handleUploadTask(this.selectArr, i)); - } - if (funArr.length > 0) { - let res = await Promise.all(funArr); + let res = await preArchiveStudy({ + subjectVisitId: this.subjectVisitId, + isDicom: false + }); + if(res.IsSuccess){ + this.studyMonitorId = res.Result; + for (let i = 0; i < num; i++) { + funArr.push(this.handleUploadTask(this.selectArr, i)); + } + if (funArr.length > 0) { + let res = await Promise.all(funArr); + } + }else{ + this.isFail = true; } } }, @@ -814,16 +831,12 @@ export default { // 非Dicom文件上传归档 submitFile(uploadedFileList){ if(!this.uploadVisible) return; - preArchiveStudy({ - subjectVisitId: this.subjectVisitId, - isDicom: false - }).then(res => { this.btnLoading = true var params = { trialId: this.trialId, subjectVisitId: this.subjectVisitId, noneDicomStudyId:this.currentRow.Id, - studyMonitorId: res.Result, + studyMonitorId: this.studyMonitorId, uploadedFileList: uploadedFileList } uploadNoneDicomFile(params).then(res => { @@ -833,7 +846,6 @@ export default { this.$emit('getList') this.$message.success(this.$t('trials:uploadNonDicoms:message:uploadedSuccessfully')) }).catch(() => { this.btnLoading = false }) - }) }, resetFileDiaolg(){ this.btnLoading = false diff --git a/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue b/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue index 3c6ac5dc..3b1dc947 100644 --- a/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue +++ b/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue @@ -43,6 +43,16 @@