diff --git a/.env.usa b/.env.usa index fb686483..06df05fe 100644 --- a/.env.usa +++ b/.env.usa @@ -2,28 +2,28 @@ ENV = 'usa' NODE_ENV = 'usa' # base public path -VUE_APP_BASE_PATH = 'https://ei-code-prod.s3.amazonaws.com/2024-07-10/' +VUE_APP_BASE_PATH = 'https://ei-code-prod.s3.amazonaws.com/2024-07-12/' # 是否开启登陆限制 true:是 false:否 -VUE_APP_LOGIN_FOR_PERMISSION = false +VUE_APP_LOGIN_FOR_PERMISSION = true # 是否开启长时间无操作锁定弹框MFA验证 true:是 false:否 VUE_APP_LOCK_FOR_PERMISSION_MFA = true # 是否开启长时间无操作锁定弹框 true:是 false:否 -VUE_APP_LOCK_FOR_PERMISSION = false +VUE_APP_LOCK_FOR_PERMISSION = true # 无操作锁定弹框判断时间 单位:秒 VUE_APP_LOCK_FOR_TIME = 900 # 是否开启长时间无操作登出 true:是 false:否 -VUE_APP_LOGOUT_FOR_PERMISSION = false +VUE_APP_LOGOUT_FOR_PERMISSION = true # 无操作锁定弹框判断时间 单位:秒 VUE_APP_LOGOUT_FOR_TIME = 1800 # 是否开启密码正则验证 true:是 false:否 -VUE_APP_PASSWORD_FOR_PERMISSION = false +VUE_APP_PASSWORD_FOR_PERMISSION = true # 是否开启密码正则验证 true:是 false:否 VUE_APP_PASSWORD_FOR_REGULAR = ^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[-_.@^+\$!%#*?&\$~])[A-Za-z0-9-~_.@^+\$~!%#*?&]{8,32}$ diff --git a/.env.usa_prod b/.env.usa_prod new file mode 100644 index 00000000..5a6ac5da --- /dev/null +++ b/.env.usa_prod @@ -0,0 +1,46 @@ +# just a flag +ENV = 'usa' +NODE_ENV = 'usa' +# base public path +VUE_APP_BASE_PATH = 'https://ei-med-s3-code.s3.amazonaws.com/2024-07-11/' + +# 是否开启登陆限制 true:是 false:否 +VUE_APP_LOGIN_FOR_PERMISSION = true + +# 是否开启长时间无操作锁定弹框MFA验证 true:是 false:否 +VUE_APP_LOCK_FOR_PERMISSION_MFA = true + +# 是否开启长时间无操作锁定弹框 true:是 false:否 +VUE_APP_LOCK_FOR_PERMISSION = true + +# 无操作锁定弹框判断时间 单位:秒 +VUE_APP_LOCK_FOR_TIME = 900 + +# 是否开启长时间无操作登出 true:是 false:否 +VUE_APP_LOGOUT_FOR_PERMISSION = true + +# 无操作锁定弹框判断时间 单位:秒 +VUE_APP_LOGOUT_FOR_TIME = 1800 + +# 是否开启密码正则验证 true:是 false:否 +VUE_APP_PASSWORD_FOR_PERMISSION = true + +# 是否开启密码正则验证 true:是 false:否 +VUE_APP_PASSWORD_FOR_REGULAR = ^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[-_.@^+\$!%#*?&\$~])[A-Za-z0-9-~_.@^+\$~!%#*?&]{8,32}$ + +# 是否开启文档签署验证 true:是 false:否 +VUE_APP_WORD_FOR_PERMISSION = true + +# 公司名称 +VUE_APP_COMPANY_NAME = "Elevate Imaging" + +# dicom文件地址 +VUE_APP_DICOM_PATH = 'https://zyypacs-usa.oss-us-west-1.aliyuncs.com' + +VUE_APP_DICOM_USA_PATH = 'https://zyypacs-usa.oss-us-west-1.aliyuncs.com' + +VUE_APP_OSS_CONFIG_REGION = 'oss-us-west-1' + +VUE_APP_OSS_CONFIG_BUCKET = 'zyypacs-usa' + +VUE_APP_OSS_PATH = '/usa/dist' diff --git a/irc_vue_drone.yml b/irc_vue_drone.yml index e62410c1..923189c7 100644 --- a/irc_vue_drone.yml +++ b/irc_vue_drone.yml @@ -10,51 +10,20 @@ clone: disable: true #禁用默认克隆 server: - host: 106.14.89.110 + host: 47.117.164.182 user: root password: from_secret: local_pwd steps: -- name: publish-test-irc-vue +- name: uat-branch-publish-irc-vue commands: - - echo start publish test-irc-vue - - cd /opt/1panel/hang/vue/test-irc - - sh test-irc.sh v${DRONE_BUILD_NUMBER} + - cd /opt/1panel/vue-devops/Uat_IRC/Uat-To-Uat + - sh uat-to-uat.sh v${DRONE_BUILD_NUMBER} trigger: branch: - - main + - uat ---- - -kind: pipeline -type: ssh -name: ssh-linux-test-study-publish - -platform: - os: Linux - arch: 386 - -clone: - disable: true #禁用默认克隆 - -server: - host: 106.14.89.110 - user: root - password: - from_secret: local_pwd - -steps: -- name: publish-test-study - commands: - - echo start publish test-study-api - - cd /opt/1panel/hang/devops/test-study - - sh test-study.sh v${DRONE_BUILD_NUMBER} - -trigger: - branch: - - Test.Study - \ No newline at end of file diff --git a/package.json b/package.json index c8e19825..db3d591c 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "build:prod": "vue-cli-service build --mode prod", "build:uat": "vue-cli-service build --mode uat", "build:usa": "vue-cli-service build --mode usa", + "build:usa_prod": "vue-cli-service build --mode usa_prod", "pre": "vue-cli-service build --mode pre", "i18n": "npm run i18n:zh && npm run i18n:en", "i18n:zh": "node i18nGenerate.js lang=zh keyCol=5 valCol=6", diff --git a/src/App.vue b/src/App.vue index 7b7c9651..2b74fb5f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -89,6 +89,7 @@ import { batchAddOrUpdateFrontInternationalization, getFrontInternationalizationList, } from "@/api/dictionary/dictionary"; +import { getTrialExtralConfig } from "@/api/trials"; import Vue from "vue"; import i18n from "./lang"; export default { @@ -105,6 +106,28 @@ export default { mounted() { this.show = process.env.VUE_APP_OSS_PATH === "/test/dist"; }, + watch: { + "$route.query": { + async handler() { + if ( + this.$route.query.trialId && + this.$route.query.trialId !== this.$store.state.trials.config.trialId + ) { + let res = await getTrialExtralConfig({ + TrialId: this.$route.query.trialId, + }); + if (res.IsSuccess) { + this.$store.dispatch("trials/setConfig", { + trialId: this.$route.query.trialId, + ...res.Result, + }); + } + } + }, + immediate: true, + deep: true, + }, + }, methods: { changeValue(target, attr, e) { this.$set(target, attr, e); diff --git a/src/api/reading.js b/src/api/reading.js index 9fb24d6b..0f670256 100644 --- a/src/api/reading.js +++ b/src/api/reading.js @@ -171,3 +171,19 @@ export function getCustomTag(param) { data: param }) } + +export function clearSkipReadingCache(param) { + return request({ + url: `/ReadingImageTask/clearSkipReadingCache`, + method: 'post', + data: param + }) +} + +export function setSkipReadingCache(param) { + return request({ + url: `/ReadingImageTask/setSkipReadingCache`, + method: 'post', + data: param + }) +} diff --git a/src/api/trials.js b/src/api/trials.js index 5262502c..353b2a69 100644 --- a/src/api/trials.js +++ b/src/api/trials.js @@ -3723,6 +3723,14 @@ export function getTrialDicomAE(params) { params }) } +// 获取项目配置 +export function getTrialExtralConfig(params) { + return request({ + url: `/TrialConfig/getTrialExtralConfig`, + method: 'get', + params + }) +} // 项目新增或修改dicomAE配置 export function addOrUpdateDicomAE(data) { return request({ @@ -3785,4 +3793,4 @@ export function getDicomCallingAEList(params) { method: 'get', params }) -} \ No newline at end of file +} diff --git a/src/assets/title-logo.png b/src/assets/title-logo.png index 37531211..fa09d218 100644 Binary files a/src/assets/title-logo.png and b/src/assets/title-logo.png differ diff --git a/src/icons/svg/login-bg.svg b/src/icons/svg/login-bg.svg new file mode 100644 index 00000000..f65c3c32 --- /dev/null +++ b/src/icons/svg/login-bg.svg @@ -0,0 +1,793 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/icons/svg/login-logo.svg b/src/icons/svg/login-logo.svg new file mode 100644 index 00000000..1778278a --- /dev/null +++ b/src/icons/svg/login-logo.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/permission.js b/src/permission.js index a387445f..4c881eed 100644 --- a/src/permission.js +++ b/src/permission.js @@ -12,7 +12,7 @@ NProgress.configure({ showSpinner: false }) const whiteList = ['/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/researchLogin_m', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms'] -router.beforeEach(async(to, from, next) => { +router.beforeEach(async (to, from, next) => { NProgress.start() // 设置页面标题 // document.title = getPageTitle(to.meta.title) @@ -81,7 +81,7 @@ router.beforeEach(async(to, from, next) => { next(`/ReviewersResearch?`) NProgress.done() } else { - // 其他无权访问的页面将重定向到登录页面。 + // 其他无权访问的页面将重定向到登录页面。 next(`/login?`) NProgress.done() } diff --git a/src/store/modules/trials.js b/src/store/modules/trials.js index ed8ba8e1..609faffa 100644 --- a/src/store/modules/trials.js +++ b/src/store/modules/trials.js @@ -8,6 +8,7 @@ const getDefaultState = () => { visitPointQuery: null, studyListQuery: null, unlock: false, + config: {}, } } @@ -20,6 +21,9 @@ const mutations = { SET_UNLOCK: (state, unlock) => { state.unlock = unlock }, + SET_CONFIG: (state, config) => { + state.config = config + }, SET_ACTIVENAME: (state, activeName) => { state.trialDetailActiveName = activeName }, @@ -44,6 +48,9 @@ const actions = { setUnLock({ commit }, unlock) { commit('SET_UNLOCK', unlock) }, + setConfig({ commit }, config) { + commit('SET_CONFIG', config) + }, setActiveName({ commit }, activeName) { commit('SET_ACTIVENAME', activeName) }, diff --git a/src/utils/dcmUpload/anonymization.js b/src/utils/dcmUpload/anonymization.js index cd9d2ad6..5b0e35eb 100644 --- a/src/utils/dcmUpload/anonymization.js +++ b/src/utils/dcmUpload/anonymization.js @@ -60,12 +60,14 @@ export const anonymization = function (file, config) { const blob = new Blob([bufferArray], { type: 'application/octet-stream' }) resolve({ blob, pixelDataElement }) } catch (err) { + console.log(file, 'warning') console.log(err) resolve(false); } }; reader.readAsArrayBuffer(file); } catch (e) { + console.log(file, 'warning') console.log(e) reject(e) } diff --git a/src/utils/dcmUpload/dcmUpload.js b/src/utils/dcmUpload/dcmUpload.js index 5399e583..56ab4599 100644 --- a/src/utils/dcmUpload/dcmUpload.js +++ b/src/utils/dcmUpload/dcmUpload.js @@ -19,6 +19,7 @@ export const dcmUpload = async function (name, file, config) { } catch (e) { + console.log(file, 'warning') resolve(false) console.log(e) } diff --git a/src/utils/oss.js b/src/utils/oss.js index 14f8c100..742d587d 100644 --- a/src/utils/oss.js +++ b/src/utils/oss.js @@ -2,10 +2,8 @@ const OSS = require('ali-oss') const router = require('@/router'); const Minio = require('minio') const stream = require('stream') -console.log(Minio) import Vue from 'vue' -const { GenerateSTS, GetObjectStoreToken } = require('../api/user.js') -import { getToken } from '@/utils/auth' +const { GetObjectStoreToken } = require('../api/user.js') Vue.prototype.OSSclientConfig = { } diff --git a/src/utils/uploadZip.js b/src/utils/uploadZip.js index 1033513d..81401568 100644 --- a/src/utils/uploadZip.js +++ b/src/utils/uploadZip.js @@ -1,6 +1,115 @@ +import JSZip from "jszip"; +import { saveAs } from "file-saver"; +import Vue from 'vue'; +import { + requestPackageAndAnonymizImage, +} from "@/api/load.js"; import streamSaver from "streamsaver"; import "streamsaver/examples/zip-stream.js" -export const downloadImage = (zipName, files) => { +let flag = {}; +export const downloadImage = async (id, id2, IsDicom = true) => { + if (flag[`${id2}_${IsDicom}`]) return + flag[`${id2}_${IsDicom}`] = true + try { + let params = { + TrialId: id, + SubjectVisitId: id2, + IsDicom: IsDicom + } + let res = await requestPackageAndAnonymizImage(params); + flag[`${id2}_${IsDicom}`] = false; + if (res.IsSuccess) { + if (!res.Result) { + Vue.prototype.$message.warning(Vue.prototype.$t("trials:upload:message:not")) + return 1; + } + let a = document.createElement("a"); + let href = Vue.prototype.OSSclientConfig.basePath + res.Result; + // let fileName = + // res.Result.split("/")[res.Result.split("/").length - 1]; + a.download = res.OtherInfo.fileName; + a.href = href; + a.click(); + URL.revokeObjectURL(href); + let timer = setTimeout(() => { + a = null; + href = null; + timer = null; + }, 500) + return 2; + } else { + return false; + } + } catch (err) { + flag[`${id2}_${IsDicom}`] = false; + console.log(err); + } +}; +const setfolder = async (item) => { + const zip = new JSZip(); // 创建实例对象 + let patientIds = item.PatientList.map(i => i.PatientIdStr); + let zipName = `${item.SubjectCode}_${patientIds.join(',')}`; + let zipObj = {}; + const promises = []; + for (let visit of item.VisitList) { + if (!zipObj[`${visit.VisitName}`]) { + zipObj[`${visit.VisitName}`] = zip.folder(visit.VisitName); + } + for (let study of visit.StudyList) { + let date = study.StudyTime.split(" ")[0]; + for (let series of study.SeriesList) { + if ( + !zipObj[ + `${visit.VisitName}${series.Modality}` + ] + ) { + zipObj[ + `${visit.VisitName}${series.Modality}` + ] = zipObj[`${visit.VisitName}`].folder( + `${date}_${series.Modality}` + ); + } + for (let instance of series.InstancePathList) { + let obj = { + subjectCode: item.SubjectCode, + 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[ + `${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, zipName + ".zip"); // 使用FileSaver.saveAs保存文件,文件名可自定义 + flag[`${id2}_${IsDicom}`] = false; + zipObj = null; + }); + }) + .catch((reason) => { flag[`${id2}_${IsDicom}`] = false; }); +}; +const handleBatchDown = async (item, zip) => { return new Promise((resolve) => { console.log("同步下载打包开始时间:" + new Date()); // 创建压缩文件输出流 diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 8b09e9c2..f3ab37e1 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -23,7 +23,7 @@ > @@ -213,8 +213,6 @@ import TopLang from "./topLang"; import Vcode from "vue-puzzle-vcode"; import browserTip from "@/views/dictionary/template/browser/tip.vue"; import Img1 from "@/assets/pic-2.png"; -import loginBg from "@/assets/icons/svg/login-bg.svg"; -import loginLogo from "@/assets/icons/svg/login-logo.svg"; export default { name: "Login", components: { TopLang, Vcode, browserTip }, @@ -258,8 +256,6 @@ export default { isShow: false, showCode: false, Img1, - loginBg, - loginLogo, }; }, computed: { @@ -410,7 +406,7 @@ export default { /* 修复input 背景不协调 和光标变色 */ $bg: #283443; -$light_gray: #606266; +$light_gray: #909399; $cursor: #fff; // @supports (-webkit-mask: none) and (not (cater-color: $cursor)) { @@ -517,7 +513,7 @@ $light_gray: #606266; width: 100%; display: flex; align-items: center; - justify-content: center; + justify-content: flex-end; } } .login-r { @@ -540,7 +536,7 @@ $light_gray: #606266; .title-container { // margin-bottom: 50px; text-align: center; - margin-top: 18%; + margin-top: 20%; .title { font-size: 35px; color: $light_gray; diff --git a/src/views/trials/trials-layout/components/noticeMarquee.vue b/src/views/trials/trials-layout/components/noticeMarquee.vue index 5f9a94be..4b54f77b 100644 --- a/src/views/trials/trials-layout/components/noticeMarquee.vue +++ b/src/views/trials/trials-layout/components/noticeMarquee.vue @@ -1,6 +1,6 @@ - + @@ -70,6 +70,7 @@ export default {