Compare commits

...

108 Commits

Author SHA1 Message Date
wangxiaoshuang 6674989249 自定义结构化录入的临床数据,配置工具存在问题
continuous-integration/drone/push Build is passing Details
2025-06-20 18:04:34 +08:00
wangxiaoshuang 06167d4ff5 项目邮件阅片标准修改
continuous-integration/drone/push Build is passing Details
2025-06-20 15:27:39 +08:00
wangxiaoshuang 2a1dc4d2dd 自定义结构化录入的临床数据,配置工具存在问题
continuous-integration/drone/push Build is running Details
2025-06-20 13:17:21 +08:00
wangxiaoshuang 3d6cd67493 字典配置修改为可查看
continuous-integration/drone/push Build is passing Details
2025-06-20 11:26:20 +08:00
wangxiaoshuang c448f4cda8 上传影像预览窗宽窗位问题
continuous-integration/drone/push Build is passing Details
2025-06-20 11:05:27 +08:00
wangxiaoshuang 155158f954 项目配置检查名称问题解决
continuous-integration/drone/push Build is passing Details
2025-06-20 09:44:08 +08:00
wangxiaoshuang 551620c3c3 1
continuous-integration/drone/push Build is passing Details
2025-06-19 17:44:31 +08:00
wangxiaoshuang 4540f39051 切换靶段时清空备注 2025-06-19 17:42:25 +08:00
wangxiaoshuang 848bf0c8b2 自定义报告单选显示问题修改
continuous-integration/drone/push Build is passing Details
2025-06-19 17:24:35 +08:00
wangxiaoshuang aa1f4dae9b IVUS和OCT表单修改,新增靶段
continuous-integration/drone/push Build is passing Details
2025-06-19 16:53:11 +08:00
wangxiaoshuang a41359111f 字典子项增加排序
continuous-integration/drone/push Build is passing Details
2025-06-19 13:39:12 +08:00
wangxiaoshuang 50ae94bf08 1
continuous-integration/drone/push Build is passing Details
2025-06-19 13:18:07 +08:00
wangxiaoshuang 19785bd266 邮件模板编辑阅片标准改为多选
continuous-integration/drone/push Build is passing Details
2025-06-19 13:13:12 +08:00
wangxiaoshuang cc5a4ed2df 邮件模板编辑样式修改
continuous-integration/drone/push Build is passing Details
2025-06-19 11:42:53 +08:00
wangxiaoshuang 5efcbae09a 邮件模板阅片标准字段更改 2025-06-19 11:40:46 +08:00
wangxiaoshuang 6f5d48cdcd 如果上传影像都是问题影像,此时会显示数量0/0
continuous-integration/drone/push Build is passing Details
2025-06-19 11:28:14 +08:00
wangxiaoshuang fead8b8c8f 导出文件格式问题
continuous-integration/drone/push Build is passing Details
2025-06-18 14:28:08 +08:00
wangxiaoshuang 6980cd275e Merge branch 'uat'
continuous-integration/drone/push Build is passing Details
2025-06-18 13:48:05 +08:00
wangxiaoshuang a14aefca2c 上传影像文件统计问题
continuous-integration/drone/push Build encountered an error Details
2025-06-18 13:33:39 +08:00
wangxiaoshuang 334882cc68 阅片下载压缩包名称修改 2025-06-18 13:30:36 +08:00
wangxiaoshuang de250ecbf5 Merge branch 'uat'
continuous-integration/drone/push Build is passing Details
# Conflicts:
#	src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue
2025-06-18 09:56:39 +08:00
wangxiaoshuang d8315fbfff 阅片上传下载按钮添加
continuous-integration/drone/push Build encountered an error Details
2025-06-18 09:55:16 +08:00
wangxiaoshuang 1022fa2888 阅片顺序添加admin角色权限
continuous-integration/drone/push Build encountered an error Details
2025-06-17 16:49:15 +08:00
wangxiaoshuang a14451b82b 影像汇总导出表格
continuous-integration/drone/push Build is passing Details
2025-06-17 16:43:55 +08:00
wangxiaoshuang 24ff1772dd Merge branch 'uat'
continuous-integration/drone/push Build is passing Details
2025-06-16 17:24:31 +08:00
wangxiaoshuang 48633a1ed4 阅片顺序手动修改添加限制条件
continuous-integration/drone/push Build encountered an error Details
2025-06-16 17:24:14 +08:00
wangxiaoshuang 0634df6e33 Merge branch 'uat'
continuous-integration/drone/push Build is passing Details
# Conflicts:
#	src/views/trials/trials-panel/trial-summary/audit-record/index.vue
2025-06-16 16:06:54 +08:00
wangxiaoshuang 108d01f81c 阅片顺序默认排序、阅片中禁用
continuous-integration/drone/push Build encountered an error Details
2025-06-16 16:05:49 +08:00
caiyiling ae808679a0 1
continuous-integration/drone/push Build is passing Details
2025-06-13 18:02:55 +08:00
wangxiaoshuang 12e4128b7b 提交裁判阅片结果详情oldValue改为--
continuous-integration/drone/push Build encountered an error Details
2025-06-13 16:49:50 +08:00
caiyiling fbb23065e5 1
continuous-integration/drone/push Build is passing Details
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 Details
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 Details
# 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 b512112d96 肿瘤学阅片查看屏蔽跳过按钮
continuous-integration/drone/push Build encountered an error Details
2025-06-13 14:33:55 +08:00
wangxiaoshuang a7251ce65c 阅片顺序
continuous-integration/drone/push Build encountered an error Details
2025-06-13 14:17:58 +08:00
wangxiaoshuang 19896b85e0 1
continuous-integration/drone/push Build is passing Details
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 Details
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 Details
2025-06-13 10:44:35 +08:00
caiyiling 9c2c6191d2 播放工具更改 2025-06-13 10:44:12 +08:00
wangxiaoshuang 7e2ff6de1b 稽查图片不存在展示问题
continuous-integration/drone/push Build encountered an error Details
2025-06-12 16:23:44 +08:00
wangxiaoshuang c865608313 阅片顺序页面
continuous-integration/drone/push Build is passing Details
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 Details
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 Details
2025-06-12 11:02:37 +08:00
wangxiaoshuang 2b89163419 项目文档历史记录文件名称修改方式修改
continuous-integration/drone/push Build is passing Details
2025-06-11 16:53:22 +08:00
wangxiaoshuang 3489d34628 影像汇总导出影像、关键图
continuous-integration/drone/push Build is passing Details
2025-06-11 16:34:46 +08:00
wangxiaoshuang 613d434af9 影像汇总
continuous-integration/drone/push Build is passing Details
2025-06-10 18:02:37 +08:00
wangxiaoshuang 123f178673 稽查图片显示问题
continuous-integration/drone/push Build is passing Details
2025-06-10 15:26:34 +08:00
wangxiaoshuang e8e066ab80 稽查操作名查询字段变更
continuous-integration/drone/push Build is passing Details
2025-06-10 09:41:55 +08:00
wangxiaoshuang 4aa5acc401 1
continuous-integration/drone/push Build is passing Details
2025-06-09 16:56:29 +08:00
wangxiaoshuang fa4c00230f 项目文档历史记录修改
continuous-integration/drone/push Build is passing Details
2025-06-09 15:58:52 +08:00
wangxiaoshuang 6ea46c076b 检查部位、检查技术、检查名称已使用禁止取消、删除
continuous-integration/drone/push Build is passing Details
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 Details
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 Details
2025-06-06 16:58:38 +08:00
wangxiaoshuang 5de61dd125 项目培训发布状态默认值
continuous-integration/drone/push Build is passing Details
2025-06-06 16:28:07 +08:00
wangxiaoshuang ae8767c70f 配置中检查部位已在项目中使用禁止取消勾选和修改
continuous-integration/drone/push Build is passing Details
2025-06-06 14:34:42 +08:00
wangxiaoshuang 623a7b9858 1
continuous-integration/drone/push Build is passing Details
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 Details
2025-06-06 13:47:33 +08:00
caiyiling 8d5dfd0258 自定义阅片配置更改
continuous-integration/drone/push Build is passing Details
2025-06-06 11:15:31 +08:00
caiyiling 45f83322ec 1
continuous-integration/drone/push Build is passing Details
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 Details
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 Details
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 Details
2025-06-05 16:26:02 +08:00
caiyiling d504039d82 自定义标准配置更改
continuous-integration/drone/push Build is passing Details
2025-06-05 16:22:42 +08:00
caiyiling 0c4b3e5aed 表格问题配置更改
continuous-integration/drone/push Build is passing Details
2025-06-05 16:10:23 +08:00
caiyiling 262541ac08 1
continuous-integration/drone/push Build is passing Details
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 Details
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 Details
2025-06-05 13:12:49 +08:00
wangxiaoshuang 7a6cded333 培训材料视频禁止下载
continuous-integration/drone/push Build is passing Details
2025-06-05 11:38:08 +08:00
wangxiaoshuang c1f10036b0 项目文档增加附件
continuous-integration/drone/push Build is passing Details
2025-06-04 17:15:45 +08:00
caiyiling 8e01f3af87 Merge branch 'uat' into main
continuous-integration/drone/push Build is passing Details
2025-06-04 16:50:53 +08:00
caiyiling a66e15eb39 MRI-PDFF测量逻辑更改
continuous-integration/drone/push Build encountered an error Details
2025-06-04 16:25:48 +08:00
wangxiaoshuang 386901316d 1
continuous-integration/drone/push Build is passing Details
2025-06-04 15:58:30 +08:00
caiyiling 122f333c77 Merge branch 'uat' into main
continuous-integration/drone/push Build is passing Details
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 Details
2025-06-04 13:37:46 +08:00
caiyiling 86a8e2faeb 测量工具配置文件更改 2025-06-04 13:37:12 +08:00
caiyiling 895e3a6bed MRI-PDFF更改
continuous-integration/drone/push Build encountered an error Details
2025-06-04 13:35:42 +08:00
wangxiaoshuang b5b67cc5e3 稽查搜索框内容接口获取
continuous-integration/drone/push Build is passing Details
2025-06-04 13:34:42 +08:00
caiyiling 9dddc0c012 MRI-PDFF测量逻辑更改
continuous-integration/drone/push Build encountered an error Details
2025-06-04 10:53:45 +08:00
caiyiling a965f08a1e MRI-PDFF标准更改
continuous-integration/drone/push Build encountered an error Details
2025-06-04 09:24:41 +08:00
wangxiaoshuang d667bb4e79 审批页面优化
continuous-integration/drone/push Build is passing Details
2025-06-03 18:01:04 +08:00
caiyiling c7e0fab789 非Dicom工具更改
continuous-integration/drone/push Build is passing Details
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 Details
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 Details
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 Details
2025-06-03 11:32:48 +08:00
wangxiaoshuang 5386dba134 稽查新增字段是否默认
continuous-integration/drone/push Build is passing Details
2025-05-30 09:27:30 +08:00
caiyiling 3f63c126ff 1
continuous-integration/drone/push Build is passing Details
2025-05-29 17:21:25 +08:00
caiyiling f1b816fd85 自定义阅片更改
continuous-integration/drone/push Build is passing Details
2025-05-29 17:04:00 +08:00
caiyiling 43a221de00 自定义阅片更改
continuous-integration/drone/push Build is passing Details
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 Details
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 Details
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 Details
2025-05-29 09:38:11 +08:00
caiyiling 9962b1a829 反色bug修复
continuous-integration/drone/push Build encountered an error Details
2025-05-28 18:46:53 +08:00
caiyiling 049128b90e 添加阅片完成支持添加临时标注(历史标注不允许更改)功能及阅片页面双击放大缺陷修复
continuous-integration/drone/push Build encountered an error Details
2025-05-28 15:44:38 +08:00
caiyiling d77c79acbd 自定义标准问题配置扩充影像标记属性
continuous-integration/drone/push Build is passing Details
2025-05-27 11:10:56 +08:00
caiyiling 1e300b4529 CDISC导出配置支持表格问题更改
continuous-integration/drone/push Build is passing Details
2025-05-27 09:06:04 +08:00
89 changed files with 10197 additions and 8508 deletions

23
package-lock.json generated
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",

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",

View File

@ -418,10 +418,11 @@ export function addOrUpdateBasicDic(param) {
})
}
export function getDictionaryChildList(id) {
export function getDictionaryChildList(data) {
return request({
url: `/Dictionary/getChildList/${id}`,
method: 'get'
url: `/Dictionary/getChildList`,
method: 'post',
data
})
}
@ -1357,3 +1358,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
})
}

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
})
}

View File

@ -72,7 +72,14 @@ export function getReadingTaskList_Export(param) {
data: param
})
}
export function getTrialVisitImageStatList_Export(param) {
return requestDownload({
url: '/ExcelExport/getTrialVisitImageStatList_Export',
method: 'post',
responseType: 'blob',
data: param
})
}
export function getReReadingTaskList_Export(param) {
return requestDownload({
url: '/ExcelExport/getReReadingTaskList_Export',

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
})
}

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'
})
}
@ -480,3 +480,11 @@ export function resetReadingRestTime() {
method: 'post'
})
}
// 设置随机排序
export function setRandomTaskOrder(data) {
return request({
url: `/VisitTask/setRandomTaskOrder`,
method: 'post',
data
})
}

View File

@ -1,15 +1,7 @@
<template>
<div
id="canvas"
ref="canvas"
v-loading="loading"
element-loading-text="Loading..."
element-loading-background="rgba(0, 0, 0, 0.8)"
style="width:100%;height:100%;position:relative;"
class="cornerstone-element"
@contextmenu.prevent="onContextmenu"
@mouseup="sliderMouseup"
>
<div id="canvas" ref="canvas" v-loading="loading" element-loading-text="Loading..."
element-loading-background="rgba(0, 0, 0, 0.8)" style="width:100%;height:100%;position:relative;"
class="cornerstone-element" @contextmenu.prevent="onContextmenu" @mouseup="sliderMouseup">
<div v-show="dicomInfo.series" class="info-series">
<div>Series #{{ dicomInfo.series }}</div>
<div>Image #{{ dicomInfo.frame }}</div>
@ -26,9 +18,11 @@
<div v-show="dicomInfo.location">Location {{ dicomInfo.location }}mm</div> -->
<!-- <div v-show="toolState.clipPlaying">FPS {{ dicomInfo.fps }}</div> -->
<div v-show="mousePosition.mo">
Pos: {{ mousePosition.x?mousePosition.x.toFixed(0):'' }}, {{ mousePosition.y?mousePosition.y.toFixed(0):'' }}
Pos: {{ mousePosition.x ? mousePosition.x.toFixed(0) : '' }}, {{ mousePosition.y ? mousePosition.y.toFixed(0) :
'' }}
</div>
<div v-if="(dicomInfo.modality === 'CT' || dicomInfo.modality === 'DR' || dicomInfo.modality === 'CR') && mousePosition.mo">
<div
v-if="(dicomInfo.modality === 'CT' || dicomInfo.modality === 'DR' || dicomInfo.modality === 'CR') && mousePosition.mo">
HU: {{ mousePosition.mo }}
</div>
<div v-else-if="(dicomInfo.modality === 'PT' && mousePosition.suv)">
@ -53,8 +47,12 @@
<!-- <div v-show="dicomInfo.acc">ACC {{ dicomInfo.acc }}</div> -->
<!-- <div>{{ dicomInfo.time }}</div> -->
</div>
<div ref="sliderBox" class="my_slider_box" style="position: absolute;right: 1px;height: calc(100% - 100px);transform: translateY(-50%);top: calc(50% - 30px);width: 10px;background: #333;cursor: pointer" @click.stop="goViewer($event)">
<div :style="{top: height + '%'}" style="z-index:10;background: #9e9e9e;height: 20px;width: 100%;position: absolute;top: 0;cursor: move" @mousedown="sliderMousedown($event)" />
<div ref="sliderBox" class="my_slider_box"
style="position: absolute;right: 1px;height: calc(100% - 100px);transform: translateY(-50%);top: calc(50% - 30px);width: 10px;background: #333;cursor: pointer"
@click.stop="goViewer($event)">
<div :style="{ top: height + '%' }"
style="z-index:10;background: #9e9e9e;height: 20px;width: 100%;position: absolute;top: 0;cursor: move"
@mousedown="sliderMousedown($event)" />
</div>
<div style="position: absolute;left: 50%;top: 15px;color: #f44336;">
{{ markers.top }}
@ -81,15 +79,8 @@
<!-- <div v-show="stack.firstImageLoading" class="load-indicator">
Loading Series #{{ stack.seriesNumber }}...
</div>-->
<el-dialog
v-if="dcmTag.visible"
:visible.sync="dcmTag.visible"
:close-on-click-modal="false"
:title="dcmTag.title"
width="1000px"
custom-class="base-dialog-wrapper"
append-to-body
>
<el-dialog v-if="dcmTag.visible" :visible.sync="dcmTag.visible" :close-on-click-modal="false" :title="dcmTag.title"
width="1000px" custom-class="base-dialog-wrapper" append-to-body>
<dicom-tags :image-id="stack.imageIds[stack.currentImageIdIndex]" @close="dcmTag.visible = false" />
</el-dialog>
</div>
@ -368,8 +359,7 @@ export default {
data.string('x00080030')
)
this.dicomInfo.series = data.string('x00200011')
this.dicomInfo.frame = `${this.stack.currentImageIdIndex + 1}/${
this.stack.imageIds.length
this.dicomInfo.frame = `${this.stack.currentImageIdIndex + 1}/${this.stack.imageIds.length
}`
this.dicomInfo.size = `${data.uint16('x00280011')}x${data.uint16(
'x00280010'
@ -433,6 +423,9 @@ export default {
this.dicomInfo.zoom = viewport.scale.toFixed(4)
var data = e.detail.image.data
const position = data.string('x00201041')
const windowCenter = data.string('x00281050')
const windowWidth = data.string('x00281051')
this.setWwwc(windowWidth, windowCenter)
this.dicomInfo.location = position
},
getOrientationMarker(element) {
@ -678,7 +671,7 @@ export default {
cornerstoneTools.getToolState(
this.canvas,
'playClip'
).data[0].loop = false
).data[0].loop = true
},
setFps(fps) {
this.dicomInfo.fps = fps
@ -1136,6 +1129,7 @@ export default {
font-size: 12px;
/* z-index: 1; */
}
.info-image {
position: absolute;
left: 10px;
@ -1155,6 +1149,7 @@ export default {
font-size: 12px;
/* z-index: 1; */
}
.info-instance {
position: absolute;
right: 15px;
@ -1187,6 +1182,7 @@ export default {
margin: 10px;
cursor: default;
}
.menu__item:hover {
color: #ff0000;
}
@ -1206,6 +1202,7 @@ li:hover {
background-color: #e0e0e2;
color: white;
}
.my_slider_box:after {
content: '';
position: absolute;

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}`]
}
},

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;

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;
};

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>

View File

@ -1,21 +1,16 @@
<template>
<div class="criterion-form-item">
<div
v-if="!!question.QuestionName && question.ClinicalQuestionType==='group'"
style="font-weight: bold;font-size: 16px;margin: 5px 0px;margin-bottom: 10px"
>
<div v-if="!!question.QuestionName && question.ClinicalQuestionType === 'group'"
style="font-weight: bold;font-size: 16px;margin: 5px 0px;margin-bottom: 10px">
{{ language === 'en' ? question.QuestionEnName : question.QuestionName }}
</div>
<div
v-else-if="question.ClinicalQuestionType==='summary'"
style="background:#f3f3f3;border-radius:4px;font-size: 12px;margin: 5px 0px;margin-bottom: 10px;font-size: 12px;padding: 10px"
>
<div v-else-if="question.ClinicalQuestionType === 'summary'"
style="background:#f3f3f3;border-radius:4px;font-size: 12px;margin: 5px 0px;margin-bottom: 10px;font-size: 12px;padding: 10px">
{{ language === 'en' ? question.QuestionEnName : question.QuestionName }}
</div>
<div
v-else-if="question.ClinicalQuestionType === 'table' && ((question.ClinicalQuestionShowEnum === 1 && question.ParentTriggerValue === questionForm[question.ParentId].toString()) || question.ClinicalQuestionShowEnum === 0)"
style="font-weight: bold;font-size: 14px;margin: 5px 0px;"
>
style="font-weight: bold;font-size: 14px;margin: 5px 0px;">
<div style="display: flex;justify-content: space-between;">
<span>
{{ question.QuestionName }}
@ -25,27 +20,17 @@
{{ $t('trials:readingUnit:qsList:title:add') }}
</el-button>
</div>
<el-table
:data="questionForm[question.Id]"
>
<el-table-column
v-for="item of question.TableQuestions"
:key="item.Id"
:prop="item.Id"
:label="item.QuestionName"
min-width="100"
show-overflow-tooltip
/>
<el-table-column
:label="$t('common:action:action')"
min-width="100"
show-overflow-tooltip
>
<el-table :data="questionForm[question.Id]">
<el-table-column v-for="item of question.TableQuestions" :key="item.Id" :prop="item.Id"
:label="item.QuestionName" min-width="100" show-overflow-tooltip />
<el-table-column :label="$t('common:action:action')" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
<el-button type="text" size="mini" @click="openAddTableCol(question, scope.$index)">
{{ $t('common:button:edit') }}
</el-button>
<el-button type="text" size="mini" v-if="scope.row.IsCurrentTaskAdd === 'True' || !question.IsCopyLesions || IsBaseline" @click="deleteTableCol(question, scope.$index)">
<el-button type="text" size="mini"
v-if="scope.row.IsCurrentTaskAdd === 'True' || !question.IsCopyLesions || IsBaseline"
@click="deleteTableCol(question, scope.$index)">
{{ $t('common:button:delete') }}
</el-button>
</template>
@ -55,186 +40,108 @@
<el-col v-else :span="12">
<el-form-item
v-if="(question.ClinicalQuestionShowEnum === 1 && question.ParentTriggerValue === questionForm[question.ParentId].toString()) || question.ClinicalQuestionShowEnum === 0"
:label="`${question.QuestionName}`"
:prop="question.Id"
:rules="[
{ required: (question.IsRequired === 0 || (question.IsRequired ===1 && question.RelevanceId && (question.RelevanceValue === questionForm[question.RelevanceId].toString()))) && question.ClinicalQuestionType !== 'summary' && question.ClinicalQuestionType!=='group' && question.ClinicalQuestionType!=='table',
message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change']}
]"
:class="[question.Type==='group'?'mb':question.Type==='upload'?'uploadWrapper':'']"
>
:label="`${question.QuestionName}`" :prop="question.Id" :rules="[
{
required: (question.IsRequired === 0 || (question.IsRequired === 1 && question.RelevanceId && (question.RelevanceValue === questionForm[question.RelevanceId].toString()))) && question.ClinicalQuestionType !== 'summary' && question.ClinicalQuestionType !== 'group' && question.ClinicalQuestionType !== 'table',
message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change']
}
]" :class="[question.Type === 'group' ? 'mb' : question.Type === 'upload' ? 'uploadWrapper' : '']">
<!-- 输入框 -->
<el-input
v-if="question.ClinicalQuestionType==='input'"
v-model="questionForm[question.Id]"
<el-input v-if="question.ClinicalQuestionType === 'input'" v-model="questionForm[question.Id]"
:disabled="question.TableQuestionType === 2"
:max-length="question.MaxAnswerLength ? question.MaxAnswerLength : 200"
/>
:max-length="question.MaxAnswerLength ? question.MaxAnswerLength : 200" />
<!-- 多行文本输入框 -->
<el-input
v-if="question.ClinicalQuestionType==='textarea'"
v-model="questionForm[question.Id]"
type="textarea"
:max-length="question.MaxAnswerLength ? question.MaxAnswerLength : 200"
:autosize="{ minRows: 2, maxRows: 4}"
/>
<el-input v-if="question.ClinicalQuestionType === 'textarea'" v-model="questionForm[question.Id]"
type="textarea" :max-length="question.MaxAnswerLength ? question.MaxAnswerLength : 200"
:autosize="{ minRows: 2, maxRows: 4 }" />
<!-- 下拉框 -->
<el-select
v-if="question.ClinicalQuestionType==='select'"
v-model="questionForm[question.Id]"
clearable
<el-select v-if="question.ClinicalQuestionType === 'select'" v-model="questionForm[question.Id]" clearable
:disabled="(question.TableQuestionType === 2 || question.QuestionGenre === 2) && !!question.DictionaryCode"
@change="((val)=>{formItemChange(val, question)})"
>
@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]"
/>
<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"
/>
<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
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.trim()"
/>
<el-option v-for="val in question.TypeValue.split('|')" :key="val" :label="val" :value="val.trim()" />
</template>
</el-select>
<!-- 日期 -->
<el-date-picker v-if="question.ClinicalQuestionType === 'time'" v-model="questionForm[question.Id]"
style="width: 200px" align="right" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
<!-- 单选 -->
<el-date-picker
v-if="question.ClinicalQuestionType === 'time'"
v-model="questionForm[question.Id]"
style="width: 200px"
align="right"
type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
/>
<!-- 单选 -->
<el-radio-group
v-if="question.ClinicalQuestionType==='radio'"
v-model="questionForm[question.Id]"
@change="((val)=>{formItemChange(val, question)})"
>
<el-radio-group v-if="question.ClinicalQuestionType === 'radio'" v-model="questionForm[question.Id]"
@change="((val) => { formItemChange(val, question) })">
<template v-if="question.DictionaryCode">
<el-radio
v-for="item of $d[question.DictionaryCode]"
:key="item.id"
:label="item.value"
>
<el-radio v-for="item of $d[question.DictionaryCode]" :key="item.id" :label="item.value">
{{ item.label }}
</el-radio>
</template>
<template v-if="question.TypeValue">
<el-radio
v-for="val in question.TypeValue.split('|')"
:key="val"
:label="val"
>
<el-radio v-for="val in question.TypeValue.split('|')" :key="val" :label="val">
{{ val }}
</el-radio>
</template>
</el-radio-group>
<!-- 复选框 -->
<el-checkbox-group
v-if="question.ClinicalQuestionType==='checkbox' && questionForm[question.Id] !== ''"
v-model="questionForm[question.Id]"
>
<el-checkbox
v-for="val of question.TypeValue.split('|')"
:key="val"
:label="val"
:value="val"
>
<el-checkbox-group v-if="question.ClinicalQuestionType === 'checkbox' && questionForm[question.Id] !== ''"
v-model="questionForm[question.Id]">
<el-checkbox v-for="val of question.TypeValue.split('|')" :key="val" :label="val" :value="val">
{{ val }}
</el-checkbox>
</el-checkbox-group>
<el-input
v-if="question.ClinicalQuestionType === 'number'"
:ref="question.Id"
v-model="questionForm[question.Id]"
type="number"
style="width: 200px"
:disabled="question.CustomCalculateMark > 0"
@input="limitInput($event, questionForm, question)"
>
<el-input v-if="question.ClinicalQuestionType === 'number'" :ref="question.Id"
v-model="questionForm[question.Id]" type="number" style="width: 200px"
:disabled="question.CustomCalculateMark > 0" @input="limitInput($event, questionForm, question)">
<template v-if="question.Unit" slot="append">{{ question.Unit }}</template>
</el-input>
<span v-if="question.CustomCalculateMark === 11 && question.ClinicalQuestionType === 'number'" v-show="questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] <= questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId]" style="margin-left: 10px">
{{ questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] }}~{{ questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId] }}
<span v-if="question.CustomCalculateMark === 11 && question.ClinicalQuestionType === 'number'"
v-show="questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] <= questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId]"
style="margin-left: 10px">
{{ questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] }}~{{
questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId] }}
</span>
<span v-if="question.CustomCalculateMark === 10 && question.ClinicalQuestionType === 'number' && questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId]" style="margin-left: 10px">
{{ questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] }}~{{ questionForm.CreateTime ? questionForm.CreateTime : parseTime(new Date(), '{y}-{m}-{d}') }}
<span
v-if="question.CustomCalculateMark === 10 && question.ClinicalQuestionType === 'number' && questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId]"
style="margin-left: 10px">
{{ questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] }}~{{ questionForm.CreateTime ?
questionForm.CreateTime : parseTime(new Date(), '{y}-{m}-{d}') }}
</span>
<!-- 生日不能大于截止日期 -->
<span v-if="question.CustomCalculateMark === 11 && question.ClinicalQuestionType === 'number'" v-show="questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] > questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId]" style="margin-left: 10px;font-size: 12px;color:#f66">
<span v-if="question.CustomCalculateMark === 11 && question.ClinicalQuestionType === 'number'"
v-show="questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] > questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId]"
style="margin-left: 10px;font-size: 12px;color:#f66">
{{ $t('trials:components:clinicalDataQS:msg:birthDay') }}
</span>
</el-form-item>
</el-col>
<!-- eslint-disable vue/no-use-v-if-with-v-for -->
<!-- eslint-disable vue/valid-v-for -->
<el-col v-for="(item) in question.Childrens" :key="item.Id" v-if="question.Childrens && question.Childrens.length>0 && question.ClinicalQuestionType !== 'table'" :span="['group', 'summary', 'table'].includes(item.ClinicalQuestionType) || item.Childrens.length > 0 ? 24 : 12">
<QuestionFormItem
:key="item.Id"
:question="item"
:question-form="questionForm"
:trial-clinical-id="trialClinicalId"
@formItemNumberChange="formItemNumberChange"
@setFormItemData="setFormItemData"
@resetFormItemData="resetFormItemData"
/>
<el-col v-for="(item) in question.Childrens" :key="item.Id"
v-if="question.Childrens && question.Childrens.length > 0 && question.ClinicalQuestionType !== 'table'"
:span="['group', 'summary', 'table'].includes(item.ClinicalQuestionType) || item.Childrens.length > 0 ? 24 : 12">
<QuestionFormItem :key="item.Id" :question="item" :question-form="questionForm"
:trial-clinical-id="trialClinicalId" @formItemNumberChange="formItemNumberChange"
@setFormItemData="setFormItemData" @resetFormItemData="resetFormItemData" />
</el-col>
<el-dialog
v-if="addOrEdit.visible"
class="my_dialog"
:visible.sync="addOrEdit.visible"
:close-on-click-modal="false"
:title="addOrEdit.title"
width="400px"
append-to-body
>
<el-form
ref="tableQsForm"
v-loading="loading"
size="small"
:model="QuestionsForm"
>
<QuestionTableFormItem
v-for="(item) in QuestionsList"
:key="item.Id"
:question="item"
:question-form="QuestionsForm"
@setFormItemData="setFormItemData"
@resetFormItemData="resetFormItemData"
/>
<el-dialog v-if="addOrEdit.visible" class="my_dialog" :visible.sync="addOrEdit.visible"
:close-on-click-modal="false" :title="addOrEdit.title" width="400px" append-to-body>
<el-form ref="tableQsForm" v-loading="loading" size="small" :model="QuestionsForm">
<QuestionTableFormItem v-for="(item) in QuestionsList" :key="item.Id" :question="item"
:question-form="QuestionsForm" @setFormItemData="setFormItemData" @resetFormItemData="resetFormItemData" />
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<el-form-item>
<!-- 取消 -->
<el-button
size="small"
type="primary"
@click="addOrEdit.visible = false"
>
<el-button size="small" type="primary" @click="addOrEdit.visible = false">
{{ $t('common:button:cancel') }}
</el-button>
<!-- 保存 -->
@ -406,8 +313,6 @@ export default {
})
break
case 6:
console.log(this.questionForm[o.QuestionId])
console.log(this.questionForm)
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
@ -450,11 +355,16 @@ export default {
}
break
case 11:
if (parseFloat(this.getCurrentAgeByBirthDate2(this.questionForm[o.TableQuestionId], this.questionForm[o.QuestionId])) > 0) {
num = parseFloat(this.getCurrentAgeByBirthDate2(this.questionForm[o.TableQuestionId], this.questionForm[o.QuestionId]))
if (parseFloat(this.getCurrentAgeByBirthDate(this.questionForm[o.TableQuestionId])) > 0) {
num = parseFloat(this.getCurrentAgeByBirthDate(this.questionForm[o.TableQuestionId]))
} else {
num = 0
}
// if (parseFloat(this.getCurrentAgeByBirthDate2(this.questionForm[o.TableQuestionId], this.questionForm[o.QuestionId])) > 0) {
// num = parseFloat(this.getCurrentAgeByBirthDate2(this.questionForm[o.TableQuestionId], this.questionForm[o.QuestionId]))
// } else {
// num = 0
// }
break
}
} else {
@ -501,12 +411,10 @@ export default {
try {
if (isTable) {
this.calculationList.forEach((v, i) => {
console.log(v, i)
var find = v.CalculateQuestionList.filter(o => {
return o.QuestionId === questionId
})
// findnumber
console.log('find', find)
if (find) {
var num = this.logic(v)
if (num !== false) {
@ -520,7 +428,6 @@ export default {
return o.TableQuestionId === questionId
})
// findnumber
console.log('find', find)
// findnumber
if (find) {
var num = this.logic(v)
@ -598,32 +505,39 @@ export default {
}
}
}
.el-col-12 .el-col-12 {
width: 100%;
}
.criterion-form-item {
.el-form-item {
display: flex;
flex-direction: row;
align-items: flex-start;
}
.el-input {
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;
}
}
.clearfix:after {
content: '';
display: table;

View File

@ -1,42 +1,28 @@
<template>
<div v-loading="loading">
<QuestionsForm
v-if="clinicalUploadType === 2"
:data="data"
:trial-clinical-id="trialClinicalId"
:is-viewer="isViewer"
:visit-id="visitId"
:subject-id="subjectId"
:open-type="openType"
:system-clinical-id="systemClinicalId"
:trial-id="trialId"
:reading-id="readingId"
:clinical-form-id="clinicalFormId"
:clinical-data-level="clinicalDataLevel"
@close="close"
></QuestionsForm>
<uploadClinicalData v-else :subject-visit-id="subjectVisitId" :data="data" :enum-type="0" :allow-add-or-edit="true" @getList="() => {}">
<QuestionsForm v-if="clinicalUploadType === 2" :data="data" :trial-clinical-id="trialClinicalId"
:is-viewer="isViewer" :visit-id="visitId" :subject-id="subjectId" :open-type="openType"
:system-clinical-id="systemClinicalId" :trial-id="trialId" :reading-id="readingId"
:clinical-form-id="clinicalFormId" :clinical-data-level="clinicalDataLevel" @close="close"></QuestionsForm>
<uploadClinicalData v-else :subject-visit-id="subjectVisitId" :data="data" :enum-type="0" :allow-add-or-edit="true"
@getList="() => { }">
</uploadClinicalData>
<div class="base-dialog-footer" v-if="!isViewer && openType !== 'look' && [0, 1].includes(clinicalDataLevel)" style="text-align:right;margin-top:10px;">
<div class="base-dialog-footer" v-if="!isViewer && openType !== 'look' && [0, 1].includes(clinicalDataLevel)"
style="text-align:right;margin-top:10px;">
<!-- 保存 -->
<el-button size="small" type="primary" @click="submitClinicalForm">
{{ $t('common:button:submit') }}
</el-button>
</div>
<!-- 临床数据签名框 -->
<el-dialog
v-if="signVisible"
:visible.sync="signVisible"
:close-on-click-modal="false"
width="600px"
append-to-body
custom-class="base-dialog-wrapper"
>
<el-dialog v-if="signVisible" :visible.sync="signVisible" :close-on-click-modal="false" width="600px" append-to-body
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>
</div>
<SignForm ref="signForm" :sign-code-enum="signCode" :subject-visit-id="subjectVisitId" @closeDialog="closeSignDialog" />
<SignForm ref="signForm" :sign-code-enum="signCode" :subject-visit-id="subjectVisitId"
@closeDialog="closeSignDialog" />
</el-dialog>
</div>
</template>
@ -166,6 +152,4 @@ name: "index",
}
</script>
<style scoped>
</style>
<style scoped></style>

View File

@ -1,39 +1,19 @@
<template>
<el-dialog
:visible.sync="visible"
:fullscreen="true"
:close-on-click-modal="false"
:before-close="beforeClose"
:append-to-body="true"
v-loading="btnLoading"
class="downloadDicomAndNonedicom"
>
<el-dialog :visible.sync="visible" :fullscreen="true" :close-on-click-modal="false" :before-close="beforeClose"
:append-to-body="true" v-loading="btnLoading" class="downloadDicomAndNonedicom">
<span slot="title">{{ title }}</span>
<div class="top">
<span>{{ $t('download:top:title') }}</span>
<div class="btnBox">
<el-button
type="primary"
size="mini"
v-if="hasDicom"
@click.stop="getIRReadingDownloadStudyInfo('dicom')"
>
<el-button type="primary" size="mini" v-if="hasDicom" @click.stop="getIRReadingDownloadStudyInfo('dicom')">
{{ $t('download:button:downloadDicom') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasNonedicom"
@click.stop="getIRReadingDownloadStudyInfo('noneDicom')"
>
<el-button type="primary" size="mini" v-if="hasNonedicom"
@click.stop="getIRReadingDownloadStudyInfo('noneDicom')">
{{ $t('download:button:downloadNonedicom') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasDicom || hasNonedicom"
@click.stop="getIRReadingDownloadStudyInfo('all')"
>
<el-button type="primary" size="mini" v-if="hasDicom || hasNonedicom"
@click.stop="getIRReadingDownloadStudyInfo('all')">
{{ $t('download:button:downloadAll') }}
</el-button>
</div>
@ -43,16 +23,9 @@
<div v-html="$t('download:tip:message')"></div>
</div>
<!--上传列表@selection-change="handleSelectionChange"-->
<el-table
ref="dicomFilesTable"
v-adaptive="{ bottomOffset: 85 }"
height="100"
:data="list"
:loading="loading"
class="dicomFiles-table"
@sort-change="handleSortByColumn"
:default-sort="{ prop: 'TaskBlindName', order: 'descending' }"
>
<el-table ref="dicomFilesTable" v-adaptive="{ bottomOffset: 85 }" height="100" :data="list" :loading="loading"
class="dicomFiles-table" @sort-change="handleSortByColumn"
:default-sort="{ prop: 'TaskBlindName', order: 'descending' }">
<!-- <el-table-column
type="selection"
width="55"
@ -60,50 +33,28 @@
/> -->
<el-table-column type="index" width="40" />
<!--受试者-->
<el-table-column
:label="$t('download:table:subjectCode')"
min-width="130"
prop="SubjectCode"
show-overflow-tooltip
/>
<el-table-column :label="$t('download:table:subjectCode')" min-width="130" prop="SubjectCode"
show-overflow-tooltip />
<!--任务名称-->
<el-table-column
:label="$t('download:table:taskName')"
min-width="130"
show-overflow-tooltip
prop="TaskBlindName"
sortable="custom"
/>
<el-table-column :label="$t('download:table:taskName')" min-width="130" show-overflow-tooltip prop="TaskBlindName"
sortable="custom" />
<!--检查类型-->
<el-table-column
:label="$t('download:table:studyType')"
min-width="130"
show-overflow-tooltip
prop="IsDicom"
sortable="custom"
>
<el-table-column :label="$t('download:table:studyType')" min-width="130" show-overflow-tooltip prop="IsDicom"
sortable="custom">
<template slot-scope="scope">
<span>{{ $fd('IsDicom', scope.row.IsDicom) }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('download:table:orginalStudyListNum')"
min-width="150"
show-overflow-tooltip
>
<el-table-column :label="$t('download:table:orginalStudyListNum')" min-width="150" show-overflow-tooltip>
<template slot-scope="scope">
<el-button
v-if="
<el-button v-if="
(scope.row.IsDicom &&
scope.row.DicomStudyList &&
scope.row.DicomStudyList.length >= 1) ||
(!scope.row.IsDicom &&
scope.row.NoneDicomStudyList &&
scope.row.NoneDicomStudyList.length >= 1)
"
type="text"
@click="handleOpenDialog(scope.row)"
>
" type="text" @click="handleOpenDialog(scope.row)">
<span>{{
scope.row.IsDicom
? scope.row.DicomStudyList.length
@ -113,37 +64,19 @@
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column
:label="$t('common:action:action')"
fixed="right"
width="150"
>
<el-table-column :label="$t('common:action:action')" fixed="right" width="150">
<template slot-scope="scope">
<!--预览--->
<el-button
circle
icon="el-icon-view"
:title="$t('download:button:preview')"
@click.stop="preview(scope.row)"
/>
<el-button circle icon="el-icon-view" :title="$t('download:button:preview')"
@click.stop="preview(scope.row)" />
<!--下载--->
<el-button
circle
icon="el-icon-download"
:title="$t('download:button:download')"
@click.stop="getIRReadingDownloadStudyInfo('one', scope.row)"
/>
<el-button circle icon="el-icon-download" :title="$t('download:button:download')"
@click.stop="getIRReadingDownloadStudyInfo('one', scope.row)" />
</template>
</el-table-column>
</el-table>
<study-view
v-if="model_cfg.visible"
:model_cfg="model_cfg"
:modelList="modelList"
:bodyPart="bodyPart"
:IsDicom="IsDicom"
:visitTaskId="modelTaskId"
/>
<study-view v-if="model_cfg.visible" :model_cfg="model_cfg" :modelList="modelList" :bodyPart="bodyPart"
:IsDicom="IsDicom" :visitTaskId="modelTaskId" />
</el-dialog>
</template>
<script>
@ -358,7 +291,8 @@ export default {
name = `${list[0].SubjectCode}_${list[0].TaskBlindName}.zip`
}
if (this.IsReadingTaskViewInOrder === 0) {
name = `${list[0].TaskBlindName}.zip`
// name = `${list[0].TaskBlindName}.zip`
name = `${list[0].SubjectCode}_${list[0].TaskBlindName}.zip`
}
list.forEach((data) => {
if (data.StudyList && data.StudyList.length > 0) {
@ -370,10 +304,8 @@ export default {
series.InstancePathList.forEach((instance) => {
let fileName = instance.Path.split('/').pop()
let obj = {
name: `${data.SubjectCode}/${
data.TaskBlindName
}/${this.$fd('IsDicom', true)}/${
study.StudyCode
name: `${data.SubjectCode}/${data.TaskBlindName
}/${this.$fd('IsDicom', true)}/${study.StudyCode
}/${fileName}`,
url: this.OSSclientConfig.basePath + instance.Path,
}
@ -500,10 +432,12 @@ export default {
justify-content: space-between;
margin: 10px 0;
}
.tip {
display: flex;
align-items: flex-start;
margin-top: 5px;
i {
margin: 3px 5px 0 0;
}

View File

@ -4,123 +4,63 @@
<span>{{ $t('upload:dicom:title') }}</span>
<div class="tip">
<i class="el-icon-warning-outline"></i>
<div
v-html="$t(`upload:dicom:tip:message${isReadingTaskViewInOrder}`)"
></div>
<div v-html="$t(`upload:dicom:tip:message${isReadingTaskViewInOrder}`)"></div>
</div>
</div>
<!--检查列表-->
<el-table :data="list" style="width: 100%" height="300" :loading="loading">
<!--受试者-->
<el-table-column
prop="SubjectCode"
:label="$t('upload:dicom:table:subjectCode')"
/>
<el-table-column prop="SubjectCode" :label="$t('upload:dicom:table:subjectCode')" />
<!--任务名称-->
<el-table-column
prop="TaskBlindName"
:label="$t('upload:dicom:table:taskBlindName')"
/>
<el-table-column prop="TaskBlindName" :label="$t('upload:dicom:table:taskBlindName')" />
<!--原始检查数-->
<el-table-column
prop="OrginalStudyList"
:label="$t('upload:dicom:table:orginalStudyListNum')"
>
<el-table-column prop="OrginalStudyList" :label="$t('upload:dicom:table:orginalStudyListNum')">
<template slot-scope="scope">
<el-button
v-if="
<el-button v-if="
scope.row.OrginalStudyList &&
scope.row.OrginalStudyList.length >= 1
"
type="text"
@click="handleOpenDialog(scope.row, 'OrginalStudyList')"
>
" type="text" @click="handleOpenDialog(scope.row, 'OrginalStudyList')">
<span>{{ scope.row.OrginalStudyList.length }}</span>
</el-button>
<span v-else>0</span>
</template>
</el-table-column>
<!--后处理检查数-->
<el-table-column
prop="UploadStudyList"
:label="$t('upload:dicom:table:uploadStudyListNum')"
>
<el-table-column prop="UploadStudyList" :label="$t('upload:dicom:table:uploadStudyListNum')">
<template slot-scope="scope">
<el-button
v-if="
<el-button v-if="
scope.row.UploadStudyList && scope.row.UploadStudyList.length >= 1
"
type="text"
@click="handleOpenDialog(scope.row, 'UploadStudyList', true)"
>
" type="text" @click="handleOpenDialog(scope.row, 'UploadStudyList', true)">
<span>{{ scope.row.UploadStudyList.length }}</span>
</el-button>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column
:label="$t('common:action:action')"
fixed="right"
width="180"
>
<el-table-column :label="$t('common:action:action')" fixed="right" width="180">
<template slot-scope="scope">
<div class="btnBox">
<!--上传--->
<form
id="inputForm"
:ref="`uploadForm_${scope.row.Id}`"
enctype="multipart/form-data"
>
<form id="inputForm" :ref="`uploadForm_${scope.row.Id}`" enctype="multipart/form-data">
<div class="form-group" style="margin-right: 10px">
<div
:id="`directoryInputWrapper_${scope.row.Id}`"
class="btn btn-link file-input"
>
<el-button
circle
icon="el-icon-upload2"
:disabled="btnLoading"
:loading="btnLoading"
:title="$t('upload:dicom:button:upload')"
/>
<input
:title="$t('upload:dicom:button:upload')"
type="file"
:name="`file_${scope.row.VisitTaskId}`"
:ref="`pathClear_${scope.row.VisitTaskId}`"
:disabled="btnLoading"
webkitdirectory
multiple
@change="
<div :id="`directoryInputWrapper_${scope.row.Id}`" class="btn btn-link file-input">
<el-button circle icon="el-icon-upload2" :disabled="btnLoading" :loading="btnLoading"
:title="$t('upload:dicom:button:upload')" />
<input :title="$t('upload:dicom:button:upload')" type="file" :name="`file_${scope.row.VisitTaskId}`"
:ref="`pathClear_${scope.row.VisitTaskId}`" :disabled="btnLoading" webkitdirectory multiple @change="
($event) => beginScanFiles($event, scope.row.VisitTaskId)
"
/>
" />
</div>
</div>
</form>
<!--预览--->
<el-button
circle
icon="el-icon-view"
:disabled="
!scope.row.UploadStudyList ||
<el-button circle icon="el-icon-view" :disabled="!scope.row.UploadStudyList ||
scope.row.UploadStudyList.length <= 0
"
@click.stop="handleViewReadingImages(scope.row)"
:title="$t('upload:dicom:button:preview')"
/>
" @click.stop="handleViewReadingImages(scope.row)" :title="$t('upload:dicom:button:preview')" />
<!--删除--->
<el-button
circle
:disabled="
!scope.row.UploadStudyList ||
<el-button circle :disabled="!scope.row.UploadStudyList ||
scope.row.UploadStudyList.length <= 0 ||
scope.row.ReadingTaskState === 2
"
icon="el-icon-delete"
:title="$t('upload:dicom:button:delete')"
@click.stop="remove(scope.row)"
/>
" icon="el-icon-delete" :title="$t('upload:dicom:button:delete')" @click.stop="remove(scope.row)" />
</div>
</template>
</el-table-column>
@ -134,38 +74,19 @@
<form id="inputForm" ref="uploadForm" enctype="multipart/form-data">
<div class="form-group">
<div id="directoryInputWrapper" class="btn btn-link file-input">
<el-button
type="primary"
:disabled="btnLoading"
:loading="btnLoading"
size="mini"
>
<el-button type="primary" :disabled="btnLoading" :loading="btnLoading" size="mini">
{{ $t('upload:dicom:button:batchUpload') }}
</el-button>
<input
type="file"
name="file"
ref="pathClear"
:disabled="btnLoading"
webkitdirectory
multiple
title=""
@change="beginScanFiles($event)"
/>
<input type="file" name="file" ref="pathClear" :disabled="btnLoading" webkitdirectory multiple title=""
@change="beginScanFiles($event)" />
</div>
</div>
</form>
</div>
</div>
<!--上传列表-->
<el-table
ref="dicomFilesTable"
v-adaptive="{ bottomOffset: 80 }"
height="100"
:data="uploadQueues"
class="dicomFiles-table"
@selection-change="handleSelectionChange"
>
<el-table ref="dicomFilesTable" v-adaptive="{ bottomOffset: 80 }" height="100" :data="uploadQueues"
class="dicomFiles-table" @selection-change="handleSelectionChange">
<el-table-column type="index" width="40" />
<el-table-column min-width="200" show-overflow-tooltip>
<template slot="header">
@ -182,28 +103,21 @@
<div style="line-height: 15px">
<div>
<div>
<span v-if="scope.row.dicomInfo.accNumber"
><span style="font-weight: 500">Acc:</span>
{{ scope.row.dicomInfo.accNumber }}</span
>
<span v-if="scope.row.dicomInfo.accNumber"><span style="font-weight: 500">Acc:</span>
{{ scope.row.dicomInfo.accNumber }}</span>
<span v-else style="color: #f44336">N/A</span>
</div>
<div style="display: inline-block; margin-right: 2px">
<span v-if="scope.row.dicomInfo.modality.length > 0">
{{ scope.row.dicomInfo.modality.join('、') }},</span
>
{{ scope.row.dicomInfo.modality.join('、') }},</span>
<span v-else style="color: #f44336">N/A,</span>
</div>
<div style="display: inline-block; margin-right: 2px">
<span v-if="scope.row.seriesList.length"
>{{ scope.row.seriesList.length }} Series,</span
>
<span v-if="scope.row.seriesList.length">{{ scope.row.seriesList.length }} Series,</span>
<span v-else style="color: #f44336">N/A,</span>
</div>
<div style="display: inline-block">
<span v-if="scope.row.fileList.length"
>{{ scope.row.fileList.length }} Instances</span
>
<span v-if="scope.row.fileList.length">{{ scope.row.fileList.length }} Instances</span>
<span v-else style="color: #f44336">N/A</span>
</div>
</div>
@ -217,8 +131,7 @@
</div>
<div style="display: inline-block">
<span v-if="scope.row.dicomInfo.description">
{{ scope.row.dicomInfo.description }}</span
>
{{ scope.row.dicomInfo.description }}</span>
<span v-else style="color: #f44336">N/A</span>
</div>
</div>
@ -242,16 +155,12 @@
<template slot-scope="scope">
<div style="line-height: 15px">
<div>
<span v-if="scope.row.dicomInfo.patientId"
><span style="font-weight: 500">PID: </span
>{{ scope.row.dicomInfo.patientId }}</span
>
<span v-if="scope.row.dicomInfo.patientId"><span style="font-weight: 500">PID: </span>{{
scope.row.dicomInfo.patientId }}</span>
<span v-else style="color: #f44336">N/A</span>
</div>
<div>
<span
:class="[scope.row.dicomInfo.patientName ? '' : 'colorOfRed']"
>
<span :class="[scope.row.dicomInfo.patientName ? '' : 'colorOfRed']">
{{
scope.row.dicomInfo.patientName
? scope.row.dicomInfo.patientName
@ -260,9 +169,7 @@
</span>
</div>
<div>
<span
:class="[scope.row.dicomInfo.patientSex ? '' : 'colorOfRed']"
>
<span :class="[scope.row.dicomInfo.patientSex ? '' : 'colorOfRed']">
{{
scope.row.dicomInfo.patientSex
? scope.row.dicomInfo.patientSex
@ -270,9 +177,7 @@
}},
</span>
<span
:class="[scope.row.dicomInfo.patientAge ? '' : 'colorOfRed']"
>
<span :class="[scope.row.dicomInfo.patientAge ? '' : 'colorOfRed']">
{{
scope.row.dicomInfo.patientAge
? scope.row.dicomInfo.patientAge
@ -280,11 +185,9 @@
}},
</span>
<span
:class="[
<span :class="[
scope.row.dicomInfo.patientBirthDate ? '' : 'colorOfRed',
]"
>
]">
{{
scope.row.dicomInfo.patientBirthDate
? scope.row.dicomInfo.patientBirthDate
@ -295,21 +198,14 @@
</div>
</template>
</el-table-column>
<el-table-column
:label="$t('trials:uploadDicomList:table:failedFileCount')"
min-width="150"
show-overflow-tooltip
>
<el-table-column :label="$t('trials:uploadDicomList:table:failedFileCount')" min-width="150"
show-overflow-tooltip>
<template slot-scope="scope">
<el-progress
color="#409eff"
:percentage="
(
<el-progress color="#409eff" :percentage="(
(scope.row.dicomInfo.uploadFileSize * 100) /
scope.row.dicomInfo.fileSize
(scope.row.dicomInfo.fileSize ? scope.row.dicomInfo.fileSize : 1)
).toFixed(2) * 1
"
/>
" />
<span>
{{ $t('trials:uploadDicomList:table:uploadNow')
}}{{ scope.row.dicomInfo.failedFileCount }}/{{
@ -324,85 +220,52 @@
</template>
</el-table-column>
<el-table-column
:label="$t('trials:uploadDicomList:table:status')"
min-width="140"
show-overflow-tooltip
>
<el-table-column :label="$t('trials:uploadDicomList:table:status')" min-width="140" show-overflow-tooltip>
<template slot-scope="scope">
<span
v-if="
<span v-if="
!scope.row.dicomInfo.failedFileCount &&
!scope.row.dicomInfo.isInit
"
>
{{ $t('trials:uploadDicomList:table:status1') }}</span
>
<span
style="color: #409eff"
v-else-if="
">
{{ $t('trials:uploadDicomList:table:status1') }}</span>
<span style="color: #409eff" v-else-if="
!scope.row.dicomInfo.failedFileCount &&
scope.row.dicomInfo.isInit &&
btnLoading
"
>{{ $t('trials:uploadDicomList:table:status2') }}</span
>
<span
style="color: #409eff"
v-else-if="
">{{ $t('trials:uploadDicomList:table:status2') }}</span>
<span style="color: #409eff" v-else-if="
scope.row.dicomInfo.failedFileCount <
scope.row.dicomInfo.fileCount && !scope.row.uploadState.record
"
>{{ $t('trials:uploadDicomList:table:status2') }}</span
>
<span
style="color: #2cc368"
v-else-if="
">{{ $t('trials:uploadDicomList:table:status2') }}</span>
<span style="color: #2cc368" v-else-if="
scope.row.dicomInfo.failedFileCount ===
scope.row.dicomInfo.fileCount
"
>{{ $t('trials:uploadDicomList:table:status3') }}</span
>
<span
style="color: #f66"
v-else-if="
">{{ $t('trials:uploadDicomList:table:status3') }}</span>
<span style="color: #f66" v-else-if="
scope.row.uploadState.record &&
scope.row.uploadState.record.fileCount === 0
"
>{{ $t('trials:uploadDicomList:table:status5') }}</span
>
">{{ $t('trials:uploadDicomList:table:status5') }}</span>
<span style="color: #f66" v-else>{{
$t('trials:uploadDicomList:table:Failed')
}}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('trials:uploadDicomList:table:record')"
min-width="140"
show-overflow-tooltip
>
<el-table-column :label="$t('trials:uploadDicomList:table:record')" min-width="140" show-overflow-tooltip>
<template slot-scope="scope">
<el-tooltip placement="top" v-if="scope.row.uploadState.record">
<div slot="content">
<div style="max-height: 500px; overflow-y: auto">
{{ $t('trials:uploadDicomList:table:Existed') }}:
<div v-if="scope.row.uploadState.record.Existed.length">
<div
v-for="item of scope.row.uploadState.record.Existed"
:key="item"
style="font-size: 12px; color: #baa72a"
>
<div v-for="item of scope.row.uploadState.record.Existed" :key="item"
style="font-size: 12px; color: #baa72a">
{{ item }}
</div>
</div>
<div v-else>&nbsp;</div>
{{ $t('trials:uploadDicomList:table:Uploaded') }}:
<div v-if="scope.row.uploadState.record.Uploaded.length">
<div
v-for="item of scope.row.uploadState.record.Uploaded"
:key="item"
style="font-size: 12px; color: #24b837"
>
<div v-for="item of scope.row.uploadState.record.Uploaded" :key="item"
style="font-size: 12px; color: #24b837">
{{ item }}
</div>
</div>
@ -410,11 +273,8 @@
<br />
{{ $t('trials:uploadDicomList:table:Failed') }}:
<div v-if="scope.row.uploadState.record.Failed.length">
<div
v-for="item of scope.row.uploadState.record.Failed"
:key="item"
style="font-size: 12px; color: #f66"
>
<div v-for="item of scope.row.uploadState.record.Failed" :key="item"
style="font-size: 12px; color: #f66">
{{ item }}
</div>
</div>
@ -438,16 +298,8 @@
</template>
</el-table-column>
</el-table>
<study-view
v-if="model_cfg.visible"
:model_cfg="model_cfg"
:IsDicom="true"
:bodyPart="bodyPart"
:modelList="modelList"
:isUpload="openIsUpload"
:TrialModality="TrialModality"
@getList="getList"
/>
<study-view v-if="model_cfg.visible" :model_cfg="model_cfg" :IsDicom="true" :bodyPart="bodyPart"
:modelList="modelList" :isUpload="openIsUpload" :TrialModality="TrialModality" @getList="getList" />
</div>
</template>
<script>
@ -834,6 +686,7 @@ export default {
var studyUid = data.string('x0020000d')
if (!studyUid) return resolve()
var pixelDataElement = data.elements.x7fe00010
if (!pixelDataElement && modality !== 'SR') return resolve()
var studyIndex = 0
while (
studyIndex < scope.uploadQueues.length &&
@ -936,19 +789,19 @@ export default {
) {
++instanceIndex
}
if (instanceIndex >= fileList.length) {
fileList.push({
instanceUid: instanceUid,
file: file,
})
}
scope.uploadQueues[studyIndex].dicomInfo.fileCount = fileList.length
scope.uploadQueues[studyIndex].dicomInfo.fileSize = fileList.reduce(
(prev, next) => {
return prev + next.file.size
},
0
)
// if (instanceIndex >= fileList.length) {
// fileList.push({
// instanceUid: instanceUid,
// file: file,
// })
// }
// scope.uploadQueues[studyIndex].dicomInfo.fileCount = fileList.length
// scope.uploadQueues[studyIndex].dicomInfo.fileSize = fileList.reduce(
// (prev, next) => {
// return prev + next.file.size
// },
// 0
// )
var seriesUid = data.string('x0020000e')
var seriesList = scope.uploadQueues[studyIndex].seriesList
@ -1046,6 +899,19 @@ export default {
}
instanceList.push(instanceItem)
}
if (instanceIndex >= fileList.length) {
fileList.push({
instanceUid: instanceUid,
file: file,
})
}
scope.uploadQueues[studyIndex].dicomInfo.fileCount = fileList.length
scope.uploadQueues[studyIndex].dicomInfo.fileSize = fileList.reduce(
(prev, next) => {
return prev + next.file.size
},
0
)
resolve()
} catch (error) {
console.log(error)
@ -1266,10 +1132,8 @@ export default {
dicomInfo.failedFileCount++
Record.FileCount++
} else {
let path = `/${params.trialId}/Image/${
params.subjectId
}/${params.subjectVisitId}/${
dicomInfo.visitTaskId
let path = `/${params.trialId}/Image/${params.subjectId
}/${params.subjectVisitId}/${dicomInfo.visitTaskId
}/${scope.getGuid(
dicomInfo.studyUid +
v.seriesUid +
@ -1546,16 +1410,19 @@ export default {
align-items: center;
justify-content: space-between;
}
.btnBox,
.form-group {
display: flex;
align-items: center;
}
#inputForm .file-input {
position: relative;
overflow: hidden;
display: inline-block;
}
#inputForm .file-input input[type='file'] {
position: absolute;
top: 0;
@ -1565,10 +1432,12 @@ export default {
opacity: 0;
cursor: pointer;
}
.tip {
display: flex;
align-items: flex-start;
margin-top: 5px;
i {
margin: 3px 5px 0 0;
}

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'

View File

@ -61,6 +61,12 @@ export const constantRoutes = [
name: 'Resetpassword',
hidden: true
},
{
path: '/trials/trials-panel/reading/readingTracking/ReadOrder',
component: () => import('@/views/trials/trials-panel/reading/read-order/index'),
name: 'ReadOrder',
hidden: true
},
{
path: '/recompose',
component: () => import('@/views/recompose/index'),

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

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
})

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
}

View File

@ -50,7 +50,8 @@ service.interceptors.response.use(
const a = document.createElement('a')
// xls类型: application/vnd.ms-excel
// xlsx类型application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
const href = URL.createObjectURL(new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' }))
// const href = URL.createObjectURL(new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' }))
const href = URL.createObjectURL(new Blob([res], { type: response.headers['content-type'] }))
a.download = fileName
a.href = href
a.click()

View File

@ -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()

View File

@ -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()

View File

@ -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) {

View File

@ -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

View File

@ -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,

View File

@ -7,74 +7,28 @@
<el-button type="primary" size="mini" @click="handleAdd"></el-button>
</span>
</div>
<el-table
v-loading="loading"
v-adaptive="{bottomOffset:45}"
:data="list"
stripe
size="small"
height="100"
>
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 45 }" :data="list" stripe size="small" height="100"
@sort-change="handleSortByColumn">
<el-table-column type="index" width="60" />
<el-table-column
v-if="!~$route.path.indexOf('select')"
prop="Code"
label="字典键值"
min-width="180"
show-overflow-tooltip
/>
<el-table-column
prop="ValueCN"
label="中文值"
min-width="180"
show-overflow-tooltip
/>
<el-table-column
prop="Value"
label="英文值"
min-width="180"
show-overflow-tooltip
/>
<el-table-column
prop="ChildGroup"
label="分组"
min-width="180"
show-overflow-tooltip
/>
<el-table-column
prop="ShowOrder"
label="显示顺序"
min-width="180"
show-overflow-tooltip
/>
<el-table-column
prop="Description"
label="描述"
min-width="180"
show-overflow-tooltip
/>
<el-table-column v-if="!~$route.path.indexOf('select')" prop="Code" label="字典键值" min-width="180"
show-overflow-tooltip sortable='custom' />
<el-table-column prop="ValueCN" label="中文值" min-width="180" show-overflow-tooltip sortable='custom' />
<el-table-column prop="Value" label="英文值" min-width="180" show-overflow-tooltip sortable='custom' />
<el-table-column prop="ChildGroup" label="分组" min-width="180" show-overflow-tooltip sortable='custom' />
<el-table-column prop="ShowOrder" label="显示顺序" min-width="180" show-overflow-tooltip sortable='custom' />
<el-table-column prop="Description" label="描述" min-width="180" show-overflow-tooltip sortable='custom' />
<el-table-column label="是否可用" width="100" fixed="right">
<template slot-scope="scope">
<el-switch
v-model="scope.row.IsEnable"
:active-value="true"
:inactive-value="false"
@change="(event) => {return switchChange(event, scope.row)}"
/>
<el-switch v-model="scope.row.IsEnable" :active-value="true" :inactive-value="false"
@change="(event) => { return switchChange(event, scope.row) }" />
</template>
</el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
@click="handleEdit(scope.row)"
>
<el-button type="text" @click="handleEdit(scope.row)">
编辑
</el-button>
<el-button
type="text"
@click="handleDelete(scope.row)"
>
<el-button type="text" @click="handleDelete(scope.row)">
删除
</el-button>
</template>
@ -91,7 +45,8 @@ import DictionaryChildAddOrUpdateForm from './DictionaryChildAddOrUpdateForm'
const searchDataDefault = () => {
return {
parentId: ''
Asc: true,
SortField: 'ShowOrder',
}
}
export default {
@ -121,6 +76,17 @@ export default {
this.getList()
},
methods: {
//
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()
},
handleChild(row) {
this.drawerChild = true
this.getDictionaryChildList(row.Id)
@ -172,7 +138,8 @@ export default {
//
getList() {
this.loading = true
getDictionaryChildList(this.parent.Id).then(res => {
this.searchData.ParentId = this.parent.Id
getDictionaryChildList(this.searchData).then(res => {
this.loading = false
this.list = res.Result
}).catch(() => { this.loading = false })
@ -190,6 +157,4 @@ export default {
}
</script>
<style scoped>
</style>
<style scoped></style>

View File

@ -5,151 +5,81 @@
</div>
<div>
<!-- 配置 -->
<el-button
size="mini"
type="primary"
:disabled="isCompleteConfig"
@click="handleAdd"
style="margin-right: 10px;"
>
<el-button size="mini" type="primary" :disabled="isCompleteConfig" @click="handleAdd"
style="margin-right: 10px;">
{{ $t('dictionary:template:criterionDictionary:button:config') }}
</el-button>
</div>
</div>
<el-table
v-loading="loading"
style="width: 100%"
:data="list"
stripe
>
<el-table v-loading="loading" style="width: 100%" :data="list" stripe>
<!-- 序号 -->
<el-table-column
prop=""
label=""
width="50"
>
<el-table-column prop="" label="" width="50">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<!-- 字典表名 -->
<el-table-column
prop="Code"
:label="$t('dictionary:template:criterionDictionary:table:code')"
show-overflow-tooltip
>
<el-table-column prop="Code" :label="$t('dictionary:template:criterionDictionary:table:code')"
show-overflow-tooltip>
</el-table-column>
<!-- 描述 -->
<el-table-column
prop="Description"
:label="$t('dictionary:template:criterionDictionary:table:description')"
show-overflow-tooltip
>
<el-table-column prop="Description" :label="$t('dictionary:template:criterionDictionary:table:description')"
show-overflow-tooltip>
</el-table-column>
<!-- 子项数量 -->
<el-table-column
prop="Count"
:label="$t('dictionary:template:criterionDictionary:table:count')"
show-overflow-tooltip
>
<el-table-column prop="Count" :label="$t('dictionary:template:criterionDictionary:table:count')"
show-overflow-tooltip>
</el-table-column>
<!-- 排序 -->
<el-table-column
prop="ShowOrder"
:label="$t('dictionary:template:criterionDictionary:table:showOrder')"
show-overflow-tooltip
>
<el-table-column prop="ShowOrder" :label="$t('dictionary:template:criterionDictionary:table:showOrder')"
show-overflow-tooltip>
</el-table-column>
<!-- 操作 -->
<el-table-column
prop="Description"
:label="$t('common:action:action')"
show-overflow-tooltip
>
<el-table-column prop="Description" :label="$t('common:action:action')" show-overflow-tooltip>
<template slot-scope="scope">
<!-- 配置 -->
<el-button :disabled="isCompleteConfig" type="text" @click="openChildren(scope.row)">
<el-button type="text" @click="openChildren(scope.row)">
{{ $t('dictionary:template:criterionDictionary:button:config') }}
</el-button>
<!-- 删除 -->
<el-button
type="text"
:disabled="isCompleteConfig"
@click="handleDelete(scope.row)"
>
<el-button type="text" :disabled="isCompleteConfig" @click="handleDelete(scope.row)">
{{ $t('common:button:delete') }}
</el-button>
</template>
</el-table-column>
</el-table>
<el-drawer
:title="drawer_cfg.title"
:append-to-body="true"
:modal-append-to-body="false"
:visible.sync="drawer_cfg.drawerChild"
direction="rtl"
size="80%"
>
<CriterionDictionaryConfig v-if="drawer_cfg.drawerChild" @getList="getList" :criterionId="criterionId" :parentCode="drawer_cfg.title"></CriterionDictionaryConfig>
<el-drawer :title="drawer_cfg.title" :append-to-body="true" :modal-append-to-body="false"
:visible.sync="drawer_cfg.drawerChild" direction="rtl" size="80%">
<CriterionDictionaryConfig v-if="drawer_cfg.drawerChild" @getList="getList" :isCompleteConfig="isCompleteConfig"
:criterionId="criterionId" :parentCode="drawer_cfg.title"></CriterionDictionaryConfig>
</el-drawer>
<el-drawer
:title="drawer_cfg2.title"
:append-to-body="true"
:modal-append-to-body="false"
:visible.sync="drawer_cfg2.drawerChild"
direction="rtl"
size="80%"
>
<el-drawer :title="drawer_cfg2.title" :append-to-body="true" :modal-append-to-body="false"
:visible.sync="drawer_cfg2.drawerChild" direction="rtl" size="80%">
<div style="text-align: right;">
<el-button
size="mini"
type="primary"
@click="handleSave"
v-loading="loading"
>
<el-button size="mini" type="primary" @click="handleSave" v-loading="loading">
{{ $t('common:button:save') }}
</el-button>
</div>
<el-table
v-loading="loading"
v-adaptive="{bottomOffset:0}"
height="100"
ref="multipleTable"
style="width: 100%"
:data="dicList"
stripe
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55">
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 0 }" height="100" ref="multipleTable" style="width: 100%"
:data="dicList" stripe @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column
width="55">
<el-table-column width="55">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<!-- 字典表名 -->
<el-table-column
prop="Code"
:label="$t('dictionary:template:criterionDictionary:table:code')"
show-overflow-tooltip
>
<el-table-column prop="Code" :label="$t('dictionary:template:criterionDictionary:table:code')"
show-overflow-tooltip>
</el-table-column>
<!-- 描述 -->
<el-table-column
prop="Description"
:label="$t('dictionary:template:criterionDictionary:table:description')"
show-overflow-tooltip
>
<el-table-column prop="Description" :label="$t('dictionary:template:criterionDictionary:table:description')"
show-overflow-tooltip>
</el-table-column>
<!-- 排序 -->
<el-table-column
prop="ShowOrder"
:label="$t('dictionary:template:criterionDictionary:table:showOrder')"
show-overflow-tooltip
>
<el-table-column prop="ShowOrder" :label="$t('dictionary:template:criterionDictionary:table:showOrder')"
show-overflow-tooltip>
</el-table-column>
</el-table>
</el-drawer>

View File

@ -4,134 +4,74 @@
<div>
</div>
<div>
<el-button
size="mini"
type="primary"
@click="handleAdd"
style="margin-right: 10px;"
>
<el-button size="mini" type="primary" @click="handleAdd" style="margin-right: 10px;" v-if="!isCompleteConfig">
{{ $t('dictionary:template:criterionDictionary:button:config') }}
</el-button>
</div>
</div>
<el-table
v-loading="loading"
v-adaptive="{bottomOffset:0}"
height="100"
style="width: 100%"
:data="list"
stripe
>
<el-table-column
prop=""
label=""
width="50"
>
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 0 }" height="100" style="width: 100%" :data="list" stripe>
<el-table-column prop="" label="" width="50">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<!-- 键值 -->
<el-table-column
prop="Code"
:label="$t('dictionary:template:criterionDictionary:table:code')"
show-overflow-tooltip
/>
<el-table-column prop="Code" :label="$t('dictionary:template:criterionDictionary:table:code')"
show-overflow-tooltip />
<!-- 中文值 -->
<el-table-column
prop="ValueCN"
:label="$t('dictionary:template:criterionDictionary:table:valueCN')"
show-overflow-tooltip
>
<el-table-column prop="ValueCN" :label="$t('dictionary:template:criterionDictionary:table:valueCN')"
show-overflow-tooltip>
</el-table-column>
<!-- 英文值 -->
<el-table-column
prop="Value"
:label="$t('dictionary:template:criterionDictionary:table:value')"
show-overflow-tooltip
>
<el-table-column prop="Value" :label="$t('dictionary:template:criterionDictionary:table:value')"
show-overflow-tooltip>
</el-table-column>
<!-- 描述 -->
<el-table-column
prop="Description"
:label="$t('dictionary:template:criterionDictionary:table:description')"
show-overflow-tooltip
>
<el-table-column prop="Description" :label="$t('dictionary:template:criterionDictionary:table:description')"
show-overflow-tooltip>
</el-table-column>
<!-- 分组 -->
<el-table-column
prop="Description"
:label="$t('dictionary:template:criterionDictionary:table:group')"
show-overflow-tooltip
>
<el-table-column prop="Description" :label="$t('dictionary:template:criterionDictionary:table:group')"
show-overflow-tooltip>
<template slot-scope="scope">
<div>
<el-radio-group v-model="scope.row.CrterionDictionaryGroup" @change="(v) => {crterionDictionaryGroupChange(v, scope.row)}" size="mini">
<el-radio-button v-for="item of $d.CrterionDictionaryGroup" :label="item.value" :key="item.id">{{item.label}}</el-radio-button>
<div v-if="!isCompleteConfig">
<el-radio-group v-model="scope.row.CrterionDictionaryGroup"
@change="(v) => { crterionDictionaryGroupChange(v, scope.row) }" size="mini">
<el-radio-button v-for="item of $d.CrterionDictionaryGroup" :label="item.value" :key="item.id">{{
item.label }}</el-radio-button>
</el-radio-group>
</div>
<div v-else>{{ $fd('CrterionDictionaryGroup', scope.row.CrterionDictionaryGroup) }}</div>
</template>
</el-table-column>
</el-table>
<el-dialog
v-if="config.visible"
:visible.sync="config.visible"
:close-on-click-modal="false"
:title="config.title"
width="90%"
append-to-body
>
<el-dialog v-if="config.visible" :visible.sync="config.visible" :close-on-click-modal="false" :title="config.title"
width="90%" append-to-body>
<div>
<div style="text-align: right;">
<el-button
size="mini"
type="primary"
@click="handleSave"
v-loading="loading"
>
<el-button size="mini" type="primary" @click="handleSave" v-loading="loading">
{{ $t('common:button:save') }}
</el-button>
</div>
<el-table
v-loading="loading"
v-adaptive="{bottomOffset:100}"
height="100"
ref="multipleTable"
:data="$d[parentCode]"
stripe
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55">
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 100 }" height="100" ref="multipleTable"
:data="$d[parentCode]" stripe @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
<!-- 键值 -->
<el-table-column
prop="raw.Code"
:label="$t('dictionary:template:criterionDictionary:table:code')"
show-overflow-tooltip
>
<el-table-column prop="raw.Code" :label="$t('dictionary:template:criterionDictionary:table:code')"
show-overflow-tooltip>
</el-table-column>
<!-- 中文值 -->
<el-table-column
prop="raw.ValueCN"
:label="$t('dictionary:template:criterionDictionary:table:valueCN')"
show-overflow-tooltip
>
<el-table-column prop="raw.ValueCN" :label="$t('dictionary:template:criterionDictionary:table:valueCN')"
show-overflow-tooltip>
</el-table-column>
<!-- 英文值 -->
<el-table-column
prop="raw.Value"
:label="$t('dictionary:template:criterionDictionary:table:value')"
show-overflow-tooltip
>
<el-table-column prop="raw.Value" :label="$t('dictionary:template:criterionDictionary:table:value')"
show-overflow-tooltip>
</el-table-column>
<!-- 描述 -->
<el-table-column
prop="raw.Description"
:label="$t('dictionary:template:criterionDictionary:table:description')"
show-overflow-tooltip
>
<el-table-column prop="raw.Description"
:label="$t('dictionary:template:criterionDictionary:table:description')" show-overflow-tooltip>
</el-table-column>
</el-table>
</div>
@ -150,6 +90,10 @@ export default {
parentCode: {
type: String,
required: true
},
isCompleteConfig: {
type: Boolean,
default: false
}
},
data() {

View File

@ -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-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-form-item :label="$t('trials:auditRecord:table:criterion')" v-if="form.IsDistinguishCriteria"
prop="CriterionTypeList">
<el-select v-model="form.CriterionTypeList" clearable class="mr" multiple>
<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: '',
@ -385,6 +271,7 @@ export default {
IsAutoSend: true,
CriterionTypeEnum: null,
EmailDelaySeconds: null,
CriterionTypeList: []
},
rules: {
Code: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] }],
@ -415,8 +302,8 @@ export default {
EmailHtmlContent: [
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] },
],
CriterionTypeEnum: [
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] },
CriterionTypeList: [
{ required: true, type: 'array', message: this.$t('common:ruleMessage:select'), trigger: ['blur'] },
],
},
scenarioOption: [],
@ -440,6 +327,9 @@ export default {
}
},
methods: {
highlighter(code) {
return highlight(code, languages.js);
},
showDialog() {
this.expression = this.form.EmailCron // cron UI
this.showCron = true
@ -563,3 +453,13 @@ export default {
},
}
</script>
<style lang="scss" scoped>
.html_temp {
display: flex;
.my-editor {
border: 1px solid #333;
}
}
</style>

View File

@ -67,20 +67,26 @@
<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" />
<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) }}
{{scope.row.CriterionTypeList ? scope.row.CriterionTypeList.map(item => $fd('CriterionType', item)).join(', ')
: ''}}
</template>
</el-table-column>
<!-- 邮件主题中文 -->
@ -249,12 +255,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 +378,9 @@ export default {
previewVisible: false,
previewHTML: null,
previewHTMLEN: null,
multipleSelection: [],
drawer: false,
tableData: []
}
},
computed: {
@ -325,6 +398,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

View File

@ -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>

View File

@ -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,130 +408,88 @@
</div>
</el-dialog>
<!-- '重阅影响任务列表' : '已影响任务列表'" +++-->
<el-dialog
v-if="ReReadingOrBackVisible"
<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"
>
: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>
@ -493,13 +507,8 @@
</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>
@ -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()
@ -790,6 +863,7 @@ export default {
::v-deep .hidden-row {
display: none;
}
::v-deep .el-dialog__body {
padding: 15px 20px;
}
@ -799,9 +873,11 @@ export default {
border-color: none !important;
// color: #fff!important;
}
::v-deep #TaskAllocationRuleList thead .el-checkbox__inner {
display: none;
}
::v-deep .el-descriptions-item__label.has-colon:after {
display: none;
}

View File

@ -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

View File

@ -263,7 +263,7 @@ export default {
series: '',
ToolStateManager: null,
renderedMeasured: [],
measuredTools: ['Length', 'Bidirectional', 'ArrowAnnotate', 'RectangleRoi'],
measuredTools: ['Length', 'Bidirectional', 'ArrowAnnotate', 'RectangleRoi', 'Probe'],
measureData: [],
selectedLesion: null,
activeTool: 0, // 0:enable 1:passive 2:active
@ -303,8 +303,8 @@ export default {
],
scrollSyncInfo: { offset: 0 },
hideMeasureArr: []
hideMeasureArr: [],
isInitWwwc: true
}
},
computed: {
@ -565,7 +565,6 @@ export default {
e.stopPropagation()
e.preventDefault()
} else if (this.activeToolName === 'Length' || this.activeToolName === 'Bidirectional' && this.readingTaskState < 2) {
console.log(e.detail.image)
if (!e.detail.image.columnPixelSpacing || !e.detail.image.rowPixelSpacing) {
// ''
this.$confirm(this.$t('trials:reading:warnning:msg56'), '', {
@ -578,6 +577,13 @@ export default {
e.stopPropagation()
e.preventDefault()
}
} else if (this.CriterionType === 21 && this.activeToolName === 'Probe' && this.readingTaskState < 2) {
if (!(e.detail.image.imageFrame.photometricInterpretation === 'MONOCHROME1' || e.detail.image.imageFrame.photometricInterpretation === 'MONOCHROME2')) {
this.$alert(this.$t('trials:MRIPDFF:message:message5'))
e.stopImmediatePropagation()
e.stopPropagation()
e.preventDefault()
}
}
},
pointNearTool(e) {
@ -607,7 +613,11 @@ export default {
if ((i.LesionType === 0 || i.LesionType === 1 || i.LesionType === 7) && i.IsFirstChangeTask) {
arr.push(i.OrderMarkName)
}
if (i.Id && this.readingTaskState >= 2) {
arr.push(i.OrderMarkName)
}
})
console.log(arr)
return arr
},
getMergeMarks(measureDatas) {
@ -616,6 +626,9 @@ export default {
if ((i.LesionType === 0) && i.SplitOrMergeType === 1) {
arr.push(i.OrderMarkName)
}
if (i.Id && this.readingTaskState >= 2) {
arr.push(i.OrderMarkName)
}
})
return arr
},
@ -661,7 +674,7 @@ export default {
},
sliderMousemove(e) {
if (!this.sliderInfo.isMove) return
console.log('sliderMousemove')
// console.log('sliderMousemove')
var PX = this.sliderInfo.oldB - (this.sliderInfo.oldM - e.clientY)
var boxHeight = this.$refs['sliderBox'].clientHeight
if (PX < 0) return
@ -692,7 +705,7 @@ export default {
} else if (criterionType === 2) {
this.disabledMarks = this.getMergeMarks(this.visitTaskList[idx].MeasureData)
} else {
this.disabledMarks = []
this.disabledMarks = this.getDisabledMarks(this.visitTaskList[idx].MeasureData)
}
return true
},
@ -785,6 +798,8 @@ export default {
} else if (toolType === 'Length') {
// toolState.data[i].length = this.calculateLenth(toolState.data[i])
}
measureData.largestPixelValue = image.imageFrame.largestPixelValue
measureData.imageId = imageId
measureData.studyId = this.stack.studyId
measureData.seriesId = this.stack.seriesId
measureData.instanceId = instanceId
@ -901,6 +916,9 @@ export default {
}
} else if (this.activeTool === 1 && this.readingTaskState < 2) {
cornerstoneTools.setToolPassiveForElement(element, data.MeasureData.type, { mouseButtonMask: 1 })
} else if (this.readingTaskState >= 2 && this.isCurrentTask) {
// setToolPassiveForElement
cornerstoneTools.setToolEnabledForElement(element, data.MeasureData.type, { mouseButtonMask: 1 })
} else {
cornerstoneTools.setToolEnabledForElement(element, data.MeasureData.type, { mouseButtonMask: 1 })
}
@ -919,6 +937,9 @@ export default {
}
}
})
if (this.readingTaskState >= 2 && this.activeToolName && this.isCurrentTask) {
cornerstoneTools.setToolActiveForElement(element, this.activeToolName, { mouseButtonMask: 1 })
}
},
setMeasureDataVisible() {
if (this.readingTaskState >= 2) return
@ -986,6 +1007,7 @@ export default {
}
},
mouseClick(e) {
if (this.readingTaskState >= 2) return
const { element, currentPoints, image, viewport } = e.detail
var imageId = image.imageId
const imageInfo = this.getInstanceInfo(imageId)
@ -1010,6 +1032,8 @@ export default {
var questionInfo = this.measureData[idx]
// const canvas = this.canvas.querySelector('canvas')
// measureData.pictureBaseStr = canvas.toDataURL('image/png', 1)
measureData.largestPixelValue = image.imageFrame.largestPixelValue
measureData.imageId = imageId
measureData.studyId = this.stack.studyId
measureData.seriesId = this.stack.seriesId
measureData.instanceId = instanceId
@ -1035,6 +1059,7 @@ export default {
},
loadImageStack(dicomSeries) {
return new Promise(resolve => {
this.isInitWwwc = true
this.isCurrentTask = dicomSeries.isCurrentTask
this.isBaseline = dicomSeries.isBaseLineTask
this.readingTaskState = dicomSeries.readingTaskState
@ -1073,7 +1098,8 @@ export default {
} else if (criterionType === 2) {
this.disabledMarks = this.getMergeMarks(this.visitTaskList[idx].MeasureData)
} else {
this.disabledMarks = []
// this.disabledMarks = []
this.disabledMarks = this.getDisabledMarks(this.visitTaskList[idx].MeasureData)
}
this.maxVistNum = this.visitTaskList[this.visitTaskList.length - 1].VisitTaskNum
@ -1202,7 +1228,7 @@ export default {
this.stack.frame = this.stack.isExistMutiFrames ? parseInt(frame) : null
this.stack.instanceId = instanceId
this.height = (this.stack.currentImageIdIndex) * 100 / (this.stack.imageIds.length - 1)
// this.resetWwwc()
resolve()
})
},
@ -1300,6 +1326,9 @@ export default {
this.scrollSyncInfo.offset = 0
}
this.renderMeasuredData(e)
if (this.isInitWwwc) {
this.resetWwwc()
}
},
getOrientationMarker(element) {
const enabledElement = cornerstone.getEnabledElement(element)
@ -1336,6 +1365,8 @@ export default {
this.stack.frame = this.stack.isExistMutiFrames ? parseInt(frame) : null
if (e.detail.toolName === 'Length' || e.detail.toolName === 'ArrowAnnotate' || e.detail.toolName === 'RectangleRoi') {
const measureData = {}
measureData.largestPixelValue = element.image.imageFrame.largestPixelValue
measureData.imageId = imageId
measureData.studyId = this.stack.studyId
measureData.seriesId = this.stack.seriesId
measureData.instanceId = instanceId
@ -1353,6 +1384,8 @@ export default {
cornerstoneTools.setToolPassiveForElement(this.canvas, e.detail.toolName)
} else if (e.detail.toolName === 'Bidirectional') {
const measureData = {}
measureData.largestPixelValue = element.image.imageFrame.largestPixelValue
measureData.imageId = imageId
measureData.studyId = this.stack.studyId
measureData.seriesId = this.stack.seriesId
measureData.instanceId = instanceId
@ -1369,6 +1402,8 @@ export default {
cornerstoneTools.setToolPassiveForElement(this.canvas, e.detail.toolName)
} else if (e.detail.toolName === 'Probe') {
const measureData = {}
measureData.largestPixelValue = element.image.imageFrame.largestPixelValue
measureData.imageId = imageId
measureData.studyId = this.stack.studyId
measureData.seriesId = this.stack.seriesId
measureData.instanceId = instanceId
@ -1478,6 +1513,8 @@ export default {
var questionInfo = this.measureData[idx]
// const canvas = this.canvas.querySelector('canvas')
// measureData.pictureBaseStr = canvas.toDataURL('image/png', 1)
measureData.largestPixelValue = element.image.imageFrame.largestPixelValue
measureData.imageId = imageId
measureData.studyId = this.stack.studyId
measureData.seriesId = this.stack.seriesId
measureData.instanceId = instanceId
@ -1657,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
@ -1669,6 +1706,8 @@ export default {
},
resetWwwc() {
// console.log('resetWwwc')
this.isInitWwwc = true
this.toolState.viewportInvert = false
var viewport = cornerstone.getViewport(this.canvas)
// viewport.invert = false
@ -1679,7 +1718,7 @@ export default {
},
setWwwc(ww, wc) {
// console.log('setWwwc', ww, wc)
this.isInitWwwc = false
var viewport = cornerstone.getViewport(this.canvas)
viewport.voi.windowWidth = ww
viewport.voi.windowCenter = wc

View File

@ -416,7 +416,7 @@
<dicom-canvas
v-if="canvasW"
:ref="`dicomCanvas${i-1}`"
:style="{width:canvasW,height: canvasH}"
:style="{width: fullScreenIndex === i-1 ? fullScreenWidth : canvasW,height: fullScreenIndex === i-1 ? fullScreenHeight : canvasH}"
:canvas-index="i-1"
:is-active="i-1===currentDicomCanvasIndex"
:is-scroll-sync="isScrollSync"
@ -989,7 +989,10 @@ export default {
signVisible: false,
signCode: null,
currentUser: zzSessionStorage.getItem('userName'),
tmpData: null
tmpData: null,
fullScreenIndex: -1,
fullScreenWidth: window.innerWidth - 570 + 'px',
fullScreenHeight: window.innerHeight - 130 + 'px'
}
},
@ -1379,22 +1382,25 @@ export default {
this.personalConfigDialog.visible = true
},
setCornerstoneStyle(i) {
if (this.layoutCol === 1 && this.layoutRow === 1) {
this.fullScreenIndex = -1
return
}
if (this.cornerstoneStyle.position) {
this.cornerstoneStyle = {}
this.setCanvasStyle()
this.fullScreenIndex = -1
} else {
this.cornerstoneStyle = {
position: 'absolute',
top: '72px',
top: '67px',
left: '0px',
right: '350px',
zIndex: 10
zIndex: 10,
}
this.canvasW = window.innerWidth - 570 + 'px'
this.canvasH = window.innerHeight - 130 + 'px'
this.fullScreenIndex = this.currentDicomCanvasIndex
}
this.$nextTick(() => {
// this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].reloadCanvas()
for (var i = 0; i < this.maxCanvas; i++) {
this.$refs[`dicomCanvas${i}`][0].reloadCanvas()
}
@ -1941,6 +1947,7 @@ export default {
},
//
changeLayout(name) {
this.fullScreenIndex = -1
if (this.activeTool) {
if (this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].isCurrentTask && this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].readingTaskState < 2) {
this.$nextTick(() => {
@ -2043,14 +2050,17 @@ export default {
if (i === -1) return
var isCurrentTask = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].isCurrentTask
var readingTaskState = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].readingTaskState
if (!isCurrentTask || readingTaskState >= 2) {
if (!isCurrentTask) {
this.measuredTools[i].isDisabled = true
e.target.style.cursor = 'not-allowed'
if (this.activeTool) {
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].setToolEnabled(toolName)
this.activeTool = ''
}
} else {
} else if (isCurrentTask && readingTaskState >= 2) {
this.measuredTools[i].isDisabled = false
e.target.style.cursor = 'pointer'
} else if (isCurrentTask && readingTaskState < 2) {
// var obj = this.$refs['measurementList'].isCanActiveTool(toolName, true)
var obj = this.$refs['measurementList'].isCanActiveTool(toolName, true)
this.measuredTools[i].disabledReason = obj.reason
@ -2087,7 +2097,7 @@ export default {
var toolObj = this.measuredTools.find(i => i.toolName === toolName)
if (!toolObj || toolObj.isDisabled) return
var dicomSeries = this.canvasObj[this.currentDicomCanvasIndex]
if (dicomSeries.isCurrentTask && isMeasuredTool && dicomSeries.readingTaskState < 2) {
if (dicomSeries.isCurrentTask && isMeasuredTool) {
if (this.activeTool) {
this.measuredTools.forEach(item => {
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].setToolPassive(item.toolName)
@ -2248,13 +2258,14 @@ export default {
this.customWwc.visible = false
},
toggleInvert() {
if (this.activeTool === 'reversecolor') {
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].resetWwwc()
this.activeTool = ''
} else {
this.activeTool = 'reversecolor'
// if (this.activeTool === 'reversecolor') {
// this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].resetWwwc()
// this.activeTool = ''
// } else {
// this.activeTool = 'reversecolor'
// this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].toggleInvert()
// }
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].toggleInvert()
}
},
setImageIndexSync() {
this.isScrollSync = !this.isScrollSync

View File

@ -8,39 +8,27 @@
<span style="margin-left:5px;">{{ taskBlindName }}</span>
</h3>
<div v-if="readingTaskState < 2">
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')" placement="bottom">
<i
class="el-icon-refresh-left"
@click="resetMeasuredData"
/>
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')"
placement="bottom">
<i class="el-icon-refresh-left" @click="resetMeasuredData" />
</el-tooltip>
</div>
</div>
<!-- 影像质量问题 -->
<div class="lesions">
<Questions
ref="ecrf"
:question-form-change-state="true"
:question-form-change-num="0"
:is-qulity-issues="false"
:group-classify="1"
/>
<Questions ref="ecrf" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
:group-classify="1" />
</div>
<!-- 测量问题 -->
<template v-if="questions.length > 0">
<div v-for="(qs,index) in questions" :key="index" v-loading="loading" class="lesions lesions_wrapper" style="margin-bottom: 10px">
<div v-for="(qs, index) in questions" :key="index" v-loading="loading" class="lesions lesions_wrapper"
style="margin-bottom: 10px">
<h4 v-if="qs.Type === 'group'" style="color: #ddd;padding: 5px 0px;margin: 0;">
{{ language === 'en' ? qs.GroupEnName : qs.GroupName }}
</h4>
<div class="lesion_list">
<el-form
v-if="questions.length > 0"
:ref="`questions${index}`"
size="small"
:model="questionForm"
>
<el-form v-if="questions.length > 0" :ref="`questions${index}`" size="small" :model="questionForm">
<div class="table-wrapper">
<div v-for="item in qs.Childrens" :key="item.Id">
<div v-if="item.Type === 'basicTable'" class="flex-row" style="margin:3px 0;">
@ -58,11 +46,8 @@
</div>
</div>
<el-table
v-if="item.Type === 'basicTable' && item.TableQuestions"
:ref="item.Id"
:data="item.TableQuestions.Answers"
>
<el-table v-if="item.Type === 'basicTable' && item.TableQuestions" :ref="item.Id"
:data="item.TableQuestions.Answers">
<!-- <el-table-column :label="$t('CustomizeQuestionFormItem:label:OrderMark')" width="60px" show-overflow-tooltip>
<template slot-scope="scope">
{{ getLesionName(item.OrderMark,scope.row.RowIndex) }}
@ -72,14 +57,8 @@
type="index"
width="40px"
/> -->
<el-table-column
v-for="q of item.TableQuestions.Questions"
:key="q.Id"
:prop="q.Id"
:label="q.QuestionName"
show-overflow-tooltip
:render-header="renderHeader"
>
<el-table-column v-for="q of item.TableQuestions.Questions" :key="q.Id" :prop="q.Id"
:label="q.QuestionName" show-overflow-tooltip :render-header="renderHeader">
<template slot-scope="scope">
<span v-if="q.Unit > 0 && !isNaN(parseFloat(scope.row[q.Id]))">
{{ `${scope.row[q.Id]} ${$fd('ValueUnit', parseInt(q.Unit))}` }}
@ -92,12 +71,8 @@
</span>
</template>
</el-table-column>
<el-table-column
v-if="readingTaskState < 2 && item.LesionType === 102"
:label="$t('common:action:action')"
width="90px"
fixed="right"
>
<el-table-column v-if="readingTaskState < 2 && item.LesionType === 102"
:label="$t('common:action:action')" width="90px" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="handleAddOrEdit('edit', item, scope.$index)">
{{ $t('common:button:edit') }}
@ -111,41 +86,57 @@
<template v-else>
<!-- 数值 -->
<el-form-item
v-if="item.ShowQuestion!==2"
:key="item.Id"
:label="`${item.QuestionName}`"
:prop="item.Id"
:rules="[
{ required: (item.IsRequired === 0 || (item.IsRequired ===1 && item.RelevanceId && (item.RelevanceValue.includes(questionForm[item.RelevanceId])))) && item.Type!=='group' && item.Type!=='summary',
message:['radio', 'select', 'checkbox'].includes(item.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur','change']},
]"
>
<el-form-item v-if="item.ShowQuestion !== 2" :key="item.Id" :label="`${item.QuestionName}`"
:prop="item.Id" :rules="[
{
required: (item.IsRequired === 0 || (item.IsRequired === 1 && item.RelevanceId && (item.RelevanceValue.includes(questionForm[item.RelevanceId])))) && item.Type !== 'group' && item.Type !== 'summary',
message: ['radio', 'select', 'checkbox'].includes(item.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur', 'change']
},
]">
<!-- 数值类型 -->
<template v-if="item.Type === 'textarea'">
<el-input
v-model="questionForm[qs.Id]"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
<el-input v-model="questionForm[item.Id]" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }"
:disabled="!isCurrentTask || readingTaskState >= 2"
@change="((val)=>{formItemChange(val, qs)})"
/>
@change="((val) => { formItemChange(val, item) })" />
</template>
<template v-if="item.Type === 'number'">
<el-input-number v-model="questionForm[item.Id]"
:disabled="!isCurrentTask || readingTaskState >= 2" :precision="0"
@change="((val) => { formItemChange(val, item) })" />
</template>
<template v-if="item.Type === 'select'">
<el-select v-model="questionForm[item.Id]" :disabled="!isCurrentTask || readingTaskState >= 2"
@change="((val) => { formItemChange(val, item) })">
<el-option v-for="dict of $d[item.DictionaryCode]" :key="dict.id" :value="String(dict.value)"
:label="dict.label" />
</el-select>
</template>
</el-form-item>
<template v-if="item.Childrens && item.Childrens.length > 0">
<template v-for="child in item.Childrens">
<el-form-item :key="child.Id"
v-if="(child.ShowQuestion === 1 && child.ParentTriggerValueList.includes(String(questionForm[item.Id]))) || child.ShowQuestion === 0"
:label="`${child.QuestionName}`" :prop="child.Id" :rules="[
{
required: (child.IsRequired === 0 || (child.IsRequired === 1 && child.RelevanceId && (child.RelevanceValue.includes(questionForm[child.RelevanceId])))) && child.Type !== 'group' && child.Type !== 'summary',
message: ['radio', 'select', 'checkbox'].includes(child.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur', 'change']
},
]">
<template v-if="child.Type === 'input'">
<el-input v-model="questionForm[child.Id]"
:disabled="!isCurrentTask || readingTaskState >= 2"
@change="((val) => { formItemChange(val, child) })" />
</template>
</el-form-item>
</template>
</template>
</template>
</div>
<div
v-if="isCurrentTask && readingTaskState<2 && qs.GroupClassify === 5"
class="base-dialog-footer"
style="text-align:right;margin-top:10px;"
>
<div v-if="isCurrentTask && readingTaskState < 2 && (qs.GroupClassify === 5 || qs.GroupClassify === 6)"
class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<!-- 保存 -->
<el-button
type="primary"
size="mini"
:disabled="!formChanged"
@click="handleSave(index)"
>
<el-button type="primary" size="mini" :disabled="!formChanged" @click="handleSave(index)">
{{ $t('common:button:save') }}
</el-button>
</div>
@ -156,51 +147,21 @@
</template>
<!-- 计算值 -->
<Questions
ref="ecrf2"
:question-form-change-state="true"
:question-form-change-num="0"
:is-qulity-issues="false"
:group-classify="4"
style="margin-top:20px"
/>
<Questions ref="ecrf2" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
:group-classify="4" style="margin-top:20px" />
<!-- 评估结果 -->
<Questions
ref="ecrf3"
:question-form-change-state="true"
:question-form-change-num="0"
:is-qulity-issues="false"
:group-classify="5"
/>
<Questions ref="ecrf3" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
:group-classify="5" />
<!-- 新增编辑弹窗 -->
<el-dialog
v-if="addOrEdit.visible"
:visible.sync="addOrEdit.visible"
:close-on-click-modal="false"
:title="addOrEdit.title"
width="500px"
>
<el-form
ref="tableQsForm"
v-loading="loading"
:model="qsForm"
size="small"
>
<QuestionTableFormItem
v-for="item in qsList"
:key="item.Id"
:question="item"
:question-form="qsForm"
:reading-task-state="readingTaskState"
@setFormItemData="setFormItemData"
@resetFormItemData="resetFormItemData"
/>
<el-dialog v-if="addOrEdit.visible" :visible.sync="addOrEdit.visible" :close-on-click-modal="false"
:title="addOrEdit.title" width="500px">
<el-form ref="tableQsForm" v-loading="loading" :model="qsForm" size="small">
<QuestionTableFormItem v-for="item in qsList" :key="item.Id" :question="item" :question-form="qsForm"
:reading-task-state="readingTaskState" @setFormItemData="setFormItemData"
@resetFormItemData="resetFormItemData" />
<el-form-item style="text-align: right">
<el-button
size="small"
@click="addOrEdit.visible = false"
>
<el-button size="small" @click="addOrEdit.visible = false">
{{ $t('common:button:cancel') }}
</el-button>
<!-- 保存 -->
@ -211,17 +172,9 @@
</el-form>
</el-dialog>
<!-- 导入 -->
<el-dialog
v-if="upload.visible"
:visible.sync="upload.visible"
:close-on-click-modal="false"
:title="upload.title"
width="500px"
>
<UploadExcel
:visit-task-id="visitTaskId"
@close="uploadDlgClose"
/>
<el-dialog v-if="upload.visible" :visible.sync="upload.visible" :close-on-click-modal="false"
:title="upload.title" width="500px">
<UploadExcel :visit-task-id="visitTaskId" @close="uploadDlgClose" />
</el-dialog>
</div>
</div>
@ -485,8 +438,22 @@ export default {
setMeasuredData(measureData) {
},
formItemChange() {
formItemChange(val, item) {
this.formChanged = true
if (item.Type === 'number') {
this.limitBlur(item.Id, item.ValueType)
}
if (question.Childrens.length > 0) {
this.resetChild(question.Childrens)
}
},
resetChild(obj) {
obj.forEach(i => {
this.resetData(i.Id)
if (i.Childrens && i.Childrens.length > 0) {
this.resetChild(i.Childrens)
}
})
},
limitBlur(qId, valueType) {
const value = this.questionForm[qId]
@ -523,7 +490,7 @@ export default {
answers: answers
}
try {
await saveTaskQuestion(8, params)
await saveTaskQuestion(12, params)
this.$message.success(this.$t('common:message:savedSuccessfully'))
loading.close()
DicomEvent.$emit('getReportInfo', true)
@ -578,6 +545,9 @@ export default {
},
receiveMsg(event) {
},
resetData(v) {
this.questionForm[v] = null
},
resetFormItemData(v) {
this.qsForm[v] = null
},
@ -733,17 +703,21 @@ export default {
.measurement-wrapper {
height: 100%;
overflow-y: auto;
.container {
padding: 10px;
.basic-info {
display: flex;
justify-content: space-between;
align-items: center;
h3 {
color: #ddd;
padding: 5px 0px;
margin: 0;
}
i {
color: #fff;
font-size: 22px;
@ -752,6 +726,7 @@ export default {
}
}
}
.title {
padding: 5px;
font-weight: bold;
@ -759,6 +734,7 @@ export default {
font-size: 15px;
}
.add-icon {
display: inline-block;
padding: 5px;
@ -769,6 +745,7 @@ export default {
margin-bottom: 2px;
cursor: pointer;
}
.add-icon:hover {
background-color: #607d8b;
}
@ -780,92 +757,111 @@ export default {
background-color: #424242;
}
.lesion_list {
position: relative;
::v-deep .el-form-item__label {
color: #c3c3c3;
text-align: left;
}
::v-deep .el-input .el-input__inner {
background-color: transparent;
color: #ddd;
border: 1px solid #5e5e5e;
}
::v-deep .el-textarea__inner {
background-color: transparent;
color: #ddd;
border: 1px solid #5e5e5e;
}
::v-deep .el-form-item {
display: flex;
flex-direction: column;
justify-content: flex-start;
}
::v-deep .el-form-item__content {
flex: 1;
}
::v-deep .el-input.is-disabled .el-input__inner {
background-color: #646464a1;
}
::v-deep .el-select.is-disabled .el-input__inner {
background-color: #646464a1;
}
.el-form-item__content
.el-select{
.el-form-item__content .el-select {
width: 100%;
}
}
.table-wrapper {
::-webkit-scrollbar {
width: 5px;
height: 8px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #d0d0d0;
}
::v-deep .el-table,
.el-table__expanded-cell {
background-color: #000;
color: #fff;
border-color: #444444;
}
::v-deep .el-table th,
.el-table tr {
background-color: #000;
color: #fff;
border-color: #444444;
}
::v-deep .el-table__body tr>td {
background-color: #000 !important;
color: #fff;
border-color: #444444;
}
::v-deep .el-table__body tr:hover>td {
background-color: #858282 !important;
color: #fff;
border-color: #444444;
}
::v-deep .el-table--border th.gutter:last-of-type {
border: none;
}
::v-deep .el-table__fixed-right {
height: 100% !important;
}
// ::v-deep .el-table .cell {
// line-height: 20px;
// }
::v-deep .el-table__cell {
padding: 5px 0;
}
::v-deep.el-table__fixed-right-patch {
background-color: #000 !important;
border-color: #444444;
}
::v-deep.el-table__fixed-body-wrapper tr:hover>td {
background-color: #000 !important;
}
::v-deep.el-table--scrollable-x .el-table__body-wrapper {
z-index: 2;
}

View File

@ -205,6 +205,7 @@
import { saveTableQuestionMark, submitTaskRowInfo, deleteTableQuestionMark, deleteSingleTableQuestionMark } from '@/api/reading'
import DicomEvent from './../DicomEvent'
import store from '@/store'
import * as cornerstone from 'cornerstone-core'
export default {
name: 'MeasurementForm',
props: {
@ -444,7 +445,12 @@ export default {
//
measureData.data.remark = this.getLesionName(this.orderMark, this.activeQuestionMark)
}
const val = measureData.data.cachedStats.mean / 10
// const val = measureData.data.cachedStats.mean / 10
let val = parseFloat(measureData.data.cachedStats.mean)
// let imagePixelModule = cornerstone.metaData.get('imagePixelModule', measureData.imageId)
if (measureData.largestPixelValue >= 500) {
val = val / 10
}
this.$set(this.questionForm, measureData.tableQuestionId, val.toFixed(this.digitPlaces))
data = {
Id: '',
@ -574,14 +580,26 @@ export default {
let params = {}
if (i > -1 && this.markList[i].measureData && this.markList[i].measureData.MeasureData) {
const measureData = this.markList[i].measureData.MeasureData
const tableQuestionId = this.markList[i].tableQuestionId
if (this.questionForm[tableQuestionId] > 100) {
const confirm = await this.$confirm(
this.$t('trials:MRIPDFF:message:message4'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
}
//
DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: measureData.OrderMarkName, lesionType: null, isMarked: !!measureData }, async val => {
params = Object.assign({}, this.markList[i].measureData)
if (val) {
const pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, val)
params.PicturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
}
const tableQuestionId = this.markList[i].tableQuestionId
params.Answer = this.questionForm[tableQuestionId]
params.MeasureData = JSON.stringify(this.markList[i].measureData.MeasureData)
loading.close()

View File

@ -264,7 +264,6 @@ export default {
if (item.Type === 'table' && item.Id === obj.questionId) {
var idx = item.TableQuestions.Answers.findIndex(i => i.RowIndex === obj.rowIndex)
item.TableQuestions.Answers[idx].isMeasurable = obj.isMeasurable
console.log(obj.isMeasurable)
item.TableQuestions.Answers[idx].mean = obj.mean
item.TableQuestions.Answers[idx].saveTypeEnum = obj.saveTypeEnum

View File

@ -7,39 +7,28 @@
<span style="margin-left:5px;">{{ taskBlindName }}</span>
</h3>
<div v-if="readingTaskState < 2">
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')" placement="bottom">
<i
class="el-icon-refresh-left"
@click="resetMeasuredData"
/>
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')"
placement="bottom">
<i class="el-icon-refresh-left" @click="resetMeasuredData" />
</el-tooltip>
</div>
</div>
<!-- 影像质量问题 -->
<div class="lesions">
<Questions
ref="ecrf"
:question-form-change-state="true"
:question-form-change-num="0"
:is-qulity-issues="false"
:group-classify="1"
/>
<Questions ref="ecrf" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
:group-classify="1" />
</div>
<!-- 测量问题 -->
<template v-if="questions.length > 0">
<div v-for="(qs,index) in questions" :key="index" v-loading="loading" class="lesions lesions_wrapper" style="margin-bottom: 10px">
<div v-for="(qs, index) in questions" :key="index" v-loading="loading" class="lesions lesions_wrapper"
style="margin-bottom: 10px">
<h4 v-if="qs.Type === 'group'" style="color: #ddd;padding: 5px 0px;margin: 0;">
{{ language === 'en' ? qs.GroupEnName : qs.GroupName }}
</h4>
<div class="lesion_list">
<el-form
v-if="questions.length > 0"
:ref="`questions${index}`"
size="small"
:model="questionForm"
>
<el-form v-if="questions.length > 0" :ref="`questions${index}`" size="small" :model="questionForm">
<div class="table-wrapper">
<div v-for="item in qs.Childrens" :key="item.Id">
<div v-if="item.Type === 'basicTable'" class="flex-row" style="margin:3px 0;">
@ -57,12 +46,8 @@
</div>
</div>
<el-table
v-if="item.Type === 'basicTable' && item.TableQuestions"
:ref="item.Id"
:data="item.TableQuestions.Answers"
max-height="600"
>
<el-table v-if="item.Type === 'basicTable' && item.TableQuestions" :ref="item.Id"
:data="item.TableQuestions.Answers" max-height="600">
<!-- <el-table-column :label="$t('CustomizeQuestionFormItem:label:OrderMark')" width="60px" show-overflow-tooltip>
<template slot-scope="scope">
{{ getLesionName(item.OrderMark,scope.row.RowIndex) }}
@ -72,14 +57,8 @@
type="index"
width="40px"
/> -->
<el-table-column
v-for="q of item.TableQuestions.Questions"
:key="q.Id"
:prop="q.Id"
:label="q.QuestionName"
show-overflow-tooltip
:render-header="renderHeader"
>
<el-table-column v-for="q of item.TableQuestions.Questions" :key="q.Id" :prop="q.Id"
:label="q.QuestionName" show-overflow-tooltip :render-header="renderHeader">
<template slot-scope="scope">
<span v-if="q.Unit > 0 && !isNaN(parseFloat(scope.row[q.Id]))">
{{ `${scope.row[q.Id]} ${$fd('ValueUnit', parseInt(q.Unit))}` }}
@ -92,17 +71,14 @@
</span>
</template>
</el-table-column>
<el-table-column
v-if="readingTaskState < 2"
:label="$t('common:action:action')"
width="90px"
fixed="right"
>
<el-table-column v-if="readingTaskState < 2" :label="$t('common:action:action')" width="90px"
fixed="right">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="handleAddOrEdit('edit', item, scope.$index)">
{{ $t('common:button:edit') }}
</el-button>
<el-button v-if="item.LesionType === 112 || item.LesionType === 111" type="text" size="mini" @click="handleDelete(item, scope.$index)">
<el-button v-if="item.LesionType === 112 || item.LesionType === 111" type="text" size="mini"
@click="handleDelete(item, scope.$index)">
{{ $t('common:button:delete') }}
</el-button>
</template>
@ -111,41 +87,52 @@
<template v-else>
<!-- 数值 -->
<el-form-item
v-if="item.ShowQuestion!==2"
:key="item.Id"
:label="`${item.QuestionName}`"
:prop="item.Id"
:rules="[
{ required: (item.IsRequired === 0 || (item.IsRequired ===1 && item.RelevanceId && (item.RelevanceValue.includes(questionForm[item.RelevanceId])))) && item.Type!=='group' && item.Type!=='summary',
message:['radio', 'select', 'checkbox'].includes(item.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur','change']},
]"
>
<el-form-item v-if="item.ShowQuestion !== 2" :key="item.Id" :label="`${item.QuestionName}`"
:prop="item.Id" :rules="[
{
required: (item.IsRequired === 0 || (item.IsRequired === 1 && item.RelevanceId && (item.RelevanceValue.includes(questionForm[item.RelevanceId])))) && item.Type !== 'group' && item.Type !== 'summary',
message: ['radio', 'select', 'checkbox'].includes(item.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur', 'change']
},
]">
<!-- 数值类型 -->
<template v-if="item.Type === 'textarea'">
<el-input
v-model="questionForm[qs.Id]"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
<el-input v-model="questionForm[item.Id]" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }"
:disabled="!isCurrentTask || readingTaskState >= 2"
@change="((val)=>{formItemChange(val, qs)})"
/>
@change="((val) => { formItemChange(val, item) })" />
</template>
<template v-if="item.Type === 'select'">
<el-select v-model="questionForm[item.Id]" :disabled="!isCurrentTask || readingTaskState >= 2"
@change="((val) => { formItemChange(val, item) })">
<el-option v-for="dict of $d[item.DictionaryCode]" :key="dict.id" :value="String(dict.value)"
:label="dict.label" />
</el-select>
</template>
</el-form-item>
<template v-if="item.Childrens && item.Childrens.length > 0">
<template v-for="child in item.Childrens">
<el-form-item :key="child.Id"
v-if="(child.ShowQuestion === 1 && child.ParentTriggerValueList.includes(String(questionForm[item.Id]))) || child.ShowQuestion === 0"
:label="`${child.QuestionName}`" :prop="child.Id" :rules="[
{
required: (child.IsRequired === 0 || (child.IsRequired === 1 && child.RelevanceId && (child.RelevanceValue.includes(questionForm[child.RelevanceId])))) && child.Type !== 'group' && child.Type !== 'summary',
message: ['radio', 'select', 'checkbox'].includes(child.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur', 'change']
},
]">
<template v-if="child.Type === 'input'">
<el-input v-model="questionForm[child.Id]"
:disabled="!isCurrentTask || readingTaskState >= 2"
@change="((val) => { formItemChange(val, child) })" />
</template>
</el-form-item>
</template>
</template>
</template>
</div>
<div
v-if="isCurrentTask && readingTaskState<2 && qs.GroupClassify === 5"
class="base-dialog-footer"
style="text-align:right;margin-top:10px;"
>
<div v-if="isCurrentTask && readingTaskState < 2 && (qs.GroupClassify === 5 || qs.GroupClassify === 6)"
class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<!-- 保存 -->
<el-button
type="primary"
size="mini"
:disabled="!formChanged"
@click="handleSave(index)"
>
<el-button type="primary" size="mini" :disabled="!formChanged" @click="handleSave(index)">
{{ $t('common:button:save') }}
</el-button>
</div>
@ -156,50 +143,20 @@
</template>
<!-- 计算值 -->
<Questions
ref="ecrf2"
:question-form-change-state="true"
:question-form-change-num="0"
:is-qulity-issues="false"
:group-classify="4"
style="margin-top:20px"
/>
<Questions ref="ecrf2" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
:group-classify="4" style="margin-top:20px" />
<!-- 评估结果 -->
<Questions
ref="ecrf3"
:question-form-change-state="true"
:question-form-change-num="0"
:is-qulity-issues="false"
:group-classify="5"
/>
<el-dialog
v-if="addOrEdit.visible"
:visible.sync="addOrEdit.visible"
:close-on-click-modal="false"
:title="addOrEdit.title"
width="500px"
>
<el-form
ref="tableQsForm"
v-loading="loading"
:model="qsForm"
size="small"
>
<QuestionTableFormItem
v-for="item in qsList"
:key="item.Id"
:question="item"
:question-form="qsForm"
:reading-task-state="readingTaskState"
@setFormItemData="setFormItemData"
@resetFormItemData="resetFormItemData"
/>
<Questions ref="ecrf3" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
:group-classify="5" />
<el-dialog v-if="addOrEdit.visible" :visible.sync="addOrEdit.visible" :close-on-click-modal="false"
:title="addOrEdit.title" width="500px">
<el-form ref="tableQsForm" v-loading="loading" :model="qsForm" size="small">
<QuestionTableFormItem v-for="item in qsList" :key="item.Id" :question="item" :question-form="qsForm"
:reading-task-state="readingTaskState" @setFormItemData="setFormItemData"
@resetFormItemData="resetFormItemData" />
<el-form-item style="text-align: right">
<el-button
size="small"
@click="addOrEdit.visible = false"
>
<el-button size="small" @click="addOrEdit.visible = false">
{{ $t('common:button:cancel') }}
</el-button>
<!-- 保存 -->
@ -210,18 +167,9 @@
</el-form>
</el-dialog>
<!-- 导入 -->
<el-dialog
v-if="upload.visible"
:visible.sync="upload.visible"
:close-on-click-modal="false"
:title="upload.title"
width="500px"
>
<UploadExcel
:visit-task-id="visitTaskId"
:lesion-type="upload.lesionType"
@close="uploadDlgClose"
/>
<el-dialog v-if="upload.visible" :visible.sync="upload.visible" :close-on-click-modal="false"
:title="upload.title" width="500px">
<UploadExcel :visit-task-id="visitTaskId" :lesion-type="upload.lesionType" @close="uploadDlgClose" />
</el-dialog>
</div>
</div>
@ -486,8 +434,22 @@ export default {
setMeasuredData(measureData) {
},
formItemChange() {
formItemChange(val, question) {
this.formChanged = true
if (item.Type === 'number') {
this.limitBlur(item.Id, item.ValueType)
}
if (question.Childrens.length > 0) {
this.resetChild(question.Childrens)
}
},
resetChild(obj) {
obj.forEach(i => {
this.resetData(i.Id)
if (i.Childrens && i.Childrens.length > 0) {
this.resetChild(i.Childrens)
}
})
},
limitBlur(qId, valueType) {
const value = this.questionForm[qId]
@ -521,7 +483,7 @@ export default {
answers: answers
}
try {
await saveTaskQuestion(8, params)
await saveTaskQuestion(12, params)
this.$message.success(this.$t('common:message:savedSuccessfully'))
loading.close()
DicomEvent.$emit('getReportInfo', true)
@ -576,6 +538,9 @@ export default {
},
receiveMsg(event) {
},
resetData(v) {
this.questionForm[v] = null
},
resetFormItemData(v) {
this.qsForm[v] = null
},
@ -748,15 +713,18 @@ export default {
.container {
padding: 10px;
.basic-info {
display: flex;
justify-content: space-between;
align-items: center;
h3 {
color: #ddd;
padding: 5px 0px;
margin: 0;
}
i {
color: #fff;
font-size: 22px;
@ -765,6 +733,7 @@ export default {
}
}
}
.title {
padding: 5px;
font-weight: bold;
@ -772,6 +741,7 @@ export default {
font-size: 15px;
}
.add-icon {
display: inline-block;
padding: 5px;
@ -782,6 +752,7 @@ export default {
margin-bottom: 2px;
cursor: pointer;
}
.add-icon:hover {
background-color: #607d8b;
}
@ -793,92 +764,111 @@ export default {
background-color: #424242;
}
.lesion_list {
position: relative;
::v-deep .el-form-item__label {
color: #c3c3c3;
text-align: left;
}
::v-deep .el-input .el-input__inner {
background-color: transparent;
color: #ddd;
border: 1px solid #5e5e5e;
}
::v-deep .el-textarea__inner {
background-color: transparent;
color: #ddd;
border: 1px solid #5e5e5e;
}
::v-deep .el-form-item {
display: flex;
flex-direction: column;
justify-content: flex-start;
}
::v-deep .el-form-item__content {
flex: 1;
}
::v-deep .el-input.is-disabled .el-input__inner {
background-color: #646464a1;
}
::v-deep .el-select.is-disabled .el-input__inner {
background-color: #646464a1;
}
.el-form-item__content
.el-select{
.el-form-item__content .el-select {
width: 100%;
}
}
.table-wrapper {
::-webkit-scrollbar {
width: 5px;
height: 8px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #d0d0d0;
}
::v-deep .el-table,
.el-table__expanded-cell {
background-color: #000;
color: #fff;
border-color: #444444;
}
::v-deep .el-table th,
.el-table tr {
background-color: #000;
color: #fff;
border-color: #444444;
}
::v-deep .el-table__body tr>td {
background-color: #000 !important;
color: #fff;
border-color: #444444;
}
::v-deep .el-table__body tr:hover>td {
background-color: #858282 !important;
color: #fff;
border-color: #444444;
}
::v-deep .el-table--border th.gutter:last-of-type {
border: none;
}
::v-deep .el-table__fixed-right {
height: 100% !important;
}
// ::v-deep .el-table .cell {
// line-height: 20px;
// }
::v-deep .el-table__cell {
padding: 5px 0;
}
::v-deep.el-table__fixed-right-patch {
background-color: #000 !important;
border-color: #444444;
}
::v-deep.el-table__fixed-body-wrapper tr:hover>td {
background-color: #000 !important;
}
::v-deep.el-table--scrollable-x .el-table__body-wrapper {
z-index: 2;
}

View File

@ -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

View File

@ -556,7 +556,7 @@
<dicom-canvas
v-if="canvasW"
:ref="`dicomCanvas${i - 1}`"
:style="{ width: canvasW, height: canvasH }"
:style="{width: fullScreenIndex === i-1 ? fullScreenWidth : canvasW,height: fullScreenIndex === i-1 ? fullScreenHeight : canvasH}"
:canvas-index="i - 1"
:is-active="i - 1 === currentDicomCanvasIndex"
:is-scroll-sync="isScrollSync"
@ -895,6 +895,9 @@ export default {
uploadTrialCriterion: {},
uploadStatus: 'upload',
taskId: '',
fullScreenIndex: -1,
fullScreenWidth: window.innerWidth - 570 + 'px',
fullScreenHeight: window.innerHeight - 128 + 'px'
}
},
@ -1314,22 +1317,25 @@ export default {
this.personalConfigDialog.visible = true
},
setCornerstoneStyle(i) {
if (this.layoutCol === 1 && this.layoutRow === 1) {
this.fullScreenIndex = -1
return
}
if (this.cornerstoneStyle.position) {
this.cornerstoneStyle = {}
this.setCanvasStyle()
this.fullScreenIndex = -1
} else {
this.cornerstoneStyle = {
position: 'absolute',
top: '72px',
top: '70px',
left: '205px',
right: '350px',
zIndex: 10,
}
this.canvasW = window.innerWidth - 570 + 'px'
this.canvasH = window.innerHeight - 130 + 'px'
this.fullScreenIndex = this.currentDicomCanvasIndex
}
this.$nextTick(() => {
// this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].reloadCanvas()
for (var i = 0; i < this.maxCanvas; i++) {
this.$refs[`dicomCanvas${i}`][0].reloadCanvas()
}
@ -1928,6 +1934,7 @@ export default {
},
//
changeLayout(name) {
this.fullScreenIndex = -1
if (this.activeTool) {
if (
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0]
@ -2301,15 +2308,16 @@ export default {
this.customWwc.visible = false
},
toggleInvert() {
if (this.activeTool === 'reversecolor') {
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].resetWwwc()
this.activeTool = ''
} else {
this.activeTool = 'reversecolor'
this.$refs[
`dicomCanvas${this.currentDicomCanvasIndex}`
][0].toggleInvert()
}
// if (this.activeTool === 'reversecolor') {
// this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].resetWwwc()
// this.activeTool = ''
// } else {
// this.activeTool = 'reversecolor'
// this.$refs[
// `dicomCanvas${this.currentDicomCanvasIndex}`
// ][0].toggleInvert()
// }
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].toggleInvert()
},
setImageIndexSync() {
this.isScrollSync = !this.isScrollSync

View File

@ -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) {

View File

@ -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

View File

@ -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,7 +297,7 @@
<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;" />
@ -303,6 +308,38 @@
</div>
</div>
</div>
<div
class="tool-item"
:title="$t('trials:reading:button:upload')"
v-if="trialCriterion.ImageUploadEnum > 0 && readingTaskState < 2"
v-hasPermi="['role:ir']"
>
<div class="tool-wrapper">
<div class="icon" @click.prevent="openUploadImage('upload')">
<i class="el-icon-upload2 svg-icon" />
</div>
</div>
</div>
<div
v-if="trialCriterion.ImageDownloadEnum > 0"
v-hasPermi="[
'role:ir',
'role:mim',
'role:mc',
'role:pm',
'role:apm',
'role:ea',
'role:qa',
]"
class="tool-item"
:title="$t('trials:reading:button:download')"
>
<div class="tool-wrapper">
<div class="icon" @click.prevent="openUploadImage('download')">
<i class="el-icon-download svg-icon" />
</div>
</div>
</div>
<!-- 伪彩 -->
<template v-if="readingTool === 2">
<colorMap v-show="isFusion" ref="colorMap" @setColorMap="setColorMap" @voiChange="voiChange" />
@ -362,7 +399,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 +469,10 @@
:visit-info="s"
@resetAnnotations="resetAnnotations"
@setReadingTaskState="setReadingTaskState"
@viewCustomAnnotationSeries="viewCustomAnnotationSeries"
@getCustomScreenshots="getCustomScreenshots"
@setReadingToolActive="setReadingToolActive"
@setReadingToolPassive="setReadingToolPassive"
/>
</div>
</div>
@ -522,14 +563,36 @@
</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>
<upload-dicom-and-nonedicom
v-if="uploadImageVisible"
:subject-id="uploadSubjectId"
:subject-code="uploadSubjectCode"
:criterion="uploadTrialCriterion"
:visible.sync="uploadImageVisible"
:visit-task-id="taskId"
:is-reading-task-view-in-order="isReadingTaskViewInOrder"
/>
<download-dicom-and-nonedicom
v-if="downloadImageVisible"
:subject-id="uploadSubjectId"
:subject-code="uploadSubjectCode"
:criterion="uploadTrialCriterion"
:task-id="taskId"
:visible.sync="downloadImageVisible"
/>
</div>
</template>
<script>
import { getRelatedVisitTask, getReadingVisitStudyList, getTableAnswerRowInfoList, deleteCustomTag } from '@/api/trials'
import { getRelatedVisitTask, getReadingVisitStudyList, getTableAnswerRowInfoList, deleteCustomTag, getCriterionReadingInfo } from '@/api/trials'
import { getDoctorShortcutKey, getUserWLTemplateList } from '@/api/user'
import { getCustomTag, submitCustomTag } from '@/api/reading'
import {
@ -550,6 +613,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'
@ -565,6 +630,8 @@ import ClinicalData from '@/views/trials/trials-panel/reading/clinical-data'
import FusionForm from './FusionForm.vue'
import colorMap from './colorMap.vue'
import RectangleROITool from './tools/RectangleROITool'
import uploadDicomAndNonedicom from '@/components/uploadDicomAndNonedicom'
import downloadDicomAndNonedicom from '@/components/downloadDicomAndNonedicom'
const { visibility } = annotation
const { ViewportType, Events } = Enums
const renderingEngineId = 'myRenderingEngine'
@ -584,17 +651,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 +673,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 +687,6 @@ annotation.config.style.setDefaultToolStyles(newStyles)
const { MouseBindings, Events: toolsEvents } = csToolsEnums
export default {
name: 'ReadPage',
props: {
readingTool: {
type: Number,
default: 2
}
},
components: {
StudyList,
Viewport,
@ -638,7 +701,15 @@ export default {
Others,
ClinicalData,
FusionForm,
colorMap
colorMap,
downloadDicomAndNonedicom,
uploadDicomAndNonedicom,
},
props: {
readingTool: {
type: Number,
default: 2
}
},
data() {
return {
@ -710,7 +781,19 @@ export default {
volumeData: {},
fusionSerieId: {},
loadingText: null,
toolNames: ['Length', 'Bidirectional', 'RectangleROI', 'ArrowAnnotate', 'CircleROI', 'Eraser'],
// resetAnnotation: false , // 使
//
downloadImageVisible: false,
uploadImageVisible: false,
uploadSubjectId: null,
uploadSubjectCode: null,
uploadTrialCriterion: {},
uploadStatus: 'upload',
taskId: '',
isReadingTaskViewInOrder: null,
trialCriterion: {}
}
},
computed: {
@ -736,9 +819,10 @@ export default {
},
viewportKey() {
return this.isFusion ? 'viewport-fusion' : 'viewport'
}
},
},
watch: {
currentReadingTaskState(){console.log(this.currentReadingTaskState,'currentReadingTaskState')},
activeTaskId: {
immediate: true,
handler(id) {
@ -788,12 +872,13 @@ export default {
},
mounted() {
this.taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
this.isReadingTaskViewInOrder = this.taskInfo.IsReadingTaskViewInOrder
this.criterionType = this.taskInfo.CriterionType
const digitPlaces = Number(localStorage.getItem('digitPlaces'))
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)
@ -812,6 +897,7 @@ export default {
this.initLoader()
this.getWwcTpl()
this.getHotKeys()
this.getTrialCriterion()
})
},
methods: {
@ -1062,13 +1148,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"]
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,
@ -1123,6 +1209,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 +1238,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 +1258,34 @@ export default {
toolGroup.addTool(CircleROITool.toolName, {
getTextLines: this.getCircleROIToolTextLines
})
toolGroup.addTool(AngleTool.toolName, {
getTextLines: this.getAngleToolTextLines
})
toolGroup.addTool(CobbAngleTool.toolName, {
getTextLines: this.getCobbAngleToolTextLines
})
if (toolGroupId === 'viewport-fusion-3') {
toolGroup.addTool(VolumeRotateTool.toolName);
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 +1310,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,6 +1319,8 @@ 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)
})
@ -1327,6 +1425,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 +1521,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,8 +1575,14 @@ 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) {
@ -1476,7 +1590,24 @@ export default {
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,7 +1630,8 @@ export default {
viewport.render()
}
} else {
throw 'annotation Not allowed to operate'
const errorMsg = { message: 'annotation Not allowed to operate' }
throw errorMsg
}
} catch (e) {
cornerstoneTools.annotation.state.addAnnotation(annotation)
@ -1521,6 +1653,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 +1760,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 +1781,9 @@ export default {
} = cachedVolumeStats || {}
const textLines = []
if (data.label) {
textLines.push(data.label)
}
if (area) {
const areaLine = isEmptyArea
? `Area: Oblique not supported`
@ -1679,11 +1826,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 +1854,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 +1885,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 +2004,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 +2109,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()
@ -2181,16 +2420,16 @@ export default {
this.fullScreenIndex = this.fullScreenIndex === index ? null : index
this.activeViewportIndex = index
if (this.isFusion) {
let viewportIds = [`${this.viewportKey}-0`, `${this.viewportKey}-1`, `${this.viewportKey}-2`]
const viewportIds = [`${this.viewportKey}-0`, `${this.viewportKey}-1`, `${this.viewportKey}-2`]
viewportIds.forEach(id => {
let index = this.$refs[id][0].series.SliceIndex
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'))
const confirm = await this.$confirm(this.$t('trials:reading:confirm:changeStack'))
if (!confirm) return false
this.isFusion = false
this.fullScreenIndex = null
@ -2262,7 +2501,7 @@ export default {
},
async activeSeries(obj) {
if (this.isFusion) {
let confirm = await this.$confirm(this.$t('trials:reading:confirm:changeStack'))
const confirm = await this.$confirm(this.$t('trials:reading:confirm:changeStack'))
if (!confirm) return false
this.isFusion = false
this.setToolsPassive()
@ -2419,6 +2658,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 +2884,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,6 +2911,9 @@ export default {
return null
}
},
isNumber(value) {
return typeof value === 'number' && value !== null && !isNaN(value)
},
showPanel(e, toolName) {
if (toolName === 'layout' && this.isFusion) return false
e.currentTarget.firstChild.lastChild.style.display = 'block'
@ -2661,67 +2932,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,7 +3000,7 @@ 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)
})
@ -2738,9 +3009,9 @@ export default {
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
@ -2768,22 +3039,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)
@ -2812,15 +3083,15 @@ export default {
},
async getVolume(serie, isFusion = false) {
return new Promise(async res => {
let volumeId = null, volume = null
let key = isFusion ? `fusion_${serie.SeriesInstanceUid}` : serie.SeriesInstanceUid
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()
})
}
@ -2851,6 +3122,27 @@ export default {
closeFusion() {
this.fusionVisible = false
},
getTrialCriterion() {
getCriterionReadingInfo({
TrialId: this.$route.query.trialId,
TrialReadingCriterionId: this.$route.query.TrialReadingCriterionId
})
.then((res) => {
this.trialCriterion = res.Result
})
.catch(() => {})
},
openUploadImage(status) {
const idx = this.visitTaskList.findIndex(i => i.IsCurrentTask)
if (idx > -1) {
this.taskId = this.visitTaskList[idx].VisitTaskId
}
this.uploadSubjectCode = localStorage.getItem("subjectCode")
this.uploadSubjectId = localStorage.getItem("subjectId")
this.uploadTrialCriterion = this.trialCriterion
this.uploadStatus = status
this[`${status}ImageVisible`] = true
},
}
}
</script>

View File

@ -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)

View File

@ -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,13 +973,14 @@ 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.rerender = true
@ -352,7 +991,7 @@ export default {
loading.close()
console.log(e)
}
},
}
}
}
</script>

View File

@ -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>

View File

@ -4,56 +4,33 @@
<div slot="header" class="clearfix report-header">
<h3 style="margin:0;padding:0;">{{ $t('trials:readingReport:title:eicrf') }}</h3>
<div style="margin-left:auto">
<el-button
v-if="readingTaskState<2"
type="primary"
size="small"
@click="skipTask"
>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="skipTask">
<!-- 跳过 -->
{{ $t('trials:readingReport:button:skip') }}
</el-button>
<el-button v-if="readingTaskState<2" type="primary" size="small" @click="getReportInfo">{{ $t('trials:readingReport:button:refresh') }}</el-button>
<el-button v-if="readingTaskState<2" type="primary" size="small" @click="handleSave(true)">{{ $t('common:button:save') }}</el-button>
<el-button v-if="readingTaskState<2" type="primary" size="small" @click="handleConfirm">{{ $t('common:button:submit') }}</el-button>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="getReportInfo">{{
$t('trials:readingReport:button:refresh') }}</el-button>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="handleSave(true)">{{
$t('common:button:save') }}</el-button>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="handleConfirm">{{
$t('common:button:submit') }}</el-button>
</div>
</div>
<div style="flex: 1">
<el-table
v-if="taskQuestions.length > 0"
ref="reportList"
v-adaptive="{bottomOffset:0}"
:data="taskQuestions"
row-key="Id"
border
default-expand-all
height="100"
:tree-props="{children: 'Childrens', hasChildren: 'hasChildren'}"
size="mini"
>
<el-table-column
prop=""
label=""
show-overflow-tooltip
width="350px"
>
<el-table v-if="taskQuestions.length > 0" ref="reportList" v-adaptive="{ bottomOffset: 0 }"
:data="taskQuestions" row-key="Id" border default-expand-all height="100"
:tree-props="{ children: 'Childrens', hasChildren: 'hasChildren' }" size="mini">
<el-table-column prop="" label="" show-overflow-tooltip width="350px">
<template slot-scope="scope">
<span v-if="scope.row.QuestionName">{{ scope.row.BlindName ? scope.row.QuestionName : scope.row.QuestionName }}</span>
<span
v-else
style="font-weight: bold;font-size: 16px;color: #f44336;"
>
<span v-if="scope.row.QuestionName">{{ scope.row.BlindName ? scope.row.QuestionName :
scope.row.QuestionName }}</span>
<span v-else style="font-weight: bold;font-size: 16px;color: #f44336;">
{{ scope.row.GroupName }}
</span>
</template>
</el-table-column>
<el-table-column
v-for="task in visitTaskList"
:key="task.VisitTaskId"
prop="date"
show-overflow-tooltip
width="200px"
>
<el-table-column v-for="task in visitTaskList" :key="task.VisitTaskId" prop="date" show-overflow-tooltip
width="200px">
<template slot="header">
<div v-if="task.IsCurrentTask">
{{ task.BlindName }}
@ -68,57 +45,43 @@
</div>
</template>
<template slot-scope="scope">
<template v-if="readingTaskState<2 && task.VisitTaskId === visitTaskId && (scope.row.Type==='input' || scope.row.Type==='number' || scope.row.Type==='select' || scope.row.Type==='textarea' || scope.row.Type==='radio')">
<template
v-if="readingTaskState < 2 && task.VisitTaskId === visitTaskId && (scope.row.Type === 'input' || scope.row.Type === 'number' || scope.row.Type === 'select' || scope.row.Type === 'textarea' || scope.row.Type === 'radio')">
<!-- 输入框 -->
<div>
<template v-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)" />
<template
v-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)" />
<el-input
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'input' || scope.row.Type === 'textarea') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
size="mini"
/>
<span v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type==='input' || scope.row.Type==='textarea')">
size="mini" />
<span
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'input' || scope.row.Type === 'textarea')">
{{ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] }}
</span>
<el-input
v-else-if="(scope.row.Type === 'input' || scope.row.Type === 'textarea') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-model="questionForm[scope.row.QuestionId]"
size="mini"
/>
v-model="questionForm[scope.row.QuestionId]" size="mini" />
<span v-else-if="scope.row.Type === 'input' || scope.row.Type === 'textarea'">
{{ questionForm[scope.row.QuestionId] }}
</span>
<el-select
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'select' || scope.row.Type === 'radio') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
size="mini"
clearable
>
size="mini" clearable>
<template>
<el-option
v-for="val in scope.row.TypeValue.split('|')"
:key="val"
:label="val"
:value="val"
/>
<el-option v-for="val in scope.row.TypeValue.split('|')" :key="val" :label="val" :value="val" />
</template>
</el-select>
<span v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type==='select'">
<span
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'select' || scope.row.Type === 'radio')">
{{ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] }}
</span>
<el-select
v-else-if="(scope.row.Type === 'select' || scope.row.Type === 'radio') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-model="questionForm[scope.row.QuestionId]"
size="mini"
clearable
>
v-model="questionForm[scope.row.QuestionId]" size="mini" clearable>
<template>
<el-option
v-for="val in scope.row.TypeValue.split('|')"
:key="val"
:label="val"
:value="val"
/>
<el-option v-for="val in scope.row.TypeValue.split('|')" :key="val" :label="val" :value="val" />
</template>
</el-select>
<span v-else-if="scope.row.Type === 'select' || scope.row.Type === 'radio'">
@ -127,51 +90,70 @@
<el-input
v-else-if="scope.row.DataSource !== 1 && questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type === 'number' && (scope.row.xfIndex || scope.row.xfIndex === 0) && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
:disabled="scope.row.DataSource === 1"
size="mini"
:disabled="scope.row.DataSource === 1" size="mini"
@blur="limitBlur(questionForm[scope.row.QuestionId][scope.row.xfIndex], scope.row.TableQuestionId, scope.row.ValueType)"
@focus="() => {questionId = scope.row.QuestionId}"
>
<template v-if="scope.row.Unit !== 0" slot="append">{{ scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit }}</template>
@focus="() => { questionId = scope.row.QuestionId }">
<template v-if="scope.row.Unit !== 0" slot="append">{{ scope.row.Unit !== 4 ? $fd('ValueUnit',
scope.row.Unit) : scope.row.CustomUnit }}</template>
<template v-else-if="scope.row.ValueType === 2" slot="append">%</template>
</el-input>
<span v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type==='number' && (scope.row.xfIndex || scope.row.xfIndex === 0)">
<span
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type === 'number' && (scope.row.xfIndex || scope.row.xfIndex === 0)">
<template v-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit">
{{ isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))? questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]:`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]} ${scope.row.Unit !== 4 ? $fd('ValueUnit',scope.row.Unit) : scope.row.CustomUnit}` }}
{{
isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))
?
questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] :
`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}
${scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}` }}
</template>
<template v-else-if="scope.row.ValueType === 2">
{{ isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId])) ? questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]:`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]} %` }}
{{
isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))
?
questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] :
`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}
%` }}
</template>
<template v-else>
{{ isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId])) ? questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]:`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}` }}
{{
isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))
?
questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] :
`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}`
}}
</template>
</span>
<el-input
v-else-if="scope.row.DataSource !== 1 && scope.row.Type === 'number' && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-model="questionForm[scope.row.QuestionId]"
:disabled="scope.row.DataSource === 1"
size="mini"
v-model="questionForm[scope.row.QuestionId]" :disabled="scope.row.DataSource === 1" size="mini"
@blur="limitBlur(questionForm, scope.row.QuestionId, scope.row.ValueType)"
@focus="() => {questionId = scope.row.QuestionId}"
>
<template v-if="scope.row.Unit !== 0" slot="append">{{ scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit }}</template>
@focus="() => { questionId = scope.row.QuestionId }">
<template v-if="scope.row.Unit !== 0" slot="append">{{ scope.row.Unit !== 4 ? $fd('ValueUnit',
scope.row.Unit) : scope.row.CustomUnit }}</template>
<template v-else-if="scope.row.ValueType === 2" slot="append">%</template>
</el-input>
<span v-else-if="scope.row.Type === 'number'">
<template v-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit">
{{ isNaN(parseInt(questionForm[scope.row.QuestionId]))? questionForm[scope.row.QuestionId]:`${questionForm[scope.row.QuestionId]} ${scope.row.Unit !== 4 ? $fd('ValueUnit',scope.row.Unit) : scope.row.CustomUnit}` }}
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ?
questionForm[scope.row.QuestionId] : `${questionForm[scope.row.QuestionId]} ${scope.row.Unit !== 4
?
$fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}` }}
</template>
<template v-else-if="scope.row.ValueType === 2">
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ? questionForm[scope.row.QuestionId]:`${questionForm[scope.row.QuestionId]} %` }}
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ?
questionForm[scope.row.QuestionId] : `${questionForm[scope.row.QuestionId]} %` }}
</template>
<template v-else>
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ? questionForm[scope.row.QuestionId] : questionForm[scope.row.QuestionId] }}
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ? questionForm[scope.row.QuestionId] :
questionForm[scope.row.QuestionId] }}
</template>
</span>
</div>
</template>
<template v-else-if="scope.row.Type === 'upload' && scope.row.Answers[task.VisitTaskId]">
<span v-for="(url,index) in scope.row.Answers[task.VisitTaskId].split('|')" :key="url" style="margin-left: 5px;">
<span v-for="(url, index) in scope.row.Answers[task.VisitTaskId].split('|')" :key="url"
style="margin-left: 5px;">
<el-button v-if="scope.row.Answers[task.VisitTaskId]" type="text" @click="preview(url)">
{{ `${$t('trials:noneDicom:title:attachment')}${index + 1}` }}
</el-button>
@ -181,14 +163,22 @@
{{ $fd(scope.row.DictionaryCode, scope.row.Answers[task.VisitTaskId]) }}
</template>
<template v-else-if="criterionType === 10">
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId]))?scope.row.Answers[task.VisitTaskId]:`${scope.row.Answers[task.VisitTaskId]}` }}
{{
isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ? scope.row.Answers[task.VisitTaskId] :
`${scope.row.Answers[task.VisitTaskId]}`
}}
</template>
<template v-else-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)" />
<template
v-else-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)" />
<template v-else-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit">
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId]))?scope.row.Answers[task.VisitTaskId]:`${scope.row.Answers[task.VisitTaskId]} ${scope.row.Unit !== 4 ? $fd('ValueUnit',scope.row.Unit) : scope.row.CustomUnit}` }}
{{
isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ? scope.row.Answers[task.VisitTaskId] :
`${scope.row.Answers[task.VisitTaskId]}
${scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}` }}
</template>
<template v-else-if="scope.row.ValueType === 2">
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ? scope.row.Answers[task.VisitTaskId]:`${scope.row.Answers[task.VisitTaskId]} %` }}
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ?
scope.row.Answers[task.VisitTaskId] : `${scope.row.Answers[task.VisitTaskId]} %` }}
</template>
<template v-else-if="scope.row.Answers && scope.row.Answers.hasOwnProperty(task.VisitTaskId)">
{{ scope.row.Answers[task.VisitTaskId] }}
@ -200,13 +190,8 @@
</el-card>
<!-- 签名框 -->
<el-dialog
v-if="signVisible"
:visible.sync="signVisible"
:close-on-click-modal="false"
width="600px"
custom-class="base-dialog-wrapper"
>
<el-dialog v-if="signVisible" :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>
@ -215,23 +200,10 @@
</el-dialog>
<!-- 预览文件 -->
<el-dialog
v-if="previewVisible"
:visible.sync="previewVisible"
:title="$t('common:button: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"
/>
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="$t('common:button: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" />
</div>
</el-dialog>
</div>
@ -765,88 +737,110 @@ export default {
height: 100%;
// background-color: #fff;
background-color: #000;
::-webkit-scrollbar {
width: 7px;
height: 7px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
// background: #d0d0d0;
}
.report-header {
display: flex;
}
.el-card {
background-color: #000;
color: #ffffff;
border: none;
}
::v-deep .el-table--border th.gutter:last-of-type {
border: none;
}
::v-deep .el-table, .el-table__expanded-cell {
::v-deep .el-table,
.el-table__expanded-cell {
background-color: #000;
color: #fff;
border-color: #444444;
}
::v-deep .el-table th, .el-table tr {
::v-deep .el-table th,
.el-table tr {
background-color: #000;
color: #fff;
border-color: #444444;
}
::v-deep .el-table__body tr>td {
background-color: #000 !important;
color: #fff;
border-color: #444444;
}
::v-deep .el-table__body tr:hover>td {
background-color: #858282 !important;
color: #fff;
border-color: #444444;
}
::v-deep .el-table--border th.gutter:last-of-type {
border: none;
}
::v-deep .el-card__header {
border: none;
padding: 10px;
}
::v-deep .el-upload-list--picture-card .el-upload-list__item {
width: 30px;
height: 30px;
}
::v-deep .el-upload--picture-card {
width: 30px;
height: 30px;
line-height: 40px;
}
::v-deep .el-dialog {
background: #1e1e1e;
border: 1px solid #ddd;
color: #ddd;
.el-dialog__title {
color: #fff;
}
.el-input .el-input__inner {
background-color: transparent;
color: #ddd;
border: 1px solid #5e5e5e;
}
.el-input.is-disabled .el-input__inner {
background-color: #646464a1;
}
.el-form-item__label {
color: #dfdfdf
}
}
}
::v-deep .el-switch__label {
color: #fff;
}
::v-deep .el-switch__label.is-active {
color: #428bca;
}
.uploadWrapper {
display: flex;
flex-direction: column;

View File

@ -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': ''
}
]
}

View File

@ -30,6 +30,7 @@
type="primary"
size="small"
@click="skipTask"
v-if="!isView"
>
<!-- 跳过 -->
{{ $t('trials:readingReport:button:skip') }}
@ -337,6 +338,11 @@ export default {
// }
// }
// },
computed:{
isView(){
return !this.hasPermi(['role:ir'])
}
},
mounted() {
this.getList()
if (this.isReadingShowPreviousResults) {

View File

@ -0,0 +1,433 @@
<template>
<BaseContainer style="padding: 20px;">
<template slot="title-container">
<div class="title">
{{ $t('trials:readOrder:title') }}
</div>
</template>
<template slot="search-container">
<el-form :inline="true">
<!-- 是否加急 -->
<el-form-item style="margin-bottom: 10px" :label="$t('trials:readOrder: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-select>
</el-form-item>
<!-- 临床数据是否完备 -->
<el-form-item style="margin-bottom: 10px"
:label="$t('trials:readOrder:table:completeClinicalDataEnum')">
<el-select v-model="searchData.CompleteClinicalDataEnum" clearable style="width: 120px">
<el-option v-for="item of $d.CompleteClinicalDataEnum"
:key="'CompleteClinicalDataEnum' + item.label" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<!-- 中心编号 -->
<el-form-item :label="$t('trials:readOrder: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-select>
</el-form-item>
<!-- 受试者编号 -->
<el-form-item :label="$t('trials:readOrder:table:subjectCode')">
<el-input v-model="searchData.SubjectCode" style="width: 100px" />
</el-form-item>
<!-- 任务名称 -->
<el-form-item style="margin-bottom: 10px" :label="$t('trials:readOrder:table:taskName')">
<el-input v-model="searchData.TaskName" style="width: 100px" clearable />
</el-form-item>
<!-- 阅片人 -->
<el-form-item style="margin-bottom: 10px" :label="$t('trials:readOrder:table:reader')">
<el-select v-model="searchData.DoctorUserId" style="width: 120px">
<el-option v-for="item of DoctorUserList" :key="'DoctorUserId' + item.DoctorUserId"
:value="item.DoctorUserId" :label="`${item.UserName}(${item.FullName})`" />
</el-select>
</el-form-item>
<!-- 阅片标准 -->
<el-form-item style="margin-bottom: 10px" :label="$t('trials:readOrder:table:criterionName')">
<el-select v-model="searchData.TrialReadingCriterionId" style="width: 120px">
<el-option v-for="item of trialCriterionList"
:key="'TrialReadingCriterionId' + item.TrialReadingCriterionId"
:value="item.TrialReadingCriterionId" :label="item.TrialReadingCriterionName" />
</el-select>
</el-form-item>
<!-- 分配时间 -->
<el-form-item style="margin-bottom: 10px" :label="$t('trials:readOrder: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-form-item>
<el-form-item style="margin-bottom: 10px">
<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" icon="el-icon-download" @click="handleExport">
{{ $t('common:button:export') }}
</el-button>
<!-- 随机排序 -->
<el-button type="primary" @click="randomOrder"
:disabled="!searchData.TrialReadingCriterionId || !searchData.DoctorUserId" v-if="!isAdmin">
{{ $t('trials:readingTracking:button:order') }}
</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="handleSortChange">
<!-- 是否加急 -->
<el-table-column prop="IsUrgent" :label="$t('trials:readOrder:table:isUrgent')" min-width="120"
sortable="custom" align="center" style="position: relative">
<template slot-scope="scope">
<el-tooltip placement="top">
<div slot="content">
<span>{{
`${$t('trials:readOrder:label:taskUrgentType')}${$fd(
'TaskUrgentType',
scope.row.TaskUrgentType
)}`
}}</span><br />
<span>{{
scope.row.TaskUrgentRemake
? `${$t('trials:readOrder:label:taskUrgentRemake')}${scope.row.TaskUrgentRemake
}`
: ''
}}</span>
</div>
<div>
<el-button :disabled="!(
!scope.row.TaskState &&
(scope.row.ReadingTaskState === 0 ||
scope.row.ReadingTaskState === 1)
) || !scope.row.IsCanEditUrgentState
" v-if="scope.row.IsUrgent" type="danger" size="mini">{{
$fd('YesOrNo', scope.row.IsUrgent) }}</el-button>
</div>
</el-tooltip>
<el-button :disabled="!(
!scope.row.TaskState &&
(scope.row.ReadingTaskState === 0 ||
scope.row.ReadingTaskState === 1)
) || !scope.row.IsCanEditUrgentState
" v-if="!scope.row.IsUrgent" type="primary" size="mini">{{
$fd('YesOrNo', scope.row.IsUrgent) }}</el-button>
</template>
</el-table-column>
<!-- 临床数据是否完备 -->
<el-table-column prop="CompleteClinicalDataEnum"
:label="$t('trials:readOrder:table:completeClinicalDataEnum')" min-width="160"
show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.CompleteClinicalDataEnum === -1">
{{
$fd(
'CompleteClinicalDataEnum',
scope.row.CompleteClinicalDataEnum
)
}}
</span>
<el-button type="text" v-else>
{{
$fd(
'CompleteClinicalDataEnum',
scope.row.CompleteClinicalDataEnum
)
}}
</el-button>
</template>
</el-table-column>
<!-- 中心编号 -->
<el-table-column prop="TrialSiteCode" :label="$t('trials:readOrder:table:siteCode')" min-width="100"
sortable="custom" show-overflow-tooltip />
<!-- 受试者编号 -->
<el-table-column prop="SubjectCode" :label="$t('trials:readOrder:table:subjectCode')" min-width="120"
sortable="custom" 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:readOrder:table:taskName')" min-width="140"
sortable="custom" 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="UserName" :label="$t('trials:readOrder:table:reader')" min-width="130"
sortable="custom" show-overflow-tooltip>
<template v-if="scope.row.UserName" slot-scope="scope">
<span>{{ scope.row.UserName }}({{ scope.row.FullName }})</span>
</template>
</el-table-column>
<!-- 阅片标准 -->
<el-table-column prop="TrialReadingCriterionName" :label="$t('trials:readOrder:table:criterionName')"
min-width="180" sortable="custom" show-overflow-tooltip />
<!-- 分配时间 -->
<el-table-column prop="AllocateTime" :label="$t('trials:readOrder:table:assignTime')" min-width="180"
sortable="custom" show-overflow-tooltip />
<!-- 阅片序号 -->
<el-table-column prop="RandomOrder" :label="$t('trials:readOrder:table:randomOrder')" min-width="180"
sortable="custom" show-overflow-tooltip>
<template slot-scope="scope">
<el-input-number v-model="scope.row.RandomOrder"
@change="(value, old) => handleChange(scope.row, value, old)" :min="0" style="width: 150px;"
v-if="scope.row.ReadingTaskState !== 1 && !isAdmin"></el-input-number>
<span v-else>{{ scope.row.RandomOrder }}</span>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
</template>
</BaseContainer>
</template>
<script>
import { getTrialSiteSelect } from '@/api/trials'
import {
getTrialCriterionList,
getReadingTaskList,
getDoctorUserSelectList,
setRandomTaskOrder
} from '@/api/trials/reading'
import { getReadingTaskList_Export } from '@/api/export'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
const searchDataDefault = () => {
return {
PageIndex: 1,
PageSize: 20,
Asc: true,
SortField: 'RandomOrder',
TrialId: null,
TrialSiteId: null,
SubjectId: null,
SubjectCode: null,
IsUrgent: null,
TaskName: null,
TaskState: null,
DoctorUserId: null,
ReadingCategory: null,
TaskAllocationState: null,
BeginAllocateDate: null,
EndAllocateDate: null,
ReadingTaskState: null,
CompleteClinicalDataEnum: null,
BeginSignTime: null,
EndSignTime: null,
IsEffect: true,
TrialReadingCriterionId: null,
IsRandomOrderList: true
// ArmEnum: null
}
}
export default {
name: 'ReadOrder',
components: {
BaseContainer,
Pagination,
},
data() {
return {
searchData: searchDataDefault(),
exportVisible: false,
list: [],
siteOptions: [],
total: 0,
SubjectAssignListTotal: 0,
loading: false,
trialCriterionList: [],
DoctorUserList: [],
timeList: []
}
},
created() {
if (!this.hasPermi(['role:pm', 'role:apm', 'role:admin'])) return this.$router.replace("/login")
},
computed: {
isAdmin() {
return !!this.hasPermi(['role:admin'])
}
},
mounted() {
this.getSite()
Promise.all([this.getDoctorUserSelectList(), this.getTrialCriterionList()]).then(() => {
this.getList()
})
},
beforeDestroy() {
if (this.openWindow) {
this.openWindow.close()
}
},
methods: {
//
async handleChange(row, value, old) {
try {
if (!this.searchData.DoctorUserId || !this.searchData.TrialReadingCriterionId) return false
if (!value) throw this.$t('trials:readOrder:message:min1')
let data = {
TrialId: this.$route.query.trialId,
TrialReadingCriterionId: this.searchData.TrialReadingCriterionId,
DoctorUserId: this.searchData.DoctorUserId,
IsAutoSet: false,
SetList: [
{ Id: row.Id, RandomOrder: value }
]
}
this.loading = true;
let res = await setRandomTaskOrder(data)
this.loading = false
if (res.IsSuccess) {
this.getList()
} else {
row.RandomOrder = old
}
} catch (err) {
row.RandomOrder = old
console.log(err)
this.$message.warning(err)
this.getList()
this.loading = false
}
},
//
async randomOrder() {
try {
if (!this.searchData.DoctorUserId || !this.searchData.TrialReadingCriterionId) return false
let data = {
TrialId: this.$route.query.trialId,
TrialReadingCriterionId: this.searchData.TrialReadingCriterionId,
DoctorUserId: this.searchData.DoctorUserId,
IsAutoSet: true,
SetList: []
}
this.loading = true;
let res = await setRandomTaskOrder(data)
this.loading = false
if (res.IsSuccess) {
this.getList()
}
} catch (err) {
console.log(err)
this.loading = false
}
},
async handleExport() {
this.loading = true
try {
await getReadingTaskList_Export(this.searchData)
this.loading = false
} catch (e) {
this.loading = false
}
},
getTrialCriterionList() {
return new Promise((resolve, reject) => {
getTrialCriterionList(this.$route.query.trialId, true)
.then((res) => {
this.trialCriterionList = res.Result
if (this.trialCriterionList.length > 0) {
this.searchData.TrialReadingCriterionId = this.trialCriterionList[0].TrialReadingCriterionId
}
resolve()
})
.catch(() => { reject() })
})
},
getDoctorUserSelectList() {
return new Promise((resolve, reject) => {
getDoctorUserSelectList(this.$route.query.trialId).then((res) => {
this.DoctorUserList = res.Result
if (this.DoctorUserList.length > 0) {
this.searchData.DoctorUserId = this.DoctorUserList[0].DoctorUserId
}
resolve()
}).catch(() => { reject() })
})
},
getList() {
if (!this.searchData.DoctorUserId || !this.searchData.TrialReadingCriterionId) return false
this.searchData.TrialId = this.$route.query.trialId
this.loading = true
getReadingTaskList(this.searchData)
.then((res) => {
this.loading = false
this.list = []
this.$nextTick(() => {
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
})
})
.catch(() => {
this.loading = false
})
},
handleSearch() {
this.searchData.PageIndex = 1
this.getList()
},
handleReset() {
let TrialReadingCriterionId = this.searchData.TrialReadingCriterionId
let DoctorUserId = this.searchData.DoctorUserId
this.searchData = searchDataDefault()
this.searchData.DoctorUserId = DoctorUserId
this.searchData.TrialReadingCriterionId = TrialReadingCriterionId
this.timeList = []
this.getList()
},
getSite() {
getTrialSiteSelect(this.$route.query.trialId).then((res) => {
this.siteOptions = res.Result
})
},
changeTimeList() {
if (this.timeList) {
this.searchData.BeginAllocateDate = this.timeList[0]
this.searchData.EndAllocateDate = this.timeList[1]
} else {
this.searchData.BeginAllocateDate = null
this.searchData.EndAllocateDate = null
}
},
//
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>
.title {
line-height: 40px;
font-weight: bold;
margin-bottom: 10px;
}
</style>

View File

@ -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) {

View File

@ -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() {

View File

@ -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,150 +52,138 @@ 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>
@ -271,18 +194,20 @@ export default {
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>

View File

@ -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>

View File

@ -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>

View File

@ -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
},
//

View File

@ -5,81 +5,34 @@
<div class="search">
<el-form :inline="true" size="mini" class="base-search-form">
<!-- 审核问题 -->
<el-form-item
:label="$t('trials:emailManageCfg:title:businessScenario')"
>
<el-select
v-model="searchData.BusinessScenarioEnum"
style="width: 150px"
>
<el-option
v-for="item of $d.Email_BusinessScenario"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-form-item :label="$t('trials:emailManageCfg:title:businessScenario')">
<el-select v-model="searchData.BusinessScenarioEnum" style="width: 150px">
<el-option v-for="item of $d.Email_BusinessScenario" :key="item.value" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item
style="margin-bottom: 10px"
:label="$t('trials:emailManageCfg:table:BusinessModuleEnum')"
>
<el-select
v-model="searchData.BusinessModuleEnum"
clearable
style="width: 120px"
>
<el-option
v-for="item of $d.BusinessModule"
:key="item.id"
:label="item.label"
:value="item.value"
/>
<el-form-item style="margin-bottom: 10px" :label="$t('trials:emailManageCfg:table:BusinessModuleEnum')">
<el-select v-model="searchData.BusinessModuleEnum" clearable style="width: 120px">
<el-option v-for="item of $d.BusinessModule" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item
v-if="isDistinguishCriteria"
style="margin-bottom: 10px"
:label="$t('trials:reviewTrack:table:criterionName')"
>
<el-select
v-model="searchData.CriterionTypeEnum"
clearable
style="width: 120px"
>
<el-option
v-for="item of $d.CriterionType"
:key="item.id"
:label="item.label"
:value="item.value"
/>
<el-form-item v-if="isDistinguishCriteria" style="margin-bottom: 10px"
:label="$t('trials:reviewTrack:table:criterionName')">
<el-select v-model="searchData.CriterionTypeEnum" clearable style="width: 120px">
<el-option v-for="item of $d.CriterionType" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item
:label="$t('trials:emailManageCfg:title:toUserTypeList')"
prop="ToUserTypeList"
>
<el-form-item :label="$t('trials:emailManageCfg:title:toUserTypeList')" prop="ToUserTypeList">
<el-select v-model="searchData.ToUserType" clearable class="mr">
<el-option
v-for="item of UserTypeList"
:key="`ToUserTypeList${item.label}`"
:label="item.label"
:value="item.value"
/>
<el-option v-for="item of UserTypeList" :key="`ToUserTypeList${item.label}`" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item
:label="$t('trials:emailManageCfg:table:EmailUrgentEnum')"
prop="EmailUrgentEnum"
v-if="!isDistinguishCriteria"
>
<el-form-item :label="$t('trials:emailManageCfg:table:EmailUrgentEnum')" prop="EmailUrgentEnum"
v-if="!isDistinguishCriteria">
<el-select v-model="searchData.EmailUrgentEnum" clearable class="mr">
<el-option
v-for="item of $d.EmailUrgent"
:key="`ToUserTypeList${item.label}`"
:label="item.label"
:value="item.value"
/>
<el-option v-for="item of $d.EmailUrgent" :key="`ToUserTypeList${item.label}`" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item>
@ -89,40 +42,19 @@
<el-button type="primary" @click="handleReset">{{
$t('common:button:reset')
}}</el-button>
<el-button
type="primary"
@click="handleAdd"
class="el-icon-plus"
v-if="!isDistinguishCriteria && isShow"
>{{ $t('trials:reviewTrack:button:addDefault') }}</el-button
>
<el-button type="primary" @click="handleAdd" class="el-icon-plus" v-if="!isDistinguishCriteria && isShow">{{
$t('trials:reviewTrack:button:addDefault') }}</el-button>
</el-form-item>
</el-form>
<span style="margin-left: auto">
<el-button
type="primary"
size="mini"
:disabled="selectArr.length <= 0"
@click="handleSubmit"
>
<el-button type="primary" size="mini" :disabled="selectArr.length <= 0" @click="handleSubmit">
{{ $t('common:button:submit') }}
</el-button>
</span>
</div>
<el-table
:data="list"
stripe
size="small"
height="400"
@selection-change="handleSelectChange"
>
<el-table-column
type="selection"
align="left"
:selectable="selectable"
width="45"
/>
<el-table :data="list" stripe size="small" height="400" @selection-change="handleSelectChange">
<el-table-column type="selection" align="left" :selectable="selectable" width="45" />
<el-table-column type="index" width="40" />
<!-- Code -->
<!-- <el-table-column
@ -132,63 +64,33 @@
show-overflow-tooltip
width="100"
/> -->
<el-table-column
v-if="isDistinguishCriteria"
prop="TrialReadingCriterionId"
:label="$t('trials:reviewTrack:table:criterionName')"
show-overflow-tooltip
sortable="custom"
width="120"
>
<el-table-column v-if="isDistinguishCriteria" prop="CriterionTypeList"
:label="$t('trials:reviewTrack:table:criterionName')" show-overflow-tooltip sortable="custom" width="120">
<template slot-scope="scope">
{{ $fd('CriterionType', scope.row.CriterionTypeEnum) }}
{{scope.row.CriterionTypeList && scope.row.CriterionTypeList.length > 0 ?
scope.row.CriterionTypeList.map(item => { return $fd('CriterionType', item) }
).join(', ') : ''}}
</template>
</el-table-column>
<el-table-column
v-if="$i18n.locale === 'zh'"
prop="EmailTopicCN"
:label="$t('trials:emailManageCfg:table:EmailTopicCN')"
sortable="custom"
show-overflow-tooltip
width="160"
/>
<el-table-column
v-else
prop="EmailTopic"
:label="$t('trials:emailManageCfg:table:EmailTopic')"
sortable="custom"
show-overflow-tooltip
width="160"
/>
<el-table-column
prop="BusinessModuleEnum"
:label="$t('trials:emailManageCfg:table:BusinessModuleEnum')"
sortable="custom"
show-overflow-tooltip
width="100"
>
<el-table-column v-if="$i18n.locale === 'zh'" prop="EmailTopicCN"
:label="$t('trials:emailManageCfg:table:EmailTopicCN')" sortable="custom" show-overflow-tooltip width="160" />
<el-table-column v-else prop="EmailTopic" :label="$t('trials:emailManageCfg:table:EmailTopic')" sortable="custom"
show-overflow-tooltip width="160" />
<el-table-column prop="BusinessModuleEnum" :label="$t('trials:emailManageCfg:table:BusinessModuleEnum')"
sortable="custom" show-overflow-tooltip width="100">
<template slot-scope="scope">
{{ $fd('BusinessModule', scope.row.BusinessModuleEnum) }}
</template>
</el-table-column>
<el-table-column
prop="BusinessScenarioEnum"
:label="$t('trials:emailManageCfg:table:BusinessScenarioEnum')"
sortable="custom"
show-overflow-tooltip
width="130"
>
<el-table-column prop="BusinessScenarioEnum" :label="$t('trials:emailManageCfg:table:BusinessScenarioEnum')"
sortable="custom" show-overflow-tooltip width="130">
<template slot-scope="scope">
{{ $fd('Email_BusinessScenario', scope.row.BusinessScenarioEnum) }}
</template>
</el-table-column>
<!-- 收件人 -->
<el-table-column
prop="ToUserTypeList"
:label="$t('trials:emailManageCfg:title:toUserTypeList')"
show-overflow-tooltip
width="100"
>
<el-table-column prop="ToUserTypeList" :label="$t('trials:emailManageCfg:title:toUserTypeList')"
show-overflow-tooltip width="100">
<template slot-scope="scope">
{{
scope.row.ToUserTypeList.length > 0
@ -200,12 +102,8 @@
</template>
</el-table-column>
<!-- 抄送人 -->
<el-table-column
prop="CopyUserTypeList"
:label="$t('trials:emailManageCfg:title:copyUserTypeList')"
show-overflow-tooltip
width="100"
>
<el-table-column prop="CopyUserTypeList" :label="$t('trials:emailManageCfg:title:copyUserTypeList')"
show-overflow-tooltip width="100">
<template slot-scope="scope">
{{
scope.row.CopyUserTypeList.length > 0
@ -216,71 +114,39 @@
}}
</template>
</el-table-column>
<el-table-column
:label="$t('trials:emailManageCfg:table:EmailUrgentEnum')"
sortable="custom"
show-overflow-tooltip
width="100"
>
<el-table-column :label="$t('trials:emailManageCfg:table:EmailUrgentEnum')" sortable="custom"
show-overflow-tooltip width="100">
<template slot-scope="scope">
{{ $fd('EmailUrgent', scope.row.EmailUrgentEnum) }}
</template>
</el-table-column>
<el-table-column
prop="EmailCron"
:label="$t('trials:emailManageCfg:table:EmailCron')"
sortable="custom"
show-overflow-tooltip
width="160"
>
<el-table-column prop="EmailCron" :label="$t('trials:emailManageCfg:table:EmailCron')" sortable="custom"
show-overflow-tooltip width="160">
<template slot-scope="scope">
<span>{{ getEmailCron(scope.row.EmailCron) }}</span>
</template>
</el-table-column>
<!-- 附件 -->
<el-table-column
v-if="$i18n.locale === 'zh'"
prop="AttachNameCN"
:label="$t('trials:emailManageCfg:title:fileName')"
show-overflow-tooltip
width="100"
>
<el-table-column v-if="$i18n.locale === 'zh'" prop="AttachNameCN"
:label="$t('trials:emailManageCfg:title:fileName')" show-overflow-tooltip width="100">
<template slot-scope="scope">
<el-button
v-if="scope.row.AttachCNPath"
type="text"
@click="handlePreview(scope.row.AttachCNPath)"
>
<el-button v-if="scope.row.AttachCNPath" type="text" @click="handlePreview(scope.row.AttachCNPath)">
{{ scope.row.AttachNameCN }}
</el-button>
</template>
</el-table-column>
<!-- 附件 -->
<el-table-column
v-else
prop="AttachName"
:label="$t('trials:emailManageCfg:title:fileName')"
show-overflow-tooltip
width="100"
>
<el-table-column v-else prop="AttachName" :label="$t('trials:emailManageCfg:title:fileName')"
show-overflow-tooltip width="100">
<template slot-scope="scope">
<el-button
v-if="scope.row.AttachPath"
type="text"
@click="handlePreview(scope.row.AttachPath)"
>
<el-button v-if="scope.row.AttachPath" type="text" @click="handlePreview(scope.row.AttachPath)">
{{ scope.row.AttachName }}
</el-button>
</template>
</el-table-column>
<!-- 是否需要回执 -->
<el-table-column
prop="IsReturnRequired"
:label="$t('trials:emailManageCfg:title:isReturnRequired')"
show-overflow-tooltip
sortable="custom"
width="140"
>
<el-table-column prop="IsReturnRequired" :label="$t('trials:emailManageCfg:title:isReturnRequired')"
show-overflow-tooltip sortable="custom" width="140">
<template slot-scope="scope">
<el-tag v-if="scope.row.IsReturnRequired" type="danger">
{{ $fd('YesOrNo', scope.row.IsReturnRequired) }}
@ -291,13 +157,8 @@
</template>
</el-table-column>
<!-- 是否自动发送 -->
<el-table-column
prop="IsAutoSend"
:label="$t('trials:emailManageCfg:title:isAutoSend')"
show-overflow-tooltip
sortable="custom"
width="160"
>
<el-table-column prop="IsAutoSend" :label="$t('trials:emailManageCfg:title:isAutoSend')" show-overflow-tooltip
sortable="custom" width="160">
<template slot-scope="scope">
<el-tag v-if="scope.row.IsAutoSend" type="danger">
{{ $fd('YesOrNo', scope.row.IsAutoSend) }}
@ -307,13 +168,8 @@
}}</el-tag>
</template>
</el-table-column>
<el-table-column
prop="IsEnable"
:label="$t('trials:emailManageCfg:table:IsEnable')"
show-overflow-tooltip
sortable="custom"
width="160"
>
<el-table-column prop="IsEnable" :label="$t('trials:emailManageCfg:table:IsEnable')" show-overflow-tooltip
sortable="custom" width="160">
<template slot-scope="scope">
<el-tag v-if="scope.row.IsEnable" type="danger">
{{ $fd('YesOrNo', scope.row.IsEnable) }}
@ -324,29 +180,14 @@
</template>
</el-table-column>
<!-- 更新时间 -->
<el-table-column
prop="UpdateTime"
:label="$t('trials:emailManageCfg:title:updateTime')"
show-overflow-tooltip
sortable="custom"
width="160"
/>
<el-table-column prop="UpdateTime" :label="$t('trials:emailManageCfg:title:updateTime')" show-overflow-tooltip
sortable="custom" width="160" />
<!-- 创建时间 -->
<el-table-column
prop="CreateTime"
:label="$t('trials:emailManageCfg:title:createTime')"
show-overflow-tooltip
sortable="custom"
width="160"
/>
<el-table-column prop="CreateTime" :label="$t('trials:emailManageCfg:title:createTime')" show-overflow-tooltip
sortable="custom" width="160" />
</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" />
</box-content>
</template>
<script>

View File

@ -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">
<el-form-item label="Code" prop="Code">
@ -14,242 +7,111 @@
</el-form-item>
</el-col>
<el-col :span="12" v-if="$i18n.locale === 'zh'">
<el-form-item
:label="$t('trials:emailManageCfg:table:EmailTopicCN')"
prop="EmailTopicCN"
>
<el-form-item :label="$t('trials:emailManageCfg:table:EmailTopicCN')" prop="EmailTopicCN">
<el-input style="width: 300px" disabled v-model="form.EmailTopicCN" />
</el-form-item>
</el-col>
<el-col :span="12" v-else>
<el-form-item
:label="$t('trials:emailManageCfg:table:EmailTopic')"
prop="EmailTopic"
>
<el-form-item :label="$t('trials:emailManageCfg:table:EmailTopic')" prop="EmailTopic">
<el-input style="width: 300px" disabled v-model="form.EmailTopic" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item
:label="$t('trials:emailManageCfg:table:BusinessScenarioEnum')"
prop="BusinessScenarioEnum"
>
<el-select
v-model="form.BusinessScenarioEnum"
disabled
clearable
class="mr"
>
<el-option
v-for="item of $d.Email_BusinessScenario"
:key="`BusinessScenarioEnum${item.label}`"
:label="item.label"
:value="item.value"
/>
<el-form-item :label="$t('trials:emailManageCfg:table:BusinessScenarioEnum')" prop="BusinessScenarioEnum">
<el-select v-model="form.BusinessScenarioEnum" disabled clearable class="mr">
<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:table:ToUserTypeList')"
prop="ToUserTypeList"
>
<el-select
v-model="form.ToUserTypeList"
clearable
multiple
class="mr"
>
<el-option
v-for="item of UserTypeList"
:key="`ToUserTypeList${item.label}`"
:label="item.label"
:value="item.value"
/>
<el-form-item :label="$t('trials:emailManageCfg:table:ToUserTypeList')" prop="ToUserTypeList">
<el-select v-model="form.ToUserTypeList" clearable multiple class="mr">
<el-option v-for="item of UserTypeList" :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:table:CopyUserTypeList')"
prop="CopyUserTypeList"
>
<el-select
v-model="form.CopyUserTypeList"
clearable
multiple
class="mr"
>
<el-option
v-for="item of UserTypeList"
:key="`CopyUserTypeList${item.label}`"
:label="item.label"
:value="item.value"
/>
<el-form-item :label="$t('trials:emailManageCfg:table:CopyUserTypeList')" prop="CopyUserTypeList">
<el-select v-model="form.CopyUserTypeList" clearable multiple class="mr">
<el-option v-for="item of UserTypeList" :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('trials:emailManageCfg:table:blackUserIdList')"
prop="blackUserIdList"
>
<el-select
v-model="form.blackUserIdList"
clearable
multiple
class="mr"
>
<el-option
v-for="item of UserList"
:key="`blackUserIdList${item.UserName}`"
:label="`${item.UserName}(${item.RealName})`"
:value="item.UserId"
/>
<el-form-item :label="$t('trials:emailManageCfg:table:blackUserIdList')" prop="blackUserIdList">
<el-select v-model="form.blackUserIdList" clearable multiple class="mr">
<el-option v-for="item of UserList" :key="`blackUserIdList${item.UserName}`"
:label="`${item.UserName}(${item.RealName})`" :value="item.UserId" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-col :span="12">
<el-form-item
:label="$t('trials:emailManageCfg:table:EmailUrgentEnum')"
prop="EmailUrgentEnum"
>
<el-select
v-model="form.EmailUrgentEnum"
disabled
clearable
class="mr"
>
<el-option
v-for="item of $d.EmailUrgent"
:key="`EmailUrgent${item.label}`"
:label="item.label"
:value="item.value"
/>
<el-form-item :label="$t('trials:emailManageCfg:table:EmailUrgentEnum')" prop="EmailUrgentEnum">
<el-select v-model="form.EmailUrgentEnum" disabled 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 && IntervalShow"
prop="EmailCron"
>
<el-input-number
v-model="Interval"
@change="handleIntervalChange"
:min="1"
:max="365"
></el-input-number>
<el-form-item :label="$t('trials:emailManageCfg:table:EmailCron')"
v-if="form.EmailUrgentEnum !== 1 && IntervalShow" prop="EmailCron">
<el-input-number v-model="Interval" @change="handleIntervalChange" :min="1" :max="365"></el-input-number>
<!-- <el-input style="width: 300px" readonly v-model="form.EmailCron" />-->
<!-- <el-button type="primary" @click="showDialog"> cron</el-button>-->
</el-form-item>
</el-col>
</el-col>
<el-col :span="12">
<el-form-item
:label="$t('trials:emailManageCfg:title:isReturnRequired')"
prop="IsReturnRequired"
>
<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>
<el-col :span="12">
<el-form-item
:label="$t('trials:emailManageCfg:table:IsAutoSend')"
prop="IsAutoSend"
>
<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">
<el-form-item
:label="$t('trials:emailManageCfg:table:IsEnable')"
prop="IsEnable"
>
<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="24">
<el-form-item
:label="$t('trials:emailManageCfg:table:CriterionTypeEnum')"
v-if="form.CriterionTypeEnum && form.CriterionTypeEnum.length > 0"
prop="CriterionTypeEnum"
>
<el-select
disabled
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-form-item :label="$t('trials:emailManageCfg:table:CriterionTypeEnum')"
v-if="form.CriterionTypeList && form.CriterionTypeList.length > 0" prop="CriterionTypeList">
<el-select disabled v-model="form.CriterionTypeList" clearable class="mr" multiple>
<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>
<el-col :span="12" v-if="$i18n.locale === 'zh'">
<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"
:disabled="true"
:limit="1"
:file-list="fileListCN"
>
<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" :disabled="true"
:limit="1" :file-list="fileListCN">
</el-upload>
</el-form-item>
</el-col>
<el-col :span="12" v-else>
<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"
:disabled="true"
:limit="1"
:file-list="fileListEN"
>
<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" :disabled="true"
:limit="1" :file-list="fileListEN">
</el-upload>
</el-form-item>
</el-col>
@ -270,26 +132,14 @@
<!-- :autosize="{ minRows: 8, maxRows: 8}"-->
<!-- />-->
<!-- </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') }}</el-button
>
{{ $t('common:button:save') }}</el-button>
</el-form-item>
</div>
<el-dialog
append-to-body
:title="$t('trials:emailManageCfg:button:generate')"
:visible.sync="showCron"
>
<vcrontab
@hide="showCron = false"
@fill="crontabFill"
:expression="expression"
></vcrontab>
<el-dialog append-to-body :title="$t('trials:emailManageCfg:button:generate')" :visible.sync="showCron">
<vcrontab @hide="showCron = false" @fill="crontabFill" :expression="expression"></vcrontab>
</el-dialog>
</el-form>
</template>
@ -345,6 +195,7 @@ export default {
IsEnable: true,
IsAutoSend: true,
CriterionTypeEnum: null,
CriterionTypeList: [],
FromEmail: '',
FromName: '',
AuthorizationCode: '',

View File

@ -3,63 +3,30 @@
<template slot="search-container">
<el-form :inline="true" size="small">
<!-- 业务场景 -->
<el-form-item
:label="$t('trials:emailManageCfg:title:businessScenario')"
>
<el-select
v-model="searchData.BusinessScenarioEnum"
style="width: 150px"
>
<el-option
v-for="item of $d.Email_BusinessScenario"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-form-item :label="$t('trials:emailManageCfg:title:businessScenario')">
<el-select v-model="searchData.BusinessScenarioEnum" style="width: 150px">
<el-option v-for="item of $d.Email_BusinessScenario" :key="item.value" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item
v-if="isDistinguishCriteria"
style="margin-bottom: 10px"
:label="$t('trials:reviewTrack:table:criterionName')"
>
<el-select
v-model="searchData.TrialReadingCriterionId"
clearable
style="width: 120px"
>
<el-option
v-for="item of trialCriterionList"
:key="'TrialReadingCriterionId' + item.TrialReadingCriterionId"
:value="item.TrialReadingCriterionId"
:label="item.TrialReadingCriterionName"
/>
<el-form-item v-if="isDistinguishCriteria" style="margin-bottom: 10px"
:label="$t('trials:reviewTrack:table:criterionName')">
<el-select v-model="searchData.TrialReadingCriterionId" clearable style="width: 120px">
<el-option v-for="item of trialCriterionList"
:key="'TrialReadingCriterionId' + item.TrialReadingCriterionId" :value="item.TrialReadingCriterionId"
:label="item.TrialReadingCriterionName" />
</el-select>
</el-form-item>
<el-form-item
:label="$t('trials:emailManageCfg:title:toUserTypeList')"
prop="ToUserTypeList"
>
<el-form-item :label="$t('trials:emailManageCfg:title:toUserTypeList')" prop="ToUserTypeList">
<el-select v-model="searchData.ToUserType" clearable class="mr">
<el-option
v-for="item of UserTypeList"
:key="`ToUserTypeList${item.label}`"
:label="item.label"
:value="item.value"
/>
<el-option v-for="item of UserTypeList" :key="`ToUserTypeList${item.label}`" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item
:label="$t('trials:emailManageCfg:table:IsEnable')"
prop="IsEnable"
>
<el-form-item :label="$t('trials:emailManageCfg:table:IsEnable')" prop="IsEnable">
<el-select v-model="searchData.IsEnable" clearable class="mr">
<el-option
v-for="item of $d.YesOrNo"
:key="`ToUserTypeList${item.label}`"
:label="item.label"
:value="item.value"
/>
<el-option v-for="item of $d.YesOrNo" :key="`ToUserTypeList${item.label}`" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item>
@ -68,21 +35,11 @@
{{ $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
v-if="hasPermi(['trials:trials-panel:setting:email-manage:edit'])"
type="primary"
icon="el-icon-plus"
size="small"
:disabled="isEdit"
@click="handleAddDefault"
>
<el-button v-if="hasPermi(['trials:trials-panel:setting:email-manage:edit'])" type="primary"
icon="el-icon-plus" size="small" :disabled="isEdit" @click="handleAddDefault">
{{ $t('trials:emailManageCfg:button:Default') }}
</el-button>
</el-form-item>
@ -90,13 +47,7 @@
<!-- 自定义标准允许添加 -->
</template>
<template slot="main-container">
<el-table
ref="emailList"
v-loading="loading"
:data="list"
stripe
@sort-change="handleSortChange"
>
<el-table ref="emailList" v-loading="loading" :data="list" stripe @sort-change="handleSortChange">
<el-table-column type="index" width="40" />
<!-- Code -->
<!-- <el-table-column
@ -106,63 +57,34 @@
show-overflow-tooltip
width="100"
/> -->
<el-table-column
v-if="isDistinguishCriteria"
prop="TrialReadingCriterionId"
:label="$t('trials:reviewTrack:table:criterionName')"
show-overflow-tooltip
sortable="custom"
width="120"
>
<el-table-column v-if="isDistinguishCriteria" prop="CriterionTypeList"
:label="$t('trials:reviewTrack:table:criterionName')" show-overflow-tooltip sortable="custom" width="120">
<template slot-scope="scope">
{{ scope.row.TrialCriterionName }}
{{scope.row.CriterionTypeList && scope.row.CriterionTypeList.length > 0 ?
scope.row.CriterionTypeList.map(item => { return $fd('CriterionType', item) }
).join(', ') : ''}}
</template>
</el-table-column>
<el-table-column
v-if="$i18n.locale === 'zh'"
prop="EmailTopicCN"
:label="$t('trials:emailManageCfg:table:EmailTopicCN')"
sortable="custom"
show-overflow-tooltip
min-width="140"
/>
<el-table-column
v-else
prop="EmailTopic"
:label="$t('trials:emailManageCfg:table:EmailTopic')"
sortable="custom"
show-overflow-tooltip
min-width="140"
/>
<el-table-column
prop="BusinessModuleEnum"
:label="$t('trials:emailManageCfg:table:BusinessModuleEnum')"
sortable="custom"
show-overflow-tooltip
min-width="100"
>
<el-table-column v-if="$i18n.locale === 'zh'" prop="EmailTopicCN"
:label="$t('trials:emailManageCfg:table:EmailTopicCN')" sortable="custom" show-overflow-tooltip
min-width="140" />
<el-table-column v-else prop="EmailTopic" :label="$t('trials:emailManageCfg:table:EmailTopic')"
sortable="custom" show-overflow-tooltip min-width="140" />
<el-table-column prop="BusinessModuleEnum" :label="$t('trials:emailManageCfg:table:BusinessModuleEnum')"
sortable="custom" show-overflow-tooltip min-width="100">
<template slot-scope="scope">
{{ $fd('BusinessModule', scope.row.BusinessModuleEnum) }}
</template>
</el-table-column>
<el-table-column
prop="BusinessScenarioEnum"
:label="$t('trials:emailManageCfg:table:BusinessScenarioEnum')"
sortable="custom"
show-overflow-tooltip
min-width="100"
>
<el-table-column prop="BusinessScenarioEnum" :label="$t('trials:emailManageCfg:table:BusinessScenarioEnum')"
sortable="custom" show-overflow-tooltip min-width="100">
<template slot-scope="scope">
{{ $fd('Email_BusinessScenario', scope.row.BusinessScenarioEnum) }}
</template>
</el-table-column>
<!-- 收件人 -->
<el-table-column
prop="ToUserTypeList"
:label="$t('trials:emailManageCfg:title:toUserTypeList')"
show-overflow-tooltip
min-width="100"
>
<el-table-column prop="ToUserTypeList" :label="$t('trials:emailManageCfg:title:toUserTypeList')"
show-overflow-tooltip min-width="100">
<template slot-scope="scope">
{{
scope.row.ToUserTypeNameList.length > 0
@ -172,12 +94,8 @@
</template>
</el-table-column>
<!-- 抄送人 -->
<el-table-column
prop="CopyUserTypeList"
:label="$t('trials:emailManageCfg:title:copyUserTypeList')"
show-overflow-tooltip
min-width="100"
>
<el-table-column prop="CopyUserTypeList" :label="$t('trials:emailManageCfg:title:copyUserTypeList')"
show-overflow-tooltip min-width="100">
<template slot-scope="scope">
{{
scope.row.CopyUserTypeNameList.length > 0
@ -204,36 +122,18 @@
<!-- width="160"-->
<!-- />-->
<!-- 附件 -->
<el-table-column
v-if="$i18n.locale === 'zh' && isDistinguishCriteria"
prop="AttachNameCN"
:label="$t('trials:emailManageCfg:title:fileName')"
show-overflow-tooltip
min-width="140"
>
<el-table-column v-if="$i18n.locale === 'zh' && isDistinguishCriteria" prop="AttachNameCN"
:label="$t('trials:emailManageCfg:title:fileName')" show-overflow-tooltip min-width="140">
<template slot-scope="scope">
<span
v-if="scope.row.AttachCNPath"
@click="handlePreview(scope.row.AttachCNPath)"
style="cursor: pointer; color: #428bca"
>{{ scope.row.AttachNameCN }}</span
>
<span v-if="scope.row.AttachCNPath" @click="handlePreview(scope.row.AttachCNPath)"
style="cursor: pointer; color: #428bca">{{ scope.row.AttachNameCN }}</span>
</template>
</el-table-column>
<el-table-column
v-if="$i18n.locale === 'en' && isDistinguishCriteria"
prop="AttachName"
:label="$t('trials:emailManageCfg:title:fileName')"
show-overflow-tooltip
min-width="140"
>
<el-table-column v-if="$i18n.locale === 'en' && isDistinguishCriteria" prop="AttachName"
:label="$t('trials:emailManageCfg:title:fileName')" show-overflow-tooltip min-width="140">
<template slot-scope="scope">
<span
v-if="scope.row.AttachPath"
@click="handlePreview(scope.row.AttachPath)"
style="cursor: pointer; color: #428bca"
>{{ scope.row.AttachName }}</span
>
<span v-if="scope.row.AttachPath" @click="handlePreview(scope.row.AttachPath)"
style="cursor: pointer; color: #428bca">{{ scope.row.AttachName }}</span>
</template>
</el-table-column>
<!-- 是否需要回执 -->
@ -267,13 +167,8 @@
</template>
</el-table-column> -->
<!-- 是否启用 -->
<el-table-column
prop="IsEnable"
:label="$t('trials:emailManageCfg:table:IsEnable')"
show-overflow-tooltip
sortable="custom"
min-width="90"
>
<el-table-column prop="IsEnable" :label="$t('trials:emailManageCfg:table:IsEnable')" show-overflow-tooltip
sortable="custom" min-width="90">
<template slot-scope="scope">
<el-tag v-if="scope.row.IsEnable" type="danger">
{{ $fd('YesOrNo', scope.row.IsEnable) }}
@ -284,84 +179,37 @@
</template>
</el-table-column>
<!-- 更新时间 -->
<el-table-column
prop="UpdateTime"
:label="$t('trials:emailManageCfg:title:updateTime')"
show-overflow-tooltip
sortable="custom"
min-width="100"
/>
<el-table-column prop="UpdateTime" :label="$t('trials:emailManageCfg:title:updateTime')" show-overflow-tooltip
sortable="custom" min-width="100" />
<!-- 创建时间 -->
<el-table-column
prop="CreateTime"
:label="$t('trials:emailManageCfg:title:createTime')"
show-overflow-tooltip
sortable="custom"
min-width="100"
/>
<el-table-column prop="CreateTime" :label="$t('trials:emailManageCfg:title:createTime')" show-overflow-tooltip
sortable="custom" min-width="100" />
<el-table-column
v-if="hasPermi(['trials:trials-panel:setting:email-manage:edit'])"
width="120"
:label="$t('common:action:action')"
fixed="right"
>
<el-table-column v-if="hasPermi(['trials:trials-panel:setting:email-manage:edit'])" width="120"
:label="$t('common:action:action')" fixed="right">
<template slot-scope="scope">
<!-- 编辑 -->
<el-button
icon="el-icon-edit-outline"
circle
:disabled="isEdit"
:title="$t('common:button:edit')"
@click="handleEdit(scope.row)"
/>
<el-button icon="el-icon-edit-outline" circle :disabled="isEdit" :title="$t('common:button:edit')"
@click="handleEdit(scope.row)" />
<!-- 编辑 -->
<el-button
icon="el-icon-delete"
circle
:disabled="isEdit"
:title="$t('common:button:delete')"
@click="deleteTrialEmailNoticeConfig(scope.row)"
/>
<el-button icon="el-icon-delete" circle :disabled="isEdit" :title="$t('common:button:delete')"
@click="deleteTrialEmailNoticeConfig(scope.row)" />
</template>
</el-table-column>
</el-table>
<!-- 新增/编辑 -->
<el-dialog
v-if="editDialog.visible"
:visible.sync="editDialog.visible"
:close-on-click-modal="false"
:title="editDialog.title"
fullscreen
custom-class="base-dialog-wrapper"
>
<EmailForm
:data="currentRow"
:criterion-type="criterionType"
:is-distinguish-criteria="isDistinguishCriteria"
:UserTypeList="UserTypeList"
@closeDialog="closeDialog"
@getList="getList"
/>
<el-dialog v-if="editDialog.visible" :visible.sync="editDialog.visible" :close-on-click-modal="false"
:title="editDialog.title" fullscreen custom-class="base-dialog-wrapper">
<EmailForm :data="currentRow" :criterion-type="criterionType" :is-distinguish-criteria="isDistinguishCriteria"
:UserTypeList="UserTypeList" @closeDialog="closeDialog" @getList="getList" />
</el-dialog>
<!-- 新增默认问题 -->
<el-dialog
v-if="addVisible"
:visible.sync="addVisible"
width="1300px"
:close-on-click-modal="false"
custom-class="base-dialog-wrapper"
:title="$t('trials:emailManageCfg:button:Default')"
>
<el-dialog v-if="addVisible" :visible.sync="addVisible" width="1300px" :close-on-click-modal="false"
custom-class="base-dialog-wrapper" :title="$t('trials:emailManageCfg:button:Default')">
<div class="base-dialog-body">
<DefaultQS
@getList="getList"
:is-distinguish-criteria="isDistinguishCriteria"
:isShow="isBtnShow"
:UserTypeList="UserTypeList"
@close="addVisible = false"
/>
<DefaultQS @getList="getList" :is-distinguish-criteria="isDistinguishCriteria" :isShow="isBtnShow"
:UserTypeList="UserTypeList" @close="addVisible = false" />
</div>
</el-dialog>
</template>

View File

@ -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>

View File

@ -738,7 +738,7 @@ export default {
},
handleIsDeletedChanged(val) {
if (val) {
this.statusForm.joinTime = ''
// this.statusForm.joinTime = ''
} else {
this.statusForm.removeTime = ''
}

View File

@ -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 => {

View File

@ -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) => {

View File

@ -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() {

View File

@ -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)

View File

@ -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)
}

View File

@ -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')

View File

@ -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
}
},

View File

@ -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;
},

View File

@ -11,189 +11,88 @@
</el-form-item>
</el-form>
<div>
<el-button
:disabled="list.length === 0"
size="mini"
type="primary"
@click="handlePreview"
>
<el-button :disabled="list.length === 0" size="mini" type="primary" @click="handlePreview">
{{ $t('common:button:preview') }}
</el-button>
<el-button
v-if="!data.IsFromSystemData && !data.IsCompleteConfig"
size="mini"
type="primary"
@click="handleAdd"
>
<el-button v-if="!data.IsFromSystemData && !data.IsCompleteConfig" size="mini" type="primary"
@click="handleAdd">
{{ $t('common:button:add') }}
</el-button>
<el-button
v-if="!data.IsFromSystemData && !data.IsCompleteConfig"
size="mini"
type="primary"
@click="handleApply"
>
<el-button v-if="!data.IsFromSystemData && !data.IsCompleteConfig" size="mini" type="primary"
@click="handleApply">
{{ $t('trials:readingUnit:qsList:button:apply') }}
</el-button>
</div>
</div>
<el-table
ref="criterionQSList"
v-loading="loading"
v-adaptive="{bottomOffset:80}"
height="100"
:data="list"
stripe
@sort-change="handleSortByColumn"
>
<el-table-column
prop="ShowOrder"
label=""
width="50"
/>
<el-table-column
prop="QuestionName"
:label="$t('trials:readingUnit:qsList:title:qName')"
show-overflow-tooltip
/>
<el-table-column
prop="QuestionEnName"
:label="$t('trials:readingUnit:qsList:title:qNameEn')"
show-overflow-tooltip
/>
<el-table-column
prop="Type"
:label="$t('trials:readingUnit:qsList:title:type')"
show-overflow-tooltip
>
<el-table ref="criterionQSList" v-loading="loading" v-adaptive="{ bottomOffset: 80 }" height="100" :data="list"
stripe @sort-change="handleSortByColumn">
<el-table-column prop="ShowOrder" label="" width="50" />
<el-table-column prop="QuestionName" :label="$t('trials:readingUnit:qsList:title:qName')" show-overflow-tooltip />
<el-table-column prop="QuestionEnName" :label="$t('trials:readingUnit:qsList:title:qNameEn')"
show-overflow-tooltip />
<el-table-column prop="Type" :label="$t('trials:readingUnit:qsList:title:type')" show-overflow-tooltip>
<template slot-scope="scope">
{{ $fd('ClinicalQuestionType', scope.row.ClinicalQuestionType) }}
</template>
</el-table-column>
<el-table-column
prop="TypeValue"
:label="$t('trials:readingUnit:qsList:title:type')"
show-overflow-tooltip
>
<el-table-column prop="TypeValue" :label="$t('trials:readingUnit:qsList:title:type')" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="ClinicalQuestionShowEnum"
:label="$t('trials:readingUnit:qsList:title:isShow')"
show-overflow-tooltip
>
<el-table-column prop="GroupName" :label="$t('trials:readingUnit:qsList:title:groupName')" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="ClinicalQuestionShowEnum" :label="$t('trials:readingUnit:qsList:title:isShow')"
show-overflow-tooltip>
<template slot-scope="scope">
{{ $fd('ShowQuestion', scope.row.ClinicalQuestionShowEnum) }}
</template>
</el-table-column>
<el-table-column
prop="IsRequired"
:label="$t('trials:qcCfg:table:isRequired')"
show-overflow-tooltip
>
<el-table-column prop="IsRequired" :label="$t('trials:qcCfg:table:isRequired')" show-overflow-tooltip>
<template slot-scope="scope">
{{ $fd('YesOrNo', scope.row.IsRequired) }}
</template>
</el-table-column>
<el-table-column
prop=""
:label="$t('common:action:action')"
min-width="250"
show-overflow-tooltip
fixed="right"
>
<el-table-column prop="" :label="$t('common:action:action')" min-width="250" show-overflow-tooltip fixed="right">
<template slot-scope="scope">
<el-button
v-if="!data.IsFromSystemData && !data.IsCompleteConfig"
type="primary"
size="mini"
@click="handleEdit(scope.row)"
>
<el-button v-if="!data.IsFromSystemData && !data.IsCompleteConfig" type="primary" size="mini"
@click="handleEdit(scope.row)">
{{ $t('trials:readingUnit:qsList:title:edit') }}
</el-button>
<el-button
v-else
type="primary"
size="mini"
@click="handleLook(scope.row)"
>
<el-button v-else type="primary" size="mini" @click="handleLook(scope.row)">
{{ $t('trials:enrolledReviews:button:view') }}
</el-button>
<el-button
type="primary"
size="mini"
:disabled="scope.row.ClinicalQuestionType !== 'table'"
@click="handleConfig(scope.row)"
>
<el-button type="primary" size="mini" :disabled="scope.row.ClinicalQuestionType !== 'table'"
@click="handleConfig(scope.row)">
{{ $t('trials:readingUnit:qsList:title:tableQs') }}
</el-button>
<el-button
v-if="!data.IsFromSystemData && !data.IsCompleteConfig"
type="danger"
size="mini"
:disabled="scope.row.IsEnable"
@click="handleDelete(scope.row)"
>
<el-button v-if="!data.IsFromSystemData && !data.IsCompleteConfig" type="danger" size="mini"
:disabled="scope.row.IsEnable" @click="handleDelete(scope.row)">
{{ $t('common:button:delete') }}
</el-button>
</template>
</el-table-column>
</el-table>
<pagination style="text-align: right;margin-top: 10px;" class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
<el-dialog
v-if="addOrEdit.visible"
:visible.sync="addOrEdit.visible"
:close-on-click-modal="false"
:title="addOrEdit.title"
width="600px"
append-to-body
custom-class="base-dialog-wrapper"
>
<ClinicalQuestionForm
ref="addOrEdit"
:clinical-id="clinicalId"
:list="list"
:clinical-info="data"
:data="rowData"
:type="type"
@close="addOrEdit.visible = false"
@getList="getList"
/>
<pagination style="text-align: right;margin-top: 10px;" class="page" :total="total"
:page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
<el-dialog v-if="addOrEdit.visible" :visible.sync="addOrEdit.visible" :close-on-click-modal="false"
:title="addOrEdit.title" width="600px" append-to-body custom-class="base-dialog-wrapper">
<ClinicalQuestionForm ref="addOrEdit" :clinical-id="clinicalId" :list="list" :clinical-info="data" :data="rowData"
:type="type" @close="addOrEdit.visible = false" @getList="getList" />
</el-dialog>
<!-- 预览 -->
<el-dialog
v-if="preview.visible"
v-dialogDrag
:visible.sync="preview.visible"
:close-on-click-modal="false"
:title="preview.title"
fullscreen
append-to-body
>
<el-dialog v-if="preview.visible" v-dialogDrag :visible.sync="preview.visible" :close-on-click-modal="false"
:title="preview.title" fullscreen append-to-body>
<div>
</div>
</el-dialog>
<el-dialog
v-if="config.visible"
:visible.sync="config.visible"
:close-on-click-modal="false"
:title="config.title"
width="90%"
append-to-body
>
<ClinicalQuestionTableQsList
:clinical-id="clinicalId"
:clinical-info="data"
:data="rowData"
:is-from-system-data="data.IsFromSystemData"
:reading-question-id="rowData.Id"
:is-complete-config="data.IsCompleteConfig"
:lesion-type="rowData.LesionType"
/>
<el-dialog v-if="config.visible" :visible.sync="config.visible" :close-on-click-modal="false" :title="config.title"
width="90%" append-to-body>
<ClinicalQuestionTableQsList :clinical-id="clinicalId" :clinical-info="data" :data="rowData"
:is-from-system-data="data.IsFromSystemData" :reading-question-id="rowData.Id"
:is-complete-config="data.IsCompleteConfig" :lesion-type="rowData.LesionType" />
</el-dialog>
</div>
</template>
@ -331,6 +230,4 @@ export default {
}
}
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@ -1,338 +1,196 @@
<template>
<el-form
ref="clinicalDataForm"
v-loading="loading"
:model="form"
size="small"
:rules="rules"
:disabled="type === 'look'"
label-width="130px"
>
<el-form ref="clinicalDataForm" v-loading="loading" :model="form" size="small" :rules="rules"
:disabled="type === 'look'" label-width="130px">
<div class="base-dialog-body">
<el-form-item :label="$t('trials:readingUnit:qsList:title:type')" prop="ClinicalQuestionType">
<el-select v-model="form.ClinicalQuestionType" clearable @change="((val) => { typeChange(val, form) })">
<el-option
v-for="item of $d.ClinicalQuestionType"
:key="item.value"
:value="item.value"
:label="item.label"
/>
<el-option v-for="item of $d.ClinicalQuestionType" :key="item.value" :value="item.value"
:label="item.label" />
</el-select>
</el-form-item>
<el-form-item
:label="$t('trials:readingUnit:qsList:title:qName')"
prop="QuestionName"
>
<el-form-item :label="$t('trials:readingUnit:qsList:title:qName')" prop="QuestionName">
<el-input v-model="form.QuestionName" />
</el-form-item>
<el-form-item
:label="$t('trials:readingUnit:qsList:title:qNameEn')"
prop="QuestionEnName"
>
<el-form-item :label="$t('trials:readingUnit:qsList:title:qNameEn')" prop="QuestionEnName">
<el-input v-model="form.QuestionEnName" />
</el-form-item>
<el-form-item
v-if="form.ClinicalQuestionType === 'select' || form.ClinicalQuestionType === 'radio' || form.ClinicalQuestionType === 'checkbox'"
:label="$t('trials:qcCfg:table:typeValue')"
prop="TypeValue"
>
<el-input
v-model="form.TypeValue"
:placeholder="$t('trials:qcCfg:message:typeValue')"
/>
:label="$t('trials:qcCfg:table:typeValue')" prop="TypeValue">
<el-input v-model="form.TypeValue" :placeholder="$t('trials:qcCfg:message:typeValue')" />
</el-form-item>
<el-form-item
v-if="form.ClinicalQuestionType === 'number'"
:label="$t('trials:processCfg:form:digitPlaces')"
prop="DigitPlaces"
>
<el-radio-group
v-model="form.DigitPlaces"
style="line-height: 40px;"
>
<el-radio
v-for="item of $d.DigitPlaces"
:key="`DigitPlaces${item.value}`"
:label="item.value"
>
<el-form-item v-if="form.ClinicalQuestionType === 'number'" :label="$t('trials:processCfg:form:digitPlaces')"
prop="DigitPlaces">
<el-radio-group v-model="form.DigitPlaces" style="line-height: 40px;">
<el-radio v-for="item of $d.DigitPlaces" :key="`DigitPlaces${item.value}`" :label="item.value">
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="form.ClinicalQuestionType === 'number'"
:label="$t('trials:readingUnit:qsList:title:unit')"
prop="Unit"
>
<el-input
v-model="form.Unit"
/>
<el-form-item v-if="form.ClinicalQuestionType === 'number'" :label="$t('trials:readingUnit:qsList:title:unit')"
prop="Unit">
<el-input v-model="form.Unit" />
</el-form-item>
<div v-if="form.ClinicalQuestionType === 'number'" style="background: #f8f8f8;padding: 10px 0px;border-radius: 10px;position: relative;margin-bottom: 10px;">
<div v-if="form.ClinicalQuestionType === 'number'"
style="background: #f8f8f8;padding: 10px 0px;border-radius: 10px;position: relative;margin-bottom: 10px;">
<!-- 运算类型 -->
<el-form-item
:label="$t('trials:readingUnit:qsList:title:customCalculateMark')"
prop="CustomCalculateMark"
>
<el-radio-group
v-model="form.CustomCalculateMark"
style="line-height: 40px;"
@change="(v) => CustomCalculateMarkChange(v)"
>
<el-form-item :label="$t('trials:readingUnit:qsList:title:customCalculateMark')" prop="CustomCalculateMark">
<el-radio-group v-model="form.CustomCalculateMark" style="line-height: 40px;"
@change="(v) => CustomCalculateMarkChange(v)">
<div>
<el-radio
v-for="item of $d.ClinicalCustomCalculateMark"
v-show="item.value <= 4"
:key="`CustomCalculateMark${item.value}`"
:label="item.value"
>
<el-radio v-for="item of $d.ClinicalCustomCalculateMark" v-show="item.value <= 4"
:key="`CustomCalculateMark${item.value}`" :label="item.value">
{{ item.label }}
</el-radio>
</div>
<div>
<el-radio
v-for="item of $d.ClinicalCustomCalculateMark"
v-show="item.value > 4"
:key="`CustomCalculateMark${item.value}`"
:label="item.value"
>
<el-radio v-for="item of $d.ClinicalCustomCalculateMark" v-show="item.value > 4"
:key="`CustomCalculateMark${item.value}`" :label="item.value">
{{ item.label }}
</el-radio>
</div>
</el-radio-group>
</el-form-item>
<el-table
v-if="isShow"
ref="CalculateTable"
:data="form.CalculateQuestions"
style="margin: 10px;width: calc(100% - 20px)"
size="small"
>
<el-table v-if="isShow" ref="CalculateTable" :data="form.CalculateQuestions"
style="margin: 10px;width: calc(100% - 20px)" size="small">
<!-- 序号 -->
<el-table-column
:label="$t('trials:readingUnit:qsList:title:order')"
min-width="70"
>
<el-table-column :label="$t('trials:readingUnit:qsList:title:order')" min-width="70">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<!-- 运算类型 -->
<el-table-column
:label="$t('trials:readingUnit:qsList:title:customCalculateMark')"
show-overflow-tooltip
min-width="70"
>
<template slot-scope="scope">
<el-table-column :label="$t('trials:readingUnit:qsList:title:customCalculateMark')" show-overflow-tooltip
min-width="70">
<template>
{{ $fd('ClinicalCustomCalculateMark', form.CustomCalculateMark) }}
</template>
</el-table-column>
<!-- 问题名称 -->
<el-table-column
:label="form.CustomCalculateMark >= 10 ? $t('trials:readingUnit:qsList:title:birthday') : $t('trials:readingUnit:qsList:title:qsName')"
prop="TableQuestionId"
show-overflow-tooltip
min-width="180"
>
prop="TableQuestionId" show-overflow-tooltip min-width="180">
<template slot-scope="scope">
<el-select v-model="scope.row.TableQuestionId" clearable>
<el-option v-for="item of Questions" :key="item.QuestionId" :disabled="item.QuestionId === scope.row.QuestionId" :label="item.QuestionName" :value="item.QuestionId" />
<el-option v-for="item of Questions" :key="item.QuestionId"
:disabled="item.QuestionId === scope.row.QuestionId" :label="item.QuestionName"
:value="item.QuestionId" />
</el-select>
</template>
</el-table-column>
<el-table-column
v-if="form.CustomCalculateMark === 11"
:label="$t('trials:rpManage:table:expirationDate')"
prop="TableQuestionId"
show-overflow-tooltip
min-width="180"
>
<el-table-column v-if="form.CustomCalculateMark === 11" :label="$t('trials:rpManage:table:expirationDate')"
prop="TableQuestionId" show-overflow-tooltip min-width="180">
<template slot-scope="scope">
<el-select v-model="scope.row.QuestionId" clearable>
<el-option v-for="item of Questions" :key="item.QuestionId" :disabled="item.QuestionId === scope.row.TableQuestionId" :label="item.QuestionName" :value="item.QuestionId" />
<el-option v-for="item of Questions" :key="item.QuestionId"
:disabled="item.QuestionId === scope.row.TableQuestionId" :label="item.QuestionName"
:value="item.QuestionId" />
</el-select>
</template>
</el-table-column>
<el-table-column
v-if="form.CustomCalculateMark <= 4"
:label="$t('common:action:action')"
prop="TableQuestionId"
show-overflow-tooltip
>
<el-table-column v-if="form.CustomCalculateMark <= 4" :label="$t('common:action:action')"
prop="TableQuestionId" show-overflow-tooltip>
<template slot-scope="scope">
<!-- 添加 -->
<el-button
icon="el-icon-plus"
size="mini"
circle
:title="$t('trials:readingUnit:qsList:title:add')"
@click="addCustomCalculateMark(scope.$index)"
/>
<el-button icon="el-icon-plus" size="mini" circle :title="$t('trials:readingUnit:qsList:title:add')"
@click="addCustomCalculateMark(scope.$index)" />
<!-- 删除 -->
<el-button
icon="el-icon-minus"
size="mini"
circle
:disabled="form.CalculateQuestions.length <= 2"
<el-button icon="el-icon-minus" size="mini" circle :disabled="form.CalculateQuestions.length <= 2"
:title="$t('trials:readingUnit:qsList:title:delete')"
@click="deleteCustomCalculateMark(scope.$index)"
/>
@click="deleteCustomCalculateMark(scope.$index)" />
</template>
</el-table-column>
</el-table>
</div>
<el-form-item v-if="form.ClinicalQuestionType !== 'group' && form.ClinicalQuestionType !== 'summary'" :label="$t('trials:readingUnit:qsList:title:isShow')" prop="ClinicalQuestionShowEnum">
<el-radio-group
v-model="form.ClinicalQuestionShowEnum"
@change="((val)=>{isShowQuestionChange(val, form)})"
>
<el-radio
v-for="item of $d.ClinicalQuestionShow"
:key="`ClinicalQuestionShowEnum${item.value}`"
:label="item.value"
>
<el-form-item v-if="form.ClinicalQuestionType !== 'group' && form.ClinicalQuestionType !== 'summary'"
:label="$t('trials:readingUnit:qsList:title:isShow')" prop="ClinicalQuestionShowEnum">
<el-radio-group v-model="form.ClinicalQuestionShowEnum"
@change="((val) => { isShowQuestionChange(val, form) })">
<el-radio v-for="item of $d.ClinicalQuestionShow" :key="`ClinicalQuestionShowEnum${item.value}`"
:label="item.value">
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="form.ClinicalQuestionType !== 'group' && form.ClinicalQuestionType !== 'summary' && form.ClinicalQuestionShowEnum === 1"
:label="$t('trials:readingUnit:qsList:title:parentId')"
prop="ParentId"
>
<el-select
v-model="form.ParentId"
clearable
@change="((val)=>{parentQuestionChange(val, form)})"
>
<el-option
v-for="item of parentOptions"
:key="`ParentId${item.QuestionId}`"
:label="item.QuestionName"
:value="item.Id"
/>
:label="$t('trials:readingUnit:qsList:title:parentId')" prop="ParentId">
<el-select v-model="form.ParentId" clearable @change="((val) => { parentQuestionChange(val, form) })">
<el-option v-for="item of parentOptions" :key="`ParentId${item.QuestionId}`" :label="item.QuestionName"
:value="item.Id" />
</el-select>
</el-form-item>
<!-- 显示时依赖父问题触发值 -->
<el-form-item v-if="form.ParentId && form.ClinicalQuestionShowEnum===1" :label="$t('trials:qcCfg:table:parentTriggerValue')" prop="ParentTriggerValue">
<el-form-item v-if="form.ParentId && form.ClinicalQuestionShowEnum === 1"
:label="$t('trials:qcCfg:table:parentTriggerValue')" prop="ParentTriggerValue">
<el-select v-model="form.ParentTriggerValue" clearable>
<el-option
v-for="item of parentTriggerValOptions"
:key="item.id"
:label="item.label"
:value="item.value.toString()"
/>
<el-option v-for="item of parentTriggerValOptions" :key="item.id" :label="item.label"
:value="item.value.toString()" />
</el-select>
</el-form-item>
<el-form-item v-if="form.ClinicalQuestionType !== 'group' && form.ClinicalQuestionType !== 'summary' && form.ClinicalQuestionType !== 'table'" :label="$t('trials:readingUnit:qsList:title:isRequired')" prop="IsRequired">
<el-radio-group
v-model="form.IsRequired"
:disabled="form.IsJudgeQuestion===true || form.ShowQuestion===2"
@change="((val)=>{isRequiredChange(val, form)})"
>
<el-radio
v-for="item of $d.QuestionRequired"
:key="`QuestionRequired${item.value}`"
:label="item.value"
>
<el-form-item
v-if="form.ClinicalQuestionType !== 'group' && form.ClinicalQuestionType !== 'summary' && form.ClinicalQuestionType !== 'table'"
:label="$t('trials:readingUnit:qsList:title:isRequired')" prop="IsRequired">
<el-radio-group v-model="form.IsRequired" :disabled="form.IsJudgeQuestion === true || form.ShowQuestion === 2"
@change="((val) => { isRequiredChange(val, form) })">
<el-radio v-for="item of $d.QuestionRequired" :key="`QuestionRequired${item.value}`" :label="item.value">
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="form.ClinicalQuestionType !== 'group' && form.ClinicalQuestionType !== 'summary' && form.IsRequired === 1"
:label="$t('trials:readingUnit:qsList:title:relevanceId')"
prop="RelevanceId"
>
<el-select
v-model="form.RelevanceId"
clearable
@change="((val)=>{relevanceQuestionChange(val, form)})"
>
<el-option
v-for="item of parentOptions"
:key="`RelevanceId${item.QuestionId}`"
:label="item.QuestionName"
:value="item.Id"
/>
:label="$t('trials:readingUnit:qsList:title:relevanceId')" prop="RelevanceId">
<el-select v-model="form.RelevanceId" clearable @change="((val) => { relevanceQuestionChange(val, form) })">
<el-option v-for="item of parentOptions" :key="`RelevanceId${item.QuestionId}`" :label="item.QuestionName"
:value="item.Id" />
</el-select>
</el-form-item>
<!-- 必填触发值 -->
<el-form-item
v-if="form.RelevanceId && form.IsRequired === 1"
:label="$t('trials:readingUnit:qsList:title:relevanceValueList')"
prop="RelevanceValue"
>
<el-form-item v-if="form.RelevanceId && form.IsRequired === 1"
:label="$t('trials:readingUnit:qsList:title:relevanceValueList')" prop="RelevanceValue">
<el-select v-model="form.RelevanceValue" clearable>
<el-option
v-for="item of reParentTriggerValOptions"
:key="item.id"
:label="item.label"
:value="item.value"
/>
<el-option v-for="item of reParentTriggerValOptions" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item v-if="form.ClinicalQuestionType !== 'group'" prop="GroupId" :label="$t('trials:readingUnit:qsList:title:groupNameEn')">
<el-form-item v-if="form.ClinicalQuestionType !== 'group'" prop="GroupId"
:label="$t('trials:readingUnit:qsList:title:groupNameEn')">
<el-select v-model="form.GroupId" clearable :disabled="isParentExistGroup">
<el-option
v-for="group of groupOptions"
:key="group.Id"
:label="language === 'zh' ? group.QuestionName : group.QuestionEnName"
:value="group.Id"
/>
<el-option v-for="group of groupOptions" :key="group.Id"
:label="language === 'zh' ? group.QuestionName : group.QuestionEnName" :value="group.Id" />
</el-select>
</el-form-item>
<el-form-item v-if="form.ClinicalQuestionType === 'time' && [2, 3].includes(clinicalInfo.ClinicalDataLevel)" :label="$t('trials:readingUnit:qsList:title:IsStudyDate')" prop="IsCheckDate">
<el-radio-group
v-model="form.IsCheckDate"
>
<el-radio
v-for="item of $d.YesOrNo"
:key="`IsCheckDate${item.value}`"
:label="item.value"
>
<el-form-item v-if="form.ClinicalQuestionType === 'time' && [2, 3].includes(clinicalInfo.ClinicalDataLevel)"
:label="$t('trials:readingUnit:qsList:title:IsStudyDate')" prop="IsCheckDate">
<el-radio-group v-model="form.IsCheckDate">
<el-radio v-for="item of $d.YesOrNo" :key="`IsCheckDate${item.value}`" :label="item.value">
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.ClinicalQuestionType !== 'table' && form.ClinicalQuestionType !== 'group' && form.ClinicalQuestionType !== 'summary' && form.ClinicalQuestionType !== 'number' && form.ClinicalQuestionType !== 'select'" :label="$t('trials:readingUnit:qsList:title:MaxAnswerLength')">
<el-input-number
v-model="form.MaxAnswerLength"
controls-position="right"
:min="0"
:max="2000"
/>
<el-form-item
v-if="form.ClinicalQuestionType !== 'table' && form.ClinicalQuestionType !== 'group' && form.ClinicalQuestionType !== 'summary' && form.ClinicalQuestionType !== 'number' && form.ClinicalQuestionType !== 'select'"
:label="$t('trials:readingUnit:qsList:title:MaxAnswerLength')">
<el-input-number v-model="form.MaxAnswerLength" controls-position="right" :min="0" :max="2000" />
</el-form-item>
<el-form-item v-if="form.ClinicalQuestionType === 'table'" :label="$t('trials:readingUnit:qsList:title:maxQuestionCount')">
<el-input-number
v-model="form.MaxQuestionCount"
controls-position="right"
:min="0"
:max="10"
/>
<el-form-item v-if="form.ClinicalQuestionType === 'table'"
:label="$t('trials:readingUnit:qsList:title:maxQuestionCount')">
<el-input-number v-model="form.MaxQuestionCount" controls-position="right" :min="0" :max="10" />
</el-form-item>
<el-form-item v-if="form.ClinicalQuestionType === 'upload'" :label="$t('trials:readingUnit:qsList:title:imageCount')">
<el-form-item v-if="form.ClinicalQuestionType === 'upload'"
:label="$t('trials:readingUnit:qsList:title:imageCount')">
<el-input-number v-model="form.ImageCount" controls-position="right" :min="1" :max="10" />
</el-form-item>
<el-form-item :label="$t('trials:readingUnit:qsList:title:order')" prop="ShowOrder">
<el-input-number
v-model="form.ShowOrder"
controls-position="right"
:min="0"
/>
<el-input-number v-model="form.ShowOrder" controls-position="right" :min="0" />
</el-form-item>
</div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<el-form-item>
<!-- 取消 -->
<el-button
:disabled="btnLoading"
size="small"
type="primary"
@click="close"
>
<el-button :disabled="btnLoading" size="small" type="primary" @click="close">
{{ $t('common:button:cancel') }}
</el-button>
<!-- 保存 -->
@ -463,13 +321,24 @@ export default {
},
mounted() {
this.initForm()
this.getClinicalCalculateQuestions()
},
watch: {
data: {
handler() {
if (this.data.ClinicalQuestionType) {
this.getClinicalCalculateQuestions(this.data.ClinicalQuestionType)
}
},
deep: true,
immediate: true
}
},
methods: {
getClinicalCalculateQuestions() {
getClinicalCalculateQuestions(type = null) {
getClinicalCalculateQuestions({
TrialClinicalId: this.clinicalId,
ClinicalQuestionType: 'time'
ClinicalQuestionType: type || 'time'
}).then(res => {
this.Questions = res.Result
})
@ -663,6 +532,7 @@ export default {
} else {
data.LesionType = null
}
this.getClinicalCalculateQuestions(val)
data.TypeValue = ''
data.ValueType = ''
data.Unit = ''
@ -718,5 +588,4 @@ export default {
}
}
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@ -0,0 +1,366 @@
<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'
import { getTrialVisitImageStatList_Export } from '@/api/export'
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)
}
},
//
async handleExport() {
this.loading = true
try {
await getTrialVisitImageStatList_Export(this.searchData)
this.loading = false
} catch (e) {
this.loading = false
}
},
//
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>

View File

@ -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,130 +119,49 @@
</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>
@ -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')
@ -823,8 +650,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
}`
},
},
@ -836,21 +662,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;
}

View File

@ -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>

View File

@ -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>

View File

@ -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)
@ -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;
}

View File

@ -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>

View File

@ -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,368 +32,152 @@
<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>
@ -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')
@ -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;
}

View File

@ -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

View File

@ -276,7 +276,7 @@
<template slot-scope="scope">
<el-progress color="#409eff" :percentage="(
(scope.row.dicomInfo.uploadFileSize * 100) /
scope.row.dicomInfo.fileSize
(scope.row.dicomInfo.fileSize ? scope.row.dicomInfo.fileSize : 1)
).toFixed(2) * 1
" />
<span>
@ -851,6 +851,7 @@ export default {
var studyUid = data.string('x0020000d')
if (!studyUid) return resolve()
var pixelDataElement = data.elements.x7fe00010
if (!pixelDataElement && modality !== 'SR') return resolve()
var studyIndex = 0
while (
studyIndex < scope.uploadQueues.length &&
@ -952,19 +953,19 @@ export default {
) {
++instanceIndex
}
if (instanceIndex >= fileList.length) {
fileList.push({
instanceUid: instanceUid,
file: file,
})
}
scope.uploadQueues[studyIndex].dicomInfo.fileCount = fileList.length
scope.uploadQueues[studyIndex].dicomInfo.fileSize = fileList.reduce(
(prev, next) => {
return prev + next.file.size
},
0
)
// if (instanceIndex >= fileList.length) {
// fileList.push({
// instanceUid: instanceUid,
// file: file,
// })
// }
// scope.uploadQueues[studyIndex].dicomInfo.fileCount = fileList.length
// scope.uploadQueues[studyIndex].dicomInfo.fileSize = fileList.reduce(
// (prev, next) => {
// return prev + next.file.size
// },
// 0
// )
var seriesUid = data.string('x0020000e')
var seriesList = scope.uploadQueues[studyIndex].seriesList
@ -1065,6 +1066,19 @@ export default {
}
instanceList.push(instanceItem)
}
if (instanceIndex >= fileList.length) {
fileList.push({
instanceUid: instanceUid,
file: file,
})
}
scope.uploadQueues[studyIndex].dicomInfo.fileCount = fileList.length
scope.uploadQueues[studyIndex].dicomInfo.fileSize = fileList.reduce(
(prev, next) => {
return prev + next.file.size
},
0
)
resolve()
} catch (error) {
console.log(error)