diff --git a/src/api/dictionary.js b/src/api/dictionary.js index d0ac4ede..0e7f6382 100644 --- a/src/api/dictionary.js +++ b/src/api/dictionary.js @@ -1092,4 +1092,66 @@ export function deleteSysFileType(id) { url: `/SysFileType/deleteSysFileType/${id}`, method: 'delete' }) +} +// 项目文档-获取项目菜单 +export function getTrialFileTypeData(data) { + return request({ + url: `/TrialFileType/getTrialFileTypeData`, + method: 'post', + data + }) +} +// 项目文档-修改项目菜单启用 +export function setAuthorizedView(data) { + return request({ + url: `/TrialFileType/setAuthorizedView`, + method: 'post', + data + }) +} +// 项目文档-新增/修改项目菜单 +export function addOrUpdateTrialFileType(data) { + return request({ + url: `/TrialFileType/addOrUpdateTrialFileType`, + method: 'post', + data + }) +} +// 项目文档-删除项目菜单 +export function deleteTrialFileType(id) { + return request({ + url: `/TrialFileType/deleteTrialFileType/${id}`, + method: 'delete', + }) +} +// 项目文档-报告/文档列表 +export function getTrialFinalRecordList(data) { + return request({ + url: `/TrialFinalRecord/getTrialFinalRecordList`, + method: 'post', + data + }) +} +// 项目文档-报告/文档授权 +export function authorizedTrialFinalRecord(data) { + return request({ + url: `/TrialFinalRecord/authorizedTrialFinalRecord`, + method: 'post', + data + }) +} +// 项目文档-报告/文档新增/修改 +export function addOrUpdateTrialFinalRecord(data) { + return request({ + url: `/TrialFinalRecord/addOrUpdateTrialFinalRecord`, + method: 'post', + data + }) +} +// 项目文档-删除报告/文档 +export function deleteTrialFinalRecord(id) { + return request({ + url: `/TrialFinalRecord/deleteTrialFinalRecord/${id}`, + method: 'delete', + }) } \ No newline at end of file diff --git a/src/main.js b/src/main.js index 12bbc267..574da621 100644 --- a/src/main.js +++ b/src/main.js @@ -461,8 +461,8 @@ async function VueInit() { var my_username = zzSessionStorage.getItem('my_username') var my_password = zzSessionStorage.getItem('my_password') let my_userid = zzSessionStorage.getItem('userId') - let my_EMail = zzSessionStorage.getItem('my_EMail') - if (md5(_vm.unlock.my_password) === my_password && my_username === _vm.unlock.my_username) { + let my_EMail = zzSessionStorage.getItem('my_EMail') || '' + if (md5(_vm.unlock.my_password) === my_password && (my_username === _vm.unlock.my_username || my_EMail.toUpperCase() === vm.unlock.my_username.toUpperCase())) { resetReadingRestTime().then(() => { }) const closeLock = (_vm) => { diff --git a/src/utils/index.js b/src/utils/index.js index 00d9b594..caab2046 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -34,7 +34,7 @@ export function parseTime(time, cFormat) { const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => { const value = formatObj[key] // Note: getDay() returns 0 on Sunday - if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] } + if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } return value.toString().padStart(2, '0') }) return time_str @@ -51,12 +51,44 @@ export function param2Obj(url) { } return JSON.parse( '{"' + - decodeURIComponent(search) - .replace(/"/g, '\\"') - .replace(/&/g, '","') - .replace(/=/g, '":"') - .replace(/\+/g, ' ') + - '"}' + decodeURIComponent(search) + .replace(/"/g, '\\"') + .replace(/&/g, '","') + .replace(/=/g, '":"') + .replace(/\+/g, ' ') + + '"}' ) } +export function deepClone(source, map = new WeakMap()) { + // 处理基本类型和函数(直接返回) + if (typeof source !== 'object' || source === null) { + return source; + } + + // 处理循环引用 + if (map.has(source)) { + return map.get(source); + } + + // 创建新容器 + const target = Array.isArray(source) ? [] : {}; + map.set(source, target); // 记录克隆关系 + + // 克隆普通键值 + for (const key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = deepClone(source[key], map); + } + } + + // 克隆Symbol键值(ES6+) + const symbolKeys = Object.getOwnPropertySymbols(source); + for (const symKey of symbolKeys) { + if (source.propertyIsEnumerable(symKey)) { + target[symKey] = deepClone(source[symKey], map); + } + } + + return target; +} \ No newline at end of file diff --git a/src/utils/stream.js b/src/utils/stream.js index 8ee5c5aa..4cec5825 100644 --- a/src/utils/stream.js +++ b/src/utils/stream.js @@ -20,7 +20,7 @@ function zipFiles(zipName, files) { ctrl.close(); } else { let { name, url } = fileInfo.value; - url = decodeUtf8(url); + // url = decodeUtf8(url); // 待定,可能做过特殊处理 return fetch(url).then(res => { ctrl.enqueue({ name, diff --git a/src/views/dictionary/template/file/fileForm.vue b/src/views/dictionary/template/file/fileForm.vue index bbfc6a4a..95086846 100644 --- a/src/views/dictionary/template/file/fileForm.vue +++ b/src/views/dictionary/template/file/fileForm.vue @@ -186,39 +186,6 @@ export default { canel() { this.$emit('close') }, - handleRemoveFile() { - this.form.FileName = null - this.form.Path = null - this.fileList = [] - }, - beforeUpload() { - if (this.fileList.length > 0) { - this.$alert(this.$t('dictionary:bbrowser:msg:message1')) - return - } - }, - handlePreview(row, r2) { - if (row.fullPath) { - window.open(row.fullPath, '_blank') - } - }, - async handleUploadFile(param) { - this.loading = true - var file = await this.fileToBlob(param.file) - const res = await this.OSSclient.put( - `/System/Browser/${param.file.name}`, - file - ) - this.fileList.push({ - name: param.file.name, - path: this.$getObjectName(res.url), - fullPath: this.$getObjectName(res.url), - url: this.$getObjectName(res.url), - }) - this.form.Path = this.$getObjectName(res.url) - this.form.FileName = param.file.name - this.loading = false - }, }, } \ No newline at end of file diff --git a/src/views/none-dicom-show/components/image-viewer.vue b/src/views/none-dicom-show/components/image-viewer.vue index a9718f07..92ec89b6 100644 --- a/src/views/none-dicom-show/components/image-viewer.vue +++ b/src/views/none-dicom-show/components/image-viewer.vue @@ -1,13 +1,19 @@ /* eslint-disable no-unused-vars */ diff --git a/src/views/none-dicom-show/components/preview.vue b/src/views/none-dicom-show/components/preview.vue index 327c2279..7eedf98e 100644 --- a/src/views/none-dicom-show/components/preview.vue +++ b/src/views/none-dicom-show/components/preview.vue @@ -1,6 +1,5 @@ diff --git a/src/views/none-dicom-show/index.vue b/src/views/none-dicom-show/index.vue index e605daad..8eb0044f 100644 --- a/src/views/none-dicom-show/index.vue +++ b/src/views/none-dicom-show/index.vue @@ -9,6 +9,9 @@
{{ study.CodeView }} + {{ + study.StudyName + }} {{ study.Modality }} {{ getBodyPart(study.BodyPart) }}
@@ -45,7 +48,7 @@ -
+
+
+ +
+ \ No newline at end of file diff --git a/src/views/trials/trials-panel/trial-summary/trial-document/index.vue b/src/views/trials/trials-panel/trial-summary/trial-document/index.vue new file mode 100644 index 00000000..b98a2d6a --- /dev/null +++ b/src/views/trials/trials-panel/trial-summary/trial-document/index.vue @@ -0,0 +1,133 @@ + + + \ No newline at end of file diff --git a/src/views/trials/trials-panel/visit/crc-upload/components/studyInfo.vue b/src/views/trials/trials-panel/visit/crc-upload/components/studyInfo.vue index 837c3210..f1a86870 100644 --- a/src/views/trials/trials-panel/visit/crc-upload/components/studyInfo.vue +++ b/src/views/trials/trials-panel/visit/crc-upload/components/studyInfo.vue @@ -14,7 +14,7 @@ icon="el-icon-delete" @click="handleBatchDelete" > - {{ $t("trials:uploadedDicoms:action:delete") }} + {{ $t('trials:uploadedDicoms:action:delete') }} - {{ $t("trials:uploadedDicoms:action:preview") }} + {{ $t('trials:uploadedDicoms:action:preview') }}
+ + @@ -223,7 +229,9 @@ v-for="bodyPart in trialBodyPartTypes" :key="bodyPart" :label="bodyPart" - >{{ $fd("Bodypart", bodyPart,'Code',BodyPart,'Name') }}{{ + $fd('Bodypart', bodyPart, 'Code', BodyPart, 'Name') + }} @@ -258,7 +266,7 @@ type="primary" @click="editStudyInfoVisible = false" > - {{ $t("common:button:cancel") }} + {{ $t('common:button:cancel') }} - {{ $t("common:button:save") }} + {{ $t('common:button:save') }}
@@ -291,18 +299,18 @@ import { getSubjectVisitUploadedStudyList, deleteStudyList, updateModality, -} from "@/api/trials"; -import moment from "moment"; -import { getToken } from "@/utils/auth"; -import uploadPetClinicalData from "./uploadPetClinicalData.vue"; +} from '@/api/trials' +import moment from 'moment' +import { getToken } from '@/utils/auth' +import uploadPetClinicalData from './uploadPetClinicalData.vue' export default { - name: "StudyInfo", + name: 'StudyInfo', components: { uploadPetClinicalData }, props: { data: { type: Object, default() { - return {}; + return {} }, }, }, @@ -310,12 +318,12 @@ export default { return { editStudyInfoVisible: false, studyForm: { - StudyCode: "", + StudyCode: '', IsDicomData: true, - Modalities: "", + Modalities: '', BodyPartForEdit: [], SeriesCount: null, - StudyTime: "", + StudyTime: '', }, deleteArr: [], studyLoading: false, @@ -331,189 +339,187 @@ export default { petVisible: false, rowData: {}, - BodyPart:{} - }; + BodyPart: {}, + } }, async mounted() { - this.getStudyInfo(); + this.getStudyInfo() this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId) }, methods: { // 预览临床数据 handlePreviewClinicalData(row) { - this.rowData = row; - this.petVisible = true; + this.rowData = row + this.petVisible = true }, // 打开检查信息编辑框 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.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.studyForm.Modality = this.studyForm.Modalities; + 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, subjectVisitId: this.data.Id, 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 + }) + }) }, getStudyInfo() { - this.studyLoading = true; + this.studyLoading = true getSubjectVisitUploadedStudyList(this.data.Id) .then((res) => { - this.studyList = res.Result; - this.studyLoading = false; - this.relationInfo = res.OtherInfo; - console.log(this.relationInfo); + this.studyList = res.Result + this.studyLoading = false + this.relationInfo = res.OtherInfo + console.log(this.relationInfo) this.trialBodyPartTypes = this.relationInfo.BodyPartTypes - ? this.relationInfo.BodyPartTypes.split("|") - : []; + ? this.relationInfo.BodyPartTypes.split('|') + : [] this.trialModalitys = this.relationInfo.Modalitys - ? this.relationInfo.Modalitys.split("|") - : []; - console.log(this.trialBodyPartTypes); - console.log(this.trialModalitys); + ? this.relationInfo.Modalitys.split('|') + : [] + console.log(this.trialBodyPartTypes) + console.log(this.trialModalitys) }) .catch(() => { - this.studyLoading = false; - }); + this.studyLoading = false + }) }, // 批量删除 handleBatchDelete() { - this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), { - type: "warning", + this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), { + type: 'warning', distinguishCancelAndClose: true, }) .then(() => { - this.studyLoading = true; + this.studyLoading = true deleteStudyList(this.trialId, this.data.Id, this.deleteArr) .then((res) => { if (res.IsSuccess) { - this.getStudyInfo(); - this.$emit("getList"); + this.getStudyInfo() + this.$emit('getList') this.$message.success( - this.$t("trials:uploadedDicoms:message:deleteSuccessfully") - ); + this.$t('trials:uploadedDicoms:message:deleteSuccessfully') + ) } }) .catch(() => { - this.studyLoading = true; - }); + this.studyLoading = true + }) }) - .catch(() => {}); + .catch(() => {}) }, // 预览所有影像 handlePreviewAllFiles() { - var tokenKey = getToken(); + var tokenKey = getToken() const routeData = this.$router.resolve({ path: `/showvisitdicoms?trialId=${this.data.TrialId}&visitInfo=${this.data.VisitName}(${this.data.VisitNum})&subjectVisitId=${this.data.Id}&isFromCRCUpload=1&TokenKey=${tokenKey}`, - }); - var newWindow = window.open(routeData.href, "_blank"); - this.$emit("setOpenWindow", newWindow); + }) + var newWindow = window.open(routeData.href, '_blank') + this.$emit('setOpenWindow', newWindow) }, // 预览影像 handleViewStudy(row) { - var token = getToken(); + var token = getToken() const routeData = this.$router.resolve({ path: `/showdicom?studyId=${row.StudyId}&isFromCRCUpload=1&TokenKey=${token}&type=Study`, - }); - var newWindow = window.open(routeData.href, "_blank"); - this.$emit("setOpenWindow", newWindow); + }) + var newWindow = window.open(routeData.href, '_blank') + this.$emit('setOpenWindow', newWindow) }, // 删除某个检查 handleDeleteStudy(row) { - this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), { - type: "warning", + this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), { + type: 'warning', distinguishCancelAndClose: true, }) .then(() => { - this.studyLoading = true; + this.studyLoading = true deleteStudyList(this.trialId, this.data.Id, [row.StudyId]) .then((res) => { if (res.IsSuccess) { - this.getStudyInfo(); - this.$emit("getList"); + this.getStudyInfo() + this.$emit('getList') this.$message.success( - this.$t("trials:uploadedDicoms:message:deleteSuccessfully") - ); + this.$t('trials:uploadedDicoms:message:deleteSuccessfully') + ) } }) .catch(() => { - this.studyLoading = true; - }); + this.studyLoading = true + }) }) - .catch(() => {}); + .catch(() => {}) }, 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 newArr = arr.map(i => { - return this.$fd('Bodypart', i.trim(),'Code',this.BodyPart,'Name') + var arr = bodyPart.split(separator) + var newArr = arr.map((i) => { + return this.$fd('Bodypart', i.trim(), 'Code', this.BodyPart, 'Name') }) - return newArr.join(" | "); + return newArr.join(' | ') }, // 获取勾选项 handleSelectionChange(val) { - this.deleteArr = []; + this.deleteArr = [] val.forEach((item) => { - this.deleteArr.push(item.StudyId); - }); + this.deleteArr.push(item.StudyId) + }) }, // 设置已删除行勾选状态 hasDeleted(row) { if (row.IsDeleted) { - return false; + return false } else { - return true; + return true } }, // 设置已删除序列行样式 tableRowClassName({ row, rowIndex }) { if (row.IsDeleted) { - return "delete-row"; + return 'delete-row' } else { - return ""; + return '' } }, }, -}; +}