diff --git a/src/api/load.js b/src/api/load.js
index cc23cc40..ff9e6b8d 100644
--- a/src/api/load.js
+++ b/src/api/load.js
@@ -39,4 +39,12 @@ export function deleteTaskStudy(params) {
method: 'delete',
params
})
+}
+// 获取iqc下载文件信息
+export function getCRCUploadedStudyInfo(data) {
+ return request({
+ url: '/DownloadAndUpload/getCRCUploadedStudyInfo',
+ method: 'post',
+ data
+ })
}
\ No newline at end of file
diff --git a/src/utils/stream.js b/src/utils/stream.js
new file mode 100644
index 00000000..a812b259
--- /dev/null
+++ b/src/utils/stream.js
@@ -0,0 +1,48 @@
+import streamSaver from "streamsaver";
+import "streamsaver/examples/zip-stream.js";
+
+// 下载文件并压缩
+function zipFiles(zipName, files) {
+ console.log("同步下载打包开始时间:" + new Date());
+ // 创建压缩文件输出流
+ 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 {
+ const { name, url } = fileInfo.value;
+ return fetch(url).then(res => {
+ ctrl.enqueue({
+ name,
+ stream: () => res.body
+ });
+ })
+ }
+ }
+ });
+ if (window.WritableStream && readableZipStream.pipeTo) {
+ // 开始下载
+ readableZipStream
+ .pipeTo(zipFileOutputStream)
+ .then(() => console.log("同步下载打包结束时间:" + new Date()));
+ }
+}
+// 下载文件并修改名称
+async function updateFile(file, name) {
+ try {
+ const fileOutputStream = streamSaver.createWriteStream(name);
+ let res = await fetch(file);
+ res.body.pipeTo(fileOutputStream);
+ } catch (err) {
+ console.log(err)
+ }
+}
+export function downLoadFile(file, name, type = 'file') {
+ if (type === 'zip') return zipFiles(name, file);
+ return updateFile(file, name)
+
+}
\ No newline at end of file
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 5fcafff5..7349f1f0 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
@@ -6,7 +6,7 @@
style="position: absolute; right: 20px; top: 10px; z-index: 9"
>
{{
- $t("trials:reading:button:handbooks")
+ $t('trials:reading:button:handbooks')
}}
@@ -21,7 +21,7 @@
- {{ $t("trials:audit:title:dicoms") }}
+ {{ $t('trials:audit:title:dicoms') }}
- {{ $t("trials:audit:tip:visitWindow") }}:
+ {{ $t('trials:audit:tip:visitWindow') }}:
{{ `${upperLimit}~${lowerLimit}` }}
{{
- $t("trials:audit:tip:visitWindowNotSet")
+ $t('trials:audit:tip:visitWindowNotSet')
}}
-
{{ $store.state.trials.uploadTip }}
-
+
-->
- {{ $t("trials:audit:button:downLoadAllDiocms") }}
+ {{ $t('trials:audit:button:downLoadAllDiocms') }}
- {{ $t("trials:audit:button:previewAllDiocms") }}
+ {{ $t('trials:audit:button:previewAllDiocms') }}
- {{ $t("trials:audit:button:previewReadingDiocms") }}
+ {{ $t('trials:audit:button:previewReadingDiocms') }}
-
+
+
{{
scope.row.StudyTime
- ? moment(scope.row.StudyTime).format("YYYY-MM-DD")
- : ""
+ ? moment(scope.row.StudyTime).format('YYYY-MM-DD')
+ : ''
}}
@@ -183,7 +193,7 @@
- {{ $t("trials:audit:title:series") }}
+ {{ $t('trials:audit:title:series') }}
{{
scope.row.StudyTime
- ? moment(scope.row.StudyTime).format("YYYY-MM-DD")
- : ""
+ ? moment(scope.row.StudyTime).format('YYYY-MM-DD')
+ : ''
}}
@@ -279,7 +289,7 @@
{{ $t("trials:audit:title:nonDicomsTitle") }}
{{ $t('trials:audit:title:nonDicomsTitle') }}
- {{ $t("trials:audit:tip:nonDicomsVisitWindow") }}:
+ {{ $t('trials:audit:tip:nonDicomsVisitWindow') }}:
{{ `${upperLimit}~${lowerLimit}` }}
{{
- $t("trials:audit:tip:visitWindowNotSet")
+ $t('trials:audit:tip:visitWindowNotSet')
}}
-
{{ $store.state.trials.uploadTip }}
-
+
-->
- {{ $t("trials:audit:button:downLoadAllNonDiocms") }}
+ {{ $t('trials:audit:button:downLoadAllNonDiocms') }}
- {{ $t("trials:audit:tip:nonDicomsPreviewAll") }}
+ {{ $t('trials:audit:tip:nonDicomsPreviewAll') }}
-
+
+
- {{ $t("trials:audit:button:nonDicomsPreview") }}
+ {{ $t('trials:audit:button:nonDicomsPreview') }}
@@ -418,7 +437,7 @@
style="color: #f44336; font-size: 16px"
/>
{{
- moment(scope.row.ImageDate).format("YYYY-MM-DD")
+ moment(scope.row.ImageDate).format('YYYY-MM-DD')
}}
@@ -478,7 +497,7 @@
- {{ $t("trials:audit:title:questions") }}
+ {{ $t('trials:audit:title:questions') }}
- {{ $t("trials:audit:message:noData") }}
+ {{ $t('trials:audit:message:noData') }}
@@ -585,7 +604,7 @@
type="primary"
@click="qcVisible = false"
>
- {{ $t("common:button:cancel") }}
+ {{ $t('common:button:cancel') }}
- {{ $t("common:button:save") }}
+ {{ $t('common:button:save') }}
@@ -647,7 +666,7 @@
show-overflow-tooltip
>
- {{ $fd("IsClosed", scope.row.IsClosed) }}
+ {{ $fd('IsClosed', scope.row.IsClosed) }}
@@ -689,13 +708,13 @@
--
{{
- $fd("ReuploadEnum", scope.row.ReuploadEnum)
+ $fd('ReuploadEnum', scope.row.ReuploadEnum)
}}
{{
- $fd("ReuploadEnum", scope.row.ReuploadEnum)
+ $fd('ReuploadEnum', scope.row.ReuploadEnum)
}}
{{
- $fd("ReuploadEnum", scope.row.ReuploadEnum)
+ $fd('ReuploadEnum', scope.row.ReuploadEnum)
}}
@@ -722,7 +741,7 @@
show-overflow-tooltip
>
- {{ $fd("YesOrNo", scope.row.IsOverTime) }}
+ {{ $fd('YesOrNo', scope.row.IsOverTime) }}
@@ -744,7 +763,7 @@
:disabled="scope.row.IsClosed || isAudit"
@click="handleReply(scope.row)"
>
- {{ $t("trials:qcQuality:action:reply") }}
+ {{ $t('trials:qcQuality:action:reply') }}
- {{ $t("trials:qcQuality:action:close") }}
+ {{ $t('trials:qcQuality:action:close') }}
@@ -852,7 +871,7 @@
:key="bodyPart"
:label="bodyPart"
>{{
- $fd("Bodypart", bodyPart, "Code", BodyPart, "Name")
+ $fd('Bodypart', bodyPart, 'Code', BodyPart, 'Name')
}}
@@ -888,7 +907,7 @@
type="primary"
@click="editStudyInfoVisible = false"
>
- {{ $t("common:button:cancel") }}
+ {{ $t('common:button:cancel') }}
- {{ $t("common:button:save") }}
+ {{ $t('common:button:save') }}
@@ -912,10 +931,10 @@
>
{{
- $t("common:dialogTitle:sign")
+ $t('common:dialogTitle:sign')
}}
{{
- `(${$t("common:label:sign")}${currentUser})`
+ `(${$t('common:label:sign')}${currentUser})`
}}
{{
- $fd("Bodypart", bodyPart, "Code", BodyPart, "Name")
+ $fd('Bodypart', bodyPart, 'Code', BodyPart, 'Name')
}}
@@ -1021,7 +1040,7 @@
type="primary"
@click="editNoneDicomVisible = false"
>
- {{ $t("common:button:cancel") }}
+ {{ $t('common:button:cancel') }}
- {{ $t("common:button:save") }}
+ {{ $t('common:button:save') }}
@@ -1068,11 +1087,11 @@
{{
- $t("trials:qcQuality:radio:reason1")
+ $t('trials:qcQuality:radio:reason1')
}}
{{
- $t("trials:qcQuality:radio:reason2")
+ $t('trials:qcQuality:radio:reason2')
}}
@@ -1101,7 +1120,7 @@
type="primary"
@click="closeQuestionVisible = false"
>
- {{ $t("common:button:cancel") }}
+ {{ $t('common:button:cancel') }}
- {{ $t("common:button:save") }}
+ {{ $t('common:button:save') }}
@@ -1146,7 +1165,7 @@
round
@click="handleSave"
>
- {{ $t("trials:audit:button:save") }}
+ {{ $t('trials:audit:button:save') }}
- {{ $t("trials:audit:button:question") }}
+ {{ $t('trials:audit:button:question') }}
{{
- `${$t("trials:audit:button:historicalQuestions")}(${
+ `${$t('trials:audit:button:historicalQuestions')}(${
relationInfo.TotalChallengeCount !== undefined
? relationInfo.TotalChallengeCount
: 0
@@ -1181,7 +1200,7 @@
round
@click="handleQCState(8)"
>
- {{ $t("trials:audit:button:auditPassed") }}
+ {{ $t('trials:audit:button:auditPassed') }}
@@ -1222,20 +1241,22 @@ import {
closeQCChallenge,
updateModality,
getQCChallengeDialogList,
-} from "@/api/trials";
-import { qCPassedOrFailed } from "@/api/trials/visit";
-import { getBasicDataSelects } from "@/api/dictionary/dictionary";
-import ChatForm from "./chatForm";
-import QuestionForm from "./questions";
-import moment from "moment";
-import ClinicalData from "./clinicalData";
-import SignForm from "@/views/trials/components/newSignForm";
-import { getToken } from "@/utils/auth";
-import const_ from "@/const/sign-code";
-import uploadPetClinicalData from "@/views/trials/trials-panel/visit/crc-upload/components/uploadPetClinicalData.vue";
-import { downloadImage, resetFlag } from "@/utils/uploadZip.js";
+} from '@/api/trials'
+import { qCPassedOrFailed } from '@/api/trials/visit'
+import { getBasicDataSelects } from '@/api/dictionary/dictionary'
+import ChatForm from './chatForm'
+import QuestionForm from './questions'
+import moment from 'moment'
+import ClinicalData from './clinicalData'
+import SignForm from '@/views/trials/components/newSignForm'
+import { getToken } from '@/utils/auth'
+import const_ from '@/const/sign-code'
+import uploadPetClinicalData from '@/views/trials/trials-panel/visit/crc-upload/components/uploadPetClinicalData.vue'
+import { downloadImage, resetFlag } from '@/utils/uploadZip.js'
+import { downLoadFile } from '@/utils/stream.js'
+import { getCRCUploadedStudyInfo } from '@/api/load.js'
export default {
- name: "QualityAssurance",
+ name: 'QualityAssurance',
components: {
ChatForm,
ClinicalData,
@@ -1247,7 +1268,7 @@ export default {
data: {
type: Object,
default() {
- return {};
+ return {}
},
},
disabled: {
@@ -1261,7 +1282,7 @@ export default {
},
data() {
return {
- activeName: this.data.DicomStudyCount > 0 ? "dicom" : "none-dicom",
+ activeName: this.data.DicomStudyCount > 0 ? 'dicom' : 'none-dicom',
questionForm: {},
qCQuestionAnswerList: [],
studyList: [],
@@ -1269,12 +1290,12 @@ export default {
relationInfo: {},
noneDicomStudyList: [],
qcForm: {
- subjectVisitId: "",
- challengeType: "",
- content: "",
- actionContent: "",
- deadlineTime: "",
- qcContent: "",
+ subjectVisitId: '',
+ challengeType: '',
+ content: '',
+ actionContent: '',
+ deadlineTime: '',
+ qcContent: '',
},
qcVisible: false,
chatVisible: false,
@@ -1285,57 +1306,57 @@ export default {
historyLoading: false,
editStudyInfoVisible: false,
studyForm: {
- StudyCode: "",
+ StudyCode: '',
IsDicomData: true,
- Modalities: "",
+ Modalities: '',
BodyPartForEdit: [],
SeriesCount: null,
- StudyTime: "",
+ StudyTime: '',
},
currentQCRow: {},
isAudit: false, // 审核过之后功能按钮禁用标识
- qcType: "",
+ qcType: '',
trialBodyPartTypes: [],
trialModalitys: [],
signVisible: false,
- signCode: "",
+ signCode: '',
auditState: null,
- currentNoneDicomId: "",
+ currentNoneDicomId: '',
editNoneDicomVisible: false,
noneDicomForm: {
- Id: "",
- CodeView: "",
+ Id: '',
+ CodeView: '',
BodyParts: [],
- Modality: "",
- ImageDate: "",
+ Modality: '',
+ ImageDate: '',
},
subjectClinicalData: {},
moment,
currentQCType: null,
- currentUser: zzSessionStorage.getItem("userName"),
+ currentUser: zzSessionStorage.getItem('userName'),
pickerOption: {
disabledDate: (time) => {
- return time.getTime() > Date.now();
+ return time.getTime() > Date.now()
},
},
isHaveFirstGiveMedicineDate: false,
- baseDate: "",
- upperLimit: "", // 超期上限
- lowerLimit: "", // 超期下限
+ baseDate: '',
+ upperLimit: '', // 超期上限
+ lowerLimit: '', // 超期下限
closeQuestionForm: {
- Id: "",
- SubjectVisitId: "",
+ Id: '',
+ SubjectVisitId: '',
Type: null,
- Reason: "",
- Remake: "",
+ Reason: '',
+ Remake: '',
},
closeBtnLoading: false,
closeQuestionVisible: false,
- trialId: "",
+ trialId: '',
dictionaryList: {},
currentSeriesIsReading: false,
currentSeriesIsDeleted: false,
- imgObj: { url: "", visible: false, loading: false },
+ imgObj: { url: '', visible: false, loading: false },
open: null,
existsManual: false,
@@ -1344,84 +1365,186 @@ export default {
rowData: {},
IsHaveStudyClinicalData: false,
BodyPart: {},
- };
+
+ // 下载相关
+ downloading: false,
+ selectTableDicom: [], // 选中的dicom数据
+ selectTableNonedicom: [], // 选中的非dicom数据
+ }
},
async mounted() {
- this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId);
+ this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId)
if (this.disabled) {
- this.isAudit = true;
- this.currentQCType = this.qType;
+ this.isAudit = true
+ this.currentQCType = this.qType
} else {
- this.currentQCType = this.data.AuditState < 6 ? 1 : 2;
+ this.currentQCType = this.data.AuditState < 6 ? 1 : 2
}
- window.addEventListener("message", this.receiveMsg);
+ window.addEventListener('message', this.receiveMsg)
- this.trialId = this.$route.query.trialId;
- this.getQCInfo();
- this.getDicData();
+ this.trialId = this.$route.query.trialId
+ this.getQCInfo()
+ this.getDicData()
// this.handleViewImages()
// this.handleViewAllNoneDicoms()
},
beforeDestroy() {
if (this.open) {
- this.open.close();
+ this.open.close()
}
- resetFlag();
+ resetFlag()
},
methods: {
- // 打包下载
- async downloadImage(IsDicom) {
+ // 选中dicom
+ handleSelectionChangeDicom(val) {
+ this.selectTableDicom = val
+ },
+ // 选中非dicom
+ handleSelectionChangeNonedicom(val) {
+ this.selectTableNonedicom = val
+ },
+ // 获取下载文件信息
+ async getCRCUploadedStudyInfo(type) {
+ if (this.downloading) return
try {
- await downloadImage(this.$route.query.trialId, this.data.Id, IsDicom);
+ let data = {
+ SubjectVisitId: this.data.Id,
+ NoneDicomStudyIdList: [],
+ DicomStudyIdList: [],
+ }
+ if (type === 'dicom') {
+ data.DicomStudyIdList = this.selectTableDicom.map(
+ (item) => item.StudyId
+ )
+ }
+ if (type === 'noneDicom') {
+ console.log(this.selectTableNonedicom)
+ data.NoneDicomStudyIdList = this.selectTableNonedicom.map(
+ (item) => item.Id
+ )
+ }
+ this.downloading = true
+ let res = await getCRCUploadedStudyInfo(data)
+ this.downloading = false
+ if (res.IsSuccess) {
+ this.downloadImage(res.Result, type)
+ }
} catch (err) {
- console.log(err);
+ this.downloading = false
+ console.log(err)
}
},
+ // 打包下载
+ async downloadImage(data, type) {
+ try {
+ let { files, name, fileType } = this.formatDownloadFile(data, type)
+ if (fileType === 'list') {
+ await downLoadFile(files, name, 'zip')
+ } else {
+ await downLoadFile(files, name)
+ }
+ } catch (err) {
+ console.log(err)
+ }
+ },
+ // 格式化下载文件路径
+ formatDownloadFile(data, type) {
+ let files = [],
+ name = null
+ if (type === 'dicom') {
+ name = `${data.SubjectCode}_${data.VisitName}_DICOM.zip`
+ let StudyList = data.StudyList
+ StudyList.forEach((study) => {
+ if (study.SeriesList.length > 0) {
+ study.SeriesList.forEach((series) => {
+ if (series.InstanceList.length > 0) {
+ series.InstanceList.forEach((instance) => {
+ let fileName = instance.Path.split('/').pop()
+ let obj = {
+ name: `${data.SubjectCode}_${data.VisitName}_DICOM/${study.StudyCode}_${study.StudyTime}_${series.Modality}/${fileName}`,
+ path: this.OSSclientConfig.basePath + instance.Path,
+ }
+ files.push(obj)
+ })
+ }
+ })
+ }
+ })
+ }
+ if (type === 'noneDicom') {
+ name = `${data.SubjectCode}_${data.VisitName}_非DICOM.zip`
+ let NoneDicomStudyList = data.NoneDicomStudyList
+ // 单个zip包
+ if (
+ NoneDicomStudyList.length === 1 &&
+ NoneDicomStudyList[0].FileList.length === 1 &&
+ NoneDicomStudyList[0].FileList[0].FileType.includes('zip')
+ ) {
+ files =
+ this.OSSclientConfig.basePath +
+ NoneDicomStudyList[0].FileList[0].Path
+ return { files, name, fileType: 'one' }
+ }
+ // 多文件
+ NoneDicomStudyList.forEach((study) => {
+ if (study.FileList.length > 0) {
+ study.FileList.forEach((item) => {
+ let obj = {
+ name: `${data.SubjectCode}_${data.VisitName}_非DICOM/${study.StudyCode}_${study.ImageDate}_${study.Modality}/${item.FileName}`,
+ url: this.OSSclientConfig.basePath + item.Path,
+ }
+ files.push(obj)
+ })
+ }
+ })
+ }
+ return { files, name, fileType: 'list' }
+ },
// 获取QC界面基本信息
getQCInfo() {
- this.loading = true;
+ this.loading = true
getVisitQCInfo(this.data.Id, this.data.QCProcessEnum, this.currentQCType)
.then((res) => {
- this.existsManual = res.Result.ExistsManual;
- this.qCQuestionAnswerList = res.Result.QCQuestionAnswerList;
- this.IsHaveStudyClinicalData = res.Result.IsHaveStudyClinicalData;
- this.studyList = res.Result.StudyList;
- this.seriesList = res.Result.SeriesList;
- this.noneDicomStudyList = res.Result.NoneDicomStudyList;
- this.relationInfo = res.Result.RelationInfo;
+ this.existsManual = res.Result.ExistsManual
+ this.qCQuestionAnswerList = res.Result.QCQuestionAnswerList
+ this.IsHaveStudyClinicalData = res.Result.IsHaveStudyClinicalData
+ this.studyList = res.Result.StudyList
+ this.seriesList = res.Result.SeriesList
+ this.noneDicomStudyList = res.Result.NoneDicomStudyList
+ this.relationInfo = res.Result.RelationInfo
this.trialBodyPartTypes = this.relationInfo.TrialBodyPartTypes
- ? this.relationInfo.TrialBodyPartTypes.trim().split("|")
- : [];
+ ? this.relationInfo.TrialBodyPartTypes.trim().split('|')
+ : []
this.trialModalitys = this.relationInfo.TrialModalitys
- ? this.relationInfo.TrialModalitys.trim().split("|")
- : [];
- this.subjectClinicalData = res.Result.SubjectClinicalData;
- this.baseDate = res.Result.RelationInfo.SubjectFirstGiveMedicineTime;
+ ? this.relationInfo.TrialModalitys.trim().split('|')
+ : []
+ this.subjectClinicalData = res.Result.SubjectClinicalData
+ this.baseDate = res.Result.RelationInfo.SubjectFirstGiveMedicineTime
if (this.baseDate) {
const uDay =
res.Result.RelationInfo.VisitDay * 1 +
- res.Result.RelationInfo.VisitWindowLeft * 1;
- this.upperLimit = moment(this.baseDate, "YYYY-MM-DD")
- .add(uDay, "days")
- .format("YYYY-MM-DD");
+ res.Result.RelationInfo.VisitWindowLeft * 1
+ this.upperLimit = moment(this.baseDate, 'YYYY-MM-DD')
+ .add(uDay, 'days')
+ .format('YYYY-MM-DD')
const lDay =
res.Result.RelationInfo.VisitDay * 1 +
- res.Result.RelationInfo.VisitWindowRight * 1;
- this.lowerLimit = moment(this.baseDate, "YYYY-MM-DD")
- .add(lDay, "days")
- .format("YYYY-MM-DD");
+ res.Result.RelationInfo.VisitWindowRight * 1
+ this.lowerLimit = moment(this.baseDate, 'YYYY-MM-DD')
+ .add(lDay, 'days')
+ .format('YYYY-MM-DD')
}
this.isHaveFirstGiveMedicineDate =
- res.Result.RelationInfo.IsHaveFirstGiveMedicineDate;
- this.loading = false;
+ res.Result.RelationInfo.IsHaveFirstGiveMedicineDate
+ this.loading = false
})
.catch(() => {
- this.loading = false;
- });
+ this.loading = false
+ })
},
// 刷新审核问题列表
getCheckList() {
- this.loading = true;
+ this.loading = true
getQCQuestionAnswerList(
this.trialId,
this.data.Id,
@@ -1429,36 +1552,36 @@ export default {
this.currentQCType
)
.then((res) => {
- this.loading = false;
+ this.loading = false
res.Result.forEach((element, index) => {
// this.qCQuestionAnswerList
- this.$set(this.qCQuestionAnswerList[index], "Id", element.Id);
- });
+ this.$set(this.qCQuestionAnswerList[index], 'Id', element.Id)
+ })
})
.catch(() => {
- this.loading = false;
- });
+ this.loading = false
+ })
},
// 保存审核问题
handleSave(isMessage) {
return new Promise((resolve) => {
- this.$refs["questions"]
+ this.$refs['questions']
.submit()
.then((res) => {
- var answerList = [];
+ var answerList = []
res.forEach((item) => {
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,
- });
+ })
}
- });
- this.loading = true;
+ })
+ this.loading = true
addOrUpdateQCQuestionAnswerList(
this.trialId,
this.data.Id,
@@ -1467,66 +1590,66 @@ export default {
answerList
)
.then((res) => {
- this.loading = false;
+ this.loading = false
if (res.IsSuccess) {
if (isMessage !== true) {
this.$message.success(
- this.$t("common:message:savedSuccessfully")
- );
+ this.$t('common:message:savedSuccessfully')
+ )
}
- this.getCheckList();
- resolve(true);
+ this.getCheckList()
+ resolve(true)
}
})
.catch(() => {
- this.loading = false;
- resolve(false);
- });
+ this.loading = false
+ resolve(false)
+ })
})
.catch(() => {
- this.loading = false;
- resolve(false);
- });
- });
+ this.loading = false
+ resolve(false)
+ })
+ })
},
// 保存质疑
handleSaveQC() {
- this.$refs["qcForm"].validate((valid) => {
- if (!valid) return;
- this.btnLoading = true;
- this.qcForm.subjectVisitId = this.data.Id;
- var contents = [];
- var types = [];
- var actions = [];
+ this.$refs['qcForm'].validate((valid) => {
+ if (!valid) return
+ this.btnLoading = true
+ this.qcForm.subjectVisitId = this.data.Id
+ var contents = []
+ var types = []
+ var actions = []
this.qcForm.qcContent.forEach((item) => {
if (item.isSelect) {
- types.push(`${item.keyName}`);
- var str = `${item.keyName}
`;
+ types.push(`${item.keyName}`)
+ var str = `${item.keyName}
`
if (item.keyValue) {
// 问题总结
- str = `${str}${this.$t("trials:audit:form:questionSummary")}:${
+ str = `${str}${this.$t('trials:audit:form:questionSummary')}:${
item.keyValue
- }
`;
+ }
`
}
if (item.actionContent) {
// 行动事项
- actions.push(`${item.actionContent}`);
- str = `${str}${this.$t("trials:audit:form:actionMatters")}:${
+ actions.push(`${item.actionContent}`)
+ str = `${str}${this.$t('trials:audit:form:actionMatters')}:${
item.actionContent
- }
`;
+ }
`
}
- contents.push(str);
+ contents.push(str)
}
- });
+ })
if (contents.length === 0) {
// 质疑内容不能为空!
- this.$alert(this.$t("trials:audit:message:qsContentIsNull"));
- this.btnLoading = false;
- return;
+ this.$alert(this.$t('trials:audit:message:qsContentIsNull'))
+ this.btnLoading = false
+ return
} else {
- this.qcForm.content = contents.join("|");
- this.qcForm.challengeType = types.join("|");
- this.qcForm.actionContent = actions.join("|");
+ this.qcForm.content = contents.join('|')
+ this.qcForm.challengeType = types.join('|')
+ this.qcForm.actionContent = actions.join('|')
}
var params = {
challengeType: this.qcForm.challengeType,
@@ -1535,7 +1658,7 @@ export default {
actionContent: this.qcForm.actionContent,
reuploadEnum: 0,
deadlineTime: this.qcForm.deadlineTime,
- };
+ }
addOrUpdateQCChallenge(
this.trialId,
this.data.QCProcessEnum,
@@ -1543,182 +1666,180 @@ export default {
params
)
.then((res) => {
- this.btnLoading = false;
+ this.btnLoading = false
if (res.IsSuccess) {
- this.$message.success(
- this.$t("common:message:savedSuccessfully")
- );
- this.qcVisible = false;
- this.relationInfo.TotalChallengeCount++;
- this.relationInfo.NotClosedChallengeCount++;
+ this.$message.success(this.$t('common:message:savedSuccessfully'))
+ this.qcVisible = false
+ this.relationInfo.TotalChallengeCount++
+ this.relationInfo.NotClosedChallengeCount++
}
})
.catch(() => {
- this.btnLoading = false;
- });
- });
+ this.btnLoading = false
+ })
+ })
},
// 打开发起质疑弹窗
handleQC() {
- this.loading = true;
+ this.loading = true
// 检验qc审核问题是否保存,否则不允许发质疑
verifyQCCanAddChallenge(this.trialId, this.data.Id, this.currentQCType)
.then((res) => {
- this.loading = false;
+ this.loading = false
if (res.IsSuccess) {
- this.renderQCForm();
+ this.renderQCForm()
}
})
.catch(() => {
- this.loading = false;
- });
+ this.loading = false
+ })
},
handleQCVerify() {
- this.loading = true;
+ this.loading = true
return new Promise((resolve) => {
verifyQCCanAddChallenge(this.trialId, this.data.Id, this.currentQCType)
.then((res) => {
- this.loading = false;
+ this.loading = false
if (res.IsSuccess) {
- resolve(true);
+ resolve(true)
} else {
- resolve(false);
+ resolve(false)
}
})
.catch(() => {
- this.loading = false;
- resolve(false);
- });
- });
+ this.loading = false
+ resolve(false)
+ })
+ })
},
// 渲染发质疑窗口
renderQCForm() {
- var contents = [];
- const challengeType = this.dictionaryList["ChallengeType"];
+ var contents = []
+ const challengeType = this.dictionaryList['ChallengeType']
challengeType.forEach((i) => {
- contents.push({ keyName: i.Value, keyValue: "", isSelect: false });
- });
- var isHyperwindow = false;
+ contents.push({ keyName: i.Value, keyValue: '', isSelect: false })
+ })
+ var isHyperwindow = false
if (this.isHaveFirstGiveMedicineDate && !!this.baseDate) {
- isHyperwindow = this.isHyperwindow();
+ isHyperwindow = this.isHyperwindow()
}
if (isHyperwindow) {
contents.push({
- keyName: this.$t("trials:audit:message:qsOverWindow"),
- keyValue: `${this.$t("trials:audit:message:qsOverWindow1")}:${
+ keyName: this.$t('trials:audit:message:qsOverWindow'),
+ keyValue: `${this.$t('trials:audit:message:qsOverWindow1')}:${
this.upperLimit
}~${this.lowerLimit},${this.$t(
- "trials:audit:message:qsOverWindow2"
+ 'trials:audit:message:qsOverWindow2'
)}:${moment(this.relationInfo.EarliestScanDate).format(
- "YYYY-MM-DD"
+ 'YYYY-MM-DD'
)}~${moment(this.relationInfo.LatestScanDate).format(
- "YYYY-MM-DD"
- )},${this.$t("trials:audit:message:qsOverWindow3")}`,
+ 'YYYY-MM-DD'
+ )},${this.$t('trials:audit:message:qsOverWindow3')}`,
isSelect: false,
- actionContent: this.$t("trials:audit:message:qsOverWindow4"),
- });
+ actionContent: this.$t('trials:audit:message:qsOverWindow4'),
+ })
}
- this.qcForm.qcContent = contents;
- const day = this.relationInfo.TrialChangeDefalutDays;
+ this.qcForm.qcContent = contents
+ const day = this.relationInfo.TrialChangeDefalutDays
this.qcForm.deadlineTime = moment()
- .add(day * 1, "days")
- .format("YYYY-MM-DD HH:mm:ss");
- this.qcVisible = true;
+ .add(day * 1, 'days')
+ .format('YYYY-MM-DD HH:mm:ss')
+ this.qcVisible = true
},
isHyperwindow() {
- var isHyperwindow = false;
+ var isHyperwindow = false
if (
this.relationInfo.EarliestScanDate < this.upperLimit ||
this.relationInfo.LatestScanDate > this.lowerLimit
) {
- isHyperwindow = true;
+ isHyperwindow = true
}
- return isHyperwindow;
+ return isHyperwindow
},
// 获取字典数据
getDicData() {
- getBasicDataSelects(["ChallengeType"]).then((res) => {
- this.dictionaryList = { ...res.Result };
- });
+ getBasicDataSelects(['ChallengeType']).then((res) => {
+ this.dictionaryList = { ...res.Result }
+ })
},
// 打开历史质疑弹窗
handleHistoryQC() {
- this.historyVisible = true;
- this.getHistoryInfo();
+ this.historyVisible = true
+ this.getHistoryInfo()
},
// 获取历史质疑记录
getHistoryInfo() {
- this.historyLoading = true;
+ this.historyLoading = true
getHistoryChallengeList(
this.data.Id,
this.data.QCProcessEnum,
this.currentQCType
)
.then((res) => {
- this.historyList = res.Result;
- this.historyLoading = false;
+ this.historyList = res.Result
+ this.historyLoading = false
})
.catch(() => {
- this.historyLoading = false;
- });
+ this.historyLoading = false
+ })
},
// 回复质疑
handleReply(row) {
- this.historyLoading = true;
+ this.historyLoading = true
getQCChallengeDialogList(row.Id)
.then((res) => {
- this.historyLoading = false;
+ this.historyLoading = false
if (res.IsSuccess) {
if (res.Result.length > 0) {
- Object.assign(row, res.Result[0]);
+ Object.assign(row, res.Result[0])
}
- this.currentQCRow = { ...row };
- this.chatVisible = true;
+ this.currentQCRow = { ...row }
+ this.chatVisible = true
}
})
.catch(() => {
- this.historyLoading = false;
- });
+ this.historyLoading = false
+ })
},
getDialogList() {
- this.historyLoading = true;
+ this.historyLoading = true
getQCChallengeDialogList(this.currentQCRow.Id)
.then((res) => {
- this.historyLoading = false;
+ this.historyLoading = false
if (res.IsSuccess && res.Result.length > 0) {
var i = this.historyList.findIndex(
(item) => item.Id === this.currentQCRow.Id
- );
+ )
if (i > -1) {
this.currentQCRow = Object.assign(
this.historyList[i],
res.Result[0]
- );
+ )
}
}
})
.catch(() => {
- this.historyLoading = false;
- });
+ this.historyLoading = false
+ })
},
// 关闭质疑
handleCloseQuestion() {
- this.$refs["closeQuestionForm"].validate((valid) => {
- if (!valid) return;
- this.closeBtnLoading = true;
+ this.$refs['closeQuestionForm'].validate((valid) => {
+ if (!valid) return
+ this.closeBtnLoading = true
if (this.closeQuestionForm.Type === 1) {
// 问题已解决
this.closeQuestionForm.Reason = this.$t(
- "trials:qcQuality:message:problemSolved"
- );
+ 'trials:qcQuality:message:problemSolved'
+ )
} else if (this.closeQuestionForm.Type === 2) {
// 问题无法解决强制关闭质疑,已提醒中心下次注意
this.closeQuestionForm.Reason = `${this.$t(
- "trials:qcQuality:message:problemNotSolved"
- )}
${this.$t("trials:consistencyCheck:label:closereason")}:${
+ 'trials:qcQuality:message:problemNotSolved'
+ )}
${this.$t('trials:consistencyCheck:label:closereason')}:${
this.closeQuestionForm.Remake
- }`;
+ }`
}
var params = {
TrialId: this.data.TrialId,
@@ -1726,61 +1847,61 @@ export default {
SubjectVisitId: this.data.Id,
CloseEnum: this.closeQuestionForm.Type,
CloseReason: this.closeQuestionForm.Reason,
- };
+ }
closeQCChallenge(params)
.then((res) => {
- this.closeBtnLoading = false;
+ this.closeBtnLoading = false
if (res.IsSuccess) {
- this.getHistoryInfo();
+ this.getHistoryInfo()
this.$message.success(
- this.$t("trials:qcQuality:message:closedSuccessfully")
- );
- this.closeQuestionVisible = false;
- this.relationInfo.NotClosedChallengeCount--;
+ this.$t('trials:qcQuality:message:closedSuccessfully')
+ )
+ this.closeQuestionVisible = false
+ this.relationInfo.NotClosedChallengeCount--
}
})
.catch(() => {
- this.closeBtnLoading = false;
- });
- });
+ this.closeBtnLoading = false
+ })
+ })
},
// 打开关闭质疑框并初始化
handleCloseQC(row) {
- this.closeQuestionForm = Object.assign(this.closeQuestionForm, row);
- this.closeQuestionForm.CurrentQCType = this.currentQCType;
- this.closeQuestionForm.AuditState = this.data.AuditState;
- this.closeQuestionForm.TrialQCProcess = this.data.QCProcessEnum;
- this.closeQuestionForm.Type = null;
- this.closeQuestionForm.Reason = "";
- this.closeQuestionForm.Remake = "";
- this.closeQuestionVisible = true;
+ this.closeQuestionForm = Object.assign(this.closeQuestionForm, row)
+ this.closeQuestionForm.CurrentQCType = this.currentQCType
+ this.closeQuestionForm.AuditState = this.data.AuditState
+ this.closeQuestionForm.TrialQCProcess = this.data.QCProcessEnum
+ this.closeQuestionForm.Type = null
+ this.closeQuestionForm.Reason = ''
+ this.closeQuestionForm.Remake = ''
+ this.closeQuestionVisible = true
},
// 打开质疑记录弹窗
handleQCInfo(row) {
- this.currentQCRow = { ...row };
- this.chatVisible = true;
+ this.currentQCRow = { ...row }
+ this.chatVisible = true
},
changeReadingStatus(callback, row) {
- let statusStr = "";
+ let statusStr = ''
if (callback) {
- statusStr = this.$t("trials:audit:label:setSeriesReading");
- row.IsReading = false;
+ statusStr = this.$t('trials:audit:label:setSeriesReading')
+ row.IsReading = false
} else {
- statusStr = this.$t("trials:audit:label:setSeriesNotReading");
- row.IsReading = true;
+ statusStr = this.$t('trials:audit:label:setSeriesNotReading')
+ row.IsReading = true
}
- var message = this.$t("trials:audit:message:changeSeriesStatus").replace(
- "xxx",
+ var message = this.$t('trials:audit:message:changeSeriesStatus').replace(
+ 'xxx',
statusStr
- );
- message = message.replace("yyy", this.$fd("YesOrNo", !row.IsReading));
+ )
+ message = message.replace('yyy', this.$fd('YesOrNo', !row.IsReading))
this.$confirm(message, {
distinguishCancelAndClose: true,
- type: "warning",
+ type: 'warning',
})
.then(() => {
- const state = row.IsReading ? 1 : 2;
- this.loading = true;
+ const state = row.IsReading ? 1 : 2
+ this.loading = true
setSeriesStatus(
this.trialId,
this.data.Id,
@@ -1789,41 +1910,41 @@ export default {
state
)
.then((res) => {
- this.loading = false;
+ this.loading = false
if (res.IsSuccess) {
this.$message.success(
- this.$t("common:message:savedSuccessfully")
- );
- this.getStudyInfo();
+ this.$t('common:message:savedSuccessfully')
+ )
+ this.getStudyInfo()
}
})
.catch(() => {
- this.loading = false;
- });
+ this.loading = false
+ })
})
- .catch(() => {});
+ .catch(() => {})
},
changeDeleteStatus(callback, row) {
- let statusStr = "";
+ let statusStr = ''
if (callback) {
- statusStr = this.$t("trials:audit:label:setSeriesDeleted");
- row.IsDeleted = false;
+ statusStr = this.$t('trials:audit:label:setSeriesDeleted')
+ row.IsDeleted = false
} else {
- statusStr = this.$t("trials:audit:label:setSeriesNotDelete");
- row.IsDeleted = true;
+ statusStr = this.$t('trials:audit:label:setSeriesNotDelete')
+ row.IsDeleted = true
}
- var message = this.$t("trials:audit:message:changeSeriesStatus").replace(
- "xxx",
+ var message = this.$t('trials:audit:message:changeSeriesStatus').replace(
+ 'xxx',
statusStr
- );
- message = message.replace("yyy", this.$fd("YesOrNo", !row.IsDeleted));
+ )
+ message = message.replace('yyy', this.$fd('YesOrNo', !row.IsDeleted))
this.$confirm(message, {
distinguishCancelAndClose: true,
- type: "warning",
+ type: 'warning',
})
.then(() => {
- const state = row.IsDeleted ? 5 : 4;
- this.loading = true;
+ const state = row.IsDeleted ? 5 : 4
+ this.loading = true
setSeriesStatus(
this.trialId,
this.data.Id,
@@ -1832,146 +1953,146 @@ export default {
state
)
.then((res) => {
- this.loading = false;
+ this.loading = false
if (res.IsSuccess) {
this.$message.success(
- this.$t("common:message:savedSuccessfully")
- );
- this.getStudyInfo();
+ this.$t('common:message:savedSuccessfully')
+ )
+ this.getStudyInfo()
}
})
.catch(() => {
- this.loading = false;
- });
+ this.loading = false
+ })
})
- .catch(() => {});
+ .catch(() => {})
},
receiveMsg(event) {
- if (event.data.type === "refreshSeriesList") {
- this.getStudyInfo();
+ if (event.data.type === 'refreshSeriesList') {
+ this.getStudyInfo()
}
},
// 刷新检查新
getStudyInfo() {
- this.loading = true;
+ this.loading = true
getVisitQCStudyAndSeriesList(this.data.Id)
.then((res) => {
- this.loading = false;
- this.studyList = res.Result.StudyList;
- this.seriesList = res.Result.SeriesList;
+ this.loading = false
+ this.studyList = res.Result.StudyList
+ this.seriesList = res.Result.SeriesList
})
.catch(() => {
- this.loading = false;
- });
+ this.loading = false
+ })
},
// 设置qc通过/不通过
async handleQCState(auditState) {
if (auditState === 7) {
- this.signCode = this.getSignCode(auditState);
- this.signVisible = true;
- this.auditState = auditState;
- return;
+ this.signCode = this.getSignCode(auditState)
+ this.signVisible = true
+ this.auditState = auditState
+ return
}
if (auditState === 8) {
- var isgo = true;
- var isgoList = [];
+ var isgo = true
+ var isgoList = []
this.studyList.forEach((v) => {
if (!v.BodyPartForEdit) {
- isgo = false;
- isgoList.push(v.StudyCode);
+ isgo = false
+ isgoList.push(v.StudyCode)
}
- });
+ })
if (!isgo) {
// `请补充检查${isgoList.toString()}的检查部位!`
this.$confirm(
- this.$t("trials:qcQuality:title:title1").replace(
- "xxx",
- isgoList.join("、 ")
+ this.$t('trials:qcQuality:title:title1').replace(
+ 'xxx',
+ isgoList.join('、 ')
),
- "",
+ '',
{
showCancelButton: false,
}
- );
- return;
+ )
+ return
}
}
- this.loading = true;
- var isVerify = await this.handleSave(true);
+ this.loading = true
+ var isVerify = await this.handleSave(true)
if (!isVerify) {
- return;
+ return
}
// 验证是否关闭所有质疑
verifyCanQCPassedOrFailed(this.trialId, this.data.Id)
.then((res) => {
- this.loading = false;
+ this.loading = false
if (res.IsSuccess) {
- this.signCode = this.getSignCode(auditState);
- this.signVisible = true;
- this.auditState = auditState;
+ this.signCode = this.getSignCode(auditState)
+ this.signVisible = true
+ this.auditState = auditState
}
})
.catch(() => {
- this.loading = false;
- });
+ this.loading = false
+ })
},
getSignCode(auditState) {
if (this.relationInfo.TrialQCProcessEnum === 1 && auditState === 8) {
// 单审通过
- const { QCSingleReviewPassed } = const_.processSignature;
- return QCSingleReviewPassed;
+ const { QCSingleReviewPassed } = const_.processSignature
+ return QCSingleReviewPassed
} else if (
this.relationInfo.TrialQCProcessEnum === 1 &&
auditState === 7
) {
// 单审不通过
- const { QCSingleReviewFailed } = const_.processSignature;
- return QCSingleReviewFailed;
+ const { QCSingleReviewFailed } = const_.processSignature
+ return QCSingleReviewFailed
} else if (
this.relationInfo.TrialQCProcessEnum === 2 &&
auditState === 8 &&
this.currentQCType === 1
) {
// 初审通过
- const { PreliminaryReviewOfQCPassed } = const_.processSignature;
- return PreliminaryReviewOfQCPassed;
+ const { PreliminaryReviewOfQCPassed } = const_.processSignature
+ return PreliminaryReviewOfQCPassed
} else if (
this.relationInfo.TrialQCProcessEnum === 2 &&
auditState === 7 &&
this.currentQCType === 1
) {
// 初审不通过
- const { PreliminaryReviewOfQCFailed } = const_.processSignature;
- return PreliminaryReviewOfQCFailed;
+ const { PreliminaryReviewOfQCFailed } = const_.processSignature
+ return PreliminaryReviewOfQCFailed
} else if (
this.relationInfo.TrialQCProcessEnum === 2 &&
auditState === 8 &&
this.currentQCType === 2
) {
// 复审通过
- const { SecondaryReviewOfQCPassed } = const_.processSignature;
- return SecondaryReviewOfQCPassed;
+ const { SecondaryReviewOfQCPassed } = const_.processSignature
+ return SecondaryReviewOfQCPassed
} else if (
this.relationInfo.TrialQCProcessEnum === 2 &&
auditState === 7 &&
this.currentQCType === 2
) {
// 复审不通过
- const { SecondaryReviewOfQCFailed } = const_.processSignature;
- return SecondaryReviewOfQCFailed;
+ const { SecondaryReviewOfQCFailed } = const_.processSignature
+ return SecondaryReviewOfQCFailed
}
},
// 关闭签名框
closeSignDialog(isSign, signInfo) {
if (isSign) {
- this.setQCStatus(signInfo);
+ this.setQCStatus(signInfo)
} else {
- this.signVisible = false;
+ this.signVisible = false
}
},
// 设置qc审核状态
async setQCStatus(signInfo) {
- this.loading = true;
+ this.loading = true
var params = {
data: {
TrialId: this.trialId,
@@ -1979,98 +2100,100 @@ export default {
AuditState: this.auditState,
},
signInfo: signInfo,
- };
+ }
qCPassedOrFailed(params)
.then((res) => {
- this.loading = false;
+ this.loading = false
if (res.IsSuccess) {
- this.$refs["signForm"].btnLoading = false;
- this.signVisible = false;
- this.$message.success(this.$t("common:message:savedSuccessfully"));
+ this.$refs['signForm'].btnLoading = false
+ this.signVisible = false
+ this.$message.success(this.$t('common:message:savedSuccessfully'))
// this.getQCInfo()
- this.isAudit = true;
- this.$forceUpdate();
+ this.isAudit = true
+ this.$forceUpdate()
getNextIQCQuality({
trialId: this.trialId,
SubjectId: this.data.SubjectId,
}).then((res) => {
if (res.Result && res.Result.VisitId) {
this.$confirm(
- this.$t("trials:qcQuality:title:title2", "", {
+ this.$t('trials:qcQuality:title:title2', '', {
showCancelButton: false,
})
- ).then(() => {
- collectNextIQCQuality({
- trialId: this.trialId,
- SubjectId: this.data.SubjectId,
- }).then((res) => {
- this.$emit("getList");
- this.$emit("nextTask", res.Result.VisitId);
- });
- }).catch(()=>{
- this.$emit("getList")
- })
+ )
+ .then(() => {
+ collectNextIQCQuality({
+ trialId: this.trialId,
+ SubjectId: this.data.SubjectId,
+ }).then((res) => {
+ this.$emit('getList')
+ this.$emit('nextTask', res.Result.VisitId)
+ })
+ })
+ .catch(() => {
+ this.$emit('getList')
+ })
} else {
// 没有后续质控任务
- this.$emit("getList");
- this.$confirm(this.$t("trials:qcQuality:title:closeQCDialog"))
+ this.$emit('getList')
+ this.$confirm(this.$t('trials:qcQuality:title:closeQCDialog'))
.then(() => {
- this.$emit("close");
+ this.$emit('close')
})
- .catch(() => {});
+ .catch(() => {})
}
- });
+ })
}
})
.catch(() => {
- this.loading = false;
- this.$refs["signForm"].btnLoading = false;
- });
+ this.loading = false
+ this.$refs['signForm'].btnLoading = false
+ })
},
getNextQCInfo() {
// '是否确认进入下一个质控任务?'
- var message = this.$t("trials:qcQuality:title:title2");
+ var message = this.$t('trials:qcQuality:title:title2')
this.$confirm(message, {
- type: "warning",
+ type: 'warning',
distinguishCancelAndClose: true,
})
.then(() => {
- this.loading = true;
- this.$emit("nextTask");
+ this.loading = true
+ this.$emit('nextTask')
})
.catch((action) => {
- this.loading = false;
- });
+ this.loading = false
+ })
},
// 设置已删除序列行样式
tableRowClassName({ row, rowIndex }) {
if (row.IsDeleted) {
- return "delete-row";
+ return 'delete-row'
} else {
- return "";
+ return ''
}
},
// 打开检查信息编辑框
handleEditStudy(row) {
- this.editStudyInfoVisible = true;
- this.studyForm = { ...row };
- var bodyPart = [];
- if (this.studyForm.BodyPartForEdit.indexOf("|") !== -1) {
- bodyPart = this.studyForm.BodyPartForEdit.split("|");
- } else if (this.studyForm.BodyPartForEdit !== "") {
- bodyPart.push(this.studyForm.BodyPartForEdit);
+ this.editStudyInfoVisible = true
+ this.studyForm = { ...row }
+ var bodyPart = []
+ if (this.studyForm.BodyPartForEdit.indexOf('|') !== -1) {
+ bodyPart = this.studyForm.BodyPartForEdit.split('|')
+ } else if (this.studyForm.BodyPartForEdit !== '') {
+ bodyPart.push(this.studyForm.BodyPartForEdit)
}
- this.$set(this.studyForm, "Modality", row.ModalityForEdit);
+ this.$set(this.studyForm, 'Modality', row.ModalityForEdit)
// this.studyForm.Modality = row.ModalityForEdit
- this.studyForm.BodyPartForEdit = bodyPart;
+ this.studyForm.BodyPartForEdit = bodyPart
},
// 更新拍片部位/拍片类型信息
handleUpdateStudyInfo() {
- this.$refs["studyForm"].validate((valid) => {
- if (!valid) return;
- this.btnLoading = true;
- this.studyForm.BodyPart = this.studyForm.BodyPartForEdit.join("|");
+ this.$refs['studyForm'].validate((valid) => {
+ if (!valid) return
+ this.btnLoading = true
+ this.studyForm.BodyPart = this.studyForm.BodyPartForEdit.join('|')
// this.studyForm.Modality = this.studyForm.Modalities
var params = {
id: this.studyForm.StudyId,
@@ -2078,146 +2201,142 @@ export default {
type: 1,
modality: this.studyForm.Modality,
bodyPart: this.studyForm.BodyPart,
- };
+ }
updateModality(this.data.TrialId, params)
.then((res) => {
- this.btnLoading = false;
+ this.btnLoading = false
if (res.IsSuccess) {
- this.getStudyInfo();
- this.$message.success(
- this.$t("common:message:savedSuccessfully")
- );
- this.editStudyInfoVisible = false;
+ this.getStudyInfo()
+ this.$message.success(this.$t('common:message:savedSuccessfully'))
+ this.editStudyInfoVisible = false
}
})
.catch(() => {
- this.btnLoading = false;
- });
- });
+ this.btnLoading = false
+ })
+ })
},
// 设置重传时刷新历史质疑列表及影响指控列表
refreshList() {
// 如果是复审时候设置重传,需要将当前审核状态设置为初审,且刷新页面数据并关闭历史质疑和质疑记录窗口
if (this.currentQCType === 2) {
- this.currentQCType = 1;
+ this.currentQCType = 1
// this.getQCInfo()
- this.getHistoryInfo();
+ this.getHistoryInfo()
} else {
// 如果是初审时候设置重传,不影响
- this.getHistoryInfo();
+ this.getHistoryInfo()
}
- this.$emit("getList");
+ this.$emit('getList')
},
// 打开非Dicom信息编辑框
handleEditNoneDicomInfo(row) {
- const { CodeView, Id, BodyPart, Modality, ImageDate } = { ...row };
- this.noneDicomForm.CodeView = CodeView;
- this.noneDicomForm.Id = Id;
- this.noneDicomForm.BodyPart = BodyPart;
- this.noneDicomForm.Modality = Modality;
- this.noneDicomForm.ImageDate = ImageDate;
- this.noneDicomForm.BodyParts = BodyPart.split(", ");
- this.editNoneDicomVisible = true;
+ const { CodeView, Id, BodyPart, Modality, ImageDate } = { ...row }
+ this.noneDicomForm.CodeView = CodeView
+ this.noneDicomForm.Id = Id
+ this.noneDicomForm.BodyPart = BodyPart
+ this.noneDicomForm.Modality = Modality
+ this.noneDicomForm.ImageDate = ImageDate
+ this.noneDicomForm.BodyParts = BodyPart.split(', ')
+ this.editNoneDicomVisible = true
},
// 更新非Dicom部位/拍片类型信息
handleUpdateNoneDicomInfo() {
this.$refs.noneDicomForm.validate((valid) => {
- if (!valid) return;
- this.btnLoading = true;
- this.noneDicomForm.BodyPart = this.noneDicomForm.BodyParts.join(", ");
- this.noneDicomForm.TrialId = this.trialId;
- this.noneDicomForm.TrialSiteId = this.data.TrialSiteId;
- this.noneDicomForm.SubjectId = this.data.SubjectId;
- this.noneDicomForm.SubjectVisitId = this.data.Id;
+ if (!valid) return
+ this.btnLoading = true
+ this.noneDicomForm.BodyPart = this.noneDicomForm.BodyParts.join(', ')
+ this.noneDicomForm.TrialId = this.trialId
+ this.noneDicomForm.TrialSiteId = this.data.TrialSiteId
+ this.noneDicomForm.SubjectId = this.data.SubjectId
+ this.noneDicomForm.SubjectVisitId = this.data.Id
addOrUpdateNoneDicomStudy(this.noneDicomForm)
.then((res) => {
- this.btnLoading = false;
+ this.btnLoading = false
if (res.IsSuccess) {
- this.getNoneDicomList();
- this.$message.success(
- this.$t("common:message:savedSuccessfully")
- );
- this.editNoneDicomVisible = false;
+ this.getNoneDicomList()
+ this.$message.success(this.$t('common:message:savedSuccessfully'))
+ this.editNoneDicomVisible = false
}
})
.catch(() => {
- this.btnLoading = false;
- });
- });
+ this.btnLoading = false
+ })
+ })
},
// 获取非Dicom检查信息
getNoneDicomList() {
- this.loading = true;
+ this.loading = true
getNoneDicomStudyList(this.data.Id)
.then((res) => {
- this.noneDicomStudyList = res.Result;
- this.loading = false;
+ this.noneDicomStudyList = res.Result
+ this.loading = false
})
.catch(() => {
- this.loading = false;
- });
+ this.loading = false
+ })
},
// 预览文件
previewFile(row) {
// window.open(row.FullFilePath, '_blank')
- this.imgObj.url = row.FullFilePath;
- this.imgObj.loading = true;
- this.imgObj.visible = true;
+ this.imgObj.url = row.FullFilePath
+ this.imgObj.loading = true
+ this.imgObj.visible = true
},
// 预览所有影像
handleViewImages() {
if (this.open) {
- this.open.close();
+ this.open.close()
}
- var token = getToken();
+ 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
}&TokenKey=${token}`,
- });
- this.open = window.open(routeData.href, "_blank");
+ })
+ this.open = window.open(routeData.href, '_blank')
},
// 预览阅片影像
handleViewReadingImages() {
if (this.open) {
- this.open.close();
+ this.open.close()
}
- var token = getToken();
+ 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}&isReading=1&TokenKey=${token}`,
- });
- this.open = window.open(routeData.href, "_blank");
+ })
+ this.open = window.open(routeData.href, '_blank')
},
// 预览临床数据
handlePreviewClinicalData(row) {
- this.rowData = row;
- this.petVisible = true;
+ this.rowData = row
+ this.petVisible = true
},
// 预览某个检查
handlePreviewStudy(row) {
if (this.open) {
- this.open.close();
+ this.open.close()
}
- var token = getToken();
+ var token = getToken()
const routeData = this.$router.resolve({
path: `/showdicom?trialId=${this.trialId}&subjectVisitId=${
this.data.Id
}&studyId=${row.StudyId}&showDelete=${
this.isAudit ? 0 : 1
}&TokenKey=${token}&type=Study`,
- });
- this.open = window.open(routeData.href, "_blank");
+ })
+ this.open = window.open(routeData.href, '_blank')
},
// 预览某个序列
handlePreviewInstance(row) {
try {
if (this.open) {
- this.open.close();
+ this.open.close()
}
- var token = getToken();
+ var token = getToken()
const routeData = this.$router.resolve({
path: `/showdicom?trialId=${this.trialId}&studyId=${
row.StudyId
@@ -2228,58 +2347,58 @@ export default {
}&subjectVisitId=${
this.data.Id
}&type=Series&TokenKey=${token}&description=${row.Description}`,
- });
- this.open = window.open(routeData.href, "_blank");
+ })
+ this.open = window.open(routeData.href, '_blank')
} catch (e) {
- console.log(e);
+ console.log(e)
}
},
// 预览所有检查下非Dicom文件
handleViewAllNoneDicoms() {
if (this.open) {
- this.open.close();
+ this.open.close()
}
// this.previewAllNoneDicomVisible = true
- let trialId = this.$route.query.trialId;
- var token = getToken();
+ let trialId = this.$route.query.trialId
+ var token = getToken()
const routeData = this.$router.resolve({
path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${this.data.Id}&TokenKey=${token}`,
- });
- this.open = window.open(routeData.href, "_blank");
+ })
+ this.open = window.open(routeData.href, '_blank')
},
// 预览单个检查下非Dicom文件
handlePreviewNoneDicomFiles(row) {
if (this.open) {
- this.open.close();
+ this.open.close()
}
- let trialId = this.$route.query.trialId;
- var token = getToken();
+ 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}`,
- });
- this.open = window.open(routeData.href, "_blank");
+ })
+ this.open = window.open(routeData.href, '_blank')
},
getBodyPart(bodyPart) {
- if (!bodyPart) return "";
- var separator = ",";
- if (bodyPart.indexOf("|") > -1) {
- separator = "|";
- } else if (bodyPart.indexOf(",") > -1) {
- separator = ",";
- } else if (bodyPart.indexOf(",") > -1) {
- separator = ",";
+ if (!bodyPart) return ''
+ var separator = ','
+ if (bodyPart.indexOf('|') > -1) {
+ separator = '|'
+ } else if (bodyPart.indexOf(',') > -1) {
+ separator = ','
+ } else if (bodyPart.indexOf(',') > -1) {
+ separator = ','
}
- var arr = bodyPart.split(separator);
+ var arr = bodyPart.split(separator)
var newArr = arr.map((i) => {
- return this.$fd("Bodypart", i.trim(), "Code", this.BodyPart, "Name");
- });
- return newArr.join(" | ");
+ return this.$fd('Bodypart', i.trim(), 'Code', this.BodyPart, 'Name')
+ })
+ return newArr.join(' | ')
},
openManuals() {
- this.$emit("openManuals");
+ this.$emit('openManuals')
},
},
-};
+}