71 Commits

Author SHA1 Message Date
wangxiaoshuang 0634df6e33 Merge branch 'uat'
continuous-integration/drone/push Build is passing
# Conflicts:
#	src/views/trials/trials-panel/trial-summary/audit-record/index.vue
2025-06-16 16:06:54 +08:00
caiyiling ae808679a0 1
continuous-integration/drone/push Build is passing
2025-06-13 18:02:55 +08:00
caiyiling fbb23065e5 1
continuous-integration/drone/push Build is passing
2025-06-13 16:33:59 +08:00
caiyiling 0d85f138a5 Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
2025-06-13 16:07:17 +08:00
caiyiling f60d845725 自定义阅片更改 2025-06-13 16:06:54 +08:00
wangxiaoshuang f848e9a9dd Merge branch 'uat'
continuous-integration/drone/push Build is passing
# Conflicts:
#	src/api/trials/reading.js
#	src/views/trials/trials-panel/trial-summary/audit-record/index.vue
2025-06-13 14:34:59 +08:00
wangxiaoshuang 19896b85e0 1
continuous-integration/drone/push Build is passing
2025-06-13 11:43:07 +08:00
wangxiaoshuang f94013103e Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is passing
2025-06-13 11:17:38 +08:00
wangxiaoshuang ccdfe9d83e 阅片排序 2025-06-13 11:17:28 +08:00
caiyiling 657010202c Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
2025-06-13 10:44:35 +08:00
caiyiling 9c2c6191d2 播放工具更改 2025-06-13 10:44:12 +08:00
wangxiaoshuang c865608313 阅片顺序页面
continuous-integration/drone/push Build is passing
2025-06-12 16:19:08 +08:00
wangxiaoshuang 818a8add3d Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web 2025-06-12 16:18:49 +08:00
wangxiaoshuang 53343e37d6 稽查图片不存在展示问题 2025-06-12 16:18:45 +08:00
caiyiling a3e17bbefe Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is failing
2025-06-12 15:44:23 +08:00
caiyiling 19bb1eccd8 自定义阅片表单更改 2025-06-12 15:43:59 +08:00
wangxiaoshuang e60260f68d 培训记录查看页面中角色筛选项缺少ZYBS、ZYSS角色
continuous-integration/drone/push Build is pending
2025-06-12 11:02:37 +08:00
wangxiaoshuang 2b89163419 项目文档历史记录文件名称修改方式修改
continuous-integration/drone/push Build is passing
2025-06-11 16:53:22 +08:00
wangxiaoshuang 3489d34628 影像汇总导出影像、关键图
continuous-integration/drone/push Build is passing
2025-06-11 16:34:46 +08:00
wangxiaoshuang 613d434af9 影像汇总
continuous-integration/drone/push Build is passing
2025-06-10 18:02:37 +08:00
wangxiaoshuang 123f178673 稽查图片显示问题
continuous-integration/drone/push Build is passing
2025-06-10 15:26:34 +08:00
wangxiaoshuang e8e066ab80 稽查操作名查询字段变更
continuous-integration/drone/push Build is passing
2025-06-10 09:41:55 +08:00
wangxiaoshuang 4aa5acc401 1
continuous-integration/drone/push Build is passing
2025-06-09 16:56:29 +08:00
wangxiaoshuang fa4c00230f 项目文档历史记录修改
continuous-integration/drone/push Build is passing
2025-06-09 15:58:52 +08:00
wangxiaoshuang 6ea46c076b 检查部位、检查技术、检查名称已使用禁止取消、删除
continuous-integration/drone/push Build is passing
2025-06-09 11:18:09 +08:00
caiyiling dbffc2787d Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
2025-06-06 17:25:59 +08:00
caiyiling f98ea18205 自定义标准阅片交互更改 2025-06-06 17:25:23 +08:00
wangxiaoshuang 00e53c4742 项目培训图片预览问题
continuous-integration/drone/push Build is passing
2025-06-06 16:58:38 +08:00
wangxiaoshuang 5de61dd125 项目培训发布状态默认值
continuous-integration/drone/push Build is passing
2025-06-06 16:28:07 +08:00
wangxiaoshuang ae8767c70f 配置中检查部位已在项目中使用禁止取消勾选和修改
continuous-integration/drone/push Build is passing
2025-06-06 14:34:42 +08:00
wangxiaoshuang 623a7b9858 1
continuous-integration/drone/push Build is passing
2025-06-06 14:26:45 +08:00
wangxiaoshuang ce2a0d9936 邮件管理批量编辑 2025-06-06 14:26:37 +08:00
wangxiaoshuang 18b0ec2042 pm重阅跟踪、spm重阅审批弹框列表高度修改
continuous-integration/drone/push Build is passing
2025-06-06 13:47:33 +08:00
caiyiling 8d5dfd0258 自定义阅片配置更改
continuous-integration/drone/push Build is passing
2025-06-06 11:15:31 +08:00
caiyiling 45f83322ec 1
continuous-integration/drone/push Build is passing
2025-06-05 18:32:22 +08:00
caiyiling 3d7ccafa76 Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
2025-06-05 18:03:50 +08:00
caiyiling f148c76a7f 自定义阅片更改 2025-06-05 18:03:32 +08:00
wangxiaoshuang 1ffd9e3863 Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is failing
2025-06-05 16:59:56 +08:00
wangxiaoshuang 3bcf097c52 邮件管理编辑内容方式修改 2025-06-05 16:59:44 +08:00
caiyiling 1e4fd0083a 1
continuous-integration/drone/push Build is passing
2025-06-05 16:26:02 +08:00
caiyiling d504039d82 自定义标准配置更改
continuous-integration/drone/push Build is passing
2025-06-05 16:22:42 +08:00
caiyiling 0c4b3e5aed 表格问题配置更改
continuous-integration/drone/push Build is passing
2025-06-05 16:10:23 +08:00
caiyiling 262541ac08 1
continuous-integration/drone/push Build is passing
2025-06-05 16:03:06 +08:00
caiyiling dce3719c58 Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is running
2025-06-05 16:00:49 +08:00
caiyiling d05a4437d4 自定义标准配置更改及自定义阅片更改 2025-06-05 16:00:12 +08:00
wangxiaoshuang 10f2953a94 如果不能下载影像,则检查也不需要能够选择
continuous-integration/drone/push Build is passing
2025-06-05 13:12:49 +08:00
wangxiaoshuang 7a6cded333 培训材料视频禁止下载
continuous-integration/drone/push Build is passing
2025-06-05 11:38:08 +08:00
wangxiaoshuang c1f10036b0 项目文档增加附件
continuous-integration/drone/push Build is passing
2025-06-04 17:15:45 +08:00
caiyiling 8e01f3af87 Merge branch 'uat' into main
continuous-integration/drone/push Build is passing
2025-06-04 16:50:53 +08:00
wangxiaoshuang 386901316d 1
continuous-integration/drone/push Build is passing
2025-06-04 15:58:30 +08:00
caiyiling 122f333c77 Merge branch 'uat' into main
continuous-integration/drone/push Build is passing
2025-06-04 13:42:00 +08:00
caiyiling 164437ea70 Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
2025-06-04 13:37:46 +08:00
caiyiling 86a8e2faeb 测量工具配置文件更改 2025-06-04 13:37:12 +08:00
wangxiaoshuang b5b67cc5e3 稽查搜索框内容接口获取
continuous-integration/drone/push Build is passing
2025-06-04 13:34:42 +08:00
wangxiaoshuang d667bb4e79 审批页面优化
continuous-integration/drone/push Build is passing
2025-06-03 18:01:04 +08:00
caiyiling c7e0fab789 非Dicom工具更改
continuous-integration/drone/push Build is passing
2025-06-03 16:14:28 +08:00
caiyiling 35b16876c9 Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
2025-06-03 14:27:27 +08:00
caiyiling 549b028809 非dicom更改 2025-06-03 14:27:09 +08:00
wangxiaoshuang 330b1cf644 Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is passing
2025-06-03 13:54:34 +08:00
wangxiaoshuang b51a8e94de 稽查轨迹的记录的操作可以在在项目配置 2025-06-03 13:54:19 +08:00
caiyiling b85853aa5e 阅片结果导出配置更改
continuous-integration/drone/push Build is passing
2025-06-03 11:32:48 +08:00
wangxiaoshuang 5386dba134 稽查新增字段是否默认
continuous-integration/drone/push Build is passing
2025-05-30 09:27:30 +08:00
caiyiling 3f63c126ff 1
continuous-integration/drone/push Build is passing
2025-05-29 17:21:25 +08:00
caiyiling f1b816fd85 自定义阅片更改
continuous-integration/drone/push Build is passing
2025-05-29 17:04:00 +08:00
caiyiling 43a221de00 自定义阅片更改
continuous-integration/drone/push Build is passing
2025-05-29 14:49:53 +08:00
caiyiling 642c708c74 Merge remote-tracking branch 'origin/uat' into main
continuous-integration/drone/push Build is passing
2025-05-29 09:58:39 +08:00
caiyiling aa8831ce54 Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is running
2025-05-29 09:57:35 +08:00
caiyiling d73970117d 自定义标准更改 2025-05-29 09:57:02 +08:00
wangxiaoshuang 9d462f69f6 人员管理中,当人员退出时,显示加入项目的时间
continuous-integration/drone/push Build is passing
2025-05-29 09:38:11 +08:00
caiyiling d77c79acbd 自定义标准问题配置扩充影像标记属性
continuous-integration/drone/push Build is passing
2025-05-27 11:10:56 +08:00
caiyiling 1e300b4529 CDISC导出配置支持表格问题更改
continuous-integration/drone/push Build is passing
2025-05-27 09:06:04 +08:00
63 changed files with 8027 additions and 5341 deletions
+23
View File
@@ -48,6 +48,7 @@
"nprogress": "^0.2.0",
"path-to-regexp": "^0.1.10",
"pdfobject": "^2.3.0",
"prismjs": "^1.30.0",
"qrcodejs2": "^0.0.2",
"screenfull": "^6.0.2",
"sortablejs": "^1.15.5",
@@ -62,6 +63,7 @@
"vue-count-to": "^1.0.13",
"vue-demi": "^0.14.10",
"vue-i18n": "^8.28.2",
"vue-prism-editor": "^1.3.0",
"vue-puzzle-vcode": "^1.1.10",
"vue-router": "^3.0.6",
"vue-seamless-scroll": "^1.1.23",
@@ -18044,6 +18046,15 @@
"renderkid": "^3.0.0"
}
},
"node_modules/prismjs": {
"version": "1.30.0",
"resolved": "https://registry.npmmirror.com/prismjs/-/prismjs-1.30.0.tgz",
"integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==",
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz",
@@ -22997,6 +23008,18 @@
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/vue-prism-editor": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/vue-prism-editor/-/vue-prism-editor-1.3.0.tgz",
"integrity": "sha512-54RfgtMGRMNr9484zKMOZs1wyLDR6EfFylzE2QrMCD9alCvXyYYcS0vX8oUHh+6pMUu6ts59uSN9cHglpU2NRQ==",
"license": "MIT",
"engines": {
"node": ">=10"
},
"peerDependencies": {
"vue": "^2.6.11"
}
},
"node_modules/vue-puzzle-vcode": {
"version": "1.1.10",
"resolved": "https://registry.npmmirror.com/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.10.tgz",
+2
View File
@@ -54,6 +54,7 @@
"nprogress": "^0.2.0",
"path-to-regexp": "^0.1.10",
"pdfobject": "^2.3.0",
"prismjs": "^1.30.0",
"qrcodejs2": "^0.0.2",
"screenfull": "^6.0.2",
"sortablejs": "^1.15.5",
@@ -68,6 +69,7 @@
"vue-count-to": "^1.0.13",
"vue-demi": "^0.14.10",
"vue-i18n": "^8.28.2",
"vue-prism-editor": "^1.3.0",
"vue-puzzle-vcode": "^1.1.10",
"vue-router": "^3.0.6",
"vue-seamless-scroll": "^1.1.23",
+39
View File
@@ -1357,3 +1357,42 @@ export function deleteAttachment(data) {
data
})
}
// 项目文档-获取历史记录列表
export function getTrialHistoryRecordFileList(data) {
return request({
url: `/TrialHistoryRecordFile/getTrialHistoryRecordFileList`,
method: 'post',
data
})
}
// 项目文档-新增/修改历史记录
export function addOrUpdateTrialHistoryRecordFile(data) {
return request({
url: `/TrialHistoryRecordFile/addOrUpdateTrialHistoryRecordFile`,
method: 'post',
data
})
}
// 项目文档-批量新增历史记录
export function batchAddTrialHistoryRecordFile(data) {
return request({
url: `/TrialHistoryRecordFile/batchAddTrialHistoryRecordFile`,
method: 'post',
data
})
}
// 项目文档-删除历史记录
export function deleteTrialHistoryRecordFile(id) {
return request({
url: `/TrialHistoryRecordFile/deleteTrialHistoryRecordFile/${id}`,
method: 'delete',
})
}
// 邮件管理-批量修改邮件
export function batchUpdateEmail(data) {
return request({
url: `/EmailNoticeConfig/batchUpdateEmail`,
method: 'post',
data
})
}
+12 -3
View File
@@ -45,10 +45,19 @@ export function changeFrontAuditSort(param) {
})
}
export function getModuleTypeDescriptionList(param) {
export function getModuleTypeDescriptionList(params) {
return request({
url: `${param === '' ? '/FrontAuditConfig/getModuleTypeDescriptionList' : '/FrontAuditConfig/getModuleTypeDescriptionList?moduleTypeId=' + param}`,
method: 'get'
url: `/FrontAuditConfig/getModuleTypeDescriptionList`,
method: 'get',
params
})
}
export function getModuleTypeList(data) {
return request({
url: `/FrontAuditConfig/getModuleTypeList`,
method: 'post',
data
})
}
+74
View File
@@ -4124,3 +4124,77 @@ export function addFolder(data) {
data
})
}
// 配置-项目文档发布
export function publishTrialDocument(data) {
return request({
url: `/TrialDocument/publishTrialDocument`,
method: 'post',
data
})
}
// 配置-获取项目文档附件列表
export function getTrialDocumentAttachmentList(data) {
return request({
url: `/TrialDocument/getTrialDocumentAttachmentList`,
method: 'post',
data
})
}
// 配置-新增或修改项目文档附件
export function addOrUpdateTrialDocumentAttachment(data) {
return request({
url: `/TrialDocument/addOrUpdateTrialDocumentAttachment`,
method: 'post',
data
})
}
// 配置-删除项目文档附件
export function deleteTrialDocumentAttachment(data) {
return request({
url: `/TrialDocument/deleteTrialDocumentAttachment/${data}`,
method: 'delete',
})
}
// 配置-获取稽查管理列表
export function getTrialShowInspection(data) {
return request({
url: `/Inspection/getTrialShowInspection`,
method: 'post',
data
})
}
// 配置-设置稽查管理配置
export function setTrialShowInspection(data) {
return request({
url: `/Inspection/setTrialShowInspection`,
method: 'post',
data
})
}
// 影像汇总-获取列表
export function getTrialVisitImageStatList(data) {
return request({
url: `/DownloadAndUpload/getTrialVisitImageStatList`,
method: 'post',
data
})
}
// 影像汇总-获取统计
export function getTrialVisitImageStatInfo(params) {
return request({
url: `/DownloadAndUpload/getTrialVisitImageStatInfo`,
method: 'get',
params
})
}
// 影像汇总-影像下载
export function getExportSubjectVisitImageList(data) {
return request({
url: `/DownloadAndUpload/getExportSubjectVisitImageList`,
method: 'post',
data
})
}
+2 -2
View File
@@ -459,9 +459,9 @@ export function setMedicalReviewInvalid(params) {
})
}
export function getTrialCriterionList(trialId) {
export function getTrialCriterionList(trialId, isRandom = false) {
return request({
url: `/VisitTask/getTrialCriterionList?TrialId=${trialId}`,
url: `/VisitTask/getTrialCriterionList?TrialId=${trialId}&isRandom=${isRandom}`,
method: 'get'
})
}
+1 -1
View File
@@ -678,7 +678,7 @@ export default {
cornerstoneTools.getToolState(
this.canvas,
'playClip'
).data[0].loop = false
).data[0].loop = true
},
setFps(fps) {
this.dicomInfo.fps = fps
+2 -1
View File
@@ -11,6 +11,8 @@
<!-- v-else-if="fileType.indexOf('pdf') !== -1"-->
<!-- :src="`/static/pdfjs/web/viewer.html?file=${filePath}`">-->
<!-- </pdf>-->
<video :src="`${OSSclientConfig.basePath}${filePath}`" style="width: 100%;height: 99%;" autoplay controls
controlsList="nodownload" v-else-if="fileType.indexOf('mp4') !== -1"></video>
<iframe v-else
:src="`/static/onlyOffice/viewer.html?url=${OSSclientConfig.basePath}${filePath}?onlyOffice_url=${onlyOffice_url}&type=${fileType}&title=${title}&documentType=${documentType}&userName=${currentUser}`"
width="100%" height="100%" frameborder="0" crossorigin="anonymous" />
@@ -51,7 +53,6 @@ export default {
},
computed: {
documentType() {
console.log(DOCUMENTTYPE[`.${this.fileType}`], 'documentType')
return DOCUMENTTYPE[`.${this.fileType}`]
}
},
+23
View File
@@ -0,0 +1,23 @@
import Vue from "vue";
import Video from "./index.vue";
const PreviewConstructor = Vue.extend(Video);
const video = options => {
const { path, type, title } = options;
if (!path) throw `path is requred.but ${path}`
const id = `OnlyOffice_${new Date().getTime()}`;
const instance = new PreviewConstructor();
instance.id = id;
instance.vm = instance.$mount();
if (instance.vm.visible) return;
document.body.appendChild(instance.vm.$el);
instance.vm.open(path, type, title);
instance.vm.$on("closed", () => {
instance.vm.docEditor = null
document.body.removeChild(instance.vm.$el);
instance.vm.$destroy();
});
return instance.vm;
}
export default video;
+7
View File
@@ -0,0 +1,7 @@
import Video from "./index.vue";
import video from "./fun";
export default Vue => {
Vue.component(Video.name, Video);
Vue.prototype.$video = video;
};
+38
View File
@@ -0,0 +1,38 @@
<template>
<el-dialog v-if="visible" :visible.sync="visible" :title="title" :fullscreen="true" append-to-body
custom-class="base-dialog-wrapper" @close="handleClose">
<div class="base-modal-body" style="border: 2px solid #ccc; padding: 10px">
<video :src="path" style="width: 100%;height: 99%;" autoplay controls controlsList="nodownload"></video>
</div>
</el-dialog>
</template>
<script>
export default {
name: "Video",
data() {
return {
visible: false,
path: null,
type: null,
title: null,
};
},
methods: {
open(path, type, title) {
this.path = this.OSSclientConfig.basePath + path;
this.title = title;
this.visible = true;
},
handleClose() {
this.$emit("closed");
},
},
};
</script>
<style lang="scss" scoped>
#placeholder {
width: 100%;
height: 100%;
}
</style>
+3 -1
View File
@@ -56,6 +56,8 @@ import Preview from '@/components/Preview/index'
Vue.use(Preview)
import Onlyoffice from '@/components/Preview_onlyoffice/index'
Vue.use(Onlyoffice)
import Video from '@/components/Preview_video/index'
Vue.use(Video)
import MFA from '@/components/MFA/index'
Vue.use(MFA)
import FB from '@/components/feedBack/index'
@@ -311,7 +313,7 @@ async function VueInit() {
})
}
let CompanyInfo = JSON.parse(localStorage.getItem('CompanyInfo'))
if(CompanyInfo&&CompanyInfo.SystemShortName){
if (CompanyInfo && CompanyInfo.SystemShortName) {
let test = new RegExp('IRC', 'ig')
text = text.replace(test, CompanyInfo.SystemShortName)
}
+3 -1
View File
@@ -50,6 +50,8 @@ const getters = {
IsFirstSysDocNeedSign: state => state.user.IsFirstSysDocNeedSign,
TrialStatusStr: state => state.user.TrialStatusStr,
lastViewportTaskId: state => state.noneDicomReview.lastViewportTaskId,
currentTaskState: state => state.noneDicomReview.currentTaskState
currentTaskState: state => state.noneDicomReview.currentTaskState,
operateInfo: state => state.dicom3d.operateInfo,
deleteAnnotationIds: state => state.dicom3d.deleteAnnotationIds
}
export default getters
+3 -1
View File
@@ -13,6 +13,7 @@ import financials from './modules/financials'
import reading from './modules/reading'
import lang from './modules/lang'
import noneDicomReview from './modules/noneDicomReview'
import dicom3d from './modules/dicom3d'
Vue.use(Vuex)
const store = new Vuex.Store({
@@ -28,7 +29,8 @@ const store = new Vuex.Store({
financials,
reading,
lang,
noneDicomReview
noneDicomReview,
dicom3d
},
getters
})
+28
View File
@@ -0,0 +1,28 @@
const getDefaultState = () => {
return {
operateInfo: [],
deleteAnnotationIds: []
}
}
const state = getDefaultState
const mutations = {
}
const actions = {
setOperateInfo({ state }, arr) {
state.operateInfo = arr
},
setDeleteAnnotationIds({ state }, arr) {
state.deleteAnnotationIds = arr
},
}
export default {
namespaced: true,
state,
mutations,
actions
}
@@ -10,7 +10,7 @@
<el-form-item :label="$t('dictionary:signature:form:File')">
<div class="upload-container">
<el-upload class="upload-demo" action accept=".pdf" :before-upload="beforeUpload"
<el-upload class="upload-demo" action accept=".pdf,.mp4" :before-upload="beforeUpload"
:http-request="handleUploadFile" :on-preview="handlePreview" :on-remove="handleRemoveFile"
:show-file-list="true" :file-list="fileList" :limit="1" :on-exceed="handleExceed"
:disabled="form.Type === ''">
@@ -229,7 +229,7 @@ export default {
this.$message.warning(this.$t('upload:rule:maxFile1'))
},
checkFileSuffix(fileName) {
var typeArr = ['pdf']
var typeArr = ['pdf', 'mp4']
var extendName = fileName
.substring(fileName.lastIndexOf('.') + 1)
.toLocaleLowerCase()
@@ -82,7 +82,8 @@ export default {
'.doc',
'.docx',
'.xls',
'.xlsx']
'.xlsx',
'.mp4']
}
},
mounted() {
@@ -172,18 +173,7 @@ export default {
this.$message.warning(this.$t('upload:rule:maxFile1'))
},
checkFileSuffix(fileName) {
var typeArr = [
'jpg',
'jpeg',
'png',
'pdf',
'ppt',
'pptx',
'doc',
'docx',
'xls',
'xlsx',
]
var typeArr = this.accept.map(item => item.split('.')[1])
var extendName = fileName
.substring(fileName.lastIndexOf('.') + 1)
.toLocaleLowerCase()
@@ -46,16 +46,16 @@
<!-- 新增/编辑附件 -->
<el-dialog :visible.sync="visible" :close-on-click-modal="false" :append-to-body="true" :title="title"
width="800px" custom-class="base-dialog-wrapper">
<attachmentForm v-if="visible" :data="rowData" :SystemDocumentId="SystemDocumentId"
<attachmentForm v-if="visible" :data="rowDATA" :SystemDocumentId="SystemDocumentId"
@closeDialog="closeDialog" @getList="getAllList" />
</el-dialog>
</template>
</base-model>
<viewer ref="picture_perview2" style="margin: 0 10px"
v-if="rowData.FileFormat && ['png', 'jpg', 'jpeg'].includes(rowData.FileFormat.toLowerCase())"
:images="[`${OSSclientConfig.basePath}${rowData.FilePath}`]" :options="viewerOptions">
v-if="rowDATA.FileFormat && ['png', 'jpg', 'jpeg'].includes(rowDATA.FileFormat.toLowerCase())"
:images="[`${OSSclientConfig.basePath}${rowDATA.FilePath}`]" :options="viewerOptions">
<img v-show="false" :src="`${OSSclientConfig.basePath}${rowData.FilePath}`" alt="Image" />
<img v-show="false" :src="`${OSSclientConfig.basePath}${rowDATA.FilePath}`" alt="Image" />
</viewer>
<!-- <attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible"
v-if="perview_visible" /> -->
@@ -113,7 +113,7 @@ export default {
visible: false,
title: null,
list: [],
rowData: {},
rowDATA: {},
loading: false,
viewerOptions: {
toolbar: {
@@ -167,7 +167,7 @@ export default {
if (!row.Id) {
this.title = this.$t('dictionary:signature:attachmentForm:title:add')
}
this.rowData = Object.assign({}, row)
this.rowDATA = Object.assign({}, row)
this.visible = true
},
async getList() {
@@ -207,7 +207,7 @@ export default {
},
preview(data) {
// return this.perview_visible = true
this.rowData = Object.assign({}, data)
this.rowDATA = Object.assign({}, data)
if (['.ppt',
'.pptx',
'.doc',
@@ -234,6 +234,13 @@ export default {
title: data.Name,
})
}
if (['.mp4'].includes(`.${data.FileFormat.toLowerCase()}`)) {
this.$video({
path: data.Path || data.FilePath,
type: 'mp4',
title: data.Name,
})
}
},
// 排序
handleSortByColumn(column) {
@@ -73,6 +73,7 @@ import xlsx from '@/assets/file_icon/xlsx.png'
import PreviewFile from '@/components/PreviewFile'
import imageViewer from './image-viewer'
import { getSystemDocumentAttachmentList } from '@/api/dictionary'
import { getTrialDocumentAttachmentList } from '@/api/trials'
const defaultSearchData = () => {
return {
PageIndex: 1,
@@ -100,6 +101,10 @@ export default {
isView: {
type: Boolean,
default: false
},
isTrial: {
type: Boolean,
default: false
}
},
data() {
@@ -140,11 +145,20 @@ export default {
try {
if (!this.SystemDocumentId) return false
this.loading = true
if (!this.isTrial) {
this.searchData.SystemDocumentId = this.SystemDocumentId
} else {
this.searchData.TrialDocumentId = this.SystemDocumentId
}
if (this.isView) {
this.searchData.OffLine = false
}
let res = await getSystemDocumentAttachmentList(this.searchData)
let res = null
if (!this.isTrial) {
res = await getSystemDocumentAttachmentList(this.searchData)
} else {
res = await getTrialDocumentAttachmentList(this.searchData)
}
this.loading = false
if (res.IsSuccess) {
this.list = res.Result.CurrentPageData
@@ -614,6 +614,18 @@
/>
</el-form-item>
</el-col>
<el-col v-show="title !== '复制'" :span="24">
<el-form-item>
<span slot="label">
是否默认
</span>
<el-switch
v-model="form.IsDefaultChoice"
:active-value="true"
:inactive-value="false"
/>
</el-form-item>
</el-col>
<!--分割线-->
<el-col v-show="title !== '复制' && form.ConfigType == 'M'" :span="24">
<el-divider content-position="left">其他信息</el-divider>
@@ -1130,6 +1142,7 @@ export default {
DescriptionCN: null,
InterfaceName: null,
IsEnable: true,
IsDefaultChoice: true,
ModuleTypeId: null,
OptTypeId: null,
ChildrenTypeId: null,
@@ -1,12 +1,5 @@
<template>
<el-form
ref="emailForm"
v-loading="loading"
:model="form"
label-width="180px"
size="small"
:rules="rules"
>
<el-form ref="emailForm" v-loading="loading" :model="form" label-width="180px" size="small" :rules="rules">
<el-row>
<el-col :span="24">
<!-- Code -->
@@ -29,12 +22,7 @@
<el-col :span="12">
<!-- 邮件延时发送s数 -->
<el-form-item :label="$t('dictionary:email:label:emailDelaySeconds')" prop="EmailDelaySeconds">
<el-input
v-model.number="form.EmailDelaySeconds"
style="width: 300px"
type="number"
clearable
>
<el-input v-model.number="form.EmailDelaySeconds" style="width: 300px" type="number" clearable>
</el-input>
</el-form-item>
</el-col>
@@ -42,12 +30,8 @@
<!-- 业务层级 -->
<el-form-item :label="$t('dictionary:email:label:businessLevel')" prop="BusinessLevelEnum">
<el-select v-model="form.BusinessLevelEnum" clearable class="mr">
<el-option
v-for="item of $d.BusinessLevel"
:key="`BusinessLevel${item.label}`"
:label="item.label"
:value="item.value"
/>
<el-option v-for="item of $d.BusinessLevel" :key="`BusinessLevel${item.label}`" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
</el-col>
@@ -55,12 +39,8 @@
<!-- 业务模块 -->
<el-form-item :label="$t('dictionary:email:label:businessModule')" prop="BusinessModuleEnum">
<el-select v-model="form.BusinessModuleEnum" clearable class="mr">
<el-option
v-for="item of $d.BusinessModule"
:key="`BusinessModule${item.label}`"
:label="item.label"
:value="item.value"
/>
<el-option v-for="item of $d.BusinessModule" :key="`BusinessModule${item.label}`" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
</el-col>
@@ -68,80 +48,46 @@
<!-- 业务场景 -->
<el-form-item :label="$t('trials:emailManageCfg:table:BusinessScenarioEnum')" prop="BusinessScenarioEnum">
<el-select v-model="form.BusinessScenarioEnum" clearable class="mr">
<el-option
v-for="item of $d.Email_BusinessScenario"
:key="`BusinessScenarioEnum${item.label}`"
:label="item.label"
:value="item.value"
/>
<el-option v-for="item of $d.Email_BusinessScenario" :key="`BusinessScenarioEnum${item.label}`"
:label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<!-- 收件人 -->
<el-form-item :label="$t('trials:emailManageCfg:title:toUserTypeList')" prop="ToUserTypeList">
<el-select
v-model="form.ToUserTypeList"
clearable
multiple
class="mr"
>
<el-option
v-for="item of $d.UserType"
:key="`ToUserTypeList${item.label}`"
:label="item.label"
:value="item.value"
/>
<el-select v-model="form.ToUserTypeList" clearable multiple class="mr">
<el-option v-for="item of $d.UserType" :key="`ToUserTypeList${item.label}`" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<!-- 抄送人 -->
<el-form-item :label="$t('trials:emailManageCfg:title:copyUserTypeList')" prop="CopyUserTypeList">
<el-select
v-model="form.CopyUserTypeList"
clearable
multiple
class="mr"
>
<el-option
v-for="item of $d.UserType"
:key="`CopyUserTypeList${item.label}`"
:label="item.label"
:value="item.value"
/>
<el-select v-model="form.CopyUserTypeList" clearable multiple class="mr">
<el-option v-for="item of $d.UserType" :key="`CopyUserTypeList${item.label}`" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<!-- 加急状态 -->
<el-form-item :label="$t('dictionary:email:label:IsUrgent')" prop="EmailUrgentEnum">
<el-select
v-model="form.EmailUrgentEnum"
@change="
<el-select v-model="form.EmailUrgentEnum" @change="
(v) => {
v === 1 ? (form.EmailCron = null) : null
}
"
clearable
class="mr"
>
<el-option
v-for="item of $d.EmailUrgent"
:key="`EmailUrgent${item.label}`"
:label="item.label"
:value="item.value"
/>
" clearable class="mr">
<el-option v-for="item of $d.EmailUrgent" :key="`EmailUrgent${item.label}`" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<!-- 发送周期和时间 -->
<el-form-item
:label="$t('trials:emailManageCfg:table:EmailCron')"
v-if="form.EmailUrgentEnum !== 1"
prop="EmailCron"
>
<el-form-item :label="$t('trials:emailManageCfg:table:EmailCron')" v-if="form.EmailUrgentEnum !== 1"
prop="EmailCron">
<el-input style="width: 300px" readonly v-model="form.EmailCron" />
<!-- 生成 cron -->
<el-button type="primary" @click="showDialog"> {{ $t('dictionary:email:button:cron') }} </el-button>
@@ -151,12 +97,8 @@
<!-- 是否需要回执 -->
<el-form-item :label="$t('trials:emailManageCfg:title:isReturnRequired')" prop="IsReturnRequired">
<el-radio-group v-model="form.IsReturnRequired">
<el-radio
v-for="item of $d.YesOrNo"
:label="item.value"
:key="`IsReturnRequired${item.value}`"
>{{ item.label }}</el-radio
>
<el-radio v-for="item of $d.YesOrNo" :label="item.value" :key="`IsReturnRequired${item.value}`">{{
item.label }}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
@@ -164,48 +106,30 @@
<!-- 是否自动发送 -->
<el-form-item :label="$t('trials:emailManageCfg:table:IsAutoSend')" prop="IsAutoSend">
<el-radio-group v-model="form.IsAutoSend">
<el-radio
v-for="item of $d.YesOrNo"
:label="item.value"
:key="`IsAutoSend${item.value}`"
>{{ item.label }}</el-radio
>
<el-radio v-for="item of $d.YesOrNo" :label="item.value" :key="`IsAutoSend${item.value}`">{{ item.label
}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12" v-if="systemLevel">
<!-- 是否区分标准 -->
<el-form-item :label="$t('dictionary:email:button:isDistinguishCriteria')" prop="IsDistinguishCriteria">
<el-radio-group
v-model="form.IsDistinguishCriteria"
@change="
<el-radio-group v-model="form.IsDistinguishCriteria" @change="
() => {
form.CriterionTypeEnum = null
}
"
>
<el-radio
v-for="item of $d.YesOrNo"
:label="item.value"
:key="`IsDistinguishCriteria${item.value}`"
>{{ item.label }}</el-radio
>
">
<el-radio v-for="item of $d.YesOrNo" :label="item.value" :key="`IsDistinguishCriteria${item.value}`">{{
item.label }}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
:label="$t('trials:auditRecord:table:criterion')"
v-if="form.IsDistinguishCriteria"
prop="CriterionTypeEnum"
>
<el-form-item :label="$t('trials:auditRecord:table:criterion')" v-if="form.IsDistinguishCriteria"
prop="CriterionTypeEnum">
<el-select v-model="form.CriterionTypeEnum" clearable class="mr">
<el-option
v-for="item of $d.CriterionType"
:key="`CriterionType${item.label}`"
:label="item.label"
:value="item.value"
/>
<el-option v-for="item of $d.CriterionType" :key="`CriterionType${item.label}`" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
</el-col>
@@ -213,106 +137,65 @@
<!-- 是否启用 -->
<el-form-item :label="$t('trials:emailManageCfg:table:IsEnable')" prop="IsEnable">
<el-radio-group v-model="form.IsEnable">
<el-radio
v-for="item of $d.YesOrNo"
:label="item.value"
:key="`IsEnable${item.value}`"
>{{ item.label }}</el-radio
>
<el-radio v-for="item of $d.YesOrNo" :label="item.value" :key="`IsEnable${item.value}`">{{ item.label
}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<!-- 附件(CN -->
<el-form-item :label="$t('trials:emailManageCfg:table:fileListCN')" prop="IsEnable">
<el-upload
class="upload-demo"
action
:before-upload="beforeUploadCN"
:http-request="handleUploadFileCN"
:on-preview="handlePreviewCN"
:on-remove="handleRemoveFileCN"
:show-file-list="true"
:limit="1"
:file-list="fileListCN"
>
<el-button
size="small"
type="primary"
:disabled="fileListCN.length > 0"
>{{ $t('common:button:upload') }}</el-button
>
<el-upload class="upload-demo" action :before-upload="beforeUploadCN" :http-request="handleUploadFileCN"
:on-preview="handlePreviewCN" :on-remove="handleRemoveFileCN" :show-file-list="true" :limit="1"
:file-list="fileListCN">
<el-button size="small" type="primary" :disabled="fileListCN.length > 0">{{ $t('common:button:upload')
}}</el-button>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="12">
<!-- 附件(EN -->
<el-form-item :label="$t('trials:emailManageCfg:table:fileListEN')" prop="IsEnable">
<el-upload
class="upload-demo"
action
:before-upload="beforeUploadEN"
:http-request="handleUploadFileEN"
:on-preview="handlePreviewEN"
:on-remove="handleRemoveFileEN"
:show-file-list="true"
:limit="1"
:file-list="fileListEN"
>
<el-button
size="small"
type="primary"
:disabled="fileListEN.length > 0"
>{{ $t('common:button:upload') }}</el-button
>
<el-upload class="upload-demo" action :before-upload="beforeUploadEN" :http-request="handleUploadFileEN"
:on-preview="handlePreviewEN" :on-remove="handleRemoveFileEN" :show-file-list="true" :limit="1"
:file-list="fileListEN">
<el-button size="small" type="primary" :disabled="fileListEN.length > 0">{{ $t('common:button:upload')
}}</el-button>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<!-- 邮件内容模版(CN -->
<el-form-item
:label="$t('dictionary:email:label:emailHtmlContentCN')"
prop="EmailHtmlContentCN"
style="position: relative"
>
<el-input
v-model="form.EmailHtmlContentCN"
type="textarea"
:autosize="{ minRows: 8, maxRows: 8 }"
/>
<el-button
:disabled="!form.EmailHtmlContentCN && form.EmailHtmlContent"
type="text"
<el-form-item :label="$t('dictionary:email:label:emailHtmlContentCN')" prop="EmailHtmlContentCN"
style="position: relative">
<div class="html_temp">
<prism-editor class="my-editor" v-model="form.EmailHtmlContentCN" :highlight="highlighter" :line-numbers="true"
style="width: 50%;max-height: 500px;"></prism-editor>
<div v-html="form.EmailHtmlContentCN" style="width: 50%;"></div>
</div>
<!-- <el-input v-model="form.EmailHtmlContentCN" type="textarea" :autosize="{ minRows: 8, maxRows: 8 }" />
<el-button :disabled="!form.EmailHtmlContentCN && form.EmailHtmlContent" type="text"
@click="PreviewHTML(form.EmailHtmlContentCN, form.EmailHtmlContent)"
style="position: absolute; left: -50px; top: 30px"
>
style="position: absolute; left: -50px; top: 30px">
{{ $t('common:button:preview') }}
</el-button>
</el-button> -->
</el-form-item>
<!-- 邮件内容模版(EN -->
<el-form-item
:label="$t('dictionary:email:label:emailHtmlContent')"
prop="EmailHtmlContent"
style="position: relative"
>
<el-input
v-model="form.EmailHtmlContent"
type="textarea"
:autosize="{ minRows: 8, maxRows: 8 }"
/>
<el-button
:disabled="!form.EmailHtmlContentCN && form.EmailHtmlContent"
type="text"
<el-form-item :label="$t('dictionary:email:label:emailHtmlContent')" prop="EmailHtmlContent"
style="position: relative">
<div class="html_temp">
<prism-editor class="my-editor" v-model="form.EmailHtmlContent" :highlight="highlighter" :line-numbers="true"
style="width: 50%;max-height: 500px;"></prism-editor>
<div v-html="form.EmailHtmlContent" style="width: 50%;"></div>
</div>
<!-- <el-input v-model="form.EmailHtmlContent" type="textarea" :autosize="{ minRows: 8, maxRows: 8 }" />
<el-button :disabled="!form.EmailHtmlContentCN && form.EmailHtmlContent" type="text"
@click="PreviewHTML(form.EmailHtmlContentCN, form.EmailHtmlContent)"
style="position: absolute; left: -50px; top: 30px"
>
style="position: absolute; left: -50px; top: 30px">
{{ $t('common:button:preview') }}
</el-button>
</el-button> -->
</el-form-item>
<div
class="base-dialog-footer"
style="text-align: right; margin-top: 10px; padding-bottom: 10px"
>
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px; padding-bottom: 10px">
<el-form-item style="text-align: right">
<el-button size="small" type="primary" @click="handleSave">
{{ $t('common:button:save') }}
@@ -321,12 +204,7 @@
</div>
<!-- 生成 cron -->
<el-dialog append-to-body :title="$t('dictionary:email:button:cron')" :visible.sync="showCron">
<vcrontab
:hideComponent="['year']"
@hide="showCron = false"
@fill="crontabFill"
:expression="expression"
>
<vcrontab :hideComponent="['year']" @hide="showCron = false" @fill="crontabFill" :expression="expression">
</vcrontab>
</el-dialog>
</el-form>
@@ -334,6 +212,14 @@
<script>
import { Upload, addOrUpdateEmailNoticeConfigList } from '@/api/dictionary'
import vcrontab from 'vcrontab'
import { PrismEditor } from 'vue-prism-editor';
import 'vue-prism-editor/dist/prismeditor.min.css';
import { highlight, languages } from 'prismjs/components/prism-core';
import 'prismjs/components/prism-clike';
import 'prismjs/components/prism-javascript';
import 'prismjs/themes/prism.css';
export default {
props: {
data: {
@@ -355,7 +241,7 @@ export default {
},
},
},
components: { vcrontab },
components: { vcrontab, PrismEditor },
data() {
return {
expression: '',
@@ -440,6 +326,9 @@ export default {
}
},
methods: {
highlighter(code) {
return highlight(code, languages.js);
},
showDialog() {
this.expression = this.form.EmailCron //传入的 cron 表达式,可以反解析到 UI 上
this.showCron = true
@@ -563,3 +452,9 @@ export default {
},
}
</script>
<style lang="scss" scoped>
.html_temp {
display: flex;
}
</style>
@@ -67,13 +67,18 @@
<el-button type="primary" @click="handleAdd">
{{ $t('common:button:new') }}
</el-button>
<el-button type="primary" @click="openDrawer" :disabled="multipleSelection.length <= 0">
{{ $t('trials:emailManageCfg:button:batchAudit') }}
</el-button>
</el-form-item>
</el-form>
</div>
<!-- 受试者列表 -->
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 45 }" :data="list" stripe height="100" style="width: 100%"
@sort-change="handleSortByColumn">
<el-table-column type="index" width="40" />
@sort-change="handleSortByColumn" @selection-change="handleSelectionChange">
<!-- <el-table-column type="index" width="40" /> -->
<el-table-column type="selection" width="55">
</el-table-column>
<!-- Code -->
<el-table-column prop="Code" :label="$t('trials:emailManageCfg:title:code')" sortable="custom"
show-overflow-tooltip min-width="100" />
@@ -249,12 +254,76 @@
</div>
</div>
</el-dialog>
<el-drawer :title="$t('trials:emailManageCfg:title:audit')" :visible.sync="drawer" direction="rtl" size="80%">
<!-- <div style="width: 800px">
<el-form label-width="100px" @submit.native.prevent size="small" :inline="true" class="demo-form-inline">
<el-form-item :label="$t('il8n:search:keyword')">
<el-input v-model="key" @input="keyChange" />
</el-form-item>
<el-form-item :label="$t('il8n:search:state')">
<el-select v-model="State" clearable filterable @change="handleStateChange">
<el-option v-for="item of $d.InternationalizationKeyState"
:key="'InternationalizationKeyState' + item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-form>
</div> -->
<el-table :data="tableData" v-adaptive="{ bottomOffset: 50 }" height="100" style="width: 100%"
@sort-change="handleSortByColumnDrawer">
<!-- Code -->
<el-table-column prop="Code" :label="$t('trials:emailManageCfg:title:code')" sortable="custom"
show-overflow-tooltip min-width="100" />
<el-table-column v-if="isDistinguishCriteria" prop="TrialReadingCriterionId"
:label="$t('trials:reviewTrack:table:criterionName')" show-overflow-tooltip sortable="custom" min-width="120">
<template slot-scope="scope">
{{ $fd('CriterionType', scope.row.CriterionTypeEnum) }}
</template>
</el-table-column>
<!-- 邮件主题中文 -->
<el-table-column prop="EmailTopicCN" :label="$t('trials:emailManageCfg:table:EmailTopicCN')" sortable="custom"
show-overflow-tooltip min-width="160">
<template slot-scope="scope">
<el-input v-model="scope.row.EmailTopicCN" @input="
(e) => {
$set(scope.row, 'EmailTopicCN', e)
}
" size="mini"></el-input>
</template>
</el-table-column>
<!-- 邮件主题(英文) -->
<el-table-column prop="EmailTopic" :label="$t('trials:emailManageCfg:table:EmailTopic')" sortable="custom"
show-overflow-tooltip min-width="160">
<template slot-scope="scope">
<el-input v-model="scope.row.EmailTopic" @input="
(e) => {
$set(scope.row, 'EmailTopic', e)
}
" size="mini"></el-input>
</template>
</el-table-column>
<!-- 业务层级 -->
<el-table-column prop="BusinessLevelEnum" :label="$t('dictionary:email:label:businessLevel')" sortable="custom"
show-overflow-tooltip min-width="150">
<template slot-scope="scope">
{{ $fd('BusinessLevel', scope.row.BusinessLevelEnum) }}
</template>
</el-table-column>
</el-table>
<div style="text-align: right; padding-top: 10px; padding-right: 10px">
<el-button size="mini" @click="drawer = false">{{ $t('common:button:cancel') }}
</el-button>
<el-button size="mini" type="primary" @click="handleSave">{{
$t('common:button:save')
}}</el-button>
</div>
</el-drawer>
</box-content>
</template>
<script>
import {
getEmailNoticeConfigList,
deleteEmailNoticeConfig,
batchUpdateEmail
} from '@/api/dictionary'
import { GetEmailNoticeConfigList_Export } from '@/api/export'
import BoxContent from '@/components/BoxContent'
@@ -308,6 +377,9 @@ export default {
previewVisible: false,
previewHTML: null,
previewHTMLEN: null,
multipleSelection: [],
drawer: false,
tableData: []
}
},
computed: {
@@ -325,6 +397,50 @@ export default {
this.getList()
},
methods: {
async handleSave() {
try {
let arr = []
this.tableData.forEach(item => {
let obj = {
EmailTopic: item.EmailTopic,
EmailTopicCN: item.EmailTopicCN,
Id: item.Id
}
arr.push(obj)
})
this.drawer = false
let res = await batchUpdateEmail(arr)
if (res.IsSuccess) {
this.$message.success(this.$t('trials:emailManageCfg:message:auditSuccess'))
this.getList()
}
} catch (err) {
console.log(err)
}
},
// 排序
handleSortByColumnDrawer(column) {
if (column.order === 'ascending') {
this.tableData.sort((a, b) =>
a[column.prop].localeCompare(b[column.prop])
)
} else {
this.tableData.sort((a, b) =>
b[column.prop].localeCompare(a[column.prop])
)
}
},
openDrawer() {
this.tableData = []
this.multipleSelection.forEach(item => {
let obj = Object.assign({}, item)
this.tableData.push(obj)
})
this.drawer = true
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
// 获取受试者列表
getList() {
this.loading = true
@@ -62,8 +62,9 @@
<!-- 用户类型 -->
<el-form-item :label="$t('trials:signRecords:table:userType')" v-if="!isDoc">
<el-select v-model="searchData.UserTypeId" clearable filterable style="width: 120px">
<el-option v-for="item of userTypeOptions" v-show="item.UserTypeEnum !== 26 && item.UserTypeEnum !== 27"
:key="item.Id" :label="item.UserTypeShortName" :value="item.Id">
<el-option v-for="item of userTypeOptions"
v-show="isSystem || (item.UserTypeEnum !== 26 && item.UserTypeEnum !== 27)" :key="item.Id"
:label="item.UserTypeShortName" :value="item.Id">
<span>{{ item.UserType }}</span>
</el-option>
</el-select>
@@ -6,12 +6,8 @@
<!-- 中心编号 -->
<el-form-item :label="$t('trials:reviewAssign:readingTask:table:siteCode')">
<el-select v-model="searchData.TrialSiteId" clearable filterable style="width:120px;">
<el-option
v-for="(item,index) of siteOptions"
:key="index"
:label="item.TrialSiteCode"
:value="item.TrialSiteId"
/>
<el-option v-for="(item, index) of siteOptions" :key="index" :label="item.TrialSiteCode"
:value="item.TrialSiteId" />
</el-select>
</el-form-item>
<!-- 受试者编号 -->
@@ -20,51 +16,47 @@
</el-form-item>
<!-- 访视/阅片期名称 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:reviewAssign:readingTask:table:visitName')">
<el-input
v-model="searchData.TaskName"
style="width:100px;"
clearable
/>
<el-input v-model="searchData.TaskName" style="width:100px;" clearable />
</el-form-item>
<!-- 阅片人 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:reviewAssign:readingTask:table:reader')">
<el-select v-model="searchData.DoctorUserId" clearable style="width:120px;">
<el-option v-for="item of DoctorUserList" :key="'DoctorUserId' + item.DoctorUserId" :value="item.DoctorUserId" :label="item.UserName" />
<el-option v-for="item of DoctorUserList" :key="'DoctorUserId' + item.DoctorUserId"
:value="item.DoctorUserId" :label="item.UserName" />
</el-select>
</el-form-item>
<!-- 是否加急 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:reviewAssign:readingTask:table:isUrgent')">
<el-select v-model="searchData.IsUrgent" clearable style="width:120px;">
<el-option v-for="item of $d.YesOrNo" :key="'IsUrgent' + item.label" :value="item.value" :label="item.label" />
<el-option v-for="item of $d.YesOrNo" :key="'IsUrgent' + item.label" :value="item.value"
:label="item.label" />
</el-select>
</el-form-item>
<!-- 任务状态 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:reviewAssign:readingTask:table:taskStatus')">
<el-select v-model="searchData.TaskState" clearable style="width:120px;">
<el-option v-for="item of $d.TaskState" :key="'TaskState' + item.label" :value="item.value" :label="item.label" />
<el-option v-for="item of $d.TaskState" :key="'TaskState' + item.label" :value="item.value"
:label="item.label" />
</el-select>
</el-form-item>
<!-- 任务类型 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:reviewAssign:readingTask:table:taskType')">
<el-select v-model="searchData.ReadingCategory" clearable style="width:120px;">
<el-option v-for="item of $d.ReadingCategory" :key="'ReadingCategory' + item.label" :value="item.value" :label="item.label" />
<el-option v-for="item of $d.ReadingCategory" :key="'ReadingCategory' + item.label" :value="item.value"
:label="item.label" />
</el-select>
</el-form-item>
<!-- 分配状态 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:reviewAssign:readingTask:table:assignStatus')">
<el-select v-model="searchData.TaskAllocationState" clearable style="width:120px;">
<el-option v-for="item of $d.TaskAllocationState" :key="'TaskAllocationState' + item.label" :value="item.value" :label="item.label" />
<el-option v-for="item of $d.TaskAllocationState" :key="'TaskAllocationState' + item.label"
:value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<!-- 分配时间 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:reviewAssign:readingTask:table:assignTime')">
<el-date-picker
v-model="timeList"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
:default-time="['00:00:00', '23:59:59']"
@change="changeTimeList"
/>
<el-date-picker v-model="timeList" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
:default-time="['00:00:00', '23:59:59']" @change="changeTimeList" />
</el-form-item>
<el-form-item style="margin-bottom:10px">
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
@@ -77,180 +69,117 @@
</el-form>
</template>
<template slot="main-container">
<el-table
v-adaptive="{bottomOffset:60}"
v-loading="loading"
:data="list"
stripe
height="100"
@sort-change="handleSortChange"
>
<el-table-column
prop="OriginalReReadingTask.IsUrgent"
:label="$t('trials:consistencyCheck:table:isUrgent')"
show-overflow-tooltip
min-width="100"
sortable="custom"
>
<el-table v-adaptive="{ bottomOffset: 60 }" v-loading="loading" :data="list" stripe height="100"
@sort-change="handleSortChange">
<el-table-column prop="OriginalReReadingTask.IsUrgent" :label="$t('trials:consistencyCheck:table:isUrgent')"
show-overflow-tooltip min-width="100" sortable="custom">
<template slot-scope="scope">
<el-tag v-if="scope.row.OriginalReReadingTask.IsUrgent" type="danger">{{ $fd('YesOrNo', scope.row.OriginalReReadingTask.IsUrgent) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.IsUrgent" type="danger">{{ $fd('YesOrNo',
scope.row.OriginalReReadingTask.IsUrgent) }}</el-tag>
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.OriginalReReadingTask.IsUrgent) }}</el-tag>
</template>
</el-table-column>
<!-- 任务编号 -->
<el-table-column
prop="OriginalReReadingTask.TaskCode"
:label="$t('trials:readTask:table:taskCode')"
min-width="100"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column prop="OriginalReReadingTask.TaskCode" :label="$t('trials:readTask:table:taskCode')"
min-width="100" sortable="custom" show-overflow-tooltip />
<!-- 中心编号 -->
<el-table-column
prop="OriginalReReadingTask.TrialSiteCode"
:label="$t('trials:readTask:table:siteCode')"
min-width="100"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column prop="OriginalReReadingTask.TrialSiteCode" :label="$t('trials:readTask:table:siteCode')"
min-width="100" sortable="custom" show-overflow-tooltip />
<!-- 受试者编号 -->
<el-table-column
prop="OriginalReReadingTask.SubjectCode"
:label="$t('trials:readTask:table:subjectCode')"
min-width="120"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column prop="OriginalReReadingTask.SubjectCode" :label="$t('trials:readTask:table:subjectCode')"
min-width="120" sortable="custom" show-overflow-tooltip />
<!-- 访视/阅片期名称 -->
<el-table-column
prop="OriginalReReadingTask.TaskName"
:label="$t('trials:reviewAssign:readingTask:table:visitName')"
min-width="160"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column prop="OriginalReReadingTask.TaskName"
:label="$t('trials:reviewAssign:readingTask:table:visitName')" min-width="160" sortable="custom"
show-overflow-tooltip />
<!-- 盲态任务标识 -->
<el-table-column
prop="OriginalReReadingTask.TaskBlindName"
:label="$t('trials:reviewAssign:readingTask:table:blindName')"
min-width="140"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column prop="OriginalReReadingTask.TaskBlindName"
:label="$t('trials:reviewAssign:readingTask:table:blindName')" min-width="140" sortable="custom"
show-overflow-tooltip />
<!-- 任务创建时间 -->
<el-table-column
prop="OriginalReReadingTask.CreateTime"
:label="$t('trials:reviewAssign:readingTask:table:createTime')"
min-width="140"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column prop="OriginalReReadingTask.CreateTime"
:label="$t('trials:reviewAssign:readingTask:table:createTime')" min-width="140" sortable="custom"
show-overflow-tooltip />
<!-- 任务状态 -->
<el-table-column
prop="OriginalReReadingTask.TaskState"
:label="$t('trials:reviewAssign:readingTask:table:taskStatus')"
min-width="100"
sortable="custom"
show-overflow-tooltip
>
<el-table-column prop="OriginalReReadingTask.TaskState"
:label="$t('trials:reviewAssign:readingTask:table:taskStatus')" min-width="100" sortable="custom"
show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 0" type="primary">{{ $fd('TaskState', scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 1" type="info">{{ $fd('TaskState', scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 3" type="danger">{{ $fd('TaskState', scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 4" type="warning">{{ $fd('TaskState', scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 5" type="danger">{{ $fd('TaskState', scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 0" type="primary">{{ $fd('TaskState',
scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 1" type="info">{{ $fd('TaskState',
scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 3" type="danger">{{ $fd('TaskState',
scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 4" type="warning">{{ $fd('TaskState',
scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 5" type="danger">{{ $fd('TaskState',
scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
</template>
</el-table-column>
<!-- 任务类型 -->
<el-table-column
prop="OriginalReReadingTask.ReadingCategory"
:label="$t('trials:reviewAssign:readingTask:table:taskType')"
min-width="100"
sortable="custom"
show-overflow-tooltip
>
<el-table-column prop="OriginalReReadingTask.ReadingCategory"
:label="$t('trials:reviewAssign:readingTask:table:taskType')" min-width="100" sortable="custom"
show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 1" type="primary">{{ $fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 2" type="info">{{ $fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 4" type="danger">{{ $fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 5" type="warning">{{ $fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 1" type="primary">{{
$fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 2" type="info">{{ $fd('ReadingCategory',
scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 4" type="danger">{{ $fd('ReadingCategory',
scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 5" type="warning">{{
$fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
</template>
</el-table-column>
<!-- 角色 -->
<el-table-column
prop="OriginalReReadingTask.ArmEnum"
:label="$t('trials:reviewAssign:readingTask:table:role')"
min-width="80"
sortable="custom"
show-overflow-tooltip
>
<el-table-column prop="OriginalReReadingTask.ArmEnum" :label="$t('trials:reviewAssign:readingTask:table:role')"
min-width="80" sortable="custom" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 1" type="primary">{{ $fd('ArmEnum', scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 2" type="success">{{ $fd('ArmEnum', scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 3" type="info">{{ $fd('ArmEnum', scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 4" type="danger">{{ $fd('ArmEnum', scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 5" type="warning">{{ $fd('ArmEnum', scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 1" type="primary">{{ $fd('ArmEnum',
scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 2" type="success">{{ $fd('ArmEnum',
scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 3" type="info">{{ $fd('ArmEnum',
scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 4" type="danger">{{ $fd('ArmEnum',
scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 5" type="warning">{{ $fd('ArmEnum',
scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
</template>
</el-table-column>
<!-- 阅片人 -->
<el-table-column
prop="OriginalReReadingTask.UserName"
:label="$t('trials:reviewAssign:readingTask:table:reader')"
min-width="100"
sortable="custom"
show-overflow-tooltip
>
<el-table-column prop="OriginalReReadingTask.UserName"
:label="$t('trials:reviewAssign:readingTask:table:reader')" min-width="100" sortable="custom"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.OriginalReReadingTask.UserName }}({{ scope.row.OriginalReReadingTask.FullName }})
</template>
</el-table-column>
<!-- 阅片完成时间 -->
<el-table-column
prop="OriginalReReadingTask.SignTime"
:label="$t('trials:reviewTrack:table:signTime')"
min-width="180"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column prop="OriginalReReadingTask.SignTime" :label="$t('trials:reviewTrack:table:signTime')"
min-width="180" sortable="custom" show-overflow-tooltip />
<!-- 重阅申请类型 -->
<el-table-column
prop="OriginalReReadingTask.RequestReReadingType"
:label="$t('trials:rereadTask:table:requestReReadingType')"
min-width="140"
sortable="custom"
show-overflow-tooltip
>
<el-table-column prop="OriginalReReadingTask.RequestReReadingType"
:label="$t('trials:rereadTask:table:requestReReadingType')" min-width="140" sortable="custom"
show-overflow-tooltip>
<template slot-scope="scope">
<div v-if="scope.row.RequestReReadingType">
<el-tag v-if="scope.row.RequestReReadingType === 2" type="danger">{{ $fd('RequestReReadingType', scope.row.RequestReReadingType) }}</el-tag>
<el-tag v-if="scope.row.RequestReReadingType === 2" type="danger">{{ $fd('RequestReReadingType',
scope.row.RequestReReadingType) }}</el-tag>
<el-tag v-else type="primary">{{ $fd('RequestReReadingType', scope.row.RequestReReadingType) }}</el-tag>
</div>
</template>
</el-table-column>
<!-- 申请时间 -->
<el-table-column
prop="RequestReReadingTime"
:label="$t('trials:rereadTask:table:requestReReadingTime')"
min-width="100"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column prop="RequestReReadingTime" :label="$t('trials:rereadTask:table:requestReReadingTime')"
min-width="100" sortable="custom" show-overflow-tooltip />
<!-- 申请原因 -->
<el-table-column
prop="RequestReReadingReason"
:label="$t('trials:rereadTask:table:requestReReadingReason')"
min-width="100"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column prop="RequestReReadingReason" :label="$t('trials:rereadTask:table:requestReReadingReason')"
min-width="100" sortable="custom" show-overflow-tooltip />
<!-- 审批结果 -->
<el-table-column
prop="AllocateTime"
:label="$t('trials:rereadTask:table:requestReReadingResultEnum')"
min-width="100"
sortable="custom"
show-overflow-tooltip
>
<el-table-column prop="AllocateTime" :label="$t('trials:rereadTask:table:requestReReadingResultEnum')"
min-width="100" sortable="custom" show-overflow-tooltip>
<template slot-scope="scope">
<div v-if="scope.row.RequestReReadingResultEnum || scope.row.RequestReReadingResultEnum === 0">
<el-tooltip v-if="scope.row.RequestReReadingResultEnum === 2" class="item" effect="dark" placement="top">
@@ -259,90 +188,217 @@
</div>
<el-tag type="danger">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag>
</el-tooltip>
<el-tag v-if="scope.row.RequestReReadingResultEnum === 1" type="primary">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag>
<el-tag v-if="scope.row.RequestReReadingResultEnum === 0" type="warning">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag>
<el-tag v-if="scope.row.RequestReReadingResultEnum === 1" type="primary">{{ $fd('RequestReReadingResult',
scope.row.RequestReReadingResultEnum) }}</el-tag>
<el-tag v-if="scope.row.RequestReReadingResultEnum === 0" type="warning">{{ $fd('RequestReReadingResult',
scope.row.RequestReReadingResultEnum) }}</el-tag>
</div>
</template>
</el-table-column>
<!-- 新任务编号 -->
<el-table-column
prop="ReReadingNewTaskCode"
:label="$t('trials:rereadTask:table:reReadingNewTaskCode')"
min-width="120"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column
v-if="hasPermi(['role:spm'])"
fixed="right"
:label="$t('common:action:action')"
width="210"
>
<el-table-column prop="ReReadingNewTaskCode" :label="$t('trials:rereadTask:table:reReadingNewTaskCode')"
min-width="120" sortable="custom" show-overflow-tooltip />
<el-table-column v-if="hasPermi(['role:spm'])" fixed="right" :label="$t('common:action:action')" width="210">
<template slot-scope="scope">
<!-- 同意 -->
<el-button
:disabled="!!scope.row.RequestReReadingResultEnum || scope.row.RequestReReadingType === 1"
icon="el-icon-check"
circle
:title="$t('trials:spmAudit:button:agree')"
@click="openReReadingOrBackList(scope.row,1)"
/>
<!-- <el-button :disabled="!!scope.row.RequestReReadingResultEnum || scope.row.RequestReReadingType === 1"
icon="el-icon-check" circle :title="$t('trials:spmAudit:button:agree')"
@click="openReReadingOrBackList(scope.row, 1)" /> -->
<!-- 拒绝 -->
<el-button
:disabled="!!scope.row.RequestReReadingResultEnum || scope.row.RequestReReadingType === 1"
icon="el-icon-close"
circle
:title="$t('trials:spmAudit:button:reject')"
@click="confirmReReading(scope.row,2, true)"
/>
<!-- <el-button :disabled="!!scope.row.RequestReReadingResultEnum || scope.row.RequestReReadingType === 1"
icon="el-icon-close" circle :title="$t('trials:spmAudit:button:reject')"
@click="confirmReReading(scope.row, 2, true)" /> -->
<el-button :disabled="!!scope.row.RequestReReadingResultEnum ||
scope.row.RequestReReadingType === 1
" icon="el-icon-edit-outline" circle :title="$t('trials:spmAudit:table:Approval')"
@click="audit(scope.row)" />
<!-- 已影响任务列表 -->
<el-button
:disabled="scope.row.RequestReReadingResultEnum !== 1"
icon="el-icon-document-copy"
circle
:title="$t('trials:spmAudit:button:influenceList')"
@click="getInfluencedTaskList(scope.row)"
/>
<el-button :disabled="scope.row.RequestReReadingResultEnum !== 1" icon="el-icon-document-copy" circle
:title="$t('trials:spmAudit:button:influenceList')" @click="getInfluencedTaskList(scope.row)" />
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
<base-model v-if="config.visible" :config="config">
<template slot="dialog-body">
<el-form ref="imageBackform" :model="form" class="demo-form-inline" :rules="rules"
:label-width="isEN ? '200px' : '150px'">
<el-form-item :label="$t('trials:spmAudit:table:Matters')" prop="Matters">
<span>{{ rowData.title }}</span>
</el-form-item>
<el-form-item :label="$t('trials:spmAudit:form:ApplyReason')" prop="ApplyReason">
<span>{{ rowData.RequestReReadingReason }}</span>
</el-form-item>
<el-form-item :label="$t('trials:spmAudit:form:IsAgree')" prop="RequestReReadingResultEnum">
<el-radio-group v-model="form.RequestReReadingResultEnum">
<el-radio :label="1">{{ $t('trials:spmAudit:button:auditYes') }}</el-radio>
<el-radio :label="2">{{ $t('trials:spmAudit:button:auditNo') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('trials:spmAudit:form:ResultRemark')" v-if="form.RequestReReadingResultEnum !== 2"
key="1">
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder=""
v-model="form.RequestReReadingRejectReason">
</el-input>
</el-form-item>
<el-form-item :label="$t('trials:spmAudit:form:ResultRemark')" prop="RequestReReadingRejectReason" v-else
key="2">
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder=""
v-model="form.RequestReReadingRejectReason">
</el-input>
</el-form-item>
<el-form-item :label="$t('trials:reviewTrack:dialog:backImpactList')" />
<el-table v-loading="loading" :data="InfluenceTaskList" stripe height="100" style="min-height:200px;max-height: 300px">
<!-- 任务编号 -->
<el-table-column prop="TaskCode" :label="$t('trials:reviewTrack:table:taskCode')" min-width="100"
show-overflow-tooltip />
<!-- 中心编号 -->
<el-table-column prop="TrialSiteCode" :label="$t('trials:reviewTrack:table:siteCode')" min-width="100"
show-overflow-tooltip />
<!-- 受试者编号 -->
<el-table-column prop="SubjectCode" :label="$t('trials:reviewTrack:table:subjectCode')" min-width="120"
show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="
scope.row.BlindSubjectCode &&
scope.row.BlindSubjectCode !== scope.row.SubjectCode
">
{{ `${scope.row.SubjectCode}/${scope.row.BlindSubjectCode}` }}
</span>
<span v-else>{{ scope.row.SubjectCode }}</span>
</template>
</el-table-column>
<!-- 任务名称 -->
<el-table-column prop="VisitTaskNum" :label="$t('trials:reviewTrack:table:taskName')" min-width="120"
show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="
scope.row.TaskBlindName &&
scope.row.TaskName !== scope.row.TaskBlindName
">
{{ `${scope.row.TaskName}/${scope.row.TaskBlindName}` }}
</span>
<span v-else>{{ scope.row.TaskName }}</span>
</template>
</el-table-column>
<!-- 盲态任务标识 -->
<!-- <el-table-column
prop="TaskBlindName"
:label="$t('trials:reviewTrack:table:blindName')"
min-width="120"
show-overflow-tooltip
/> -->
<!-- 阅片标准 -->
<el-table-column prop="TrialReadingCriterionName" :label="$t('trials:reviewTrack:table:criterionName')"
min-width="100" show-overflow-tooltip />
<!-- 任务状态 -->
<el-table-column prop="TaskState" :label="$t('trials:reviewTrack:table:taskStatus')" min-width="100"
show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.TaskState === 0" type="primary">{{
$fd('TaskState', scope.row.TaskState)
}}</el-tag>
<el-tag v-if="scope.row.TaskState === 1" type="info">{{
$fd('TaskState', scope.row.TaskState)
}}</el-tag>
<el-tag v-if="scope.row.TaskState === 3" type="danger">{{
$fd('TaskState', scope.row.TaskState)
}}</el-tag>
<el-tag v-if="scope.row.TaskState === 4" type="warning">{{
$fd('TaskState', scope.row.TaskState)
}}</el-tag>
<el-tag v-if="scope.row.TaskState === 5" type="danger">{{
$fd('TaskState', scope.row.TaskState)
}}</el-tag>
</template>
</el-table-column>
<!-- 任务类型 -->
<el-table-column prop="ReadingCategory" min-width="100" :label="$t('trials:reviewTrack:table:taskType')"
show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.ReadingCategory === 1" type="primary">{{
$fd('ReadingCategory', scope.row.ReadingCategory)
}}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 2" type="info">{{
$fd('ReadingCategory', scope.row.ReadingCategory)
}}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 4" type="danger">{{
$fd('ReadingCategory', scope.row.ReadingCategory)
}}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 5" type="warning">{{
$fd('ReadingCategory', scope.row.ReadingCategory)
}}</el-tag>
</template>
</el-table-column>
<!-- 阅片状态 -->
<el-table-column prop="ReadingTaskState" :label="$t('trials:reviewTrack:table:readingStatus')"
min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.ReadingTaskState === 2" type="primary">{{
$fd('ReadingTaskState', scope.row.ReadingTaskState)
}}</el-tag>
<el-tag v-else type="danger">{{
$fd('ReadingTaskState', scope.row.ReadingTaskState)
}}</el-tag>
</template>
</el-table-column>
<!-- 生效后影响 -->
<el-table-column prop="OptType" :label="$t('trials:reviewTrack:applyReread:title:postEffectiveImpacts')
" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.OptType === 0" type="primary">{{
$fd('ReReadingOrBackOptType', scope.row.OptType)
}}</el-tag>
<el-tag v-if="scope.row.OptType === 1" type="danger">{{
$fd('ReReadingOrBackOptType', scope.row.OptType)
}}</el-tag>
<el-tag v-if="scope.row.OptType === 2" type="warning">{{
$fd('ReReadingOrBackOptType', scope.row.OptType)
}}</el-tag>
</template>
</el-table-column>
<!-- 阅片人 -->
<el-table-column prop="UserName" :label="$t('trials:reviewTrack:table:reader')" min-width="160"
show-overflow-tooltip>
<template v-if="scope.row.DoctorUser" slot-scope="scope">
{{ scope.row.DoctorUser.UserName }}({{
scope.row.DoctorUser.FullName
}})
</template>
</el-table-column>
</el-table>
</el-form>
</template>
<template slot="dialog-footer">
<el-button type="primary" @click="auditImageBack" :loading="loading">
{{ $t('common:button:confirm') }}
</el-button>
<el-button @click="config.visible = false" :loading="loading">
{{ $t('common:button:cancel') }}
</el-button>
</template>
</base-model>
<!-- 驳回 +++-->
<el-dialog
v-if="ConfirmReReadingVisible"
:title="$t('trials:spmAudit:title:rejected')"
:visible.sync="ConfirmReReadingVisible"
width="600px"
append-to-body
:close-on-click-modal="false"
custom-class="base-dialog-wrapper"
>
<el-dialog v-if="ConfirmReReadingVisible" :title="$t('trials:spmAudit:title:rejected')"
:visible.sync="ConfirmReReadingVisible" width="600px" append-to-body :close-on-click-modal="false"
custom-class="base-dialog-wrapper">
<div style="padding:10px;border: 1px solid #e0e0e0;max-height:650px;overflow-y: auto;">
<el-form
ref="reasonForm"
:rules="rules"
:model="ConfirmReReadingForm"
class="demo-ruleForm"
size="small"
label-width="120px"
>
<el-form ref="reasonForm" :rules="rules" :model="ConfirmReReadingForm" class="demo-ruleForm" size="small"
label-width="120px">
<!-- 驳回原因 -->
<el-form-item :label="$t('trials:spmAudit:title:rejectedReason')" prop="RequestReReadingRejectReason">
<el-input
v-model="ConfirmReReadingForm.RequestReReadingRejectReason"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
:placeholder="$t('common:ruleMessage:specify')"
maxlength="500"
show-word-limit
/>
<el-input v-model="ConfirmReReadingForm.RequestReReadingRejectReason" type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }" :placeholder="$t('common:ruleMessage:specify')" maxlength="500"
show-word-limit />
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<!-- 取消 -->
<el-button :disabled="btnLoading" size="small" type="primary" @click="ConfirmReReadingVisible = false;ConfirmReReadingForm = { RequestReReadingRejectReason: null }">
<el-button :disabled="btnLoading" size="small" type="primary"
@click="ConfirmReReadingVisible = false; ConfirmReReadingForm = { RequestReReadingRejectReason: null }">
{{ $t('common:button:cancel') }}
</el-button>
<!-- 保存 -->
@@ -352,137 +408,95 @@
</div>
</el-dialog>
<!-- '重阅影响任务列表' : '已影响任务列表'" +++-->
<el-dialog
v-if="ReReadingOrBackVisible"
:title="opentype === 'read' ? this.$t('trials:spmAudit:title:title1'):this.$t('trials:spmAudit:title:title2')"
:visible.sync="ReReadingOrBackVisible"
width="1460px"
append-to-body
:close-on-click-modal="false"
custom-class="base-dialog-wrapper"
>
<el-dialog v-if="ReReadingOrBackVisible"
:title="opentype === 'read' ? this.$t('trials:spmAudit:title:title1') : this.$t('trials:spmAudit:title:title2')"
:visible.sync="ReReadingOrBackVisible" width="1460px" append-to-body :close-on-click-modal="false"
custom-class="base-dialog-wrapper">
<div class="base-dialog-body">
<el-table
v-loading="loading"
:data="InfluenceTaskList"
stripe
height="100"
style="min-height: 400px;"
>
<el-table v-loading="loading" :data="InfluenceTaskList" stripe height="100" style="min-height: 400px;">
<!-- 任务编号 -->
<el-table-column
prop="TaskCode"
:label="$t('trials:readTask:table:taskCode')"
min-width="100"
show-overflow-tooltip
/>
<el-table-column prop="TaskCode" :label="$t('trials:readTask:table:taskCode')" min-width="100"
show-overflow-tooltip />
<!-- 中心编号 -->
<el-table-column
prop="TrialSiteCode"
:label="$t('trials:readTask:table:siteCode')"
min-width="100"
show-overflow-tooltip
/>
<el-table-column prop="TrialSiteCode" :label="$t('trials:readTask:table:siteCode')" min-width="100"
show-overflow-tooltip />
<!-- 受试者编号 -->
<el-table-column
prop="SubjectCode"
:label="$t('trials:readTask:table:subjectCode')"
min-width="120"
show-overflow-tooltip
/>
<el-table-column prop="SubjectCode" :label="$t('trials:readTask:table:subjectCode')" min-width="120"
show-overflow-tooltip />
<!-- 访视/阅片期名称 -->
<el-table-column
prop="VisitTaskNum"
:label="$t('trials:consistencyCheck:table:visitName')"
min-width="140"
show-overflow-tooltip
>
<el-table-column prop="VisitTaskNum" :label="$t('trials:consistencyCheck:table:visitName')" min-width="140"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.TaskName }}
</template>
</el-table-column>
<!-- 盲态任务标识 -->
<el-table-column
prop="TaskBlindName"
:label="$t('trials:readTask:table:blindName')"
min-width="120"
show-overflow-tooltip
/>
<el-table-column prop="TaskBlindName" :label="$t('trials:readTask:table:blindName')" min-width="120"
show-overflow-tooltip />
<!-- 阅片标准 -->
<el-table-column
prop="TrialReadingCriterionName"
:label="$t('trials:readTask:table:criterionName')"
min-width="100"
show-overflow-tooltip
/>
<el-table-column prop="TrialReadingCriterionName" :label="$t('trials:readTask:table:criterionName')"
min-width="100" show-overflow-tooltip />
<!-- 任务状态 -->
<el-table-column
prop="TaskState"
:label="$t('trials:readTask:table:taskState')"
min-width="100"
show-overflow-tooltip
>
<el-table-column prop="TaskState" :label="$t('trials:readTask:table:taskState')" min-width="100"
show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.TaskState === 0" type="primary">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
<el-tag v-if="scope.row.TaskState === 1" type="info">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
<el-tag v-if="scope.row.TaskState === 3" type="danger">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
<el-tag v-if="scope.row.TaskState === 4" type="warning">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
<el-tag v-if="scope.row.TaskState === 5" type="danger">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
<el-tag v-if="scope.row.TaskState === 0" type="primary">{{ $fd('TaskState', scope.row.TaskState)
}}</el-tag>
<el-tag v-if="scope.row.TaskState === 1" type="info">{{ $fd('TaskState', scope.row.TaskState)
}}</el-tag>
<el-tag v-if="scope.row.TaskState === 3" type="danger">{{ $fd('TaskState', scope.row.TaskState)
}}</el-tag>
<el-tag v-if="scope.row.TaskState === 4" type="warning">{{ $fd('TaskState', scope.row.TaskState)
}}</el-tag>
<el-tag v-if="scope.row.TaskState === 5" type="danger">{{ $fd('TaskState', scope.row.TaskState)
}}</el-tag>
</template>
</el-table-column>
<!-- 任务类型 -->
<el-table-column
prop="ReadingCategory"
min-width="100"
:label="$t('trials:readTask:table:readingCategory')"
show-overflow-tooltip
>
<el-table-column prop="ReadingCategory" min-width="100" :label="$t('trials:readTask:table:readingCategory')"
show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.ReadingCategory === 1" type="primary">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 2" type="info">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 4" type="danger">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 5" type="warning">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 1" type="primary">{{ $fd('ReadingCategory',
scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 2" type="info">{{ $fd('ReadingCategory',
scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 4" type="danger">{{ $fd('ReadingCategory',
scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 5" type="warning">{{ $fd('ReadingCategory',
scope.row.ReadingCategory) }}</el-tag>
</template>
</el-table-column>
<!-- 阅片状态 -->
<el-table-column
prop="ReadingTaskState"
:label="$t('trials:readTask:table:readingTaskState')"
min-width="100"
show-overflow-tooltip
>
<el-table-column prop="ReadingTaskState" :label="$t('trials:readTask:table:readingTaskState')"
min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.ReadingTaskState === 2" type="primary">{{ $fd('ReadingTaskState', scope.row.ReadingTaskState) }}</el-tag>
<el-tag v-if="scope.row.ReadingTaskState === 2" type="primary">{{ $fd('ReadingTaskState',
scope.row.ReadingTaskState) }}</el-tag>
<el-tag v-else type="danger">{{ $fd('ReadingTaskState', scope.row.ReadingTaskState) }}</el-tag>
</template>
</el-table-column>
<!-- 生效后影响 -->
<el-table-column
prop="OptType"
:label="$t('trials:readTask:table:optType')"
min-width="100"
show-overflow-tooltip
>
<el-table-column prop="OptType" :label="$t('trials:readTask:table:optType')" min-width="100"
show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.OptType === 0" type="primary">{{ $fd('ReReadingOrBackOptType', scope.row.OptType) }}</el-tag>
<el-tag v-if="scope.row.OptType === 1" type="danger">{{ $fd('ReReadingOrBackOptType', scope.row.OptType) }}</el-tag>
<el-tag v-if="scope.row.OptType === 2" type="warning">{{ $fd('ReReadingOrBackOptType', scope.row.OptType) }}</el-tag>
<el-tag v-if="scope.row.OptType === 0" type="primary">{{ $fd('ReReadingOrBackOptType',
scope.row.OptType) }}</el-tag>
<el-tag v-if="scope.row.OptType === 1" type="danger">{{ $fd('ReReadingOrBackOptType', scope.row.OptType)
}}</el-tag>
<el-tag v-if="scope.row.OptType === 2" type="warning">{{ $fd('ReReadingOrBackOptType',
scope.row.OptType) }}</el-tag>
</template>
</el-table-column>
<!-- 阅片人 -->
<el-table-column
prop="UserName"
:label="$t('trials:readTask:table:reader')"
min-width="160"
show-overflow-tooltip
>
<el-table-column prop="UserName" :label="$t('trials:readTask:table:reader')" min-width="160"
show-overflow-tooltip>
<template v-if="scope.row.DoctorUser" slot-scope="scope">
{{ scope.row.DoctorUser.UserName }}({{ scope.row.DoctorUser.FullName }})
</template>
</el-table-column>
</el-table>
</div>
<div v-if="opentype==='read'" slot="footer" class="dialog-footer">
<div v-if="opentype === 'read'" slot="footer" class="dialog-footer">
<!-- 取消 -->
<el-button :disabled="btnLoading" size="small" type="primary" @click="ReReadingOrBackVisible = false">
{{ $t('common:button:cancel') }}
@@ -493,16 +507,11 @@
</el-button>
</div>
</el-dialog>
<el-dialog
:destroy-on-close="true"
:visible.sync="signVisible"
:close-on-click-modal="false"
width="600px"
custom-class="base-dialog-wrapper"
>
<el-dialog :destroy-on-close="true" :visible.sync="signVisible" :close-on-click-modal="false" width="600px"
custom-class="base-dialog-wrapper">
<div slot="title">
<span style="font-size:18px;">{{ $t('common:dialogTitle:sign') }}</span>
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${ currentUser })` }}</span>
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${currentUser})` }}</span>
</div>
<SignForm ref="signForm" :sign-code-enum="signCode" @closeDialog="closeSignDialog" />
</el-dialog>
@@ -518,7 +527,7 @@ import { getToken } from '@/utils/auth'
import { changeURLStatic } from '@/utils/history.js'
import const_ from '@/const/sign-code'
import SignForm from '@/views/trials/components/newSignForm'
import baseModel from '@/components/BaseModel'
const searchDataDefault = () => {
return {
PageIndex: 1,
@@ -542,7 +551,7 @@ const searchDataDefault = () => {
}
export default {
name: 'TrialsNotice',
components: { BaseContainer, Pagination, SignForm },
components: { BaseContainer, Pagination, SignForm, baseModel },
data() {
return {
searchData: searchDataDefault(),
@@ -593,8 +602,39 @@ export default {
readVisible: false,
TaskOptType: null,
OtherInfo: null,
ReadingType: null
ReadingType: null,
config: {
visible: false,
title: this.$t("trials:spmAudit:confirmMessage:imageBack"),
width: '1000px',
appendToBody: true,
},
form: {
RequestReReadingResultEnum: null,
RequestReReadingRejectReason: null
},
rules: {
RequestReReadingResultEnum: [
{
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: ['blur', 'change'],
},
],
RequestReReadingRejectReason: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur', 'change'],
},
]
}
}
},
computed: {
isEN() {
return this.$i18n.locale !== 'zh'
},
},
mounted() {
if (this.$route.query.SiteId) {
@@ -612,6 +652,39 @@ export default {
this.getDoctorUserSelectList()
},
methods: {
async auditImageBack() {
try {
console.log(this.form)
let validate = await this.$refs.imageBackform.validate()
if (!validate) return false
this.confirmSign(this.form.RequestReReadingResultEnum)
} catch (err) {
console.log(err)
}
},
async audit(row) {
try {
this.rowData = Object.assign({}, row)
this.rowData.title = `${row.ApplicantName} (${this.$fd('RequestReReadingType', row.RequestReReadingType)}) ${this.$t('trials:spmAudit:title:imageBack').replace('xxx', row.OriginalReReadingTask.SubjectCode).replace('yyy', row.OriginalReReadingTask.TaskName)}`
Object.keys(this.form).forEach(key => {
this.form[key] = null
})
this.loading = true
let res = await getReReadingOrBackInfluenceTaskList(
row.OriginalReReadingTaskId,
true,
row.Id
)
if (res.IsSuccess) {
this.InfluenceTaskList = res.Result
this.config.visible = true
this.loading = false
}
} catch (err) {
this.loading = false
console.log(err)
}
},
getInfluencedTaskList(row) {
this.loading = true
this.opentype = 'look'
@@ -663,7 +736,7 @@ export default {
return
}
if (type === 2) {
this.$refs.reasonForm.validate((valid) => {
this.$refs.imageBackform.validate((valid) => {
if (!valid) return
var params = {
data: {
@@ -675,7 +748,7 @@ export default {
NewReReadingTaskId: row.NewReReadingTaskId
}
],
RequestReReadingRejectReason: this.ConfirmReReadingForm.RequestReReadingRejectReason,
RequestReReadingRejectReason: this.form.RequestReReadingRejectReason,
TrialId: this.$route.query.trialId,
RequestReReadingResultEnum: type
},
@@ -688,7 +761,7 @@ export default {
this.btnLoading = false
this.$message.success(`${type === 1 ? this.$t('trials:spmAudit:title:title4') : this.$t('trials:spmAudit:title:title5')}`)
this.getList()
this.ConfirmReReadingVisible = false
this.config.visible = false
this.$refs['signForm'].btnLoading = false
this.signVisible = false
}).catch(() => {
@@ -720,7 +793,7 @@ export default {
this.loading = false
this.btnLoading = false
this.$message.success(`${type === 1 ? this.$t('trials:spmAudit:title:title4') : this.$t('trials:spmAudit:title:title5')}`)
this.ReReadingOrBackVisible = false
this.config.visible = false
this.$refs['signForm'].btnLoading = false
this.signVisible = false
this.getList()
@@ -787,22 +860,25 @@ export default {
}
</script>
<style lang="scss" scoped>
::v-deep .hidden-row{
::v-deep .hidden-row {
display: none;
}
::v-deep .el-dialog__body {
padding: 15px 20px;
}
::v-deep .el-tag--danger.el-tag--dark {
// background-color: #f56c6c!important;
border-color: none!important;
border-color: none !important;
// color: #fff!important;
}
::v-deep #TaskAllocationRuleList thead .el-checkbox__inner{
::v-deep #TaskAllocationRuleList thead .el-checkbox__inner {
display: none;
}
::v-deep .el-descriptions-item__label.has-colon:after{
::v-deep .el-descriptions-item__label.has-colon:after {
display: none;
}
</style>
@@ -130,10 +130,12 @@
<SignForm :is-system-doc="currentRow.IsSystemDoc" :document-id="currentRow.Id" :file-name="fileName"
:trial-id="trialId" @closeDialog="closeSignDialog" />
</el-dialog>
<attachmentList v-if="config.visible" :config="config" :rowData="currentRow" :SystemDocumentId="SystemDocumentId"
:isView="true" @getList="getList" />
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" :isView="true"
v-if="perview_visible" />
<attachmentList2 v-if="config.visible && !currentRow.IsSystemDoc" :config="config" :rowData="currentRow"
:TrialDocumentId="TrialDocumentId" :isView="true" @getList="getList" />
<attachmentList v-if="config.visible && currentRow.IsSystemDoc" :config="config" :rowData="currentRow"
:SystemDocumentId="TrialDocumentId" :isView="true" @getList="getList" />
<attachmentPreview :SystemDocumentId="TrialDocumentId" :isTrial="!currentRow.IsSystemDoc"
:visible.sync="perview_visible" :isView="true" v-if="perview_visible" />
</BaseContainer>
</template>
<script>
@@ -145,6 +147,7 @@ import SignForm from './components/SignForm'
import store from '@/store'
import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview'
import attachmentList from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentList'
import attachmentList2 from '@/views/trials/trials-panel/setting/attachment/components/attachmentList'
const searchDataDefault = () => {
return {
FileTypeId: '',
@@ -158,7 +161,7 @@ const searchDataDefault = () => {
}
export default {
name: 'TrialAttachments',
components: { BaseContainer, Pagination, PreviewFile, SignForm, attachmentPreview, attachmentList },
components: { BaseContainer, Pagination, PreviewFile, SignForm, attachmentPreview, attachmentList, attachmentList2 },
data() {
return {
searchData: searchDataDefault(),
@@ -180,7 +183,7 @@ export default {
currentUser: zzSessionStorage.getItem('userName'),
typeOptions: [],
trialId: this.$route.query.trialId,
SystemDocumentId: null,
TrialDocumentId: null,
perview_visible: null,
config: {
visible: false,
@@ -205,7 +208,7 @@ export default {
methods: {
openAttachment(row, isList = false) {
if (!row.AttachmentCount) return false
this.SystemDocumentId = row.Id
this.TrialDocumentId = row.Id
this.currentRow = { ...row }
if (!isList) {
this.perview_visible = true
@@ -1694,7 +1694,7 @@ export default {
cornerstoneTools.getToolState(
this.canvas,
'playClip'
).data[0].loop = false
).data[0].loop = true
} else {
cornerstoneTools.stopClip(this.canvas)
this.toolState.clipPlaying = false
@@ -1624,7 +1624,7 @@ export default {
cornerstoneTools.getToolState(
this.canvas,
'playClip'
).data[0].loop = false
).data[0].loop = true
} else {
cornerstoneTools.stopClip(this.canvas)
this.toolState.clipPlaying = false
@@ -488,7 +488,8 @@ export default {
return num.toFixed(this.digitPlaces)
},
formItemNumberChange(v, question) {
this.$emit('formItemTableNumberChange', v, question)
this.$emit('formItemTableNumberChange')
this.$emit('setFormItemData', { key: question.Id, val: v, question: question })
// this.$emit('formItemTableNumberChange', v, question)
},
resetChild(obj) {
@@ -233,9 +233,7 @@ export default {
this.questionForm[v] = ''
},
setFormItemData(obj) {
console.log('setFormItemData', obj)
this.$set(this.questionForm, obj.key, JSON.parse(JSON.stringify(obj.val)))
console.log(this.questionForm)
this.classArr.map(i=>{
if (i.triggerId === obj.key) {
let answer = null
@@ -1,6 +1,11 @@
<template>
<div v-loading="loading" :element-loading-text="loadingText" element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)" class="read-page-container">
<div
v-loading="loading"
:element-loading-text="loadingText"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)"
class="read-page-container"
>
<!-- 检查列表 -->
<div class="left-panel">
<div class="task-container">
@@ -200,7 +205,7 @@
<svg-icon v-else icon-class="fitToImage" class="svg-icon" />
</div>
<!--融合-->
<div class="tool-item" :title="$t('trials:lugano:button:fusion')" @click.prevent="openFusion" v-if="readingTool === 2">
<div v-if="readingTool === 2" class="tool-item" :title="$t('trials:lugano:button:fusion')" @click.prevent="openFusion">
<svg-icon icon-class="fusion" class="svg-icon" />
</div>
<div
@@ -279,9 +284,9 @@
<div
v-if="criterionType === 0"
:title="$t('trials:reading:button:more')"
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '']"
@click.stop="showPanel($event)"
@mouseleave="toolMouseout"
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '']"
>
<div class="dropdown">
<div
@@ -292,10 +297,10 @@
<i class="el-icon-arrow-down" style="color:#fff;" />
</div>
<div class="dropdown-content">
<ul style="width:100px;" v-if="readingTaskState < 2">
<ul v-if="readingTaskState < 2" style="width:100px;">
<li v-for="i in customizeStandards" :key="i.toolName" style="text-align:left;">
<a href="#" @click.prevent="setMoreToolActive(i.toolName)">
<svg-icon :icon-class="i.icon" class="svg-icon" style="margin-right: 5px;"/>
<svg-icon :icon-class="i.icon" class="svg-icon" style="margin-right: 5px;" />
{{ $t(i.i18nKey) }}
</a>
</li>
@@ -338,7 +343,7 @@
<div class="content-wrapper">
<!-- viewports -->
<div class="viewports-wrapper">
<div ref="container" class="grid-container" >
<div ref="container" class="grid-container">
<div :class="[ 'viewports-box', isFusion ? 'viewports-box-down' : '' ]" :style="gridStyle">
<div
v-for="(v, index) in cellsMax"
@@ -362,7 +367,7 @@
/>
</div>
</div>
<div :class="[ 'viewports-box', !isFusion ? 'viewports-box-down' : '' ]" v-if="readingTool === 2" :style="gridStyle">
<div v-if="readingTool === 2" :class="[ 'viewports-box', !isFusion ? 'viewports-box-down' : '' ]" :style="gridStyle">
<div
v-for="(v, index) in cellsMax"
v-show="index < cells.length"
@@ -432,6 +437,10 @@
:visit-info="s"
@resetAnnotations="resetAnnotations"
@setReadingTaskState="setReadingTaskState"
@viewCustomAnnotationSeries="viewCustomAnnotationSeries"
@getCustomScreenshots="getCustomScreenshots"
@setReadingToolActive="setReadingToolActive"
@setReadingToolPassive="setReadingToolPassive"
/>
</div>
</div>
@@ -522,9 +531,13 @@
</div>
</el-dialog>
<el-dialog :visible.sync="fusionVisible" :close-on-click-modal="false" :title="$t('trials:lugano:button:record')"
width="850px" >
<FusionForm v-if="fusionVisible" :activeTaskIndex="activeTaskIndex" :taskList="visitTaskList" @close="closeFusion" @fusion="handleFusion" />
<el-dialog
:visible.sync="fusionVisible"
:close-on-click-modal="false"
:title="$t('trials:lugano:button:record')"
width="850px"
>
<FusionForm v-if="fusionVisible" :active-task-index="activeTaskIndex" :task-list="visitTaskList" @close="closeFusion" @fusion="handleFusion" />
</el-dialog>
</div>
</template>
@@ -550,6 +563,8 @@ import * as cornerstoneTools from '@cornerstonejs/tools'
import initLibraries from '@/views/trials/trials-panel/reading/dicoms/components/Fusion/js/initLibraries'
import html2canvas from 'html2canvas'
import { getTools, getCustomizeStandardsTools, config } from './toolConfig'
import { mapGetters } from 'vuex'
import store from '@/store'
import StudyList from './StudyList'
import Viewport from './Viewport'
import PetCtViewport from './PetCtViewport'
@@ -584,17 +599,19 @@ const {
// RectangleROITool,
PlanarFreehandROITool,
CircleROITool,
AngleTool,
CobbAngleTool,
EraserTool,
MIPJumpToClickTool,
VolumeRotateTool,
synchronizers
// cursors
} = cornerstoneTools
const { createCameraPositionSynchronizer, createVOISynchronizer } = synchronizers;
const { createCameraPositionSynchronizer, createVOISynchronizer } = synchronizers
const newStyles = {
global: {
color: 'rgb(255, 0, 0)',
colorHighlighted: 'rgb(255, 0, 0)',
colorHighlighted: 'rgb(0, 255, 0)',
colorSelected: 'rgb(255, 0, 0)',
colorLocked: 'rgb(255, 0, 0)',
lineWidth: '1',
@@ -604,7 +621,7 @@ const newStyles = {
textBoxFontFamily: 'Helvetica Neue, Helvetica, Arial, sans-serif',
textBoxFontSize: '14px',
textBoxColor: 'rgb(255, 0, 0)',
textBoxColorHighlighted: 'rgb(255, 0, 0)',
textBoxColorHighlighted: 'rgb(0, 255, 0)',
textBoxColorSelected: 'rgb(255, 0, 0)',
textBoxColorLocked: 'rgb(255, 0, 0)',
textBoxBackground: '',
@@ -618,12 +635,6 @@ annotation.config.style.setDefaultToolStyles(newStyles)
const { MouseBindings, Events: toolsEvents } = csToolsEnums
export default {
name: 'ReadPage',
props: {
readingTool: {
type: Number,
default: 2
}
},
components: {
StudyList,
Viewport,
@@ -640,6 +651,12 @@ export default {
FusionForm,
colorMap
},
props: {
readingTool: {
type: Number,
default: 2
}
},
data() {
return {
loading: false,
@@ -710,6 +727,7 @@ export default {
volumeData: {},
fusionSerieId: {},
loadingText: null,
toolNames: ['Length', 'Bidirectional', 'RectangleROI', 'ArrowAnnotate', 'CircleROI', 'Eraser']
// resetAnnotation: false , // 使
}
},
@@ -736,7 +754,7 @@ export default {
},
viewportKey() {
return this.isFusion ? 'viewport-fusion' : 'viewport'
}
},
},
watch: {
activeTaskId: {
@@ -793,7 +811,7 @@ export default {
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
if (this.criterionType === 0) {
this.tools = getCustomizeStandardsTools(this.taskInfo.ReadingToolList)
let toolNames = this.tools.map(i=>i.toolName)
const toolNames = this.tools.map(i => i.toolName)
this.customizeStandards = config.customizeStandards.filter(item => !toolNames.includes(item.toolName))
} else {
this.tools = getTools(this.criterionType)
@@ -1062,13 +1080,13 @@ export default {
}
]
let viewportIds = ['viewport-0', 'viewport-1', 'viewport-2', 'viewport-3']
let fusionViewportIds = ["viewport-fusion-0", "viewport-fusion-1", "viewport-fusion-2", "viewport-fusion-3"]
if(this.readingTool === 2){
const fusionViewportIds = ['viewport-fusion-0', 'viewport-fusion-1', 'viewport-fusion-2', 'viewport-fusion-3']
if (this.readingTool === 2) {
const fusionElement1 = this.$refs['viewport-fusion-0'][0].$el
const fusionElement2 = this.$refs['viewport-fusion-1'][0].$el
const fusionElement3 = this.$refs['viewport-fusion-2'][0].$el
const fusionElement4 = this.$refs['viewport-fusion-3'][0].$el
let arr = [
const arr = [
{
viewportId: 'viewport-fusion-0',
type: ViewportType.ORTHOGRAPHIC,
@@ -1104,7 +1122,7 @@ export default {
}
}
]
viewportInputArray = [ ...viewportInputArray, ...arr ]
viewportInputArray = [...viewportInputArray, ...arr]
viewportIds = viewportIds.concat(fusionViewportIds)
}
renderingEngine.setViewports(viewportInputArray)
@@ -1123,6 +1141,8 @@ export default {
cornerstoneTools.addTool(BidirectionalTool)
cornerstoneTools.addTool(ScaleOverlayTool)
cornerstoneTools.addTool(CircleROITool)
cornerstoneTools.addTool(AngleTool)
cornerstoneTools.addTool(CobbAngleTool)
cornerstoneTools.addTool(MIPJumpToClickTool)
cornerstoneTools.addTool(VolumeRotateTool)
@@ -1150,7 +1170,7 @@ export default {
})
toolGroup.addTool(RectangleROITool.toolName, {
cachedStats: false,
getTextLines: this.getRectangleROIToolTextLines
getTextLines: this.criterionType === 0 ? this.getCustomRectangleROIToolTextLines : this.getRectangleROIToolTextLines
})
toolGroup.addTool(PlanarFreehandROITool.toolName, {
allowOpenContours: false,
@@ -1170,28 +1190,34 @@ export default {
toolGroup.addTool(CircleROITool.toolName, {
getTextLines: this.getCircleROIToolTextLines
})
if(toolGroupId === 'viewport-fusion-3'){
toolGroup.addTool(VolumeRotateTool.toolName);
toolGroup.addTool(AngleTool.toolName, {
getTextLines: this.getAngleToolTextLines
})
toolGroup.addTool(CobbAngleTool.toolName, {
getTextLines: this.getCobbAngleToolTextLines
})
if (toolGroupId === 'viewport-fusion-3') {
toolGroup.addTool(VolumeRotateTool.toolName)
toolGroup.setToolActive(VolumeRotateTool.toolName, {
bindings: [
{
mouseButton: MouseBindings.Wheel, // mouse wheel
},
],
});
mouseButton: MouseBindings.Wheel // mouse wheel
}
]
})
toolGroup.addTool(MIPJumpToClickTool.toolName, {
targetViewportIds: fusionViewportIds,
});
targetViewportIds: fusionViewportIds
})
// Set the initial state of the tools, here we set one tool active on left click.
// This means left click will draw that tool.
toolGroup.setToolActive(MIPJumpToClickTool.toolName, {
bindings: [
{
mouseButton: MouseBindings.Primary, // Left Click
},
],
});
mouseButton: MouseBindings.Primary // Left Click
}
]
})
}
toolGroup.setToolActive(StackScrollTool.toolName, {
bindings: [{ mouseButton: MouseBindings.Wheel }]
@@ -1216,6 +1242,8 @@ export default {
toolGroup.setToolPassive(LengthTool.toolName)
toolGroup.setToolPassive(BidirectionalTool.toolName)
toolGroup.setToolPassive(CircleROITool.toolName)
toolGroup.setToolPassive(AngleTool.toolName)
toolGroup.setToolPassive(CobbAngleTool.toolName)
} else {
toolGroup.setToolEnabled(ArrowAnnotateTool.toolName)
toolGroup.setToolEnabled(RectangleROITool.toolName)
@@ -1223,13 +1251,15 @@ export default {
toolGroup.setToolEnabled(LengthTool.toolName)
toolGroup.setToolEnabled(BidirectionalTool.toolName)
toolGroup.setToolEnabled(CircleROITool.toolName)
toolGroup.setToolEnabled(AngleTool.toolName)
toolGroup.setToolEnabled(CobbAngleTool.toolName)
}
toolGroup.setToolPassive(EraserTool.toolName)
})
eventTarget.addEventListener('cornerstoneimageloadprogress', this.imageLoadProgress)
console.log(Events, toolsEvents)
if ( this.readingTool === 2 ) {
if (this.readingTool === 2) {
this.setUpSynchronizers()
}
},
@@ -1327,6 +1357,11 @@ export default {
toolsEvents.ANNOTATION_REMOVED,
this.criterionType === 0 ? this.customAnnotationRemovedListener : this.annotationRemovedListener
)
eventTarget.addEventListener(
toolsEvents.ANNOTATION_SELECTION_CHANGE,
this.criterionType === 0 ? this.customAnnotationSelectionChangeListener : this.annotationSelectionChangeListener
)
// eventTarget.addEventListener(
// toolsEvents.ANNOTATION_ADDED,
// this.annotationAddedListener
@@ -1418,16 +1453,21 @@ export default {
annotation.numberOfFrames = isNaN(parseInt(params.frame)) ? null : parseInt(params.frame)
annotation.markTool = annotation.metadata.toolName
this.markedSeriesIds.push(series.Id)
const markName = await this.customPrompt()
const operateStateEnum = this.$refs[`ecrf_${this.taskInfo.VisitTaskId}`][0].operateStateEnum
const markName = await this.customPrompt(!this.isNumber(operateStateEnum))
if (markName) {
annotation.data.label = markName
if (annotation.metadata.toolName === 'ArrowAnnotate') {
annotation.data.text = markName
}
if (this.isNumber(operateStateEnum)) {
this.$refs[`ecrf_${series.TaskInfo.VisitTaskId}`][0].bindAnnotationToQuestion(annotation)
} else {
this.saveCustomAnnotation(annotation)
}
}
}
this.setToolsPassive()
},
@@ -1467,16 +1507,39 @@ export default {
if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
const operateStateEnum = this.$refs[`ecrf_${this.taskInfo.VisitTaskId}`][0].operateStateEnum
const isBound = this.$refs[`ecrf_${annotation.visitTaskId}`][0].verifyAnnotationIsBound(annotation)
if (isBound || this.isNumber(operateStateEnum)) {
this.$refs[`ecrf_${series.TaskInfo.VisitTaskId}`][0].updateAnnotationToQuestion(annotation)
} else {
this.saveCustomAnnotation(annotation)
}
}
this.setToolsPassive()
},
async customAnnotationRemovedListener(e) {
const { annotation } = e.detail
try{
try {
// if ( this.resetAnnotation && this.isFusion ) return false
if (!annotation) return false
if (this.readingTaskState === 2) throw 'annotation Not allowed to operate'
if (this.readingTaskState === 2) {
const errorMsg = { message: 'annotation Not allowed to operate' }
throw errorMsg
}
const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
if (i === -1) {
//
return
}
if (annotation.visitTaskId === this.taskInfo.VisitTaskId) {
const isBound = this.$refs[`ecrf_${annotation.visitTaskId}`][0].verifyAnnotationIsBound(annotation)
if (isBound && this.activeTool === 'Eraser') {
this.$alert('该标记已与问题进行绑定,不允许删除!')
const errorMsg = { message: 'annotation Not allowed to operate' }
throw errorMsg
}
}
if (annotation.visitTaskId === this.taskInfo.VisitTaskId && annotation.seriesId) {
if (this.activeTool === 'Eraser') {
await this.$confirm(
@@ -1499,9 +1562,10 @@ export default {
viewport.render()
}
} else {
throw 'annotation Not allowed to operate'
const errorMsg = { message: 'annotation Not allowed to operate' }
throw errorMsg
}
}catch(e){
} catch (e) {
cornerstoneTools.annotation.state.addAnnotation(annotation)
const renderingEngine = getRenderingEngine(renderingEngineId)
for (let i = 0; i < this.cells.length; i++) {
@@ -1521,6 +1585,20 @@ export default {
viewport.render()
}
},
customAnnotationSelectionChangeListener(e) {
if (this.readingTaskState === 2) return
const { detail } = e
const annotations = cornerstoneTools.annotation.state.getAllAnnotations()
const i = annotations.findIndex(i => i.annotationUID === detail.selection[0])
if (i > -1) {
if (annotations[i].visitTaskId !== this.taskInfo.VisitTaskId) {
return
} else {
this.$refs[`ecrf_${this.taskInfo.VisitTaskId}`][0].bindAnnotationToQuestion(annotations[i])
}
}
},
annotationSelectionChangeListener(e) {},
async getAnnotations(visitTaskId) {
if (this.readingTaskState === 2) return
const taskIdx = this.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId)
@@ -1614,7 +1692,6 @@ export default {
}
const textLines = []
if (data.label) {
// textLines.push(data.label)
textLines.push(data.status ? `${data.label}(${data.status})` : data.label)
}
textLines.push(`${parseFloat(length).toFixed(this.digitPlaces)} ${unit}`)
@@ -1636,7 +1713,9 @@ export default {
} = cachedVolumeStats || {}
const textLines = []
if (data.label) {
textLines.push(data.label)
}
if (area) {
const areaLine = isEmptyArea
? `Area: Oblique not supported`
@@ -1679,11 +1758,26 @@ export default {
if (data.label) {
textLines.push(data.status ? `${data.label}(${data.status})` : data.label)
}
// textLines.push(`Area: ${parseFloat(area).toFixed(this.digitPlaces)} ${areaUnit}`)
// textLines.push(`Mean: ${csUtils.roundNumber(mean)} ${modalityUnit}`)
// textLines.push(`Max: ${csUtils.roundNumber(max)} ${modalityUnit}`)
// textLines.push(`Std Dev: ${csUtils.roundNumber(stdDev)} ${modalityUnit}`)
return textLines
},
getCustomRectangleROIToolTextLines(data, targetId) {
const cachedVolumeStats = data.cachedStats[targetId]
const { area, mean, max, stdDev, areaUnit, modalityUnit } = cachedVolumeStats
if (mean === undefined) {
return
}
const textLines = []
if (data.label) {
textLines.push(data.label)
}
textLines.push(`Area: ${this.reRound(area, this.digitPlaces)} ${areaUnit}`)
textLines.push(`Mean: ${this.reRound(mean, this.digitPlaces)} ${modalityUnit}`)
textLines.push(`Max: ${this.reRound(max, this.digitPlaces)} ${modalityUnit}`)
textLines.push(`Std Dev: ${this.reRound(stdDev, this.digitPlaces)} ${modalityUnit}`)
return textLines
},
@@ -1692,22 +1786,17 @@ export default {
const { length, width, unit } = cachedStats[targetId]
const textLines = []
// if (label) {
// textLines.push(label);
// }
if (label) {
// textLines.push(label)
textLines.push(data.status ? `${label}(${data.status})` : label)
}
if (length === undefined) {
return textLines
}
// spaceBetweenSlices & pixelSpacing &
// magnitude in each direction? Otherwise, this is "px"?
textLines.push(
`L: ${csUtils.roundNumber(length)} ${unit || unit}`,
`S: ${csUtils.roundNumber(width)} ${unit}`
`L: ${parseFloat(length).toFixed(this.digitPlaces)} ${unit || unit}`,
`S: ${parseFloat(width).toFixed(this.digitPlaces)} ${unit}`
)
return textLines
@@ -1728,37 +1817,86 @@ export default {
const textLines = []
if (data.label) {
// textLines.push(data.label)
textLines.push(data.status ? `${data.label}(${data.status})` : data.label)
textLines.push(data.label)
}
if (radius) {
const radiusLine = isEmptyArea
? `Radius: Oblique not supported`
: `Radius: ${csUtils.roundNumber(radius)} ${radiusUnit}`
: `Radius: ${this.reRound(radius, this.digitPlaces)} ${radiusUnit}`
textLines.push(radiusLine)
}
if (area) {
const areaLine = isEmptyArea
? `Area: Oblique not supported`
: `Area: ${csUtils.roundNumber(area)} ${areaUnit}`
: `Area: ${parseFloat(area)} ${areaUnit}`
textLines.push(areaLine)
}
if (mean) {
textLines.push(`Mean: ${csUtils.roundNumber(mean)} ${modalityUnit}`)
textLines.push(`Mean: ${this.reRound(mean, this.digitPlaces)} ${modalityUnit}`)
}
if (max) {
textLines.push(`Max: ${csUtils.roundNumber(max)} ${modalityUnit}`)
textLines.push(`Max: ${this.reRound(max, this.digitPlaces)} ${modalityUnit}`)
}
if (stdDev) {
textLines.push(`Std Dev: ${csUtils.roundNumber(stdDev)} ${modalityUnit}`)
textLines.push(`Std Dev: ${this.reRound(stdDev, this.digitPlaces)} ${modalityUnit}`)
}
return textLines
},
getAngleToolTextLines(data, targetId) {
const cachedVolumeStats = data.cachedStats[targetId]
const { angle } = cachedVolumeStats
if (angle === undefined) {
return
}
if (isNaN(angle)) {
return [`${angle}`]
}
const textLines = []
if (label) {
textLines.push(label)
}
textLines.push(`${angle.toFixed(this.digitPlaces)} ${String.fromCharCode(176)}`)
return textLines
},
getCobbAngleToolTextLines(data, targetId) {
const cachedVolumeStats = data.cachedStats[targetId]
const { angle } = cachedVolumeStats
if (angle === undefined) {
return
}
const textLines = []
if (label) {
textLines.push(label)
}
textLines.push(`${angle.toFixed(this.digitPlaces)} ${String.fromCharCode(176)}`)
return textLines
},
reRound(result, finalPrecision) {
if (typeof result === 'string' && result.includes(', ')) {
const numStrs = result.split(', ')
const processed = numStrs.map(str => this.processSingle(str, finalPrecision))
return processed.join(', ')
}
return this.processSingle(result, finalPrecision)
},
processSingle(str, precision) {
const num = parseFloat(str)
if (isNaN(num)) return 'NaN'
//
if (Math.abs(num) < 0.0001) return str
const factor = 10 ** precision
return (Math.round(num * factor + 0.0000001) / factor).toFixed(precision)
},
//
setToolActive(toolName) {
const toolGroupId = `${this.viewportKey}-${this.activeViewportIndex}`
@@ -1798,6 +1936,37 @@ export default {
this.activeTool = toolName
}
}
if (this.criterionType === 0 && this.readingTaskState < 2) {
this.$refs[`ecrf_${this.taskInfo.VisitTaskId}`][0].resetOperateState()
}
},
setReadingToolActive(toolName) {
if (this.readingTaskState === 2) return
if (this.activeTool === toolName) return
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
const toolGroupId = `${this.viewportKey}-${this.activeViewportIndex}`
const toolGroup = ToolGroupManager.getToolGroup(toolGroupId)
if (this.activeTool) {
toolGroup.setToolPassive(this.activeTool)
}
toolGroup.setToolActive(toolName, {
bindings: [{ mouseButton: MouseBindings.Primary }]
})
this.activeTool = toolName
}
},
setReadingToolPassive() {
if (this.readingTaskState === 2) return
if (this.activeTool && this.toolNames.includes(this.activeTool)) {
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
const toolGroupId = `${this.viewportKey}-${this.activeViewportIndex}`
const toolGroup = ToolGroupManager.getToolGroup(toolGroupId)
toolGroup.setToolPassive(this.activeTool)
this.activeTool = ''
}
}
},
setMoreToolActive(toolName) {
if (this.readingTaskState === 2) return
@@ -1872,8 +2041,10 @@ export default {
const type = parseInt(value)
// 123490590
if (type === 1) {
viewport.resetCamera()
viewport.resetProperties()
// viewport.resetCamera()
// viewport.resetProperties()
// viewport.render()
viewport.setViewPresentation({ rotation: 0 })
viewport.render()
} else if (type === 2) {
const { flipVertical } = viewport.getCamera()
@@ -2035,8 +2206,8 @@ export default {
const renderingEngine = getRenderingEngine(renderingEngineId)
const viewport = renderingEngine.getViewport(`${this.viewportKey}-${this.activeViewportIndex}`)
const { invert } = viewport.getProperties()
if ( this.isFusion ) {
viewport.setProperties({ invert: !invert }, this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].volumeId )
if (this.isFusion) {
viewport.setProperties({ invert: !invert }, this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].volumeId)
}
viewport.setProperties({ invert: !invert })
viewport.render()
@@ -2180,18 +2351,18 @@ export default {
toggleFullScreen(e, index) {
this.fullScreenIndex = this.fullScreenIndex === index ? null : index
this.activeViewportIndex = index
if ( this.isFusion ) {
let viewportIds = [`${this.viewportKey}-0`, `${this.viewportKey}-1`, `${this.viewportKey}-2`]
viewportIds.forEach(id=>{
let index = this.$refs[id][0].series.SliceIndex
if (this.isFusion) {
const viewportIds = [`${this.viewportKey}-0`, `${this.viewportKey}-1`, `${this.viewportKey}-2`]
viewportIds.forEach(id => {
const index = this.$refs[id][0].series.SliceIndex
this.$refs[id][0].setFullScreen(index)
})
}
},
async toggleTask(taskInfo, taskIndex) {
if(this.isFusion){
let confirm = await this.$confirm(this.$t('trials:reading:confirm:changeStack'))
if(!confirm) return false
if (this.isFusion) {
const confirm = await this.$confirm(this.$t('trials:reading:confirm:changeStack'))
if (!confirm) return false
this.isFusion = false
this.fullScreenIndex = null
this.setToolsPassive()
@@ -2261,9 +2432,9 @@ export default {
this.setToolsPassive()
},
async activeSeries(obj) {
if(this.isFusion){
let confirm = await this.$confirm(this.$t('trials:reading:confirm:changeStack'))
if(!confirm) return false
if (this.isFusion) {
const confirm = await this.$confirm(this.$t('trials:reading:confirm:changeStack'))
if (!confirm) return false
this.isFusion = false
this.setToolsPassive()
this.rows = 1
@@ -2419,6 +2590,34 @@ export default {
}
return obj
},
viewCustomAnnotationSeries(obj) {
const i = this.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
if (i === -1) return
const studyList = this.visitTaskList[i].StudyList
const series = this.getMarkedSeries(studyList, obj.annotation)
if (series) {
this.$refs[`${this.viewportKey}-${this.cells.length - 1}`][0].setSeriesInfo(series, true)
this.activeViewportIndex = i
this.$refs[series.TaskInfo.VisitTaskId][0].setSeriesActive(series.StudyIndex, series.SeriesIndex)
}
},
async getCustomScreenshots(obj, callback) {
const i = this.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
if (i === -1) return
const studyList = this.visitTaskList[i].StudyList
const series = this.getMarkedSeries(studyList, obj.annotation)
if (series) {
this.$refs[`${this.viewportKey}-${this.cells.length - 1}`][0].setSeriesInfo(series, true)
this.activeViewportIndex = i
this.$refs[series.TaskInfo.VisitTaskId][0].setSeriesActive(series.StudyIndex, series.SeriesIndex)
const divForDownloadViewport = document.querySelector(
`div[data-viewport-uid="${this.viewportKey}-${this.activeViewportIndex}"]`
)
const canvas = await html2canvas(divForDownloadViewport)
const base64Str = canvas.toDataURL('image/png', 1)
callback(base64Str)
}
},
async getScreenshots(measureData, callback) {
if (measureData) {
await this.imageLocation(measureData)
@@ -2617,12 +2816,13 @@ export default {
return params
},
//
async customPrompt() {
async customPrompt(isShowCancelButton = true) {
try {
const that = this
//
const { value } = await this.$prompt(this.$t('trials:noneDicom:message:msg1'), '', {
showClose: false,
showCancelButton: isShowCancelButton,
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
const value = instance.inputValue
@@ -2643,8 +2843,11 @@ export default {
return null
}
},
isNumber(value) {
return typeof value === 'number' && value !== null && !isNaN(value)
},
showPanel(e, toolName) {
if(toolName === 'layout' && this.isFusion) return false
if (toolName === 'layout' && this.isFusion) return false
e.currentTarget.firstChild.lastChild.style.display = 'block'
},
toolMouseout(e) {
@@ -2661,67 +2864,67 @@ export default {
},
//
setUpSynchronizers() {
let axialCameraPositionSynchronizer = createCameraPositionSynchronizer(
const axialCameraPositionSynchronizer = createCameraPositionSynchronizer(
'AXIAL_CAMERA_SYNCHRONIZER_ID'
);
let ctVoiSynchronizer = createVOISynchronizer('CT_VOI_SYNCHRONIZER_ID', {
)
const ctVoiSynchronizer = createVOISynchronizer('CT_VOI_SYNCHRONIZER_ID', {
syncInvertState: false,
syncColormap: false,
});
let ptVoiSynchronizer = createVOISynchronizer('PT_VOI_SYNCHRONIZER_ID', {
syncColormap: false
})
const ptVoiSynchronizer = createVOISynchronizer('PT_VOI_SYNCHRONIZER_ID', {
syncInvertState: false,
syncColormap: false,
});
let fusionVoiSynchronizer = createVOISynchronizer('FUSION_VOI_SYNCHRONIZER_ID', {
syncColormap: false
})
const fusionVoiSynchronizer = createVOISynchronizer('FUSION_VOI_SYNCHRONIZER_ID', {
syncInvertState: false,
syncColormap: false,
syncColormap: false
});
[
`viewport-fusion-0`,
`viewport-fusion-1`,
`viewport-fusion-2`,
`viewport-fusion-2`
].forEach((viewportId) => {
axialCameraPositionSynchronizer.add({
renderingEngineId: this.renderingEngineId,
viewportId,
});
viewportId
})
});
[
`viewport-fusion-0`,
`viewport-fusion-0`
].forEach((viewportId) => {
ctVoiSynchronizer.add({
renderingEngineId: this.renderingEngineId,
viewportId,
});
viewportId
})
});
[
`viewport-fusion-3`,
`viewport-fusion-1`,
`viewport-fusion-1`
].forEach((viewportId) => {
ptVoiSynchronizer.add({
renderingEngineId: this.renderingEngineId,
viewportId,
});
viewportId
})
});
[
`viewport-fusion-2`,
`viewport-fusion-2`
].forEach((viewportId) => {
fusionVoiSynchronizer.add({
renderingEngineId,
viewportId,
});
viewportId
})
ctVoiSynchronizer.addTarget({
renderingEngineId,
viewportId,
});
viewportId
})
ptVoiSynchronizer.addTarget({
renderingEngineId,
viewportId,
});
});
viewportId
})
})
},
setColorMap(rgbPresetName) {
let fusionViewportIds = [`viewport-fusion-1`, `viewport-fusion-2`, `viewport-fusion-3`]
const fusionViewportIds = [`viewport-fusion-1`, `viewport-fusion-2`, `viewport-fusion-3`]
fusionViewportIds.forEach(id => {
this.$refs[id][0].setPreset(rgbPresetName)
this.$refs[id][0].renderColorBar(rgbPresetName)
@@ -2729,25 +2932,25 @@ export default {
})
},
voiChange(v) {
let fusionViewportIds = [`viewport-fusion-1`, `viewport-fusion-2`, `viewport-fusion-3`]
const fusionViewportIds = [`viewport-fusion-1`, `viewport-fusion-2`, `viewport-fusion-3`]
fusionViewportIds.forEach(id => {
this.$refs[id][0].voiChange(v)
})
},
async handleFusion(data) {
try{
try {
this.fusionVisible = false
this.isFusion = true
this.rows = 2;
this.rows = 2
this.cols = 2
let { ct, pt } = data
const { ct, pt } = data
this.loading = true
this.loadingText = this.$t('trials:lugano:message:loadVolumes')
// this.resetAnnotation = true
// console.log(cornerstoneTools.annotation.state.getAllAnnotations(),'cornerstoneTools.annotation.state')
// cornerstoneTools.annotation.state.removeAllAnnotations()
this.renderedTaskIds = []
if ( this.verifyFusionData(ct, pt) ) {
if (this.verifyFusionData(ct, pt)) {
this.loading = false
this.loadingText = null
this.$refs[`viewport-0`][0].setSeriesInfo(ct)
@@ -2757,10 +2960,10 @@ export default {
// this.resetAnnotation = false
return true
}
if (!this.fusionSerieId.ct || this.fusionSerieId.ct !== ct.SeriesInstanceUid ) {
if (!this.fusionSerieId.ct || this.fusionSerieId.ct !== ct.SeriesInstanceUid) {
this.fusionSerieId.ct = ct.SeriesInstanceUid
}
if (!this.fusionSerieId.pt || this.fusionSerieId.pt !== pt.SeriesInstanceUid ) {
if (!this.fusionSerieId.pt || this.fusionSerieId.pt !== pt.SeriesInstanceUid) {
this.fusionSerieId.pt = pt.SeriesInstanceUid
}
await this.getVolume(pt)
@@ -2768,22 +2971,22 @@ export default {
await this.getVolume(pt, true)
this.loading = false
this.loadingText = null
let ctData = {
const ctData = {
data: ct,
volumeId: this.volumeData[ct.SeriesInstanceUid].volumeId,
volumeId: this.volumeData[ct.SeriesInstanceUid].volumeId
}
let ptData = {
const ptData = {
data: pt,
volumeId: this.volumeData[pt.SeriesInstanceUid].volumeId,
volume: this.volumeData[pt.SeriesInstanceUid].volume,
volume: this.volumeData[pt.SeriesInstanceUid].volume
}
let fusionData = {
const fusionData = {
ct,
data: pt,
volumeId: this.volumeData[pt.SeriesInstanceUid].volumeId,
ctVolumeId: this.volumeData[ct.SeriesInstanceUid].volumeId,
ptVolumeId: this.volumeData[pt.SeriesInstanceUid].volumeId,
fusionVolumeId: this.volumeData[`fusion_${pt.SeriesInstanceUid}`].volumeId,
fusionVolumeId: this.volumeData[`fusion_${pt.SeriesInstanceUid}`].volumeId
}
this.$refs[`viewport-0`][0].setSeriesInfo(ct)
this.$refs[`viewport-1`][0].setSeriesInfo(pt)
@@ -2791,36 +2994,36 @@ export default {
this.$refs[`viewport-3`][0].setSeriesInfo(pt)
this.$refs[`viewport-fusion-0`][0].setSeriesInfo(ctData)
this.$refs[`viewport-fusion-1`][0].setSeriesInfo(ptData, { colorMap: true})
this.$refs[`viewport-fusion-1`][0].setSeriesInfo(ptData, { colorMap: true })
this.$refs[`viewport-fusion-2`][0].setSeriesInfo(fusionData, { isFusion: true, colorMap: true })
this.$refs[`viewport-fusion-3`][0].setSeriesInfo(ptData, { isMip: true, colorMap: true })
// this.resetAnnotation = false
this.$nextTick(() => {
this.$refs[`colorMap`].init()
})
}catch(err){
} catch (err) {
console.log(err)
this.loading = false
this.loadingText = null
}
},
verifyFusionData(ct, pt) {
if (this.fusionSerieId.ct === ct.SeriesInstanceUid && this.fusionSerieId.pt === pt.SeriesInstanceUid && cache.getVolume(this.volumeData[ct.SeriesInstanceUid].volumeId) && cache.getVolume(this.volumeData[pt.SeriesInstanceUid].volumeId) && cache.getVolume(this.volumeData[`fusion_${pt.SeriesInstanceUid}`].volumeId) ) {
if (this.fusionSerieId.ct === ct.SeriesInstanceUid && this.fusionSerieId.pt === pt.SeriesInstanceUid && cache.getVolume(this.volumeData[ct.SeriesInstanceUid].volumeId) && cache.getVolume(this.volumeData[pt.SeriesInstanceUid].volumeId) && cache.getVolume(this.volumeData[`fusion_${pt.SeriesInstanceUid}`].volumeId)) {
return true
}
return false
},
async getVolume(serie, isFusion = false ) {
async getVolume(serie, isFusion = false) {
return new Promise(async res => {
let volumeId = null, volume = null
let key = isFusion ? `fusion_${serie.SeriesInstanceUid}` : serie.SeriesInstanceUid
if(!this.volumeData[key] || !cache.getVolume(this.volumeData[key].volumeId)) {
if ( serie.Modality === 'PT' && !isFusion ) {
let volumeId = null; let volume = null
const key = isFusion ? `fusion_${serie.SeriesInstanceUid}` : serie.SeriesInstanceUid
if (!this.volumeData[key] || !cache.getVolume(this.volumeData[key].volumeId)) {
if (serie.Modality === 'PT' && !isFusion) {
serie.ImageIds.forEach(async id => {
const imageLoadObject = cache.getImage(id);
const imageLoadObject = cache.getImage(id)
if (imageLoadObject) {
await new Promise(res => {
cache.removeImageLoadObject(id, {force:true}); //
cache.removeImageLoadObject(id, { force: true }) //
res()
})
}
@@ -2850,7 +3053,7 @@ export default {
},
closeFusion() {
this.fusionVisible = false
},
}
}
}
</script>
@@ -319,7 +319,7 @@ export default {
const viewport = renderingEngine.getViewport(this.viewportId)
if (isPlay) {
cornerstoneTools.utilities.cine.playClip(viewport.element, { framesPerSecond, loop: false })
cornerstoneTools.utilities.cine.playClip(viewport.element, { framesPerSecond, loop: true })
} else {
cornerstoneTools.utilities.cine.stopClip(viewport.element)
}
@@ -399,6 +399,7 @@ export default {
}
// if (isLocate && obj.SliceIndex === this.series.SliceIndex) return
if (this.series?.Stack && obj.Stack[obj.SliceIndex] === this.series.Stack[this.series.SliceIndex]) return
this.toggleClipPlay(false)
this.series = { ...obj }
const renderingEngine = getRenderingEngine(this.renderingEngineId)
const viewport = renderingEngine.getViewport(this.viewportId)
@@ -408,6 +409,7 @@ export default {
}
this.prefetchMetadataInformation(obj.ImageIds, obj.Modality)
await viewport.setStack(this.series.Stack, obj.SliceIndex)
viewport.render()
} catch (e) {
console.log(e)
@@ -32,9 +32,14 @@
:reading-task-state="readingTaskState"
:criterion-id="criterionId"
:calculation-list="calculationList"
:question-mark-info-list="questionMarkInfoList"
:questions-mark-status="questionsMarkStatus"
:is-baseline="isBaseLineTask"
@resetFormItemData="resetFormItemData"
@setFormItemData="setFormItemData"
@getQuestions="getQuestions"
@operateImageMarker="operateImageMarker"
@unBindAnnotationToQuestion="unBindAnnotationToQuestion"
/>
</template>
@@ -74,11 +79,12 @@
<script>
import { getCustomTableQuestionAnswer, changeDicomReadingQuestionAnswer, submitVisitTaskQuestionsInDto, getQuestionCalculateRelation } from '@/api/trials'
import { setSkipReadingCache, resetReadingTask } from '@/api/reading'
import { getCustomTableQuestionAnswer, changeDicomReadingQuestionAnswer, submitVisitTaskQuestionsInDto, getQuestionCalculateRelation, saveTaskQuestion } from '@/api/trials'
import { setSkipReadingCache, resetReadingTask, saveTableQuestionMark } from '@/api/reading'
import const_ from '@/const/sign-code'
import QuestionFormItem from '@/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem'
import QuestionFormItem from './QuestionFormItem'
import SignForm from '@/views/trials/components/newSignForm'
import store from '@/store'
export default {
name: 'EcrfList',
components: {
@@ -93,7 +99,7 @@ export default {
readingTaskState: {
type: Number,
required: true
},
}
},
data() {
return {
@@ -112,7 +118,18 @@ export default {
calculationList: [],
taskInfo: null,
isBaseLineTask: false,
rerender: true
rerender: true,
questionMarkInfoList: [],
operateStateEnum: null, // 0123456
operateQuestionId: '',
operateRowId: '',
operateParentQsId: '',
isTableQuestion: false,
imageTool: '',
imageToolAttribute: '',
questionsMarkStatus: {},
digitPlaces: 2,
questionImageToolAttributeInfo: {}
}
},
mounted() {
@@ -120,12 +137,14 @@ export default {
this.visitTaskId = this.visitInfo.VisitTaskId
this.taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
this.isBaseLineTask = this.taskInfo.IsBaseLine
this.criterionType = this.taskInfo.CriterionType
this.criterionId = this.taskInfo.TrialReadingCriterionId
const digitPlaces = Number(localStorage.getItem('digitPlaces'))
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
this.getQuestionCalculateRelation()
this.getQuestions()
this.getQuestions(true)
},
methods: {
async getQuestions() {
async getQuestions(isInit) {
this.loading = true
try {
const param = {
@@ -147,12 +166,30 @@ export default {
}
if (v.Type === 'number') {
this.$set(this.questionForm, v.Id, v.Answer === '' ? '' : parseFloat(v.Answer).toFixed(this.digitPlaces))
if (v.ImageToolAttribute) {
this.$set(this.questionImageToolAttributeInfo, v.Id, v.ImageToolAttribute)
}
}
if (v.Childrens.length > 0) {
this.setChild(v.Childrens)
}
})
this.questions = res.Result.SinglePage
this.questionsMarkStatus = {}
this.questionMarkInfoList = res.OtherInfo.QuestionMarkInfoList.map(i => {
if (i.RowId) {
this.$set(this.questionsMarkStatus, `${i.RowId}_${i.TableQuestionId}`, {isMarked: i.MeasureData !== '', isSaved: true})
} else if (i.QuestionId) {
this.$set(this.questionsMarkStatus, i.QuestionId, {isMarked: i.MeasureData !== '', isSaved: true})
}
if (typeof i.MeasureData === 'string' && i.MeasureData) {
i.MeasureData = JSON.parse(i.MeasureData)
}
return i
})
if (!isInit) {
this.$emit('resetAnnotations', this.visitTaskId)
}
this.loading = false
}
} catch (e) {
@@ -180,6 +217,9 @@ export default {
}
if (i.Type === 'number') {
this.$set(this.questionForm, i.Id, i.Answer === '' ? '' : parseFloat(i.Answer).toFixed(this.digitPlaces))
if (i.ImageToolAttribute) {
this.$set(this.questionImageToolAttributeInfo, i.Id, i.ImageToolAttribute)
}
}
if (i.Childrens && i.Childrens.length > 0) {
this.setChild(i.Childrens)
@@ -325,6 +365,604 @@ export default {
}
})
},
verifyAnnotationIsBound(annotation) {
const i = this.questionMarkInfoList.findIndex(i => i.MeasureData && i.MeasureData.annotationUID === annotation.annotationUID)
return i > -1
},
// async operateImageMarker(obj) {
// this.operateStateEnum = obj.operateStateEnum
// this.isTableQuestion = obj.question.IsTableQuestion ? true : false
// this.imageTool = obj.question.ImageTool
// this.imageToolAttribute = obj.question.ImageToolAttribute
// this.operateQuestionId = obj.question.Id
// this.operateRowId = obj.question.RowId
// this.operateParentQsId = obj.question.ParentQsId
// if (obj.operateStateEnum === 0) {
// //
// this.$emit('setReadingToolPassive')
// } else if (obj.operateStateEnum === 1) {
// //
// this.$emit('setReadingToolActive', obj.question.ImageTool)
// } else if (obj.operateStateEnum === 2) {
// //
// let i = -1
// if (this.isTableQuestion) {
// if (this.operateRowId) {
// i = this.questionMarkInfoList.findIndex(i => i.TableQuestionId === obj.question.Id && i.RowId === this.operateRowId)
// } else {
// i = this.questionMarkInfoList.findIndex(i => i.TableQuestionId === obj.question.Id && !i.RowId)
// }
// } else {
// i = this.questionMarkInfoList.findIndex(i => i.QuestionId === obj.question.Id)
// }
// if (i > -1) {
// const annotation = this.questionMarkInfoList[i].MeasureData
// this.$emit('viewCustomAnnotationSeries', { visitTaskId: this.visitTaskId, annotation })
// }
// } else if (obj.operateStateEnum === 3) {
// //
// this.$emit('setReadingToolPassive')
// } else if (obj.operateStateEnum === 4) {
// this.$emit('setReadingToolPassive')
// //
// let i = -1
// let questionMarkInfo = {}
// if (this.isTableQuestion) {
// if (this.operateRowId) {
// i = this.questionMarkInfoList.findIndex(i => i.TableQuestionId === obj.question.Id && i.RowId === this.operateRowId)
// } else {
// i = this.questionMarkInfoList.findIndex(i => i.TableQuestionId === obj.question.Id && !i.RowId)
// }
// } else {
// this.$set(this.questionForm, obj.question.Id, '')
// i = this.questionMarkInfoList.findIndex(i => i.QuestionId === obj.question.Id)
// }
// if (i === -1) return
// this.questionMarkInfoList[i].MeasureData = ''
// this.questionMarkInfoList[i].StudyId = ''
// this.questionMarkInfoList[i].SeriesId = ''
// this.questionMarkInfoList[i].InstanceId = ''
// questionMarkInfo = this.questionMarkInfoList[i]
// questionMarkInfo.isMarked = false
// questionMarkInfo.isSaved = false
// this.$set(this.questionsMarkStatus, this.operateRowId ? `${this.operateRowId}_${obj.question.Id}` : obj.question.Id, questionMarkInfo)
// } else if (obj.operateStateEnum === 5) {
// //
// this.loading = true
// try {
// const answers = []
// answers.push({ id: obj.question.Id, answer: this.questionForm[obj.question.Id] })
// const markInfo = []
// const i = this.questionMarkInfoList.findIndex(i => i.QuestionId === this.operateQuestionId)
// if (i > -1) {
// const obj = Object.assign({}, this.questionMarkInfoList[i])
// obj.MeasureData = obj.MeasureData ? JSON.stringify(obj.MeasureData) : ''
// markInfo.push(obj)
// }
// //
// const params = {
// visitTaskId: this.visitTaskId,
// answers: answers,
// questionMarkInfoList: markInfo
// }
// await saveTaskQuestion(-10, params)
// this.$set(this.questionsMarkStatus, obj.question.Id, {isMarked: this.questionMarkInfoList[i].MeasureData ? true : false, isSaved: true})
// this.loading = false
// } catch (e) {
// console.log(e)
// this.loading = false
// }
// } else if (obj.operateStateEnum === 6) {
// //
// let questionMarkInfo = {}
// if (this.isTableQuestion) {
// questionMarkInfo.isMarked = false
// questionMarkInfo.isSaved = false
// } else {
// questionMarkInfo.isMarked = false
// questionMarkInfo.isSaved = false
// }
// this.$set(this.questionsMarkStatus, this.operateRowId ? `${this.operateRowId}_obj.question.Id` : obj.question.Id, questionMarkInfo)
// } else if (obj.operateStateEnum === 7) {
// //
// const loading = this.$loading({ fullscreen: true })
// try {
// let annotation = null
// if (!this.operateRowId && obj.rowId && obj.question.ParentQsId) {
// this.operateRowId = obj.rowId
// this.questionMarkInfoList.forEach(item => {
// if (item.QuestionId === obj.question.ParentQsId && !item.RowId) {
// item.RowId = obj.rowId
// let questionMarkStatus = Object.assign({}, this.questionsMarkStatus[item.TableQuestionId])
// delete this.questionsMarkStatus[item.TableQuestionId]
// if (item.TableQuestionId === this.operateQuestionId) {
// annotation = item.MeasureData
// this.$set(this.questionsMarkStatus, `${obj.rowId}_${item.TableQuestionId}`, questionMarkStatus)
// } else {
// this.$set(this.questionsMarkStatus, `${obj.rowId}_${item.TableQuestionId}`, {isMarked: item.MeasureData ? true : false, isSaved: false})
// }
// }
// })
// } else if (this.operateRowId && this.operateQuestionId) {
// const i = this.questionMarkInfoList.findIndex(i => i.RowId === this.operateRowId && i.TableQuestionId === this.operateQuestionId)
// if (i === -1) return
// annotation = this.questionMarkInfoList[i].MeasureData
// }
// let picturePath = ''
// if (annotation) {
// //
// const base64Str = await this.getScreenshots({ visitTaskId: this.visitTaskId, annotation })
// const pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, base64Str)
// picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
// }
// let params = {
// Answer: obj.answer,
// VisitTaskId: this.visitTaskId,
// QuestionId: obj.question.ParentQsId,
// InstanceId: annotation ? annotation.instanceId : '',
// SeriesId: annotation ? annotation.seriesId : '',
// StudyId: annotation ? annotation.studyId : '',
// MarkTool: annotation ? annotation.markTool : '',
// PicturePath: picturePath,
// NumberOfFrames: annotation ? annotation.numberOfFrames : null,
// MeasureData: annotation ? JSON.stringify(annotation) : '',
// QuestionType: 0,
// OrderMarkName: annotation ? annotation.data.label : '',
// RowId: this.operateRowId,
// TableQuestionId: this.operateQuestionId,
// RowIndex: obj.rowIndex
// }
// //
// await saveTableQuestionMark(params, -10)
// this.$set(this.questionsMarkStatus, `${this.operateRowId}_${this.operateQuestionId}`, {isMarked: annotation ? true : false, isSaved: true})
// this.resetOperateState()
// loading.close()
// } catch(e) {
// console.log(e)
// loading.close()
// }
// }
// },
async operateImageMarker(obj) {
const STATE = {
BIND: 0, //
ADD: 1, //
VIEW: 2, //
CHANGE: 3, //
REMOVE: 4, //
SAVE_OUTER: 5, //
UPDATE: 6, //
SAVE_TABLE: 7 //
}
const { question, operateStateEnum, rowId, answer } = obj
const { Id, IsTableQuestion, ImageTool, ImageToolAttribute, ParentQsId, RowId } = question
Object.assign(this, {
operateStateEnum,
isTableQuestion: !!IsTableQuestion,
imageTool: ImageTool,
imageToolAttribute: ImageToolAttribute,
operateQuestionId: Id,
operateRowId: RowId,
operateParentQsId: ParentQsId
})
const stateHandlers = {
[STATE.BIND]: () => this.$emit('setReadingToolPassive'),
[STATE.ADD]: () => this.$emit('setReadingToolActive', ImageTool),
[STATE.VIEW]: this.handleViewAnnotation,
[STATE.CHANGE]: () => this.$emit('setReadingToolPassive'),
[STATE.REMOVE]: this.handleRemoveAnnotation,
[STATE.SAVE_OUTER]: this.handleSaveOuterQuestions,
[STATE.UPDATE]: this.handleUpdateValue,
[STATE.SAVE_TABLE]: this.handleSaveTableQuestions
}
const handler = stateHandlers[operateStateEnum]
handler && await handler.call(this, obj)
},
async handleViewAnnotation(obj) {
const index = this.findMarkIndex(obj.question)
if (index === -1) return
const annotation = this.questionMarkInfoList[index].MeasureData
this.$emit('viewCustomAnnotationSeries', {
visitTaskId: this.visitTaskId,
annotation
})
},
handleRemoveAnnotation(obj) {
const index = this.findMarkIndex(obj.question)
if (index === -1) return
Object.assign(this.questionMarkInfoList[index], {
MeasureData: '',
StudyId: '',
SeriesId: '',
InstanceId: ''
})
const key = this.operateRowId
? `${this.operateRowId}_${obj.question.Id}`
: obj.question.Id
this.$set(this.questionsMarkStatus, key, {
isMarked: false,
isSaved: false
})
},
async handleSaveOuterQuestions(obj) {
this.loading = true;
try {
const answers = [{ id: obj.question.Id, answer: this.questionForm[obj.question.Id] }]
const markInfo = []
const index = this.questionMarkInfoList.findIndex(
item => item.QuestionId === this.operateQuestionId
)
if (index > -1) {
const item = { ...this.questionMarkInfoList[index] }
item.MeasureData = item.MeasureData ? JSON.stringify(item.MeasureData) : ''
markInfo.push(item)
}
await saveTaskQuestion(-10, {
visitTaskId: this.visitTaskId,
answers,
questionMarkInfoList: markInfo
})
this.$set(this.questionsMarkStatus, obj.question.Id, {
isMarked: !!this.questionMarkInfoList[index]?.MeasureData,
isSaved: true
})
} catch (e) {
console.error('保存失败:', e)
} finally {
this.loading = false
}
},
handleUpdateValue(obj) {
const key = this.operateRowId
? `${this.operateRowId}_${obj.question.Id}`
: obj.question.Id
this.$set(this.questionsMarkStatus, key, {
isMarked: false,
isSaved: false
})
},
async handleSaveTableQuestions(obj) {
const loading = this.$loading({ fullscreen: true })
try {
let annotation = null
if (!this.operateRowId && obj.rowId && obj.question.ParentQsId) {
this.operateRowId = obj.rowId
this.updateQuestionsMarkStatus(obj)
}
annotation = this.getAnnotationByRow(this.operateRowId)
//
let picturePath = ''
if (annotation) {
const base64Str = await this.getScreenshots({
visitTaskId: this.visitTaskId,
annotation
})
const pictureObj = await this.uploadScreenshots(`${Date.now()}`, base64Str)
picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
}
await saveTableQuestionMark({
Answer: obj.answer,
VisitTaskId: this.visitTaskId,
QuestionId: obj.question.ParentQsId,
...(annotation ? {
InstanceId: annotation.instanceId,
SeriesId: annotation.seriesId,
StudyId: annotation.studyId,
MarkTool: annotation.markTool,
NumberOfFrames: annotation.numberOfFrames,
MeasureData: JSON.stringify(annotation),
OrderMarkName: annotation.data.label
} : {}),
PicturePath: picturePath,
QuestionType: 0,
RowId: this.operateRowId,
TableQuestionId: this.operateQuestionId,
RowIndex: obj.rowIndex
}, -10)
this.$set(this.questionsMarkStatus,
`${this.operateRowId}_${this.operateQuestionId}`,
{ isMarked: !!annotation, isSaved: true }
)
this.resetOperateState()
} catch(e) {
console.error('表格保存失败:', e)
} finally {
loading.close()
}
},
findMarkIndex(question) {
const { Id, RowId } = question
if (this.isTableQuestion) {
return RowId
? this.questionMarkInfoList.findIndex(i =>
i.TableQuestionId === Id && i.RowId === RowId)
: this.questionMarkInfoList.findIndex(i =>
i.TableQuestionId === Id && !i.RowId)
}
return this.questionMarkInfoList.findIndex(i => i.QuestionId === Id)
},
updateQuestionsMarkStatus(obj) {
this.questionMarkInfoList.forEach(item => {
if (item.QuestionId === obj.question.ParentQsId && !item.RowId) {
item.RowId = obj.rowId
const oldKey = item.TableQuestionId
const newKey = `${obj.rowId}_${item.TableQuestionId}`
if (this.questionsMarkStatus[oldKey]) {
const status = { ...this.questionsMarkStatus[oldKey] }
delete this.questionsMarkStatus[oldKey]
this.$set(this.questionsMarkStatus, newKey, status)
}
}
})
},
getAnnotationByRow(rowId) {
const index = this.questionMarkInfoList.findIndex(
i => i.RowId === rowId && i.TableQuestionId === this.operateQuestionId
)
return index > -1 ? this.questionMarkInfoList[index].MeasureData : null
},
async bindAnnotationToQuestion(annotation) {
try {
const VALID_STATES = [null, 0, 1, 3]
const currentState = this.operateStateEnum
if (!VALID_STATES.includes(currentState)) return
const isInvalidAnnotation = currentState === 1 && annotation.markTool !== this.imageTool
if (isInvalidAnnotation) return
if (currentState === null) {
return this.handleNullState(annotation)
}
if (!this.operateQuestionId) return
if ([0, 3].includes(currentState)) {
if (!annotation.data.label || annotation.markTool !== this.imageTool) {
this.$alert('该标记不能与问题绑定!')
return
}
if (currentState === 3) {
const conflictIndex = this.questionMarkInfoList.findIndex(
item => item.MeasureData.annotationUID === annotation.annotationUID
&& item.RowId !== this.operateRowId
)
if (conflictIndex > -1) {
this.$alert('该标记已绑定到其他行,不能更改绑定!')
return
}
}
const message = currentState === 0 ? '是否确认绑定?' : '是否确认更改?'
const result = await this.$confirm(message, {
type: 'warning',
distinguishCancelAndClose: true
})
const isConfirmed = result === 'confirm'
if (!isConfirmed) return
}
const targetIndex = this.findTargetIndex()
if (targetIndex === -1) {
this.questionMarkInfoList.push({
InstanceId: annotation.instanceId,
SeriesId: annotation.seriesId,
StudyId: annotation.studyId,
MarkTool: annotation.metadata.toolName,
PicturePath: '',
NumberOfFrames: annotation.numberOfFrames,
MeasureData: annotation,
RowId: this.operateRowId || '',
QuestionId: this.isTableQuestion
? this.operateParentQsId
: this.operateQuestionId,
TableQuestionId: this.isTableQuestion
? this.operateQuestionId
: ''
})
} else {
const target = this.questionMarkInfoList[targetIndex]
Object.assign(target, {
InstanceId: annotation.instanceId,
SeriesId: annotation.seriesId,
StudyId: annotation.studyId,
MarkTool: annotation.metadata.toolName,
PicturePath: '',
NumberOfFrames: annotation.numberOfFrames,
MeasureData: annotation
})
}
this.updateMarkStatus(targetIndex, annotation)
this.operateStateEnum = null
} catch (e) {
console.error('绑定失败:', e); //
}
},
handleNullState(annotation) {
const qsArr = []
const markList = this.questionMarkInfoList
for (let i = 0; i < markList.length; i++) {
const item = markList[i];
if (item.MeasureData?.annotationUID !== annotation.annotationUID) continue
item.MeasureData = annotation
if (item.TableQuestionId) {
qsArr.push({ ...item, ImageToolAttribute: this.imageToolAttribute })
const keyId = item.RowId
? `${item.RowId}_${item.TableQuestionId}`
: item.TableQuestionId
this.$set(this.questionsMarkStatus, keyId, {
isMarked: true,
isSaved: false
})
} else {
this.setAnswerToQuestion(annotation, item.QuestionId)
this.$set(this.questionsMarkStatus, item.QuestionId, {
isMarked: true,
isSaved: false
})
}
}
if (qsArr.length) {
store.dispatch('dicom3d/setOperateInfo', qsArr)
}
},
findTargetIndex() {
if (this.isTableQuestion && this.operateRowId) {
return this.questionMarkInfoList.findIndex(
item => item.TableQuestionId === this.operateQuestionId
&& item.RowId === this.operateRowId
)
} else if (this.isTableQuestion) {
return this.questionMarkInfoList.findIndex(
item => item.TableQuestionId === this.operateQuestionId
&& !item.RowId
)
}
return this.questionMarkInfoList.findIndex(
item => item.QuestionId === this.operateQuestionId
)
},
updateMarkStatus(index, annotation) {
const status = { isMarked: true, isSaved: false }
if (this.isTableQuestion) {
const keyId = index > -1 && this.questionMarkInfoList[index].RowId
? `${this.questionMarkInfoList[index].RowId}_${this.questionMarkInfoList[index].TableQuestionId}`
: this.operateRowId
? `${this.operateRowId}_${this.operateQuestionId}`
: this.operateQuestionId
this.$set(this.questionsMarkStatus, keyId, status)
store.dispatch('dicom3d/setOperateInfo', [{
MeasureData: annotation,
QuestionId: this.operateParentQsId,
TableQuestionId: this.operateQuestionId,
RowId: this.operateRowId,
ImageToolAttribute: this.imageToolAttribute
}])
} else {
this.setAnswerToQuestion(annotation, this.operateQuestionId)
this.$set(this.questionsMarkStatus, this.operateQuestionId, status)
}
},
updateAnnotationToQuestion(annotation) {
const questionMarkInfo = { isMarked: true, isSaved: false }
const qsArr = []
for (let i = 0; i < this.questionMarkInfoList.length; i++) {
const item = this.questionMarkInfoList[i]
if (!item.MeasureData || item.MeasureData.annotationUID !== annotation.annotationUID) continue
item.MeasureData = annotation
const isTableMode = this.isTableQuestion || item.TableQuestionId
if (!isTableMode) {
this.setAnswerToQuestion(annotation, item.QuestionId)
this.$set(this.questionsMarkStatus, item.QuestionId, questionMarkInfo)
continue
}
this.operateParentQsId = item.QuestionId
this.operateQuestionId = item.TableQuestionId
this.operateRowId ||= item.RowId
qsArr.push({ ...item })
const keyId = item.RowId ? `${item.RowId}_${item.TableQuestionId}` : item.TableQuestionId;
this.$set(this.questionsMarkStatus, keyId, questionMarkInfo);
}
if (qsArr.length > 0) {
store.dispatch('dicom3d/setOperateInfo', qsArr);
}
},
setAnswerToQuestion(annotation, questionId) {
if (!questionId || !annotation) return
let prop = ''
if (!this.imageToolAttribute) {
prop = this.questionImageToolAttributeInfo[questionId]
} else {
prop = this.imageToolAttribute
}
let val = this.getAnnotationProp(annotation, prop)
this.$set(this.questionForm, questionId, val)
},
getAnnotationProp(annotation, prop) {
if (!annotation || !prop) return
const referencedImageId = annotation?.metadata?.referencedImageId
if (!referencedImageId) return null
const cacheKey = `imageId:${referencedImageId}`
const cachedStats = annotation.data?.cachedStats?.[cacheKey]
const hasProp = cachedStats
&& Object.prototype.hasOwnProperty.call(cachedStats, prop)
if (!hasProp) return null
const value = cachedStats[prop]
return value !== null
? parseFloat(value).toFixed(this.digitPlaces)
: value
},
unBindAnnotationToQuestion(obj) {
const { markTableQuestions = [], questionId } = obj || {}
const { questionMarkInfoList, questionsMarkStatus } = this
if (!Array.isArray(markTableQuestions) || !questionId || !Array.isArray(questionMarkInfoList)) {
return
}
this.questionMarkInfoList = questionMarkInfoList.filter(item => {
const { TableQuestionId, QuestionId } = item || {}
if ((TableQuestionId && QuestionId === questionId && markTableQuestions.includes(TableQuestionId))) {
if (questionsMarkStatus && questionsMarkStatus[TableQuestionId]) {
delete questionsMarkStatus[TableQuestionId]
}
} else {
return
}
})
},
//
getScreenshots(obj) {
return new Promise((resolve, reject) => {
this.$emit('getCustomScreenshots', obj, resolve) // resolve
})
},
async uploadScreenshots(fileName, file) {
try {
file = this.convertBase64ToBlob(file)
const trialId = this.$route.query.trialId
const taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
const subjectId = taskInfo.SubjectId
const result = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/Visit/${fileName}.png`, file)
return { isSuccess: true, result: result }
} catch (e) {
console.log(e)
return { isSuccess: false, result: e }
}
},
convertBase64ToBlob(imageEditorBase64) {
const base64Arr = imageEditorBase64.split(',')
let imgtype = ''
let base64String = ''
if (base64Arr.length > 1) {
base64String = base64Arr[1]
imgtype = base64Arr[0].substring(
base64Arr[0].indexOf(':') + 1,
base64Arr[0].indexOf(';')
)
}
const bytes = atob(base64String)
const bytesCode = new ArrayBuffer(bytes.length)
const byteArray = new Uint8Array(bytesCode)
for (let i = 0; i < bytes.length; i++) {
byteArray[i] = bytes.charCodeAt(i)
}
return new Blob([bytesCode], { type: imgtype })
},
resetOperateState() {
console.log('resetOperateState')
this.operateStateEnum = null
this.operateQuestionId = ''
this.operateRowId = ''
this.imageTool = ''
this.imageToolAttribute = ''
},
async resetForm() {
const confirm = await this.$confirm(
this.$t('trials:dicomReading:message:confirmReset1'),
@@ -335,15 +973,16 @@ export default {
}
)
if (confirm !== 'confirm') return
this.$emit('setReadingToolPassive')
const loading = this.$loading({ fullscreen: true })
try {
const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
if (res.IsSuccess) {
this.rerender = false
await this.getQuestionCalculateRelation()
await this.getQuestions()
await this.getQuestions(true)
this.$emit('resetAnnotations', this.visitTaskId)
this.$nextTick(()=>{
this.$nextTick(() => {
this.rerender = true
})
}
@@ -352,7 +991,7 @@ export default {
loading.close()
console.log(e)
}
},
}
}
}
</script>
@@ -0,0 +1,704 @@
<template>
<div class="criterion-table-form-item">
<el-form-item
v-if="(question.ShowQuestion===1 && !!~question.ParentTriggerValueList.indexOf(questionForm[question.ParentId])) || question.ShowQuestion===0"
:label="`${question.QuestionName}`"
:prop="question.Id"
:rules="[
{ required: (question.IsRequired === 0 || (question.IsRequired ===1 && question.RelevanceId && !!~question.RelevanceValueList.indexOf(questionForm[question.RelevanceId]))) && question.Type!=='group' && question.Type!=='summary',
message: $t('common:ruleMessage:select'), trigger: ['blur', 'change']},
]"
:class="[question.Type==='group'?'mb':question.Type==='upload'?'uploadWrapper':'']"
>
<!-- 输入框 -->
<el-input
v-if="question.Type==='input'"
v-model="questionForm[question.Id]"
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !isBaseline && questionForm.IsCurrentTaskAdd === 'False')"
/>
<!-- 多行文本输入框 -->
<el-input
v-if="question.Type==='textarea'"
v-model="questionForm[question.Id]"
type="textarea"
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !isBaseline && questionForm.IsCurrentTaskAdd === 'False')"
:autosize="{ minRows: 2, maxRows: 4}"
/>
<!-- 下拉框 -->
<el-select
v-if="question.Type==='select'"
v-model="questionForm[question.Id]"
clearable
:disabled="(question.TableQuestionType === 2 || question.QuestionGenre === 2) || (question.IsCopy && type === 'edit' && !IsBaseline && questionForm.IsCurrentTaskAdd === 'False')"
@change="((val)=>{formItemChange(val, question)})"
>
<template v-if="question.TableQuestionType === 1">
<el-option
v-for="item in organList"
:key="item.Id"
:label="item[question.DataTableColumn]"
:value="item[question.DataTableColumn]"
/>
</template>
<template v-else-if="question.TableQuestionType === 3 || question.QuestionGenre === 3">
<el-option
v-for="item of $d[question.DictionaryCode]"
:key="item.id"
:value="item.value"
:label="item.label"
/>
</template>
<template v-else-if="(question.TableQuestionType === 2 || question.QuestionGenre === 2) && question.DictionaryCode">
<el-option
v-for="item of $d[question.DictionaryCode]"
:key="item.id"
:value="item.value"
:label="item.label"
/>
</template>
<template v-else>
<el-option
v-for="val in question.TypeValue.split('|')"
:key="val"
:label="val"
:value="val"
/>
</template>
</el-select>
<!-- 单选 -->
<el-radio-group
v-if="question.Type==='radio'"
v-model="questionForm[question.Id]"
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !isBaseline && questionForm.IsCurrentTaskAdd === 'False')"
@change="((val)=>{formItemChange(val, question)})"
>
<el-radio
v-for="val in question.TypeValue.split('|')"
:key="val"
:label="val"
>
{{ val }}
</el-radio>
</el-radio-group>
<!-- 复选框 -->
<el-checkbox-group
v-if="question.Type==='checkbox'"
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !isBaseline && questionForm.IsCurrentTaskAdd === 'False')"
v-model="questionForm[question.Id]"
>
<el-checkbox
v-for="val in question.TypeValue.split('|')"
:key="val"
:label="val"
>
{{ val }}
</el-checkbox>
</el-checkbox-group>
<!-- 自动分类 -->
<el-input
v-if="question.Type === 'class' && question.ClassifyShowType === 1"
v-model="questionForm[question.Id]"
/>
<el-select
v-if="question.Type === 'class' && question.ClassifyShowType === 2"
v-model="questionForm[question.Id]"
:disabled="!question.ClassifyEditType"
@change="(val) => { formItemChange(val, question) }"
>
<el-option
v-for="val in question.TypeValue.split('|')"
:key="val"
:label="val.trim()"
:value="val.trim()"
/>
</el-select>
<el-radio-group
v-if="question.Type === 'class' && question.ClassifyShowType === 3"
v-model="questionForm[question.Id]"
:disabled="!question.ClassifyEditType"
@change="(val) => { formItemChange(val, question) }"
>
<el-radio
v-for="item of question.TypeValue.split('|')"
:key="item.trim()"
:label="item.trim()"
>
{{ item.trim() }}
</el-radio>
</el-radio-group>
<!-- 自动计算 -->
<!-- :precision="2" :step="0.1" :max="10" -->
<el-input
v-if="question.Type==='calculation'"
v-model="questionForm[question.Id]"
oninput="value=value.replace(/^\D*(\d*(?:.\d{0,2})?).*$/g, '$1')"
disabled
/>
<!-- 自增 -->
<el-input
v-if="question.Type==='increment'"
v-model="questionForm[question.Id]"
disabled
/>
<!-- 数值 -->
<template v-if="question.Type === 'number' && (question.ImageMarkEnum === 1 || question.ImageMarkEnum === 2)">
<div style="display: flex;flex-direction: row;justify-content: flex-start;align-items: center;">
<el-input
type="number"
@change="(val) => { formItemNumberChange(val, question) }"
@blur="questionsMarkStatus[question.Id] && questionsMarkStatus[question.Id].isMarked ? ()=>{} : handleMarkedQsBlur(questionForm[question.Id], questionForm, question.Id, question) "
v-model="questionForm[question.Id]"
:disabled="(questionsMarkStatus[question.Id] && questionsMarkStatus[question.Id].isMarked && question.ImageMarkEnum === 2) || question.ImageMarkEnum === 1"
style="width: 150px;"
>
<template v-if="question.Unit !== 0" slot="append">
{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit }}
</template>
</el-input>
<!-- 测量 -->
<el-button
v-if="readingTaskState < 2 && (!questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] || (questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] && !questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id].isMarked))"
size="mini"
type="text"
@click="operateImageMarker({operateStateEnum: 1, question})"
>
测量
</el-button>
<!-- 绑定 -->
<el-button
v-if="readingTaskState < 2 && (!questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] || (questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] && !questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id].isMarked))"
size="mini"
type="text"
@click="operateImageMarker({operateStateEnum: 0, question})"
>
绑定
</el-button>
<!-- 查看 -->
<el-button
v-if="questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] && questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id].isMarked"
size="mini"
type="text"
@click="operateImageMarker({operateStateEnum: 2, question})"
>
查看
</el-button>
<!-- 更改 -->
<el-button
v-if="readingTaskState < 2 && (questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] && questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id].isMarked)"
size="mini"
type="text"
@click="operateImageMarker({operateStateEnum: 3, question})"
>
更改
</el-button>
<!-- 移除 -->
<el-button
v-if="readingTaskState < 2 && (questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] && questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id].isMarked)"
size="mini"
type="text"
@click="operateImageMarker({operateStateEnum: 4, question})"
>
移除
</el-button>
<!-- 保存 -->
<el-button
v-if="readingTaskState < 2 && (questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] && !questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id].isSaved)"
size="mini"
type="text"
@click="operateImageMarker({operateStateEnum: 7, question})"
>
<el-tooltip v-if="questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] && !questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id].isSaved" class="item" effect="dark" :content="$t('trials:reading:button:unsaved')" placement="bottom">
<i class="el-icon-warning" style="color:red" />
</el-tooltip>
保存
</el-button>
</div>
</template>
<template v-else-if="question.Type === 'number'">
<el-input
type="number"
v-if="question.Type === 'number' && question.DataSource !== 1"
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !isBaseline && questionForm.IsCurrentTaskAdd === 'False')"
@change="((val)=>{formItemNumberChange(val, question)})"
@blur="handleBlur(questionForm[question.Id], questionForm, question.Id)"
v-model="questionForm[question.Id]"
>
<template slot="append" v-if="question.Unit !== 0">{{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}}</template>
</el-input>
<el-input
type="number"
v-if="question.Type === 'number' && question.DataSource === 1"
:disabled="question.DataSource === 1"
@blur="handleCalculationBlur(calculationValue)"
v-model="calculationValue"
>
<template slot="append" v-if="question.Unit !== 0">{{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}}</template>
</el-input>
</template>
<!-- 上传图像 -->
<el-upload
v-if="question.Type==='upload'"
action
:accept="question.FileType"
:limit="question.ImageCount === 0 ? 100 : question.ImageCount"
:on-preview="handlePictureCardPreview"
:before-upload="handleBeforeUpload"
:http-request="uploadScreenshot"
list-type="picture-card"
:on-remove="handleRemove"
:file-list="fileList"
:class="{disabled: question.ImageCount === 0 ? false : fileList.length >= question.ImageCount}"
>
<i slot="default" class="el-icon-plus" />
<div slot="file" slot-scope="{file}">
<viewer
:ref="file.url"
:images="[imageUrl]"
style="
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
"
>
<img
class="el-upload-list__item-thumbnail"
:src="OSSclientConfig.basePath + file.url"
crossOrigin="anonymous"
alt=""
style="max-width: 100%; max-height: 100%"
/>
<span class="el-upload-list__item-actions">
<span
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(file)"
>
<i class="el-icon-zoom-in" />
</span>
<span
v-if="readingTaskState < 2"
class="el-upload-list__item-delete"
@click="handleRemove(file)"
>
<i class="el-icon-delete" />
</span>
</span>
</viewer>
</div>
</el-upload>
<el-dialog
v-if="question.Type==='upload'"
append-to-body
:visible.sync="imgVisible"
width="600px"
>
<el-image :src="imageUrl" width="100%">
<div slot="placeholder" class="image-slot">
{{$t('trials:readingUnit:qsList:message:loading')}}<span class="dot">...</span>
</div>
</el-image>
</el-dialog>
</el-form-item>
</div>
</template>
<script>
import { submitTableQuestion } from '@/api/trials'
export default {
name: 'QuestionTableFormItem',
props: {
isBaseline: {
type: Boolean,
required: true
},
questionForm: {
type: Object,
default() {
return {}
}
},
question: {
type: Object,
default() {
return []
}
},
criterionId: {
type: String,
required: true
},
calculationList: {
type: Array,
default() {
return []
}
},
readingTaskState: {
type: Number,
required: true
},
visitTaskId: {
type: String,
default: ''
},
type: {
type: String,
default: 'add'
},
questionsMarkStatus: {
type: Object,
default() {
return {}
}
},
parentQsId: {
type: String,
default: ''
},
},
computed: {
calculationValue: {
get() {
return this.questionForm[this.question.Id]
},
set() {
}
}
},
data() {
return {
addOrEdit: { visible: false, title: '' },
fileList: [],
accept: '.png,.jpg,.jpeg',
imgVisible: false,
imageUrl: '',
urls: [],
organList: [],
QuestionsList: [],
QuestionsForm: {},
digitPlaces: 2,
rowId: ''
}
},
watch: {
questionForm: {
deep: true,
immediate: true,
handler(v, oldv) {
// try {
// if (!v[this.question.Id] || !oldv[this.question.Id]) return
// } catch (e) {
// }
// this.formItemNumberChange(this.question.Id, false)
this.rowId = this.questionForm.RowId
}
},
questionsMarkStatus: {
deep: true,
immediate: true,
handler(v) {
this.$forceUpdate()
}
}
},
mounted() {
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
if (this.question.Type === 'upload') {
if (this.questionForm[this.question.Id]) {
this.urls = this.questionForm[this.question.Id].split('|')
this.fileList = []
this.urls.map(url => {
this.fileList.push({ name: '', url: `${url}` })
})
}
}
if (this.type === 'edit') return
},
methods: {
save() {
},
openAddTableCol(row) {
this.addOrEdit.visible = true
this.addOrEdit.title = row.QuestionName + this.$t('trials:readingUnit:qsList:title:tableQs')
this.QuestionsList = row.TableQuestions.Questions
this.AnswersList = row.TableQuestions.Answers
this.QuestionsForm = {}
},
formItemChange(v, question) {
if (question.Childrens && question.Childrens.length > 0) {
this.resetChild(question.Childrens)
}
if (question.TableQuestionType === 1 && question.RelationQuestions.length > 0) {
var index = this.organList.findIndex(item => item[question.DataTableColumn] === v)
if (index < 0) return
var selected = this.organList[index]
this.question.RelationQuestions.map(qs => {
var val = selected[qs.DataTableColumn]
// if (typeof val === 'boolean') {
// // val = String(val)
// }
this.$emit('setFormItemData', { key: qs.Id, val: val, question: qs })
})
} else {
this.$emit('setFormItemData', { key: question.Id, val: v, question: question })
}
},
handleBlur(value, a, b) {
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
},
handleMarkedQsBlur(value, a, b, question) {
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
question.IsTableQuestion = true
// this.$emit('operateImageMarker', {operateStateEnum: 6, question})
},
handleCalculationBlur(v) {
this.calculationValue = parseFloat(v).toFixed(this.digitPlaces)
},
limitInput(value, q) {
if (value.indexOf('.') > -1) {
if (value.split('.')[1].length >= this.digitPlaces) {
this.$set(this.questionForm, q.Id, parseFloat(value).toFixed(this.digitPlaces))
}
} else {
}
},
logic(rules, num = 0) {
try {
if (rules.CalculateQuestionList.length === 0) {
return false
}
let dataArr = []
var count = 0
var maxList = [], minList = []
rules.CalculateQuestionList.forEach((o, i) => {
if (rules.CustomCalculateMark > 4 && rules.CustomCalculateMark < 10) {
if (i !== 0) {
switch (rules.CustomCalculateMark) {
case 7:
count += parseFloat(this.questionForm[o.TableQuestionId])
if (i === rules.CalculateQuestionList.length - 1) {
num = count / rules.CalculateQuestionList.length
}
break;
case 8:
maxList.push(this.questionForm[o.TableQuestionId])
if (i === rules.CalculateQuestionList.length - 1) {
num = Math.max(...maxList)
}
break;
case 9:
minList.push(this.questionForm[o.TableQuestionId])
if (i === rules.CalculateQuestionList.length - 1) {
num = Math.min(...minList)
}
break;
}
} else {
maxList.push(this.questionForm[o.TableQuestionId])
minList.push(this.questionForm[o.TableQuestionId])
count = parseFloat(this.questionForm[o.TableQuestionId])
num = parseFloat(this.questionForm[o.TableQuestionId])
dataArr.push(num)
}
} else {
if (i !== 0) {
switch (rules.CustomCalculateMark) {
case 1:
num += parseFloat(this.questionForm[o.TableQuestionId])
break;
case 2:
num -= parseFloat(this.questionForm[o.TableQuestionId])
break;
case 3:
num *= parseFloat(this.questionForm[o.TableQuestionId])
break;
case 4:
if (parseFloat(this.questionForm[o.TableQuestionId]) === 0) {
num = 0
} else {
num /= parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 10:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => {
return acc + (typeof curr === "number" ? curr : 0);
}, 0) / dataArr.length;
break;
case 11:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = Math.max(...dataArr);
break;
case 12:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = Math.min(...dataArr);
break;
}
} else {
num = parseFloat(this.questionForm[o.TableQuestionId])
}
}
})
} catch (e) {
console.log(e)
}
if (rules.ValueType === 2) {
num = num * 100
}
return num.toFixed(this.digitPlaces)
},
formItemNumberChange(v, question) {
this.$emit('formItemTableNumberChange', v, question)
this.$emit('setFormItemData', { key: question.Id, val: v, question: question })
// this.$emit('formItemTableNumberChange', v, question)
},
resetChild(obj) {
obj.forEach(i => {
this.$emit('resetFormItemData', i.Id)
if (i.Childrens && i.Childrens.length > 0) {
this.resetChild(i.Childrens)
}
})
},
resetFormItemData(v) {
this.$emit('resetFormItemData', v)
},
setFormItemData(obj) {
this.$emit('setFormItemData', obj)
},
async operateImageMarker(obj) {
obj.question.IsTableQuestion = true
obj.question.RowId = this.rowId
obj.question.ParentQsId = this.parentQsId
if (obj.operateStateEnum === 7) {
//
// if (!obj.question.RowId) {
// // rowId
// const loading = this.$loading({ fullscreen: true })
// try {
// let params = {
// questionId: this.parentQsId,
// RowIndex: this.questionForm.RowIndex,
// visitTaskId: this.visitTaskId,
// trialId: this.$route.query.trialId,
// answerList: [],
// }
// let res = await submitTableQuestion(params)
// // this.$emit('save',rowId)
// this.QuestionsForm.RowId = res.Result.RowId
// obj.rowId = res.Result.RowId
// this.rowId = res.Result.RowId
// loading.close()
// } catch(e) {
// loading.close()
// }
// }
obj.rowIndex = this.questionForm.RowIndex
// obj.parentQsId = this.parentQsId
obj.answer = this.questionForm[obj.question.Id]
}
this.$emit('operateImageMarker', obj)
},
async uploadScreenshot(param) {
if (!this.visitTaskId) return
const loading = this.$loading({
target: document.querySelector('.el-dialog'),
fullscreen: false,
lock: true,
text: 'Loading',
spinner: 'el-icon-loading'
})
var trialId = this.$route.query.trialId
var subjectId = this.$route.query.trialId
var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/Visit/${param.file.name}`, file)
this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url)})
this.urls.push(this.$getObjectName(res.url))
this.$emit('setFormItemData', { key:this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '', question: this.question })
loading.close()
},
handleBeforeUpload(file) {
//
if (this.checkFileSuffix(file.name)) {
// this.fileList = []
return true
} else {
let msg = this.$t(
"trials:readingUnit:qsList:message:imageFormat"
).replace("xxx", this.question.FileType)
this.$alert(msg)
return false
}
},
checkFileSuffix(fileName) {
var index = fileName.lastIndexOf('.')
var suffix = fileName.substring(index + 1, fileName.length)
if (this.question.FileType.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === -1) {
return false
} else {
return true
}
},
//
handlePictureCardPreview(file) {
var suffix = file.url.substring(file.url.lastIndexOf(".")+1)
suffix = suffix ? suffix.toLowerCase() : ''
if (suffix === 'doc' || suffix === 'docx' || suffix === 'pdf'){
window.open(this.OSSclientConfig.basePath + file.url,'_blank')
}else{
this.imageUrl = this.OSSclientConfig.basePath + file.url
// this.imgVisible = true
this.$refs[file.url].$viewer.show()
}
},
//
handleRemove(file, fileList) {
this.imageUrl = ''
this.fileList.splice(this.fileList.findIndex(f => f.url === file.url), 1)
this.urls.splice(this.fileList.findIndex(f => f === file.url), 1)
this.$emit('setFormItemData', { key:this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '', question: this.question })
}
}
}
</script>
<style lang="scss" scoped>
.criterion-table-form-item{
.el-form-item{
display: flex;
flex-direction: row;
align-items: flex-start;
}
.el-input{
width:100%;
}
.el-select {
width:100%;
}
.mb{
margin-bottom: 0px;
}
.disabled{
::v-deep .el-upload--picture-card {
display: none;
}
}
.uploadWrapper{
display: flex;
flex-direction: column;
align-items: flex-start;
}
}
</style>
@@ -234,6 +234,7 @@ const config = {
'name': '直径测量工具',
'icon': 'length',
'toolName': 'Length',
'props': ['length'],
'i18nKey': 'trials:reading:button:length',
'isDisabled': false,
'disabledReason': ''
@@ -242,6 +243,7 @@ const config = {
'name': '长短径测量工具',
'icon': 'bidirection',
'toolName': 'Bidirectional',
'props': ['length', 'width'],
'i18nKey': 'trials:reading:button:bidirectional',
'isDisabled': false,
'disabledReason': ''
@@ -250,6 +252,7 @@ const config = {
'name': '矩形工具',
'icon': 'rectangle',
'toolName': 'RectangleROI',
'props': ['area', 'mean', 'max', 'stdDev'],
'i18nKey': 'trials:reading:button:rectangle',
'isDisabled': false,
'disabledReason': ''
@@ -258,6 +261,7 @@ const config = {
'name': '箭头工具',
'icon': 'arrow',
'toolName': 'ArrowAnnotate',
'props': [],
'i18nKey': 'trials:reading:button:arrowAnnotate',
'isDisabled': false,
'disabledReason': ''
@@ -266,9 +270,28 @@ const config = {
'name': '椭圆工具',
'icon': 'oval',
'toolName': 'CircleROI',
'props': ['radius', 'area', 'mean', 'max', 'stdDev'],
'i18nKey': 'trials:reading:button:Circle',
'isDisabled': false,
'disabledReason': ''
},
{
'name': '角度工具',
'icon': 'angle',
'toolName': 'Angle',
'props': ['angle'],
'i18nKey': 'trials:reading:button:Angle',
'isDisabled': false,
'disabledReason': ''
},
{
'name': '角度工具',
'icon': 'cobb',
'toolName': 'CobbAngle',
'props': ['angle'],
'i18nKey': 'trials:reading:button:CobbAngle',
'isDisabled': false,
'disabledReason': ''
}
]
}
File diff suppressed because it is too large Load Diff
@@ -45,7 +45,7 @@
<el-input
v-model="scope.row.CDISCCode"
size="mini"
:disabled="scope.row.HasChildren || scope.row.IsTableQuestion"
:disabled="scope.row.HasChildren || (scope.row.IsTableQuestion && exportInfo.CriterionType !== 0)"
v-show="!scope.row.IsGroup || !scope.row.HasChildren"
>
</el-input>
@@ -68,7 +68,7 @@ export default {
data() {
return {
loading: false,
exportInfo: []
exportInfo: {}
}
},
mounted() {
@@ -152,7 +152,8 @@ export default {
} else if ((this.exportInfo.CriterionGroup === 0 || this.exportInfo.CriterionType === 0 ) && item.Code === 1 && (row.HasChildren || row.IsTableQuestion)) {
// (1)
return true
} else if (item.Code === 8 && (row.HasChildren || row.IsTableQuestion)) {
} else if (item.Code === 8 && (row.HasChildren || (row.IsTableQuestion && this.exportInfo.CriterionType !== 0))) {
// else if (item.Code === 8 && (row.HasChildren || row.IsTableQuestion))
// CDISC
return true
} else if (item.Code === 2 && row.HasChildren) {
@@ -1038,26 +1038,26 @@ export default {
if (area) {
const areaLine = isEmptyArea
? `Area: Oblique not supported`
: `Area: ${ps ? parseFloat(area * ps * ps).toFixed(this.digitPlaces) : parseFloat(area).toFixed(this.digitPlaces)} ${ps ? 'mm' + '\xb2' : areaUnit}`
: `Area: ${ps ? this.reRound(csUtils.roundNumber(area * ps * ps), this.digitPlaces) : this.reRound(csUtils.roundNumber(area), this.digitPlaces)} ${ps ? 'mm' + '\xb2' : areaUnit}`
textLines.push(areaLine)
}
if (mean) {
textLines.push(`Mean: ${parseFloat(mean).toFixed(this.digitPlaces)} ${modalityUnit}`)
textLines.push(`Mean: ${this.reRound(csUtils.roundNumber(mean), this.digitPlaces)} ${modalityUnit}`)
}
if (Number.isFinite(max)) {
textLines.push(`Max: ${csUtils.roundNumber(max)} ${modalityUnit}`)
if (max) {
textLines.push(`Max: ${this.reRound(csUtils.roundNumber(max), this.digitPlaces)} ${modalityUnit}`)
}
if (stdDev) {
textLines.push(`Std Dev: ${csUtils.roundNumber(stdDev)} ${modalityUnit}`)
textLines.push(`Std Dev: ${this.reRound(csUtils.roundNumber(stdDev), this.digitPlaces)} ${modalityUnit}`)
}
if (perimeter) {
if (ps) {
textLines.push(`Perimeter: ${parseFloat(perimeter * ps).toFixed(this.digitPlaces)} mm`)
textLines.push(`Perimeter: ${this.reRound(csUtils.roundNumber(perimeter * ps), this.digitPlaces)} mm`)
} else {
textLines.push(`Perimeter: ${parseFloat(perimeter).toFixed(this.digitPlaces)} ${unit}`)
textLines.push(`Perimeter: ${this.reRound(csUtils.roundNumber(perimeter), this.digitPlaces)} ${unit}`)
}
}
@@ -1084,17 +1084,33 @@ export default {
ps = parseFloat(this.psArr[i].PS).toFixed(3)
}
if (ps) {
textLines.push(`Area: ${parseFloat(area * ps * ps).toFixed(this.digitPlaces)} ${'mm' + '\xb2'}`)
textLines.push(`Area: ${this.reRound(csUtils.roundNumber(area * ps * ps), this.digitPlaces)} ${'mm' + '\xb2'}`)
} else {
textLines.push(`Area: ${parseFloat(area).toFixed(this.digitPlaces)} ${areaUnit}`)
textLines.push(`Area: ${this.reRound(csUtils.roundNumber(area), this.digitPlaces)} ${areaUnit}`)
}
textLines.push(`Mean: ${csUtils.roundNumber(mean)} ${modalityUnit}`)
textLines.push(`Max: ${csUtils.roundNumber(max)} ${modalityUnit}`)
textLines.push(`Std Dev: ${csUtils.roundNumber(stdDev)} ${modalityUnit}`)
textLines.push(`Mean: ${this.reRound(csUtils.roundNumber(mean), this.digitPlaces)} ${modalityUnit}`)
textLines.push(`Max: ${this.reRound(csUtils.roundNumber(max), this.digitPlaces)} ${modalityUnit}`)
textLines.push(`Std Dev: ${this.reRound(csUtils.roundNumber(stdDev), this.digitPlaces)} ${modalityUnit}`)
return textLines
},
reRound(result, finalPrecision) {
if (typeof result === 'string' && result.includes(', ')) {
const numStrs = result.split(', ')
const processed = numStrs.map(str => this.processSingle(str, finalPrecision))
return processed.join(', ')
}
return this.processSingle(result, finalPrecision)
},
processSingle(str, precision) {
const num = parseFloat(str)
if (isNaN(num)) return 'NaN'
//
if (Math.abs(num) < 0.0001) return str
const factor = 10 ** precision
return (Math.round(num * factor + 0.0000001) / factor).toFixed(precision)
},
debounce(callback, delay) {
let timerId
return function() {
@@ -1,115 +1,50 @@
<template>
<el-form
ref="trialAttachmentFrom"
v-loading="loading"
:model="form"
label-width="240px"
size="small"
:rules="rules"
class="upload-temporary-file"
>
<el-form ref="attachmentFrom" v-loading="loading" :model="form" label-width="190px" size="small" :rules="rules"
class="upload-temporary-file">
<div class="base-dialog-body">
<!-- 文件类型 -->
<el-form-item :label="$t('trials:attachment:table:fileType')" prop="FileTypeId">
<el-select
v-model="form.FileTypeId"
style="width:100%;"
size="small"
>
<el-option
v-for="item of dictionaryList.Trial_Document"
:key="item.Id"
:label="item.Value"
:value="item.Id"
/>
</el-select>
<el-form-item :label="$t('trials:attachment:form:FileName')" prop="Name">
<el-input v-model="form.Name" clearable></el-input>
</el-form-item>
<!-- 文件 -->
<el-form-item :label="$t('trials:attachment:form:file')">
<el-form-item :label="$t('trials:attachment:form:OffLine')" prop="OffLine">
<el-switch v-model="form.OffLine" :active-value="true" :inactive-value="false"
:active-text="$fd('YesOrNo', true)" :inactive-text="$fd('YesOrNo', false)">
</el-switch>
</el-form-item>
<el-form-item :label="$t('trials:attachment:form:File')">
<div class="upload-container">
<el-upload
class="upload-demo"
action
accept=".pdf"
:before-upload="beforeUpload"
:http-request="handleUploadFile"
:on-remove="handleRemoveFile"
:show-file-list="true"
:file-list="fileList"
:limit="1"
:on-exceed="handleExceed"
:disabled="form.FileTypeId === ''"
>
<el-button size="small" type="primary" :disabled="form.FileTypeId === '' || saveBtnLoading" :loading="btnLoading">
{{ $t('trials:attachment:button:select') }}
</el-button>
<span
slot="tip"
style="margin-left:10px;"
class="el-upload__tip"
>
{{ $t('system:tip:file:pdf') }}
<el-upload class="upload-demo" action :accept="this.accept.join(',')" :before-upload="beforeUpload"
:http-request="handleUploadFile" :on-preview="handlePreview" :on-remove="handleRemoveFile"
:show-file-list="true" :file-list="fileList" :limit="1" :on-exceed="handleExceed">
<el-button size="small" type="primary" :loading="btnLoading">{{ $t('common:button:check')
}}</el-button>
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">
({{ $t('trials:signature:label:type').replace("xxx", this.accept.join(", ")) }})
</span>
</el-upload>
</div>
</el-form-item>
<!-- 需要签署的用户类型 -->
<el-form-item :label="$t('trials:attachment:table:userType')" prop="NeedConfirmedUserTypeIdList">
<el-select
v-model="form.NeedConfirmedUserTypeIdList"
style="width:100%;"
multiple
>
<el-option
v-for="item of userTypeOptions"
v-show="item.UserTypeEnum !== 1 && item.UserTypeEnum !== 8 && item.UserTypeEnum !== 20 && item.UserTypeEnum !== 26 && item.UserTypeEnum !== 27 && item.UserTypeEnum !== 31"
:key="item.Id"
:label="item.UserTypeShortName"
:value="item.Id"
>
<span>{{ item.UserType }}</span>
</el-option>
</el-select>
</el-form-item>
<!-- 查看最短时间分钟 -->
<el-form-item :label="$t('trials:attachment:table:min')" prop="SignViewMinimumMinutes">
<el-input-number
v-model="form.SignViewMinimumMinutes"
controls-position="right"
:min="1"
:max="50"
/>
</el-form-item>
<!-- 描述 -->
<el-form-item :label="$t('trials:attachment:table:description')" prop="Description">
<el-input
v-model="form.Description"
type="textarea"
:autosize="{ minRows: 5, maxRows: 6}"
maxlength="500"
show-word-limit
/>
</el-form-item>
</div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<el-form-item style="text-align:right;">
<!-- Save -->
<el-button size="small" type="primary" :disabled="form.FileTypeId === '' || form.Name === ''" :loading="saveBtnLoading" @click="handleSave">
{{ $t('common:button:save') }}
</el-button>
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
<el-form-item style="text-align: right">
<el-button size="small" type="primary" :disabled="form.FileTypeId === '' || form.Name === ''"
:loading="saveBtnLoading" @click="handleSave">{{ $t('common:button:save') }}</el-button>
</el-form-item>
</div>
</el-form>
</template>
<script>
import { addOrUpdateTrialDocument, uploadTrialDoc, getTrialUserTypeList } from '@/api/trials'
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
import { addOrUpdateTrialDocumentAttachment } from '@/api/trials'
export default {
name: 'TrialAttachmentFrom',
props: {
data: {
type: Object,
default() { return {} }
default() {
return {}
},
},
TrialDocumentId: {
type: String,
default: ''
}
},
@@ -117,172 +52,162 @@ export default {
return {
form: {
Id: '',
TrialId: '',
FileTypeId: '',
Name: '',
Path: '',
IsDeleted: false,
SignViewMinimumMinutes: null,
Description: '',
NeedConfirmedUserTypeIdList: []
Name: null,
FileFormat: null,
FileName: null,
FilePath: null,
FileSize: null,
OffLine: false,
TrialDocumentId: null,
},
rules: {
FileTypeId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
SignViewMinimumMinutes: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['change'] }],
NeedConfirmedUserTypeIdList: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
Description: [{ max: 500, message: `${this.$t('common:ruleMessage:maxLength')} 500`, trigger: ['blur', 'change'] }]
Name: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: ['change'],
},
],
},
fileList: [],
userTypeOptions: [],
btnLoading: false,
saveBtnLoading: false,
loading: false,
dictionaryList: {}
accept: ['.jpg',
'.jpeg',
'.png',
'.pdf',
'.ppt',
'.pptx',
'.doc',
'.docx',
'.xls',
'.xlsx',
".mp4"]
}
},
mounted() {
this.initForm()
},
methods: {
//
handleSave() {
this.$refs.trialAttachmentFrom.validate(valid => {
if (!valid) return
if (!this.form.Name) {
this.$alert(this.$t('trials:attachment:message:selectFile'))
return
}
if (this.form.TrialId === '') {
this.form.TrialId = this.$route.query.trialId
}
this.saveBtnLoading = true
addOrUpdateTrialDocument(this.form).then(res => {
this.saveBtnLoading = false
this.$emit('closeDialog')
this.$emit('getList')
if (this.form.Id) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
} else {
this.$message.success(this.$t('common:message:addedSuccessfully'))
}
// this.$message.success(this.$t('common:message:savedSuccessfully'))
}).catch(() => {
this.saveBtnLoading = false
})
})
},
async initForm() {
this.loading = true
await this.getDicData()
await this.getUserType()
if (Object.keys(this.data).length > 0) {
if (this.data.Path) {
if (this.data && this.data.Id) {
Object.keys(this.form).forEach(key => {
this.form[key] = this.data[key]
})
this.fileList = [
{
name: this.data.Name,
path: this.data.Path,
url: this.data.Path,
}
name: this.data.FileName,
url: this.data.FilePath,
path: this.data.FilePath,
},
]
}
this.form.Id = this.data.Id
this.form.FileTypeId = this.data.FileTypeId
this.form.Name = this.data.Name
this.form.Path = this.data.Path
this.form.IsDeleted = this.data.IsDeleted
this.form.Description = this.data.Description
this.form.SignViewMinimumMinutes = this.data.SignViewMinimumMinutes
}
this.loading = false
},
//
getDicData() {
getBasicDataSelects(['Trial_Document']).then(res => {
this.dictionaryList = { ...res.Result }
})
},
//
getUserType() {
getTrialUserTypeList().then(res => {
this.userTypeOptions = res.Result
if (this.form.Id) {
this.form.NeedConfirmedUserTypeIdList = this.data.NeedConfirmedUserTypeeIds
}
}).catch(() => { this.loading = false })
},
handleViewableUserTypeChange(valArr) {
this.form.NeedConfirmedUserTypeIdList = []
this.needConfirmedUserTypeOptions = []
valArr.forEach((val) => {
const i = this.userTypeOptions.findIndex(userType => { return userType.Id === val })
this.needConfirmedUserTypeOptions.push(this.userTypeOptions[i])
})
},
//
beforeUpload(file) {
//
if (this.checkFileSuffix(file.name)) {
this.fileList = []
return true
} else {
this.$alert(this.$t('trials:attachment:message:pdf'))
this.$alert(this.$t('trials:signature:label:type').replace("xxx", this.accept.join(", ")))
return false
}
},
//
async handleUploadFile(param) {
this.loading = true
var file = await this.fileToBlob(param.file)
const trialId = this.$route.query.trialId
console.log(this.OSSclient.put)
const res = await this.OSSclient.put(`/${trialId}/DocumentToSign/${param.file.name}`, file)
this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url) })
this.form.Path = this.$getObjectName(res.url)
const res = await this.OSSclient.put(
`/${this.$route.query.trialId}/DocumentToSign/${param.file.name}${new Date().getTime()}`,
file
)
this.fileList.push({
name: param.file.name,
path: this.$getObjectName(res.url),
url: this.$getObjectName(res.url),
})
this.form.Name = param.file.name
this.form.FileName = param.file.name
this.form.FilePath = this.$getObjectName(res.url)
this.form.FileSize = param.file.size
this.form.FileFormat = param.file.name
.substring(param.file.name.lastIndexOf('.'))
.toLocaleLowerCase().split('.')[1]
this.loading = false
},
//
handleSave() {
this.$refs.attachmentFrom.validate((valid) => {
if (!valid) return false
if (!this.form.FilePath)
return this.$alert(this.$t('trials:signature:message:selectFile'))
this.saveBtnLoading = true
if (this.TrialDocumentId) this.form.TrialDocumentId = this.TrialDocumentId
addOrUpdateTrialDocumentAttachment(this.form)
.then((res) => {
this.saveBtnLoading = false
this.$emit('closeDialog')
this.$emit('getList')
this.$message.success(this.$t('common:message:updatedSuccessfully'))
})
.catch(() => {
this.saveBtnLoading = false
})
})
},
handleRemoveFile() {
this.fileList = []
this.form.Path = ''
this.form.Name = ''
this.form.FilePath = ''
this.form.FileSize = ''
this.form.FileFormat = ''
this.form.FileName = ''
},
handlePreview(file) {
if (file.fullPath) {
window.open(file.fullPath, '_blank')
}
},
handleExceed(files, fileList) {
this.$message.warning(this.$t('trials:attachment:message:uploadFile'))
this.$message.warning(this.$t('upload:rule:maxFile1'))
},
// pdf
checkFileSuffix(fileName) {
var typeArr = ['pdf']
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
var typeArr = this.accept.map(item => item.split('.')[1])
var extendName = fileName
.substring(fileName.lastIndexOf('.') + 1)
.toLocaleLowerCase()
if (typeArr.indexOf(extendName) !== -1) {
return true
} else {
return false
}
}
}
},
},
}
</script>
<style lang="scss">
.upload-temporary-file{
.upload-temporary-file {
.upload-container .el-upload--text {
border: none;
width: 80px;
height: 40px;
}
.upload-container .el-input--small {
margin-bottom: 5px;
}
.upload-container .el-icon-circle-check {
color: #428bca;
font-size: 13px;
}
.account_item_clear{
.el-tag__close{
.account_item_clear {
.el-tag__close {
display: none !important;
}
}
}
</style>
@@ -0,0 +1,265 @@
<template>
<div v-if="config.visible">
<base-model :config="config">
<template slot="dialog-body">
<el-form ref="form" :model="rowData" label-width="80px" style="width: 80%;display: inline-block;">
<el-form-item :label="`${$t('trials:attachment:table:Name')}: `">
<span class="name text-ellipsis" :title="rowData.Name">{{ rowData.Name }}</span>
</el-form-item>
</el-form>
<el-button size="mini" type="primary" style="float:right" @click.stop="edit({})" v-if="!isView">
{{ $t('common:button:add') }}</el-button>
<el-table :data="list" style="width: 100%" max-height="300px" v-loading="loading"
@sort-change="handleSortByColumn">
<el-table-column type="index" width="60" />
<el-table-column prop="Name" :label="$t('trials:attachment:attachmentList:FileName')"
sortable="custom" />
<el-table-column prop="OffLine" :label="$t('trials:attachment:attachmentList:OffLine')"
sortable="custom" v-if="!isView">
<template slot-scope="scope">
<el-switch v-model="scope.row.OffLine" @change="(val) => OffLine(scope.row, val)"
:active-value="true" :inactive-value="false" :active-text="$fd('YesOrNo', true)"
:inactive-text="$fd('YesOrNo', false)">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="CreateTime" :label="$t('trials:attachment:attachmentList:CreateTime')"
sortable="custom" />
<el-table-column :label="$t('common:action:action')" min-width="120px">
<template slot-scope="scope">
<el-button size="mini" type="text" @click.stop="preview(scope.row)">
{{ $t('common:button:preview') }}
</el-button>
<el-button size="mini" type="text" @click.stop="edit(scope.row)" v-if="!isView">
{{ $t('common:button:edit') }}
</el-button>
<!-- <el-button size="mini" type="text" @click.stop="OffLine(scope.row, true)"
:disabled="scope.row.OffLine">
{{ $t('trials:attachment:attachmentList:OffLine') }}
</el-button> -->
<el-button size="mini" type="text" @click.stop="del(scope.row)" v-if="!isView">
{{ $t('common:button:delete') }}
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 新增/编辑附件 -->
<el-dialog :visible.sync="visible" :close-on-click-modal="false" :append-to-body="true" :title="title"
width="800px" custom-class="base-dialog-wrapper">
<attachmentForm v-if="visible" :data="rowDATA" :TrialDocumentId="TrialDocumentId"
@closeDialog="closeDialog" @getList="getAllList" />
</el-dialog>
</template>
</base-model>
<viewer ref="picture_perview3" style="margin: 0 10px"
v-if="rowDATA.FileFormat && ['png', 'jpg', 'jpeg'].includes(rowDATA.FileFormat.toLowerCase())"
:images="[`${OSSclientConfig.basePath}${rowDATA.FilePath}`]" :options="viewerOptions">
<img v-show="false" :src="`${OSSclientConfig.basePath}${rowDATA.FilePath}`" alt="Image" />
</viewer>
<!-- <attachmentPreview :TrialDocumentId="TrialDocumentId" :visible.sync="perview_visible"
v-if="perview_visible" /> -->
</div>
</template>
<script>
import BaseModel from '@/components/BaseModel'
import attachmentForm from './attachmentForm'
// import attachmentPreview from './attachmentPreview'
import { addOrUpdateTrialDocumentAttachment, getTrialDocumentAttachmentList, deleteTrialDocumentAttachment } from '@/api/trials'
const defaultSearchData = () => {
return {
PageIndex: 1,
PageSize: 1000,
Asc: false,
OffLine: null,
SortField: null
}
}
export default {
components: {
BaseModel,
attachmentForm,
// attachmentPreview
},
props: {
config: {
type: Object,
default: () => {
return {
visible: false,
title: this.$t('trials:attachment:attachmentList:title'),
width: '800px',
}
}
},
isView: {
type: Boolean,
default: false
},
rowData: {
type: Object,
default: () => {
return {}
}
},
TrialDocumentId: {
type: String,
default: ''
}
},
data() {
return {
searchData: defaultSearchData(),
visible: false,
title: null,
list: [],
rowDATA: {},
loading: false,
viewerOptions: {
toolbar: {
zoomIn: true,
zoomOut: true,
reset: true,
prev: false,
next: false,
rotateLeft: true,
rotateRight: true,
flipHorizontal: true,
flipVertical: true,
}
},
// perview_visible: false
}
},
watch: {
TrialDocumentId: {
handler() {
this.getList()
},
immediate: true,
}
},
methods: {
closeDialog() {
this.visible = false
},
getAllList() {
this.getList()
this.$emit("getList")
},
async del(row) {
try {
let confirm = await this.$confirm(this.$t("trials:attachment:attachmentList:message:del"))
if (!confirm) return false
this.loading = true
let res = await deleteTrialDocumentAttachment(row.Id)
this.loading = false
if (res.IsSuccess) {
this.getAllList()
}
} catch (err) {
console.log(err)
this.loading = false
}
},
edit(row) {
this.title = this.$t('trials:attachment:attachmentForm:title:update')
if (!row.Id) {
this.title = this.$t('trials:attachment:attachmentForm:title:add')
}
this.rowDATA = Object.assign({}, row)
this.visible = true
},
async getList() {
try {
if (!this.TrialDocumentId) return false
this.loading = true
this.searchData.TrialDocumentId = this.TrialDocumentId
if (this.isView) {
this.searchData.OffLine = false
}
let res = await getTrialDocumentAttachmentList(this.searchData)
this.loading = false
if (res.IsSuccess) {
this.list = res.Result.CurrentPageData
}
} catch (err) {
this.loading = false
console.log(err)
}
},
async OffLine(row, val) {
try {
let data = Object.assign({}, row)
data.OffLine = val
this.loading = true
let res = await addOrUpdateTrialDocumentAttachment(data)
this.loading = false
if (res.IsSuccess) {
this.$t('trials:attachment:attachmentList:updateSuccessfully')
this.getList()
}
} catch (err) {
this.loading = false
row.OffLine = !row.OffLine
console.log(err)
}
},
preview(data) {
// return this.perview_visible = true
this.rowDATA = Object.assign({}, data)
if (['.ppt',
'.pptx',
'.doc',
'.docx',
'.xls',
'.xlsx'].includes(`.${data.FileFormat.toLowerCase()}`)) {
this.$onlyOffice({
path: data.FilePath,
type: data.FileFormat,
title: data.Name
})
}
if (['.jpg',
'.jpeg',
'.png'].includes(`.${data.FileFormat.toLowerCase()}`)) {
this.$nextTick(() => {
this.$refs['picture_perview3'].$viewer.show()
})
}
if (['.pdf'].includes(`.${data.FileFormat.toLowerCase()}`)) {
this.$preview({
path: data.Path || data.FilePath,
type: 'pdf',
title: data.Name,
})
}
if (['.mp4'].includes(`.${data.FileFormat.toLowerCase()}`)) {
this.$video({
path: data.Path || data.FilePath,
type: 'mp4',
title: data.Name,
})
}
},
//
handleSortByColumn(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
} else {
this.searchData.Asc = false
}
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
},
}
}
</script>
<style lang="scss" scoped>
.name {
display: block;
width: 90%;
}
</style>
@@ -0,0 +1,257 @@
<template>
<el-form ref="trialAttachmentFrom" v-loading="loading" :model="form" label-width="240px" size="small" :rules="rules"
class="upload-temporary-file">
<div class="base-dialog-body">
<!-- 文件类型 -->
<el-form-item :label="$t('trials:attachment:table:fileType')" prop="FileTypeId">
<el-select v-model="form.FileTypeId" style="width:100%;" size="small">
<el-option v-for="item of dictionaryList.Trial_Document" :key="item.Id" :label="item.Value"
:value="item.Id" />
</el-select>
</el-form-item>
<!-- 文件 -->
<el-form-item :label="$t('trials:attachment:form:file')">
<div class="upload-container">
<el-upload class="upload-demo" action accept=".pdf,.mp4" :before-upload="beforeUpload"
:http-request="handleUploadFile" :on-remove="handleRemoveFile" :show-file-list="true" :file-list="fileList"
:limit="1" :on-exceed="handleExceed" :disabled="form.FileTypeId === ''">
<el-button size="small" type="primary" :disabled="form.FileTypeId === '' || saveBtnLoading"
:loading="btnLoading">
{{ $t('trials:attachment:button:select') }}
</el-button>
<span slot="tip" style="margin-left:10px;" class="el-upload__tip">
{{ $t('system:tip:file:pdf') }}
</span>
</el-upload>
</div>
</el-form-item>
<!-- 需要签署的用户类型 -->
<el-form-item :label="$t('trials:attachment:table:userType')" prop="NeedConfirmedUserTypeIdList">
<el-select v-model="form.NeedConfirmedUserTypeIdList" style="width:100%;" multiple>
<el-option v-for="item of userTypeOptions"
v-show="item.UserTypeEnum !== 1 && item.UserTypeEnum !== 8 && item.UserTypeEnum !== 20 && item.UserTypeEnum !== 26 && item.UserTypeEnum !== 27 && item.UserTypeEnum !== 31"
:key="item.Id" :label="item.UserTypeShortName" :value="item.Id">
<span>{{ item.UserType }}</span>
</el-option>
</el-select>
</el-form-item>
<!-- 查看最短时间分钟 -->
<el-form-item :label="$t('trials:attachment:table:min')" prop="SignViewMinimumMinutes">
<el-input-number v-model="form.SignViewMinimumMinutes" controls-position="right" :min="1" :max="50" />
</el-form-item>
<el-form-item :label="$t('trials:attachment:form:CurrentStaffTrainDays')" prop="CurrentStaffTrainDays">
<el-input-number v-model="form.CurrentStaffTrainDays" controls-position="right" :min="0" :max="1000" />
</el-form-item>
<el-form-item :label="$t('trials:attachment:form:NewStaffTrainDays')" prop="NewStaffTrainDays">
<el-input-number v-model="form.NewStaffTrainDays" controls-position="right" :min="0" :max="1000" />
</el-form-item>
<!-- 描述 -->
<el-form-item :label="$t('trials:attachment:table:description')" prop="Description">
<el-input v-model="form.Description" type="textarea" :autosize="{ minRows: 5, maxRows: 6 }" maxlength="500"
show-word-limit />
</el-form-item>
</div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<el-form-item style="text-align:right;">
<!-- Save -->
<el-button size="small" type="primary" :disabled="form.FileTypeId === '' || form.Name === ''"
:loading="saveBtnLoading" @click="handleSave">
{{ $t('common:button:save') }}
</el-button>
</el-form-item>
</div>
</el-form>
</template>
<script>
import { addOrUpdateTrialDocument, uploadTrialDoc, getTrialUserTypeList } from '@/api/trials'
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
export default {
name: 'TrialAttachmentFrom',
props: {
data: {
type: Object,
default() { return {} }
}
},
data() {
return {
form: {
Id: '',
TrialId: '',
FileTypeId: '',
Name: '',
Path: '',
IsPublish: false,
IsDeleted: false,
SignViewMinimumMinutes: null,
Description: '',
NeedConfirmedUserTypeIdList: [],
CurrentStaffTrainDays: 1,
NewStaffTrainDays: 14,
},
rules: {
FileTypeId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
SignViewMinimumMinutes: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['change'] }],
NeedConfirmedUserTypeIdList: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
Description: [{ max: 500, message: `${this.$t('common:ruleMessage:maxLength')} 500`, trigger: ['blur', 'change'] }]
},
fileList: [],
userTypeOptions: [],
btnLoading: false,
saveBtnLoading: false,
loading: false,
dictionaryList: {}
}
},
mounted() {
this.initForm()
},
methods: {
//
handleSave() {
this.$refs.trialAttachmentFrom.validate(valid => {
if (!valid) return
if (!this.form.Name) {
this.$alert(this.$t('trials:attachment:message:selectFile'))
return
}
if (this.form.TrialId === '') {
this.form.TrialId = this.$route.query.trialId
}
this.saveBtnLoading = true
addOrUpdateTrialDocument(this.form).then(res => {
this.saveBtnLoading = false
this.$emit('closeDialog')
this.$emit('getList')
if (this.form.Id) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
} else {
this.$message.success(this.$t('common:message:addedSuccessfully'))
}
// this.$message.success(this.$t('common:message:savedSuccessfully'))
}).catch(() => {
this.saveBtnLoading = false
})
})
},
async initForm() {
this.loading = true
await this.getDicData()
await this.getUserType()
if (Object.keys(this.data).length > 0) {
if (this.data.Path) {
this.fileList = [
{
name: this.data.Name,
path: this.data.Path,
url: this.data.Path,
}
]
}
this.form.Id = this.data.Id
this.form.FileTypeId = this.data.FileTypeId
this.form.Name = this.data.Name
this.form.Path = this.data.Path
this.form.IsDeleted = this.data.IsDeleted
this.form.IsPublish = this.data.IsPublish
this.form.Description = this.data.Description
this.form.SignViewMinimumMinutes = this.data.SignViewMinimumMinutes
this.form.CurrentStaffTrainDays = this.data.CurrentStaffTrainDays
this.form.NewStaffTrainDays = this.data.NewStaffTrainDays
}
this.loading = false
},
//
getDicData() {
getBasicDataSelects(['Trial_Document']).then(res => {
this.dictionaryList = { ...res.Result }
})
},
//
getUserType() {
getTrialUserTypeList().then(res => {
this.userTypeOptions = res.Result
if (this.form.Id) {
this.form.NeedConfirmedUserTypeIdList = this.data.NeedConfirmedUserTypeeIds
}
}).catch(() => { this.loading = false })
},
handleViewableUserTypeChange(valArr) {
this.form.NeedConfirmedUserTypeIdList = []
this.needConfirmedUserTypeOptions = []
valArr.forEach((val) => {
const i = this.userTypeOptions.findIndex(userType => { return userType.Id === val })
this.needConfirmedUserTypeOptions.push(this.userTypeOptions[i])
})
},
//
beforeUpload(file) {
if (this.checkFileSuffix(file.name)) {
this.fileList = []
return true
} else {
this.$alert(this.$t('trials:attachment:message:pdf'))
return false
}
},
//
async handleUploadFile(param) {
this.loading = true
var file = await this.fileToBlob(param.file)
const trialId = this.$route.query.trialId
const res = await this.OSSclient.put(`/${trialId}/DocumentToSign/${param.file.name}${new Date().getTime()}`, file)
this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url) })
this.form.Path = this.$getObjectName(res.url)
this.form.Name = param.file.name
this.loading = false
},
//
handleRemoveFile() {
this.fileList = []
this.form.Path = ''
this.form.Name = ''
},
handleExceed(files, fileList) {
this.$message.warning(this.$t('trials:attachment:message:uploadFile'))
},
// pdf
checkFileSuffix(fileName) {
var typeArr = ['pdf', 'mp4']
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
if (typeArr.indexOf(extendName) !== -1) {
return true
} else {
return false
}
}
}
}
</script>
<style lang="scss">
.upload-temporary-file {
.upload-container .el-upload--text {
border: none;
width: 80px;
height: 40px;
}
.upload-container .el-input--small {
margin-bottom: 5px;
}
.upload-container .el-icon-circle-check {
color: #428bca;
font-size: 13px;
}
.account_item_clear {
.el-tag__close {
display: none !important;
}
}
}
</style>
@@ -5,17 +5,8 @@
<el-form :inline="true" class="base-search-form">
<!-- 文件类型 -->
<el-form-item :label="$t('trials:attachment:table:fileType')">
<el-select
v-model="searchData.FileTypeId"
clearable
style="width: 150px"
>
<el-option
v-for="item of $d.Trial_Document"
:key="item.id"
:label="item.label"
:value="item.id"
/>
<el-select v-model="searchData.FileTypeId" clearable style="width: 150px">
<el-option v-for="item of $d.Trial_Document" :key="item.id" :label="item.label" :value="item.id" />
</el-select>
</el-form-item>
<!-- 文件名称 -->
@@ -24,40 +15,20 @@
</el-form-item>
<!-- 培训状态 -->
<el-form-item :label="$t('trials:attachment:table:isDeleted')">
<el-select
clearable
v-model="searchData.IsDeleted"
style="width: 150px"
>
<el-option
v-for="item of $d.TrainingStatus"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-select clearable v-model="searchData.IsDeleted" style="width: 150px">
<el-option v-for="item of $d.TrainingStatus" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<!-- 培训角色 -->
<el-form-item :label="$t('trials:attachment:table:userType')">
<el-select
v-model="searchData.UserTypeId"
clearable
style="width: 100%"
>
<el-option
v-for="item of userTypeOptions"
v-show="
item.UserTypeEnum !== 1 &&
<el-select v-model="searchData.UserTypeId" clearable style="width: 100%">
<el-option v-for="item of userTypeOptions" v-show="item.UserTypeEnum !== 1 &&
item.UserTypeEnum !== 8 &&
item.UserTypeEnum !== 20 &&
item.UserTypeEnum !== 26 &&
item.UserTypeEnum !== 27 &&
item.UserTypeEnum !== 31
"
:key="item.Id"
:label="item.UserTypeShortName"
:value="item.Id"
>
" :key="item.Id" :label="item.UserTypeShortName" :value="item.Id">
<span>{{ item.UserType }}</span>
</el-option>
</el-select>
@@ -69,71 +40,52 @@
{{ $t('common:button:search') }}
</el-button>
<!-- 重置 -->
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
</el-form>
<span style="margin-left: auto">
<!-- 新增 -->
<el-button
v-hasPermi="['trials:trials-panel:setting:attachment:add']"
type="primary"
icon="el-icon-plus"
@click="handleAdd"
>
<el-button v-hasPermi="['trials:trials-panel:setting:attachment:add']" type="primary" icon="el-icon-plus"
@click="handleAdd">
{{ $t('common:button:add') }}
</el-button>
</span>
</div>
<!-- 系统文件列表 -->
<el-table
ref="attachmentList"
v-loading="loading"
v-adaptive="{ bottomOffset: 60 }"
:data="list"
stripe
height="100"
@sort-change="handleSortByColumn"
>
<el-table ref="attachmentList" v-loading="loading" v-adaptive="{ bottomOffset: 60 }" :data="list" stripe
height="100" @sort-change="handleSortByColumn">
<el-table-column type="index" width="40" />
<!-- 文件类型 -->
<el-table-column
prop="FileType"
:label="$t('trials:attachment:table:fileType')"
show-overflow-tooltip
sortable="custom"
min-width="160"
/>
<el-table-column prop="FileType" :label="$t('trials:attachment:table:fileType')" show-overflow-tooltip
sortable="custom" min-width="160" />
<!-- 文件名称 -->
<el-table-column
prop="Name"
:label="$t('trials:attachment:table:fileName')"
show-overflow-tooltip
sortable="custom"
min-width="160"
/>
<el-table-column prop="Name" :label="$t('trials:attachment:table:fileName')" show-overflow-tooltip
sortable="custom" min-width="160" />
<!--附件-->
<el-table-column prop="AttachmentCount" :label="$t('trials:attachment:table:AttachmentCount')"
show-overflow-tooltip sortable="custom" min-width="150px">
<template slot-scope="scope">
<el-button type="text" @click.stop="openAttachment(scope.row, true)">
{{ scope.row.AttachmentCount }}
<i class="el-icon-upload2" />
</el-button>
</template>
</el-table-column>
<!-- 查看最短时间(分钟) -->
<el-table-column
prop="SignViewMinimumMinutes"
:label="$t('trials:attachment:table:min')"
show-overflow-tooltip
sortable="custom"
min-width="150"
/>
<el-table-column prop="SignViewMinimumMinutes" :label="$t('trials:attachment:table:min')" show-overflow-tooltip
sortable="custom" min-width="150" />
<!-- 已有成员(分钟) -->
<el-table-column prop="CurrentStaffTrainDays" :label="$t('trials:attachment:table:CurrentStaffTrainDays')"
show-overflow-tooltip sortable="custom" min-width="150" />
<!-- 新加入成员(分钟) -->
<el-table-column prop="NewStaffTrainDays" :label="$t('trials:attachment:table:NewStaffTrainDays')"
show-overflow-tooltip sortable="custom" min-width="150" />
<!-- 是否废除 -->
<el-table-column
prop="IsDeleted"
:label="$t('trials:attachment:table:isDeleted')"
show-overflow-tooltip
sortable="custom"
min-width="100"
>
<el-table-column prop="IsDeleted" :label="$t('trials:attachment:table:isDeleted')" show-overflow-tooltip
sortable="custom" min-width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
$fd('TrainingStatus', scope.row.IsDeleted)
@@ -143,13 +95,18 @@
}}</el-tag>
</template>
</el-table-column>
<!--发布状态-->
<el-table-column prop="IsPublish" :label="$t('trials:attachment:table:IsPublish')" show-overflow-tooltip
sortable="custom" min-width="120px">
<template slot-scope="scope">
<el-tag :type="scope.row.IsPublish ? 'primary' : 'danger'">{{
$fd('AttachmentPublishStatus', scope.row.IsPublish)
}}</el-tag>
</template>
</el-table-column>
<!-- 需要签署的用户类型 -->
<el-table-column
prop="NeedConfirmedUserTypes"
:label="$t('trials:attachment:table:userType')"
show-overflow-tooltip
min-width="100"
>
<el-table-column prop="NeedConfirmedUserTypes" :label="$t('trials:attachment:table:userType')"
show-overflow-tooltip min-width="100">
<template slot-scope="scope">
{{
scope.row.NeedConfirmedUserTypes
@@ -174,91 +131,52 @@
min-width="160"
/> -->
<!--创建时间-->
<el-table-column
prop="CreateTime"
:label="$t('trials:attachment:table:CreateTime')"
show-overflow-tooltip
sortable="custom"
min-width="160"
/>
<el-table-column
:label="$t('common:action:action')"
min-width="140"
fixed="right"
>
<el-table-column prop="CreateTime" :label="$t('trials:attachment:table:CreateTime')" show-overflow-tooltip
sortable="custom" min-width="160" />
<el-table-column :label="$t('common:action:action')" min-width="200" fixed="right">
<template slot-scope="scope">
<!-- 预览 -->
<el-button
icon="el-icon-view"
circle
:title="$t('trials:attachment:action:preview')"
@click="handlePreview(scope.row)"
/>
<el-button icon="el-icon-view" circle :title="$t('trials:attachment:action:preview')"
@click="handlePreview(scope.row)" />
<!-- 编辑 -->
<el-button
v-hasPermi="['trials:trials-panel:setting:attachment:edit']"
circle
:title="$t('trials:attachment:action:edit')"
icon="el-icon-edit-outline"
:disabled="scope.row.IsSomeUserSigned || scope.row.IsDeleted"
@click="handleEdit(scope.row)"
/>
<el-button v-hasPermi="['trials:trials-panel:setting:attachment:edit']" circle
:title="$t('trials:attachment:action:edit')" icon="el-icon-edit-outline"
:disabled="scope.row.IsSomeUserSigned || scope.row.IsDeleted" @click="handleEdit(scope.row)" />
<el-button :disabled="scope.row.IsPublish" circle icon="el-icon-position"
:title="$t('dictionary:signature:button:publish')" @click="publishTrialDocument([scope.row])">
</el-button>
<!-- 废除 -->
<el-button
v-hasPermi="['trials:trials-panel:setting:attachment:abolish']"
:disabled="scope.row.IsDeleted"
circle
:title="$t('trials:attachment:action:apolish')"
icon="el-icon-delete"
@click="handleRepeal(scope.row)"
/>
<el-button v-hasPermi="['trials:trials-panel:setting:attachment:abolish']" :disabled="scope.row.IsDeleted"
circle :title="$t('trials:attachment:action:apolish')" icon="el-icon-delete"
@click="handleRepeal(scope.row)" />
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
<!-- 新增/编辑 -->
<el-dialog
v-if="editVisible"
:visible.sync="editVisible"
:close-on-click-modal="false"
:title="title"
width="800px"
custom-class="base-dialog-wrapper"
>
<AttachmentForm
:data="currentRow"
@closeDialog="closeDialog"
@getList="getList"
/>
<el-dialog v-if="editVisible" :visible.sync="editVisible" :close-on-click-modal="false" :title="title" width="800px"
custom-class="base-dialog-wrapper">
<templateForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" />
</el-dialog>
<!--附件列表-->
<attachmentList v-if="config.visible" :config="config" :rowData="currentRow" :TrialDocumentId="TrialDocumentId"
@getList="getList" />
<!-- 预览文件 -->
<el-dialog
v-if="previewVisible"
:visible.sync="previewVisible"
:title="$t('trials:attachment:dialogTitle:preview')"
:fullscreen="true"
append-to-body
custom-class="base-dialog-wrapper"
>
<div
class="base-modal-body"
style="border: 2px solid #ccc; padding: 10px"
>
<PreviewFile
v-if="previewVisible"
:file-path="currentPath"
:file-type="currentType"
/>
<attachmentPreview :SystemDocumentId="TrialDocumentId" :isTrial="true" :visible.sync="perview_visible"
:isView="true" v-if="perview_visible" />
<!-- 预览文件 -->
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="$t('trials:attachment:dialogTitle:preview')"
:fullscreen="true" append-to-body custom-class="base-dialog-wrapper">
<span style="position: fixed; left: 16px; top: 45px;cursor: pointer;font-size: 18px;color:#409EFF"
@click.stop="openAttachment(currentRow)" v-if="currentRow.AttachmentCount">{{
$t('trials:attachment:table:AttachmentCount') }} ({{
currentRow.AttachmentCount }})</span>
<div class="base-modal-body" style="border: 2px solid #ccc; padding: 10px">
<PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" />
</div>
</el-dialog>
</box-content>
@@ -268,11 +186,14 @@ import {
getTrialDocumentList,
userAbandonDoc,
getTrialUserTypeList,
publishTrialDocument
} from '@/api/trials'
import BoxContent from '@/components/BoxContent'
import Pagination from '@/components/Pagination'
import AttachmentForm from './components/attachmentForm'
import templateForm from './components/templateForm'
import PreviewFile from './components/previewFile'
import attachmentList from './components/attachmentList'
import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview'
const searchDataDefault = () => {
return {
FileTypeId: '',
@@ -287,7 +208,7 @@ const searchDataDefault = () => {
}
export default {
name: 'TrialAttachmentList',
components: { BoxContent, Pagination, AttachmentForm, PreviewFile },
components: { BoxContent, Pagination, templateForm, PreviewFile, attachmentList, attachmentPreview },
dicts: ['Trial_Document'],
data() {
return {
@@ -303,6 +224,13 @@ export default {
currentType: '',
trialId: '',
userTypeOptions: [],
TrialDocumentId: null,
perview_visible: false,
config: {
visible: false,
title: this.$t('dictionary:signature:attachmentList:title'),
width: '800px',
},
}
},
mounted() {
@@ -311,6 +239,39 @@ export default {
this.getUserType()
},
methods: {
openAttachment(row, isList = false) {
this.TrialDocumentId = row.Id
this.currentRow = { ...row }
if (!isList) {
this.perview_visible = true
} else {
this.config.visible = true
}
},
//
async publishTrialDocument(list) {
try {
let confirm = await this.$confirm(this.$t('trials:attachment:confirm:publishFile'), {
type: 'warning',
distinguishCancelAndClose: true,
})
if (!confirm) return false
let arr = list.filter(item => !item.IsPublish)
if (arr.length <= 0) return this.getList()
let data = {
ids: arr.map(item => item.Id)
}
this.loading = true
let res = await publishTrialDocument(data)
this.loading = false
if (res.IsSuccess) {
this.getList()
}
} catch (err) {
this.loading = false
console.log(err)
}
},
//
getList() {
this.loading = true
@@ -361,6 +322,7 @@ export default {
this.currentType = row.Name
? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase()
: ''
this.currentRow = Object.assign({}, row)
this.previewVisible = true
},
//
@@ -391,7 +353,7 @@ export default {
this.loading = false
})
})
.catch(() => {})
.catch(() => { })
},
//
closeDialog() {
@@ -0,0 +1,191 @@
<template>
<BoxContent style="min-height: 100%; background: #fff">
<div class="inspection-content" v-loading="loading">
<!-- <div class="top">
<span class="title">{{ this.$t("trials:setting:inspection:module") }}</span>
<span>{{ this.$t("trials:setting:inspection:optName") }}</span>
</div> -->
<el-tree :data="tree" show-checkbox node-key="id" :expand-on-click-node="false" ref="tree">
<span class="custom-tree-node" slot-scope="{ node }">
<span>{{ node.label }}</span>
<!-- <span>
{{ node.data.optName }}
</span> -->
</span>
</el-tree>
</div>
<div class="btnBox">
<el-button @click.stop="getCheckedNodes" type="primary"
v-if="hasPermi(['trials:setting:inspection:update'])" class="btn">
{{ $t('common:button:save') }}
</el-button>
</div>
</BoxContent>
</template>
<script>
import BoxContent from '@/components/BoxContent'
import {
getTrialShowInspection,
setTrialShowInspection
} from '@/api/trials'
export default {
components: { BoxContent },
data() {
return {
loading: false,
tree: [
{
id: 1,
label: this.$t("trials:setting:inspection:module"),
optName: this.$t("trials:setting:inspection:optName"),
}
],
list: []
}
},
created() {
this.getTree()
},
computed: {
isEN() {
return this.$i18n.locale !== 'zh'
}
},
methods: {
async getCheckedNodes() {
try {
this.loading = true
let ids = this.$refs.tree.getCheckedKeys()
let list = []
this.list.forEach(item => {
let obj = {
FrontAuditConfigId: item.FrontAuditConfigId,
isShow: false
}
if (ids.includes(item.FrontAuditConfigId)) {
obj.isShow = true
}
list.push(obj)
})
let data = {
TrialId: this.$route.query.trialId,
TrialShowInspectionList: list
}
let res = await setTrialShowInspection(data)
if (res.IsSuccess) {
this.getTree()
}
} catch (err) {
console.log(err)
}
},
async getTree() {
try {
let data = {
TrialId: this.$route.query.trialId
}
this.loading = true
let res = await getTrialShowInspection(data);
this.loading = false
if (res.IsSuccess) {
this.list = this.formatList(res.Result)
let { tree, ids } = this.formatTree(res.Result);
this.tree = tree
this.$nextTick(() => {
this.$refs.tree.setCheckedKeys(ids)
})
}
} catch (err) {
this.loading = false
console.log(err)
}
},
formatTree(list) {
let tree = [], ids = []
list.forEach(item => {
let obj = {
id: item.FrontAuditConfigId,
label: this.isEN ? item.Description : item.DescriptionCN
}
if (item.IsShow) {
ids.push(item.FrontAuditConfigId)
}
if (item.Children && item.Children.length > 0) {
obj.children = []
item.Children.forEach(it => {
let o = {
id: it.FrontAuditConfigId,
label: this.isEN ? it.Description : it.DescriptionCN
}
if (it.IsShow) {
ids.push(it.FrontAuditConfigId)
}
obj.children.push(o)
})
}
tree.push(obj)
})
return { tree, ids }
},
formatList(list) {
let arr = []
list.forEach(item => {
let obj = {
FrontAuditConfigId: item.FrontAuditConfigId,
ParentId: item.ParentId
}
arr.push(obj)
if (item.Children && item.Children.length > 0) {
item.Children.forEach(it => {
let o = {
FrontAuditConfigId: it.FrontAuditConfigId,
ParentId: it.ParentId
}
arr.push(o)
})
}
})
return arr;
}
}
}
</script>
<style lang="scss" scoped>
.inspection-content {
width: 40%;
min-height: 500px;
.top {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px;
padding-top: 20px;
.title {
width: 70%;
}
span {
display: inline-block;
}
}
.custom-tree-node {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px 0 0;
}
}
.btnBox {
width: 40%;
padding: 0 20px 20px;
display: flex;
align-items: center;
justify-content: flex-end;
}
</style>
@@ -738,7 +738,7 @@ export default {
},
handleIsDeletedChanged(val) {
if (val) {
this.statusForm.joinTime = ''
// this.statusForm.joinTime = ''
} else {
this.statusForm.removeTime = ''
}
@@ -353,7 +353,9 @@ export default {
}
},
formItemNumberChange(v, question) {
this.$emit('formItemTableNumberChange', v, question)
// this.$emit('formItemTableNumberChange', v, question)
this.$emit('formItemTableNumberChange')
this.$emit('setFormItemData', { key: question.Id, val: v, question: question })
},
resetChild(obj) {
obj.forEach(i => {
@@ -28,7 +28,7 @@
<template v-else>
<el-option
v-for="item of $d.Criterion_Question_Type"
v-show="item.value !== 'calculation' && item.value !== 'increment' && item.value !== 'table'"
v-show="item.value !== 'calculation' && item.value !== 'increment' && item.value !== 'table' && item.value !== 'fixedTable'"
:key="item.value"
:value="item.value"
:label="item.label"
@@ -727,6 +727,63 @@
}}
</div>
</div>
<!-- 影像标记 -->
<el-form-item
v-if="form.Type === 'number' && !isFromSystem && readingVersionEnum"
:label="$t('trials:readingUnit:qsList:title:imageMarkEnum')"
prop="ImageMarkEnum"
>
<el-radio-group
v-model="form.ImageMarkEnum"
:disabled="form.IsRequired === 0"
@change="imageMarkEnumChange"
>
<el-radio v-for="item of $d.ImageMark" :key="item.id" :label="item.value" :disabled="form.IsRequired === 2 && item.value === 1">{{ item.label }}</el-radio>
</el-radio-group>
</el-form-item>
<!-- 测量工具 ImageTool -->
<el-form-item
v-if="form.ImageMarkEnum === 1 || form.ImageMarkEnum === 2"
:label="$t('trials:readingUnit:qsList:title:ImageTool')"
prop="ImageTool"
:rules="[
{ required: true, message: this.$t('common:ruleMessage:select')}
]"
>
<el-radio-group
v-model="form.ImageTool"
@change="imageToolChange"
>
<el-radio
v-for="tool of readingTools"
:key="tool.toolName"
:label="tool.toolName"
>
{{ $t(tool.i18nKey) }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- 测量值 ImageToolAttribute -->
<el-form-item
v-if="form.ImageTool"
:label="$t('trials:readingUnit:qsList:title:ImageToolAttribute')"
prop="ImageToolAttribute"
:rules="[
{ required: true, message: this.$t('common:ruleMessage:select')}
]"
>
<el-radio-group
v-model="form.ImageToolAttribute"
>
<el-radio
v-for="i of imageToolAttributes"
:key="i"
:label="i"
>
{{ i }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- 最大上传个数 -->
<el-form-item
v-if="form.Type === 'upload'"
@@ -1018,6 +1075,16 @@ export default {
isLook: {
type: Boolean,
default: true
},
readingTools: {
type: Array,
default() {
return []
}
},
readingVersionEnum: {
type: Number,
default: 0
}
},
@@ -1071,9 +1138,14 @@ export default {
ExportResult: [],
ClassifyType: null,
ClassifyEditType: null,
ClassifyShowType: null
ClassifyShowType: null,
ImageMarkEnum: 0,
ImageTool: '',
ImageToolAttribute: '',
// IsEnable: true
},
imageToolAttributes: [],
rules: {
Type: [
{required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change']}
@@ -1349,6 +1421,9 @@ export default {
}
}
}
if (this.form.ImageTool) {
this.imageToolChange(this.form.ImageTool)
}
}
if (!this.data.ShowOrder && this.data.ShowOrder !== 0) {
if (this.list.length > 0) {
@@ -1456,9 +1531,27 @@ export default {
form.RelevanceId = ''
form.RelevanceValueList = []
}
if (val === 0 && form.Type === 'number' && !this.isFromSystem) {
form.ImageMarkEnum = 1
}
if (val === 2 && form.Type === 'number' && !this.isFromSystem) {
form.ImageMarkEnum = 0
}
},
imageMarkEnumChange(val) {
if (val === 0) {
this.form.ImageTool = ''
this.form.ImageToolAttribute = ''
this.imageToolAttributes = []
}
},
imageToolChange(v) {
let i = this.readingTools.findIndex(tool=>tool.toolName === v)
if (i > -1) {
this.imageToolAttributes = this.readingTools[i].props
}
},
parentQuestionChange(val, form) {
console.log(val)
this.isParentExistGroup = false
if (val) {
var index = this.parentOptions.findIndex(item => {
@@ -1550,6 +1643,10 @@ export default {
form.ExportResult = []
form.ClassifyType = null
form.ClassifyShowType = null
form.ImageMarkEnum = 0
form.ImageTool = ''
form.ImageToolAttribute = ''
this.imageToolAttributes = []
},
getLesionType() {
return new Promise((resolve, reject) => {
@@ -210,12 +210,14 @@
append-to-body
custom-class="base-dialog-wrapper"
>
<QuestionsForm
<questions-form
ref="addOrEdit"
:data="rowData"
:trial-criterion-id="trialCriterionId"
:is-from-system="isFromSystem"
:digit-places="digitPlaces"
:readingTools="readingTools"
:readingVersionEnum="readingVersionEnum"
:list="tblList"
:is-look="isLook"
:is-system-criterion="isSystemCriterion"
@@ -231,7 +233,7 @@
:title="preview.title"
:fullscreen="true"
>
<QuestionsPreview :criterion-id="trialCriterionId" :is-system-criterion="isSystemCriterion" :form-type="1" />
<questions-preview :criterion-id="trialCriterionId" :is-system-criterion="isSystemCriterion" :form-type="1" />
</el-dialog>
<el-dialog
@@ -241,12 +243,14 @@
:title="config.title"
:fullscreen="true"
>
<TableQsList
<table-qs-list
:digit-places="digitPlaces"
:reading-question-id="rowData.Id"
:is-from-system="isFromSystem"
:is-confirm="isConfirm"
:criterion-id="trialCriterionId"
:readingTools="readingTools"
:readingVersionEnum="readingVersionEnum"
@close="config.visible = false"
/>
</el-dialog>
@@ -299,6 +303,16 @@ export default {
isFromSystem: {
type: Boolean,
default: true
},
readingTools: {
type: Array,
default() {
return []
}
},
readingVersionEnum: {
type: Number,
default: 0
}
},
@@ -321,7 +335,6 @@ export default {
},
mounted() {
this.tblList = this.list
console.log('ql', this.isSystemCriterion)
},
methods: {
getList() {
@@ -10,7 +10,7 @@
>
<!-- '表单问题' -->
<el-form-item :label="$t('trials:readingUnit:readingCriterion:title:formQs')">
<QuestionsList
<questions-list
:ref="`questionList${trialReadingCriterionId}`"
v-if="form.FormType===1"
:trial-reading-criterion-id="trialReadingCriterionId"
@@ -20,6 +20,8 @@
:is-system-criterion="isSystemCriterion"
:is-from-system="readingInfo.IsFromSystem"
:digit-places="digitPlaces"
:readingTools="readingTools"
:readingVersionEnum="readingVersionEnum"
@reloadArbitrationRules="reloadArbitrationRules"
/>
</el-form-item>
@@ -77,6 +79,12 @@ export default {
isAdditionalAssessment: {
type: Boolean,
default: false
},
readingTools: {
type: Array,
default() {
return []
}
}
},
data() {
@@ -99,7 +107,8 @@ export default {
readingInfo: {},
isConfirm: true,
configBaseDataVisible: false,
additionalAssessmentOptionList: null
additionalAssessmentOptionList: null,
readingVersionEnum: 0
}
},
mounted() {
@@ -118,6 +127,7 @@ export default {
}
getTrialReadingCriterionInfo({ trialId, TrialReadingCriterionId: this.trialReadingCriterionId }).then(res => {
this.loading = false
this.readingVersionEnum = res.OtherInfo.ReadingVersionEnum
this.readingInfo = res.Result
for (const k in this.form) {
if (res.Result.hasOwnProperty(k)) {
@@ -126,7 +136,6 @@ export default {
}
this.isConfirm = res.Result.IsSign
this.isSystemCriterion = res.Result.IsSystemCriterion
console.log(this.isSystemCriterion)
}).catch(() => {
this.loading = false
})
@@ -137,7 +146,6 @@ export default {
//
handleSave(isPrompt = true) {
return new Promise((resolve, reject) => {
console.log(this.form)
this.$refs['readingCriterionsForm'].validate((valid) => {
if (!valid) {
resolve(false)
@@ -917,6 +917,8 @@ export default {
this.$emit('setGlobalReading', res.Result.IsGlobalReading)
this.$emit('setOncologyReading', res.Result.IsOncologyReading)
this.$emit('setDigitPlaces', res.Result.DigitPlaces)
this.$emit('setReadingTools', res.Result.ReadingToolList)
if (res.Result.ReadingType === 1) {
this.$emit('setArbitrationReading', false)
}
@@ -957,6 +959,7 @@ export default {
this.$emit('setGlobalReading', this.form.IsGlobalReading)
this.$emit('setOncologyReading', this.form.IsOncologyReading)
this.$emit('setDigitPlaces', this.form.DigitPlaces)
this.$emit('setReadingTools', this.form.ReadingToolList)
if (this.form.ReadingType === 1) {
this.$emit('setArbitrationReading', false)
}
@@ -19,7 +19,7 @@
>
<template v-for="item of $d.Criterion_Question_Type">
<el-option
v-if="item.value !== 'increment' && item.value !== 'table' && item.value !== 'basicTable' && item.value !== 'group'"
v-if="item.value !== 'increment' && item.value !== 'table' && item.value !== 'basicTable' && item.value !== 'group' && item.value !== 'fixedTable' && item.value !== 'calculation' "
:key="item.value"
:value="item.value"
:label="item.label"
@@ -429,6 +429,64 @@
<i class="el-icon-info" />{{ [1, 2, 3, 4].includes(form.CustomCalculateMark) ? $t('trials:readingUnit:qsList:message:msg1') : $t('trials:readingUnit:qsList:message:msg2') }}
</div>
</div>
<!-- 影像标记 -->
<el-form-item
v-if="form.Type === 'number' && !isFromSystem && readingVersionEnum"
:label="$t('trials:readingUnit:qsList:title:imageMarkEnum')"
prop="ImageMarkEnum"
>
<el-radio-group
v-model="form.ImageMarkEnum"
:disabled="form.IsRequired === 0"
@change="imageMarkEnumChange"
>
<el-radio v-for="item of $d.ImageMark" :key="item.id" :label="item.value" :disabled="form.IsRequired === 2 && item.value === 1">{{ item.label }}</el-radio>
</el-radio-group>
</el-form-item>
<!-- 测量工具 ImageTool -->
<el-form-item
v-if="form.ImageMarkEnum === 1 || form.ImageMarkEnum === 2"
:label="$t('trials:readingUnit:qsList:title:ImageTool')"
prop="ImageTool"
:rules="[
{ required: true, message: this.$t('common:ruleMessage:select')}
]"
>
<el-radio-group
v-model="form.ImageTool"
@change="imageToolChange"
>
<el-radio
v-for="tool of readingTools"
:key="tool.toolName"
:label="tool.toolName"
>
{{ $t(tool.i18nKey) }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- 测量值 ImageToolAttribute -->
<el-form-item
v-if="form.ImageTool"
:label="$t('trials:readingUnit:qsList:title:ImageToolAttribute')"
prop="ImageToolAttribute"
:rules="[
{ required: true, message: this.$t('common:ruleMessage:select')}
]"
>
<el-radio-group
v-model="form.ImageToolAttribute"
>
<el-radio
v-for="i of imageToolAttributes"
:key="i"
:label="i"
>
{{ i }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="(form.Type === 'select' || form.Type === 'radio' || form.Type === 'input') && isFromSystem"
:label="$t('trials:readingUnit:label:QuestionGenre')"
@@ -847,6 +905,16 @@ export default {
type: {
type: String,
required: true
},
readingTools: {
type: Array,
default() {
return []
}
},
readingVersionEnum: {
type: Number,
default: 0
}
},
@@ -896,8 +964,12 @@ export default {
ClassifyType: null,
ClassifyEditType: null,
ClassifyShowType: null,
ImageMarkEnum: 0,
ImageTool: '',
ImageToolAttribute: '',
// IsEnable: true
},
imageToolAttributes: [],
rules: {
Type: [
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }
@@ -1171,6 +1243,9 @@ export default {
}
}
}
if (this.form.ImageTool) {
this.imageToolChange(this.form.ImageTool)
}
}
if (this.form.ClassifyTableQuestionId) {
this.classifyQuestionChange(this.form.ClassifyTableQuestionId)
@@ -1182,6 +1257,12 @@ export default {
}
}
},
classifyQuestionChange (v){
let obj = this.selectQuestions.find(i=>i.Id === v)
let arr = obj && obj.TypeValue ? obj.TypeValue.split('|') : []
arr = arr.length > 0 ? arr.map(i=>i.trim()) : []
this.classifyQuestionOptions = arr
},
getBasicConfigSelect() {
getCriterionDictionaryList({
CriterionId: this.criterionId,
@@ -1263,6 +1344,25 @@ export default {
form.RelevanceId = ''
form.RelevanceValueList = []
}
if (val === 0 && form.Type === 'number' && !this.isFromSystem) {
form.ImageMarkEnum = 1
}
if (val === 2 && form.Type === 'number' && !this.isFromSystem) {
form.ImageMarkEnum = 0
}
},
imageMarkEnumChange(val) {
if (val === 0) {
this.form.ImageTool = ''
this.form.ImageToolAttribute = ''
this.imageToolAttributes = []
}
},
imageToolChange(v) {
let i = this.readingTools.findIndex(tool=>tool.toolName === v)
if (i > -1) {
this.imageToolAttributes = this.readingTools[i].props
}
},
async parentQuestionChange(val, form) {
if (val) {
@@ -1372,6 +1472,10 @@ export default {
form.ImageCount = 0
form.ClassifyType = null
form.ClassifyShowType = null
form.ImageMarkEnum = 0
form.ImageTool = ''
form.ImageToolAttribute = ''
this.imageToolAttributes = []
},
close() {
this.$emit('close')
@@ -202,6 +202,8 @@
:digit-places="digitPlaces"
:reading-question-id="readingQuestionId"
:criterion-id="criterionId"
:readingTools="readingTools"
:readingVersionEnum="readingVersionEnum"
@close="addOrEdit.visible = false"
@getList="getList"
/>
@@ -241,6 +243,16 @@ export default {
criterionId: {
type: String,
required: true
},
readingTools: {
type: Array,
default() {
return []
}
},
readingVersionEnum: {
type: Number,
default: 0
}
},
@@ -46,6 +46,7 @@
@setGlobalReading="setGlobalReading"
@setOncologyReading="setOncologyReading"
@setDigitPlaces="setDigitPlaces"
@setReadingTools="setReadingTools"
/>
</el-collapse-item>
<!-- 阅片标准 -->
@@ -57,6 +58,7 @@
:ref="`readingCriterions${item.TrialReadingCriterionId}`"
:trial-reading-criterion-id="TrialReadingCriterionId"
:digit-places="digitPlaces"
:readingTools="readingTools"
:is-additional-assessment="isAdditionalAssessment"
@reloadArbitrationRules="reloadArbitrationRules"
/>
@@ -174,7 +176,7 @@ import GlobalReading from "./components/GlobalReading";
import OncologyForm from "./components/OncologyForm";
import SignForm from "@/views/trials/components/newSignForm";
import const_ from "@/const/sign-code";
import { getCustomizeStandardsTools } from '@/views/trials/trials-panel/reading/dicoms3D/components/toolConfig'
export default {
name: "ReadingUnit",
components: {
@@ -208,6 +210,7 @@ export default {
isGlobalReading: false,
digitPlaces: 0,
isAdditionalAssessment: false,
readingTools: []
};
},
watch: {
@@ -295,6 +298,9 @@ export default {
setDigitPlaces(digitPlaces) {
this.digitPlaces = digitPlaces;
},
setReadingTools(readingTools) {
this.readingTools = getCustomizeStandardsTools(readingTools)
},
setIsClinicalReading(isClinicalReading) {
this.isClinicalReading = isClinicalReading;
},
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,357 @@
<template>
<BaseContainer class="image-summary-wrapper">
<template slot="search-container">
<el-form :inline="true">
<!-- 中心 -->
<el-form-item :label="$t('trials:imageSummary:table:siteNo')">
<el-select v-model="searchData.TrialSiteId" clearable filterable>
<el-option v-for="(item, index) of siteOptions" :key="index" :label="item.TrialSiteCode"
:value="item.TrialSiteId" />
</el-select>
</el-form-item>
<!-- 受试者 -->
<el-form-item :label="$t('trials:imageSummary:table:subject')">
<el-input v-model="searchData.SubjectCode" />
</el-form-item>
<!-- 拍片时间 -->
<el-form-item :label="$t('trials:imageSummary:table:operateTime')">
<el-date-picker v-model="timeList" @change="changeTimeList" value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']" type="datetimerange">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
</el-button>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
<el-button type="primary" @click="handleExport">
{{ $t('common:button:export') }}
</el-button>
<el-button type="primary" @click="handleExportImage(false)" :disabled="selectArr.length <= 0"
v-if="hasPermi(['trials:trials-panel:trial-summary:image-summary:export'])">
{{ $t('trials:imageSummary:button:export_dicom') }}
</el-button>
<el-button type="primary" @click="handleExportImage(true)" :disabled="selectArr.length <= 0"
v-if="hasPermi(['trials:trials-panel:trial-summary:image-summary:export'])">
{{ $t('trials:imageSummary:button:export_image') }}
</el-button>
<el-button type="primary" @click="statistics">
{{ $t('trials:imageSummary:button:statistics') }}
</el-button>
</el-form-item>
</el-form>
</template>
<template slot="main-container">
<el-table v-adaptive="{ bottomOffset: 60 }" v-loading="loading" :data="list" @sort-change="handleSortChange"
@selection-change="handleSelectionChange" stripe height="100"
:default-sort="{ prop: 'CreateTime', order: 'descending' }">
<el-table-column type="selection" width="55" />
<!-- 中心编号 -->
<el-table-column prop="TrialSiteCode" min-width="100" :label="$t('trials:imageSummary:table:siteNo')"
show-overflow-tooltip sortable="custom" />
<!-- 受试者 -->
<el-table-column prop="SubjectCode" min-width="100" :label="$t('trials:imageSummary:table:subject')"
show-overflow-tooltip sortable="custom" />
<!-- 访视 -->
<el-table-column prop="VisitName" min-width="120" :label="$t('trials:imageSummary:table:visit')"
show-overflow-tooltip sortable="custom" />
<!-- 检查数量 -->
<el-table-column prop="TotalStudyCount" min-width="120"
:label="$t('trials:imageSummary:table:TotalStudyCount')" show-overflow-tooltip sortable="custom" />
<!-- 影像类型 -->
<el-table-column prop="VisitName" min-width="120" :label="$t('trials:imageSummary:table:imageType')"
show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
<el-tag v-if="scope.row.IsHaveDicom" type="primary">{{
$fd('IsDicom', true)
}}</el-tag>
<el-tag v-if="scope.row.IsHaveNoneDicom" type="primary">{{
$fd('IsDicom', false)
}}</el-tag>
</template>
</el-table-column>
<!-- 影像数量 -->
<el-table-column prop="TotalImageCount" min-width="120"
:label="$t('trials:imageSummary:table:TotalImageCount')" show-overflow-tooltip sortable="custom" />
<!-- 影像大小 -->
<el-table-column prop="TotalImageSizeStr" min-width="120"
:label="$t('trials:imageSummary:table:TotalImageSizeStr')" show-overflow-tooltip
sortable="custom" />
<!-- 最早拍片日期 -->
<el-table-column prop="EarliestScanDate" min-width="120"
:label="$t('trials:imageSummary:table:EarliestScanDate')" show-overflow-tooltip sortable="custom" />
<!-- 最晚拍片日期 -->
<el-table-column prop="LatestScanDate" min-width="120"
:label="$t('trials:imageSummary:table:LatestScanDate')" show-overflow-tooltip sortable="custom" />
<el-table-column prop="" fixed="right" :label="$t('common:action:action')" show-overflow-tooltip
v-if="hasPermi(['trials:trials-panel:trial-summary:image-summary:toUpload', 'trials:tab:uploadMonitor'])">
<template slot-scope="scope">
<!-- 详情 -->
<el-button icon="el-icon-position" circle @click="toUpload(scope.row)"
:title="$t('trials:imageSummary:action:toUpload')" />
</template>
</el-table-column>
</el-table>
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
<div class="remark">
<span>{{ $t('trials:imageSummary:remark:TotalImageSizeStr') }}</span>
<span class="size">{{ image_size.TotalImageSizeStr }}</span>,
<span>{{ $t('trials:imageSummary:remark:SubjectImageAVGSizeStr') }}</span>
<span class="size">{{ image_size.SubjectImageAVGSizeStr }} </span>,
<span>{{ $t('trials:imageSummary:remark:SubjectVisitImageAVGSizeStr') }}</span>
<span class="size">{{ image_size.SubjectVisitImageAVGSizeStr }}</span>,
<span>{{ $t('trials:imageSummary:remark:CheckImageSize') }}</span>
<span class="size">{{ image_size.CheckImageSize }} </span>
</div>
</template>
</BaseContainer>
</template>
<script>
import Pagination from '@/components/Pagination'
import BaseContainer from '@/components/BaseContainer'
import { getTrialSiteSelect, getTrialVisitImageStatList, getTrialVisitImageStatInfo, getExportSubjectVisitImageList } from '@/api/trials'
import { downLoadFile } from '@/utils/stream.js'
const searchDataDefault = () => {
return {
SortField: '',
Asc: false,
PageIndex: 1,
PageSize: 20,
TrialSiteId: null,
SubjectCode: null,
BeginScanDate: null,
EndScanDate: null
}
}
export default {
name: "imageSummary",
components: { Pagination, BaseContainer },
data() {
return {
total: 0,
loading: false,
searchData: searchDataDefault(),
ResearchProgramNo: null,
list: [],
siteOptions: [],
timeList: [],
selectArr: [],
image_size: {
TotalImageSizeStr: null,
SubjectImageAVGSizeStr: null,
SubjectVisitImageAVGSizeStr: null,
CheckImageSize: null
}
}
},
created() {
this.getSite()
this.getList()
},
methods: {
async getList() {
try {
this.searchData.TrialId = this.$route.query.trialId
this.loading = true
let res = await getTrialVisitImageStatList(this.searchData)
this.loading = false
if (res.IsSuccess) {
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
}
} catch (err) {
this.loading = false
console.log(err)
}
},
//
handleExport() { },
//
async handleExportImage(IsKeyImage = false) {
try {
let data = {
TrialId: this.$route.query.trialId,
IsKeyImage
}
data.SubjectVisitIdList = this.selectArr.map(item => item.SubjectVisitId)
if (!IsKeyImage) {
let confirm = await this.$confirm(this.$t('trials:imageSummary:confirm:space').replace('xxx', this.image_size.CheckImageSize))
if (!confirm) return false
}
let res = await getExportSubjectVisitImageList(data)
if (res.IsSuccess) {
this.downLoad(IsKeyImage, res.Result)
}
} catch (err) {
console.log(err)
}
},
//
async downLoad(IsKeyImage = false, row) {
try {
let { files, name } = this.formatDownloadFile(IsKeyImage, row)
let res = await downLoadFile(files, name, 'zip')
// }
} catch (err) {
console.log(err)
}
},
//
formatDownloadFile(IsKeyImage = false, row) {
let files = [],
name = `${this.$route.query.researchProgramNo}.zip`;
if (!IsKeyImage) {
//ID/ID/访/Study ID_Study Date_Modality/
row.VisitList.forEach(visit => {
if (visit.StudyList && visit.StudyList.length > 0) {
visit.StudyList.forEach(study => {
if (study.SeriesList && study.SeriesList.length > 0) {
study.SeriesList.forEach(serie => {
if (serie.InstancePathList && serie.InstancePathList.length > 0) {
serie.InstancePathList.forEach(instance => {
let instanceArr = instance.Path.split("/")
let fileName = instanceArr[instanceArr.length - 1]
let obj = {
name: `${visit.TrialSiteCode}/${visit.SubjectCode}/${visit.VisitName}/${study.StudyCode}_${study.StudyTime}_${serie.Modality}/${fileName}`,
url: this.OSSclientConfig.basePath + instance.Path,
}
files.push(obj)
})
}
})
}
})
}
if (visit.NoneDicomStudyList && visit.NoneDicomStudyList.length > 0) {
visit.NoneDicomStudyList.forEach(noneDicomStudy => {
if (noneDicomStudy.FileList && noneDicomStudy.FileList.length > 0) {
noneDicomStudy.FileList.forEach(file => {
let obj = {
name: `${visit.TrialSiteCode}/${visit.SubjectCode}/${visit.VisitName}/${noneDicomStudy.StudyCode}_${noneDicomStudy.ImageDate}_${noneDicomStudy.Modality}/${file.FileName}`,
url: this.OSSclientConfig.basePath + file.Path,
}
files.push(obj)
})
}
})
}
})
} else {
//()/ID/ID/访/-/
row.forEach(item => {
['QuestionMarkPictureList', 'TableQuestionRowPictureList'].forEach(key => {
if (item[key] && item[key].length > 0) {
item[key].forEach(data => {
['PicturePath', 'otherPicturePath'].forEach(imgKey => {
if (data[imgKey]) {
let arr = data[imgKey].split("/")
let fileName = arr[arr.length - 1]
let obj = {
name: `${item.CriterionName}/${item.TrialSiteCode}/${item.SubjectCode}/${item.VisitName}/${this.$fd('ArmEnum', item.ArmEnum)}_${this.$fd('YesOrNo', item.IsJudgeSelect)}/${fileName}`,
url: this.OSSclientConfig.basePath + data[imgKey],
}
files.push(obj)
}
})
})
}
})
})
}
return { files, name }
},
//
async statistics() {
try {
let params = {
TrialId: this.$route.query.trialId
}
this.loading = true
let res = await getTrialVisitImageStatInfo(params)
this.loading = false
if (res.IsSuccess) {
this.image_size.TotalImageSizeStr = res.Result.TotalImageSizeStr;
this.image_size.SubjectImageAVGSizeStr = res.Result.SubjectImageAVGSizeStr;
this.image_size.SubjectVisitImageAVGSizeStr = res.Result.SubjectVisitImageAVGSizeStr;
}
} catch (err) {
this.loading = false
console.log(err)
}
},
//
toUpload(row) {
let query = this.$route.query
query.siteId = row.TrialSiteId
query.subjectCode = row.SubjectCode
query.visitNum = row.VisitNum
this.$router.push({
path: '/trials/trials-panel/trial-summary/upload-monitor',
query
})
},
handleSelectionChange(selection) {
this.selectArr = selection
let num = this.selectArr.reduce((sum, item) => sum + item.TotalImageSize, 0)
if (num <= 0) return this.image_size.CheckImageSize = null
this.image_size.CheckImageSize = (num / 1024 / 1024).toFixed(3) + 'MB'
},
// site
getSite() {
getTrialSiteSelect(this.$route.query.trialId).then(res => {
this.siteOptions = res.Result
})
},
changeTimeList() {
if (this.timeList) {
this.searchData.BeginScanDate = this.timeList[0]
this.searchData.EndScanDate = this.timeList[1]
} else {
this.searchData.BeginScanDate = null
this.searchData.EndScanDate = null
}
},
handleReset() {
this.searchData = searchDataDefault()
this.timeList = []
this.getList()
},
handleSearch() {
this.searchData.PageIndex = 1
this.getList()
},
handleSortChange(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
} else {
this.searchData.Asc = false
}
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
},
}
}
</script>
<style lang="scss" scoped>
.image-summary-wrapper {
position: relative;
.remark {
position: absolute;
left: 5px;
bottom: 7px;
font-size: 12px;
.size {
display: inline-block;
min-width: 100px;
}
}
}
</style>
@@ -4,52 +4,25 @@
{{ TITLE }}
</div>
<el-form :inline="true" class="base-search-form topForm">
<el-form-item
:label="$t('trials:trialDocument:fileRecord:form:isConfirmRecord')"
v-if="isManage && hasEdit && !viewStatus"
>
<el-radio-group
v-model="DATA.IsConfirmRecord"
:disabled="rowBtnStatus === 'edit'"
>
<el-radio
:label="item.value"
v-for="item in $d.YesOrNo"
:key="item.id"
>{{ item.label }}
<el-form-item :label="$t('trials:trialDocument:fileRecord:form:isConfirmRecord')"
v-if="isManage && hasEdit && !viewStatus">
<el-radio-group v-model="DATA.IsConfirmRecord" :disabled="rowBtnStatus === 'edit'">
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
:label="$t('trials:trialDocument:fileRecord:form:isEnable')"
v-if="isManage && hasEdit && !viewStatus"
>
<el-radio-group
v-model="DATA.IsEnable"
:disabled="rowBtnStatus === 'edit'"
>
<el-radio
:label="item.value"
v-for="item in $d.YesOrNo"
:key="item.id"
>{{ item.label }}
<el-form-item :label="$t('trials:trialDocument:fileRecord:form:isEnable')"
v-if="isManage && hasEdit && !viewStatus">
<el-radio-group v-model="DATA.IsEnable" :disabled="rowBtnStatus === 'edit'">
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="isManage && hasEdit && !viewStatus">
<el-button
type="primary"
@click="rowBtnStatus = 'save'"
v-if="rowBtnStatus === 'edit'"
>
<el-button type="primary" @click="rowBtnStatus = 'save'" v-if="rowBtnStatus === 'edit'">
{{ $t('common:button:edit') }}
</el-button>
<el-button
type="primary"
:loading="rowBtnLoading"
@click="saveRowData"
v-if="rowBtnStatus === 'save'"
>
<el-button type="primary" :loading="rowBtnLoading" @click="saveRowData" v-if="rowBtnStatus === 'save'">
{{ $t('common:button:save') }}
</el-button>
</el-form-item>
@@ -58,32 +31,14 @@
<!-- 搜索框 -->
<div class="search" style="position: relative">
<el-form :inline="true" class="base-search-form">
<el-form-item
:label="$t('trials:trialDocument:fileRecord:search:name')"
>
<el-input
v-model="searchData.FileName"
style="width: 100px"
clearable
/>
<el-form-item :label="$t('trials:trialDocument:fileRecord:search:name')">
<el-input v-model="searchData.FileName" style="width: 100px" clearable />
</el-form-item>
<el-form-item
:label="$t('trials:trialDocument:fileRecord:search:isAuthorizedView')"
v-if="isManage && !viewStatus"
>
<el-select
v-if="!viewStatus"
v-model="searchData.IsAuthorizedView"
style="width: 100px"
placeholder=""
clearable
>
<el-option
v-for="item in $d.YesOrNo"
:key="item.id"
:label="item.label"
:value="item.value"
>
<el-form-item :label="$t('trials:trialDocument:fileRecord:search:isAuthorizedView')"
v-if="isManage && !viewStatus">
<el-select v-if="!viewStatus" v-model="searchData.IsAuthorizedView" style="width: 100px" placeholder=""
clearable>
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
@@ -91,134 +46,70 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
</el-button>
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
<el-form-item v-if="isManage && !viewStatus">
<el-button
type="primary"
:disabled="selectTable.length <= 0"
v-if="hasAccredit && isManage && !viewStatus"
@click.stop="auth"
>
<el-button type="primary" :disabled="selectTable.length <= 0" v-if="hasAccredit && isManage && !viewStatus"
@click.stop="auth">
{{ $t('trials:trialDocument:fileRecord:button:accredit') }}
</el-button>
<el-button
type="primary"
v-if="hasEdit && isManage && !viewStatus"
@click.stop="openFile(false)"
>
<el-button type="primary" v-if="hasEdit && isManage && !viewStatus" @click.stop="openFile(false)">
{{ $t('trials:trialDocument:fileRecord:button:uploadFile') }}
</el-button>
<el-button
type="primary"
v-if="hasEdit && isManage && !viewStatus"
@click.stop="openFile(true)"
>
<el-button type="primary" v-if="hasEdit && isManage && !viewStatus" @click.stop="openFile(true)">
{{ $t('trials:trialDocument:fileRecord:button:uploadFolder') }}
</el-button>
<el-button
type="primary"
icon="el-icon-bottom"
:disabled="selectTable.length <= 0"
v-if="hasDownLoad && isManage && !viewStatus"
@click.stop="downLoad"
>
<el-button type="primary" icon="el-icon-bottom" :disabled="selectTable.length <= 0"
v-if="hasDownLoad && isManage && !viewStatus" @click.stop="downLoad">
{{ $t('trials:trialDocument:fileRecord:button:downLoadFile') }}
</el-button>
<el-button
type="primary"
v-if="hasDel && isManage && !viewStatus"
:disabled="selectTable.length <= 0"
@click.stop="delList"
>
<el-button type="primary" v-if="hasDel && isManage && !viewStatus" :disabled="selectTable.length <= 0"
@click.stop="delList">
{{ $t('trials:trialDocument:fileRecord:button:del') }}
</el-button>
</el-form-item>
</el-form>
</div>
<el-table
v-loading="loading"
v-adaptive="{ bottomOffset: 75 }"
:data="list"
stripe
height="100"
style="width: 100%"
@sort-change="handleSortByColumn"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
v-if="isManage && !viewStatus"
/>
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100" style="width: 100%"
@sort-change="handleSortByColumn" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" v-if="isManage && !viewStatus" />
<el-table-column type="index" v-else />
<!--名称-->
<el-table-column
prop="FileName"
:label="$t('trials:trialDocument:fileRecord:table:name')"
show-overflow-tooltip
sortable="custom"
>
<el-table-column prop="FileName" :label="$t('trials:trialDocument:fileRecord:table:name')" show-overflow-tooltip
sortable="custom">
<template slot-scope="scope">
<div
v-if="
<div v-if="
scope.row.TrialFileRecord &&
scope.row.TrialFileRecord.TrialFileTypeId
"
style="display: flex; align-items: center"
>
" style="display: flex; align-items: center">
<span class="fileName">{{
scope.row.TrialFileRecord.FileName
}}</span>
<div v-if="isManage && !viewStatus" class="fileBtnBox">
<i
class="el-icon-view"
@click.stop="preview(scope.row.TrialFileRecord)"
/>
<i
class="el-icon-download"
v-if="hasDownLoad"
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
/>
<i
class="el-icon-delete"
v-if="hasDel"
@click.stop="delFile(scope.row, 'Trial')"
/>
<i class="el-icon-view" @click.stop="preview(scope.row.TrialFileRecord)" />
<i class="el-icon-download" v-if="hasDownLoad"
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')" />
<i class="el-icon-delete" v-if="hasDel" @click.stop="delFile(scope.row, 'Trial')" />
</div>
</div>
<i
v-else-if="isManage && !viewStatus && hasEdit"
class="el-icon-upload2"
style="cursor: pointer; color: #409eff"
@click.stop="upload(scope.row, 'Trial', ['.pdf'])"
/>
<i v-else-if="isManage && !viewStatus && hasEdit" class="el-icon-upload2"
style="cursor: pointer; color: #409eff" @click.stop="upload(scope.row, 'Trial', ['.pdf'])" />
</template>
</el-table-column>
<el-table-column
prop="fileType"
:label="$t('trials:trialDocument:fileRecord:table:fileType')"
show-overflow-tooltip
>
<el-table-column prop="fileType" :label="$t('trials:trialDocument:fileRecord:table:fileType')"
show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.TrialFileRecord">{{
scope.row.TrialFileRecord.FileFormat
}}</span>
</template>
</el-table-column>
<el-table-column
prop="fileType"
:label="$t('trials:trialDocument:fileRecord:table:fileSize')"
show-overflow-tooltip
>
<el-table-column prop="fileType" :label="$t('trials:trialDocument:fileRecord:table:fileSize')"
show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.TrialFileRecord">{{
scope.row.TrialFileRecord.FileSize
@@ -228,133 +119,52 @@
</template>
</el-table-column>
<!--历史记录-->
<el-table-column
prop="HistoryFileRecord"
:label="$t('trials:trialDocument:fileRecord:table:historyFileRecord')"
show-overflow-tooltip
v-if="isManage && !viewStatus"
>
<el-table-column prop="HistoryFileRecord" :label="$t('trials:trialDocument:fileRecord:table:historyFileRecord')"
show-overflow-tooltip v-if="isManage && !viewStatus">
<template slot-scope="scope">
<div
v-if="
scope.row.HistoryFileRecord &&
scope.row.HistoryFileRecord.TrialFileTypeId
"
style="display: flex; align-items: center"
>
<span class="fileName">{{
scope.row.HistoryFileRecord.FileName
}}</span>
<div v-if="isManage && !viewStatus" class="fileBtnBox">
<i
class="el-icon-download"
v-if="hasDownLoad"
@click.stop="
downLoad(false, scope.row.HistoryFileRecord, 'file')
"
/>
<i
class="el-icon-delete"
v-if="hasDel"
@click.stop="delFile(scope.row, 'History')"
/>
</div>
</div>
<i
v-else-if="isManage && !viewStatus"
class="el-icon-upload2"
style="cursor: pointer; color: #409eff"
@click.stop="upload(scope.row, 'History', ['.zip'])"
/>
<el-button type="text" @click.stop="openHistory(scope.row)">
{{ scope.row.HistoryCount }}
<i class="el-icon-upload2" />
</el-button>
</template>
</el-table-column>
<el-table-column
prop="IsAuthorizedView"
:label="$t('trials:trialDocument:fileRecord:table:isAuthorizedView')"
show-overflow-tooltip
sortable="custom"
v-if="isManage && !viewStatus"
>
<el-table-column prop="IsAuthorizedView" :label="$t('trials:trialDocument:fileRecord:table:isAuthorizedView')"
show-overflow-tooltip sortable="custom" v-if="isManage && !viewStatus">
<template slot-scope="scope">
<el-switch
:disabled="!scope.row.TrialFileRecord"
v-if="isManage && !viewStatus && hasEdit"
v-model="scope.row.IsAuthorizedView"
@change="(val) => auth(false, scope.row, val)"
:active-value="true"
:inactive-value="false"
:active-text="$fd('YesOrNo', true)"
:inactive-text="$fd('YesOrNo', false)"
>
<el-switch :disabled="!scope.row.TrialFileRecord" v-if="isManage && !viewStatus && hasEdit"
v-model="scope.row.IsAuthorizedView" @change="(val) => auth(false, scope.row, val)" :active-value="true"
:inactive-value="false" :active-text="$fd('YesOrNo', true)" :inactive-text="$fd('YesOrNo', false)">
</el-switch>
<span v-else>{{ $fd('YesOrNo', scope.row.IsAuthorizedView) }}</span>
</template>
</el-table-column>
<el-table-column
prop="UpdateTime"
:label="$t('trials:trialDocument:fileRecord:table:updateTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="CreateTime"
:label="$t('trials:trialDocument:fileRecord:table:createTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column prop="UpdateTime" :label="$t('trials:trialDocument:fileRecord:table:updateTime')"
show-overflow-tooltip sortable="custom" />
<el-table-column prop="CreateTime" :label="$t('trials:trialDocument:fileRecord:table:createTime')"
show-overflow-tooltip sortable="custom" />
<el-table-column :label="$t('common:action:action')" width="200">
<template slot-scope="scope">
<el-button
icon="el-icon-view"
:title="$t('common:button:view')"
circle
:disabled="
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
"
@click.stop="preview(scope.row.TrialFileRecord)"
/>
<el-button
v-if="hasDownLoad && isManage && !viewStatus"
icon="el-icon-download"
:title="$t('trials:trialDocument:fileRecord:button:downLoadFile')"
circle
:disabled="
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
"
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
/>
<el-button
v-if="hasDel && isManage && !viewStatus"
icon="el-icon-delete"
:title="$t('trials:trialDocument:fileRecord:button:delete')"
circle
@click.stop="handleDel(scope.row)"
/>
<el-button icon="el-icon-view" :title="$t('common:button:view')" circle :disabled="!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
" @click.stop="preview(scope.row.TrialFileRecord)" />
<el-button v-if="hasDownLoad && isManage && !viewStatus" icon="el-icon-download"
:title="$t('trials:trialDocument:fileRecord:button:downLoadFile')" circle :disabled="!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
" @click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')" />
<el-button v-if="hasDel && isManage && !viewStatus" icon="el-icon-delete"
:title="$t('trials:trialDocument:fileRecord:button:delete')" circle @click.stop="handleDel(scope.row)" />
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<upload-files
:config="config"
:faccept="faccept"
:uploadPath="uploadPath"
:limitLength="limitLength"
v-if="config.visible"
@close="close"
@uplaodFile="uplaodFile"
/>
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
<upload-files :config="config" :faccept="faccept" :uploadPath="uploadPath" :limitLength="limitLength"
v-if="config.visible" @close="close" @uplaodFile="uplaodFile" />
<history-file-list :config="file_config" :rowData="fileData" :uploadPath="uploadPath" @getList="getList" />
</box-content>
</template>
<script>
<script>
import {
addOrUpdateTrialFileType,
getTrialNormalRecordList,
@@ -369,6 +179,7 @@ import { deepClone } from '@/utils/index.js'
import Pagination from '@/components/Pagination'
import BoxContent from '@/components/BoxContent'
import uploadFiles from '../uploadFiles.vue'
import historyFileList from '../historyFileList.vue'
const searchDataDefault = () => {
return {
IsAuthorizedView: null,
@@ -381,7 +192,7 @@ const searchDataDefault = () => {
}
export default {
name: 'fileRecord',
components: { BoxContent, Pagination, uploadFiles },
components: { BoxContent, Pagination, uploadFiles, historyFileList },
props: {
viewStatus: {
type: Boolean,
@@ -426,9 +237,25 @@ export default {
limitLength: 0,
DATA: {},
fileData: {},
file_config: {
visible: false,
title: this.$t('trials:trialDocument:historyFileList:title'),
width: '800px',
}
}
},
methods: {
openHistory(row) {
this.fileData = {
Name: row.TrialFileRecord ? row.TrialFileRecord.FileName : '',
Id: row.Id,
TrialFileTypeId: this.rowData.Id
}
this.file_config.visible = true
},
//
async uplaodFile(list) {
console.log(list, 'list')
@@ -775,7 +602,7 @@ export default {
this.DATA = Object.assign({}, this.rowData)
},
immediate: true,
deep:true
deep: true
},
},
created() {
@@ -823,34 +650,39 @@ export default {
])
},
TITLE() {
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)}${
this.isEN ? this.rowData.Name : this.rowData.NameCN
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)}${this.isEN ? this.rowData.Name : this.rowData.NameCN
}`
},
},
}
</script>
<style lang="scss" scoped>
<style lang="scss" scoped>
.title {
line-height: 40px;
font-weight: bold;
margin-bottom: 10px;
}
.fileName {
display: inline-block;
max-width: calc(100% - 60px);
white-space: nowrap; /* 文本不换行 */
overflow: hidden; /* 超出部分隐藏 */
white-space: nowrap;
/* 文本不换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
margin-right: 3px;
}
.fileBtnBox {
display: inline-block;
width: 50px;
i {
cursor: pointer;
color: #409eff;
margin-right: 3px;
&:last-child {
margin: 0;
}
@@ -0,0 +1,351 @@
<template>
<div v-if="config.visible">
<base-model :config="config">
<template slot="dialog-body">
<el-form ref="form" :model="rowData" label-width="80px" style="width: 80%;display: inline-block;">
<el-form-item :label="`${$t('trials:trialDocument:table:Name')}: `">
<span class="name text-ellipsis" :title="rowData.Name">{{ rowData.Name }}</span>
</el-form-item>
</el-form>
<el-button size="mini" type="primary" style="float:right" @click.stop="openFile(true)">
{{ $t('trials:trialDocument:historyFileList:button:addFolder') }}</el-button>
<div style="float:right;padding: 0 5px;width: 10px;height: 10px;"></div>
<el-button size="mini" type="primary" style="float:right" @click.stop="openFile(false)">
{{ $t('trials:trialDocument:historyFileList:button:addFile') }}</el-button>
<el-table :data="list" style="width: 100%" max-height="300px" v-loading="loading"
@sort-change="handleSortByColumn" @cell-mouse-enter="handleCellMouseEnter">
<el-table-column type="index" width="60" />
<el-table-column prop="FileName" :label="$t('trials:trialDocument:historyFileList:FileName')"
sortable="custom" width="200px">
<template slot-scope="scope">
<div v-if="renameId !== scope.row.Id" class="name_box">
<span class="name" :title="scope.row.FileName">{{ scope.row.FileName }}</span>
<i class="el-icon-edit icon_edit" @click="addRenameId(scope.row)"
:title="$t('trials:trialDocument:historyFileList:icon:rename')" />
</div>
<el-input v-model="scope.row.FileName" :ref="`renameInp_${scope.row.Id}`" :autofocus="true"
class="renameInp" @blur="save(scope.row)" v-else />
</template>
</el-table-column>
<el-table-column prop="FileFormat" :label="$t('trials:trialDocument:historyFileList:FileType')"
sortable="custom" />
<el-table-column prop="FileSize" :label="$t('trials:trialDocument:historyFileList:FileSize')"
sortable="custom">
<template slot-scope="scope">
<span>{{
scope.row.FileSize && scope.row.FileSize > 0
? `${(scope.row.FileSize / 1024 / 1024).toFixed(3)}MB`
: ''
}}</span>
</template>
</el-table-column>
<el-table-column prop="CreateTime" :label="$t('trials:trialDocument:historyFileList:CreateTime')"
sortable="custom" />
<el-table-column :label="$t('common:action:action')" min-width="120px">
<template slot-scope="scope">
<el-button size="mini" type="text" @click.stop="preview(scope.row)">
{{ $t('common:button:preview') }}
</el-button>
<el-button size="mini" type="text" @click.stop="del(scope.row)">
{{ $t('common:button:delete') }}
</el-button>
</template>
</el-table-column>
</el-table>
</template>
</base-model>
<viewer ref="picture_perview4" style="margin: 0 10px"
v-if="rowDATA.FileFormat && ['png', 'jpg', 'jpeg'].includes(rowDATA.FileFormat.toLowerCase())"
:images="[`${OSSclientConfig.basePath}${rowDATA.FilePath}`]" :options="viewerOptions">
<img v-show="false" :src="`${OSSclientConfig.basePath}${rowDATA.FilePath}`" alt="Image" />
</viewer>
<upload-files :config="upload_config" :faccept="faccept" :uploadPath="uploadPath" v-if="upload_config.visible"
@close="close" @uplaodFile="uplaodFile" />
</div>
</template>
<script>
import BaseModel from '@/components/BaseModel'
import uploadFiles from './uploadFiles.vue'
import { addOrUpdateTrialHistoryRecordFile, batchAddTrialHistoryRecordFile, getTrialHistoryRecordFileList, deleteTrialHistoryRecordFile } from '@/api/dictionary'
const defaultSearchData = () => {
return {
PageIndex: 1,
PageSize: 1000,
Asc: false,
OffLine: null,
SortField: null
}
}
export default {
components: {
BaseModel,
uploadFiles
},
props: {
config: {
type: Object,
default: () => {
return {
visible: false,
title: this.$t('trials:trialDocument:historyFileList:title'),
width: '800px',
}
}
},
rowData: {
type: Object,
default: () => {
return {}
}
},
uploadPath: {
type: String,
default: ''
}
},
data() {
return {
searchData: defaultSearchData(),
visible: false,
title: null,
list: [],
rowDATA: {},
loading: false,
viewerOptions: {
toolbar: {
zoomIn: true,
zoomOut: true,
reset: true,
prev: false,
next: false,
rotateLeft: true,
rotateRight: true,
flipHorizontal: true,
flipVertical: true,
}
},
upload_config: {
visible: false,
showClose: true,
width: '800px',
title: '',
appendToBody: false,
isFolder: false,
},
faccept: ['.jpg',
'.jpeg',
'.png',
'.pdf',
'.ppt',
'.pptx',
'.doc',
'.docx',
'.xls',
'.xlsx',
".mp4",
".zip"],
renameId: null
}
},
watch: {
'rowData.Id': {
handler() {
if (this.rowData.Id) {
console.log(this.rowData)
this.getList()
}
},
deep: true,
immediate: true
}
},
methods: {
// hover
handleCellMouseEnter(row) {
this.hoverId = row.Id
},
addRenameId(row) {
this.renameId = row.Id
this.$nextTick(() => {
if (this.$refs[`renameInp_${row.Id}`]) {
this.$refs[`renameInp_${row.Id}`].focus()
}
})
},
close() {
this.upload_config.visible = false
},
getAllList() {
this.getList()
this.$emit("getList")
},
openAudit(row) {
this.form = Object.assign({}, row)
this.visible = true
},
async save(row) {
try {
if (!row.FileName) {
this.$message.warning(this.$t("trials:trialDocument:historyFileList:message:fileNameMust"))
return this.addRenameId(row)
}
this.renameId = null
let res = await addOrUpdateTrialHistoryRecordFile(row)
if (res.IsSuccess) {
this.getList()
}
} catch (err) {
console.log(err)
}
},
async del(row) {
try {
let confirm = await this.$confirm(this.$t("trials:trialDocument:historyFileList:message:del"))
if (!confirm) return false
this.loading = true
let res = await deleteTrialHistoryRecordFile(row.Id)
this.loading = false
if (res.IsSuccess) {
this.getAllList()
}
} catch (err) {
console.log(err)
this.loading = false
}
},
async uplaodFile(list) {
console.log(list, 'list')
try {
let arr = []
list.forEach(item => {
let obj = Object.assign({}, item)
obj.TrialFileTypeId = this.rowData.TrialFileTypeId
obj.TrialRecordId = this.rowData.Id
arr.push(obj)
});
this.loading = true
let res = await batchAddTrialHistoryRecordFile(arr)
this.loading = false
if (res.IsSuccess) {
this.getAllList()
}
} catch (err) {
this.loading = false
console.log(err)
}
},
openFile(isFolder = false) {
this.upload_config.title = this.$t(
'trials:trialDocument:fileRecord:form:title:uploadFile'
)
this.upload_config.visible = true
this.upload_config.isFolder = isFolder
},
async getList() {
try {
if (!this.rowData.Id) return false
this.searchData.TrialRecordId = this.rowData.Id
let res = await getTrialHistoryRecordFileList(this.searchData)
this.loading = false
if (res.IsSuccess) {
this.list = res.Result.CurrentPageData
}
} catch (err) {
this.loading = false
console.log(err)
}
},
preview(data) {
// return this.perview_visible = true
this.rowDATA = Object.assign({}, data)
if (['.ppt',
'.pptx',
'.doc',
'.docx',
'.xls',
'.xlsx'].includes(`.${data.FileFormat.toLowerCase()}`)) {
this.$onlyOffice({
path: data.FilePath,
type: data.FileFormat,
title: data.Name
})
}
if (['.jpg',
'.jpeg',
'.png'].includes(`.${data.FileFormat.toLowerCase()}`)) {
this.$nextTick(() => {
this.$refs['picture_perview4'].$viewer.show()
})
}
if (['.pdf'].includes(`.${data.FileFormat.toLowerCase()}`)) {
this.$preview({
path: data.Path || data.FilePath,
type: 'pdf',
title: data.Name,
})
}
if (['.mp4'].includes(`.${data.FileFormat.toLowerCase()}`)) {
this.$video({
path: data.Path || data.FilePath,
type: 'mp4',
title: data.Name,
})
}
},
//
handleSortByColumn(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
} else {
this.searchData.Asc = false
}
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
},
}
}
</script>
<style lang="scss" scoped>
.name {
display: block;
width: 90%;
}
.name_box {
display: flex;
align-items: center;
width: calc(100% - 20px);
.name {
max-width: calc(100% - 60px);
white-space: nowrap;
/* 文本不换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
}
}
.icon_edit {
cursor: pointer;
color: rgba(0, 0, 0, 0.3);
margin-left: 2px;
&:hover {
color: rgba(0, 0, 0, 0.5);
}
}
.renameInp {
::v-deep .el-input__inner {
line-height: 23px;
height: 23px;
}
}
</style>
@@ -1,131 +1,64 @@
<template>
<base-model :config="config">
<div slot="dialog-body">
<el-form
ref="reportDocForm"
:model="form"
label-width="140px"
size="small"
:rules="rules"
>
<el-form ref="reportDocForm" :model="form" label-width="140px" size="small" :rules="rules">
<div class="base-dialog-body">
<el-form-item
v-if="!config.upload"
:label="$t('trials:trialDocument:reportDoc:form:name')"
prop="Name"
>
<el-form-item v-if="!config.upload" :label="$t('trials:trialDocument:reportDoc:form:name')" prop="Name">
<el-input v-model="form.Name" />
</el-form-item>
<el-form-item
v-if="!config.upload"
:label="$t('trials:trialDocument:reportDoc:form:version')"
prop="Version"
>
<el-form-item v-if="!config.upload" :label="$t('trials:trialDocument:reportDoc:form:version')" prop="Version">
<el-input v-model="form.Version" />
</el-form-item>
<el-form-item
v-if="!config.upload"
:label="$t('trials:trialDocument:reportDoc:form:isAuthorizedView')"
prop="IsAuthorizedView"
>
<el-switch
v-model="form.IsAuthorizedView"
:active-value="true"
:inactive-value="false"
:active-text="$fd('YesOrNo', true)"
:inactive-text="$fd('YesOrNo', false)"
>
<el-form-item v-if="!config.upload" :label="$t('trials:trialDocument:reportDoc:form:isAuthorizedView')"
prop="IsAuthorizedView">
<el-switch v-model="form.IsAuthorizedView" :active-value="true" :inactive-value="false"
:active-text="$fd('YesOrNo', true)" :inactive-text="$fd('YesOrNo', false)">
</el-switch>
</el-form-item>
<el-form-item
v-if="!config.upload || config.upload === 'PDF'"
:label="$t('trials:trialDocument:reportDoc:form:pdfFileRecord')"
prop="PDFFileRecord"
>
<el-upload
class="upload-demo"
action
:before-upload="(param) => beforeUpload(param, 'PDF', '.pdf')"
:http-request="(param) => handleUploadFile(param, 'PDF')"
:on-remove="() => handleRemoveFile('PDF')"
:limit="1"
accept=".pdf"
:file-list="PDFFile"
>
<el-button
size="small"
type="primary"
:disabled="
!!form.PDFFileRecord && !!form.PDFFileRecord.FilePath
"
>{{ $t('common:button:upload') }}
<el-form-item v-if="!config.upload || config.upload === 'PDF'"
:label="$t('trials:trialDocument:reportDoc:form:pdfFileRecord')" prop="PDFFileRecord">
<el-upload class="upload-demo" action :before-upload="(param) => beforeUpload(param, 'PDF', '.pdf')"
:http-request="(param) => handleUploadFile(param, 'PDF')" :on-remove="() => handleRemoveFile('PDF')"
:limit="1" accept=".pdf" :file-list="PDFFile">
<el-button size="small" type="primary" :disabled="!!form.PDFFileRecord && !!form.PDFFileRecord.FilePath
">{{ $t('common:button:upload') }}
</el-button>
<span slot="tip" class="el-upload__tip">
{{ $t('trials:trialDocument:reportDoc:rule:mustPDF') }}
</span>
</el-upload>
</el-form-item>
<el-form-item
v-if="!config.upload || config.upload === 'Word'"
:label="$t('trials:trialDocument:reportDoc:form:wordFileRecord')"
>
<el-upload
class="upload-demo"
action
:before-upload="(param) => beforeUpload(param, 'Word', '.docx')"
:http-request="(param) => handleUploadFile(param, 'Word')"
:on-remove="() => handleRemoveFile('Word')"
:limit="1"
accept=".docx"
:file-list="WordFile"
>
<el-button
size="small"
type="primary"
:disabled="
!!form.WordFileRecord && !!form.WordFileRecord.FilePath
"
>{{ $t('common:button:upload') }}
<el-form-item v-if="!config.upload || config.upload === 'Word'"
:label="$t('trials:trialDocument:reportDoc:form:wordFileRecord')">
<el-upload class="upload-demo" action :before-upload="(param) => beforeUpload(param, 'Word', '.docx')"
:http-request="(param) => handleUploadFile(param, 'Word')" :on-remove="() => handleRemoveFile('Word')"
:limit="1" accept=".docx" :file-list="WordFile">
<el-button size="small" type="primary" :disabled="!!form.WordFileRecord && !!form.WordFileRecord.FilePath
">{{ $t('common:button:upload') }}
</el-button>
<span slot="tip" class="el-upload__tip">
{{ $t('trials:trialDocument:reportDoc:rule:mustDOCX') }}
</span>
</el-upload>
</el-form-item>
<el-form-item
v-if="!config.upload || config.upload === 'Sign'"
:label="$t('trials:trialDocument:reportDoc:form:signFileRecord')"
:prop="
rowData.IsConfirmRecord &&
<el-form-item v-if="!config.upload || config.upload === 'Sign'"
:label="$t('trials:trialDocument:reportDoc:form:signFileRecord')" :prop="rowData.IsConfirmRecord &&
(!config.upload || config.upload === 'Sign')
? 'SignFileRecord'
: ''
"
>
<el-upload
class="upload-demo"
action
:before-upload="(param) => beforeUpload(param, 'Sign', '.pdf')"
:http-request="(param) => handleUploadFile(param, 'Sign')"
:on-remove="() => handleRemoveFile('Sign')"
:limit="1"
accept=".pdf"
:file-list="SignFile"
>
<el-button
size="small"
type="primary"
:disabled="
!!form.SignFileRecord && !!form.SignFileRecord.FilePath
"
>{{ $t('common:button:upload') }}
">
<el-upload class="upload-demo" action :before-upload="(param) => beforeUpload(param, 'Sign', '.pdf')"
:http-request="(param) => handleUploadFile(param, 'Sign')" :on-remove="() => handleRemoveFile('Sign')"
:limit="1" accept=".pdf" :file-list="SignFile">
<el-button size="small" type="primary" :disabled="!!form.SignFileRecord && !!form.SignFileRecord.FilePath
">{{ $t('common:button:upload') }}
</el-button>
<span slot="tip" class="el-upload__tip">
{{ $t('trials:trialDocument:reportDoc:rule:mustPDF') }}
</span>
</el-upload>
</el-form-item>
<el-form-item
<!-- <el-form-item
v-if="!config.upload || config.upload === 'History'"
:label="$t('trials:trialDocument:reportDoc:form:historyFileRecord')"
>
@@ -151,7 +84,7 @@
{{ $t('trials:trialDocument:reportDoc:rule:mustZIP') }}
</span>
</el-upload>
</el-form-item>
</el-form-item> -->
</div>
</el-form>
</div>
@@ -165,7 +98,7 @@
</div>
</base-model>
</template>
<script>
<script>
import baseModel from '@/components/BaseModel'
import { addOrUpdateTrialFinalRecord } from '@/api/dictionary'
export default {
@@ -4,65 +4,30 @@
{{ TITLE }}
</div>
<el-form :inline="true" class="base-search-form topForm">
<el-form-item
:label="$t('trials:trialDocument:reportDoc:form:firstFinalDate')"
>
<el-date-picker
:disabled="!isManage || rowBtnStatus === 'edit'"
v-model="DATA.FirstFinalDate"
type="date"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder=""
>
<el-form-item :label="$t('trials:trialDocument:reportDoc:form:firstFinalDate')">
<el-date-picker :disabled="!isManage || rowBtnStatus === 'edit'" v-model="DATA.FirstFinalDate" type="date"
value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="">
</el-date-picker>
</el-form-item>
<el-form-item
:label="$t('trials:trialDocument:reportDoc:form:isConfirmRecord')"
v-if="isManage && hasEdit && !viewStatus"
>
<el-radio-group
v-model="DATA.IsConfirmRecord"
:disabled="rowBtnStatus === 'edit'"
>
<el-radio
:label="item.value"
v-for="item in $d.YesOrNo"
:key="item.id"
>{{ item.label }}
<el-form-item :label="$t('trials:trialDocument:reportDoc:form:isConfirmRecord')"
v-if="isManage && hasEdit && !viewStatus">
<el-radio-group v-model="DATA.IsConfirmRecord" :disabled="rowBtnStatus === 'edit'">
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
:label="$t('trials:trialDocument:reportDoc:form:isEnable')"
v-if="isManage && hasEdit && !viewStatus"
>
<el-radio-group
v-model="DATA.IsEnable"
:disabled="rowBtnStatus === 'edit'"
>
<el-radio
:label="item.value"
v-for="item in $d.YesOrNo"
:key="item.id"
>{{ item.label }}
<el-form-item :label="$t('trials:trialDocument:reportDoc:form:isEnable')"
v-if="isManage && hasEdit && !viewStatus">
<el-radio-group v-model="DATA.IsEnable" :disabled="rowBtnStatus === 'edit'">
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="isManage && hasEdit && !viewStatus">
<el-button
type="primary"
@click="rowBtnStatus = 'save'"
v-if="rowBtnStatus === 'edit'"
>
<el-button type="primary" @click="rowBtnStatus = 'save'" v-if="rowBtnStatus === 'edit'">
{{ $t('common:button:edit') }}
</el-button>
<el-button
type="primary"
:loading="rowBtnLoading"
@click="saveRowData"
v-if="rowBtnStatus === 'save'"
>
<el-button type="primary" :loading="rowBtnLoading" @click="saveRowData" v-if="rowBtnStatus === 'save'">
{{ $t('common:button:save') }}
</el-button>
</el-form-item>
@@ -74,32 +39,14 @@
<el-form-item :label="$t('trials:trialDocument:reportDoc:search:name')">
<el-input v-model="searchData.Name" style="width: 100px" clearable />
</el-form-item>
<el-form-item
:label="$t('trials:trialDocument:reportDoc:search:version')"
>
<el-input
v-model="searchData.Version"
style="width: 100px"
clearable
/>
<el-form-item :label="$t('trials:trialDocument:reportDoc:search:version')">
<el-input v-model="searchData.Version" style="width: 100px" clearable />
</el-form-item>
<el-form-item
:label="$t('trials:trialDocument:reportDoc:search:isAuthorizedView')"
v-if="isManage && !viewStatus"
>
<el-select
v-if="!viewStatus"
v-model="searchData.IsAuthorizedView"
style="width: 100px"
placeholder=""
clearable
>
<el-option
v-for="item in $d.YesOrNo"
:key="item.id"
:label="item.label"
:value="item.value"
>
<el-form-item :label="$t('trials:trialDocument:reportDoc:search:isAuthorizedView')"
v-if="isManage && !viewStatus">
<el-select v-if="!viewStatus" v-model="searchData.IsAuthorizedView" style="width: 100px" placeholder=""
clearable>
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
@@ -107,321 +54,143 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
</el-button>
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
<el-form-item v-if="isManage && !viewStatus">
<el-button
type="primary"
:disabled="selectTable.length <= 0"
v-if="hasAccredit && isManage && !viewStatus"
@click.stop="auth"
>
<el-button type="primary" :disabled="selectTable.length <= 0" v-if="hasAccredit && isManage && !viewStatus"
@click.stop="auth">
{{ $t('trials:trialDocument:reportDoc:button:accredit') }}
</el-button>
<el-button
type="primary"
v-if="hasAdd && isManage && !viewStatus"
@click.stop="handleAdd"
>
<el-button type="primary" v-if="hasAdd && isManage && !viewStatus" @click.stop="handleAdd">
{{ $t('trials:trialDocument:reportDoc:button:add') }}
</el-button>
<el-button
type="primary"
icon="el-icon-bottom"
:disabled="selectTable.length <= 0"
v-if="hasDownLoad && isManage && !viewStatus"
@click.stop="downLoad"
>
<el-button type="primary" icon="el-icon-bottom" :disabled="selectTable.length <= 0"
v-if="hasDownLoad && isManage && !viewStatus" @click.stop="downLoad">
{{ $t('trials:trialDocument:reportDoc:button:downLoadFile') }}
</el-button>
</el-form-item>
</el-form>
</div>
<el-table
v-loading="loading"
v-adaptive="{ bottomOffset: 75 }"
:data="list"
stripe
height="100"
style="width: 100%"
@sort-change="handleSortByColumn"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
v-if="isManage && !viewStatus"
/>
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100" style="width: 100%"
@sort-change="handleSortByColumn" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" v-if="isManage && !viewStatus" />
<el-table-column type="index" v-else />
<el-table-column
prop="Name"
:label="$t('trials:trialDocument:reportDoc:table:name')"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column
prop="Version"
:label="$t('trials:trialDocument:reportDoc:table:version')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column prop="Name" :label="$t('trials:trialDocument:reportDoc:table:name')" sortable="custom"
show-overflow-tooltip />
<el-table-column prop="Version" :label="$t('trials:trialDocument:reportDoc:table:version')" show-overflow-tooltip
sortable="custom" />
<!--定稿PDF-->
<el-table-column
prop="PDFFileRecord"
:label="$t('trials:trialDocument:reportDoc:table:pdfFileRecord')"
show-overflow-tooltip
>
<el-table-column prop="PDFFileRecord" :label="$t('trials:trialDocument:reportDoc:table:pdfFileRecord')"
show-overflow-tooltip>
<template slot-scope="scope">
<div
v-if="
<div v-if="
scope.row.PDFFileRecord && scope.row.PDFFileRecord.TrialFileTypeId
"
style="display: flex; align-items: center"
>
" style="display: flex; align-items: center">
<span class="fileName">{{ scope.row.PDFFileRecord.FileName }}</span>
<div v-if="isManage && !viewStatus" class="fileBtnBox">
<i
class="el-icon-view"
@click.stop="preview(scope.row.PDFFileRecord)"
/>
<i
class="el-icon-download"
v-if="hasDownLoad"
@click.stop="downLoad(false, scope.row.PDFFileRecord, 'file')"
/>
<i
class="el-icon-delete"
v-if="hasDel"
@click.stop="delFile(scope.row, 'PDF')"
/>
<i class="el-icon-view" @click.stop="preview(scope.row.PDFFileRecord)" />
<i class="el-icon-download" v-if="hasDownLoad"
@click.stop="downLoad(false, scope.row.PDFFileRecord, 'file')" />
<i class="el-icon-delete" v-if="hasDel" @click.stop="delFile(scope.row, 'PDF')" />
</div>
</div>
<i
v-else-if="isManage && !viewStatus && hasEdit"
class="el-icon-upload2"
style="cursor: pointer; color: #409eff"
@click.stop="upload(scope.row, 'PDF')"
/>
<i v-else-if="isManage && !viewStatus && hasEdit" class="el-icon-upload2"
style="cursor: pointer; color: #409eff" @click.stop="upload(scope.row, 'PDF')" />
</template>
</el-table-column>
<!--定稿WORD-->
<el-table-column
prop="WordFileRecord"
:label="$t('trials:trialDocument:reportDoc:table:wordFileRecord')"
show-overflow-tooltip
v-if="isManage && !viewStatus"
>
<el-table-column prop="WordFileRecord" :label="$t('trials:trialDocument:reportDoc:table:wordFileRecord')"
show-overflow-tooltip v-if="isManage && !viewStatus">
<template slot-scope="scope">
<div
v-if="
<div v-if="
scope.row.WordFileRecord &&
scope.row.WordFileRecord.TrialFileTypeId
"
style="display: flex; align-items: center"
>
" style="display: flex; align-items: center">
<span class="fileName">{{
scope.row.WordFileRecord.FileName
}}</span>
<div v-if="isManage && !viewStatus" class="fileBtnBox">
<i
class="el-icon-download"
v-if="hasDownLoad"
@click.stop="downLoad(false, scope.row.WordFileRecord, 'file')"
/>
<i
class="el-icon-delete"
v-if="hasDel"
@click.stop="delFile(scope.row, 'Word')"
/>
<i class="el-icon-download" v-if="hasDownLoad"
@click.stop="downLoad(false, scope.row.WordFileRecord, 'file')" />
<i class="el-icon-delete" v-if="hasDel" @click.stop="delFile(scope.row, 'Word')" />
</div>
</div>
<i
v-else-if="isManage && !viewStatus && hasEdit"
class="el-icon-upload2"
style="cursor: pointer; color: #409eff"
@click.stop="upload(scope.row, 'Word')"
/>
<i v-else-if="isManage && !viewStatus && hasEdit" class="el-icon-upload2"
style="cursor: pointer; color: #409eff" @click.stop="upload(scope.row, 'Word')" />
</template>
</el-table-column>
<!--签字页-->
<el-table-column
prop="SignFileRecord"
:label="$t('trials:trialDocument:reportDoc:table:signFileRecord')"
show-overflow-tooltip
v-if="isManage && !viewStatus"
>
<el-table-column prop="SignFileRecord" :label="$t('trials:trialDocument:reportDoc:table:signFileRecord')"
show-overflow-tooltip v-if="isManage && !viewStatus">
<template slot-scope="scope">
<div
v-if="
<div v-if="
scope.row.SignFileRecord &&
scope.row.SignFileRecord.TrialFileTypeId
"
style="display: flex; align-items: center"
>
" style="display: flex; align-items: center">
<span class="fileName">{{
scope.row.SignFileRecord.FileName
}}</span>
<div v-if="isManage && !viewStatus" class="fileBtnBox">
<i
class="el-icon-view"
@click.stop="preview(scope.row.SignFileRecord)"
/>
<i
class="el-icon-download"
v-if="hasDownLoad"
@click.stop="downLoad(false, scope.row.SignFileRecord, 'file')"
/>
<i
class="el-icon-delete"
v-if="hasDel"
@click.stop="delFile(scope.row, 'Sign')"
/>
<i class="el-icon-view" @click.stop="preview(scope.row.SignFileRecord)" />
<i class="el-icon-download" v-if="hasDownLoad"
@click.stop="downLoad(false, scope.row.SignFileRecord, 'file')" />
<i class="el-icon-delete" v-if="hasDel" @click.stop="delFile(scope.row, 'Sign')" />
</div>
</div>
<i
v-else-if="isManage && !viewStatus && hasEdit"
class="el-icon-upload2"
style="cursor: pointer; color: #409eff"
@click.stop="upload(scope.row, 'Sign')"
/>
<i v-else-if="isManage && !viewStatus && hasEdit" class="el-icon-upload2"
style="cursor: pointer; color: #409eff" @click.stop="upload(scope.row, 'Sign')" />
</template>
</el-table-column>
<!--历史记录-->
<el-table-column
prop="HistoryFileRecord"
:label="$t('trials:trialDocument:reportDoc:table:historyFileRecord')"
show-overflow-tooltip
v-if="isManage && !viewStatus"
>
<el-table-column prop="HistoryFileRecord" :label="$t('trials:trialDocument:reportDoc:table:historyFileRecord')"
show-overflow-tooltip v-if="isManage && !viewStatus">
<template slot-scope="scope">
<div
v-if="
scope.row.HistoryFileRecord &&
scope.row.HistoryFileRecord.TrialFileTypeId
"
style="display: flex; align-items: center"
>
<span class="fileName">{{
scope.row.HistoryFileRecord.FileName
}}</span>
<div v-if="isManage && !viewStatus" class="fileBtnBox">
<i
class="el-icon-download"
v-if="hasDownLoad"
@click.stop="
downLoad(false, scope.row.HistoryFileRecord, 'file')
"
/>
<i
class="el-icon-delete"
v-if="hasDel"
@click.stop="delFile(scope.row, 'History')"
/>
</div>
</div>
<i
v-else-if="isManage && !viewStatus && hasEdit"
class="el-icon-upload2"
style="cursor: pointer; color: #409eff"
@click.stop="upload(scope.row, 'History')"
/>
<el-button type="text" @click.stop="openHistory(scope.row)">
{{ scope.row.HistoryCount }}
<i class="el-icon-upload2" />
</el-button>
</template>
</el-table-column>
<el-table-column
prop="IsAuthorizedView"
:label="$t('trials:trialDocument:reportDoc:table:isAuthorizedView')"
show-overflow-tooltip
sortable="custom"
v-if="isManage && !viewStatus"
>
<el-table-column prop="IsAuthorizedView" :label="$t('trials:trialDocument:reportDoc:table:isAuthorizedView')"
show-overflow-tooltip sortable="custom" v-if="isManage && !viewStatus">
<template slot-scope="scope">
<el-switch
v-if="isManage && !viewStatus && hasEdit"
v-model="scope.row.IsAuthorizedView"
@change="(val) => auth(false, scope.row, val)"
:active-value="true"
:inactive-value="false"
:active-text="$fd('YesOrNo', true)"
:inactive-text="$fd('YesOrNo', false)"
>
<el-switch v-if="isManage && !viewStatus && hasEdit" v-model="scope.row.IsAuthorizedView"
@change="(val) => auth(false, scope.row, val)" :active-value="true" :inactive-value="false"
:active-text="$fd('YesOrNo', true)" :inactive-text="$fd('YesOrNo', false)">
</el-switch>
<span v-else>{{ $fd('YesOrNo', scope.row.IsAuthorizedView) }}</span>
</template>
</el-table-column>
<el-table-column
prop="UpdateTime"
:label="$t('trials:trialDocument:reportDoc:table:updateTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="CreateTime"
:label="$t('trials:trialDocument:reportDoc:table:createTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column prop="UpdateTime" :label="$t('trials:trialDocument:reportDoc:table:updateTime')"
show-overflow-tooltip sortable="custom" />
<el-table-column prop="CreateTime" :label="$t('trials:trialDocument:reportDoc:table:createTime')"
show-overflow-tooltip sortable="custom" />
<el-table-column :label="$t('common:action:action')" width="200">
<template slot-scope="scope">
<el-button
icon="el-icon-view"
:title="$t('common:button:view')"
circle
:disabled="
!scope.row.PDFFileRecord || !scope.row.PDFFileRecord.FilePath
"
@click.stop="preview(scope.row.PDFFileRecord)"
/>
<el-button
v-if="hasEdit && isManage && !viewStatus"
icon="el-icon-edit-outline"
:title="$t('common:button:edit')"
circle
@click.stop="handleEdit(scope.row)"
/>
<el-button
v-if="hasDownLoad && isManage && !viewStatus"
icon="el-icon-download"
:title="$t('trials:trialDocument:reportDoc:button:download')"
circle
@click.stop="downLoad(false, scope.row)"
/>
<el-button
v-if="hasDel && isManage && !viewStatus"
icon="el-icon-delete"
:title="$t('trials:trialDocument:reportDoc:button:delete')"
circle
@click.stop="handleDel(scope.row)"
/>
<el-button icon="el-icon-view" :title="$t('common:button:view')" circle :disabled="!scope.row.PDFFileRecord || !scope.row.PDFFileRecord.FilePath
" @click.stop="preview(scope.row.PDFFileRecord)" />
<el-button v-if="hasEdit && isManage && !viewStatus" icon="el-icon-edit-outline"
:title="$t('common:button:edit')" circle @click.stop="handleEdit(scope.row)" />
<el-button v-if="hasDownLoad && isManage && !viewStatus" icon="el-icon-download"
:title="$t('trials:trialDocument:reportDoc:button:download')" circle
@click.stop="downLoad(false, scope.row)" />
<el-button v-if="hasDel && isManage && !viewStatus" icon="el-icon-delete"
:title="$t('trials:trialDocument:reportDoc:button:delete')" circle @click.stop="handleDel(scope.row)" />
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<reportDoc-form
:ArchiveTypeEnum="ArchiveTypeEnum"
:rowData="rowData"
:config="config"
:data="selectData"
v-if="config.visible"
@close="close"
@getList="getList"
/>
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
<reportDoc-form :ArchiveTypeEnum="ArchiveTypeEnum" :rowData="rowData" :config="config" :data="selectData"
v-if="config.visible" @close="close" @getList="getList" />
<history-file-list :config="file_config" :rowData="fileData" :uploadPath="uploadPath" @getList="getList" />
</box-content>
</template>
<script>
@@ -437,6 +206,7 @@ import { deepClone } from '@/utils/index.js'
import Pagination from '@/components/Pagination'
import BoxContent from '@/components/BoxContent'
import reportDocForm from './form.vue'
import historyFileList from '../historyFileList.vue'
const searchDataDefault = () => {
return {
IsAuthorizedView: null,
@@ -450,7 +220,7 @@ const searchDataDefault = () => {
}
export default {
name: 'reportDoc',
components: { BoxContent, Pagination, reportDocForm },
components: { BoxContent, Pagination, reportDocForm, historyFileList },
props: {
viewStatus: {
type: Boolean,
@@ -491,9 +261,30 @@ export default {
},
selectData: {},
DATA: {},
fileData: {},
file_config: {
visible: false,
title: this.$t('trials:trialDocument:historyFileList:title'),
width: '800px',
},
uploadPath: null
}
},
created() {
let typeArr = ['', 'Report', 'Doc', 'Record', 'Reviewer', 'Template']
let types = typeArr[this.ArchiveTypeEnum]
this.uploadPath = `/${this.$route.query.trialId}/Document/${types}`
},
methods: {
openHistory(row) {
this.fileData = {
Name: row.Name,
Id: row.Id,
TrialFileTypeId: this.rowData.Id
}
this.file_config.visible = true
},
//
upload(row, key) {
this.selectData = deepClone(row)
@@ -771,7 +562,7 @@ export default {
this.DATA = Object.assign({}, this.rowData)
},
immediate: true,
deep:true
deep: true
},
},
computed: {
@@ -814,8 +605,7 @@ export default {
])
},
TITLE() {
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)}${
this.isEN ? this.rowData.Name : this.rowData.NameCN
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)}${this.isEN ? this.rowData.Name : this.rowData.NameCN
}`
},
},
@@ -827,21 +617,27 @@ export default {
font-weight: bold;
margin-bottom: 10px;
}
.fileName {
display: inline-block;
max-width: calc(100% - 60px);
white-space: nowrap; /* 文本不换行 */
overflow: hidden; /* 超出部分隐藏 */
white-space: nowrap;
/* 文本不换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
margin-right: 3px;
}
.fileBtnBox {
display: inline-block;
width: 50px;
i {
cursor: pointer;
color: #409eff;
margin-right: 3px;
&:last-child {
margin: 0;
}
@@ -33,7 +33,7 @@
</span>
</el-upload>
</el-form-item>
<el-form-item v-if="!config.upload || config.upload === 'History'" :label="$t('trials:trialDocument:trainRecord:form:historyFileRecord')
<!-- <el-form-item v-if="!config.upload || config.upload === 'History'" :label="$t('trials:trialDocument:trainRecord:form:historyFileRecord')
">
<el-upload class="upload-demo" action :before-upload="(param) => beforeUpload(param, 'History', '.zip')"
:http-request="(param) => handleUploadFile(param, 'History')"
@@ -45,7 +45,7 @@
{{ $t('trials:trialDocument:trainRecord:rule:mustZIP') }}
</span>
</el-upload>
</el-form-item>
</el-form-item> -->
</div>
</el-form>
</div>
@@ -4,52 +4,25 @@
{{ TITLE }}
</div>
<el-form :inline="true" class="base-search-form topForm">
<el-form-item
:label="$t('trials:trialDocument:trainRecord:form:isConfirmRecord')"
v-if="isManage && hasEdit && !viewStatus"
>
<el-radio-group
v-model="DATA.IsConfirmRecord"
:disabled="rowBtnStatus === 'edit'"
>
<el-radio
:label="item.value"
v-for="item in $d.YesOrNo"
:key="item.id"
>{{ item.label }}
<el-form-item :label="$t('trials:trialDocument:trainRecord:form:isConfirmRecord')"
v-if="isManage && hasEdit && !viewStatus">
<el-radio-group v-model="DATA.IsConfirmRecord" :disabled="rowBtnStatus === 'edit'">
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
:label="$t('trials:trialDocument:trainRecord:form:isEnable')"
v-if="isManage && hasEdit && !viewStatus"
>
<el-radio-group
v-model="DATA.IsEnable"
:disabled="rowBtnStatus === 'edit'"
>
<el-radio
:label="item.value"
v-for="item in $d.YesOrNo"
:key="item.id"
>{{ item.label }}
<el-form-item :label="$t('trials:trialDocument:trainRecord:form:isEnable')"
v-if="isManage && hasEdit && !viewStatus">
<el-radio-group v-model="DATA.IsEnable" :disabled="rowBtnStatus === 'edit'">
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="isManage && hasEdit && !viewStatus">
<el-button
type="primary"
@click="rowBtnStatus = 'save'"
v-if="rowBtnStatus === 'edit'"
>
<el-button type="primary" @click="rowBtnStatus = 'save'" v-if="rowBtnStatus === 'edit'">
{{ $t('common:button:edit') }}
</el-button>
<el-button
type="primary"
:loading="rowBtnLoading"
@click="saveRowData"
v-if="rowBtnStatus === 'save'"
>
<el-button type="primary" :loading="rowBtnLoading" @click="saveRowData" v-if="rowBtnStatus === 'save'">
{{ $t('common:button:save') }}
</el-button>
</el-form-item>
@@ -59,371 +32,155 @@
<div class="search" style="position: relative">
<el-form :inline="true" class="base-search-form">
<!--培训日期-->
<el-form-item
:label="$t('trials:trialDocument:trainRecord:search:TrianingDate')"
>
<el-date-picker
style="width: 240px"
v-model="TrianingDate"
type="daterange"
:range-separator="$t('baseForm:daterange:rangeSeparator')"
start-placeholder=""
end-placeholder=""
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
>
<el-form-item :label="$t('trials:trialDocument:trainRecord:search:TrianingDate')">
<el-date-picker style="width: 240px" v-model="TrianingDate" type="daterange"
:range-separator="$t('baseForm:daterange:rangeSeparator')" start-placeholder="" end-placeholder=""
format="yyyy-MM-dd" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item
:label="$t('trials:trialDocument:trainRecord:search:name')"
>
<el-input
v-model="searchData.FileName"
style="width: 100px"
clearable
/>
<el-form-item :label="$t('trials:trialDocument:trainRecord:search:name')">
<el-input v-model="searchData.FileName" style="width: 100px" clearable />
</el-form-item>
<el-form-item
:label="
$t('trials:trialDocument:trainRecord:search:isAuthorizedView')
"
v-if="isManage && !viewStatus"
>
<el-select
v-if="!viewStatus"
v-model="searchData.IsAuthorizedView"
style="width: 100px"
placeholder=""
clearable
>
<el-option
v-for="item in $d.YesOrNo"
:key="item.id"
:label="item.label"
:value="item.value"
>
<el-form-item :label="$t('trials:trialDocument:trainRecord:search:isAuthorizedView')
" v-if="isManage && !viewStatus">
<el-select v-if="!viewStatus" v-model="searchData.IsAuthorizedView" style="width: 100px" placeholder=""
clearable>
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<!--更新时间-->
<el-form-item
:label="$t('trials:trialDocument:trainRecord:search:UpdateTime')"
style="margin-bottom: 10px"
>
<el-date-picker
style="width: 240px"
v-model="UpdateTime"
type="daterange"
:range-separator="$t('baseForm:daterange:rangeSeparator')"
start-placeholder=""
end-placeholder=""
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
>
<el-form-item :label="$t('trials:trialDocument:trainRecord:search:UpdateTime')" style="margin-bottom: 10px">
<el-date-picker style="width: 240px" v-model="UpdateTime" type="daterange"
:range-separator="$t('baseForm:daterange:rangeSeparator')" start-placeholder="" end-placeholder=""
format="yyyy-MM-dd" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
</el-button>
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
<el-form-item v-if="isManage && !viewStatus">
<el-button
type="primary"
:disabled="selectTable.length <= 0"
v-if="hasAccredit && isManage && !viewStatus"
@click.stop="auth"
>
<el-button type="primary" :disabled="selectTable.length <= 0" v-if="hasAccredit && isManage && !viewStatus"
@click.stop="auth">
{{ $t('trials:trialDocument:trainRecord:button:accredit') }}
</el-button>
<el-button
type="primary"
v-if="hasEdit && isManage && !viewStatus"
@click.stop="openFile(false)"
>
<el-button type="primary" v-if="hasEdit && isManage && !viewStatus" @click.stop="openFile(false)">
{{ $t('trials:trialDocument:trainRecord:button:uploadFile') }}
</el-button>
<el-button
type="primary"
v-if="hasEdit && isManage && !viewStatus"
@click.stop="openFile(true)"
>
<el-button type="primary" v-if="hasEdit && isManage && !viewStatus" @click.stop="openFile(true)">
{{ $t('trials:trialDocument:trainRecord:button:uploadFolder') }}
</el-button>
<el-button
type="primary"
v-if="hasAdd && isManage && !viewStatus"
@click.stop="handleAdd"
>
<el-button type="primary" v-if="hasAdd && isManage && !viewStatus" @click.stop="handleAdd">
{{ $t('trials:trialDocument:trainRecord:button:add') }}
</el-button>
<el-button
type="primary"
icon="el-icon-bottom"
:disabled="selectTable.length <= 0"
v-if="hasDownLoad && isManage && !viewStatus"
@click.stop="downLoad"
>
<el-button type="primary" icon="el-icon-bottom" :disabled="selectTable.length <= 0"
v-if="hasDownLoad && isManage && !viewStatus" @click.stop="downLoad">
{{ $t('trials:trialDocument:trainRecord:button:downLoadFile') }}
</el-button>
</el-form-item>
</el-form>
</div>
<el-table
v-loading="loading"
v-adaptive="{ bottomOffset: 75 }"
:data="list"
stripe
height="100"
style="width: 100%"
@sort-change="handleSortByColumn"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
v-if="isManage && !viewStatus"
/>
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100" style="width: 100%"
@sort-change="handleSortByColumn" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" v-if="isManage && !viewStatus" />
<el-table-column type="index" v-else />
<el-table-column
prop="TrianingDate"
:label="$t('trials:trialDocument:trainRecord:table:TrianingDate')"
show-overflow-tooltip
sortable="custom"
>
<el-table-column prop="TrianingDate" :label="$t('trials:trialDocument:trainRecord:table:TrianingDate')"
show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
<el-tooltip
v-if="!scope.row.TrianingDate"
class="item"
effect="dark"
:content="$t('trials:trialDocument:trainRecord:tip:noTrianingDate')"
placement="top"
>
<i
class="el-icon-warning"
style="cursor: pointer; color: #f56c6c"
></i>
<el-tooltip v-if="!scope.row.TrianingDate" class="item" effect="dark"
:content="$t('trials:trialDocument:trainRecord:tip:noTrianingDate')" placement="top">
<i class="el-icon-warning" style="cursor: pointer; color: #f56c6c"></i>
</el-tooltip>
<span v-else>{{ scope.row.TrianingDate }}</span>
</template>
</el-table-column>
<el-table-column
prop="TrianingCount"
:label="$t('trials:trialDocument:trainRecord:table:TrianingCount')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="TrianingState"
:label="$t('trials:trialDocument:trainRecord:table:TrianingState')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="Note"
:label="$t('trials:trialDocument:trainRecord:table:Note')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column prop="TrianingCount" :label="$t('trials:trialDocument:trainRecord:table:TrianingCount')"
show-overflow-tooltip sortable="custom" />
<el-table-column prop="TrianingState" :label="$t('trials:trialDocument:trainRecord:table:TrianingState')"
show-overflow-tooltip sortable="custom" />
<el-table-column prop="Note" :label="$t('trials:trialDocument:trainRecord:table:Note')" show-overflow-tooltip
sortable="custom" />
<!--文件名称-->
<el-table-column
prop="FileName"
:label="$t('trials:trialDocument:trainRecord:table:name')"
show-overflow-tooltip
sortable="custom"
>
<el-table-column prop="FileName" :label="$t('trials:trialDocument:trainRecord:table:name')" show-overflow-tooltip
sortable="custom">
<template slot-scope="scope">
<div
v-if="
<div v-if="
scope.row.TrialFileRecord &&
scope.row.TrialFileRecord.TrialFileTypeId
"
style="display: flex; align-items: center"
>
" style="display: flex; align-items: center">
<span class="fileName">{{
scope.row.TrialFileRecord.FileName
}}</span>
<div v-if="isManage && !viewStatus" class="fileBtnBox">
<i
class="el-icon-view"
@click.stop="preview(scope.row.TrialFileRecord)"
/>
<i
class="el-icon-download"
v-if="hasDownLoad"
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
/>
<i
class="el-icon-delete"
v-if="hasDel"
@click.stop="delFile(scope.row, 'Trial')"
/>
<i class="el-icon-view" @click.stop="preview(scope.row.TrialFileRecord)" />
<i class="el-icon-download" v-if="hasDownLoad"
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')" />
<i class="el-icon-delete" v-if="hasDel" @click.stop="delFile(scope.row, 'Trial')" />
</div>
</div>
<i
v-else-if="isManage && !viewStatus && hasEdit"
class="el-icon-upload2"
style="cursor: pointer; color: #409eff"
@click.stop="upload(scope.row, 'Trial')"
/>
<i v-else-if="isManage && !viewStatus && hasEdit" class="el-icon-upload2"
style="cursor: pointer; color: #409eff" @click.stop="upload(scope.row, 'Trial')" />
</template>
</el-table-column>
<!--历史记录-->
<el-table-column
prop="HistoryFileRecord"
:label="$t('trials:trialDocument:trainRecord:table:historyFileRecord')"
show-overflow-tooltip
v-if="isManage && !viewStatus"
>
<el-table-column prop="HistoryFileRecord" :label="$t('trials:trialDocument:trainRecord:table:historyFileRecord')"
show-overflow-tooltip v-if="isManage && !viewStatus">
<template slot-scope="scope">
<div
v-if="
scope.row.HistoryFileRecord &&
scope.row.HistoryFileRecord.TrialFileTypeId
"
style="display: flex; align-items: center"
>
<span class="fileName">{{
scope.row.HistoryFileRecord.FileName
}}</span>
<div v-if="isManage && !viewStatus" class="fileBtnBox">
<i
class="el-icon-download"
v-if="hasDownLoad"
@click.stop="
downLoad(false, scope.row.HistoryFileRecord, 'file')
"
/>
<i
class="el-icon-delete"
v-if="hasDel"
@click.stop="delFile(scope.row, 'History')"
/>
</div>
</div>
<i
v-else-if="isManage && !viewStatus"
class="el-icon-upload2"
style="cursor: pointer; color: #409eff"
@click.stop="upload(scope.row, 'History')"
/>
<el-button type="text" @click.stop="openHistory(scope.row)">
{{ scope.row.HistoryCount }}
<i class="el-icon-upload2" />
</el-button>
</template>
</el-table-column>
<el-table-column
prop="IsAuthorizedView"
:label="$t('trials:trialDocument:trainRecord:table:isAuthorizedView')"
show-overflow-tooltip
sortable="custom"
v-if="isManage && !viewStatus"
>
<el-table-column prop="IsAuthorizedView" :label="$t('trials:trialDocument:trainRecord:table:isAuthorizedView')"
show-overflow-tooltip sortable="custom" v-if="isManage && !viewStatus">
<template slot-scope="scope">
<el-switch
:disabled="!scope.row.TrianingDate"
v-if="isManage && !viewStatus && hasEdit"
v-model="scope.row.IsAuthorizedView"
@change="(val) => auth(false, scope.row, val)"
:active-value="true"
:inactive-value="false"
:active-text="$fd('YesOrNo', true)"
:inactive-text="$fd('YesOrNo', false)"
>
<el-switch :disabled="!scope.row.TrianingDate" v-if="isManage && !viewStatus && hasEdit"
v-model="scope.row.IsAuthorizedView" @change="(val) => auth(false, scope.row, val)" :active-value="true"
:inactive-value="false" :active-text="$fd('YesOrNo', true)" :inactive-text="$fd('YesOrNo', false)">
</el-switch>
<span v-else>{{ $fd('YesOrNo', scope.row.IsAuthorizedView) }}</span>
</template>
</el-table-column>
<el-table-column
prop="UpdateTime"
:label="$t('trials:trialDocument:trainRecord:table:updateTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="CreateTime"
:label="$t('trials:trialDocument:trainRecord:table:createTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column prop="UpdateTime" :label="$t('trials:trialDocument:trainRecord:table:updateTime')"
show-overflow-tooltip sortable="custom" />
<el-table-column prop="CreateTime" :label="$t('trials:trialDocument:trainRecord:table:createTime')"
show-overflow-tooltip sortable="custom" />
<el-table-column :label="$t('common:action:action')" width="200">
<template slot-scope="scope">
<el-button
icon="el-icon-view"
:title="$t('common:button:view')"
circle
:disabled="
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
"
@click.stop="preview(scope.row.TrialFileRecord)"
/>
<el-button
v-if="hasEdit && isManage && !viewStatus"
icon="el-icon-edit-outline"
:title="$t('common:button:edit')"
circle
@click.stop="handleEdit(scope.row)"
/>
<el-button
v-if="hasDownLoad && isManage && !viewStatus"
icon="el-icon-download"
:title="
$t('trials:trialDocument:trainRecord:button:downLoadFile')
"
circle
:disabled="
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
"
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
/>
<el-button
v-if="hasDel && isManage && !viewStatus"
icon="el-icon-delete"
:title="$t('trials:trialDocument:trainRecord:button:delete')"
circle
@click.stop="handleDel(scope.row)"
/>
<el-button icon="el-icon-view" :title="$t('common:button:view')" circle :disabled="!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
" @click.stop="preview(scope.row.TrialFileRecord)" />
<el-button v-if="hasEdit && isManage && !viewStatus" icon="el-icon-edit-outline"
:title="$t('common:button:edit')" circle @click.stop="handleEdit(scope.row)" />
<el-button v-if="hasDownLoad && isManage && !viewStatus" icon="el-icon-download" :title="$t('trials:trialDocument:trainRecord:button:downLoadFile')
" circle :disabled="!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
" @click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')" />
<el-button v-if="hasDel && isManage && !viewStatus" icon="el-icon-delete"
:title="$t('trials:trialDocument:trainRecord:button:delete')" circle @click.stop="handleDel(scope.row)" />
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<upload-files
:config="config"
:faccept="faccept"
:uploadPath="uploadPath"
:limitLength="limitLength"
v-if="config.visible"
@close="close"
@uplaodFile="uplaodFile"
/>
<trainRecord-form
:ArchiveTypeEnum="ArchiveTypeEnum"
:rowData="rowData"
:config="update_config"
:data="selectData"
v-if="update_config.visible"
@close="updateClose"
@getList="getList"
/>
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
<upload-files :config="config" :faccept="faccept" :uploadPath="uploadPath" :limitLength="limitLength"
v-if="config.visible" @close="close" @uplaodFile="uplaodFile" />
<trainRecord-form :ArchiveTypeEnum="ArchiveTypeEnum" :rowData="rowData" :config="update_config" :data="selectData"
v-if="update_config.visible" @close="updateClose" @getList="getList" />
<history-file-list :config="file_config" :rowData="fileData" :uploadPath="uploadPath" @getList="getList" />
</box-content>
</template>
<script>
<script>
import {
addOrUpdateTrialFileType,
getTrialTrianingRecordList,
@@ -438,6 +195,7 @@ import Pagination from '@/components/Pagination'
import BoxContent from '@/components/BoxContent'
import uploadFiles from '../uploadFiles.vue'
import trainRecordForm from './form.vue'
import historyFileList from '../historyFileList.vue'
const searchDataDefault = () => {
return {
IsAuthorizedView: null,
@@ -454,7 +212,7 @@ const searchDataDefault = () => {
}
export default {
name: 'trainRecord',
components: { BoxContent, Pagination, uploadFiles, trainRecordForm },
components: { BoxContent, Pagination, uploadFiles, trainRecordForm, historyFileList },
props: {
viewStatus: {
type: Boolean,
@@ -509,9 +267,24 @@ export default {
upload: null,
},
DATA: {},
fileData: {},
file_config: {
visible: false,
title: this.$t('trials:trialDocument:historyFileList:title'),
width: '800px',
}
}
},
methods: {
openHistory(row) {
this.fileData = {
Name: row.TrialFileRecord ? row.TrialFileRecord.FileName : '',
Id: row.Id,
TrialFileTypeId: this.rowData.Id
}
this.file_config.visible = true
},
//
async uplaodFile(list) {
console.log(list, 'list')
@@ -870,7 +643,7 @@ export default {
this.DATA = Object.assign({}, this.rowData)
},
immediate: true,
deep:true
deep: true
},
},
created() {
@@ -918,8 +691,7 @@ export default {
])
},
TITLE() {
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)}${
this.isEN ? this.rowData.Name : this.rowData.NameCN
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)}${this.isEN ? this.rowData.Name : this.rowData.NameCN
}`
},
},
@@ -931,21 +703,27 @@ export default {
font-weight: bold;
margin-bottom: 10px;
}
.fileName {
display: inline-block;
max-width: calc(100% - 60px);
white-space: nowrap; /* 文本不换行 */
overflow: hidden; /* 超出部分隐藏 */
white-space: nowrap;
/* 文本不换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
margin-right: 3px;
}
.fileBtnBox {
display: inline-block;
width: 50px;
i {
cursor: pointer;
color: #409eff;
margin-right: 3px;
&:last-child {
margin: 0;
}
@@ -5,45 +5,20 @@
<el-form :inline="true">
<!-- 中心编号 -->
<el-form-item :label="$t('trials:uploadMonitor:table:siteId')">
<el-select
v-model="searchData.TrialSiteId"
clearable
filterable
style="width: 120px"
>
<el-option
v-for="(item, index) of siteOptions"
:key="index"
:label="item.TrialSiteCode"
:value="item.TrialSiteId"
/>
<el-select v-model="searchData.TrialSiteId" clearable filterable style="width: 120px">
<el-option v-for="(item, index) of siteOptions" :key="index" :label="item.TrialSiteCode"
:value="item.TrialSiteId" />
</el-select>
</el-form-item>
<!-- 受试者编号 -->
<el-form-item :label="$t('trials:uploadMonitor:table:subjectId')">
<el-input
v-model="searchData.SubjectInfo"
style="width: 120px"
clearable
/>
<el-input v-model="searchData.SubjectInfo" style="width: 120px" clearable />
</el-form-item>
<!-- 访视名称 -->
<el-form-item
class="my_multiple"
:label="$t('trials:uploadMonitor:table:visitName')"
>
<el-select
v-model="searchData.VisitPlanArray"
style="width: 140px"
clearable
multiple
>
<el-option
v-for="(item, index) of visitPlanOptions"
:key="index"
:label="item.VisitName"
:value="item.VisitNum"
>
<el-form-item class="my_multiple" :label="$t('trials:uploadMonitor:table:visitName')">
<el-select v-model="searchData.VisitPlanArray" style="width: 140px" clearable multiple>
<el-option v-for="(item, index) of visitPlanOptions" :key="index" :label="item.VisitName"
:value="item.VisitNum">
<span style="float: left">{{ item.VisitName }}</span>
</el-option>
<el-option key="Other" label="Out of Plan" value="1.11" />
@@ -54,50 +29,25 @@
<el-input v-model="searchData.StudyCode" />
</el-form-item>
<el-form-item :label="$t('trials:uploadMonitor:table:imageType')">
<el-select
v-model="searchData.IsDicom"
style="width: 120px"
clearable
>
<el-option
v-for="item of $d.IsDicom"
:label="item.label"
:value="item.value"
:key="`RoleName${item.value}`"
/>
<el-select v-model="searchData.IsDicom" style="width: 120px" clearable>
<el-option v-for="item of $d.IsDicom" :label="item.label" :value="item.value"
:key="`RoleName${item.value}`" />
</el-select>
</el-form-item>
<el-form-item :label="$t('trials:uploadMonitor:table:uploader')">
<el-input
v-model="searchData.Uploader"
style="width: 120px"
clearable
/>
<el-input v-model="searchData.Uploader" style="width: 120px" clearable />
</el-form-item>
<el-form-item :label="$t('trials:uploadMonitor:table:uploadStatus')">
<el-select
v-model="searchData.IsSuccess"
style="width: 120px"
clearable
>
<el-option
v-for="item of $d.YesOrNo"
:label="item.label"
:value="item.value"
:key="`RoleName${item.value}`"
/>
<el-select v-model="searchData.IsSuccess" style="width: 120px" clearable>
<el-option v-for="item of $d.YesOrNo" :label="item.label" :value="item.value"
:key="`RoleName${item.value}`" />
</el-select>
</el-form-item>
<el-form-item :label="$t('trials:uploadMonitor:table:uploadTime')">
<el-date-picker
v-model="datetimerange"
type="datetimerange"
:default-time="['00:00:00', '23:59:59']"
<el-date-picker v-model="datetimerange" type="datetimerange" :default-time="['00:00:00', '23:59:59']"
:start-placeholder="$t('trials:loginLog:table:beginTime')"
:end-placeholder="$t('trials:loginLog:table:endTime')"
value-format="yyyy-MM-dd HH:mm:ss"
@change="handleDatetimeChange"
/>
:end-placeholder="$t('trials:loginLog:table:endTime')" value-format="yyyy-MM-dd HH:mm:ss"
@change="handleDatetimeChange" />
</el-form-item>
<el-form-item>
<!-- 查询 -->
@@ -105,234 +55,119 @@
{{ $t('common:button:search') }}
</el-button>
<!-- 重置 -->
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
<!--导出-->
<el-button
type="primary"
icon="el-icon-download"
@click="handleExport"
>
<el-button type="primary" icon="el-icon-download" @click="handleExport">
{{ $t('common:button:export') }}
</el-button>
</el-form-item>
</el-form>
</template>
<template slot="main-container">
<el-table
v-adaptive="{ bottomOffset: 60 }"
v-loading="loading"
:data="list"
stripe
height="100"
@sort-change="handleSortByColumn"
:default-sort="{ prop: 'ArchiveFinishedTime', order: 'descending' }"
>
<el-table v-adaptive="{ bottomOffset: 60 }" v-loading="loading" :data="list" stripe height="100"
@sort-change="handleSortByColumn" :default-sort="{ prop: 'ArchiveFinishedTime', order: 'descending' }">
<el-table-column type="index" width="40" align="left" />
<!-- 中心编号 -->
<el-table-column
prop="TrialSiteCode"
min-width="100"
:label="$t('trials:uploadMonitor:table:siteId')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column prop="TrialSiteCode" min-width="100" :label="$t('trials:uploadMonitor:table:siteId')"
show-overflow-tooltip sortable="custom" />
<!-- 受试者编号 -->
<el-table-column
prop="SubjectCode"
min-width="130"
:label="$t('trials:uploadMonitor:table:subjectId')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column prop="SubjectCode" min-width="130" :label="$t('trials:uploadMonitor:table:subjectId')"
show-overflow-tooltip sortable="custom" />
<!-- 访视名 -->
<el-table-column
prop="VisitName"
min-width="130"
:label="$t('trials:uploadMonitor:table:visitName')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column prop="VisitName" min-width="130" :label="$t('trials:uploadMonitor:table:visitName')"
show-overflow-tooltip sortable="custom" />
<!-- 检查编号 -->
<el-table-column
prop="StudyCode"
min-width="130"
:label="$t('trials:uploadMonitor:table:studyId')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column prop="StudyCode" min-width="130" :label="$t('trials:uploadMonitor:table:studyId')"
show-overflow-tooltip sortable="custom" />
<!-- 影像类型 -->
<el-table-column
prop="IsDicom"
min-width="130"
:label="$t('trials:uploadMonitor:table:imageType')"
show-overflow-tooltip
sortable="custom"
>
<el-table-column prop="IsDicom" min-width="130" :label="$t('trials:uploadMonitor:table:imageType')"
show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ $fd('IsDicom', scope.row.IsDicom) }}
<el-tag type="primary">{{ $fd('IsDicom', scope.row.IsDicom) }}</el-tag>
</template>
</el-table-column>
<!-- 上传人 -->
<el-table-column
prop="Uploader"
min-width="130"
:label="$t('trials:uploadMonitor:table:uploader')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column prop="Uploader" min-width="130" :label="$t('trials:uploadMonitor:table:uploader')"
show-overflow-tooltip sortable="custom" />
<!-- IP -->
<el-table-column
prop="IP"
min-width="100"
:label="$t('trials:uploadMonitor:table:ip')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column prop="IP" min-width="100" :label="$t('trials:uploadMonitor:table:ip')" show-overflow-tooltip
sortable="custom" />
<!-- 文件数 -->
<el-table-column
prop="FileCount"
min-width="120"
:label="$t('trials:uploadMonitor:table:fileCount')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column prop="FileCount" min-width="120" :label="$t('trials:uploadMonitor:table:fileCount')"
show-overflow-tooltip sortable="custom" />
<!-- 文件大小 -->
<el-table-column
prop="FileSize"
min-width="130"
:label="$t('trials:uploadMonitor:table:fileSize')"
show-overflow-tooltip
sortable="custom"
>
<el-table-column prop="FileSize" min-width="130" :label="$t('trials:uploadMonitor:table:fileSize')"
show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ fileSizeFormatter(scope.row.FileSize) }}
</template>
</el-table-column>
<!-- 是否有重复文件 -->
<el-table-column
prop="IsDicomReUpload"
min-width="150"
:label="$t('trials:uploadMonitor:table:isRepetition')"
show-overflow-tooltip
sortable="custom"
>
<el-table-column prop="IsDicomReUpload" min-width="150" :label="$t('trials:uploadMonitor:table:isRepetition')"
show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ $fd('YesOrNo', scope.row.IsDicomReUpload) }}
</template>
</el-table-column>
<!-- 是否上传成功 -->
<el-table-column
prop="IsSuccess"
min-width="150"
:label="$t('trials:uploadMonitor:table:uploadStatus')"
show-overflow-tooltip
sortable="custom"
>
<el-table-column prop="IsSuccess" min-width="150" :label="$t('trials:uploadMonitor:table:uploadStatus')"
show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
<el-tag v-if="scope.row.IsSuccess" type="primary">
{{ $fd('YesOrNo', scope.row.IsSuccess) }}</el-tag
>
{{ $fd('YesOrNo', scope.row.IsSuccess) }}</el-tag>
<el-tag v-else type="danger">
{{ $fd('YesOrNo', scope.row.IsSuccess) }}</el-tag
>
{{ $fd('YesOrNo', scope.row.IsSuccess) }}</el-tag>
</template>
</el-table-column>
<!-- 开始时间 -->
<el-table-column
prop="UploadStartTime"
min-width="140"
:label="$t('trials:uploadMonitor:table:beginTime')"
show-overflow-tooltip
sortable="custom"
>
<el-table-column prop="UploadStartTime" min-width="140" :label="$t('trials:uploadMonitor:table:beginTime')"
show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ scope.row.UploadStartTimeStr }}
</template>
</el-table-column>
<!-- 结束时间 -->
<el-table-column
prop="ArchiveFinishedTime"
min-width="140"
:label="$t('trials:uploadMonitor:table:endTime')"
show-overflow-tooltip
sortable="custom"
>
<el-table-column prop="ArchiveFinishedTime" min-width="140" :label="$t('trials:uploadMonitor:table:endTime')"
show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ scope.row.ArchiveFinishedTime }}
</template>
</el-table-column>
<!-- 总共用时 -->
<el-table-column
prop="TotalMillisecondsInterval"
min-width="100"
:label="$t('trials:uploadMonitor:table:totalTime')"
show-overflow-tooltip
>
<el-table-column prop="TotalMillisecondsInterval" min-width="100"
:label="$t('trials:uploadMonitor:table:totalTime')" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.TimeInterval }}
</template>
</el-table-column>
<el-table-column
:label="$t('common:action:action')"
width="80"
fixed="right"
>
<el-table-column :label="$t('common:action:action')" width="80" fixed="right">
<template slot-scope="scope">
<!-- 查看 -->
<el-button
circle
:title="$t('trials:readTask:button:view')"
:disabled="!scope.row.RecordPath"
icon="el-icon-view"
@click="handleLook(scope.row)"
/>
<el-button circle :title="$t('trials:readTask:button:view')" :disabled="!scope.row.RecordPath"
icon="el-icon-view" @click="handleLook(scope.row)" />
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
</template>
<el-dialog
v-if="lookVisible"
:title="$t('trials:uploadMonitor:dagTitle:look')"
:visible.sync="lookVisible"
width="800px"
append-to-body
:close-on-click-modal="false"
custom-class="base-dialog-wrapper"
>
<el-dialog v-if="lookVisible" :title="$t('trials:uploadMonitor:dagTitle:look')" :visible.sync="lookVisible"
width="800px" append-to-body :close-on-click-modal="false" custom-class="base-dialog-wrapper">
<div style="max-height: 500px; overflow-y: auto; padding: 0 20px">
<div
style="
<div style="
display: flex;
justify-content: space-around;
margin-bottom: 20px;
"
>
<span
>{{ $t('trials:uploadDicomList:table:FailedNumber') }}:
{{ lookText.Failed.length }}</span
>
<span
>{{ $t('trials:uploadDicomList:table:ExistedNumber') }}:
{{ lookText.Existed.length }}</span
>
<span
>{{ $t('trials:uploadDicomList:table:UploadedNumber') }}:
{{ lookText.Uploaded.length }}</span
>
">
<span>{{ $t('trials:uploadDicomList:table:FailedNumber') }}:
{{ lookText.Failed.length }}</span>
<span>{{ $t('trials:uploadDicomList:table:ExistedNumber') }}:
{{ lookText.Existed.length }}</span>
<span>{{ $t('trials:uploadDicomList:table:UploadedNumber') }}:
{{ lookText.Uploaded.length }}</span>
</div>
<div style="margin-bottom: 10px; font-size: 12px">
<div style="font-size: 14px; margin-bottom: 5px">
@@ -379,6 +214,7 @@ import { getStudyUploadMonitor_Export } from '@/api/export'
import Pagination from '@/components/Pagination'
import BaseContainer from '@/components/BaseContainer'
import BaseModel from '@/components/BaseModel'
import { changeURLStatic } from '@/utils/history.js'
import axios from 'axios'
const searchDataDefault = () => {
return {
@@ -421,10 +257,26 @@ export default {
if (this.$route.query.studyCode) {
this.searchData.StudyCode = this.$route.query.studyCode
}
if (this.$route.query.siteId) {
this.searchData.TrialSiteId = this.$route.query.siteId
}
if (this.$route.query.subjectCode) {
this.searchData.SubjectInfo = this.$route.query.subjectCode
}
if (this.$route.query.visitNum || this.$route.query.visitNum === 0) {
this.searchData.VisitPlanArray = [Number(this.$route.query.visitNum)]
}
this.getList()
this.getVisitPlanOptions()
this.clearnUrl()
},
methods: {
clearnUrl() {
changeURLStatic('siteId', '')
changeURLStatic('subjectCode', '')
changeURLStatic('visitNum', '')
},
async handleLook(row) {
this.lookVisible = true
var htmlUrl = this.OSSclientConfig.basePath + row.RecordPath
@@ -482,8 +334,8 @@ export default {
},
handleExport() {
getStudyUploadMonitor_Export(this.searchData)
.then((res) => {})
.catch(() => {})
.then((res) => { })
.catch(() => { })
},
handleDatetimeChange(val) {
if (val) {
File diff suppressed because it is too large Load Diff