From 93b0621ba1e2756f551735e9341a38084776fbb6 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 5 Jun 2024 17:52:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=9F=A5=E9=83=A8=E4=BD=8D=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E6=96=B9=E5=BC=8F=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/global.js | 10 +++--- src/main.js | 32 +++++++++++++++---- src/views/none-dicom-show/index.vue | 5 +-- .../trials-list/components/TrialForm.vue | 20 ++++++++---- .../reading/dicoms/none-dicoms.vue | 5 +-- .../none-dicoms/components/VisitReview.vue | 5 +-- src/views/trials/trials-panel/study/index.vue | 5 +-- .../components/subjectStudy.vue | 5 +-- .../trial-summary/trial-information/index.vue | 2 +- .../visit/crc-upload/components/studyInfo.vue | 13 +++++--- .../components/uploadDicomFiles.vue | 8 +++-- .../components/uploadDicomFiles2.vue | 13 +++++--- .../components/uploadNonDicomFiles.vue | 12 ++++--- .../visit/qc-check/components/dicomFiles.vue | 9 +++--- .../qc-check/components/qualityAssurance.vue | 18 +++++++---- 15 files changed, 108 insertions(+), 54 deletions(-) diff --git a/src/api/global.js b/src/api/global.js index 6d0a4b58..a568bea3 100644 --- a/src/api/global.js +++ b/src/api/global.js @@ -14,17 +14,19 @@ export function getHospitalList() { }) } -export function getAllSponsorList() { +export function getAllSponsorList(params) { return request({ url: '/sponsor/getAllSponsorList', - method: 'get' + method: 'get', + params }) } -export function getAllCROList() { +export function getAllCROList(params) { return request({ url: '/cro/getAllCROList', - method: 'get' + method: 'get', + params }) } export function getAllSiteList() { diff --git a/src/main.js b/src/main.js index 6bab2a98..b2eae15e 100644 --- a/src/main.js +++ b/src/main.js @@ -24,7 +24,6 @@ Vue.use(VueClipboard) // import htmlToPdf from './utils/htmlToPdf' // Vue.use(htmlToPdf) import permission from './utils/permission' -import { OSSclient } from './utils/oss' Vue.use(permission) import Viewer from 'v-viewer' @@ -80,6 +79,7 @@ import DictTag from '@/components/DictTag' import DictData from '@/components/DictData' import { getBasicDataSelect } from '@/api/dictionary/dictionary' import { checkConfig } from '@/const/check/index' +import { getTrialBodyPartList } from "@/api/trials/setting"; // 全局方法挂载 var $q = params Vue.prototype.checkConfig = checkConfig @@ -181,6 +181,24 @@ async function VueInit() { zhMessages[v.Code] = v.ValueCN enMessages[v.Code] = v.Value }) + // 获取检查部位 + Vue.prototype.$getBodyPart = (id) => { + return new Promise(async (resolve, reject) => { + try { + let params = { + TrialId: id + } + let BodyPart = await getTrialBodyPartList(params) + if (BodyPart.IsSuccess) { + resolve(BodyPart.Result); + } else { + reject(BodyPart); + } + } catch (err) { + reject(err) + } + }) + } i18n.mergeLocaleMessage('zh', zhMessages) i18n.mergeLocaleMessage('en', enMessages) Vue.use(ElementUI, { @@ -210,15 +228,17 @@ async function VueInit() { return dictInfo }() Vue.prototype.$d = d - Vue.prototype.$fd = function (code, v, type) { + Vue.prototype.$fd = function (code, v, type, arr, key = 'label') { try { + let data = arr || d; + type = type || 'value'; + console.log(data,type,key,code) // code === 'YesOrNo' ? console.log(d) : '' - type = type || 'value' - return d[code].find(i => { + return data[code].find(i => { return i[type] === v - }) ? d[code].find(i => { + }) ? data[code].find(i => { return i[type] === v - }).label : '' + })[key] : '' } catch (e) { } } diff --git a/src/views/none-dicom-show/index.vue b/src/views/none-dicom-show/index.vue index 50502285..baab5ae2 100644 --- a/src/views/none-dicom-show/index.vue +++ b/src/views/none-dicom-show/index.vue @@ -96,7 +96,7 @@ export default { // 默认选择第一个文件 }, methods: { - getBodyPart(bodyPart) { + async getBodyPart(bodyPart) { if (!bodyPart) return '' var separator = ',' if (bodyPart.indexOf('|') > -1) { @@ -107,8 +107,9 @@ export default { separator = ',' } var arr = bodyPart.split(separator) + let bp = await this.$getBodyPart(this.$route.query.trialId) var newArr = arr.map(i => { - return this.$fd('Bodypart', i.trim()) + return this.$fd('Bodypart', i.trim(),'Code',{Bodypart:bp},'Name') }) return newArr.join(' | ') }, diff --git a/src/views/trials/trials-list/components/TrialForm.vue b/src/views/trials/trials-list/components/TrialForm.vue index 77ed1ba3..0727b0e8 100644 --- a/src/views/trials/trials-list/components/TrialForm.vue +++ b/src/views/trials/trials-list/components/TrialForm.vue @@ -17,7 +17,10 @@ :label="$t('trials:trials-list:form:trialId')" prop="TrialCode" > - +