diff --git a/src/api/reading.js b/src/api/reading.js index 85717221..9202af20 100644 --- a/src/api/reading.js +++ b/src/api/reading.js @@ -75,10 +75,11 @@ export function getRelationVisitList(visitNum, tpCode) { method: 'get' }) } -export function getAllRelationStudyList(studyId) { +export function getAllRelationStudyList(studyId, params) { return request({ url: `/study/getAllRelationStudyList/${studyId}`, - method: 'get' + method: 'get', + params }) } export function getTrialListByReviewer(param) { @@ -134,7 +135,7 @@ export function AddAdjudicationReport(param) { } export function getVisitStudyList(trialId, subjectVisitId, isReading, visitTaskId) { - let url = `/SubjectVisit/getVisitStudyList/${trialId}/${subjectVisitId}/${isReading}` + let url = `/SubjectVisit/getVisitStudyList/${trialId}/${subjectVisitId}/${isReading}` url = visitTaskId ? `${url}?visitTaskId=${visitTaskId}` : url return request({ url: url, diff --git a/src/api/trials.js b/src/api/trials.js index 2464000d..3f5d2104 100644 --- a/src/api/trials.js +++ b/src/api/trials.js @@ -969,13 +969,20 @@ export function takeOrReleaseQCTask(trialId, subjectVisitId, obtainOrCancel) { method: 'put' }) } -export function replaceQCTaskActionUser(trialId, subjectVisitId) { +export function replaceQCTaskActionUser(trialId, subjectVisitId, params = {}) { return request({ url: `/QCOperation/replaceQCTaskActionUser/${trialId}/${subjectVisitId}`, - method: 'put' + method: 'put', + params + }) +} +export function getTrialUserRoleList(params) { + return request({ + url: `/TrialMaintenance/getTrialUserRoleList`, + method: 'get', + params }) } - export function verifyReuploadIsCanJump(trialId, qcChallengeId) { return request({ url: `/QCOperation/verifyReuploadIsCanJump/${trialId}/${qcChallengeId}`, diff --git a/src/assets/file_icon/mp4.png b/src/assets/file_icon/mp4.png new file mode 100644 index 00000000..fae2f8f2 Binary files /dev/null and b/src/assets/file_icon/mp4.png differ diff --git a/src/components/Dicom/DicomCanvas.vue b/src/components/Dicom/DicomCanvas.vue index 99f57706..174a4937 100644 --- a/src/components/Dicom/DicomCanvas.vue +++ b/src/components/Dicom/DicomCanvas.vue @@ -122,7 +122,7 @@ export default { components: { DicomTags }, computed: { NSTip() { - return `${this.$store.state.trials.uploadSize},NS: ${this.$store.state.trials.uploadTip}` + return `${this.$store.state.trials.uploadSize}, NS: ${this.$store.state.trials.uploadTip}` } }, data() { diff --git a/src/components/clinicalDataQuestions/components/QuestionFormItem.vue b/src/components/clinicalDataQuestions/components/QuestionFormItem.vue index a66af29e..d2f5ab90 100644 --- a/src/components/clinicalDataQuestions/components/QuestionFormItem.vue +++ b/src/components/clinicalDataQuestions/components/QuestionFormItem.vue @@ -16,7 +16,7 @@ {{ question.QuestionName }} - + {{ $t('trials:readingUnit:qsList:title:add') }} @@ -29,7 +29,8 @@ : scope.row[item.Id] }} - + + @@ -290,6 +307,7 @@ export default { visitInfo: '', activeName: 'current-study', relationStudyList: [], + relationStudyListByVisitName: [], cachedImages: [], isReading: null, isStartLoad: false, @@ -303,7 +321,8 @@ export default { currentLoadIns: [], isFromCRCUpload: false, visitTaskId: null, - page: '' + page: '', + activeSeriesId: null } }, mounted() { @@ -435,6 +454,8 @@ export default { } }, showSeriesImage(e, studyIndex, seriesIndex, series) { + this.activeSeriesId = series.seriesId + workSpeedclose(true) const element = e.currentTarget const elements = document.querySelectorAll('[series-type]') Array.from(elements).forEach((e) => { @@ -683,10 +704,26 @@ export default { spinner: 'el-icon-loading' }) try { - const res = await getAllRelationStudyList(this.subjectVisitId) + let params = { + IsReading: !!this.isReading + } + const res = await getAllRelationStudyList(this.subjectVisitId, params) loading.close() this.relationStudyList = res.Result + this.relationStudyListByVisitName = [] + res.Result.forEach(item => { + let index = this.relationStudyListByVisitName.findIndex(d => d.VisitName === item.VisitName) + if (index < 0) { + this.relationStudyListByVisitName.push({ + VisitName: item.VisitName, + series: [item] + }) + } else { + this.relationStudyListByVisitName[index].series.push(item) + } + }) } catch (e) { + console.log(e) loading.close() } } @@ -715,7 +752,8 @@ export default { spinner: 'el-icon-loading' }) try { - const data = await getSeriesList(`/series/list/${studyId}`) + let isReading = !!this.isReading ? `?IsReading=true` : '' + const data = await getSeriesList(`/series/list/${studyId}${isReading}`) loading.close() if (data.Result != null && data.Result.length > 0) { var seriesList = [] @@ -725,9 +763,15 @@ export default { item.InstanceInfoList.forEach(i => { if (i.NumberOfFrames && i.NumberOfFrames > 1) { for (let j = 0; j < i.NumberOfFrames; j++) { + if (!i.ImageId) { + i.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${index}|${seriesIndex}&isRelation=1` + } imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${index}|${seriesIndex}&isRelation=1`) } } else { + if (!i.ImageId) { + i.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${index}|${seriesIndex}&isRelation=1` + } imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${index}|${seriesIndex}&isRelation=1`) } }) @@ -751,9 +795,12 @@ export default { isShowPopper: false }) }) - scope.relationStudyList[index].seriesCount = seriesList.length - scope.relationStudyList[index].seriesList = seriesList - scope.relationStudyList[index].showSeries = true + // scope.relationStudyList[index].seriesCount = seriesList.length + // scope.relationStudyList[index].seriesList = seriesList + // scope.relationStudyList[index].showSeries = true + scope.$set(scope.relationStudyList[index], 'seriesCount', seriesList.length) + scope.$set(scope.relationStudyList[index], 'seriesList', seriesList) + scope.$set(scope.relationStudyList[index], 'showSeries', true) scope.$forceUpdate() } } catch (e) { @@ -762,6 +809,8 @@ export default { } }, showRelationSeriesImage(e, series, studyIndex, index) { + this.activeSeriesId = series.seriesId + workSpeedclose(true) this.currentRelationIndex = index const element = e.currentTarget const elements = document.querySelectorAll('[series-type]') @@ -781,6 +830,9 @@ export default { this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority }) }) } + if (this.imageList.length > 0) { + this.loopLoad() + } } }, loadAllImages() { @@ -840,8 +892,11 @@ export default { } const studyIndex = params.idx.split('|')[0] const seriesIndex = params.idx.split('|')[1] - var series = !params.isRelation ? this.studyList[studyIndex].SeriesList[seriesIndex] : null + var series = !params.isRelation ? this.studyList[studyIndex].SeriesList[seriesIndex] : this.relationStudyList[studyIndex].seriesList[seriesIndex] if (!series) return + if (!this.activeSeriesId) { + this.activeSeriesId = series.seriesId + } var prefetchInstanceCount = series.prefetchInstanceCount var instanceCount = series.instanceCount if (series.imageloadedArr.indexOf(imageId) < 0) { @@ -863,10 +918,10 @@ export default { series.imageloadedArr.push(imageId) } } - let file = this.studyList[studyIndex].SeriesList[seriesIndex].instanceInfoList.find(item => item.ImageId === imageId) - if (file) { + let file = series.instanceInfoList.find(item => item.ImageId === imageId) + if (file && this.activeSeriesId === series.seriesId) { getNetWorkSpeed() - setNetWorkSpeedSize(percentComplete, file.FileSize, imageId) + setNetWorkSpeedSize(percentComplete, e.detail.total, imageId) } if (prefetchInstanceCount >= instanceCount * 100) { series.prefetchInstanceCount = instanceCount * 100 diff --git a/src/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview.vue b/src/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview.vue index 48af85c2..662ccc71 100644 --- a/src/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview.vue +++ b/src/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview.vue @@ -70,6 +70,7 @@ import ppt from '@/assets/file_icon/ppt.png' import pptx from '@/assets/file_icon/pptx.png' import xls from '@/assets/file_icon/xls.png' import xlsx from '@/assets/file_icon/xlsx.png' +import mp4 from '@/assets/file_icon/xlsx.png' import PreviewFile from '@/components/PreviewFile' import imageViewer from './image-viewer' import { getSystemDocumentAttachmentList } from '@/api/dictionary' @@ -117,6 +118,7 @@ export default { pptx, xls, xlsx, + mp4, rowData: {}, list: [], searchData: defaultSearchData(), diff --git a/src/views/dictionary/template/sign/components/SceneConfigForm.vue b/src/views/dictionary/template/sign/components/SceneConfigForm.vue index d38c7e67..afb7f24e 100644 --- a/src/views/dictionary/template/sign/components/SceneConfigForm.vue +++ b/src/views/dictionary/template/sign/components/SceneConfigForm.vue @@ -14,7 +14,7 @@ - + diff --git a/src/views/trials/trials-panel/reading/dicoms/components/DicomCanvas.vue b/src/views/trials/trials-panel/reading/dicoms/components/DicomCanvas.vue index 73e31c07..8caa0dea 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/DicomCanvas.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/DicomCanvas.vue @@ -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: { diff --git a/src/views/trials/trials-panel/reading/dicoms/components/ReadPage.vue b/src/views/trials/trials-panel/reading/dicoms/components/ReadPage.vue index 216123a0..5016e2ea 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/ReadPage.vue @@ -8,7 +8,8 @@
{{ + :class="{ 'visit-item-active': activeTaskVisitId == s.VisitTaskId }" @click.prevent="handleClick(s)"> + {{ s.TaskBlindName }}
@@ -510,13 +511,13 @@ export default { }, cornerstoneimageloadprogress(e) { const imageId = e.detail.imageId - console.log(imageId,'imageId') const params = {} const searchParams = new URLSearchParams(imageId.split('?')[1]) for (const [key, value] of searchParams.entries()) { params[key] = value } params.percentComplete = e.detail.percentComplete + params.FileTotal = e.detail.total params.imageId = imageId store.dispatch('reading/setImageLoadedProgress', params) } diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeDicomCanvas.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeDicomCanvas.vue index 9b9a7340..eae19277 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeDicomCanvas.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeDicomCanvas.vue @@ -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: { diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReadPage.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReadPage.vue index c098ca0f..f51d3978 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReadPage.vue @@ -663,6 +663,7 @@ export default { params[key] = value } params.percentComplete = e.detail.percentComplete + params.FileTotal = e.detail.total params.imageId = imageId store.dispatch('reading/setImageLoadedProgress', params) } diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/PetCtViewport.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/PetCtViewport.vue index d4c122eb..c0bae338 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/PetCtViewport.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/PetCtViewport.vue @@ -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}` } }, } diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue index d9ac80f3..0de556a6 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -632,7 +632,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' @@ -1366,7 +1366,7 @@ export default { let file = series.find(item => item.ImageId === imageId) if (file) { getNetWorkSpeed() - setNetWorkSpeedSize(percentComplete, file.FileSize, imageId) + setNetWorkSpeedSizeAll(percentComplete, detail.total, imageId) } if (percentComplete === 100) { workSpeedclose() diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/Viewport.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/Viewport.vue index 86d15eec..755512e1 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/Viewport.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/Viewport.vue @@ -542,7 +542,7 @@ export default { }, computed: { NSTip() { - return `${this.$store.state.trials.uploadSize},NS: ${this.$store.state.trials.uploadTip}` + return `NS: ${this.$store.state.trials.uploadTip}` } }, } diff --git a/src/views/trials/trials-panel/setting/qc-question/components/QsForm.vue b/src/views/trials/trials-panel/setting/qc-question/components/QsForm.vue index df5d19b2..3de4a697 100644 --- a/src/views/trials/trials-panel/setting/qc-question/components/QsForm.vue +++ b/src/views/trials/trials-panel/setting/qc-question/components/QsForm.vue @@ -1,139 +1,68 @@
@@ -369,9 +372,10 @@ - + @@ -384,12 +388,38 @@
+ :is-audit="isAudit || SecondReviewState > 0" />

{{ $t('trials:audit:message:noData') }}

- + + + +

{{ $t('trials:audit:title:resetQuestions') }}

+
+ +
+
+ + + + + + @@ -768,14 +798,40 @@ style="height: 500px; width: 500px" @error="imgObj.loading = false" @load="imgObj.loading = false" /> + + + + + + + + + + + {{ $t("common:button:cancel") }} + {{ $t("common:button:save") }} + +
+ + + {{ $t('trials:audit:button:reviewTask') }} + + + + {{ $t('trials:audit:button:assign') }} + {{ $t('trials:audit:button:save') }} - + {{ $t('trials:audit:button:question') }} @@ -792,7 +848,8 @@ - + {{ $t('trials:audit:button:auditPassed') }} @@ -800,7 +857,7 @@
- + @@ -825,6 +882,8 @@ import { closeQCChallenge, updateModality, getQCChallengeDialogList, + replaceQCTaskActionUser, + getTrialUserRoleList } from '@/api/trials' import { qCPassedOrFailed } from '@/api/trials/visit' import { getBasicDataSelects } from '@/api/dictionary/dictionary' @@ -863,6 +922,10 @@ export default { type: Number, default: 1, }, + SecondReviewState: { + type: Number, + default: 0, + } }, computed: { isEN() { @@ -922,7 +985,7 @@ export default { }, subjectClinicalData: {}, moment, - currentQCType: null, + currentQCType: 0, currentUser: zzSessionStorage.getItem('userName'), pickerOption: { disabledDate: (time) => { @@ -947,6 +1010,14 @@ export default { currentSeriesIsReading: false, currentSeriesIsDeleted: false, imgObj: { url: '', visible: false, loading: false }, + userRoleList: [], + assignObj: { visible: false, loading: false }, + assignForm: { ReplaceUserRoleId: null }, + assignRules: { + ReplaceUserRoleId: [ + { required: true, message: this.$t("common:ruleMessage:select"), trigger: 'change' } + ] + }, open: null, existsManual: false, @@ -961,6 +1032,11 @@ export default { selectTableDicom: [], // 选中的dicom数据 selectTableNonedicom: [], // 选中的非dicom数据 downloadId: null, + + secondReviewList: [], + secondReviewActiveName: null, + SecondReviewTime: '', + IsSecondPass: false } }, async mounted() { @@ -969,10 +1045,10 @@ export default { this.isAudit = true this.currentQCType = this.qType } else { - this.currentQCType = this.data.AuditState < 6 ? 1 : 2 + this.currentQCType = this.data.QCProcessEnum === 2 && this.data.PreliminaryAuditUserId ? 2 : 1 + } window.addEventListener('message', this.receiveMsg) - this.trialId = this.$route.query.trialId this.getQCInfo() this.getDicData() @@ -1009,7 +1085,6 @@ export default { ) } if (type === 'noneDicom') { - console.log(this.selectTableNonedicom) data.NoneDicomStudyIdList = this.selectTableNonedicom.map( (item) => item.Id ) @@ -1126,6 +1201,14 @@ export default { this.loading = true getVisitQCInfo(this.data.Id, this.data.QCProcessEnum, this.currentQCType) .then((res) => { + this.secondReviewList = res.Result.SecondReviewList + if (this.secondReviewList.length > 0) { + let data = this.secondReviewList.find(item => item.SignTime) || {} + this.secondReviewActiveName = data.SecondReviewTime + if (!this.isAudit) { + this.SecondReviewTime = this.secondReviewList[0].SecondReviewTime + } + } this.existsManual = res.Result.ExistsManual this.qCQuestionAnswerList = res.Result.QCQuestionAnswerList this.IsHaveStudyClinicalData = res.Result.IsHaveStudyClinicalData @@ -1159,7 +1242,8 @@ export default { res.Result.RelationInfo.IsHaveFirstGiveMedicineDate this.loading = false }) - .catch(() => { + .catch((err) => { + console.log(err) this.loading = false }) }, @@ -1170,7 +1254,7 @@ export default { this.trialId, this.data.Id, this.data.QCProcessEnum, - this.currentQCType + this.SecondReviewState > 0 ? 3 : this.currentQCType ) .then((res) => { this.loading = false @@ -1183,24 +1267,74 @@ export default { this.loading = false }) }, + // 指派 + async handleAssign() { + try { + let params = { + TrialId: this.data.TrialId, + UserTypeEnum: 3, + SubjectVisitId: this.data.Id + } + let res = await getTrialUserRoleList(params) + if (res.IsSuccess) { + this.userRoleList = res.Result + this.assignObj.visible = true + } + } catch (err) { + console.log(err) + } + }, + async assign() { + try { + let validate = await this.$refs.assignForm.validate() + if (!validate) return false + let res = await replaceQCTaskActionUser(this.data.TrialId, this.data.Id, this.assignForm) + if (res.IsSuccess) { + this.$emit('getList') + this.assignObj.visible = false + this.$emit("close") + } + } catch (err) { + console.log(err) + if (err.Code === 5 && err.ErrorMessage) { + this.$confirm(err.ErrorMessage, { + type: 'warning', + showCancelButton: false, + callback: (action) => { }, + }) + this.$emit('getList') + } + } + }, // 保存审核问题 - handleSave(isMessage) { + handleSave(isMessage = false) { return new Promise(async (resolve) => { try { - let res = null + let res = null, refKey = 'questions' + if (this.SecondReviewState > 0) { + refKey += `_${this.SecondReviewTime}` + } if (isMessage) { - res = await this.$refs['questions'].submit() + res = await this.$refs[refKey].submit() } else { - res = await this.$refs['questions'].save() + res = await this.$refs[refKey].save() } var answerList = [] res.forEach((item) => { - var index = this.qCQuestionAnswerList.findIndex( - (v) => v.TrialQCQuestionConfigureId === item.Id - ) - if (index > -1) { + if (this.SecondReviewState <= 0) { + var index = this.qCQuestionAnswerList.findIndex( + (v) => v.TrialQCQuestionConfigureId === item.Id + ) + if (index > -1) { + answerList.push({ + id: this.qCQuestionAnswerList[index].Id, + answer: item.answer, + trialQCQuestionConfigureId: item.Id, + }) + } + } else { answerList.push({ - id: this.qCQuestionAnswerList[index].Id, + id: item.AnswerId, answer: item.answer, trialQCQuestionConfigureId: item.Id, }) @@ -1211,7 +1345,7 @@ export default { this.trialId, this.data.Id, this.data.QCProcessEnum, - this.currentQCType, + this.SecondReviewState > 0 ? 3 : this.currentQCType, answerList ) .then((res) => { @@ -1222,7 +1356,12 @@ export default { this.$t('common:message:savedSuccessfully') ) } - this.getCheckList() + if (this.SecondReviewState <= 0) { + this.getCheckList() + } else { + this.$refs[refKey].getQuestions() + } + resolve(true) } }) @@ -1647,6 +1786,22 @@ export default { this.loading = false }) }, + // 复核通过 + async handleResetSave() { + try { + this.loading = true + var isVerify = await this.handleSave(true) + if (!isVerify) { + return this.loading = false + } + this.IsSecondPass = true + const { ReviewImageQualityControlQuestion } = const_.processSignature + this.signCode = ReviewImageQualityControlQuestion + this.signVisible = true + } catch (err) { + this.loading = false + } + }, // 设置qc通过/不通过 async handleQCState(auditState) { if (auditState === 7) { @@ -1779,7 +1934,8 @@ export default { data: { TrialId: this.trialId, SubjectVisitId: this.data.Id, - AuditState: this.auditState, + AuditState: this.signCode === 219 ? 1 : this.auditState, + IsSecondPass: this.signCode === 219 ? this.IsSecondPass : null }, signInfo: signInfo, } @@ -1792,6 +1948,10 @@ export default { this.$message.success(this.$t('common:message:savedSuccessfully')) // this.getQCInfo() this.isAudit = true + if (this.signCode === 219) { + this.$emit('getList') + return this.getQCInfo() + } this.$forceUpdate() getNextIQCQuality({ trialId: this.trialId, @@ -1986,7 +2146,7 @@ export default { var token = getToken() const routeData = this.$router.resolve({ path: `/showvisitdicoms?trialId=${this.data.TrialId}&visitInfo=${this.data.VisitName - }(${this.data.VisitNum})&subjectVisitId=${this.data.Id}&showDelete=${this.isAudit ? 0 : 1 + }(${this.data.VisitNum})&subjectVisitId=${this.data.Id}&showDelete=${this.isAudit || this.SecondReviewState > 0 ? 0 : 1 }&TokenKey=${token}`, }) this.open = window.open(routeData.href, '_blank') @@ -2052,7 +2212,7 @@ export default { path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${this.data.Id}&TokenKey=${token}&isReading=1`, }) : this.$router.resolve({ - path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${this.data.Id}&TokenKey=${token}&isQcCheck=1`, + path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${this.data.Id}&TokenKey=${token}&isQcCheck=${this.SecondReviewState > 0 ? 0 : 1}`, }) this.open = window.open(routeData.href, '_blank') }, @@ -2064,7 +2224,7 @@ export default { let trialId = this.$route.query.trialId var token = getToken() const routeData = this.$router.resolve({ - path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${this.data.Id}&studyId=${row.Id}&TokenKey=${token}&isQcCheck=1`, + path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${this.data.Id}&studyId=${row.Id}&TokenKey=${token}&isQcCheck=${this.SecondReviewState > 0 ? 0 : 1}`, }) this.open = window.open(routeData.href, '_blank') }, diff --git a/src/views/trials/trials-panel/visit/qc-check/components/questions.vue b/src/views/trials/trials-panel/visit/qc-check/components/questions.vue index ebab7962..c6840abd 100644 --- a/src/views/trials/trials-panel/visit/qc-check/components/questions.vue +++ b/src/views/trials/trials-panel/visit/qc-check/components/questions.vue @@ -37,6 +37,10 @@ export default { isAudit: { type: Boolean, default: false + }, + SecondReviewTime: { + type: String, + default: '' } }, data() { @@ -44,9 +48,17 @@ export default { loading: false, questions: [], questionForm: {}, + AnswerIdObj: {}, isRender: false } }, + watch: { + SecondReviewTime() { + if (this.SecondReviewTime) { + this.getQuestions() + } + } + }, mounted() { this.getQuestions() }, @@ -54,14 +66,18 @@ export default { getQuestions() { this.loading = true var param = { - trialId: this.trialId, + trialId: this.trialId || this.$route.query.trialId, subjectVisitId: this.subjectVisitId, qcProcessEnum: this.qcProcessEnum, - currentQCEnum: this.currentQCEnum + currentQCEnum: this.SecondReviewTime ? 3 : this.currentQCEnum + } + if (this.SecondReviewTime) { + param.SecondReviewTime = this.SecondReviewTime } getQCQuestionAnswer(param).then(res => { res.Result.map((v) => { this.$set(this.questionForm, v.Id, v.Answer) + this.$set(this.AnswerIdObj, v.Id, v.AnswerId) if (v.Childrens.length > 0) { this.setChild(v.Childrens) } @@ -70,11 +86,12 @@ export default { this.isRender = true this.loading = false - }).catch(() => { this.loading = false }) + }).catch((err) => { console.log(err); this.loading = false }) }, setChild(obj) { obj.forEach(i => { this.$set(this.questionForm, i.Id, i.Answer) + this.$set(this.AnswerIdObj, i.Id, i.AnswerId) if (i.Childrens && i.Childrens.length > 0) { this.setChild(i.Childrens) } @@ -87,7 +104,11 @@ export default { return new Promise((resolve, reject) => { this.$refs['questionForm'].validate(valid => { if (!valid) { - this.$confirm(this.$t('trials:audit:message:specifyQuestions'), { + let message = this.$t('trials:audit:message:specifyQuestions') + if (this.SecondReviewTime) { + message = this.$t('trials:audit:message:specifyResetQuestions') + } + this.$confirm(message, { type: 'warning', showCancelButton: false, callback: action => { } @@ -96,7 +117,7 @@ export default { } else { var answers = [] for (const k in this.questionForm) { - answers.push({ Id: k, answer: this.questionForm[k] }) + answers.push({ Id: k, answer: this.questionForm[k], AnswerId: this.AnswerIdObj[k] }) } resolve(answers) // 设置当前节点的Answer @@ -114,7 +135,7 @@ export default { return new Promise((resolve, reject) => { var answers = [] for (const k in this.questionForm) { - answers.push({ Id: k, answer: this.questionForm[k] }) + answers.push({ Id: k, answer: this.questionForm[k], AnswerId: this.AnswerIdObj[k] }) } resolve(answers) }) diff --git a/src/views/trials/trials-panel/visit/qc-check/index.vue b/src/views/trials/trials-panel/visit/qc-check/index.vue index 898ab5e1..fec68e10 100644 --- a/src/views/trials/trials-panel/visit/qc-check/index.vue +++ b/src/views/trials/trials-panel/visit/qc-check/index.vue @@ -339,11 +339,17 @@ 'trials:trials-panel:visit:qc-check:receive', 'trials:trials-panel:visit:qc-check:release', 'trials:trials-panel:visit:qc-check:audit', - 'trials:trials-panel:visit:qc-check:back' + 'trials:trials-panel:visit:qc-check:back', + 'trials:trials-panel:visit:qc-check:reviewTask' ]) - " :label="$t('common:action:action')" width="240" fixed="right"> + " :label="$t('common:action:action')" width="280" fixed="right">