From 88ad9101d4a15a9cf64e867004e00ee56ef35f0b Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Thu, 18 Apr 2024 16:35:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/trials.js | 8 + src/utils/uploadZip.js | 113 ++++++ src/views/recompose/index.vue | 2 +- src/views/system/notice/components/from.vue | 286 +++++++++----- src/views/system/notice/index.vue | 146 ++++--- src/views/system/user/components/Account.vue | 54 +-- src/views/system/user/components/UserInfo.vue | 70 +++- src/views/system/user/edit/index.vue | 30 +- src/views/system/user/list/index.vue | 371 ++++++++++++++---- src/views/system/user/list/list.js | 59 +-- .../components/confirm-visit-list.vue | 35 +- .../components/research-trials-list.vue | 36 +- .../components/view-study-list.vue | 21 +- src/views/trials/trials-inspection/index.vue | 30 +- .../trials-list/components/TrialForm.vue | 27 +- src/views/trials/trials-list/index.vue | 34 +- .../hirVisit/components/edit-study-list.vue | 36 +- .../trials/trials-panel/hirVisit/index.vue | 190 +++------ .../reading/reading-tracking/index.vue | 96 +++-- .../study/components/edit-visit.vue | 4 + .../trial-summary/audit-record/index.vue | 36 -- .../trial-summary/login-log/index.vue | 175 +++++---- 22 files changed, 1226 insertions(+), 633 deletions(-) create mode 100644 src/utils/uploadZip.js diff --git a/src/api/trials.js b/src/api/trials.js index c1f8b0e..d7d3833 100644 --- a/src/api/trials.js +++ b/src/api/trials.js @@ -3548,4 +3548,12 @@ export function getPatientSeriesList(scpStudyId) { url: `/Patient/getPatientSeriesList?scpStudyId=${scpStudyId}`, method: 'get' }) +} + +// 获取系统已确认标准 +export function getSystemConfirmedCreiterionList() { + return request({ + url: `/Patient/getSystemConfirmedCreiterionList`, + method: 'get' + }) } \ No newline at end of file diff --git a/src/utils/uploadZip.js b/src/utils/uploadZip.js new file mode 100644 index 0000000..22e54bf --- /dev/null +++ b/src/utils/uploadZip.js @@ -0,0 +1,113 @@ +import JSZip from "jszip"; +import axios from "axios"; +import { saveAs } from "file-saver"; +import { + getSubjectImageZipInfo, +} from "@/api/trials/visit.js"; +export const downloadImage = async (id) => { + try { + let res = await getSubjectImageZipInfo(id); + if (res.IsSuccess) { + let item = res.Result; + await setfolder(item); + } + } catch (err) { + console.log(err); + } +}; +const setfolder = async (item) => { + const zip = new JSZip(); // 创建实例对象 + let zipObj = {}; + const promises = []; + for (let patient of item.PatientList) { + if (!zipObj[patient.PatientIdStr]) { + zipObj[patient.PatientIdStr] = zip.folder( + `${item.SubjectCode}_${patient.PatientIdStr}` + ); + } + for (let visit of patient.VisitList) { + if (!zipObj[`${patient.PatientIdStr}${visit.VisitName}`]) { + zipObj[`${patient.PatientIdStr}${visit.VisitName}`] = zipObj[ + patient.PatientIdStr + ].folder(visit.VisitName); + } + for (let study of visit.StudyList) { + let date = study.StudyTime.split(" ")[0]; + for (let series of study.SeriesList) { + if ( + !zipObj[ + `${patient.PatientIdStr}${visit.VisitName}${series.Modality}` + ] + ) { + zipObj[ + `${patient.PatientIdStr}${visit.VisitName}${series.Modality}` + ] = zipObj[`${patient.PatientIdStr}${visit.VisitName}`].folder( + `${date}_${series.Modality}` + ); + } + for (let instance of series.InstancePathList) { + let obj = { + subjectCode: item.SubjectCode, + patientIdStr: patient.PatientIdStr, + visitName: visit.VisitName, + date: study.StudyTime.split(" ")[0], + modality: series.Modality, + instancePath: instance.Path, + dicomName: instance.Path.split("/Dicom/")[1], + }; + const promise = handleBatchDown( + obj, + zipObj[ + `${patient.PatientIdStr}${visit.VisitName}${series.Modality}` + ] + ); + promises.push(promise); + } + } + } + } + } + // 生成 zip 文件 + Promise.all(promises) + .then(() => { + // 生成zip 文件 + zip + .generateAsync({ + type: "blob", + compression: "DEFLATE", // STORE: 默认不压缩, DEFLATE:需要压缩 + compressionOptions: { + level: 9, // 压缩等级 1~9 1 压缩速度最快, 9 最优压缩方式 + }, + }) + .then((res) => { + saveAs(res, item.SubjectCode + new Date().getTime() + "_CV.zip"); // 使用FileSaver.saveAs保存文件,文件名可自定义 + zipObj = null; + }); + }) + .catch((reason) => { }); +}; +const handleBatchDown = async (item, zip) => { + return new Promise((resolve) => { + getFileData( + this.OSSclientConfig.basePath + item.instancePath.slice(1) + ).then((res) => { + const fileName = item.dicomName + ".dcm"; + zip.file(fileName, res.data, { binary: true }); + resolve(); + }); + }); +}; +const getFileData = (fileUrl) => { + return new Promise((resolve, reject) => { + axios(fileUrl, { + method: "GET", + responseType: "blob", // 返回的数据会被强制转为blob类型 ,转换成arraybuffer 也行 + }) + .then((res) => { + resolve(res); + }) + .catch((error) => { + reject(error); + }); + }); +}; \ No newline at end of file diff --git a/src/views/recompose/index.vue b/src/views/recompose/index.vue index c82c456..794f12f 100644 --- a/src/views/recompose/index.vue +++ b/src/views/recompose/index.vue @@ -146,7 +146,7 @@ export default { } diff --git a/src/views/system/user/list/list.js b/src/views/system/user/list/list.js index 385ae42..4cbdce5 100644 --- a/src/views/system/user/list/list.js +++ b/src/views/system/user/list/list.js @@ -71,17 +71,19 @@ export const columns = [ label: 'Internal Or External:', hidden: true, slot: 'isZhiZhunSlot', - minWidth: 160, + minWidth: 140, sortable: 'custom', - showOverflowTooltip: true }, - // { - // prop: 'IsTestUser', - // label: 'Is Test User', - // hidden: true, - // slot: 'isTestUserSlot', - // minWidth: 120, - // sortable: 'custom', - // showOverflowTooltip: true }, + showOverflowTooltip: true + }, + { + prop: 'IsTestUser', + label: 'Is Test User', + hidden: true, + slot: 'isTestUserSlot', + minWidth: 120, + sortable: 'custom', + showOverflowTooltip: true + }, { prop: 'Status', label: 'Status', @@ -89,14 +91,17 @@ export const columns = [ slot: 'statusSlot', minWidth: 100, sortable: 'custom', - showOverflowTooltip: true }, - { type: 'operate', + showOverflowTooltip: true + }, + { + type: 'operate', label: 'Action', - minWidth: 100, + minWidth: 200, operates: [ { name: 'Edit', type: 'primary', emitKey: 'editCb' }, // { name: 'Delete', type: 'danger', emitKey: 'deleteCb' } - ] } + ] + } ] // 用户列表查询表单配置信息 @@ -142,19 +147,19 @@ export const searchForm = [ change: scope => '', placeholder: '' }, - // { - // type: 'Select', - // label: 'Is Test User:', - // prop: 'IsTestUser', - // width: '100px', - // options: [ - // { label: 'Yes', value: true }, - // { label: 'No', value: false } - // ], - // props: { label: 'label', value: 'value' }, - // change: scope => '', - // placeholder: '' - // }, + { + type: 'Select', + label: 'Is Test User:', + prop: 'IsTestUser', + width: '100px', + options: [ + { label: 'Yes', value: true }, + { label: 'No', value: false } + ], + props: { label: 'label', value: 'value' }, + change: scope => '', + placeholder: '' + }, { type: 'Select', label: 'Status:', diff --git a/src/views/trials/trials-inspection/components/confirm-visit-list.vue b/src/views/trials/trials-inspection/components/confirm-visit-list.vue index 829ec75..af981fd 100644 --- a/src/views/trials/trials-inspection/components/confirm-visit-list.vue +++ b/src/views/trials/trials-inspection/components/confirm-visit-list.vue @@ -129,11 +129,13 @@ min-width="140" sortable="custom" > - + + + + + diff --git a/src/views/trials/trials-inspection/components/research-trials-list.vue b/src/views/trials/trials-inspection/components/research-trials-list.vue index ec878ee..c7cd5fe 100644 --- a/src/views/trials/trials-inspection/components/research-trials-list.vue +++ b/src/views/trials/trials-inspection/components/research-trials-list.vue @@ -46,6 +46,13 @@ show-overflow-tooltip min-width="140" > + + {{ $fd("sex", Number(scope.row.Sex)) }} - - - + @@ -124,13 +124,19 @@ diff --git a/src/views/trials/trials-inspection/components/view-study-list.vue b/src/views/trials/trials-inspection/components/view-study-list.vue index c48091e..33c60ec 100644 --- a/src/views/trials/trials-inspection/components/view-study-list.vue +++ b/src/views/trials/trials-inspection/components/view-study-list.vue @@ -135,13 +135,20 @@ diff --git a/src/views/trials/trials-inspection/index.vue b/src/views/trials/trials-inspection/index.vue index 3736d7c..067b73f 100644 --- a/src/views/trials/trials-inspection/index.vue +++ b/src/views/trials/trials-inspection/index.vue @@ -59,6 +59,18 @@ clearable /> + + + + + @@ -213,10 +225,11 @@ @@ -272,6 +285,8 @@ const defaultSearchData = () => { callingAE: null, ExperimentName: null, Asc: false, + BeginPushTime: null, + EndPushTime: null, SortField: "LatestPushTime", PageIndex: 1, PageSize: 10, @@ -292,6 +307,7 @@ export default { searchData: defaultSearchData(), calledAeList: [], callingAeList: [], + dateValue: [], // 检查列表 total: 0, loading: false, @@ -340,6 +356,13 @@ export default { Object.keys(this.searchData).forEach((key) => { data[key] = this.searchData[key]; }); + if (this.dateValue[0] && this.dateValue[1]) { + data.BeginPushTime = this.dateValue[0].toISOString(); + data.EndPushTime = this.dateValue[1].toISOString(); + } else { + data.BeginPushTime = null; + data.EndPushTime = null; + } try { this.loading = true; let res = await getPatientList(data); @@ -361,6 +384,7 @@ export default { handleReset() { this.searchData = defaultSearchData(); this.$refs.inspectionList.clearSort(); + this.dateValue = []; this.getList(); }, // 表格排序 diff --git a/src/views/trials/trials-list/components/TrialForm.vue b/src/views/trials/trials-list/components/TrialForm.vue index e94b9da..e99da81 100644 --- a/src/views/trials/trials-list/components/TrialForm.vue +++ b/src/views/trials/trials-list/components/TrialForm.vue @@ -125,10 +125,10 @@ > @@ -217,7 +217,11 @@