Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
2516be481d
|
@ -1092,4 +1092,66 @@ export function deleteSysFileType(id) {
|
||||||
url: `/SysFileType/deleteSysFileType/${id}`,
|
url: `/SysFileType/deleteSysFileType/${id}`,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
// 项目文档-获取项目菜单
|
||||||
|
export function getTrialFileTypeData(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialFileType/getTrialFileTypeData`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 项目文档-修改项目菜单启用
|
||||||
|
export function setAuthorizedView(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialFileType/setAuthorizedView`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 项目文档-新增/修改项目菜单
|
||||||
|
export function addOrUpdateTrialFileType(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialFileType/addOrUpdateTrialFileType`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 项目文档-删除项目菜单
|
||||||
|
export function deleteTrialFileType(id) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialFileType/deleteTrialFileType/${id}`,
|
||||||
|
method: 'delete',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 项目文档-报告/文档列表
|
||||||
|
export function getTrialFinalRecordList(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialFinalRecord/getTrialFinalRecordList`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 项目文档-报告/文档授权
|
||||||
|
export function authorizedTrialFinalRecord(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialFinalRecord/authorizedTrialFinalRecord`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 项目文档-报告/文档新增/修改
|
||||||
|
export function addOrUpdateTrialFinalRecord(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialFinalRecord/addOrUpdateTrialFinalRecord`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 项目文档-删除报告/文档
|
||||||
|
export function deleteTrialFinalRecord(id) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialFinalRecord/deleteTrialFinalRecord/${id}`,
|
||||||
|
method: 'delete',
|
||||||
|
})
|
||||||
}
|
}
|
|
@ -461,8 +461,8 @@ async function VueInit() {
|
||||||
var my_username = zzSessionStorage.getItem('my_username')
|
var my_username = zzSessionStorage.getItem('my_username')
|
||||||
var my_password = zzSessionStorage.getItem('my_password')
|
var my_password = zzSessionStorage.getItem('my_password')
|
||||||
let my_userid = zzSessionStorage.getItem('userId')
|
let my_userid = zzSessionStorage.getItem('userId')
|
||||||
let my_EMail = zzSessionStorage.getItem('my_EMail')
|
let my_EMail = zzSessionStorage.getItem('my_EMail') || ''
|
||||||
if (md5(_vm.unlock.my_password) === my_password && my_username === _vm.unlock.my_username) {
|
if (md5(_vm.unlock.my_password) === my_password && (my_username === _vm.unlock.my_username || my_EMail.toUpperCase() === vm.unlock.my_username.toUpperCase())) {
|
||||||
resetReadingRestTime().then(() => {
|
resetReadingRestTime().then(() => {
|
||||||
})
|
})
|
||||||
const closeLock = (_vm) => {
|
const closeLock = (_vm) => {
|
||||||
|
|
|
@ -34,7 +34,7 @@ export function parseTime(time, cFormat) {
|
||||||
const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
|
const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
|
||||||
const value = formatObj[key]
|
const value = formatObj[key]
|
||||||
// Note: getDay() returns 0 on Sunday
|
// Note: getDay() returns 0 on Sunday
|
||||||
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] }
|
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
|
||||||
return value.toString().padStart(2, '0')
|
return value.toString().padStart(2, '0')
|
||||||
})
|
})
|
||||||
return time_str
|
return time_str
|
||||||
|
@ -51,12 +51,44 @@ export function param2Obj(url) {
|
||||||
}
|
}
|
||||||
return JSON.parse(
|
return JSON.parse(
|
||||||
'{"' +
|
'{"' +
|
||||||
decodeURIComponent(search)
|
decodeURIComponent(search)
|
||||||
.replace(/"/g, '\\"')
|
.replace(/"/g, '\\"')
|
||||||
.replace(/&/g, '","')
|
.replace(/&/g, '","')
|
||||||
.replace(/=/g, '":"')
|
.replace(/=/g, '":"')
|
||||||
.replace(/\+/g, ' ') +
|
.replace(/\+/g, ' ') +
|
||||||
'"}'
|
'"}'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function deepClone(source, map = new WeakMap()) {
|
||||||
|
// 处理基本类型和函数(直接返回)
|
||||||
|
if (typeof source !== 'object' || source === null) {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理循环引用
|
||||||
|
if (map.has(source)) {
|
||||||
|
return map.get(source);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建新容器
|
||||||
|
const target = Array.isArray(source) ? [] : {};
|
||||||
|
map.set(source, target); // 记录克隆关系
|
||||||
|
|
||||||
|
// 克隆普通键值
|
||||||
|
for (const key in source) {
|
||||||
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||||
|
target[key] = deepClone(source[key], map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 克隆Symbol键值(ES6+)
|
||||||
|
const symbolKeys = Object.getOwnPropertySymbols(source);
|
||||||
|
for (const symKey of symbolKeys) {
|
||||||
|
if (source.propertyIsEnumerable(symKey)) {
|
||||||
|
target[symKey] = deepClone(source[symKey], map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return target;
|
||||||
|
}
|
|
@ -20,7 +20,7 @@ function zipFiles(zipName, files) {
|
||||||
ctrl.close();
|
ctrl.close();
|
||||||
} else {
|
} else {
|
||||||
let { name, url } = fileInfo.value;
|
let { name, url } = fileInfo.value;
|
||||||
url = decodeUtf8(url);
|
// url = decodeUtf8(url); // 待定,可能做过特殊处理
|
||||||
return fetch(url).then(res => {
|
return fetch(url).then(res => {
|
||||||
ctrl.enqueue({
|
ctrl.enqueue({
|
||||||
name,
|
name,
|
||||||
|
|
|
@ -186,39 +186,6 @@ export default {
|
||||||
canel() {
|
canel() {
|
||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
},
|
},
|
||||||
handleRemoveFile() {
|
|
||||||
this.form.FileName = null
|
|
||||||
this.form.Path = null
|
|
||||||
this.fileList = []
|
|
||||||
},
|
|
||||||
beforeUpload() {
|
|
||||||
if (this.fileList.length > 0) {
|
|
||||||
this.$alert(this.$t('dictionary:bbrowser:msg:message1'))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handlePreview(row, r2) {
|
|
||||||
if (row.fullPath) {
|
|
||||||
window.open(row.fullPath, '_blank')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async handleUploadFile(param) {
|
|
||||||
this.loading = true
|
|
||||||
var file = await this.fileToBlob(param.file)
|
|
||||||
const res = await this.OSSclient.put(
|
|
||||||
`/System/Browser/${param.file.name}`,
|
|
||||||
file
|
|
||||||
)
|
|
||||||
this.fileList.push({
|
|
||||||
name: param.file.name,
|
|
||||||
path: this.$getObjectName(res.url),
|
|
||||||
fullPath: this.$getObjectName(res.url),
|
|
||||||
url: this.$getObjectName(res.url),
|
|
||||||
})
|
|
||||||
this.form.Path = this.$getObjectName(res.url)
|
|
||||||
this.form.FileName = param.file.name
|
|
||||||
this.loading = false
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
|
@ -1,13 +1,19 @@
|
||||||
/* eslint-disable no-unused-vars */
|
/* eslint-disable no-unused-vars */
|
||||||
<template>
|
<template>
|
||||||
<div style="width:100%;height:100%;">
|
<div style="width: 100%; height: 100%">
|
||||||
<transition name="viewer-fade">
|
<transition name="viewer-fade">
|
||||||
<div v-show="urlList.length > 0" ref="image-viewer__wrapper" tabindex="-1" class="image-viewer__wrapper" :style="{ 'z-index':5 }">
|
<div
|
||||||
|
v-show="urlList.length > 0"
|
||||||
|
ref="image-viewer__wrapper"
|
||||||
|
tabindex="-1"
|
||||||
|
class="image-viewer__wrapper"
|
||||||
|
:style="{ 'z-index': 5 }"
|
||||||
|
>
|
||||||
<span class="image-viewer_desc">
|
<span class="image-viewer_desc">
|
||||||
<!-- <span v-if="studyCode">NST00006</span>
|
<!-- <span v-if="studyCode">NST00006</span>
|
||||||
<span v-if="modality">CT</span>
|
<span v-if="modality">CT</span>
|
||||||
<span v-if="bodyPart">上/下腹部</span><br> -->
|
<span v-if="bodyPart">上/下腹部</span><br> -->
|
||||||
{{ `${index+1} / ${urlList.length}` }}
|
{{ `${index + 1} / ${urlList.length}` }}
|
||||||
</span>
|
</span>
|
||||||
<!-- 关闭 -->
|
<!-- 关闭 -->
|
||||||
<span class="image-viewer__btn image-viewer__close" @click="hide">
|
<span class="image-viewer__btn image-viewer__close" @click="hide">
|
||||||
|
@ -38,37 +44,46 @@
|
||||||
<i class="el-image-viewer__actions__divider" />
|
<i class="el-image-viewer__actions__divider" />
|
||||||
<i class="el-icon-c-scale-to-original" @click="toggleMode" />
|
<i class="el-icon-c-scale-to-original" @click="toggleMode" />
|
||||||
<i class="el-image-viewer__actions__divider" />
|
<i class="el-image-viewer__actions__divider" />
|
||||||
<i class="el-icon-refresh-left" @click="handleActions('anticlocelise')" />
|
<i
|
||||||
<i class="el-icon-refresh-right" @click="handleActions('clocelise')" />
|
class="el-icon-refresh-left"
|
||||||
|
@click="handleActions('anticlocelise')"
|
||||||
|
/>
|
||||||
|
<i
|
||||||
|
class="el-icon-refresh-right"
|
||||||
|
@click="handleActions('clocelise')"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 图片 -->
|
<!-- 图片 -->
|
||||||
<div id="image-viewer__canvas" class="image-viewer__canvas">
|
<div id="image-viewer__canvas" class="image-viewer__canvas">
|
||||||
<img
|
<template v-for="(item, i) in urlList">
|
||||||
v-for="(item, i) in urlList"
|
<img
|
||||||
v-show="i === index"
|
v-if="!~item.FileType.indexOf('pdf')"
|
||||||
:ref="`img${i}`"
|
v-show="i === index"
|
||||||
:key="item.Id"
|
:ref="`img${i}`"
|
||||||
crossorigin="anonymous"
|
:key="item.Id"
|
||||||
:src="item.FileType&&item.FileType.indexOf('zip')>=0?zipImg:`${OSSclientConfig.basePath}${item.Path}`"
|
crossorigin="anonymous"
|
||||||
:style="imgStyle"
|
:src="
|
||||||
style="max-width:100%;max-height: 100%;"
|
item.FileType && item.FileType.indexOf('zip') >= 0
|
||||||
@load="handleImgLoad"
|
? zipImg
|
||||||
@error="handleImgError"
|
: `${OSSclientConfig.basePath}${item.Path}`
|
||||||
@mousedown="handleMouseDown"
|
"
|
||||||
>
|
:style="imgStyle"
|
||||||
|
style="max-width: 100%; max-height: 100%"
|
||||||
|
@load="handleImgLoad"
|
||||||
|
@error="handleImgError"
|
||||||
|
@mousedown="handleMouseDown"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { on, off } from 'element-ui/src/utils/dom'
|
import { on, off } from 'element-ui/src/utils/dom'
|
||||||
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util';
|
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util'
|
||||||
|
|
||||||
const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel'
|
const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel'
|
||||||
|
|
||||||
|
@ -77,36 +92,36 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
urlList: {
|
urlList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => [],
|
||||||
},
|
},
|
||||||
studyCode: {
|
studyCode: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: '',
|
||||||
},
|
},
|
||||||
bodyPart: {
|
bodyPart: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: '',
|
||||||
},
|
},
|
||||||
modality: {
|
modality: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: '',
|
||||||
},
|
},
|
||||||
onSwitch: {
|
onSwitch: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => {}
|
default: () => {},
|
||||||
},
|
},
|
||||||
onClose: {
|
onClose: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => {}
|
default: () => {},
|
||||||
},
|
},
|
||||||
initialIndex: {
|
initialIndex: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0
|
default: 0,
|
||||||
|
},
|
||||||
|
zipImg: {
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
},
|
},
|
||||||
zipImg:{
|
|
||||||
required:true,
|
|
||||||
default:''
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
@ -120,7 +135,7 @@ export default {
|
||||||
deg: 0,
|
deg: 0,
|
||||||
offsetX: 0,
|
offsetX: 0,
|
||||||
offsetY: 0,
|
offsetY: 0,
|
||||||
enableTransition: false
|
enableTransition: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -141,25 +156,25 @@ export default {
|
||||||
transform: `scale(${scale}) rotate(${deg}deg)`,
|
transform: `scale(${scale}) rotate(${deg}deg)`,
|
||||||
transition: enableTransition ? 'transform .3s' : '',
|
transition: enableTransition ? 'transform .3s' : '',
|
||||||
'margin-left': `${offsetX}px`,
|
'margin-left': `${offsetX}px`,
|
||||||
'margin-top': `${offsetY}px`
|
'margin-top': `${offsetY}px`,
|
||||||
}
|
}
|
||||||
return style
|
return style
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
initialIndex: {
|
initialIndex: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(val) {
|
handler(val) {
|
||||||
this.index = val
|
this.index = val
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
index: {
|
index: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(val) {
|
handler(val) {
|
||||||
this.reset()
|
this.reset()
|
||||||
this.onSwitch(val)
|
this.onSwitch(val)
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.getElementById('image-viewer__canvas').onmousewheel = (event) => {
|
document.getElementById('image-viewer__canvas').onmousewheel = (event) => {
|
||||||
|
@ -167,13 +182,13 @@ export default {
|
||||||
// 缩小
|
// 缩小
|
||||||
this.handleActions('zoomOut', {
|
this.handleActions('zoomOut', {
|
||||||
zoomRate: 0.015,
|
zoomRate: 0.015,
|
||||||
enableTransition: false
|
enableTransition: false,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// 放大
|
// 放大
|
||||||
this.handleActions('zoomIn', {
|
this.handleActions('zoomIn', {
|
||||||
zoomRate: 0.015,
|
zoomRate: 0.015,
|
||||||
enableTransition: false
|
enableTransition: false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
@ -186,7 +201,7 @@ export default {
|
||||||
this.onClose()
|
this.onClose()
|
||||||
},
|
},
|
||||||
deviceSupportInstall() {
|
deviceSupportInstall() {
|
||||||
this._keyDownHandler = e => {
|
this._keyDownHandler = (e) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
const keyCode = e.keyCode
|
const keyCode = e.keyCode
|
||||||
switch (keyCode) {
|
switch (keyCode) {
|
||||||
|
@ -216,17 +231,17 @@ export default {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this._mouseWheelHandler = rafThrottle(e => {
|
this._mouseWheelHandler = rafThrottle((e) => {
|
||||||
const delta = e.wheelDelta ? e.wheelDelta : -e.detail
|
const delta = e.wheelDelta ? e.wheelDelta : -e.detail
|
||||||
if (delta > 0) {
|
if (delta > 0) {
|
||||||
this.handleActions('zoomIn', {
|
this.handleActions('zoomIn', {
|
||||||
zoomRate: 0.015,
|
zoomRate: 0.015,
|
||||||
enableTransition: false
|
enableTransition: false,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.handleActions('zoomOut', {
|
this.handleActions('zoomOut', {
|
||||||
zoomRate: 0.015,
|
zoomRate: 0.015,
|
||||||
enableTransition: false
|
enableTransition: false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -254,12 +269,12 @@ export default {
|
||||||
const { offsetX, offsetY } = this.transform
|
const { offsetX, offsetY } = this.transform
|
||||||
const startX = e.pageX
|
const startX = e.pageX
|
||||||
const startY = e.pageY
|
const startY = e.pageY
|
||||||
this._dragHandler = rafThrottle(ev => {
|
this._dragHandler = rafThrottle((ev) => {
|
||||||
this.transform.offsetX = offsetX + ev.pageX - startX
|
this.transform.offsetX = offsetX + ev.pageX - startX
|
||||||
this.transform.offsetY = offsetY + ev.pageY - startY
|
this.transform.offsetY = offsetY + ev.pageY - startY
|
||||||
})
|
})
|
||||||
on(document, 'mousemove', this._dragHandler)
|
on(document, 'mousemove', this._dragHandler)
|
||||||
on(document, 'mouseup', ev => {
|
on(document, 'mouseup', (ev) => {
|
||||||
off(document, 'mousemove', this._dragHandler)
|
off(document, 'mousemove', this._dragHandler)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -271,7 +286,7 @@ export default {
|
||||||
deg: 0,
|
deg: 0,
|
||||||
offsetX: 0,
|
offsetX: 0,
|
||||||
offsetY: 0,
|
offsetY: 0,
|
||||||
enableTransition: false
|
enableTransition: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toggleMode() {
|
toggleMode() {
|
||||||
|
@ -294,18 +309,22 @@ export default {
|
||||||
zoomRate: 0.2,
|
zoomRate: 0.2,
|
||||||
rotateDeg: 90,
|
rotateDeg: 90,
|
||||||
enableTransition: true,
|
enableTransition: true,
|
||||||
...options
|
...options,
|
||||||
}
|
}
|
||||||
const { transform } = this
|
const { transform } = this
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'zoomOut':
|
case 'zoomOut':
|
||||||
if (transform.scale > 0.2) {
|
if (transform.scale > 0.2) {
|
||||||
transform.scale = parseFloat((transform.scale - zoomRate).toFixed(3))
|
transform.scale = parseFloat(
|
||||||
|
(transform.scale - zoomRate).toFixed(3)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'zoomIn':
|
case 'zoomIn':
|
||||||
if (transform.scale < 5) {
|
if (transform.scale < 5) {
|
||||||
transform.scale = parseFloat((transform.scale + zoomRate).toFixed(3))
|
transform.scale = parseFloat(
|
||||||
|
(transform.scale + zoomRate).toFixed(3)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'clocelise':
|
case 'clocelise':
|
||||||
|
@ -316,47 +335,46 @@ export default {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
transform.enableTransition = enableTransition
|
transform.enableTransition = enableTransition
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.image-viewer__wrapper {
|
||||||
.image-viewer__wrapper{
|
position: relative;
|
||||||
position: relative;
|
top: 0;
|
||||||
top:0;
|
right: 0;
|
||||||
right:0;
|
bottom: 0;
|
||||||
bottom:0;
|
left: 0;
|
||||||
left:0;
|
width: 100%;
|
||||||
width: 100%;
|
height: 100%;
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
.image-viewer__btn{
|
.image-viewer__btn {
|
||||||
position:absolute;
|
position: absolute;
|
||||||
z-index:1;
|
z-index: 1;
|
||||||
display:flex;
|
display: flex;
|
||||||
align-items:center;
|
align-items: center;
|
||||||
justify-content:center;
|
justify-content: center;
|
||||||
border-radius:50%;
|
border-radius: 50%;
|
||||||
opacity:.8;
|
opacity: 0.8;
|
||||||
cursor:pointer;
|
cursor: pointer;
|
||||||
box-sizing:border-box;
|
box-sizing: border-box;
|
||||||
user-select:none
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-viewer__close{
|
.image-viewer__close {
|
||||||
display: none;
|
display: none;
|
||||||
top:40px;
|
top: 40px;
|
||||||
right:40px;
|
right: 40px;
|
||||||
width:40px;
|
width: 40px;
|
||||||
height:40px;
|
height: 40px;
|
||||||
font-size:40px
|
font-size: 40px;
|
||||||
}
|
}
|
||||||
.image-viewer_desc{
|
.image-viewer_desc {
|
||||||
position:absolute;
|
position: absolute;
|
||||||
top:40px;
|
top: 40px;
|
||||||
left:40px;
|
left: 40px;
|
||||||
font-size:15px;
|
font-size: 15px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
width: 70px;
|
width: 70px;
|
||||||
|
@ -369,92 +387,92 @@ export default {
|
||||||
border-radius: 17px;
|
border-radius: 17px;
|
||||||
// border-radius: 2%;
|
// border-radius: 2%;
|
||||||
}
|
}
|
||||||
.image-viewer__canvas{
|
.image-viewer__canvas {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
width:100%;
|
width: 100%;
|
||||||
height:100%;
|
height: 100%;
|
||||||
display:flex;
|
display: flex;
|
||||||
justify-content:center;
|
justify-content: center;
|
||||||
align-items:center
|
align-items: center;
|
||||||
}
|
}
|
||||||
.image-viewer__actions{
|
.image-viewer__actions {
|
||||||
left:50%;
|
left: 50%;
|
||||||
bottom:30px;
|
bottom: 30px;
|
||||||
transform:translateX(-50%);
|
transform: translateX(-50%);
|
||||||
width:282px;
|
width: 282px;
|
||||||
height:44px;
|
height: 44px;
|
||||||
padding:0 23px;
|
padding: 0 23px;
|
||||||
background-color:#606266;
|
background-color: #606266;
|
||||||
border-color:#fff;
|
border-color: #fff;
|
||||||
border-radius:22px
|
border-radius: 22px;
|
||||||
}
|
}
|
||||||
.image-viewer__actions__inner{
|
.image-viewer__actions__inner {
|
||||||
width:100%;
|
width: 100%;
|
||||||
height:100%;
|
height: 100%;
|
||||||
text-align:justify;
|
text-align: justify;
|
||||||
cursor:default;
|
cursor: default;
|
||||||
font-size:23px;
|
font-size: 23px;
|
||||||
color:#fff;
|
color: #fff;
|
||||||
display:flex;
|
display: flex;
|
||||||
align-items:center;
|
align-items: center;
|
||||||
justify-content:space-around
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
.image-viewer__next,.image-viewer__prev{
|
.image-viewer__next,
|
||||||
top:50%;
|
.image-viewer__prev {
|
||||||
width:44px;
|
top: 50%;
|
||||||
height:44px;
|
width: 44px;
|
||||||
font-size:24px;
|
height: 44px;
|
||||||
color:#fff;
|
font-size: 24px;
|
||||||
background-color:#606266;
|
color: #fff;
|
||||||
border-color:#fff
|
background-color: #606266;
|
||||||
|
border-color: #fff;
|
||||||
}
|
}
|
||||||
.image-viewer__prev{
|
.image-viewer__prev {
|
||||||
transform:translateY(-50%);
|
transform: translateY(-50%);
|
||||||
left:40px
|
left: 40px;
|
||||||
}
|
}
|
||||||
.image-viewer__next{
|
.image-viewer__next {
|
||||||
transform:translateY(-50%);
|
transform: translateY(-50%);
|
||||||
right:40px;
|
right: 40px;
|
||||||
text-indent:2px
|
text-indent: 2px;
|
||||||
}
|
}
|
||||||
.image-viewer__mask{
|
.image-viewer__mask {
|
||||||
position:absolute;
|
position: absolute;
|
||||||
width:100%;
|
width: 100%;
|
||||||
height:100%;
|
height: 100%;
|
||||||
top:0;
|
top: 0;
|
||||||
left:0;
|
left: 0;
|
||||||
opacity:.5;
|
opacity: 0.5;
|
||||||
// background:#000
|
// background:#000
|
||||||
|
|
||||||
}
|
}
|
||||||
.viewer-fade-enter-active{
|
.viewer-fade-enter-active {
|
||||||
animation:viewer-fade-in .3s
|
animation: viewer-fade-in 0.3s;
|
||||||
}
|
}
|
||||||
.viewer-fade-leave-active{
|
.viewer-fade-leave-active {
|
||||||
animation:viewer-fade-out .3s
|
animation: viewer-fade-out 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes viewer-fade-in{
|
@keyframes viewer-fade-in {
|
||||||
0%{
|
0% {
|
||||||
transform:translate3d(0,-20px,0);
|
transform: translate3d(0, -20px, 0);
|
||||||
opacity:0
|
opacity: 0;
|
||||||
}
|
}
|
||||||
100%{
|
100% {
|
||||||
transform:translate3d(0,0,0);
|
transform: translate3d(0, 0, 0);
|
||||||
opacity:1
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes viewer-fade-out{
|
@keyframes viewer-fade-out {
|
||||||
0%{
|
0% {
|
||||||
transform:translate3d(0,0,0);
|
transform: translate3d(0, 0, 0);
|
||||||
opacity:1
|
opacity: 1;
|
||||||
}
|
}
|
||||||
100%{
|
100% {
|
||||||
transform:translate3d(0,-20px,0);
|
transform: translate3d(0, -20px, 0);
|
||||||
opacity:0
|
opacity: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="none-dicom_preview-wrapper">
|
<div class="none-dicom_preview-wrapper">
|
||||||
|
|
||||||
<div class="image-viewer-wrapper">
|
<div class="image-viewer-wrapper">
|
||||||
<!-- 预览图像 -->
|
<!-- 预览图像 -->
|
||||||
<ImageViewer
|
<ImageViewer
|
||||||
|
@ -15,10 +14,10 @@
|
||||||
:study-code="previewImage.studyCode"
|
:study-code="previewImage.studyCode"
|
||||||
:body-part="previewImage.bodyPart"
|
:body-part="previewImage.bodyPart"
|
||||||
:modality="previewImage.modality"
|
:modality="previewImage.modality"
|
||||||
:zip-img='zipImg'
|
:zip-img="zipImg"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="thumbnail-wrapper" style="z-index:999;background-color:#fff;">
|
<div class="thumbnail-wrapper" style="z-index: 999; background-color: #fff">
|
||||||
<div class="">
|
<div class="">
|
||||||
<div class="img-wrapper">
|
<div class="img-wrapper">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -33,21 +32,31 @@
|
||||||
<slot name="empty">暂无数据</slot>
|
<slot name="empty">暂无数据</slot>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="!noData" class="items" :style="itemsStyle">
|
<div v-show="!noData" class="items" :style="itemsStyle">
|
||||||
<div
|
<template v-for="(item, index) in previewImage.imgList">
|
||||||
v-for="(item, index) in previewImage.imgList"
|
<div
|
||||||
:key="index"
|
v-if="!~item.FileType.indexOf('pdf')"
|
||||||
class="item-img"
|
:key="index"
|
||||||
:style="imgSize"
|
class="item-img"
|
||||||
:class="{
|
:style="imgSize"
|
||||||
'is-active': index === currentIndex
|
:class="{
|
||||||
}"
|
'is-active': index === currentIndex,
|
||||||
@click="selected(index)"
|
}"
|
||||||
>
|
@click="selected(index)"
|
||||||
<img :title="item.FileName" crossorigin="anonymous" :src="item.FileType&&item.FileType.indexOf('zip')>=0?zipImg:`${OSSclientConfig.basePath}${item.Path}`">
|
>
|
||||||
<p v-if="item.FileName" class="item-date">
|
<img
|
||||||
{{ `${index+1}` }}
|
:title="item.FileName"
|
||||||
</p>
|
crossorigin="anonymous"
|
||||||
</div>
|
:src="
|
||||||
|
item.FileType && item.FileType.indexOf('zip') >= 0
|
||||||
|
? zipImg
|
||||||
|
: `${OSSclientConfig.basePath}${item.Path}`
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
<p v-if="item.FileName" class="item-date">
|
||||||
|
{{ `${index + 1}` }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -63,12 +72,12 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ImageViewer from './image-viewer';
|
import ImageViewer from './image-viewer'
|
||||||
import zipImg from "@/assets/zip.png";
|
import zipImg from '@/assets/zip.png'
|
||||||
export default {
|
export default {
|
||||||
name: 'Preview',
|
name: 'Preview',
|
||||||
components: {
|
components: {
|
||||||
ImageViewer
|
ImageViewer,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
imgSize: {
|
imgSize: {
|
||||||
|
@ -76,13 +85,13 @@ export default {
|
||||||
default: () => {
|
default: () => {
|
||||||
return {
|
return {
|
||||||
width: '120px',
|
width: '120px',
|
||||||
height: '120px'
|
height: '120px',
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: null
|
default: null,
|
||||||
},
|
},
|
||||||
previewImage: {
|
previewImage: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -94,11 +103,10 @@ export default {
|
||||||
infinite: true, // 是否可以循环切换
|
infinite: true, // 是否可以循环切换
|
||||||
studyCode: '',
|
studyCode: '',
|
||||||
modality: '',
|
modality: '',
|
||||||
bodyPart: ''
|
bodyPart: '',
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -107,14 +115,14 @@ export default {
|
||||||
translateX: 0,
|
translateX: 0,
|
||||||
pageSize: 0, // 一页展示的图片数
|
pageSize: 0, // 一页展示的图片数
|
||||||
urlList: [],
|
urlList: [],
|
||||||
zipImg
|
zipImg,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 偏移度数
|
// 偏移度数
|
||||||
itemsStyle() {
|
itemsStyle() {
|
||||||
return {
|
return {
|
||||||
transform: `translateX(${-this.translateX}px)`
|
transform: `translateX(${-this.translateX}px)`,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 每一项宽度
|
// 每一项宽度
|
||||||
|
@ -128,7 +136,8 @@ export default {
|
||||||
disabledNext() {
|
disabledNext() {
|
||||||
// 禁用后一页按钮
|
// 禁用后一页按钮
|
||||||
return (
|
return (
|
||||||
this.translateX >= (this.previewImage.imgList.length - this.pageSize) * this.itemWidth
|
this.translateX >=
|
||||||
|
(this.previewImage.imgList.length - this.pageSize) * this.itemWidth
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
noData() {
|
noData() {
|
||||||
|
@ -136,28 +145,27 @@ export default {
|
||||||
},
|
},
|
||||||
dataLength() {
|
dataLength() {
|
||||||
return this.previewImage.imgList.length
|
return this.previewImage.imgList.length
|
||||||
}
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value: {
|
value: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(val) {
|
handler(val) {
|
||||||
this.currentIndex = val
|
this.currentIndex = val
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
'previewImage.index': {
|
'previewImage.index': {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(val) {
|
handler(val) {
|
||||||
this.urlList.index = val
|
this.urlList.index = val
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.pageSize = this.wrapperWidth() / this.itemWidth
|
this.pageSize = this.wrapperWidth() / this.itemWidth
|
||||||
this.urlList = this.previewImage
|
this.urlList = this.previewImage
|
||||||
const scope = this
|
const scope = this
|
||||||
window.onresize = function() {
|
window.onresize = function () {
|
||||||
scope.pageSize = scope.wrapperWidth() / scope.itemWidth
|
scope.pageSize = scope.wrapperWidth() / scope.itemWidth
|
||||||
scope.selected(scope.currentIndex)
|
scope.selected(scope.currentIndex)
|
||||||
}
|
}
|
||||||
|
@ -201,148 +209,147 @@ export default {
|
||||||
return this.$refs.imagesWrapper.offsetWidth
|
return this.$refs.imagesWrapper.offsetWidth
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
},
|
||||||
|
},
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.none-dicom_preview-wrapper{
|
.none-dicom_preview-wrapper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.image-viewer-wrapper{
|
.image-viewer-wrapper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
|
||||||
.thumbnail-wrapper{
|
|
||||||
height: 130px;
|
|
||||||
}
|
|
||||||
.img-content{
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
bottom: 10px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.img-wrapper {
|
|
||||||
display: flex;
|
|
||||||
position: relative;
|
|
||||||
margin: 0 20px;
|
|
||||||
height: 120px;
|
|
||||||
.to {
|
|
||||||
width: 32px;
|
|
||||||
height: 100%;
|
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
.images::before {
|
.thumbnail-wrapper {
|
||||||
|
height: 130px;
|
||||||
|
}
|
||||||
|
.img-content {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 5;
|
left: 0;
|
||||||
top: 0;
|
bottom: 10px;
|
||||||
height: 100%;
|
|
||||||
width: 84px;
|
|
||||||
content: '';
|
|
||||||
pointer-events: none;
|
|
||||||
background: -webkit-gradient(
|
|
||||||
linear,
|
|
||||||
left top,
|
|
||||||
right top,
|
|
||||||
from(#fff),
|
|
||||||
color-stop(50%, rgba(0, 0, 0, 0))
|
|
||||||
);
|
|
||||||
background: -o-linear-gradient(left, #fff, rgba(0, 0, 0, 0) 50%);
|
|
||||||
background: linear-gradient(90deg, #fff, rgba(0, 0, 0, 0) 50%);
|
|
||||||
}
|
|
||||||
.images::after {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 5;
|
|
||||||
top: 0;
|
|
||||||
height: 100%;
|
|
||||||
right: 0;
|
|
||||||
width: 84px;
|
|
||||||
content: '';
|
|
||||||
pointer-events: none;
|
|
||||||
background: -webkit-gradient(
|
|
||||||
linear,
|
|
||||||
right top,
|
|
||||||
left top,
|
|
||||||
from(#fff),
|
|
||||||
color-stop(50%, rgba(0, 0, 0, 0))
|
|
||||||
);
|
|
||||||
background: -o-linear-gradient(right, #fff, rgba(0, 0, 0, 0) 50%);
|
|
||||||
background: linear-gradient(270deg, #fff, rgba(0, 0, 0, 0) 50%);
|
|
||||||
}
|
|
||||||
.images {
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
}
|
||||||
margin: 0 2px;
|
.img-wrapper {
|
||||||
.empty-text {
|
display: flex;
|
||||||
color: rgb(158, 158, 158);
|
position: relative;
|
||||||
|
margin: 0 20px;
|
||||||
|
height: 120px;
|
||||||
|
.to {
|
||||||
|
width: 32px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
padding: 0;
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
}
|
||||||
.items {
|
.images::before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
z-index: 5;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
|
||||||
display: flex;
|
|
||||||
// width: 6000px;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
align-items: center;
|
width: 84px;
|
||||||
transition: transform 0.25s ease;
|
content: '';
|
||||||
.item-img {
|
pointer-events: none;
|
||||||
display: inline-block;
|
background: -webkit-gradient(
|
||||||
box-sizing: border-box;
|
linear,
|
||||||
position: relative;
|
left top,
|
||||||
margin-right: 8px;
|
right top,
|
||||||
border: 2px solid rgba(0, 0, 0, 0);
|
from(#fff),
|
||||||
cursor: pointer;
|
color-stop(50%, rgba(0, 0, 0, 0))
|
||||||
.item-date {
|
);
|
||||||
bottom: 0px;
|
background: -o-linear-gradient(left, #fff, rgba(0, 0, 0, 0) 50%);
|
||||||
position: absolute;
|
background: linear-gradient(90deg, #fff, rgba(0, 0, 0, 0) 50%);
|
||||||
width: 100%;
|
}
|
||||||
height: 24px;
|
.images::after {
|
||||||
background: rgba(0, 0, 0, 0.2);
|
position: absolute;
|
||||||
text-align: center;
|
z-index: 5;
|
||||||
line-height: 24px;
|
top: 0;
|
||||||
color: white;
|
height: 100%;
|
||||||
}
|
right: 0;
|
||||||
img {
|
width: 84px;
|
||||||
width: 100%;
|
content: '';
|
||||||
height: 100%;
|
pointer-events: none;
|
||||||
}
|
background: -webkit-gradient(
|
||||||
|
linear,
|
||||||
|
right top,
|
||||||
|
left top,
|
||||||
|
from(#fff),
|
||||||
|
color-stop(50%, rgba(0, 0, 0, 0))
|
||||||
|
);
|
||||||
|
background: -o-linear-gradient(right, #fff, rgba(0, 0, 0, 0) 50%);
|
||||||
|
background: linear-gradient(270deg, #fff, rgba(0, 0, 0, 0) 50%);
|
||||||
|
}
|
||||||
|
.images {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0 2px;
|
||||||
|
.empty-text {
|
||||||
|
color: rgb(158, 158, 158);
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.item-img:hover::after {
|
.items {
|
||||||
// border-color: #409EFF;
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
.item-img::after {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
display: flex;
|
||||||
|
// width: 6000px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
content: '';
|
align-items: center;
|
||||||
opacity: 0.2;
|
transition: transform 0.25s ease;
|
||||||
pointer-events: none;
|
.item-img {
|
||||||
-webkit-transition: opacity 0.3s ease;
|
display: inline-block;
|
||||||
-o-transition: opacity 0.3s ease;
|
box-sizing: border-box;
|
||||||
transition: opacity 0.3s ease;
|
position: relative;
|
||||||
background-color: #fff;
|
margin-right: 8px;
|
||||||
}
|
border: 2px solid rgba(0, 0, 0, 0);
|
||||||
.is-active {
|
cursor: pointer;
|
||||||
border-color: #409eff;
|
.item-date {
|
||||||
}
|
bottom: 0px;
|
||||||
.is-active:after {
|
position: absolute;
|
||||||
opacity: 0;
|
width: 100%;
|
||||||
|
height: 24px;
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
text-align: center;
|
||||||
|
line-height: 24px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.item-img:hover::after {
|
||||||
|
// border-color: #409EFF;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.item-img::after {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
content: '';
|
||||||
|
opacity: 0.2;
|
||||||
|
pointer-events: none;
|
||||||
|
-webkit-transition: opacity 0.3s ease;
|
||||||
|
-o-transition: opacity 0.3s ease;
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
.is-active {
|
||||||
|
border-color: #409eff;
|
||||||
|
}
|
||||||
|
.is-active:after {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
<div v-for="(study, i) in studyList" :key="study.CodeView">
|
<div v-for="(study, i) in studyList" :key="study.CodeView">
|
||||||
<div class="study-desc">
|
<div class="study-desc">
|
||||||
<span>{{ study.CodeView }}</span>
|
<span>{{ study.CodeView }}</span>
|
||||||
|
<span v-if="OtherInfo.IsShowStudyName" style="margin-left: 5px">{{
|
||||||
|
study.StudyName
|
||||||
|
}}</span>
|
||||||
<span style="margin: 0 5px">{{ study.Modality }}</span>
|
<span style="margin: 0 5px">{{ study.Modality }}</span>
|
||||||
<span>{{ getBodyPart(study.BodyPart) }}</span>
|
<span>{{ getBodyPart(study.BodyPart) }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -45,7 +48,7 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- 预览图像 -->
|
<!-- 预览图像 -->
|
||||||
<el-card class="box-card right">
|
<el-card class="box-card right">
|
||||||
<div style="width: 100%; height: 100%">
|
<div style="width: 100%; height: 100%" v-if="!showPDF">
|
||||||
<Preview
|
<Preview
|
||||||
v-if="previewImage.imgList.length > 0"
|
v-if="previewImage.imgList.length > 0"
|
||||||
ref="previewImage"
|
ref="previewImage"
|
||||||
|
@ -55,6 +58,9 @@
|
||||||
@selectedImg="selectedImg"
|
@selectedImg="selectedImg"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="width: 100%; height: 100%" v-else>
|
||||||
|
<PreviewFile :file-path="pdfFile.path" :file-type="pdfFile.type" />
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- <el-card class="box-card" style="width:300px;height:100%;padding: 10px;margin-left:10px;">
|
<!-- <el-card class="box-card" style="width:300px;height:100%;padding: 10px;margin-left:10px;">
|
||||||
|
@ -68,11 +74,13 @@ import { getNoneDicomStudyList } from '@/api/trials'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { changeURLStatic } from '@/utils/history.js'
|
import { changeURLStatic } from '@/utils/history.js'
|
||||||
import Preview from './components/preview'
|
import Preview from './components/preview'
|
||||||
|
import PreviewFile from '@/components/PreviewFile'
|
||||||
// import CheckForm from './components/form'
|
// import CheckForm from './components/form'
|
||||||
export default {
|
export default {
|
||||||
name: 'Notice',
|
name: 'Notice',
|
||||||
components: {
|
components: {
|
||||||
Preview,
|
Preview,
|
||||||
|
PreviewFile,
|
||||||
// CheckForm
|
// CheckForm
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -97,6 +105,12 @@ export default {
|
||||||
sudyId: '',
|
sudyId: '',
|
||||||
loading: false,
|
loading: false,
|
||||||
bp: [],
|
bp: [],
|
||||||
|
OtherInfo: {},
|
||||||
|
showPDF: false,
|
||||||
|
pdfFile: {
|
||||||
|
path: null,
|
||||||
|
type: null,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
|
@ -148,6 +162,7 @@ export default {
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.studyList = res.Result
|
this.studyList = res.Result
|
||||||
|
this.OtherInfo = res.OtherInfo
|
||||||
this.loading = false
|
this.loading = false
|
||||||
const studyIndex = this.studyList.findIndex((item) => {
|
const studyIndex = this.studyList.findIndex((item) => {
|
||||||
return item.NoneDicomStudyFileList.length > 0
|
return item.NoneDicomStudyFileList.length > 0
|
||||||
|
@ -163,6 +178,15 @@ export default {
|
||||||
},
|
},
|
||||||
selected(file, studyIndex, fileIndex, isChangeSub = false) {
|
selected(file, studyIndex, fileIndex, isChangeSub = false) {
|
||||||
this.currentFileId = file.Id
|
this.currentFileId = file.Id
|
||||||
|
if (!!~file.FileType.indexOf('pdf')) {
|
||||||
|
this.pdfFile.path = file.Path || file.FullFilePath
|
||||||
|
this.pdfFile.type = 'pdf'
|
||||||
|
this.showPDF = true
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
this.showPDF = false
|
||||||
|
}
|
||||||
|
|
||||||
this.currentStudyIndex = studyIndex
|
this.currentStudyIndex = studyIndex
|
||||||
this.previewImage.imgList =
|
this.previewImage.imgList =
|
||||||
this.studyList[studyIndex].NoneDicomStudyFileList
|
this.studyList[studyIndex].NoneDicomStudyFileList
|
||||||
|
|
|
@ -92,7 +92,6 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 浏览器推荐版本列表 -->
|
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-adaptive="{ bottomOffset: 45 }"
|
v-adaptive="{ bottomOffset: 45 }"
|
||||||
|
@ -159,7 +158,6 @@
|
||||||
prop="TrialUserRoleList"
|
prop="TrialUserRoleList"
|
||||||
:label="$t('system:retrospect:table:TrialUserRoleList')"
|
:label="$t('system:retrospect:table:TrialUserRoleList')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
|
@ -212,14 +210,15 @@
|
||||||
width="200"
|
width="200"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
>
|
>
|
||||||
<!-- <template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" @click="handleEdit(scope.row)">
|
<!-- 详情 -->
|
||||||
{{ $t('dictionary:browser:button:edit') }}
|
<el-button
|
||||||
</el-button>
|
circle
|
||||||
<el-button type="text" @click="handleDelete(scope.row)">
|
icon="el-icon-info"
|
||||||
{{ $t('dictionary:browser:button:delete') }}
|
:title="$t('system:retrospect:table:detail')"
|
||||||
</el-button>
|
@click.stop="handleDetail(scope.row)"
|
||||||
</template> -->
|
/>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
|
@ -297,8 +296,8 @@ export default {
|
||||||
this.searchData.IdentityUserId = this.userId
|
this.searchData.IdentityUserId = this.userId
|
||||||
this.loading = true
|
this.loading = true
|
||||||
let res = await getUserJoinedTrialList(this.searchData)
|
let res = await getUserJoinedTrialList(this.searchData)
|
||||||
|
this.loading = false
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.loading = false
|
|
||||||
res.OtherInfo = res.OtherInfo ? res.OtherInfo : {}
|
res.OtherInfo = res.OtherInfo ? res.OtherInfo : {}
|
||||||
Object.keys(this.otherInfo).forEach((key) => {
|
Object.keys(this.otherInfo).forEach((key) => {
|
||||||
this.otherInfo[key] = res.OtherInfo[key]
|
this.otherInfo[key] = res.OtherInfo[key]
|
||||||
|
@ -311,6 +310,11 @@ export default {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleDetail(row) {
|
||||||
|
this.$router.push({
|
||||||
|
path: `/trials/trials-panel?trialId=${row.TrialId}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}`,
|
||||||
|
})
|
||||||
|
},
|
||||||
// 查询
|
// 查询
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1
|
||||||
|
|
|
@ -184,7 +184,7 @@
|
||||||
:disabled="isDisabled"
|
:disabled="isDisabled"
|
||||||
style="margin: 10px 15px"
|
style="margin: 10px 15px"
|
||||||
@click="handleSave"
|
@click="handleSave"
|
||||||
>Save</el-button
|
>{{ $t('common:button:save') }}</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<roleList
|
<roleList
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('trials:logincCfg:form:subjectNum2')"
|
:label="$t('trials:logincCfg:form:subjectNum2')"
|
||||||
prop="IsSubjectSecondCodeView"
|
prop="IsSubjectSecondCodeView"
|
||||||
|
v-if="showMore"
|
||||||
>
|
>
|
||||||
<el-radio-group
|
<el-radio-group
|
||||||
v-model="form.IsSubjectSecondCodeView"
|
v-model="form.IsSubjectSecondCodeView"
|
||||||
|
@ -103,6 +104,7 @@
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('trials:logincCfg:form:subjectAge')"
|
:label="$t('trials:logincCfg:form:subjectAge')"
|
||||||
prop="IsHaveSubjectAge"
|
prop="IsHaveSubjectAge"
|
||||||
|
v-if="showMore"
|
||||||
>
|
>
|
||||||
<el-radio-group
|
<el-radio-group
|
||||||
v-model="form.IsHaveSubjectAge"
|
v-model="form.IsHaveSubjectAge"
|
||||||
|
@ -121,6 +123,7 @@
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('trials:logincCfg:form:subjectGender')"
|
:label="$t('trials:logincCfg:form:subjectGender')"
|
||||||
prop="IsSubjectSexView"
|
prop="IsSubjectSexView"
|
||||||
|
v-if="showMore"
|
||||||
>
|
>
|
||||||
<el-radio-group
|
<el-radio-group
|
||||||
v-model="form.IsSubjectSexView"
|
v-model="form.IsSubjectSexView"
|
||||||
|
@ -152,6 +155,7 @@
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('trials:logincCfg:form:imageCopy')"
|
:label="$t('trials:logincCfg:form:imageCopy')"
|
||||||
prop="IsImageReplicationAcrossTrial"
|
prop="IsImageReplicationAcrossTrial"
|
||||||
|
v-if="showMore"
|
||||||
>
|
>
|
||||||
<el-radio-group
|
<el-radio-group
|
||||||
v-model="form.IsImageReplicationAcrossTrial"
|
v-model="form.IsImageReplicationAcrossTrial"
|
||||||
|
@ -203,6 +207,45 @@
|
||||||
@click="handleSetModality"
|
@click="handleSetModality"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!--展示检查名称-->
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:logincCfg:form:IsShowStudyName ')"
|
||||||
|
prop="IsShowStudyName"
|
||||||
|
v-if="showMore"
|
||||||
|
>
|
||||||
|
<el-radio-group
|
||||||
|
v-model="form.IsShowStudyName"
|
||||||
|
:disabled="form.IsTrialBasicLogicConfirmed && !isEdit"
|
||||||
|
@input="IsShowStudyNameChange"
|
||||||
|
>
|
||||||
|
<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:logincCfg:form:StudyNameList')"
|
||||||
|
prop="StudyNameTypes"
|
||||||
|
v-if="form.IsShowStudyName && showMore"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="form.StudyNameTypes"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 2, maxRows: 8 }"
|
||||||
|
style="width: 80%"
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
:disabled="form.IsTrialBasicLogicConfirmed && !isEdit"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
circle
|
||||||
|
@click="handleSetStudyName"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<!-- 影像质疑超限天数 -->
|
<!-- 影像质疑超限天数 -->
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('trials:logincCfg:form:exceededDays')"
|
:label="$t('trials:logincCfg:form:exceededDays')"
|
||||||
|
@ -215,6 +258,19 @@
|
||||||
:disabled="form.IsTrialBasicLogicConfirmed && !isEdit"
|
:disabled="form.IsTrialBasicLogicConfirmed && !isEdit"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<div
|
||||||
|
:class="{ showMore: true, isCheck: showMore }"
|
||||||
|
@click.stop="showMore = !showMore"
|
||||||
|
>
|
||||||
|
<i class="el-icon-arrow-down"></i>
|
||||||
|
<span>{{
|
||||||
|
showMore
|
||||||
|
? $t('trials:logincCfg:button:packUp')
|
||||||
|
: $t('trials:logincCfg:button:more')
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<!-- 保存 -->
|
<!-- 保存 -->
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -279,7 +335,8 @@
|
||||||
v-if="
|
v-if="
|
||||||
(form.IsTrialBasicLogicConfirmed === false ||
|
(form.IsTrialBasicLogicConfirmed === false ||
|
||||||
(form.IsTrialBasicLogicConfirmed === true && isEdit)) &&
|
(form.IsTrialBasicLogicConfirmed === true && isEdit)) &&
|
||||||
hasPermi(['trials:trials-panel:setting:trial-config:save'])
|
hasPermi(['trials:trials-panel:setting:trial-config:save']) &&
|
||||||
|
showMore
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ $t('common:button:terminology') }}
|
{{ $t('common:button:terminology') }}
|
||||||
|
@ -748,6 +805,121 @@
|
||||||
:visible.sync="terminologyVisible"
|
:visible.sync="terminologyVisible"
|
||||||
:DATA.sync="form.TrialObjectNameList"
|
:DATA.sync="form.TrialObjectNameList"
|
||||||
/>
|
/>
|
||||||
|
<el-dialog
|
||||||
|
v-if="studyNameListVisible"
|
||||||
|
:visible.sync="studyNameListVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:title="$t('trials:logincCfg:form:studyName')"
|
||||||
|
custom-class="base-dialog-wrapper"
|
||||||
|
width="400px"
|
||||||
|
>
|
||||||
|
<div class="base-dialog-body" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="addStudyName_model.visible = true"
|
||||||
|
style="position: absolute; top: 10px; right: 10px; z-index: 9"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:add') }}
|
||||||
|
</el-button>
|
||||||
|
<el-table
|
||||||
|
ref="studyNameTable"
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="trialStudyNameList"
|
||||||
|
stripe
|
||||||
|
height="400"
|
||||||
|
row-key="Name"
|
||||||
|
@selection-change="handleStudyNameSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
align="left"
|
||||||
|
width="45"
|
||||||
|
:reserve-selection="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="Name"
|
||||||
|
:label="$t('trials:logincCfg:form:studyName')"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="bodyPartName">
|
||||||
|
<span :title="isEN ? scope.row.EnName : scope.row.Name">{{
|
||||||
|
isEN ? scope.row.EnName : scope.row.Name
|
||||||
|
}}</span>
|
||||||
|
<el-button
|
||||||
|
circle
|
||||||
|
icon="el-icon-delete"
|
||||||
|
:title="$t('trials:logincCfg:form:StudyName:del')"
|
||||||
|
@click.stop="handleDelStudyName(scope.row)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="base-dialog-footer"
|
||||||
|
style="text-align: right; margin-top: 10px"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
:disabled="listLoading"
|
||||||
|
@click="studyNameListVisible = false"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:cancel') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
:disabled="listLoading"
|
||||||
|
@click="handleConfirmStudyName"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:confirm') }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!--新增检查名称-->
|
||||||
|
<base-model v-if="addStudyName_model.visible" :config="addStudyName_model">
|
||||||
|
<template slot="dialog-body">
|
||||||
|
<el-form
|
||||||
|
ref="addStudyNameForm"
|
||||||
|
:inline="true"
|
||||||
|
:model="addStudyNameForm"
|
||||||
|
class="demo-form-inline"
|
||||||
|
:rules="addStudyNamerules"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:setting:form:studyName')"
|
||||||
|
prop="Name"
|
||||||
|
label-width="150px"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model.trim="addStudyNameForm.Name"
|
||||||
|
clearable
|
||||||
|
type="textarea"
|
||||||
|
:rows="2"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:setting:form:bodyPart')"
|
||||||
|
style="display: none"
|
||||||
|
prop="bodyPartStr"
|
||||||
|
label-width="150px"
|
||||||
|
>
|
||||||
|
<el-input clearable :maxlength="50"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
<template slot="dialog-footer">
|
||||||
|
<el-button type="primary" @click="addOrUpdateTrialStudyName">
|
||||||
|
{{ $t('common:button:confirm') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="addStudyName_model.visible = false">
|
||||||
|
{{ $t('common:button:cancel') }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</base-model>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -772,6 +944,7 @@ export default {
|
||||||
components: { SignForm, ClinicalDataForm, BaseModel, terminology },
|
components: { SignForm, ClinicalDataForm, BaseModel, terminology },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showMore: false,
|
||||||
form: {
|
form: {
|
||||||
TrialId: '',
|
TrialId: '',
|
||||||
IsNoticeSubjectCodeRule: false,
|
IsNoticeSubjectCodeRule: false,
|
||||||
|
@ -785,6 +958,9 @@ export default {
|
||||||
// ClinicalInformationTransmissionEnum: 1,
|
// ClinicalInformationTransmissionEnum: 1,
|
||||||
IsImageReplicationAcrossTrial: false,
|
IsImageReplicationAcrossTrial: false,
|
||||||
BodyPartTypes: '',
|
BodyPartTypes: '',
|
||||||
|
StudyNameTypes: '',
|
||||||
|
IsShowStudyName: null,
|
||||||
|
StudyNameList: [],
|
||||||
BodyPartTypeList: [],
|
BodyPartTypeList: [],
|
||||||
Modalitys: '',
|
Modalitys: '',
|
||||||
ModalityList: [],
|
ModalityList: [],
|
||||||
|
@ -855,6 +1031,13 @@ export default {
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
StudyNameTypes: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('trials:trialCfg:formRule:bodyPart'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
// Modalitys: [
|
// Modalitys: [
|
||||||
// { required: true, message: this.$t('trials:trialCfg:formRule:modality'), trigger: 'blur' },
|
// { required: true, message: this.$t('trials:trialCfg:formRule:modality'), trigger: 'blur' },
|
||||||
// { max: 500, message: `${this.$t('common:ruleMessage:maxLength')} 500` }
|
// { max: 500, message: `${this.$t('common:ruleMessage:maxLength')} 500` }
|
||||||
|
@ -894,19 +1077,32 @@ export default {
|
||||||
listLoading: false,
|
listLoading: false,
|
||||||
modalityListVisible: false,
|
modalityListVisible: false,
|
||||||
bodyPartListVisible: false,
|
bodyPartListVisible: false,
|
||||||
|
studyNameListVisible: false,
|
||||||
selectedList: [],
|
selectedList: [],
|
||||||
selectedBodyParts: [],
|
selectedBodyParts: [],
|
||||||
trialBodyPartList: [],
|
trialBodyPartList: [],
|
||||||
|
trialStudyNameList: [],
|
||||||
addBodyPart_model: {
|
addBodyPart_model: {
|
||||||
visible: false,
|
visible: false,
|
||||||
title: this.$t('trials:setting:button:add'),
|
title: this.$t('trials:setting:button:add'),
|
||||||
width: '500px',
|
width: '500px',
|
||||||
appendToBody: true,
|
appendToBody: true,
|
||||||
},
|
},
|
||||||
|
addStudyName_model: {
|
||||||
|
visible: false,
|
||||||
|
title: this.$t('trials:setting:button:add'),
|
||||||
|
width: '500px',
|
||||||
|
appendToBody: true,
|
||||||
|
},
|
||||||
addBodyPartForm: {
|
addBodyPartForm: {
|
||||||
bodyPartStr: null,
|
bodyPartStr: null,
|
||||||
Id: null,
|
Id: null,
|
||||||
},
|
},
|
||||||
|
addStudyNameForm: {
|
||||||
|
Name: null,
|
||||||
|
EnName: null,
|
||||||
|
IeChoose: false,
|
||||||
|
},
|
||||||
addBodyPartrules: {
|
addBodyPartrules: {
|
||||||
bodyPartStr: [
|
bodyPartStr: [
|
||||||
{
|
{
|
||||||
|
@ -932,6 +1128,31 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
addStudyNamerules: {
|
||||||
|
Name: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('trials:setting:format:notStudyName'),
|
||||||
|
trigger: ['blur', 'change'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
let flag = this.trialStudyNameList.some(
|
||||||
|
(item) => item.Name === value
|
||||||
|
)
|
||||||
|
if (flag) {
|
||||||
|
callback(
|
||||||
|
new Error(this.$t('trials:setting:format:hasStudyName'))
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
message: this.$t('trials:setting:format:hasStudyName'),
|
||||||
|
trigger: ['blur', 'change'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
errMessage: null,
|
errMessage: null,
|
||||||
|
|
||||||
renderFunc(h, option) {
|
renderFunc(h, option) {
|
||||||
|
@ -947,6 +1168,11 @@ export default {
|
||||||
// created() {
|
// created() {
|
||||||
// this.getTrialBodyPartList();
|
// this.getTrialBodyPartList();
|
||||||
// },
|
// },
|
||||||
|
computed: {
|
||||||
|
isEN() {
|
||||||
|
return this.$i18n.locale !== 'zh'
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openTerminology() {
|
openTerminology() {
|
||||||
this.terminologyVisible = true
|
this.terminologyVisible = true
|
||||||
|
@ -1003,6 +1229,30 @@ export default {
|
||||||
handleBodyPartSelectionChange(val) {
|
handleBodyPartSelectionChange(val) {
|
||||||
this.selectedBodyParts = val
|
this.selectedBodyParts = val
|
||||||
},
|
},
|
||||||
|
IsShowStudyNameChange(val) {
|
||||||
|
// if (!val) {
|
||||||
|
// if (this.form.StudyNameList && this.form.StudyNameList.length > 0) {
|
||||||
|
// this.form.StudyNameList.forEach((item) => {
|
||||||
|
// item.IsChoose = false
|
||||||
|
// })
|
||||||
|
// } else {
|
||||||
|
// this.form.StudyNameList = []
|
||||||
|
// }
|
||||||
|
// thiss.form.StudyNameTypes = null
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
handleStudyNameSelectionChange(val) {
|
||||||
|
let data = []
|
||||||
|
if (val) {
|
||||||
|
data = val.map((item) => item.Name)
|
||||||
|
}
|
||||||
|
this.trialStudyNameList.forEach((item) => {
|
||||||
|
item.IsChoose = false
|
||||||
|
if (data.includes(item.Name)) {
|
||||||
|
item.IsChoose = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 获取检查部位
|
// 获取检查部位
|
||||||
async getTrialBodyPartList(data) {
|
async getTrialBodyPartList(data) {
|
||||||
try {
|
try {
|
||||||
|
@ -1073,6 +1323,19 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async addOrUpdateTrialStudyName() {
|
||||||
|
let validate = await this.$refs.addStudyNameForm.validate()
|
||||||
|
if (!validate) return
|
||||||
|
this.addStudyNameForm.EnName = this.addStudyNameForm.Name
|
||||||
|
let data = { ...this.addStudyNameForm }
|
||||||
|
this.trialStudyNameList.push(data)
|
||||||
|
this.addStudyNameForm = {
|
||||||
|
EnName: null,
|
||||||
|
Name: null,
|
||||||
|
IsChoose: false,
|
||||||
|
}
|
||||||
|
this.addStudyName_model.visible = false
|
||||||
|
},
|
||||||
// 编辑检查部位
|
// 编辑检查部位
|
||||||
handleEditBodyPart(item) {
|
handleEditBodyPart(item) {
|
||||||
this.addBodyPartForm.bodyPartStr = item.Name
|
this.addBodyPartForm.bodyPartStr = item.Name
|
||||||
|
@ -1081,6 +1344,12 @@ export default {
|
||||||
this.addBodyPart_model.title = this.$t('trials:setting:button:edit')
|
this.addBodyPart_model.title = this.$t('trials:setting:button:edit')
|
||||||
this.addBodyPart_model.visible = true
|
this.addBodyPart_model.visible = true
|
||||||
},
|
},
|
||||||
|
handleDelStudyName(item) {
|
||||||
|
let index = this.trialStudyNameList.findIndex(
|
||||||
|
(data) => item.Name === data.Name
|
||||||
|
)
|
||||||
|
this.trialStudyNameList.splice(index, 1)
|
||||||
|
},
|
||||||
handleSetBodyPart() {
|
handleSetBodyPart() {
|
||||||
this.bodyPartListVisible = true
|
this.bodyPartListVisible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -1092,6 +1361,19 @@ export default {
|
||||||
this.toggleBodyPartSelection(a)
|
this.toggleBodyPartSelection(a)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleSetStudyName() {
|
||||||
|
this.studyNameListVisible = true
|
||||||
|
this.trialStudyNameList = []
|
||||||
|
this.form.StudyNameList.forEach((item) => {
|
||||||
|
this.trialStudyNameList.push({
|
||||||
|
...item,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.$nextTick(() => {
|
||||||
|
let select = this.trialStudyNameList.filter((item) => item.IsChoose)
|
||||||
|
this.toggleStudyNameSelection(select)
|
||||||
|
})
|
||||||
|
},
|
||||||
toggleBodyPartSelection(rows) {
|
toggleBodyPartSelection(rows) {
|
||||||
if (rows) {
|
if (rows) {
|
||||||
rows.forEach((row) => {
|
rows.forEach((row) => {
|
||||||
|
@ -1101,6 +1383,15 @@ export default {
|
||||||
this.$refs.bodyPartTable.clearSelection()
|
this.$refs.bodyPartTable.clearSelection()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
toggleStudyNameSelection(rows) {
|
||||||
|
if (rows) {
|
||||||
|
rows.forEach((row) => {
|
||||||
|
this.$refs.studyNameTable.toggleRowSelection(row)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$refs.studyNameTable.clearSelection()
|
||||||
|
}
|
||||||
|
},
|
||||||
handleConfirmBodyParts() {
|
handleConfirmBodyParts() {
|
||||||
this.form.BodyPartTypeList = Object.assign(
|
this.form.BodyPartTypeList = Object.assign(
|
||||||
[],
|
[],
|
||||||
|
@ -1112,6 +1403,14 @@ export default {
|
||||||
this.form.BodyPartTypes = bodyPartTypes.join(' | ')
|
this.form.BodyPartTypes = bodyPartTypes.join(' | ')
|
||||||
this.bodyPartListVisible = false
|
this.bodyPartListVisible = false
|
||||||
},
|
},
|
||||||
|
handleConfirmStudyName() {
|
||||||
|
var studyNameTypes = this.trialStudyNameList.filter((i) => i.IsChoose)
|
||||||
|
this.form.StudyNameTypes = this.isEN
|
||||||
|
? studyNameTypes.map((item) => item.EnName).join(', ')
|
||||||
|
: studyNameTypes.map((item) => item.Name).join(', ')
|
||||||
|
this.form.StudyNameList = this.trialStudyNameList
|
||||||
|
this.studyNameListVisible = false
|
||||||
|
},
|
||||||
// 配置信息保存
|
// 配置信息保存
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs['logicalConfigForm'].validate((valid) => {
|
this.$refs['logicalConfigForm'].validate((valid) => {
|
||||||
|
@ -1305,6 +1604,16 @@ export default {
|
||||||
NewVal: this.form.ModalityListStr,
|
NewVal: this.form.ModalityListStr,
|
||||||
OldVal: this.initialForm.ModalityListStr,
|
OldVal: this.initialForm.ModalityListStr,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: this.$t('trials:logincCfg:form:IsShowStudyName '),
|
||||||
|
NewVal: this.$fd('YesOrNo', this.form.IsShowStudyName),
|
||||||
|
OldVal: this.$fd('YesOrNo', this.initialForm.IsShowStudyName),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: this.$t('trials:logincCfg:form:StudyNameList'),
|
||||||
|
NewVal: this.form.StudyNameTypes,
|
||||||
|
OldVal: this.initialForm.StudyNameTypes,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Name: this.$t('trials:logincCfg:form:exceededDays'),
|
Name: this.$t('trials:logincCfg:form:exceededDays'),
|
||||||
NewVal: this.form.ChangeDefalutDays,
|
NewVal: this.form.ChangeDefalutDays,
|
||||||
|
@ -1355,6 +1664,16 @@ export default {
|
||||||
let BodyPartTypes = res.BodyPartTypes
|
let BodyPartTypes = res.BodyPartTypes
|
||||||
this.form.BodyPartTypes = ''
|
this.form.BodyPartTypes = ''
|
||||||
this.form.BodyPartTypeList = BodyPartTypes.split('|')
|
this.form.BodyPartTypeList = BodyPartTypes.split('|')
|
||||||
|
let StudyNameTypes = this.form.StudyNameList.filter(
|
||||||
|
(item) => item.IsChoose
|
||||||
|
)
|
||||||
|
this.form.StudyNameTypes = ''
|
||||||
|
if (StudyNameTypes && StudyNameTypes.length > 0) {
|
||||||
|
this.form.StudyNameTypes = this.isEN
|
||||||
|
? StudyNameTypes.map((item) => item.EnName).join(', ')
|
||||||
|
: StudyNameTypes.map((item) => item.Name).join(', ')
|
||||||
|
}
|
||||||
|
|
||||||
let r = await this.getTrialBodyPartList()
|
let r = await this.getTrialBodyPartList()
|
||||||
if (r) {
|
if (r) {
|
||||||
var bodyPartTypes = this.form.BodyPartTypeList.map((i) => {
|
var bodyPartTypes = this.form.BodyPartTypeList.map((i) => {
|
||||||
|
@ -1596,4 +1915,16 @@ export default {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.showMore {
|
||||||
|
cursor: pointer;
|
||||||
|
color: #409eff;
|
||||||
|
i {
|
||||||
|
transition: 0.3s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.showMore.isCheck {
|
||||||
|
i {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -139,6 +139,25 @@
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!--图像格式-->
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:processCfg:form:ImageFormatList')"
|
||||||
|
prop="ImageFormatList"
|
||||||
|
v-if="[0, 2].includes(form.CollectImagesEnum)"
|
||||||
|
>
|
||||||
|
<el-checkbox-group
|
||||||
|
v-model="form.ImageFormatList"
|
||||||
|
:disabled="form.IsTrialProcessConfirmed && !isEdit"
|
||||||
|
>
|
||||||
|
<el-checkbox
|
||||||
|
v-for="item in $d.ImageFormat"
|
||||||
|
:label="item.value"
|
||||||
|
:key="item.id"
|
||||||
|
>
|
||||||
|
{{ item.label }}
|
||||||
|
</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
<!-- 修约小数位数 -->
|
<!-- 修约小数位数 -->
|
||||||
<!-- <el-form-item
|
<!-- <el-form-item
|
||||||
:label="$t('trials:processCfg:form:digitPlaces')"
|
:label="$t('trials:processCfg:form:digitPlaces')"
|
||||||
|
@ -1186,6 +1205,7 @@ export default {
|
||||||
ClinicalDataSetNamesStr: '',
|
ClinicalDataSetNamesStr: '',
|
||||||
QCProcessEnum: null,
|
QCProcessEnum: null,
|
||||||
CollectImagesEnum: null,
|
CollectImagesEnum: null,
|
||||||
|
ImageFormatList: [],
|
||||||
IsImageConsistencyVerification: null,
|
IsImageConsistencyVerification: null,
|
||||||
ReadingMode: null,
|
ReadingMode: null,
|
||||||
// ImagePlatform: null,
|
// ImagePlatform: null,
|
||||||
|
@ -1225,6 +1245,14 @@ export default {
|
||||||
trigger: ['blur', 'change'],
|
trigger: ['blur', 'change'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
ImageFormatList: [
|
||||||
|
{
|
||||||
|
type: 'array',
|
||||||
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:select'),
|
||||||
|
trigger: ['blur', 'change'],
|
||||||
|
},
|
||||||
|
],
|
||||||
QCProcessEnum: [
|
QCProcessEnum: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -1499,6 +1527,11 @@ export default {
|
||||||
this.initialForm.CollectImagesEnum
|
this.initialForm.CollectImagesEnum
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: this.$t('trials:processCfg:form:ImageFormatList'), // 图像格式
|
||||||
|
NewVal: this.form.ImageFormatList.join(', '),
|
||||||
|
OldVal: this.initialForm.ImageFormatList.join(', '),
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// Name: this.$t('trials:processCfg:form:criterion'), // 阅片标准
|
// Name: this.$t('trials:processCfg:form:criterion'), // 阅片标准
|
||||||
// NewVal: criterions.length > 0 ? criterions.join(', ') : '',
|
// NewVal: criterions.length > 0 ? criterions.join(', ') : '',
|
||||||
|
|
|
@ -0,0 +1,413 @@
|
||||||
|
<template>
|
||||||
|
<div class="trialDocumentMenu">
|
||||||
|
<div class="menuBox" v-for="item in menu" :key="item.ArchiveTypeEnum">
|
||||||
|
<div class="top">
|
||||||
|
<i class="el-icon-folder-opened"></i>
|
||||||
|
<span>{{ $fd('ArchiveType', item.ArchiveTypeEnum) }}</span>
|
||||||
|
<i
|
||||||
|
class="el-icon-circle-plus menuAdd"
|
||||||
|
:title="$t('trials:trialDocument:menu:add')"
|
||||||
|
@click.stop="addMenu(item.ArchiveTypeEnum)"
|
||||||
|
v-if="isManage && hasAdd && !viewStatus && item.ArchiveTypeEnum !== 5"
|
||||||
|
></i>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
:class="{ menu: true, selected: Id === data.Id }"
|
||||||
|
v-for="data in item.TrialFileTypeList"
|
||||||
|
:key="data.SysFileTypeId"
|
||||||
|
@click.stop="handleSelect(data, item.ArchiveTypeEnum)"
|
||||||
|
>
|
||||||
|
<i class="el-icon-s-order" style="margin-left: 5px"></i>
|
||||||
|
<span class="menuItem">{{ isEN ? data.Name : data.NameCN }}</span>
|
||||||
|
<div
|
||||||
|
@click="NATIVE"
|
||||||
|
class="menuBtnBox"
|
||||||
|
v-if="isManage && hasEdit && !viewStatus"
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
v-if="data.IsSelfDefine"
|
||||||
|
class="el-icon-edit-outline"
|
||||||
|
:title="$t('trials:trialDocument:menu:edit')"
|
||||||
|
@click.stop="editMenu(item.ArchiveTypeEnum, data)"
|
||||||
|
/>
|
||||||
|
<i
|
||||||
|
v-if="data.IsSelfDefine"
|
||||||
|
class="el-icon-delete"
|
||||||
|
:title="$t('trials:trialDocument:menu:del')"
|
||||||
|
@click.stop="delMenu(data)"
|
||||||
|
/>
|
||||||
|
<el-switch
|
||||||
|
class="menuSwitch"
|
||||||
|
@change="(val) => changeIsEnble(val, data)"
|
||||||
|
v-model="data.IsEnable"
|
||||||
|
:active-value="true"
|
||||||
|
:inactive-value="false"
|
||||||
|
>
|
||||||
|
</el-switch>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<base-model :config="config">
|
||||||
|
<div slot="dialog-body">
|
||||||
|
<el-form
|
||||||
|
ref="menuForm"
|
||||||
|
:model="form"
|
||||||
|
label-width="100px"
|
||||||
|
size="small"
|
||||||
|
:rules="rules"
|
||||||
|
>
|
||||||
|
<div class="base-dialog-body">
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:trialDocument:form:ArchiveTypeEnum')"
|
||||||
|
prop="ArchiveTypeEnum"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="form.ArchiveTypeEnum"
|
||||||
|
disabled
|
||||||
|
placeholder=""
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in $d.ArchiveType"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:trialDocument:form:Name')"
|
||||||
|
prop="Name"
|
||||||
|
>
|
||||||
|
<el-input v-model="form.Name" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div slot="dialog-footer">
|
||||||
|
<el-button size="small" @click="canel">
|
||||||
|
{{ $t('trials:trialDocument:button:canel') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button size="small" type="primary" :loading="loading" @click="save">
|
||||||
|
{{ $t('trials:trialDocument:button:save') }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</base-model>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getTrialFileTypeData,
|
||||||
|
setAuthorizedView,
|
||||||
|
addOrUpdateTrialFileType,
|
||||||
|
deleteTrialFileType,
|
||||||
|
} from '@/api/dictionary'
|
||||||
|
import baseModel from '@/components/BaseModel'
|
||||||
|
const defaultForm = () => {
|
||||||
|
return {
|
||||||
|
ArchiveTypeEnum: null,
|
||||||
|
Name: null,
|
||||||
|
NameCN: null,
|
||||||
|
FirstFinalDate: null,
|
||||||
|
IsConfirmRecord: true,
|
||||||
|
IsEnable: true,
|
||||||
|
IsSelfDefine: true,
|
||||||
|
SubIdentificationEnum: null,
|
||||||
|
SysFileTypeId: null,
|
||||||
|
TrialId: null,
|
||||||
|
Id: null,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'trialDocumentMenu',
|
||||||
|
props: {
|
||||||
|
viewStatus: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
Id: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
SubIdentificationEnum: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
ArchiveTypeEnum: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
rowData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
menu: [],
|
||||||
|
config: {
|
||||||
|
visible: false,
|
||||||
|
showClose: true,
|
||||||
|
width: '400px',
|
||||||
|
title: '',
|
||||||
|
appendToBody: true,
|
||||||
|
status: 'add',
|
||||||
|
},
|
||||||
|
form: defaultForm(),
|
||||||
|
rules: {
|
||||||
|
Name: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
|
trigger: ['blur', 'change'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
'base-model': baseModel,
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
viewStatus: {
|
||||||
|
handler() {
|
||||||
|
this.getMenu()
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
isEN() {
|
||||||
|
return this.$i18n.locale !== 'zh'
|
||||||
|
},
|
||||||
|
isInspect() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:inspect',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
isManage() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:manage',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasAdd() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:add',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasEdit() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:edit',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取菜单
|
||||||
|
async getMenu() {
|
||||||
|
try {
|
||||||
|
let data = {
|
||||||
|
TrialId: this.$route.query.trialId,
|
||||||
|
IsEnable: this.viewStatus,
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
let res = await getTrialFileTypeData(data)
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.menu = res.Result.TrialFileTypeDataList
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.loading = false
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 修改菜单启用
|
||||||
|
async changeIsEnble(val, item) {
|
||||||
|
try {
|
||||||
|
let data = {
|
||||||
|
Id: item.Id,
|
||||||
|
IsEnable: val,
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
let res = await setAuthorizedView(data)
|
||||||
|
this.loading = false
|
||||||
|
} catch (err) {
|
||||||
|
this.loading = false
|
||||||
|
item.IsEnable = !item.IsEnable
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 选中
|
||||||
|
handleSelect(data, ArchiveTypeEnum) {
|
||||||
|
this.$emit('update:Id', data.Id)
|
||||||
|
this.$emit('update:SubIdentificationEnum', data.SubIdentificationEnum)
|
||||||
|
this.$emit('update:ArchiveTypeEnum', ArchiveTypeEnum)
|
||||||
|
this.$emit('update:rowData', data)
|
||||||
|
},
|
||||||
|
// 新增
|
||||||
|
addMenu(ArchiveTypeEnum) {
|
||||||
|
this.config.title = this.$t('trials:trialDocument:title:add')
|
||||||
|
this.form = defaultForm()
|
||||||
|
this.form.ArchiveTypeEnum = ArchiveTypeEnum
|
||||||
|
this.form.TrialId = this.$route.query.trialId
|
||||||
|
switch (ArchiveTypeEnum) {
|
||||||
|
case 1: {
|
||||||
|
this.form.SubIdentificationEnum = 0
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 2: {
|
||||||
|
this.form.SubIdentificationEnum = 1
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 3: {
|
||||||
|
this.form.SubIdentificationEnum = 2
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case 4: {
|
||||||
|
this.form.SubIdentificationEnum = 2
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.config.visible = true
|
||||||
|
},
|
||||||
|
// 修改
|
||||||
|
editMenu(ArchiveTypeEnum, item) {
|
||||||
|
this.config.title = this.$t('trials:trialDocument:title:edit')
|
||||||
|
this.form = defaultForm()
|
||||||
|
Object.keys(this.form).forEach((key) => {
|
||||||
|
this.form[key] = item[key]
|
||||||
|
})
|
||||||
|
this.form.ArchiveTypeEnum = ArchiveTypeEnum
|
||||||
|
this.config.visible = true
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
delMenu(row) {
|
||||||
|
this.$confirm(this.$t('trials:trialDocument:message:deleteMessage'), {
|
||||||
|
type: 'warning',
|
||||||
|
distinguishCancelAndClose: true,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.loading = true
|
||||||
|
deleteTrialFileType(row.Id).then((res) => {
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.getMenu()
|
||||||
|
this.$message.success(
|
||||||
|
this.$t('common:message:deletedSuccessfully')
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.loading = false
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async save() {
|
||||||
|
try {
|
||||||
|
let validate = await this.$refs.menuForm.validate()
|
||||||
|
if (!validate) return false
|
||||||
|
this.form.NameCN = this.form.Name
|
||||||
|
this.loading = true
|
||||||
|
let res = await addOrUpdateTrialFileType(this.form)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.config.visible = false
|
||||||
|
this.getMenu()
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
canel() {
|
||||||
|
this.config.visible = false
|
||||||
|
},
|
||||||
|
NATIVE(event) {
|
||||||
|
event.stopPropagation()
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.trialDocumentMenu {
|
||||||
|
padding: 0 10px;
|
||||||
|
.menuBox {
|
||||||
|
border-bottom: 1px solid rgb(238, 238, 238);
|
||||||
|
&:last-child {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.top {
|
||||||
|
color: #303133;
|
||||||
|
line-height: 48px;
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
i {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
.menuAdd {
|
||||||
|
margin: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 15px;
|
||||||
|
right: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.menu {
|
||||||
|
font-size: 14px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
padding: 0 12px 0 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
min-height: 36px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 5px;
|
||||||
|
position: relative;
|
||||||
|
i {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
.menuBtnBox {
|
||||||
|
position: absolute;
|
||||||
|
top: 7px;
|
||||||
|
right: 5px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.menuItem {
|
||||||
|
width: 70%;
|
||||||
|
white-space: nowrap; /* 文本不换行 */
|
||||||
|
overflow: hidden; /* 超出部分隐藏 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.menu:hover {
|
||||||
|
background: #f5f5f5;
|
||||||
|
}
|
||||||
|
.menu.selected {
|
||||||
|
color: #6698ff;
|
||||||
|
background: rgba(102, 152, 255, 0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.menuSwitch {
|
||||||
|
::v-deep.el-switch__core {
|
||||||
|
height: 14px;
|
||||||
|
width: 28px !important;
|
||||||
|
&::after {
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-switch.is-checked {
|
||||||
|
::v-deep.el-switch__core {
|
||||||
|
height: 14px;
|
||||||
|
width: 28px !important;
|
||||||
|
&::after {
|
||||||
|
margin-left: -12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,381 @@
|
||||||
|
<template>
|
||||||
|
<base-model :config="config">
|
||||||
|
<div slot="dialog-body">
|
||||||
|
<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-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-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-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-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-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 &&
|
||||||
|
(!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-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 === 'History'"
|
||||||
|
:label="$t('trials:trialDocument:reportDoc:form:historyFileRecord')"
|
||||||
|
>
|
||||||
|
<el-upload
|
||||||
|
class="upload-demo"
|
||||||
|
action
|
||||||
|
:before-upload="(param) => beforeUpload(param, 'History', '.zip')"
|
||||||
|
:http-request="(param) => handleUploadFile(param, 'History')"
|
||||||
|
:on-remove="() => handleRemoveFile('History')"
|
||||||
|
:limit="1"
|
||||||
|
accept=".zip"
|
||||||
|
:file-list="HistoryFile"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
:disabled="
|
||||||
|
!!form.HistoryFileRecord && !!form.HistoryFileRecord.FilePath
|
||||||
|
"
|
||||||
|
>{{ $t('common:button:upload') }}
|
||||||
|
</el-button>
|
||||||
|
<span slot="tip" class="el-upload__tip">
|
||||||
|
{{ $t('trials:trialDocument:reportDoc:rule:mustZIP') }}
|
||||||
|
</span>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div slot="dialog-footer">
|
||||||
|
<el-button size="small" @click="canel">
|
||||||
|
{{ $t('trials:trialDocument:reportDoc:button:canel') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button size="small" type="primary" :loading="loading" @click="save">
|
||||||
|
{{ $t('trials:trialDocument:reportDoc:button:save') }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</base-model>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import baseModel from '@/components/BaseModel'
|
||||||
|
import { addOrUpdateTrialFinalRecord } from '@/api/dictionary'
|
||||||
|
import { config } from 'process'
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
config: {
|
||||||
|
required: true,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
required: true,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ArchiveTypeEnum: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
rowData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
'base-model': baseModel,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
form: {
|
||||||
|
Version: null,
|
||||||
|
Name: null,
|
||||||
|
IsAuthorizedView: true,
|
||||||
|
PDFFileRecord: null,
|
||||||
|
WordFileRecord: null,
|
||||||
|
SignFileRecord: null,
|
||||||
|
HistoryFileRecord: null,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
Name: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
|
trigger: ['blur', 'change'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
Version: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
|
trigger: ['blur', 'change'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
IsAuthorizedView: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:select'),
|
||||||
|
trigger: ['blur', 'change'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
PDFFileRecord: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (
|
||||||
|
!this.form.PDFFileRecord ||
|
||||||
|
!this.form.PDFFileRecord.FilePath
|
||||||
|
) {
|
||||||
|
callback(
|
||||||
|
new Error(
|
||||||
|
this.$t(
|
||||||
|
'trials:trialDocument:reportDoc:msg:noPdfFileRecord'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// message: this.$t('common:ruleMessage:specify'),
|
||||||
|
trigger: ['blur', 'change'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
SignFileRecord: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (
|
||||||
|
!this.form.SignFileRecord ||
|
||||||
|
!this.form.SignFileRecord.FilePath
|
||||||
|
) {
|
||||||
|
callback(
|
||||||
|
new Error(
|
||||||
|
this.$t(
|
||||||
|
'trials:trialDocument:reportDoc:msg:noSignFileRecord'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// message: this.$t('common:ruleMessage:specify'),
|
||||||
|
trigger: ['blur', 'change'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
loading: false,
|
||||||
|
PDFFile: [],
|
||||||
|
WordFile: [],
|
||||||
|
SignFile: [],
|
||||||
|
HistoryFile: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
if (this.config.status === 'edit') {
|
||||||
|
Object.keys(this.form).forEach((key) => {
|
||||||
|
this.form[key] = this.data[key]
|
||||||
|
})
|
||||||
|
let arr = ['PDF', 'Word', 'Sign', 'History']
|
||||||
|
|
||||||
|
arr.forEach((key) => {
|
||||||
|
if (
|
||||||
|
this.form[`${key}FileRecord`] &&
|
||||||
|
this.form[`${key}FileRecord`].FilePath
|
||||||
|
) {
|
||||||
|
this[`${key}File`] = []
|
||||||
|
this[`${key}File`].push({
|
||||||
|
name: this.form[`${key}FileRecord`].FileName,
|
||||||
|
url: this.form[`${key}FileRecord`].FilePath,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async save() {
|
||||||
|
try {
|
||||||
|
let validate = await this.$refs.reportDocForm.validate()
|
||||||
|
if (!validate) return false
|
||||||
|
this.loading = true
|
||||||
|
this.form.TrialFileTypeId = this.rowData.Id
|
||||||
|
if (this.config.status === 'edit') {
|
||||||
|
this.form.Id = this.data.Id
|
||||||
|
}
|
||||||
|
let res = await addOrUpdateTrialFinalRecord(this.form)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.$emit('close')
|
||||||
|
this.$emit('getList')
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
canel() {
|
||||||
|
this.$emit('close')
|
||||||
|
},
|
||||||
|
handleRemoveFile(key) {
|
||||||
|
this.form[`${key}FileRecord`] = null
|
||||||
|
this[`${key}File`] = []
|
||||||
|
},
|
||||||
|
beforeUpload(param, key, accept) {
|
||||||
|
if (this[`${key}File`] && this[`${key}File`][0]) {
|
||||||
|
this.$alert(
|
||||||
|
this.$t('trials:trialDocument:reportDoc:msg:hasFile')
|
||||||
|
).catch()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let extendName = param.name
|
||||||
|
.substring(param.name.lastIndexOf('.'))
|
||||||
|
.toLocaleLowerCase()
|
||||||
|
if (accept !== extendName) {
|
||||||
|
this.$alert(
|
||||||
|
this.$t('trials:trialDocument:reportDoc:msg:typeErr')
|
||||||
|
).catch()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleUploadFile(param, key) {
|
||||||
|
let trialId = this.$route.query.trialId
|
||||||
|
let extendName = param.file.name
|
||||||
|
.substring(param.file.name.lastIndexOf('.'))
|
||||||
|
.toLocaleLowerCase()
|
||||||
|
if (!trialId)
|
||||||
|
return this.$alert(
|
||||||
|
this.$t('trials:trialDocument:reportDoc:msg:noTrialId')
|
||||||
|
).catch()
|
||||||
|
this.loading = true
|
||||||
|
var file = await this.fileToBlob(param.file)
|
||||||
|
let types = this.ArchiveTypeEnum === 1 ? 'Report' : 'Doc'
|
||||||
|
let fileNameNoType = param.file.name
|
||||||
|
.substring(0, param.file.name.lastIndexOf('.'))
|
||||||
|
.toLocaleLowerCase()
|
||||||
|
const res = await this.OSSclient.put(
|
||||||
|
`/${trialId}/Document/${types}/${fileNameNoType}${extendName}`,
|
||||||
|
file
|
||||||
|
)
|
||||||
|
this.form[`${key}FileRecord`] = {
|
||||||
|
FileName: param.file.name,
|
||||||
|
FilePath: this.$getObjectName(res.url),
|
||||||
|
FileSize: param.file.size,
|
||||||
|
FileFormat: extendName,
|
||||||
|
}
|
||||||
|
this.loading = false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -0,0 +1,838 @@
|
||||||
|
<template>
|
||||||
|
<box-content>
|
||||||
|
<div class="title">
|
||||||
|
{{ TITLE }}
|
||||||
|
</div>
|
||||||
|
<el-form :inline="true" size="mini" class="base-search-form">
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:trialDocument:reportDoc:form:firstFinalDate')"
|
||||||
|
>
|
||||||
|
<el-date-picker
|
||||||
|
:disabled="!isManage || rowBtnStatus === 'edit'"
|
||||||
|
v-model="rowData.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="rowData.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="rowData.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"
|
||||||
|
size="mini"
|
||||||
|
@click="rowBtnStatus = 'save'"
|
||||||
|
v-if="rowBtnStatus === 'edit'"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:edit') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
:loading="rowBtnLoading"
|
||||||
|
@click="saveRowData"
|
||||||
|
v-if="rowBtnStatus === 'save'"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:save') }}
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<!-- 搜索框 -->
|
||||||
|
<div class="search" style="position: relative">
|
||||||
|
<el-form :inline="true" size="mini" class="base-search-form">
|
||||||
|
<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>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:trialDocument:reportDoc:search:isAuthorizedView')"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-if="!viewStatus"
|
||||||
|
v-model="searchData.IsAuthorizedView"
|
||||||
|
style="width: 100px"
|
||||||
|
placeholder=""
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<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-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div
|
||||||
|
v-if="isManage && !viewStatus"
|
||||||
|
style="position: absolute; top: 0; right: 0"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:disabled="selectTable.length <= 0"
|
||||||
|
size="mini"
|
||||||
|
v-if="hasAccredit"
|
||||||
|
@click.stop="auth"
|
||||||
|
>
|
||||||
|
{{ $t('trials:trialDocument:reportDoc:button:accredit') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
v-if="hasAdd"
|
||||||
|
@click.stop="handleAdd"
|
||||||
|
>
|
||||||
|
{{ $t('trials:trialDocument:reportDoc:button:add') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-bottom"
|
||||||
|
size="mini"
|
||||||
|
:disabled="selectTable.length <= 0"
|
||||||
|
v-if="hasDownLoad"
|
||||||
|
@click.stop="downLoad"
|
||||||
|
>
|
||||||
|
{{ $t('trials:trialDocument:reportDoc:button:downLoad') }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</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" />
|
||||||
|
|
||||||
|
<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
|
||||||
|
sortable="custom"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div
|
||||||
|
v-if="
|
||||||
|
scope.row.PDFFileRecord && scope.row.PDFFileRecord.TrialFileTypeId
|
||||||
|
"
|
||||||
|
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')"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<i
|
||||||
|
v-else-if="isManage && !viewStatus"
|
||||||
|
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
|
||||||
|
sortable="custom"
|
||||||
|
v-if="isManage && !viewStatus"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div
|
||||||
|
v-if="
|
||||||
|
scope.row.WordFileRecord &&
|
||||||
|
scope.row.WordFileRecord.TrialFileTypeId
|
||||||
|
"
|
||||||
|
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')"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<i
|
||||||
|
v-else-if="isManage && !viewStatus"
|
||||||
|
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
|
||||||
|
sortable="custom"
|
||||||
|
v-if="isManage && !viewStatus"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div
|
||||||
|
v-if="
|
||||||
|
scope.row.SignFileRecord &&
|
||||||
|
scope.row.SignFileRecord.TrialFileTypeId
|
||||||
|
"
|
||||||
|
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')"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<i
|
||||||
|
v-else-if="isManage && !viewStatus"
|
||||||
|
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
|
||||||
|
sortable="custom"
|
||||||
|
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')"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
prop="IsAuthorizedView"
|
||||||
|
:label="$t('trials:trialDocument:reportDoc:table:isAuthorizedView')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<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
|
||||||
|
:label="$t('common:action:action')"
|
||||||
|
width="200"
|
||||||
|
fixed="right"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
icon="el-icon-view"
|
||||||
|
:title="$t('common:button:view')"
|
||||||
|
size="mini"
|
||||||
|
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')"
|
||||||
|
size="mini"
|
||||||
|
circle
|
||||||
|
@click.stop="handleEdit(scope.row)"
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
v-if="hasDownLoad && isManage && !viewStatus"
|
||||||
|
icon="el-icon-download"
|
||||||
|
:title="$t('trials:trialDocument:reportDoc:button:download')"
|
||||||
|
size="mini"
|
||||||
|
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')"
|
||||||
|
size="mini"
|
||||||
|
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"
|
||||||
|
/>
|
||||||
|
</box-content>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
addOrUpdateTrialFileType,
|
||||||
|
getTrialFinalRecordList,
|
||||||
|
deleteTrialFinalRecord,
|
||||||
|
authorizedTrialFinalRecord,
|
||||||
|
addOrUpdateTrialFinalRecord,
|
||||||
|
} from '@/api/dictionary'
|
||||||
|
import { downLoadFile } from '@/utils/stream.js'
|
||||||
|
import { deepClone } from '@/utils/index.js'
|
||||||
|
import Pagination from '@/components/Pagination'
|
||||||
|
import BoxContent from '@/components/BoxContent'
|
||||||
|
import reportDocForm from './form.vue'
|
||||||
|
const searchDataDefault = () => {
|
||||||
|
return {
|
||||||
|
IsAuthorizedView: null,
|
||||||
|
Name: null,
|
||||||
|
Version: null,
|
||||||
|
PageIndex: 1,
|
||||||
|
PageSize: 20,
|
||||||
|
Asc: false,
|
||||||
|
SortField: null,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'reportDoc',
|
||||||
|
components: { BoxContent, Pagination, reportDocForm },
|
||||||
|
props: {
|
||||||
|
viewStatus: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
ArchiveTypeEnum: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
Id: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
rowData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
rowBtnStatus: 'edit', // edit 编辑 save 保存
|
||||||
|
rowBtnLoading: false,
|
||||||
|
searchData: searchDataDefault(),
|
||||||
|
loading: false,
|
||||||
|
list: [],
|
||||||
|
total: 0,
|
||||||
|
selectTable: [],
|
||||||
|
config: {
|
||||||
|
visible: false,
|
||||||
|
showClose: true,
|
||||||
|
width: '600px',
|
||||||
|
title: '',
|
||||||
|
appendToBody: true,
|
||||||
|
status: 'add',
|
||||||
|
upload: null,
|
||||||
|
},
|
||||||
|
selectData: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 上传单个文件
|
||||||
|
upload(row, key) {
|
||||||
|
this.selectData = deepClone(row)
|
||||||
|
this.config.title = `${this.$t(
|
||||||
|
'trials:trialDocument:reportDoc:form:title:upload'
|
||||||
|
)}
|
||||||
|
-
|
||||||
|
${this.isEN ? this.rowData.Name : this.rowData.NameCN}`
|
||||||
|
this.config.status = 'edit'
|
||||||
|
this.config.upload = key
|
||||||
|
this.config.visible = true
|
||||||
|
},
|
||||||
|
// 新增
|
||||||
|
handleAdd() {
|
||||||
|
this.selectData = {}
|
||||||
|
this.config.title = `${this.$t(
|
||||||
|
'trials:trialDocument:reportDoc:form:title:add'
|
||||||
|
)}
|
||||||
|
-
|
||||||
|
${this.isEN ? this.rowData.Name : this.rowData.NameCN}`
|
||||||
|
this.config.status = 'add'
|
||||||
|
this.config.upload = null
|
||||||
|
this.config.visible = true
|
||||||
|
},
|
||||||
|
// 编辑
|
||||||
|
handleEdit(row) {
|
||||||
|
this.selectData = deepClone(row)
|
||||||
|
this.config.title = `${this.$t(
|
||||||
|
'trials:trialDocument:reportDoc:form:title:edit'
|
||||||
|
)}
|
||||||
|
-
|
||||||
|
${this.isEN ? this.rowData.Name : this.rowData.NameCN}`
|
||||||
|
this.config.status = 'edit'
|
||||||
|
this.config.upload = null
|
||||||
|
this.config.visible = true
|
||||||
|
},
|
||||||
|
// 删除文件
|
||||||
|
async delFile(row, key) {
|
||||||
|
try {
|
||||||
|
let confirm = await this.$confirm(
|
||||||
|
this.$t('trials:trialDocument:reportDoc:message:deleteFile'),
|
||||||
|
{
|
||||||
|
type: 'warning',
|
||||||
|
distinguishCancelAndClose: true,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (confirm !== 'confirm') return false
|
||||||
|
let data = deepClone(row)
|
||||||
|
data[`${key}FileRecord`] = null
|
||||||
|
this.loading = true
|
||||||
|
let res = await addOrUpdateTrialFinalRecord(data)
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.loading = false
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 下载
|
||||||
|
async downLoad(isArray = true, row, type = 'zip') {
|
||||||
|
try {
|
||||||
|
if (type === 'file') {
|
||||||
|
return await downLoadFile(
|
||||||
|
this.OSSclientConfig.basePath + row.FilePath,
|
||||||
|
row.FileName
|
||||||
|
)
|
||||||
|
}
|
||||||
|
let { files, name } = this.formatDownloadFile(isArray, row)
|
||||||
|
let res = await downLoadFile(files, name, type)
|
||||||
|
// if (res && this.downloadId) {
|
||||||
|
// this.downloadImageSuccess()
|
||||||
|
// }
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 格式化下载文件路径
|
||||||
|
formatDownloadFile(isArray = true, row) {
|
||||||
|
let files = [],
|
||||||
|
name = `${this.TITLE}_${new Date().getTime()}.zip`,
|
||||||
|
arr = ['PDF', 'Word', 'Sign', 'History']
|
||||||
|
if (!isArray) {
|
||||||
|
name = `${row.Name}_${row.Version}_${new Date().getTime()}.zip`
|
||||||
|
arr.forEach((key) => {
|
||||||
|
if (row[`${key}FileRecord`] && row[`${key}FileRecord`].FilePath) {
|
||||||
|
let obj = {
|
||||||
|
name: `${row[`${key}FileRecord`].FileName.substring(
|
||||||
|
0,
|
||||||
|
row[`${key}FileRecord`].FileName.lastIndexOf('.')
|
||||||
|
)}__${row.Version}${row[`${key}FileRecord`].FileName.substring(
|
||||||
|
row[`${key}FileRecord`].FileName.lastIndexOf('.')
|
||||||
|
).toLocaleLowerCase()}`,
|
||||||
|
url:
|
||||||
|
this.OSSclientConfig.basePath +
|
||||||
|
row[`${key}FileRecord`].FilePath,
|
||||||
|
}
|
||||||
|
files.push(obj)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.selectTable.forEach((item) => {
|
||||||
|
arr.forEach((key) => {
|
||||||
|
if (item[`${key}FileRecord`] && item[`${key}FileRecord`].FilePath) {
|
||||||
|
let obj = {
|
||||||
|
name: `${item.Name}_${item.Version}/${item[
|
||||||
|
`${key}FileRecord`
|
||||||
|
].FileName.substring(
|
||||||
|
0,
|
||||||
|
item[`${key}FileRecord`].FileName.lastIndexOf('.')
|
||||||
|
)}__${item.Version}${item[
|
||||||
|
`${key}FileRecord`
|
||||||
|
].FileName.substring(
|
||||||
|
item[`${key}FileRecord`].FileName.lastIndexOf('.')
|
||||||
|
).toLocaleLowerCase()}`,
|
||||||
|
url:
|
||||||
|
this.OSSclientConfig.basePath +
|
||||||
|
item[`${key}FileRecord`].FilePath,
|
||||||
|
}
|
||||||
|
files.push(obj)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return { files, name }
|
||||||
|
},
|
||||||
|
// 授权
|
||||||
|
async auth(isArray = true, row, IsAuthorizedView) {
|
||||||
|
try {
|
||||||
|
let data = {}
|
||||||
|
if (isArray) {
|
||||||
|
data = {
|
||||||
|
Ids: this.selectTable.map((item) => item.Id),
|
||||||
|
IsAuthorizedView: true,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
data = {
|
||||||
|
Ids: [row.Id],
|
||||||
|
IsAuthorizedView,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
let res = await authorizedTrialFinalRecord(data)
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.$t('trials:trialDocument:reportDoc:message:authSuccessfully')
|
||||||
|
if (isArray) {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.loading = false
|
||||||
|
if (!isArray) {
|
||||||
|
row.IsAuthorizedView = !row.IsAuthorizedView
|
||||||
|
}
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 删除列表数据
|
||||||
|
handleDel(row) {
|
||||||
|
this.$confirm(
|
||||||
|
this.$t('trials:trialDocument:reportDoc:message:deleteMessage'),
|
||||||
|
{
|
||||||
|
type: 'warning',
|
||||||
|
distinguishCancelAndClose: true,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
this.loading = true
|
||||||
|
deleteTrialFinalRecord(row.Id).then((res) => {
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.getMenu()
|
||||||
|
this.$message.success(
|
||||||
|
this.$t('common:message:deletedSuccessfully')
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.loading = false
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async getList() {
|
||||||
|
try {
|
||||||
|
if (!this.Id) return false
|
||||||
|
this.searchData.TrialFileTypeId = this.Id
|
||||||
|
this.searchData.TrialId = this.$route.query.trialId
|
||||||
|
this.loading = true
|
||||||
|
let res = await getTrialFinalRecordList(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)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查询
|
||||||
|
handleSearch() {
|
||||||
|
this.searchData.PageIndex = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 重置
|
||||||
|
handleReset() {
|
||||||
|
this.searchData = searchDataDefault()
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 排序
|
||||||
|
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()
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.selectTable = val
|
||||||
|
},
|
||||||
|
// 保存菜单数据
|
||||||
|
async saveRowData() {
|
||||||
|
try {
|
||||||
|
this.rowBtnLoading = true
|
||||||
|
let res = await addOrUpdateTrialFileType(this.rowData)
|
||||||
|
this.rowBtnLoading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.rowBtnStatus = 'edit'
|
||||||
|
this.$emit('getMenu')
|
||||||
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
this.rowBtnLoading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 预览
|
||||||
|
preview(row) {
|
||||||
|
if (!row.FilePath) return false
|
||||||
|
this.$preview({
|
||||||
|
path: row.FilePath || row.fullPath,
|
||||||
|
type: 'pdf',
|
||||||
|
title: row.FileName,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.config.visible = false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
Id: {
|
||||||
|
handler() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
isEN() {
|
||||||
|
return this.$i18n.locale !== 'zh'
|
||||||
|
},
|
||||||
|
isInspect() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:inspect',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
isManage() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:manage',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasAdd() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:add',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasEdit() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:edit',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasDel() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:del',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasDownLoad() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:downLoad',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
hasAccredit() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:accredit',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
TITLE() {
|
||||||
|
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)} — ${
|
||||||
|
this.isEN ? this.rowData.Name : this.rowData.NameCN
|
||||||
|
}`
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.title {
|
||||||
|
line-height: 40px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.fileName {
|
||||||
|
display: inline-block;
|
||||||
|
max-width: calc(100% - 55px);
|
||||||
|
white-space: nowrap; /* 文本不换行 */
|
||||||
|
overflow: hidden; /* 超出部分隐藏 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.fileBtnBox {
|
||||||
|
display: inline-block;
|
||||||
|
width: 50px;
|
||||||
|
i {
|
||||||
|
cursor: pointer;
|
||||||
|
color: #409eff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,133 @@
|
||||||
|
<template>
|
||||||
|
<div class="trialDocument">
|
||||||
|
<div class="left">
|
||||||
|
<div class="top" v-if="isManage">
|
||||||
|
<div class="viewCheck">
|
||||||
|
<span>{{ $t('trials:trialDocument:view') }}</span>
|
||||||
|
<el-switch
|
||||||
|
v-model="viewStatus"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#409eff"
|
||||||
|
:active-value="false"
|
||||||
|
:inactive-value="true"
|
||||||
|
:active-text="$t('trials:trialDocument:viewStatus:manage')"
|
||||||
|
:inactive-text="$t('trials:trialDocument:viewStatus:inspect')"
|
||||||
|
@change="handleChange"
|
||||||
|
>
|
||||||
|
</el-switch>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
:class="{
|
||||||
|
menuBox: true,
|
||||||
|
noTop: !isManage,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<Menu
|
||||||
|
ref="Menu"
|
||||||
|
:viewStatus="viewStatus"
|
||||||
|
:Id.sync="Id"
|
||||||
|
:SubIdentificationEnum.sync="SubIdentificationEnum"
|
||||||
|
:ArchiveTypeEnum.sync="ArchiveTypeEnum"
|
||||||
|
:rowData.sync="rowData"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="main">
|
||||||
|
<!--v-if="[0, 1].includes(SubIdentificationEnum)"-->
|
||||||
|
<report-doc
|
||||||
|
v-if="[0, 1].includes(SubIdentificationEnum)"
|
||||||
|
:viewStatus="viewStatus"
|
||||||
|
:Id="Id"
|
||||||
|
:ArchiveTypeEnum="ArchiveTypeEnum"
|
||||||
|
:rowData="rowData"
|
||||||
|
@getMenu="getMenu"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import BaseContainer from '@/components/BaseContainer'
|
||||||
|
import Menu from './components/menu.vue'
|
||||||
|
import reportDoc from './components/report_doc/index.vue'
|
||||||
|
export default {
|
||||||
|
name: 'trialDocument',
|
||||||
|
components: { BaseContainer, Menu, reportDoc },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
viewStatus: false,
|
||||||
|
Id: null,
|
||||||
|
SubIdentificationEnum: null,
|
||||||
|
ArchiveTypeEnum: null,
|
||||||
|
rowData: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
isInspect() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:inspect',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
isManage() {
|
||||||
|
return this.hasPermi([
|
||||||
|
'trials:trials-panel:trial-summary:trial-document:manage',
|
||||||
|
])
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleChange() {
|
||||||
|
this.Id = null
|
||||||
|
this.SubIdentificationEnum = null
|
||||||
|
this.ArchiveTypeEnum = null
|
||||||
|
this.rowData = {}
|
||||||
|
},
|
||||||
|
getMenu() {
|
||||||
|
this.$refs.Menu.getMenu()
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.trialDocument {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: #fff;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.left {
|
||||||
|
width: 300px;
|
||||||
|
height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-right: 1px solid #e4e7ed;
|
||||||
|
.top {
|
||||||
|
width: 100%;
|
||||||
|
max-height: 75px;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding: 0 15px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
.viewCheck {
|
||||||
|
width: 100%;
|
||||||
|
line-height: 30px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.menuBox {
|
||||||
|
width: 100%;
|
||||||
|
height: calc(100% - 80px);
|
||||||
|
overflow-y: auto;
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
display: none; /* Chrome Safari */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.noTop {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.main {
|
||||||
|
width: calc(100% - 300px);
|
||||||
|
height: 100%;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -14,7 +14,7 @@
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleBatchDelete"
|
@click="handleBatchDelete"
|
||||||
>
|
>
|
||||||
{{ $t("trials:uploadedDicoms:action:delete") }}
|
{{ $t('trials:uploadedDicoms:action:delete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 预览 -->
|
<!-- 预览 -->
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
icon="el-icon-view"
|
icon="el-icon-view"
|
||||||
@click="handlePreviewAllFiles"
|
@click="handlePreviewAllFiles"
|
||||||
>
|
>
|
||||||
{{ $t("trials:uploadedDicoms:action:preview") }}
|
{{ $t('trials:uploadedDicoms:action:preview') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -47,6 +47,12 @@
|
||||||
min-width="80"
|
min-width="80"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
|
<!-- 检查名称 -->
|
||||||
|
<el-table-column
|
||||||
|
v-if="relationInfo.IsShowStudyName"
|
||||||
|
prop="StudyName"
|
||||||
|
:label="$t('trials:audit:table:StudyName')"
|
||||||
|
/>
|
||||||
<!-- 检查类型 -->
|
<!-- 检查类型 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="ModalityForEdit"
|
prop="ModalityForEdit"
|
||||||
|
@ -90,7 +96,7 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ moment(scope.row.StudyTime).format("YYYY-MM-DD") }}
|
{{ moment(scope.row.StudyTime).format('YYYY-MM-DD') }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 上传时间 -->
|
<!-- 上传时间 -->
|
||||||
|
@ -223,7 +229,9 @@
|
||||||
v-for="bodyPart in trialBodyPartTypes"
|
v-for="bodyPart in trialBodyPartTypes"
|
||||||
:key="bodyPart"
|
:key="bodyPart"
|
||||||
:label="bodyPart"
|
:label="bodyPart"
|
||||||
>{{ $fd("Bodypart", bodyPart,'Code',BodyPart,'Name') }}</el-checkbox
|
>{{
|
||||||
|
$fd('Bodypart', bodyPart, 'Code', BodyPart, 'Name')
|
||||||
|
}}</el-checkbox
|
||||||
>
|
>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -258,7 +266,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="editStudyInfoVisible = false"
|
@click="editStudyInfoVisible = false"
|
||||||
>
|
>
|
||||||
{{ $t("common:button:cancel") }}
|
{{ $t('common:button:cancel') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
:loading="btnLoading"
|
:loading="btnLoading"
|
||||||
|
@ -266,7 +274,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleUpdateStudyInfo"
|
@click="handleUpdateStudyInfo"
|
||||||
>
|
>
|
||||||
{{ $t("common:button:save") }}
|
{{ $t('common:button:save') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -291,18 +299,18 @@ import {
|
||||||
getSubjectVisitUploadedStudyList,
|
getSubjectVisitUploadedStudyList,
|
||||||
deleteStudyList,
|
deleteStudyList,
|
||||||
updateModality,
|
updateModality,
|
||||||
} from "@/api/trials";
|
} from '@/api/trials'
|
||||||
import moment from "moment";
|
import moment from 'moment'
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from '@/utils/auth'
|
||||||
import uploadPetClinicalData from "./uploadPetClinicalData.vue";
|
import uploadPetClinicalData from './uploadPetClinicalData.vue'
|
||||||
export default {
|
export default {
|
||||||
name: "StudyInfo",
|
name: 'StudyInfo',
|
||||||
components: { uploadPetClinicalData },
|
components: { uploadPetClinicalData },
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {};
|
return {}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -310,12 +318,12 @@ export default {
|
||||||
return {
|
return {
|
||||||
editStudyInfoVisible: false,
|
editStudyInfoVisible: false,
|
||||||
studyForm: {
|
studyForm: {
|
||||||
StudyCode: "",
|
StudyCode: '',
|
||||||
IsDicomData: true,
|
IsDicomData: true,
|
||||||
Modalities: "",
|
Modalities: '',
|
||||||
BodyPartForEdit: [],
|
BodyPartForEdit: [],
|
||||||
SeriesCount: null,
|
SeriesCount: null,
|
||||||
StudyTime: "",
|
StudyTime: '',
|
||||||
},
|
},
|
||||||
deleteArr: [],
|
deleteArr: [],
|
||||||
studyLoading: false,
|
studyLoading: false,
|
||||||
|
@ -331,189 +339,187 @@ export default {
|
||||||
petVisible: false,
|
petVisible: false,
|
||||||
rowData: {},
|
rowData: {},
|
||||||
|
|
||||||
BodyPart:{}
|
BodyPart: {},
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.getStudyInfo();
|
this.getStudyInfo()
|
||||||
this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId)
|
this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 预览临床数据
|
// 预览临床数据
|
||||||
handlePreviewClinicalData(row) {
|
handlePreviewClinicalData(row) {
|
||||||
this.rowData = row;
|
this.rowData = row
|
||||||
this.petVisible = true;
|
this.petVisible = true
|
||||||
},
|
},
|
||||||
// 打开检查信息编辑框
|
// 打开检查信息编辑框
|
||||||
handleEditStudy(row) {
|
handleEditStudy(row) {
|
||||||
this.editStudyInfoVisible = true;
|
this.editStudyInfoVisible = true
|
||||||
this.studyForm = { ...row };
|
this.studyForm = { ...row }
|
||||||
var bodyPart = [];
|
var bodyPart = []
|
||||||
if (this.studyForm.BodyPartForEdit.indexOf("|") !== -1) {
|
if (this.studyForm.BodyPartForEdit.indexOf('|') !== -1) {
|
||||||
bodyPart = this.studyForm.BodyPartForEdit.split("|");
|
bodyPart = this.studyForm.BodyPartForEdit.split('|')
|
||||||
} else if (this.studyForm.BodyPartForEdit !== "") {
|
} else if (this.studyForm.BodyPartForEdit !== '') {
|
||||||
bodyPart.push(this.studyForm.BodyPartForEdit);
|
bodyPart.push(this.studyForm.BodyPartForEdit)
|
||||||
}
|
}
|
||||||
this.studyForm.BodyPartForEdit = bodyPart;
|
this.studyForm.BodyPartForEdit = bodyPart
|
||||||
},
|
},
|
||||||
// 更新拍片部位/拍片类型信息
|
// 更新拍片部位/拍片类型信息
|
||||||
handleUpdateStudyInfo() {
|
handleUpdateStudyInfo() {
|
||||||
this.$refs["studyForm"].validate((valid) => {
|
this.$refs['studyForm'].validate((valid) => {
|
||||||
if (!valid) return;
|
if (!valid) return
|
||||||
this.btnLoading = true;
|
this.btnLoading = true
|
||||||
this.studyForm.BodyPart = this.studyForm.BodyPartForEdit.join("|");
|
this.studyForm.BodyPart = this.studyForm.BodyPartForEdit.join('|')
|
||||||
this.studyForm.Modality = this.studyForm.Modalities;
|
this.studyForm.Modality = this.studyForm.Modalities
|
||||||
var params = {
|
var params = {
|
||||||
id: this.studyForm.StudyId,
|
id: this.studyForm.StudyId,
|
||||||
subjectVisitId: this.data.Id,
|
subjectVisitId: this.data.Id,
|
||||||
type: 1,
|
type: 1,
|
||||||
modality: this.studyForm.Modality,
|
modality: this.studyForm.Modality,
|
||||||
bodyPart: this.studyForm.BodyPart,
|
bodyPart: this.studyForm.BodyPart,
|
||||||
};
|
}
|
||||||
updateModality(this.data.TrialId, params)
|
updateModality(this.data.TrialId, params)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.btnLoading = false;
|
this.btnLoading = false
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.getStudyInfo();
|
this.getStudyInfo()
|
||||||
this.$message.success(
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
this.$t("common:message:savedSuccessfully")
|
this.editStudyInfoVisible = false
|
||||||
);
|
|
||||||
this.editStudyInfoVisible = false;
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.btnLoading = false;
|
this.btnLoading = false
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
getStudyInfo() {
|
getStudyInfo() {
|
||||||
this.studyLoading = true;
|
this.studyLoading = true
|
||||||
getSubjectVisitUploadedStudyList(this.data.Id)
|
getSubjectVisitUploadedStudyList(this.data.Id)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.studyList = res.Result;
|
this.studyList = res.Result
|
||||||
this.studyLoading = false;
|
this.studyLoading = false
|
||||||
this.relationInfo = res.OtherInfo;
|
this.relationInfo = res.OtherInfo
|
||||||
console.log(this.relationInfo);
|
console.log(this.relationInfo)
|
||||||
this.trialBodyPartTypes = this.relationInfo.BodyPartTypes
|
this.trialBodyPartTypes = this.relationInfo.BodyPartTypes
|
||||||
? this.relationInfo.BodyPartTypes.split("|")
|
? this.relationInfo.BodyPartTypes.split('|')
|
||||||
: [];
|
: []
|
||||||
this.trialModalitys = this.relationInfo.Modalitys
|
this.trialModalitys = this.relationInfo.Modalitys
|
||||||
? this.relationInfo.Modalitys.split("|")
|
? this.relationInfo.Modalitys.split('|')
|
||||||
: [];
|
: []
|
||||||
console.log(this.trialBodyPartTypes);
|
console.log(this.trialBodyPartTypes)
|
||||||
console.log(this.trialModalitys);
|
console.log(this.trialModalitys)
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.studyLoading = false;
|
this.studyLoading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 批量删除
|
// 批量删除
|
||||||
handleBatchDelete() {
|
handleBatchDelete() {
|
||||||
this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
|
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.studyLoading = true;
|
this.studyLoading = true
|
||||||
deleteStudyList(this.trialId, this.data.Id, this.deleteArr)
|
deleteStudyList(this.trialId, this.data.Id, this.deleteArr)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.getStudyInfo();
|
this.getStudyInfo()
|
||||||
this.$emit("getList");
|
this.$emit('getList')
|
||||||
this.$message.success(
|
this.$message.success(
|
||||||
this.$t("trials:uploadedDicoms:message:deleteSuccessfully")
|
this.$t('trials:uploadedDicoms:message:deleteSuccessfully')
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.studyLoading = true;
|
this.studyLoading = true
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
// 预览所有影像
|
// 预览所有影像
|
||||||
handlePreviewAllFiles() {
|
handlePreviewAllFiles() {
|
||||||
var tokenKey = getToken();
|
var tokenKey = getToken()
|
||||||
const routeData = this.$router.resolve({
|
const routeData = this.$router.resolve({
|
||||||
path: `/showvisitdicoms?trialId=${this.data.TrialId}&visitInfo=${this.data.VisitName}(${this.data.VisitNum})&subjectVisitId=${this.data.Id}&isFromCRCUpload=1&TokenKey=${tokenKey}`,
|
path: `/showvisitdicoms?trialId=${this.data.TrialId}&visitInfo=${this.data.VisitName}(${this.data.VisitNum})&subjectVisitId=${this.data.Id}&isFromCRCUpload=1&TokenKey=${tokenKey}`,
|
||||||
});
|
})
|
||||||
var newWindow = window.open(routeData.href, "_blank");
|
var newWindow = window.open(routeData.href, '_blank')
|
||||||
this.$emit("setOpenWindow", newWindow);
|
this.$emit('setOpenWindow', newWindow)
|
||||||
},
|
},
|
||||||
// 预览影像
|
// 预览影像
|
||||||
handleViewStudy(row) {
|
handleViewStudy(row) {
|
||||||
var token = getToken();
|
var token = getToken()
|
||||||
const routeData = this.$router.resolve({
|
const routeData = this.$router.resolve({
|
||||||
path: `/showdicom?studyId=${row.StudyId}&isFromCRCUpload=1&TokenKey=${token}&type=Study`,
|
path: `/showdicom?studyId=${row.StudyId}&isFromCRCUpload=1&TokenKey=${token}&type=Study`,
|
||||||
});
|
})
|
||||||
var newWindow = window.open(routeData.href, "_blank");
|
var newWindow = window.open(routeData.href, '_blank')
|
||||||
this.$emit("setOpenWindow", newWindow);
|
this.$emit('setOpenWindow', newWindow)
|
||||||
},
|
},
|
||||||
// 删除某个检查
|
// 删除某个检查
|
||||||
handleDeleteStudy(row) {
|
handleDeleteStudy(row) {
|
||||||
this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
|
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.studyLoading = true;
|
this.studyLoading = true
|
||||||
deleteStudyList(this.trialId, this.data.Id, [row.StudyId])
|
deleteStudyList(this.trialId, this.data.Id, [row.StudyId])
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.getStudyInfo();
|
this.getStudyInfo()
|
||||||
this.$emit("getList");
|
this.$emit('getList')
|
||||||
this.$message.success(
|
this.$message.success(
|
||||||
this.$t("trials:uploadedDicoms:message:deleteSuccessfully")
|
this.$t('trials:uploadedDicoms:message:deleteSuccessfully')
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.studyLoading = true;
|
this.studyLoading = true
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
getBodyPart(bodyPart) {
|
getBodyPart(bodyPart) {
|
||||||
if (!bodyPart) return "";
|
if (!bodyPart) return ''
|
||||||
var separator = ",";
|
var separator = ','
|
||||||
if (bodyPart.indexOf("|") > -1) {
|
if (bodyPart.indexOf('|') > -1) {
|
||||||
separator = "|";
|
separator = '|'
|
||||||
} else if (bodyPart.indexOf(",") > -1) {
|
} else if (bodyPart.indexOf(',') > -1) {
|
||||||
separator = ",";
|
separator = ','
|
||||||
} else if (bodyPart.indexOf(",") > -1) {
|
} else if (bodyPart.indexOf(',') > -1) {
|
||||||
separator = ",";
|
separator = ','
|
||||||
}
|
}
|
||||||
var arr = bodyPart.split(separator);
|
var arr = bodyPart.split(separator)
|
||||||
var newArr = arr.map(i => {
|
var newArr = arr.map((i) => {
|
||||||
return this.$fd('Bodypart', i.trim(),'Code',this.BodyPart,'Name')
|
return this.$fd('Bodypart', i.trim(), 'Code', this.BodyPart, 'Name')
|
||||||
})
|
})
|
||||||
return newArr.join(" | ");
|
return newArr.join(' | ')
|
||||||
},
|
},
|
||||||
// 获取勾选项
|
// 获取勾选项
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
this.deleteArr = [];
|
this.deleteArr = []
|
||||||
val.forEach((item) => {
|
val.forEach((item) => {
|
||||||
this.deleteArr.push(item.StudyId);
|
this.deleteArr.push(item.StudyId)
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 设置已删除行勾选状态
|
// 设置已删除行勾选状态
|
||||||
hasDeleted(row) {
|
hasDeleted(row) {
|
||||||
if (row.IsDeleted) {
|
if (row.IsDeleted) {
|
||||||
return false;
|
return false
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 设置已删除序列行样式
|
// 设置已删除序列行样式
|
||||||
tableRowClassName({ row, rowIndex }) {
|
tableRowClassName({ row, rowIndex }) {
|
||||||
if (row.IsDeleted) {
|
if (row.IsDeleted) {
|
||||||
return "delete-row";
|
return 'delete-row'
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.study-info {
|
.study-info {
|
||||||
|
|
|
@ -87,6 +87,12 @@
|
||||||
{{ scope.row.StudyCode }}
|
{{ scope.row.StudyCode }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<!-- 检查名称 -->
|
||||||
|
<el-table-column
|
||||||
|
v-if="relationInfo.IsShowStudyName"
|
||||||
|
prop="StudyName"
|
||||||
|
:label="$t('trials:audit:table:StudyName')"
|
||||||
|
/>
|
||||||
<!-- 检查类型 -->
|
<!-- 检查类型 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="ModalityForEdit"
|
prop="ModalityForEdit"
|
||||||
|
@ -694,6 +700,30 @@
|
||||||
<el-form-item :label="$t('trials:audit:table:studyId')">
|
<el-form-item :label="$t('trials:audit:table:studyId')">
|
||||||
<el-input v-model="studyForm.StudyCode" disabled />
|
<el-input v-model="studyForm.StudyCode" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- 检查名称 -->
|
||||||
|
<el-form-item
|
||||||
|
v-if="relationInfo.IsShowStudyName"
|
||||||
|
:label="$t('trials:audit:table:StudyName')"
|
||||||
|
prop="StudyName"
|
||||||
|
:rules="[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: $t('common:ruleMessage:specify'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<el-radio-group v-model="studyForm.StudyName">
|
||||||
|
<template v-for="m in relationInfo.StudyNameList">
|
||||||
|
<el-radio
|
||||||
|
v-if="m.IsChoose"
|
||||||
|
:key="m.Name"
|
||||||
|
:label="isEN ? m.EnName : m.Name"
|
||||||
|
style="margin-bottom: 15px"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
<!-- 检查类型 -->
|
<!-- 检查类型 -->
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="studyForm.IsDicomData"
|
v-if="studyForm.IsDicomData"
|
||||||
|
@ -899,6 +929,11 @@ export default {
|
||||||
isClose: false,
|
isClose: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
isEN() {
|
||||||
|
return this.$i18n.locale !== 'zh'
|
||||||
|
},
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
btnLoading() {
|
btnLoading() {
|
||||||
store.dispatch('trials/setUnLock', this.btnLoading)
|
store.dispatch('trials/setUnLock', this.btnLoading)
|
||||||
|
@ -959,6 +994,7 @@ export default {
|
||||||
type: 1,
|
type: 1,
|
||||||
modality: this.studyForm.Modality,
|
modality: this.studyForm.Modality,
|
||||||
bodyPart: this.studyForm.BodyPart,
|
bodyPart: this.studyForm.BodyPart,
|
||||||
|
StudyName: this.studyForm.StudyName,
|
||||||
}
|
}
|
||||||
updateModality(this.trialId, params)
|
updateModality(this.trialId, params)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
|
@ -29,6 +29,12 @@
|
||||||
prop="CodeView"
|
prop="CodeView"
|
||||||
:label="$t('trials:uploadNonDicoms:table:studyId')"
|
:label="$t('trials:uploadNonDicoms:table:studyId')"
|
||||||
/>
|
/>
|
||||||
|
<!-- 检查名称 -->
|
||||||
|
<el-table-column
|
||||||
|
v-if="relationInfo.IsShowStudyName"
|
||||||
|
prop="StudyName"
|
||||||
|
:label="$t('trials:uploadNonDicoms:table:StudyName')"
|
||||||
|
/>
|
||||||
<!-- 检查类型 -->
|
<!-- 检查类型 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="Modality"
|
prop="Modality"
|
||||||
|
@ -235,6 +241,30 @@
|
||||||
>
|
>
|
||||||
<el-input v-model="form.CodeView" disabled />
|
<el-input v-model="form.CodeView" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- 检查名称 -->
|
||||||
|
<el-form-item
|
||||||
|
v-if="relationInfo.IsShowStudyName"
|
||||||
|
:label="$t('trials:uploadNonDicoms:table:StudyName')"
|
||||||
|
prop="StudyName"
|
||||||
|
:rules="[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: $t('common:ruleMessage:specify'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<el-radio-group v-model="form.StudyName">
|
||||||
|
<template v-for="m in relationInfo.StudyNameList">
|
||||||
|
<el-radio
|
||||||
|
v-if="m.IsChoose"
|
||||||
|
:key="m.Name"
|
||||||
|
:label="isEN ? m.EnName : m.Name"
|
||||||
|
style="line-height: 40px"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
<!-- 检查类型 -->
|
<!-- 检查类型 -->
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('trials:uploadNonDicoms:table:modality')"
|
:label="$t('trials:uploadNonDicoms:table:modality')"
|
||||||
|
@ -343,7 +373,10 @@
|
||||||
<!-- 多文件上传 -->
|
<!-- 多文件上传 -->
|
||||||
<form id="inputForm" ref="uploadForm">
|
<form id="inputForm" ref="uploadForm">
|
||||||
<el-divider content-position="left">{{
|
<el-divider content-position="left">{{
|
||||||
$t('trials:uploadNonDicoms:label:fileType')
|
$t('trials:uploadNonDicoms:label:fileType').replace(
|
||||||
|
'xxx',
|
||||||
|
relationInfo.ImageFormatList.join('/')
|
||||||
|
)
|
||||||
}}</el-divider>
|
}}</el-divider>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="upload" style="margin-right: 10px">
|
<div class="upload" style="margin-right: 10px">
|
||||||
|
@ -602,6 +635,7 @@ export default {
|
||||||
BodyParts: [],
|
BodyParts: [],
|
||||||
Modality: '',
|
Modality: '',
|
||||||
ImageDate: '',
|
ImageDate: '',
|
||||||
|
StudyName: '',
|
||||||
},
|
},
|
||||||
pickerOption: {
|
pickerOption: {
|
||||||
disabledDate: (time) => {
|
disabledDate: (time) => {
|
||||||
|
@ -627,6 +661,7 @@ export default {
|
||||||
moment,
|
moment,
|
||||||
BodyPart: {},
|
BodyPart: {},
|
||||||
studyMonitorId: null,
|
studyMonitorId: null,
|
||||||
|
relationInfo: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
|
@ -666,12 +701,22 @@ export default {
|
||||||
store.dispatch('trials/setUnLock', false)
|
store.dispatch('trials/setUnLock', false)
|
||||||
this.OSSclient.close()
|
this.OSSclient.close()
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
isEN() {
|
||||||
|
return this.$i18n.locale !== 'zh'
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化非Dicom列表数据
|
// 初始化非Dicom列表数据
|
||||||
getNoneDicomList() {
|
getNoneDicomList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getNoneDicomStudyList(this.subjectVisitId)
|
getNoneDicomStudyList(this.subjectVisitId)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
this.relationInfo = res.OtherInfo
|
||||||
|
this.faccept = []
|
||||||
|
this.relationInfo.ImageFormatList.forEach((item) => {
|
||||||
|
this.faccept.push(`.${item}`)
|
||||||
|
})
|
||||||
this.nonDicomStudyList = res.Result.map((v) => {
|
this.nonDicomStudyList = res.Result.map((v) => {
|
||||||
if (v.VideoObjectName) {
|
if (v.VideoObjectName) {
|
||||||
v.FileCount += 1
|
v.FileCount += 1
|
||||||
|
@ -691,6 +736,7 @@ export default {
|
||||||
this.form.CodeView = ''
|
this.form.CodeView = ''
|
||||||
this.form.BodyPart = ''
|
this.form.BodyPart = ''
|
||||||
this.form.Modality = ''
|
this.form.Modality = ''
|
||||||
|
this.form.StudyName = ''
|
||||||
this.form.ImageDate = ''
|
this.form.ImageDate = ''
|
||||||
this.form.BodyParts = []
|
this.form.BodyParts = []
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
|
@ -698,11 +744,14 @@ export default {
|
||||||
// 打开比编辑弹框,并初始化数据
|
// 打开比编辑弹框,并初始化数据
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.title = this.$t('trials:uploadNonDicoms:dialogTitle:edit')
|
this.title = this.$t('trials:uploadNonDicoms:dialogTitle:edit')
|
||||||
const { CodeView, Id, BodyPart, Modality, ImageDate } = { ...row }
|
const { CodeView, Id, BodyPart, Modality, ImageDate, StudyName } = {
|
||||||
|
...row,
|
||||||
|
}
|
||||||
this.form.CodeView = CodeView
|
this.form.CodeView = CodeView
|
||||||
this.form.Id = Id
|
this.form.Id = Id
|
||||||
this.form.BodyPart = BodyPart
|
this.form.BodyPart = BodyPart
|
||||||
this.form.Modality = Modality
|
this.form.Modality = Modality
|
||||||
|
this.form.StudyName = StudyName
|
||||||
this.form.ImageDate = ImageDate
|
this.form.ImageDate = ImageDate
|
||||||
this.form.BodyParts = this.form.BodyPart.split(', ')
|
this.form.BodyParts = this.form.BodyPart.split(', ')
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
|
@ -838,7 +887,6 @@ export default {
|
||||||
// 扫描待上传文件
|
// 扫描待上传文件
|
||||||
beginScanFiles(e) {
|
beginScanFiles(e) {
|
||||||
var files = [...e.target.files]
|
var files = [...e.target.files]
|
||||||
console.log(files)
|
|
||||||
var sameFiles = []
|
var sameFiles = []
|
||||||
files.forEach((file) => {
|
files.forEach((file) => {
|
||||||
var extendName = file.name
|
var extendName = file.name
|
||||||
|
@ -909,6 +957,13 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handlePreviewImg(row) {
|
handlePreviewImg(row) {
|
||||||
|
if (!!~row.FileType.indexOf('pdf')) {
|
||||||
|
return this.$preview({
|
||||||
|
path: row.Path || row.fullPath,
|
||||||
|
type: 'pdf',
|
||||||
|
title: row.FileName,
|
||||||
|
})
|
||||||
|
}
|
||||||
// this.imgUrl = row.FullFilePath
|
// this.imgUrl = row.FullFilePath
|
||||||
// this.previewImgVisible = true
|
// this.previewImgVisible = true
|
||||||
// this.imageLoading = true
|
// this.imageLoading = true
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
icon="el-icon-view"
|
icon="el-icon-view"
|
||||||
@click="handlePreviewAllFiles"
|
@click="handlePreviewAllFiles"
|
||||||
>
|
>
|
||||||
{{ $t("trials:audit:action:preview") }}
|
{{ $t('trials:audit:action:preview') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -46,6 +46,12 @@
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<!-- <!– 检查类型 –>-->
|
<!-- <!– 检查类型 –>-->
|
||||||
|
<!-- 检查名称 -->
|
||||||
|
<el-table-column
|
||||||
|
v-if="relationInfo.IsShowStudyName"
|
||||||
|
prop="StudyName"
|
||||||
|
:label="$t('trials:audit:table:StudyName')"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="ModalityForEdit"
|
prop="ModalityForEdit"
|
||||||
:label="$t('trials:audit:table:modality')"
|
:label="$t('trials:audit:table:modality')"
|
||||||
|
@ -88,7 +94,7 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ moment(scope.row.StudyTime).format("YYYY-MM-DD") }}
|
{{ moment(scope.row.StudyTime).format('YYYY-MM-DD') }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 上传时间 -->
|
<!-- 上传时间 -->
|
||||||
|
@ -144,27 +150,24 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { getSubjectVisitUploadedStudyList, deleteStudyList } from '@/api/trials'
|
||||||
getSubjectVisitUploadedStudyList,
|
import { getToken } from '@/utils/auth'
|
||||||
deleteStudyList,
|
import uploadPetClinicalData from '@/views/trials/trials-panel/visit/crc-upload/components/uploadPetClinicalData.vue'
|
||||||
} from "@/api/trials";
|
import moment from 'moment'
|
||||||
import { getToken } from "@/utils/auth";
|
|
||||||
import uploadPetClinicalData from "@/views/trials/trials-panel/visit/crc-upload/components/uploadPetClinicalData.vue";
|
|
||||||
import moment from "moment";
|
|
||||||
export default {
|
export default {
|
||||||
name: "StudyInfo",
|
name: 'StudyInfo',
|
||||||
components: { uploadPetClinicalData },
|
components: { uploadPetClinicalData },
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {};
|
return {}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
userTypeEnumInt: zzSessionStorage.getItem("userTypeEnumInt") * 1,
|
userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1,
|
||||||
deleteArr: [],
|
deleteArr: [],
|
||||||
studyLoading: false,
|
studyLoading: false,
|
||||||
studyList: [],
|
studyList: [],
|
||||||
|
@ -175,117 +178,117 @@ export default {
|
||||||
rowData: {},
|
rowData: {},
|
||||||
relationInfo: {},
|
relationInfo: {},
|
||||||
bp: [],
|
bp: [],
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.getStudyInfo();
|
this.getStudyInfo()
|
||||||
this.bp = await this.$getBodyPart(this.$route.query.trialId);
|
this.bp = await this.$getBodyPart(this.$route.query.trialId)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 预览临床数据
|
// 预览临床数据
|
||||||
handlePreviewClinicalData(row) {
|
handlePreviewClinicalData(row) {
|
||||||
this.rowData = row;
|
this.rowData = row
|
||||||
this.petVisible = true;
|
this.petVisible = true
|
||||||
},
|
},
|
||||||
getStudyInfo() {
|
getStudyInfo() {
|
||||||
this.studyLoading = true;
|
this.studyLoading = true
|
||||||
getSubjectVisitUploadedStudyList(this.data.Id)
|
getSubjectVisitUploadedStudyList(this.data.Id)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.studyList = res.Result;
|
this.studyList = res.Result
|
||||||
this.relationInfo = res.OtherInfo;
|
this.relationInfo = res.OtherInfo
|
||||||
this.studyLoading = false;
|
this.studyLoading = false
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.studyLoading = false;
|
this.studyLoading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 批量删除
|
// 批量删除
|
||||||
handleBatchDelete() {
|
handleBatchDelete() {
|
||||||
this.$confirm(this.$t("trials:qcCheck:message:delete"), {
|
this.$confirm(this.$t('trials:qcCheck:message:delete'), {
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.studyLoading = true;
|
this.studyLoading = true
|
||||||
deleteStudyList(this.trialId, this.data.Id, this.deleteArr)
|
deleteStudyList(this.trialId, this.data.Id, this.deleteArr)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.getStudyInfo();
|
this.getStudyInfo()
|
||||||
this.$emit("getList");
|
this.$emit('getList')
|
||||||
this.$message.success(
|
this.$message.success(
|
||||||
this.$t("trials:qcCheck:message:deletedSuccessfully")
|
this.$t('trials:qcCheck:message:deletedSuccessfully')
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.studyLoading = true;
|
this.studyLoading = true
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
// 预览所有影像
|
// 预览所有影像
|
||||||
handlePreviewAllFiles() {
|
handlePreviewAllFiles() {
|
||||||
var token = getToken();
|
var token = getToken()
|
||||||
const routeData = this.$router.resolve({
|
const routeData = this.$router.resolve({
|
||||||
path: `/showvisitdicoms?trialId=${this.data.TrialId}&visitInfo=${this.data.VisitName}(${this.data.VisitNum})&subjectVisitId=${this.data.Id}&TokenKey=${token}`,
|
path: `/showvisitdicoms?trialId=${this.data.TrialId}&visitInfo=${this.data.VisitName}(${this.data.VisitNum})&subjectVisitId=${this.data.Id}&TokenKey=${token}`,
|
||||||
});
|
})
|
||||||
window.open(routeData.href, "_blank");
|
window.open(routeData.href, '_blank')
|
||||||
},
|
},
|
||||||
// 预览影像
|
// 预览影像
|
||||||
handleViewStudy(row) {
|
handleViewStudy(row) {
|
||||||
var token = getToken();
|
var token = getToken()
|
||||||
const routeData = this.$router.resolve({
|
const routeData = this.$router.resolve({
|
||||||
path: `/showdicom?studyId=${row.StudyId}&TokenKey=${token}&type=Study`,
|
path: `/showdicom?studyId=${row.StudyId}&TokenKey=${token}&type=Study`,
|
||||||
});
|
})
|
||||||
window.open(routeData.href, "_blank");
|
window.open(routeData.href, '_blank')
|
||||||
},
|
},
|
||||||
getBodyPart(bodyPart) {
|
getBodyPart(bodyPart) {
|
||||||
if (!bodyPart) return "";
|
if (!bodyPart) return ''
|
||||||
var separator = ",";
|
var separator = ','
|
||||||
if (bodyPart.indexOf("|") > -1) {
|
if (bodyPart.indexOf('|') > -1) {
|
||||||
separator = "|";
|
separator = '|'
|
||||||
} else if (bodyPart.indexOf(",") > -1) {
|
} else if (bodyPart.indexOf(',') > -1) {
|
||||||
separator = ",";
|
separator = ','
|
||||||
} else if (bodyPart.indexOf(",") > -1) {
|
} else if (bodyPart.indexOf(',') > -1) {
|
||||||
separator = ",";
|
separator = ','
|
||||||
}
|
}
|
||||||
var arr = bodyPart.split(separator);
|
var arr = bodyPart.split(separator)
|
||||||
var newArr = arr.map((i) => {
|
var newArr = arr.map((i) => {
|
||||||
return this.$fd(
|
return this.$fd(
|
||||||
"Bodypart",
|
'Bodypart',
|
||||||
i.trim(),
|
i.trim(),
|
||||||
"Code",
|
'Code',
|
||||||
{ Bodypart: this.bp },
|
{ Bodypart: this.bp },
|
||||||
"Name"
|
'Name'
|
||||||
);
|
)
|
||||||
});
|
})
|
||||||
return newArr.join(" | ");
|
return newArr.join(' | ')
|
||||||
},
|
},
|
||||||
// 获取勾选项
|
// 获取勾选项
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
this.deleteArr = [];
|
this.deleteArr = []
|
||||||
val.forEach((item) => {
|
val.forEach((item) => {
|
||||||
this.deleteArr.push(item.StudyId);
|
this.deleteArr.push(item.StudyId)
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 设置已删除行勾选状态
|
// 设置已删除行勾选状态
|
||||||
hasDeleted(row) {
|
hasDeleted(row) {
|
||||||
if (row.IsDeleted) {
|
if (row.IsDeleted) {
|
||||||
return false;
|
return false
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 设置已删除序列行样式
|
// 设置已删除序列行样式
|
||||||
tableRowClassName({ row, rowIndex }) {
|
tableRowClassName({ row, rowIndex }) {
|
||||||
if (row.IsDeleted) {
|
if (row.IsDeleted) {
|
||||||
return "delete-row";
|
return 'delete-row'
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.study-info {
|
.study-info {
|
||||||
|
|
|
@ -105,6 +105,28 @@
|
||||||
prop="StudyCode"
|
prop="StudyCode"
|
||||||
:label="$t('trials:audit:table:studyId')"
|
:label="$t('trials:audit:table:studyId')"
|
||||||
/>
|
/>
|
||||||
|
<!-- 检查名称 -->
|
||||||
|
<el-table-column
|
||||||
|
prop="StudyName"
|
||||||
|
v-if="relationInfo.IsShowStudyName"
|
||||||
|
:label="$t('trials:audit:table:StudyName')"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tooltip
|
||||||
|
class="item"
|
||||||
|
effect="dark"
|
||||||
|
:content="$t('trials:audit:message:noStudyName')"
|
||||||
|
placement="bottom"
|
||||||
|
v-if="!scope.row.StudyName"
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
class="el-icon-warning"
|
||||||
|
style="color: #f44336; font-size: 16px"
|
||||||
|
/>
|
||||||
|
</el-tooltip>
|
||||||
|
<span v-else>{{ scope.row.StudyName }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<!-- 检查类型 -->
|
<!-- 检查类型 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="ModalityForEdit"
|
prop="ModalityForEdit"
|
||||||
|
@ -133,7 +155,9 @@
|
||||||
style="color: #f44336; font-size: 16px"
|
style="color: #f44336; font-size: 16px"
|
||||||
/>
|
/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<span v-else>{{ getBodyPart(scope.row.BodyPartForEdit) }}</span>
|
<span v-else>{{
|
||||||
|
getBodyPart(scope.row.BodyPartForEdit)
|
||||||
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 序列数量 -->
|
<!-- 序列数量 -->
|
||||||
|
@ -387,6 +411,12 @@
|
||||||
prop="CodeView"
|
prop="CodeView"
|
||||||
:label="$t('trials:audit:table:nonDicomsStudyId')"
|
:label="$t('trials:audit:table:nonDicomsStudyId')"
|
||||||
/>
|
/>
|
||||||
|
<!-- 检查名称 -->
|
||||||
|
<el-table-column
|
||||||
|
prop="StudyName"
|
||||||
|
v-if="relationInfo.IsShowStudyName"
|
||||||
|
:label="$t('trials:audit:table:StudyName')"
|
||||||
|
/>
|
||||||
<!-- 检查类型 -->
|
<!-- 检查类型 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="Modality"
|
prop="Modality"
|
||||||
|
@ -886,6 +916,30 @@
|
||||||
<el-form-item :label="$t('trials:audit:table:studyId')">
|
<el-form-item :label="$t('trials:audit:table:studyId')">
|
||||||
<el-input v-model="studyForm.StudyCode" disabled />
|
<el-input v-model="studyForm.StudyCode" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- 检查名称 -->
|
||||||
|
<el-form-item
|
||||||
|
v-if="relationInfo.IsShowStudyName"
|
||||||
|
:label="$t('trials:audit:table:StudyName')"
|
||||||
|
prop="StudyName"
|
||||||
|
:rules="[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: $t('common:ruleMessage:specify'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<el-radio-group v-model="studyForm.StudyName">
|
||||||
|
<template v-for="m in relationInfo.StudyNameList">
|
||||||
|
<el-radio
|
||||||
|
v-if="m.IsChoose"
|
||||||
|
:key="m.Name"
|
||||||
|
:label="isEN ? m.EnName : m.Name"
|
||||||
|
style="line-height: 40px"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
<!-- 检查类型 -->
|
<!-- 检查类型 -->
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="studyForm.IsDicomData"
|
v-if="studyForm.IsDicomData"
|
||||||
|
@ -1034,6 +1088,30 @@
|
||||||
<el-form-item :label="$t('trials:audit:table:nonDicomsStudyId')">
|
<el-form-item :label="$t('trials:audit:table:nonDicomsStudyId')">
|
||||||
<el-input v-model="noneDicomForm.CodeView" disabled />
|
<el-input v-model="noneDicomForm.CodeView" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- 检查名称 -->
|
||||||
|
<el-form-item
|
||||||
|
v-if="relationInfo.IsShowStudyName"
|
||||||
|
:label="$t('trials:audit:table:StudyName')"
|
||||||
|
prop="StudyName"
|
||||||
|
:rules="[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: $t('common:ruleMessage:specify'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<el-radio-group v-model="noneDicomForm.StudyName">
|
||||||
|
<template v-for="m in relationInfo.StudyNameList">
|
||||||
|
<el-radio
|
||||||
|
v-if="m.IsChoose"
|
||||||
|
:key="m.Name"
|
||||||
|
:label="isEN ? m.EnName : m.Name"
|
||||||
|
style="line-height: 40px"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
<!-- 检查类型 -->
|
<!-- 检查类型 -->
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('trials:audit:table:nonDicomsModality')"
|
:label="$t('trials:audit:table:nonDicomsModality')"
|
||||||
|
@ -1343,6 +1421,11 @@ export default {
|
||||||
default: 1,
|
default: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
isEN() {
|
||||||
|
return this.$i18n.locale !== 'zh'
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeName: this.data.DicomStudyCount > 0 ? 'dicom' : 'none-dicom',
|
activeName: this.data.DicomStudyCount > 0 ? 'dicom' : 'none-dicom',
|
||||||
|
@ -1392,6 +1475,7 @@ export default {
|
||||||
BodyParts: [],
|
BodyParts: [],
|
||||||
Modality: '',
|
Modality: '',
|
||||||
ImageDate: '',
|
ImageDate: '',
|
||||||
|
StudyName: '',
|
||||||
},
|
},
|
||||||
subjectClinicalData: {},
|
subjectClinicalData: {},
|
||||||
moment,
|
moment,
|
||||||
|
@ -2091,13 +2175,33 @@ export default {
|
||||||
}
|
}
|
||||||
if (auditState === 8) {
|
if (auditState === 8) {
|
||||||
var isgo = true
|
var isgo = true
|
||||||
|
var hasStudyName = true,
|
||||||
|
hasStudyNameList = []
|
||||||
var isgoList = []
|
var isgoList = []
|
||||||
this.studyList.forEach((v) => {
|
this.studyList.forEach((v) => {
|
||||||
if (!v.BodyPartForEdit) {
|
if (!v.BodyPartForEdit) {
|
||||||
isgo = false
|
isgo = false
|
||||||
isgoList.push(v.StudyCode)
|
isgoList.push(v.StudyCode)
|
||||||
}
|
}
|
||||||
|
if (this.relationInfo.IsShowStudyName && !v.StudyName) {
|
||||||
|
hasStudyName = false
|
||||||
|
hasStudyNameList.push(v.StudyCode)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
if (!hasStudyName) {
|
||||||
|
// `请补充检查${isgoList.toString()}的检查名称!`
|
||||||
|
this.$confirm(
|
||||||
|
this.$t('trials:qcQuality:title:noStudyName').replace(
|
||||||
|
'xxx',
|
||||||
|
hasStudyNameList.join('、 ')
|
||||||
|
),
|
||||||
|
'',
|
||||||
|
{
|
||||||
|
showCancelButton: false,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
return
|
||||||
|
}
|
||||||
if (!isgo) {
|
if (!isgo) {
|
||||||
// `请补充检查${isgoList.toString()}的检查部位!`
|
// `请补充检查${isgoList.toString()}的检查部位!`
|
||||||
this.$confirm(
|
this.$confirm(
|
||||||
|
@ -2297,6 +2401,7 @@ export default {
|
||||||
type: 1,
|
type: 1,
|
||||||
modality: this.studyForm.Modality,
|
modality: this.studyForm.Modality,
|
||||||
bodyPart: this.studyForm.BodyPart,
|
bodyPart: this.studyForm.BodyPart,
|
||||||
|
StudyName: this.studyForm.StudyName,
|
||||||
}
|
}
|
||||||
updateModality(this.data.TrialId, params)
|
updateModality(this.data.TrialId, params)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
@ -2328,7 +2433,10 @@ export default {
|
||||||
|
|
||||||
// 打开非Dicom信息编辑框
|
// 打开非Dicom信息编辑框
|
||||||
handleEditNoneDicomInfo(row) {
|
handleEditNoneDicomInfo(row) {
|
||||||
const { CodeView, Id, BodyPart, Modality, ImageDate } = { ...row }
|
const { CodeView, Id, BodyPart, Modality, ImageDate, StudyName } = {
|
||||||
|
...row,
|
||||||
|
}
|
||||||
|
this.noneDicomForm.StudyName = StudyName
|
||||||
this.noneDicomForm.CodeView = CodeView
|
this.noneDicomForm.CodeView = CodeView
|
||||||
this.noneDicomForm.Id = Id
|
this.noneDicomForm.Id = Id
|
||||||
this.noneDicomForm.BodyPart = BodyPart
|
this.noneDicomForm.BodyPart = BodyPart
|
||||||
|
@ -2375,6 +2483,13 @@ export default {
|
||||||
},
|
},
|
||||||
// 预览文件
|
// 预览文件
|
||||||
previewFile(row) {
|
previewFile(row) {
|
||||||
|
if (!!~row.FileType.indexOf('pdf')) {
|
||||||
|
return this.$preview({
|
||||||
|
path: row.Path || row.fullPath,
|
||||||
|
type: 'pdf',
|
||||||
|
title: row.FileName,
|
||||||
|
})
|
||||||
|
}
|
||||||
// window.open(row.FullFilePath, '_blank')
|
// window.open(row.FullFilePath, '_blank')
|
||||||
// this.imgObj.url = row.FullFilePath
|
// this.imgObj.url = row.FullFilePath
|
||||||
// this.imgObj.loading = true
|
// this.imgObj.loading = true
|
||||||
|
|
Loading…
Reference in New Issue