From 986bce36e6e30d9204c16f0191c0157ebfe00a5c Mon Sep 17 00:00:00 2001 From: "DESKTOP-6C3NK6N\\WXS" <815034831@qq.com> Date: Thu, 12 Sep 2024 14:22:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E3=80=81=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8F=90=E7=A4=BA=EF=BC=9B=E9=9D=9Edicom?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=8A=E4=BC=A0=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../downloadDicomAndNonedicom/index.vue | 12 + .../uploadDicomAndNonedicom/dicomFile.vue | 70 +- .../uploadDicomAndNonedicom/nonedicomFile.vue | 78 +- src/utils/stream.js | 111 +-- .../components/uploadNonDicomFiles.vue | 60 +- .../trials-panel/visit/crc-upload/index.vue | 762 +++++++++--------- .../qc-check/components/qualityAssurance.vue | 18 +- 7 files changed, 650 insertions(+), 461 deletions(-) diff --git a/src/components/downloadDicomAndNonedicom/index.vue b/src/components/downloadDicomAndNonedicom/index.vue index f42a584e..dc888cdc 100644 --- a/src/components/downloadDicomAndNonedicom/index.vue +++ b/src/components/downloadDicomAndNonedicom/index.vue @@ -37,6 +37,10 @@ +
+ +
+
\ No newline at end of file diff --git a/src/components/uploadDicomAndNonedicom/dicomFile.vue b/src/components/uploadDicomAndNonedicom/dicomFile.vue index 333f21dc..d439231f 100644 --- a/src/components/uploadDicomAndNonedicom/dicomFile.vue +++ b/src/components/uploadDicomAndNonedicom/dicomFile.vue @@ -1,32 +1,10 @@ -
+
{{ $t('upload:dicom:uploadTitle') }} - {{ $store.state.trials.uploadTip }} +
+ + {{ $store.state.trials.uploadTip }} + +
+
+ +
+
+
\ No newline at end of file diff --git a/src/components/uploadDicomAndNonedicom/nonedicomFile.vue b/src/components/uploadDicomAndNonedicom/nonedicomFile.vue index e6cb9311..7d734bc1 100644 --- a/src/components/uploadDicomAndNonedicom/nonedicomFile.vue +++ b/src/components/uploadDicomAndNonedicom/nonedicomFile.vue @@ -2,12 +2,16 @@
{{ $t('upload:nonedicom:title') }} +
+ +
+
item.id === arr[index].id)[0] file.status = 1 - console.log(file) let path = `/${this.$route.query.trialId}/TaskImage/${ this.currentRow.SubjectId }/${this.currentRow.VisitTaskId}/${this.$guid()}${file.name .substring(file.name.lastIndexOf('.')) .toLocaleLowerCase()}` - console.log(path) + file.curPath = path const fileData = await this.fileToBlob(file.file) let res = await this.fileToOss(path, fileData, file) - if (res) { + if (res && index <= 3) { file.status = 2 this.successFileList.push({ fileName: file.name, @@ -662,7 +666,8 @@ export default { }) let flag = arr.every((item) => item.status === 2) if (flag) { - return this.submitFile(this.successFileList) + let RecordPath = await this.uploadRecord(arr) + return this.submitFile(this.successFileList, RecordPath) } } else { file.status = 3 @@ -671,12 +676,14 @@ export default { if (flag) { let failFileList = arr.filter((item) => item.status === 3) if (failFileList && failFileList.length > 0) { + let RecordPath = await this.uploadRecord(arr) this.$refs.filesTable.clearSelection() failFileList.forEach((row) => { row.uploadFileSize = 0 this.$refs.filesTable.toggleRowSelection(row) }) this.isFail = true + this.submitFile(this.successFileList, RecordPath, true) return false } } @@ -714,7 +721,7 @@ export default { } }, // 非Dicom文件上传归档 - submitFile(uploadedFileList) { + submitFile(uploadedFileList, RecordPath, isReLoad = false) { if (!this.uploadVisible) return this.btnLoading = true var params = { @@ -725,9 +732,15 @@ export default { VisitTaskId: this.currentRow.VisitTaskId, uploadedFileList: uploadedFileList, } + if (RecordPath) { + params.RecordPath = RecordPath.path + params.FailedFileCount = RecordPath.Record.Failed.length + } uploadNoneDicomFile(params) .then((res) => { - this.resetFileDiaolg() + if (!isReLoad) { + this.resetFileDiaolg() + } this.getList() // 刷新父组件列表 this.$emit('getList') @@ -739,6 +752,49 @@ export default { this.btnLoading = false }) }, + // 上传提交记录 + uploadRecord(arr) { + return new Promise(async (resolve) => { + try { + let Record = { + Failed: [], + Existed: [], + Uploaded: [], + FileCount: arr.length, + } + arr.forEach((item) => { + let file = this.fileList.find((data) => data.id === item.id) + if (file.status === 2) { + Record.Uploaded.push(file.curPath) + } + if (file.status === 3) { + Record.Failed.push(file.curPath) + } + }) + let text = JSON.stringify(Record) + let logJsonBlob = this.generateTxtFile(text) + let logJsonObjectName = `/${this.$route.query.trialId}/TaskImage/${this.currentRow.SubjectId}/${this.currentRow.VisitTaskId}/${this.studyMonitorId}.txt` + let logRes + try { + logRes = await this.OSSclient.put(logJsonObjectName, logJsonBlob) + if (logRes && logRes.url) { + resolve({ path: this.$getObjectName(logRes.url), Record }) + } else { + resolve(false) + } + } catch (e) { + resolve(false) + } + } catch (err) { + console.log(err) + resolve(false) + } + }) + }, + generateTxtFile(text) { + let blob = new Blob(['\ufeff', text], { type: 'text/plain' }) + return blob + }, }, } @@ -785,4 +841,12 @@ export default { pointer-events: none; //pointer-events:none用来控制该标签的点击穿透事件 } } +.tip { + display: flex; + align-items: flex-start; + margin-top: 5px; + i { + margin: 3px 5px 0 0; + } +} \ No newline at end of file diff --git a/src/utils/stream.js b/src/utils/stream.js index 7f745ed2..8ee5c5aa 100644 --- a/src/utils/stream.js +++ b/src/utils/stream.js @@ -4,53 +4,74 @@ import store from '@/store' streamSaver.mitm = `${window.location.origin}/mitm.html?version=2.0.0` // 下载文件并压缩 function zipFiles(zipName, files) { - console.log("同步下载打包开始时间:" + new Date()); - store.dispatch('trials/setUnLock', true) - files = formatFiles(files) - // 创建压缩文件输出流 - const zipFileOutputStream = streamSaver.createWriteStream(zipName); - // 创建下载文件流 - const fileIterator = files.values(); - const readableZipStream = new ZIP({ - async pull(ctrl) { - const fileInfo = fileIterator.next(); - if (fileInfo.done) {//迭代终止 - ctrl.close(); - } else { - let { name, url } = fileInfo.value; - url = decodeUtf8(url); - return fetch(url).then(res => { - ctrl.enqueue({ - name, - stream: () => res.body - }); - }) - } - } - }); - if (window.WritableStream && readableZipStream.pipeTo) { - // 开始下载 - readableZipStream - .pipeTo(zipFileOutputStream) - .then(() => { - console.log("同步下载打包结束时间:" + new Date()); - store.dispatch('trials/setUnLock', false) + return new Promise((resolve) => { + try { + console.log("同步下载打包开始时间:" + new Date()); + store.dispatch('trials/setUnLock', true) + files = formatFiles(files) + // 创建压缩文件输出流 + const zipFileOutputStream = streamSaver.createWriteStream(zipName); + // 创建下载文件流 + const fileIterator = files.values(); + const readableZipStream = new ZIP({ + async pull(ctrl) { + const fileInfo = fileIterator.next(); + if (fileInfo.done) {//迭代终止 + ctrl.close(); + } else { + let { name, url } = fileInfo.value; + url = decodeUtf8(url); + return fetch(url).then(res => { + ctrl.enqueue({ + name, + stream: () => res.body + }); + }) + } + } }); - } + if (window.WritableStream && readableZipStream.pipeTo) { + // 开始下载 + readableZipStream + .pipeTo(zipFileOutputStream) + .then(() => { + console.log("同步下载打包结束时间:" + new Date()); + store.dispatch('trials/setUnLock', false) + resolve(true) + }).catch(err => { + console.log(err); + resolve(false) + }); + } else { + resolve(false) + } + } catch (err) { + console.log(err); + resolve(false) + } + }) + } // 下载文件并修改名称 async function updateFile(file, name) { - try { - store.dispatch('trials/setUnLock', true) - const fileOutputStream = streamSaver.createWriteStream(name); - file = decodeUtf8(file); - let res = await fetch(file); - res.body.pipeTo(fileOutputStream).then(() => { + return new Promise(async resolve => { + try { store.dispatch('trials/setUnLock', true) - }); - } catch (err) { - console.log(err) - } + const fileOutputStream = streamSaver.createWriteStream(name); + file = decodeUtf8(file); + let res = await fetch(file); + res.body.pipeTo(fileOutputStream).then(() => { + store.dispatch('trials/setUnLock', true) + resolve(true) + }).catch(err => { + console.log(err) + resolve(false) + }); + } catch (err) { + console.log(err) + resolve(false) + } + }) } // 同名文件修改名称 function formatFiles(files) { @@ -78,8 +99,8 @@ function decodeUtf8(bytes) { str2.pop(); return str2.join("/") + '/' + name; } -export function downLoadFile(file, name, type = 'file') { - if (type === 'zip') return zipFiles(name, file); - return updateFile(file, name) +export async function downLoadFile(file, name, type = 'file') { + if (type === 'zip') return await zipFiles(name, file); + return await updateFile(file, name) } \ No newline at end of file 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 1a042dcb..5e6e0137 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 @@ -928,6 +928,7 @@ export default { let res = await preArchiveStudy({ subjectVisitId: this.subjectVisitId, isDicom: false, + FileCount: this.selectArr.length, }) if (res.IsSuccess) { this.studyMonitorId = res.Result @@ -952,6 +953,7 @@ export default { }/${this.$guid()}${file.name .substring(file.name.lastIndexOf('.')) .toLocaleLowerCase()}` + file.curPath = path const fileData = await this.fileToBlob(file.file) let res = await this.fileToOss(path, fileData, file) if (res) { @@ -964,7 +966,8 @@ export default { }) let flag = arr.every((item) => item.status === 2) if (flag) { - return this.submitFile(this.successFileList) + let RecordPath = await this.uploadRecord(arr) + return this.submitFile(this.successFileList, RecordPath) } } else { file.status = 3 @@ -973,12 +976,14 @@ export default { if (flag) { let failFileList = arr.filter((item) => item.status === 3) if (failFileList && failFileList.length > 0) { + let RecordPath = await this.uploadRecord(arr) this.$refs.filesTable.clearSelection() failFileList.forEach((row) => { row.uploadFileSize = 0 this.$refs.filesTable.toggleRowSelection(row) }) this.isFail = true + this.submitFile(this.successFileList, RecordPath, true) return false } } @@ -1016,7 +1021,7 @@ export default { } }, // 非Dicom文件上传归档 - submitFile(uploadedFileList) { + submitFile(uploadedFileList, RecordPath, isReLoad = false) { if (!this.uploadVisible) return this.btnLoading = true var params = { @@ -1026,9 +1031,15 @@ export default { studyMonitorId: this.studyMonitorId, uploadedFileList: uploadedFileList, } + if (RecordPath) { + params.RecordPath = RecordPath.path + params.FailedFileCount = RecordPath.Record.Failed.length + } uploadNoneDicomFile(params) .then((res) => { - this.resetFileDiaolg() + if (!isReLoad) { + this.resetFileDiaolg() + } this.getNoneDicomList() // 刷新父组件列表 this.$emit('getList') @@ -1040,6 +1051,49 @@ export default { this.btnLoading = false }) }, + // 上传提交记录 + uploadRecord(arr) { + return new Promise(async (resolve) => { + try { + let Record = { + Failed: [], + Existed: [], + Uploaded: [], + FileCount: arr.length, + } + arr.forEach((item) => { + let file = this.fileList.find((data) => data.id === item.id) + if (file.status === 2) { + Record.Uploaded.push(file.curPath) + } + if (file.status === 3) { + Record.Failed.push(file.curPath) + } + }) + let text = JSON.stringify(Record) + let logJsonBlob = this.generateTxtFile(text) + let logJsonObjectName = `/${this.trialId}/Image/${this.data.SubjectId}/${this.data.Id}/${this.studyMonitorId}.txt` + let logRes + try { + logRes = await this.OSSclient.put(logJsonObjectName, logJsonBlob) + if (logRes && logRes.url) { + resolve({ path: this.$getObjectName(logRes.url), Record }) + } else { + resolve(false) + } + } catch (e) { + resolve(false) + } + } catch (err) { + console.log(err) + resolve(false) + } + }) + }, + generateTxtFile(text) { + let blob = new Blob(['\ufeff', text], { type: 'text/plain' }) + return blob + }, resetFileDiaolg() { this.btnLoading = false this.uploadVisible = false diff --git a/src/views/trials/trials-panel/visit/crc-upload/index.vue b/src/views/trials/trials-panel/visit/crc-upload/index.vue index adfbcf59..12c2cd8f 100644 --- a/src/views/trials/trials-panel/visit/crc-upload/index.vue +++ b/src/views/trials/trials-panel/visit/crc-upload/index.vue @@ -127,7 +127,7 @@ - {{ $t("common:button:search") }} + {{ $t('common:button:search') }} - {{ $t("common:button:reset") }} + {{ $t('common:button:reset') }} - {{ $t("common:button:export") }} + {{ $t('common:button:export') }} - {{ $t("trials:crcUpload:button:submit") }} + {{ $t('trials:crcUpload:button:submit') }} - {{ $t("trials:crcUpload:button:add") }} + {{ $t('trials:crcUpload:button:add') }} @@ -235,10 +235,10 @@ > @@ -265,7 +265,7 @@ v-if="scope.row.SubjectFirstGiveMedicineTime" class="status-primary-circle" > - {{ $t("trials:crcUpload:label:firstGiveMedicineTime") }} + {{ $t('trials:crcUpload:label:firstGiveMedicineTime') }} @@ -288,22 +288,22 @@ {{ scope.row.VisitName }} - {{ $t("trials:crcUpload:label:pd") }} + {{ $t('trials:crcUpload:label:pd') }} - {{ $t("trials:crcUpload:label:lostVisit") }} + {{ $t('trials:crcUpload:label:lostVisit') }} - {{ $t("trials:crcUpload:label:finalVisit") }} + {{ $t('trials:crcUpload:label:finalVisit') }} - {{ $t("trials:crcUpload:label:enrollmentConfirm") }} + {{ $t('trials:crcUpload:label:enrollmentConfirm') }} @@ -319,7 +319,7 @@
{{ $t("trials:crcUpload:label:dicom") }}: + >{{ $t('trials:crcUpload:label:dicom') }}: {{ scope.row.DicomStudyCount }}, {{ $t("trials:crcUpload:label:noneDicom") }}: + >{{ $t('trials:crcUpload:label:noneDicom') }}: {{ scope.row.NoneDicomStudyCount }}, {{ $t("trials:crcUpload:label:clinicalData") }}: - {{ scope.row.IsHaveClinicalData ? "w/" : "w/o" }}{{ $t('trials:crcUpload:label:clinicalData') }}: + {{ scope.row.IsHaveClinicalData ? 'w/' : 'w/o' }} {{ $t("trials:crcUpload:label:noneDicom") }}: + >{{ $t('trials:crcUpload:label:noneDicom') }}: {{ scope.row.NoneDicomStudyCount }}
@@ -349,12 +349,12 @@ ? [ scope.row.DicomStudyCount, scope.row.NoneDicomStudyCount, - scope.row.IsHaveClinicalData ? "w/" : "w/o", - ].join(", ") + scope.row.IsHaveClinicalData ? 'w/' : 'w/o', + ].join(', ') : [ scope.row.DicomStudyCount, scope.row.NoneDicomStudyCount, - ].join(", ") + ].join(', ') }} @@ -371,8 +371,8 @@ @@ -387,8 +387,8 @@ @@ -402,13 +402,13 @@ > @@ -431,41 +431,41 @@ @@ -577,28 +577,28 @@ - {{ $t("trials:crcUpload:label:firstGiveMedicineTime") }} + {{ $t('trials:crcUpload:label:firstGiveMedicineTime') }} - : {{ $t("trials:crcUpload:label:firstGiveMedicineTimeD") }} + : {{ $t('trials:crcUpload:label:firstGiveMedicineTimeD') }} - {{ $t("trials:crcUpload:label:finalVisit") }} + {{ $t('trials:crcUpload:label:finalVisit') }} - : {{ $t("trials:crcUpload:label:finalVisitDetail") }} + : {{ $t('trials:crcUpload:label:finalVisitDetail') }} - {{ $t("trials:crcUpload:label:lostVisit") }} + {{ $t('trials:crcUpload:label:lostVisit') }} - : {{ $t("trials:crcUpload:label:lostVisitDetail") }} + : {{ $t('trials:crcUpload:label:lostVisitDetail') }} - {{ $t("trials:crcUpload:label:pd") }} + {{ $t('trials:crcUpload:label:pd') }} - : {{ $t("trials:crcUpload:label:pdDetail") }} + : {{ $t('trials:crcUpload:label:pdDetail') }} - {{ $t("trials:crcUpload:label:enrollmentConfirm") }} + {{ $t('trials:crcUpload:label:enrollmentConfirm') }} - : {{ $t("trials:crcUpload:label:enrollmentConfirmDetail") }} + : {{ $t('trials:crcUpload:label:enrollmentConfirmDetail') }}
- {{ $t("common:button:edit") }} + {{ $t('common:button:edit') }} +
+ +
+
-

{{ $t("trials:crcUpload:label:dicom") }}

+

{{ $t('trials:crcUpload:label:dicom') }}

- {{ $t("trials:crcUpload:label:noneDicom") }} + {{ $t('trials:crcUpload:label:noneDicom') }}

- {{ $t("trials:crcUpload:label:clinicalData") }} + {{ $t('trials:crcUpload:label:clinicalData') }} - {{ $t("trials:crcUpload:label:clinicalData") }} + {{ $t('trials:crcUpload:label:clinicalData') }} - {{ $t("common:button:cancel") }} + {{ $t('common:button:cancel') }} - {{ $t("common:button:save") }} + {{ $t('common:button:save') }}
@@ -1056,9 +1060,9 @@ custom-class="base-dialog-wrapper" >
- {{ $t("common:dialogTitle:sign") }} + {{ $t('common:dialogTitle:sign') }} {{ - `(${$t("common:label:sign")}${currentUser})` + `(${$t('common:label:sign')}${currentUser})` }}
{{ - $t("trials:crcUpload:dialogTitle:edit") + $t('trials:crcUpload:dialogTitle:edit') }}
- {{ $t("trials:crcUpload:message:baseDate") }} + {{ $t('trials:crcUpload:message:baseDate') }}
@@ -1174,7 +1178,7 @@ :limit.sync="clinicalPage.PageSize" @pagination=" () => { - handleUpload(subjectRowData); + handleUpload(subjectRowData) } " /> @@ -1214,7 +1218,7 @@ show-overflow-tooltip > @@ -1340,7 +1344,7 @@ }" @click="selectCheckDate(date)" > - {{ date.CheckDate.split(" ")[0] }} + {{ date.CheckDate.split(' ')[0] }} @@ -1369,11 +1373,11 @@ > - {{ $t("common:button:cancel") }} + {{ $t('common:button:cancel') }} - {{ $t("common:button:confirm") }} + {{ $t('common:button:confirm') }} @@ -1399,9 +1403,9 @@ :clinical-upload-type="clinicalUploadType" :Clinical-data-level="rowData.ClinicalDataLevel" @close=" - preview.visible = false; - handleUpload(subjectRowData); - handleView(formRow, true); + preview.visible = false + handleUpload(subjectRowData) + handleView(formRow, true) " /> @@ -1467,42 +1471,39 @@ import { verifyCRCRequestToQC, deleteSubjectVisit, updateSubjectAndSVInfo, - getImageClinicalDataToBeDoneList, getTrialCriterionList, getCRCSubjectClinicalList, deleteClinicalForm, getCRCConfirmList, - getCRCBeConfirmList, cRCConfirmClinical, cRCCancelConfirmClinical, getClinicalTableList, getClinicalDateList, -} from "@/api/trials"; -import { cRCRequestToQC } from "@/api/trials/visit"; -import { cRCVisitList_Export } from "@/api/export"; -import BaseContainer from "@/components/BaseContainer"; -import Pagination from "@/components/Pagination"; -import VisitForm from "./components/visitForm"; -import UploadDicomFiles from "./components/uploadDicomFiles"; -import UploadDicomFiles2 from "./components/uploadDicomFiles2"; -import UploadNonDicomFiles from "./components/uploadNonDicomFiles"; -import UploadClinicalData from "./components/uploadClinicalData"; -import HistoryChat from "./components/historyChat"; -import StudyInfo from "./components/studyInfo"; -import SubjectsForm from "./components/SubjectsForm"; -import SignForm from "@/views/trials/components/newSignForm"; -import BaseModel from "@/components/BaseModel"; -import dicomStore from "@/utils/dicom-store"; -import { getClinicalQuestionFormList } from "@/api/dictionary"; -import moment from "moment"; -import const_ from "@/const/sign-code"; -import { changeURLStatic } from "@/utils/history.js"; -import { getToken } from "@/utils/auth"; -import clinicalDataQuestions from "@/components/clinicalDataQuestions"; +} from '@/api/trials' +import { cRCRequestToQC } from '@/api/trials/visit' +import { cRCVisitList_Export } from '@/api/export' +import BaseContainer from '@/components/BaseContainer' +import Pagination from '@/components/Pagination' +import VisitForm from './components/visitForm' +import UploadDicomFiles from './components/uploadDicomFiles' +import UploadDicomFiles2 from './components/uploadDicomFiles2' +import UploadNonDicomFiles from './components/uploadNonDicomFiles' +import UploadClinicalData from './components/uploadClinicalData' +import HistoryChat from './components/historyChat' +import StudyInfo from './components/studyInfo' +import SubjectsForm from './components/SubjectsForm' +import SignForm from '@/views/trials/components/newSignForm' +import BaseModel from '@/components/BaseModel' +import dicomStore from '@/utils/dicom-store' +import { getClinicalQuestionFormList } from '@/api/dictionary' +import moment from 'moment' +import const_ from '@/const/sign-code' +import { changeURLStatic } from '@/utils/history.js' +import clinicalDataQuestions from '@/components/clinicalDataQuestions' const searchDataDefault = () => { return { - SubjectInfo: "", - TrialSiteId: "", + SubjectInfo: '', + TrialSiteId: '', PageIndex: 1, PageSize: 20, VisitPlanArray: [], @@ -1511,10 +1512,10 @@ const searchDataDefault = () => { ChallengeState: null, // SortField: '', // Asc: false - }; -}; + } +} export default { - name: "VisitList", + name: 'VisitList', components: { clinicalDataQuestions, BaseContainer, @@ -1532,7 +1533,7 @@ export default { }, data() { return { - edit_cfg: { visible: false, title: "", width: "600px", showClose: true }, + edit_cfg: { visible: false, title: '', width: '600px', showClose: true }, SubjectVisible: false, formRow: {}, searchData: searchDataDefault(), @@ -1545,25 +1546,25 @@ export default { visitPlanOptions: [], rowData: {}, moment, - activeName: "dicom", + activeName: 'dicom', studyVisible: false, studyLoading: false, studyList: [], deleteArr: [], - currentVisitId: "", + currentVisitId: '', urgentForm: { isUrgent: null }, btnLoading: false, - chat_cfg: { visible: false, title: "", width: "1000px", showClose: true }, + chat_cfg: { visible: false, title: '', width: '1000px', showClose: true }, relationVisible: false, otherInfo: {}, SubjectInfo: {}, selectArr: [], signVisible: false, signCode: null, - currentUser: zzSessionStorage.getItem("userName"), + currentUser: zzSessionStorage.getItem('userName'), pickerOption: { disabledDate: (time) => { - return time.getTime() > Date.now(); + return time.getTime() > Date.now() }, }, trialId: this.$route.query.trialId, @@ -1585,17 +1586,17 @@ export default { pos2: 0, spanArr2: 0, confirmData: [], - preview: { visible: false, title: "临床数据自定义问题" }, - preview2: { visible: false, title: "已上传临床数据列表" }, - openType: "look", + preview: { visible: false, title: '临床数据自定义问题' }, + preview2: { visible: false, title: '已上传临床数据列表' }, + openType: 'look', formListData: {}, confirmVisible: false, subjectRowData: {}, beConfirmList: [], cdList: [], trialCriterionList: [], - TrialReadingCriterionId: "0", - confirmType: "look", + TrialReadingCriterionId: '0', + confirmType: 'look', confirmPageTotal: 0, clinicalPageTotal: 0, clinicalPage: { @@ -1608,65 +1609,65 @@ export default { }, TrialReadingCriterionName: null, TrialCode: null, - }; + } }, watch: { list() { this.$nextTick(() => { - this.$refs.visitList.doLayout(); - }); + this.$refs.visitList.doLayout() + }) }, TrialReadingCriterionId(v, old) { - if (v === "0") return; - if (old === "0" || old === null) { - this.handleUpload2(this.subjectRowData, true); + if (v === '0') return + if (old === '0' || old === null) { + this.handleUpload2(this.subjectRowData, true) } else { - this.handleUpload2(this.subjectRowData); + this.handleUpload2(this.subjectRowData) } // if (v === '0') return this.TrialReadingCriterionName = this.trialCriterionList.find( (o) => v === o.TrialReadingCriterionId - ).TrialReadingCriterionName; + ).TrialReadingCriterionName // this.handleUpload2(this.subjectRowData) }, uploadVisible() { if (!this.uploadVisible) { - this.$store.state.trials.checkTaskId = null; + this.$store.state.trials.checkTaskId = null } }, }, mounted() { - this.getSite(); + this.getSite() if (this.$route.query.subjectCode) { - this.searchData.SubjectInfo = this.$route.query.subjectCode; + this.searchData.SubjectInfo = this.$route.query.subjectCode } - changeURLStatic("subjectCode", ""); - this.TrialCode = this.$route.query.trialCode; - this.getList(); - this.getVisitPlanOptions(); - this.getTrialCriterionList(); + changeURLStatic('subjectCode', '') + this.TrialCode = this.$route.query.trialCode + this.getList() + this.getVisitPlanOptions() + this.getTrialCriterionList() }, methods: { selectCheckDate(date) { - this.isShow = false; - this.selected.ClinicalFormId = date.ClinicalFormId; - this.selected.ClinicalDataTrialSetId = date.ClinicalDataTrialSetId; - this.selected.TrialId = this.subjectRowData.TrialId; - this.selected.SubjectId = this.subjectRowData.SubjectId; + this.isShow = false + this.selected.ClinicalFormId = date.ClinicalFormId + this.selected.ClinicalDataTrialSetId = date.ClinicalDataTrialSetId + this.selected.TrialId = this.subjectRowData.TrialId + this.selected.SubjectId = this.subjectRowData.SubjectId this.$nextTick(() => { - this.isShow = true; - }); + this.isShow = true + }) }, getTrialCriterionList(row) { - this.TrialReadingCriterionId = "0"; + this.TrialReadingCriterionId = '0' getTrialCriterionList(this.trialId, false) .then(async (res) => { - this.trialCriterionList = res.Result; + this.trialCriterionList = res.Result this.TrialReadingCriterionId = - this.trialCriterionList[0].TrialReadingCriterionId; + this.trialCriterionList[0].TrialReadingCriterionId // this.handleUpload2(this.subjectRowData) }) - .catch(() => {}); + .catch(() => {}) }, confirmClinicalData() { cRCConfirmClinical({ @@ -1674,120 +1675,120 @@ export default { SubjectId: this.rowData.SubjectId, ReadModuleId: this.rowData.ReadModuleId, }).then((res) => { - this.$message.success("确认成功"); - this.handleUpload2(this.subjectRowData); - this.confirmVisible = false; - }); + this.$message.success('确认成功') + this.handleUpload2(this.subjectRowData) + this.confirmVisible = false + }) }, handleUnConfirm(row) { - this.rowData = { ...row }; - this.$confirm("确定撤销确认吗?").then((res) => { + this.rowData = { ...row } + this.$confirm('确定撤销确认吗?').then((res) => { cRCCancelConfirmClinical({ TrialId: this.subjectRowData.TrialId, ReadModuleId: row.ReadModuleId, }).then((res) => { - this.$message.success("撤销成功"); - this.handleUpload2(this.subjectRowData); - }); - }); + this.$message.success('撤销成功') + this.handleUpload2(this.subjectRowData) + }) + }) }, getCRCBeConfirmList(row, type) { - this.rowData = { ...row }; - this.confirmVisible = true; - this.confirmType = type; - this.IsHaveTableQuestion = this.rowData.IsHaveTableQuestion; + this.rowData = { ...row } + this.confirmVisible = true + this.confirmType = type + this.IsHaveTableQuestion = this.rowData.IsHaveTableQuestion if (!this.rowData.IsHaveTableQuestion) { getClinicalTableList({ TrialId: this.subjectRowData.TrialId, ReadModuleId: row.ReadModuleId, }).then((res) => { - this.beConfirmList = res.Result; - }); + this.beConfirmList = res.Result + }) } else { getClinicalDateList({ TrialId: this.subjectRowData.TrialId, ReadModuleId: row.ReadModuleId, }).then((res) => { - this.cdList = res.Result; + this.cdList = res.Result this.selected.ClinicalFormId = - this.cdList[0].DateList[0].ClinicalFormId; + this.cdList[0].DateList[0].ClinicalFormId this.selected.ClinicalDataTrialSetId = - this.cdList[0].DateList[0].ClinicalDataTrialSetId; - this.selected.TrialId = this.subjectRowData.TrialId; - this.selected.SubjectId = this.subjectRowData.SubjectId; - this.isShow = true; - console.log(res); - }); + this.cdList[0].DateList[0].ClinicalDataTrialSetId + this.selected.TrialId = this.subjectRowData.TrialId + this.selected.SubjectId = this.subjectRowData.SubjectId + this.isShow = true + console.log(res) + }) } }, handleView2(row) { - console.log(row); - this.rowData = { ...row }; - this.openType = "look"; - this.preview.visible = true; + console.log(row) + this.rowData = { ...row } + this.openType = 'look' + this.preview.visible = true }, handleEdit2(row) { - this.rowData = { ...row }; - this.openType = "edit"; - this.preview.visible = true; + this.rowData = { ...row } + this.openType = 'edit' + this.preview.visible = true }, handleDelete2(row) { - this.$confirm("确定删除该条临床数据记录吗?").then(() => { - this.listLoading = true; + this.$confirm('确定删除该条临床数据记录吗?').then(() => { + this.listLoading = true deleteClinicalForm({ ClinicalFormId: row.ClinicalFormId, }).then((res) => { - this.$message.success("删除成功"); - this.listLoading = false; - this.handleView(row); - }); - }); + this.$message.success('删除成功') + this.listLoading = false + this.handleView(row) + }) + }) }, handleAdd2(row) { - this.rowData = { ...row }; - this.clinicalUploadType = this.rowData.ClinicalUploadType; - this.ReadingClinicalDataId = this.rowData.ReadingClinicalDataId; - this.preview.visible = true; - this.preview.title = `录入临床数据(${this.subjectRowData.TrialCode}|${this.rowData.SubjectCode})`; - this.openType = "add"; + this.rowData = { ...row } + this.clinicalUploadType = this.rowData.ClinicalUploadType + this.ReadingClinicalDataId = this.rowData.ReadingClinicalDataId + this.preview.visible = true + this.preview.title = `录入临床数据(${this.subjectRowData.TrialCode}|${this.rowData.SubjectCode})` + this.openType = 'add' }, goVisit(row) { this.$router.push({ path: `/trials/trials-panel/visit/crc-upload?trialId=${row.TrialId}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}`, - }); + }) }, handleView(row, isOpen) { - this.rowData = { ...row }; - this.formRow = { ...row }; - this.clinicalUploadType = this.rowData.ClinicalUploadType; - this.listLoading = true; + this.rowData = { ...row } + this.formRow = { ...row } + this.clinicalUploadType = this.rowData.ClinicalUploadType + this.listLoading = true getClinicalQuestionFormList({ TrialId: row.TrialId, SubjectId: row.SubjectId, ClinicalDataTrialSetId: row.ClinicalDataTrialSetId, }).then((res) => { if (!isOpen) { - this.preview2.visible = true; - this.preview2.title = `已上传临床数据列表(${this.TrialCode}|${this.rowData.SubjectCode})`; + this.preview2.visible = true + this.preview2.title = `已上传临床数据列表(${this.TrialCode}|${this.rowData.SubjectCode})` } - this.listLoading = false; - this.QuestionList = res.Result.QuestionList; - this.AnswerList = res.Result.AnswerList; - }); + this.listLoading = false + this.QuestionList = res.Result.QuestionList + this.AnswerList = res.Result.AnswerList + }) }, getSpanArr(data) { for (var i = 0; i < data.length; i++) { if (i === 0) { - this.spanArr.push(1); - this.pos = 0; + this.spanArr.push(1) + this.pos = 0 } else { // 判断当前元素与上一个元素是否相同 if (data[i].SubjectId === data[i - 1].SubjectId) { - this.spanArr[this.pos] += 1; - this.spanArr.push(0); + this.spanArr[this.pos] += 1 + this.spanArr.push(0) } else { - this.spanArr.push(1); - this.pos = i; + this.spanArr.push(1) + this.pos = i } } } @@ -1795,33 +1796,33 @@ export default { getSpanArr2(data) { for (var i = 0; i < data.length; i++) { if (i === 0) { - this.spanArr2.push(1); - this.pos2 = 0; + this.spanArr2.push(1) + this.pos2 = 0 } else { // 判断当前元素与上一个元素是否相同 if (data[i].SubjectId === data[i - 1].SubjectId) { - this.spanArr2[this.pos2] += 1; - this.spanArr2.push(0); + this.spanArr2[this.pos2] += 1 + this.spanArr2.push(0) } else { - this.spanArr2.push(1); - this.pos2 = i; + this.spanArr2.push(1) + this.pos2 = i } } } }, objectSpanMethod({ row, column, rowIndex, columnIndex }) { if (columnIndex === 0) { - const _row = this.spanArr[rowIndex]; - const _col = _row > 0 ? 1 : 0; + const _row = this.spanArr[rowIndex] + const _col = _row > 0 ? 1 : 0 return { rowspan: _row, colspan: _col, - }; + } } }, handleUpload2(row, old) { - this.listLoading = true; - this.rowData = { ...row }; + this.listLoading = true + this.rowData = { ...row } getCRCConfirmList({ TrialId: this.trialId, IsPMConfirm: false, @@ -1829,94 +1830,94 @@ export default { PageIndex: this.confirmPage.PageIndex, PageSize: this.confirmPage.PageSize, }).then((res) => { - this.spanArr2 = []; - this.pos2 = 0; + this.spanArr2 = [] + this.pos2 = 0 if (!old) { - this.configVisible = true; + this.configVisible = true } - this.confirmData = res.Result.CurrentPageData; - this.confirmPageTotal = res.Result.TotalCount; - this.getSpanArr2(this.confirmData); - this.listLoading = false; - }); + this.confirmData = res.Result.CurrentPageData + this.confirmPageTotal = res.Result.TotalCount + this.getSpanArr2(this.confirmData) + this.listLoading = false + }) }, handleUpload(row) { - this.listLoading = true; - this.rowData = { ...row }; - this.subjectRowData = { ...row }; + this.listLoading = true + this.rowData = { ...row } + this.subjectRowData = { ...row } getCRCSubjectClinicalList({ TrialId: this.trialId, PageIndex: this.clinicalPage.PageIndex, PageSize: this.clinicalPage.PageSize, }).then((res) => { - this.spanArr = []; - this.pos = 0; - this.configVisible = true; - this.clinicalData = res.Result.CurrentPageData; - this.clinicalPageTotal = res.Result.TotalCount; - this.getSpanArr(this.clinicalData); - this.listLoading = false; - }); - this.getTrialCriterionList(row); + this.spanArr = [] + this.pos = 0 + this.configVisible = true + this.clinicalData = res.Result.CurrentPageData + this.clinicalPageTotal = res.Result.TotalCount + this.getSpanArr(this.clinicalData) + this.listLoading = false + }) + this.getTrialCriterionList(row) }, handleExport() { cRCVisitList_Export(this.searchData) .then((res) => {}) .catch(() => { - this.loading = false; - }); + this.loading = false + }) }, // 获取访视计划列表 getList() { - this.loading = true; - this.searchData.TrialId = this.trialId; + this.loading = true + this.searchData.TrialId = this.trialId getCRCVisitList(this.searchData) .then((res) => { - this.loading = false; - this.list = res.Result.CurrentPageData; - this.total = res.Result.TotalCount; - this.otherInfo = res.OtherInfo; - console.log(this.otherInfo); + this.loading = false + this.list = res.Result.CurrentPageData + this.total = res.Result.TotalCount + this.otherInfo = res.OtherInfo + console.log(this.otherInfo) }) .catch(() => { - this.loading = false; - }); + this.loading = false + }) }, // 新建计划外的访视信息 handleAdd() { - this.rowData = {}; - this.edit_cfg.title = this.$t("trials:crcUpload:dialogTitle:new"); - this.edit_cfg.visible = true; + this.rowData = {} + this.edit_cfg.title = this.$t('trials:crcUpload:dialogTitle:new') + this.edit_cfg.visible = true }, // 编辑访视信息 handleEdit(row) { - this.rowData = row; - this.edit_cfg.title = this.$t("trials:crcUpload:dialogTitle:edit"); - this.edit_cfg.visible = true; + this.rowData = row + this.edit_cfg.title = this.$t('trials:crcUpload:dialogTitle:edit') + this.edit_cfg.visible = true }, closeEditDialog() { - this.edit_cfg.visible = false; + this.edit_cfg.visible = false }, // 上传Dicoms/非Dicoms文件 CRChandleUpload(row) { - dicomStore.studyList = []; - this.activeName = "dicom"; - this.rowData = { ...row }; - this.$store.state.trials.checkTaskId = row.Id; - this.uploadVisible = true; - this.uploadVisible2 = false; + dicomStore.studyList = [] + this.activeName = 'dicom' + this.rowData = { ...row } + this.$store.state.trials.checkTaskId = row.Id + this.uploadVisible = true + this.uploadVisible2 = false }, CRChandleUpload2(row) { - dicomStore.studyList = []; - this.activeName = "dicom"; - this.rowData = { ...row }; - this.$store.state.trials.checkTaskId = row.Id; - this.uploadVisible = true; - this.uploadVisible2 = true; + dicomStore.studyList = [] + this.activeName = 'dicom' + this.rowData = { ...row } + this.$store.state.trials.checkTaskId = row.Id + this.uploadVisible = true + this.uploadVisible2 = true }, // 将影像提交给QC handleSubmit(row) { - this.rowData = { ...row }; + this.rowData = { ...row } // if (row.IsBaseLine) { // if (this.otherInfo.ClinicalInformationTransmissionEnum > 0) { // const { ClinicalDataConfirmation } = const_.processSignature @@ -1927,317 +1928,316 @@ export default { // } // } else { // 校验是否可提交 - this.verifyIsAllowSubmit(); + this.verifyIsAllowSubmit() // } }, verifyIsAllowSubmit() { - this.loading = true; + this.loading = true var param = { trialId: this.trialId, subjectVisitIds: [this.rowData.Id], - }; + } verifyCRCRequestToQC(param) .then((res) => { - this.loading = false; + this.loading = false if (res.IsSuccess) { - let text = this.$t("trials:crcUpload:message:submit"); + let text = this.$t('trials:crcUpload:message:submit') if (this.rowData.IsHaveUploadFailed) { - text = `
${this.$t("trials:crcUpload:message:submit")}
`; + text = `
${this.$t('trials:crcUpload:message:submit')}
` } this.$confirm(text, { dangerouslyUseHTMLString: true, - type: "warning", + type: 'warning', distinguishCancelAndClose: true, }) .then(() => { if (this.rowData.IsBaseLine) { if (this.otherInfo.ClinicalInformationTransmissionEnum > 0) { - const { ClinicalDataConfirmation } = - const_.processSignature; - this.signCode = ClinicalDataConfirmation; - this.signVisible = true; + const { ClinicalDataConfirmation } = const_.processSignature + this.signCode = ClinicalDataConfirmation + this.signVisible = true } else { - this.submit(); + this.submit() } } else { - this.checkNeedSignAndSubmit(); + this.checkNeedSignAndSubmit() } }) - .catch(() => {}); + .catch(() => {}) } }) .catch((res) => { - this.loading = false; + this.loading = false if (res.Result === 1) { this.$confirm(res.ErrorMessage, { showCancelButton: false, showConfirmButton: false, - type: "warning", - }); + type: 'warning', + }) } else if (res.Result === 0) { this.$confirm(res.ErrorMessage, { distinguishCancelAndClose: true, - type: "warning", + type: 'warning', }) .then(() => { - this.checkNeedSignAndSubmit(); + this.checkNeedSignAndSubmit() }) - .catch(() => {}); + .catch(() => {}) } - }); + }) }, checkNeedSignAndSubmit() { if ( this.otherInfo.IsHaveFirstGiveMedicineDate && (this.rowData.SubjectFirstGiveMedicineTime === null || - this.rowData.SubjectFirstGiveMedicineTime === "") && + this.rowData.SubjectFirstGiveMedicineTime === '') && !this.rowData.IsBaseLine ) { - var item = Object.assign({}, this.rowData); - item.Code = this.rowData.SubjectCode; - item.Id = this.rowData.SubjectId; - this.SubjectInfo = item; - this.SubjectVisible = true; + var item = Object.assign({}, this.rowData) + item.Code = this.rowData.SubjectCode + item.Id = this.rowData.SubjectId + this.SubjectInfo = item + this.SubjectVisible = true } else { if ( this.otherInfo.ClinicalInformationTransmissionEnum > 0 && this.rowData.IsBaseLine ) { - const { ClinicalDataConfirmation } = const_.processSignature; - this.signCode = ClinicalDataConfirmation; - this.signVisible = true; + const { ClinicalDataConfirmation } = const_.processSignature + this.signCode = ClinicalDataConfirmation + this.signVisible = true } else { - this.submit(); + this.submit() } } }, submitFirstGiveMedicineTime(firstGiveMedicineTime) { - this.rowData.SubjectFirstGiveMedicineTime = firstGiveMedicineTime; - this.SubjectVisible = false; - this.checkNeedSignAndSubmit(); + this.rowData.SubjectFirstGiveMedicineTime = firstGiveMedicineTime + this.SubjectVisible = false + this.checkNeedSignAndSubmit() }, // 关闭签名框 closeSignDialog(isSign, signInfo) { if (isSign) { - this.submit(signInfo); + this.submit(signInfo) } else { - this.signVisible = false; + this.signVisible = false } }, submit(signInfo) { - this.loading = true; + this.loading = true var params = { data: { trialId: this.trialId, subjectVisitIds: [this.rowData.Id] }, - }; + } if (signInfo) { - params.signInfo = signInfo; + params.signInfo = signInfo } cRCRequestToQC(params) .then((res) => { - this.loading = false; + this.loading = false if (res.IsSuccess) { if (signInfo) { - this.$refs["signForm"].btnLoading = false; - this.signVisible = false; + this.$refs['signForm'].btnLoading = false + this.signVisible = false } - this.getList(); + this.getList() this.$message.success( - this.$t("trials:crcUpload:message:submittedSuccessfully") - ); + this.$t('trials:crcUpload:message:submittedSuccessfully') + ) } }) .catch((res) => { - this.loading = false; + this.loading = false if (res.Result === 3) { - this.getList(); - this.signVisible = false; + this.getList() + this.signVisible = false this.$confirm(res.ErrorMessage, { showCancelButton: false, showConfirmButton: true, - type: "warning", - }); + type: 'warning', + }) } else { if (signInfo) { - this.$refs["signForm"].btnLoading = false; + this.$refs['signForm'].btnLoading = false } } - }); + }) }, // 将影像批量提交给QC handleBulkSubmit() { - this.$confirm(this.$t("trials:crcUpload:message:bulkSubmit"), { - type: "warning", + this.$confirm(this.$t('trials:crcUpload:message:bulkSubmit'), { + type: 'warning', distinguishCancelAndClose: true, }) .then(() => { - this.loading = true; + this.loading = true var params = { data: { trialId: this.trialId, subjectVisitIds: this.selectArr }, - }; + } cRCRequestToQC(params) .then((res) => { if (res.IsSuccess) { - this.getList(); + this.getList() this.$message.success( - this.$t("trials:crcUpload:message:submittedSuccessfully") - ); + this.$t('trials:crcUpload:message:submittedSuccessfully') + ) } }) .catch((res) => { - this.loading = false; + this.loading = false if (res.Result === 3) { this.$confirm(res.ErrorMessage, { showCancelButton: false, showConfirmButton: true, - type: "warning", - }); + type: 'warning', + }) } - this.getList(); - }); + this.getList() + }) }) - .catch(() => {}); + .catch(() => {}) }, // 获取某个访视下的检查信息 handleOpenStudyDialog(row) { - this.studyVisible = true; - this.currentVisitId = row.Id; - this.rowData = { ...row }; + this.studyVisible = true + this.currentVisitId = row.Id + this.rowData = { ...row } }, // 关闭上传弹框 closeUpload() { - this.uploadVisible = false; - this.$store.state.trials.checkTaskId = null; + this.uploadVisible = false + this.$store.state.trials.checkTaskId = null if (this.openWindow) { - this.openWindow.close(); + this.openWindow.close() } }, // 打开历史质疑记录 handleOpenHistoryChat(row) { - this.rowData = { ...row }; + this.rowData = { ...row } this.chat_cfg.title = `${this.$t( - "trials:crcUpload:dialogTitle:qsRecord" - )} (${row.SubjectCode} ${row.VisitName})`; - this.chat_cfg.visible = true; + 'trials:crcUpload:dialogTitle:qsRecord' + )} (${row.SubjectCode} ${row.VisitName})` + this.chat_cfg.visible = true }, // 删除 handleDelete(row) { - this.$confirm(this.$t("trials:crcUpload:message:deleteVisit"), { - type: "warning", + this.$confirm(this.$t('trials:crcUpload:message:deleteVisit'), { + type: 'warning', distinguishCancelAndClose: true, }).then(() => { - this.loading = true; + this.loading = true deleteSubjectVisit(this.trialId, row.Id) .then((res) => { if (res.IsSuccess) { // this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) - this.getList(); + this.getList() this.$message.success( - this.$t("trials:crcUpload:message:deleteVisitSuccessfully") - ); + this.$t('trials:crcUpload:message:deleteVisitSuccessfully') + ) } - this.loading = false; + this.loading = false }) .catch(() => { - this.loading = false; - }); - }); + this.loading = false + }) + }) }, // 重置 handleReset() { - this.searchData = searchDataDefault(); - this.getList(); + this.searchData = searchDataDefault() + this.getList() }, closeSubjectVisible() { - this.SubjectVisible = false; + this.SubjectVisible = false }, // 查询 handleSearch() { - this.searchData.PageIndex = 1; - this.getList(); + this.searchData.PageIndex = 1 + this.getList() }, // 排序 handleSortByColumn(column) { - if (column.order === "ascending") { - this.searchData.Asc = true; + if (column.order === 'ascending') { + this.searchData.Asc = true } else { - this.searchData.Asc = false; + this.searchData.Asc = false } - this.searchData.SortField = column.prop; - this.searchData.PageIndex = 1; - this.getList(); + this.searchData.SortField = column.prop + this.searchData.PageIndex = 1 + this.getList() }, // 获取site下拉框数据 getSite() { getTrialSiteSelect(this.trialId).then((res) => { - this.siteOptions = res.Result; - }); + this.siteOptions = res.Result + }) }, // 获取访视下拉框数据 getVisitPlanOptions() { getTrialVisitStageSelect(this.trialId).then((res) => { - this.visitPlanOptions = res.Result; - }); + this.visitPlanOptions = res.Result + }) }, // 保存关联信息 saveRelationInfo() { - this.btnLoading = true; + this.btnLoading = true const param = { subjectVisitId: this.rowData.Id, subjectId: this.rowData.SubjectId, pdState: this.rowData.PDState, isEnrollmentConfirm: this.rowData.IsEnrollmentConfirm, subjectFirstGiveMedicineTime: this.rowData.SubjectFirstGiveMedicineTime, - }; + } updateSubjectAndSVInfo(this.trialId, param) .then((res) => { - this.btnLoading = false; - this.$message.success(this.$t("common:message:savedSuccessfully")); - this.relationVisible = false; - this.getList(); + this.btnLoading = false + this.$message.success(this.$t('common:message:savedSuccessfully')) + this.relationVisible = false + this.getList() }) .catch(() => { - this.btnLoading = false; - }); + this.btnLoading = false + }) }, // 通过提交状态决定该行的 CheckBox 是否可以勾选 handleSelectTable(row) { if (this.otherInfo.ClinicalInformationTransmissionEnum > 0) { return ( row.SubmitState === 1 && row.IsBaseLine === false && row.PDState === 0 - ); + ) } else { - return row.SubmitState === 1 && row.PDState === 1; // 待提交 + return row.SubmitState === 1 && row.PDState === 1 // 待提交 } }, // 当选择项发生变化时会触发该事件 handleSelectionChange(val) { - const arr = []; + const arr = [] for (let index = 0; index < val.length; index++) { - arr.push(val[index].Id); + arr.push(val[index].Id) } - this.selectArr = arr; + this.selectArr = arr }, beforeCloseUploadDig(done) { - this.$store.state.trials.checkTaskId = null; + this.$store.state.trials.checkTaskId = null if (this.openWindow) { - this.openWindow.close(); + this.openWindow.close() } - done(); + done() }, beforeCloseStudyDig(done) { if (this.openWindow) { - this.openWindow.close(); + this.openWindow.close() } - done(); + done() }, setOpenWindow(window) { if (this.openWindow) { - this.openWindow.close(); + this.openWindow.close() } - this.openWindow = window; + this.openWindow = window }, }, -}; +} 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 544b6271..56f8ad8e 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 @@ -49,6 +49,13 @@ > {{ $store.state.trials.uploadTip }} --> + + + + +