Compare commits
71 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0634df6e33 | |||
| ae808679a0 | |||
| fbb23065e5 | |||
| 0d85f138a5 | |||
| f60d845725 | |||
| f848e9a9dd | |||
| 19896b85e0 | |||
| f94013103e | |||
| ccdfe9d83e | |||
| 657010202c | |||
| 9c2c6191d2 | |||
| c865608313 | |||
| 818a8add3d | |||
| 53343e37d6 | |||
| a3e17bbefe | |||
| 19bb1eccd8 | |||
| e60260f68d | |||
| 2b89163419 | |||
| 3489d34628 | |||
| 613d434af9 | |||
| 123f178673 | |||
| e8e066ab80 | |||
| 4aa5acc401 | |||
| fa4c00230f | |||
| 6ea46c076b | |||
| dbffc2787d | |||
| f98ea18205 | |||
| 00e53c4742 | |||
| 5de61dd125 | |||
| ae8767c70f | |||
| 623a7b9858 | |||
| ce2a0d9936 | |||
| 18b0ec2042 | |||
| 8d5dfd0258 | |||
| 45f83322ec | |||
| 3d7ccafa76 | |||
| f148c76a7f | |||
| 1ffd9e3863 | |||
| 3bcf097c52 | |||
| 1e4fd0083a | |||
| d504039d82 | |||
| 0c4b3e5aed | |||
| 262541ac08 | |||
| dce3719c58 | |||
| d05a4437d4 | |||
| 10f2953a94 | |||
| 7a6cded333 | |||
| c1f10036b0 | |||
| 8e01f3af87 | |||
| 386901316d | |||
| 122f333c77 | |||
| 164437ea70 | |||
| 86a8e2faeb | |||
| b5b67cc5e3 | |||
| d667bb4e79 | |||
| c7e0fab789 | |||
| 35b16876c9 | |||
| 549b028809 | |||
| 330b1cf644 | |||
| b51a8e94de | |||
| b85853aa5e | |||
| 5386dba134 | |||
| 3f63c126ff | |||
| f1b816fd85 | |||
| 43a221de00 | |||
| 642c708c74 | |||
| aa8831ce54 | |||
| d73970117d | |||
| 9d462f69f6 | |||
| d77c79acbd | |||
| 1e300b4529 |
Generated
+23
@@ -48,6 +48,7 @@
|
||||
"nprogress": "^0.2.0",
|
||||
"path-to-regexp": "^0.1.10",
|
||||
"pdfobject": "^2.3.0",
|
||||
"prismjs": "^1.30.0",
|
||||
"qrcodejs2": "^0.0.2",
|
||||
"screenfull": "^6.0.2",
|
||||
"sortablejs": "^1.15.5",
|
||||
@@ -62,6 +63,7 @@
|
||||
"vue-count-to": "^1.0.13",
|
||||
"vue-demi": "^0.14.10",
|
||||
"vue-i18n": "^8.28.2",
|
||||
"vue-prism-editor": "^1.3.0",
|
||||
"vue-puzzle-vcode": "^1.1.10",
|
||||
"vue-router": "^3.0.6",
|
||||
"vue-seamless-scroll": "^1.1.23",
|
||||
@@ -18044,6 +18046,15 @@
|
||||
"renderkid": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/prismjs": {
|
||||
"version": "1.30.0",
|
||||
"resolved": "https://registry.npmmirror.com/prismjs/-/prismjs-1.30.0.tgz",
|
||||
"integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/process": {
|
||||
"version": "0.11.10",
|
||||
"resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz",
|
||||
@@ -22997,6 +23008,18 @@
|
||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/vue-prism-editor": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/vue-prism-editor/-/vue-prism-editor-1.3.0.tgz",
|
||||
"integrity": "sha512-54RfgtMGRMNr9484zKMOZs1wyLDR6EfFylzE2QrMCD9alCvXyYYcS0vX8oUHh+6pMUu6ts59uSN9cHglpU2NRQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^2.6.11"
|
||||
}
|
||||
},
|
||||
"node_modules/vue-puzzle-vcode": {
|
||||
"version": "1.1.10",
|
||||
"resolved": "https://registry.npmmirror.com/vue-puzzle-vcode/-/vue-puzzle-vcode-1.1.10.tgz",
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
"nprogress": "^0.2.0",
|
||||
"path-to-regexp": "^0.1.10",
|
||||
"pdfobject": "^2.3.0",
|
||||
"prismjs": "^1.30.0",
|
||||
"qrcodejs2": "^0.0.2",
|
||||
"screenfull": "^6.0.2",
|
||||
"sortablejs": "^1.15.5",
|
||||
@@ -68,6 +69,7 @@
|
||||
"vue-count-to": "^1.0.13",
|
||||
"vue-demi": "^0.14.10",
|
||||
"vue-i18n": "^8.28.2",
|
||||
"vue-prism-editor": "^1.3.0",
|
||||
"vue-puzzle-vcode": "^1.1.10",
|
||||
"vue-router": "^3.0.6",
|
||||
"vue-seamless-scroll": "^1.1.23",
|
||||
|
||||
@@ -1357,3 +1357,42 @@ export function deleteAttachment(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
// 项目文档-获取历史记录列表
|
||||
export function getTrialHistoryRecordFileList(data) {
|
||||
return request({
|
||||
url: `/TrialHistoryRecordFile/getTrialHistoryRecordFileList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 项目文档-新增/修改历史记录
|
||||
export function addOrUpdateTrialHistoryRecordFile(data) {
|
||||
return request({
|
||||
url: `/TrialHistoryRecordFile/addOrUpdateTrialHistoryRecordFile`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 项目文档-批量新增历史记录
|
||||
export function batchAddTrialHistoryRecordFile(data) {
|
||||
return request({
|
||||
url: `/TrialHistoryRecordFile/batchAddTrialHistoryRecordFile`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 项目文档-删除历史记录
|
||||
export function deleteTrialHistoryRecordFile(id) {
|
||||
return request({
|
||||
url: `/TrialHistoryRecordFile/deleteTrialHistoryRecordFile/${id}`,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
// 邮件管理-批量修改邮件
|
||||
export function batchUpdateEmail(data) {
|
||||
return request({
|
||||
url: `/EmailNoticeConfig/batchUpdateEmail`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -45,10 +45,19 @@ export function changeFrontAuditSort(param) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getModuleTypeDescriptionList(param) {
|
||||
export function getModuleTypeDescriptionList(params) {
|
||||
return request({
|
||||
url: `${param === '' ? '/FrontAuditConfig/getModuleTypeDescriptionList' : '/FrontAuditConfig/getModuleTypeDescriptionList?moduleTypeId=' + param}`,
|
||||
method: 'get'
|
||||
url: `/FrontAuditConfig/getModuleTypeDescriptionList`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function getModuleTypeList(data) {
|
||||
return request({
|
||||
url: `/FrontAuditConfig/getModuleTypeList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -4123,4 +4123,78 @@ export function addFolder(data) {
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 配置-项目文档发布
|
||||
export function publishTrialDocument(data) {
|
||||
return request({
|
||||
url: `/TrialDocument/publishTrialDocument`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 配置-获取项目文档附件列表
|
||||
export function getTrialDocumentAttachmentList(data) {
|
||||
return request({
|
||||
url: `/TrialDocument/getTrialDocumentAttachmentList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 配置-新增或修改项目文档附件
|
||||
export function addOrUpdateTrialDocumentAttachment(data) {
|
||||
return request({
|
||||
url: `/TrialDocument/addOrUpdateTrialDocumentAttachment`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 配置-删除项目文档附件
|
||||
export function deleteTrialDocumentAttachment(data) {
|
||||
return request({
|
||||
url: `/TrialDocument/deleteTrialDocumentAttachment/${data}`,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 配置-获取稽查管理列表
|
||||
export function getTrialShowInspection(data) {
|
||||
return request({
|
||||
url: `/Inspection/getTrialShowInspection`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 配置-设置稽查管理配置
|
||||
export function setTrialShowInspection(data) {
|
||||
return request({
|
||||
url: `/Inspection/setTrialShowInspection`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 影像汇总-获取列表
|
||||
export function getTrialVisitImageStatList(data) {
|
||||
return request({
|
||||
url: `/DownloadAndUpload/getTrialVisitImageStatList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 影像汇总-获取统计
|
||||
export function getTrialVisitImageStatInfo(params) {
|
||||
return request({
|
||||
url: `/DownloadAndUpload/getTrialVisitImageStatInfo`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 影像汇总-影像下载
|
||||
export function getExportSubjectVisitImageList(data) {
|
||||
return request({
|
||||
url: `/DownloadAndUpload/getExportSubjectVisitImageList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -459,9 +459,9 @@ export function setMedicalReviewInvalid(params) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getTrialCriterionList(trialId) {
|
||||
export function getTrialCriterionList(trialId, isRandom = false) {
|
||||
return request({
|
||||
url: `/VisitTask/getTrialCriterionList?TrialId=${trialId}`,
|
||||
url: `/VisitTask/getTrialCriterionList?TrialId=${trialId}&isRandom=${isRandom}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -487,4 +487,4 @@ export function setRandomTaskOrder(data) {
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -678,7 +678,7 @@ export default {
|
||||
cornerstoneTools.getToolState(
|
||||
this.canvas,
|
||||
'playClip'
|
||||
).data[0].loop = false
|
||||
).data[0].loop = true
|
||||
},
|
||||
setFps(fps) {
|
||||
this.dicomInfo.fps = fps
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
<!-- v-else-if="fileType.indexOf('pdf') !== -1"-->
|
||||
<!-- :src="`/static/pdfjs/web/viewer.html?file=${filePath}`">-->
|
||||
<!-- </pdf>-->
|
||||
<video :src="`${OSSclientConfig.basePath}${filePath}`" style="width: 100%;height: 99%;" autoplay controls
|
||||
controlsList="nodownload" v-else-if="fileType.indexOf('mp4') !== -1"></video>
|
||||
<iframe v-else
|
||||
:src="`/static/onlyOffice/viewer.html?url=${OSSclientConfig.basePath}${filePath}?onlyOffice_url=${onlyOffice_url}&type=${fileType}&title=${title}&documentType=${documentType}&userName=${currentUser}`"
|
||||
width="100%" height="100%" frameborder="0" crossorigin="anonymous" />
|
||||
@@ -51,7 +53,6 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
documentType() {
|
||||
console.log(DOCUMENTTYPE[`.${this.fileType}`], 'documentType')
|
||||
return DOCUMENTTYPE[`.${this.fileType}`]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import Vue from "vue";
|
||||
import Video from "./index.vue";
|
||||
|
||||
const PreviewConstructor = Vue.extend(Video);
|
||||
|
||||
const video = options => {
|
||||
const { path, type, title } = options;
|
||||
if (!path) throw `path is requred.but ${path}`
|
||||
const id = `OnlyOffice_${new Date().getTime()}`;
|
||||
const instance = new PreviewConstructor();
|
||||
instance.id = id;
|
||||
instance.vm = instance.$mount();
|
||||
if (instance.vm.visible) return;
|
||||
document.body.appendChild(instance.vm.$el);
|
||||
instance.vm.open(path, type, title);
|
||||
instance.vm.$on("closed", () => {
|
||||
instance.vm.docEditor = null
|
||||
document.body.removeChild(instance.vm.$el);
|
||||
instance.vm.$destroy();
|
||||
});
|
||||
return instance.vm;
|
||||
}
|
||||
export default video;
|
||||
@@ -0,0 +1,7 @@
|
||||
import Video from "./index.vue";
|
||||
import video from "./fun";
|
||||
|
||||
export default Vue => {
|
||||
Vue.component(Video.name, Video);
|
||||
Vue.prototype.$video = video;
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<el-dialog v-if="visible" :visible.sync="visible" :title="title" :fullscreen="true" append-to-body
|
||||
custom-class="base-dialog-wrapper" @close="handleClose">
|
||||
<div class="base-modal-body" style="border: 2px solid #ccc; padding: 10px">
|
||||
<video :src="path" style="width: 100%;height: 99%;" autoplay controls controlsList="nodownload"></video>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "Video",
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
path: null,
|
||||
type: null,
|
||||
title: null,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
open(path, type, title) {
|
||||
this.path = this.OSSclientConfig.basePath + path;
|
||||
this.title = title;
|
||||
this.visible = true;
|
||||
},
|
||||
handleClose() {
|
||||
this.$emit("closed");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
#placeholder {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -1,19 +1,39 @@
|
||||
<template>
|
||||
<el-dialog :visible.sync="visible" :fullscreen="true" :close-on-click-modal="false" :before-close="beforeClose"
|
||||
:append-to-body="true" v-loading="btnLoading" class="downloadDicomAndNonedicom">
|
||||
<el-dialog
|
||||
:visible.sync="visible"
|
||||
:fullscreen="true"
|
||||
:close-on-click-modal="false"
|
||||
:before-close="beforeClose"
|
||||
:append-to-body="true"
|
||||
v-loading="btnLoading"
|
||||
class="downloadDicomAndNonedicom"
|
||||
>
|
||||
<span slot="title">{{ title }}</span>
|
||||
<div class="top">
|
||||
<span>{{ $t('download:top:title') }}</span>
|
||||
<div class="btnBox">
|
||||
<el-button type="primary" size="mini" v-if="hasDicom" @click.stop="getIRReadingDownloadStudyInfo('dicom')">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasDicom"
|
||||
@click.stop="getIRReadingDownloadStudyInfo('dicom')"
|
||||
>
|
||||
{{ $t('download:button:downloadDicom') }}
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini" v-if="hasNonedicom"
|
||||
@click.stop="getIRReadingDownloadStudyInfo('noneDicom')">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasNonedicom"
|
||||
@click.stop="getIRReadingDownloadStudyInfo('noneDicom')"
|
||||
>
|
||||
{{ $t('download:button:downloadNonedicom') }}
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini" v-if="hasDicom || hasNonedicom"
|
||||
@click.stop="getIRReadingDownloadStudyInfo('all')">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasDicom || hasNonedicom"
|
||||
@click.stop="getIRReadingDownloadStudyInfo('all')"
|
||||
>
|
||||
{{ $t('download:button:downloadAll') }}
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -23,9 +43,16 @@
|
||||
<div v-html="$t('download:tip:message')"></div>
|
||||
</div>
|
||||
<!--上传列表@selection-change="handleSelectionChange"-->
|
||||
<el-table ref="dicomFilesTable" v-adaptive="{ bottomOffset: 85 }" height="100" :data="list" :loading="loading"
|
||||
class="dicomFiles-table" @sort-change="handleSortByColumn"
|
||||
:default-sort="{ prop: 'TaskBlindName', order: 'descending' }">
|
||||
<el-table
|
||||
ref="dicomFilesTable"
|
||||
v-adaptive="{ bottomOffset: 85 }"
|
||||
height="100"
|
||||
:data="list"
|
||||
:loading="loading"
|
||||
class="dicomFiles-table"
|
||||
@sort-change="handleSortByColumn"
|
||||
:default-sort="{ prop: 'TaskBlindName', order: 'descending' }"
|
||||
>
|
||||
<!-- <el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
@@ -33,28 +60,50 @@
|
||||
/> -->
|
||||
<el-table-column type="index" width="40" />
|
||||
<!--受试者-->
|
||||
<el-table-column :label="$t('download:table:subjectCode')" min-width="130" prop="SubjectCode"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column
|
||||
:label="$t('download:table:subjectCode')"
|
||||
min-width="130"
|
||||
prop="SubjectCode"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!--任务名称-->
|
||||
<el-table-column :label="$t('download:table:taskName')" min-width="130" show-overflow-tooltip prop="TaskBlindName"
|
||||
sortable="custom" />
|
||||
<el-table-column
|
||||
:label="$t('download:table:taskName')"
|
||||
min-width="130"
|
||||
show-overflow-tooltip
|
||||
prop="TaskBlindName"
|
||||
sortable="custom"
|
||||
/>
|
||||
<!--检查类型-->
|
||||
<el-table-column :label="$t('download:table:studyType')" min-width="130" show-overflow-tooltip prop="IsDicom"
|
||||
sortable="custom">
|
||||
<el-table-column
|
||||
:label="$t('download:table:studyType')"
|
||||
min-width="130"
|
||||
show-overflow-tooltip
|
||||
prop="IsDicom"
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ $fd('IsDicom', scope.row.IsDicom) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('download:table:orginalStudyListNum')" min-width="150" show-overflow-tooltip>
|
||||
<el-table-column
|
||||
:label="$t('download:table:orginalStudyListNum')"
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="
|
||||
(scope.row.IsDicom &&
|
||||
scope.row.DicomStudyList &&
|
||||
scope.row.DicomStudyList.length >= 1) ||
|
||||
(!scope.row.IsDicom &&
|
||||
scope.row.NoneDicomStudyList &&
|
||||
scope.row.NoneDicomStudyList.length >= 1)
|
||||
" type="text" @click="handleOpenDialog(scope.row)">
|
||||
<el-button
|
||||
v-if="
|
||||
(scope.row.IsDicom &&
|
||||
scope.row.DicomStudyList &&
|
||||
scope.row.DicomStudyList.length >= 1) ||
|
||||
(!scope.row.IsDicom &&
|
||||
scope.row.NoneDicomStudyList &&
|
||||
scope.row.NoneDicomStudyList.length >= 1)
|
||||
"
|
||||
type="text"
|
||||
@click="handleOpenDialog(scope.row)"
|
||||
>
|
||||
<span>{{
|
||||
scope.row.IsDicom
|
||||
? scope.row.DicomStudyList.length
|
||||
@@ -64,19 +113,37 @@
|
||||
<span v-else>0</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('common:action:action')" fixed="right" width="150">
|
||||
<el-table-column
|
||||
:label="$t('common:action:action')"
|
||||
fixed="right"
|
||||
width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!--预览--->
|
||||
<el-button circle icon="el-icon-view" :title="$t('download:button:preview')"
|
||||
@click.stop="preview(scope.row)" />
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-view"
|
||||
:title="$t('download:button:preview')"
|
||||
@click.stop="preview(scope.row)"
|
||||
/>
|
||||
<!--下载--->
|
||||
<el-button circle icon="el-icon-download" :title="$t('download:button:download')"
|
||||
@click.stop="getIRReadingDownloadStudyInfo('one', scope.row)" />
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-download"
|
||||
:title="$t('download:button:download')"
|
||||
@click.stop="getIRReadingDownloadStudyInfo('one', scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<study-view v-if="model_cfg.visible" :model_cfg="model_cfg" :modelList="modelList" :bodyPart="bodyPart"
|
||||
:IsDicom="IsDicom" :visitTaskId="modelTaskId" />
|
||||
<study-view
|
||||
v-if="model_cfg.visible"
|
||||
:model_cfg="model_cfg"
|
||||
:modelList="modelList"
|
||||
:bodyPart="bodyPart"
|
||||
:IsDicom="IsDicom"
|
||||
:visitTaskId="modelTaskId"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
@@ -291,8 +358,7 @@ export default {
|
||||
name = `${list[0].SubjectCode}_${list[0].TaskBlindName}.zip`
|
||||
}
|
||||
if (this.IsReadingTaskViewInOrder === 0) {
|
||||
// name = `${list[0].TaskBlindName}.zip`
|
||||
name = `${list[0].SubjectCode}_${list[0].TaskBlindName}.zip`
|
||||
name = `${list[0].TaskBlindName}.zip`
|
||||
}
|
||||
list.forEach((data) => {
|
||||
if (data.StudyList && data.StudyList.length > 0) {
|
||||
@@ -304,9 +370,11 @@ export default {
|
||||
series.InstancePathList.forEach((instance) => {
|
||||
let fileName = instance.Path.split('/').pop()
|
||||
let obj = {
|
||||
name: `${data.SubjectCode}/${data.TaskBlindName
|
||||
}/${this.$fd('IsDicom', true)}/${study.StudyCode
|
||||
}/${fileName}`,
|
||||
name: `${data.SubjectCode}/${
|
||||
data.TaskBlindName
|
||||
}/${this.$fd('IsDicom', true)}/${
|
||||
study.StudyCode
|
||||
}/${fileName}`,
|
||||
url: this.OSSclientConfig.basePath + instance.Path,
|
||||
}
|
||||
if (this.IsReadingTaskViewInOrder === 0) {
|
||||
@@ -432,12 +500,10 @@ export default {
|
||||
justify-content: space-between;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.tip {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-top: 5px;
|
||||
|
||||
i {
|
||||
margin: 3px 5px 0 0;
|
||||
}
|
||||
|
||||
@@ -936,19 +936,19 @@ export default {
|
||||
) {
|
||||
++instanceIndex
|
||||
}
|
||||
// if (instanceIndex >= fileList.length) {
|
||||
// fileList.push({
|
||||
// instanceUid: instanceUid,
|
||||
// file: file,
|
||||
// })
|
||||
// }
|
||||
// scope.uploadQueues[studyIndex].dicomInfo.fileCount = fileList.length
|
||||
// scope.uploadQueues[studyIndex].dicomInfo.fileSize = fileList.reduce(
|
||||
// (prev, next) => {
|
||||
// return prev + next.file.size
|
||||
// },
|
||||
// 0
|
||||
// )
|
||||
if (instanceIndex >= fileList.length) {
|
||||
fileList.push({
|
||||
instanceUid: instanceUid,
|
||||
file: file,
|
||||
})
|
||||
}
|
||||
scope.uploadQueues[studyIndex].dicomInfo.fileCount = fileList.length
|
||||
scope.uploadQueues[studyIndex].dicomInfo.fileSize = fileList.reduce(
|
||||
(prev, next) => {
|
||||
return prev + next.file.size
|
||||
},
|
||||
0
|
||||
)
|
||||
|
||||
var seriesUid = data.string('x0020000e')
|
||||
var seriesList = scope.uploadQueues[studyIndex].seriesList
|
||||
@@ -1046,19 +1046,6 @@ export default {
|
||||
}
|
||||
instanceList.push(instanceItem)
|
||||
}
|
||||
if (instanceIndex >= fileList.length) {
|
||||
fileList.push({
|
||||
instanceUid: instanceUid,
|
||||
file: file,
|
||||
})
|
||||
}
|
||||
scope.uploadQueues[studyIndex].dicomInfo.fileCount = fileList.length
|
||||
scope.uploadQueues[studyIndex].dicomInfo.fileSize = fileList.reduce(
|
||||
(prev, next) => {
|
||||
return prev + next.file.size
|
||||
},
|
||||
0
|
||||
)
|
||||
resolve()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
|
||||
+4
-2
@@ -56,6 +56,8 @@ import Preview from '@/components/Preview/index'
|
||||
Vue.use(Preview)
|
||||
import Onlyoffice from '@/components/Preview_onlyoffice/index'
|
||||
Vue.use(Onlyoffice)
|
||||
import Video from '@/components/Preview_video/index'
|
||||
Vue.use(Video)
|
||||
import MFA from '@/components/MFA/index'
|
||||
Vue.use(MFA)
|
||||
import FB from '@/components/feedBack/index'
|
||||
@@ -311,9 +313,9 @@ async function VueInit() {
|
||||
})
|
||||
}
|
||||
let CompanyInfo = JSON.parse(localStorage.getItem('CompanyInfo'))
|
||||
if(CompanyInfo&&CompanyInfo.SystemShortName){
|
||||
if (CompanyInfo && CompanyInfo.SystemShortName) {
|
||||
let test = new RegExp('IRC', 'ig')
|
||||
text = text.replace(test, CompanyInfo.SystemShortName)
|
||||
text = text.replace(test, CompanyInfo.SystemShortName)
|
||||
}
|
||||
// return i18n.t(key)
|
||||
return text;
|
||||
|
||||
@@ -50,6 +50,8 @@ const getters = {
|
||||
IsFirstSysDocNeedSign: state => state.user.IsFirstSysDocNeedSign,
|
||||
TrialStatusStr: state => state.user.TrialStatusStr,
|
||||
lastViewportTaskId: state => state.noneDicomReview.lastViewportTaskId,
|
||||
currentTaskState: state => state.noneDicomReview.currentTaskState
|
||||
currentTaskState: state => state.noneDicomReview.currentTaskState,
|
||||
operateInfo: state => state.dicom3d.operateInfo,
|
||||
deleteAnnotationIds: state => state.dicom3d.deleteAnnotationIds
|
||||
}
|
||||
export default getters
|
||||
|
||||
+3
-1
@@ -13,6 +13,7 @@ import financials from './modules/financials'
|
||||
import reading from './modules/reading'
|
||||
import lang from './modules/lang'
|
||||
import noneDicomReview from './modules/noneDicomReview'
|
||||
import dicom3d from './modules/dicom3d'
|
||||
Vue.use(Vuex)
|
||||
|
||||
const store = new Vuex.Store({
|
||||
@@ -28,7 +29,8 @@ const store = new Vuex.Store({
|
||||
financials,
|
||||
reading,
|
||||
lang,
|
||||
noneDicomReview
|
||||
noneDicomReview,
|
||||
dicom3d
|
||||
},
|
||||
getters
|
||||
})
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
const getDefaultState = () => {
|
||||
return {
|
||||
operateInfo: [],
|
||||
deleteAnnotationIds: []
|
||||
}
|
||||
}
|
||||
const state = getDefaultState
|
||||
|
||||
const mutations = {
|
||||
|
||||
}
|
||||
|
||||
const actions = {
|
||||
setOperateInfo({ state }, arr) {
|
||||
state.operateInfo = arr
|
||||
},
|
||||
setDeleteAnnotationIds({ state }, arr) {
|
||||
state.deleteAnnotationIds = arr
|
||||
},
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
mutations,
|
||||
actions
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<el-form-item :label="$t('dictionary:signature:form:File')">
|
||||
<div class="upload-container">
|
||||
<el-upload class="upload-demo" action accept=".pdf" :before-upload="beforeUpload"
|
||||
<el-upload class="upload-demo" action accept=".pdf,.mp4" :before-upload="beforeUpload"
|
||||
:http-request="handleUploadFile" :on-preview="handlePreview" :on-remove="handleRemoveFile"
|
||||
:show-file-list="true" :file-list="fileList" :limit="1" :on-exceed="handleExceed"
|
||||
:disabled="form.Type === ''">
|
||||
@@ -229,7 +229,7 @@ export default {
|
||||
this.$message.warning(this.$t('upload:rule:maxFile1'))
|
||||
},
|
||||
checkFileSuffix(fileName) {
|
||||
var typeArr = ['pdf']
|
||||
var typeArr = ['pdf', 'mp4']
|
||||
var extendName = fileName
|
||||
.substring(fileName.lastIndexOf('.') + 1)
|
||||
.toLocaleLowerCase()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
:http-request="handleUploadFile" :on-preview="handlePreview" :on-remove="handleRemoveFile"
|
||||
:show-file-list="true" :file-list="fileList" :limit="1" :on-exceed="handleExceed">
|
||||
<el-button size="small" type="primary" :loading="btnLoading">{{ $t('common:button:check')
|
||||
}}</el-button>
|
||||
}}</el-button>
|
||||
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">
|
||||
({{ $t('trials:signature:label:type').replace("xxx", this.accept.join(", ")) }})
|
||||
</span>
|
||||
@@ -82,7 +82,8 @@ export default {
|
||||
'.doc',
|
||||
'.docx',
|
||||
'.xls',
|
||||
'.xlsx']
|
||||
'.xlsx',
|
||||
'.mp4']
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -172,18 +173,7 @@ export default {
|
||||
this.$message.warning(this.$t('upload:rule:maxFile1'))
|
||||
},
|
||||
checkFileSuffix(fileName) {
|
||||
var typeArr = [
|
||||
'jpg',
|
||||
'jpeg',
|
||||
'png',
|
||||
'pdf',
|
||||
'ppt',
|
||||
'pptx',
|
||||
'doc',
|
||||
'docx',
|
||||
'xls',
|
||||
'xlsx',
|
||||
]
|
||||
var typeArr = this.accept.map(item => item.split('.')[1])
|
||||
var extendName = fileName
|
||||
.substring(fileName.lastIndexOf('.') + 1)
|
||||
.toLocaleLowerCase()
|
||||
|
||||
@@ -46,16 +46,16 @@
|
||||
<!-- 新增/编辑附件 -->
|
||||
<el-dialog :visible.sync="visible" :close-on-click-modal="false" :append-to-body="true" :title="title"
|
||||
width="800px" custom-class="base-dialog-wrapper">
|
||||
<attachmentForm v-if="visible" :data="rowData" :SystemDocumentId="SystemDocumentId"
|
||||
<attachmentForm v-if="visible" :data="rowDATA" :SystemDocumentId="SystemDocumentId"
|
||||
@closeDialog="closeDialog" @getList="getAllList" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
</base-model>
|
||||
<viewer ref="picture_perview2" style="margin: 0 10px"
|
||||
v-if="rowData.FileFormat && ['png', 'jpg', 'jpeg'].includes(rowData.FileFormat.toLowerCase())"
|
||||
:images="[`${OSSclientConfig.basePath}${rowData.FilePath}`]" :options="viewerOptions">
|
||||
v-if="rowDATA.FileFormat && ['png', 'jpg', 'jpeg'].includes(rowDATA.FileFormat.toLowerCase())"
|
||||
:images="[`${OSSclientConfig.basePath}${rowDATA.FilePath}`]" :options="viewerOptions">
|
||||
|
||||
<img v-show="false" :src="`${OSSclientConfig.basePath}${rowData.FilePath}`" alt="Image" />
|
||||
<img v-show="false" :src="`${OSSclientConfig.basePath}${rowDATA.FilePath}`" alt="Image" />
|
||||
</viewer>
|
||||
<!-- <attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible"
|
||||
v-if="perview_visible" /> -->
|
||||
@@ -113,7 +113,7 @@ export default {
|
||||
visible: false,
|
||||
title: null,
|
||||
list: [],
|
||||
rowData: {},
|
||||
rowDATA: {},
|
||||
loading: false,
|
||||
viewerOptions: {
|
||||
toolbar: {
|
||||
@@ -167,7 +167,7 @@ export default {
|
||||
if (!row.Id) {
|
||||
this.title = this.$t('dictionary:signature:attachmentForm:title:add')
|
||||
}
|
||||
this.rowData = Object.assign({}, row)
|
||||
this.rowDATA = Object.assign({}, row)
|
||||
this.visible = true
|
||||
},
|
||||
async getList() {
|
||||
@@ -207,7 +207,7 @@ export default {
|
||||
},
|
||||
preview(data) {
|
||||
// return this.perview_visible = true
|
||||
this.rowData = Object.assign({}, data)
|
||||
this.rowDATA = Object.assign({}, data)
|
||||
if (['.ppt',
|
||||
'.pptx',
|
||||
'.doc',
|
||||
@@ -234,6 +234,13 @@ export default {
|
||||
title: data.Name,
|
||||
})
|
||||
}
|
||||
if (['.mp4'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$video({
|
||||
path: data.Path || data.FilePath,
|
||||
type: 'mp4',
|
||||
title: data.Name,
|
||||
})
|
||||
}
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
|
||||
@@ -73,6 +73,7 @@ import xlsx from '@/assets/file_icon/xlsx.png'
|
||||
import PreviewFile from '@/components/PreviewFile'
|
||||
import imageViewer from './image-viewer'
|
||||
import { getSystemDocumentAttachmentList } from '@/api/dictionary'
|
||||
import { getTrialDocumentAttachmentList } from '@/api/trials'
|
||||
const defaultSearchData = () => {
|
||||
return {
|
||||
PageIndex: 1,
|
||||
@@ -100,6 +101,10 @@ export default {
|
||||
isView: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isTrial: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -140,11 +145,20 @@ export default {
|
||||
try {
|
||||
if (!this.SystemDocumentId) return false
|
||||
this.loading = true
|
||||
this.searchData.SystemDocumentId = this.SystemDocumentId
|
||||
if (!this.isTrial) {
|
||||
this.searchData.SystemDocumentId = this.SystemDocumentId
|
||||
} else {
|
||||
this.searchData.TrialDocumentId = this.SystemDocumentId
|
||||
}
|
||||
if (this.isView) {
|
||||
this.searchData.OffLine = false
|
||||
}
|
||||
let res = await getSystemDocumentAttachmentList(this.searchData)
|
||||
let res = null
|
||||
if (!this.isTrial) {
|
||||
res = await getSystemDocumentAttachmentList(this.searchData)
|
||||
} else {
|
||||
res = await getTrialDocumentAttachmentList(this.searchData)
|
||||
}
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.list = res.Result.CurrentPageData
|
||||
|
||||
@@ -614,6 +614,18 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-show="title !== '复制'" :span="24">
|
||||
<el-form-item>
|
||||
<span slot="label">
|
||||
是否默认
|
||||
</span>
|
||||
<el-switch
|
||||
v-model="form.IsDefaultChoice"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!--分割线-->
|
||||
<el-col v-show="title !== '复制' && form.ConfigType == 'M'" :span="24">
|
||||
<el-divider content-position="left">其他信息</el-divider>
|
||||
@@ -1130,6 +1142,7 @@ export default {
|
||||
DescriptionCN: null,
|
||||
InterfaceName: null,
|
||||
IsEnable: true,
|
||||
IsDefaultChoice: true,
|
||||
ModuleTypeId: null,
|
||||
OptTypeId: null,
|
||||
ChildrenTypeId: null,
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
<template>
|
||||
<el-form
|
||||
ref="emailForm"
|
||||
v-loading="loading"
|
||||
:model="form"
|
||||
label-width="180px"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form ref="emailForm" v-loading="loading" :model="form" label-width="180px" size="small" :rules="rules">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<!-- Code -->
|
||||
@@ -29,12 +22,7 @@
|
||||
<el-col :span="12">
|
||||
<!-- 邮件延时发送s数 -->
|
||||
<el-form-item :label="$t('dictionary:email:label:emailDelaySeconds')" prop="EmailDelaySeconds">
|
||||
<el-input
|
||||
v-model.number="form.EmailDelaySeconds"
|
||||
style="width: 300px"
|
||||
type="number"
|
||||
clearable
|
||||
>
|
||||
<el-input v-model.number="form.EmailDelaySeconds" style="width: 300px" type="number" clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -42,12 +30,8 @@
|
||||
<!-- 业务层级 -->
|
||||
<el-form-item :label="$t('dictionary:email:label:businessLevel')" prop="BusinessLevelEnum">
|
||||
<el-select v-model="form.BusinessLevelEnum" clearable class="mr">
|
||||
<el-option
|
||||
v-for="item of $d.BusinessLevel"
|
||||
:key="`BusinessLevel${item.label}`"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-option v-for="item of $d.BusinessLevel" :key="`BusinessLevel${item.label}`" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -55,12 +39,8 @@
|
||||
<!-- 业务模块 -->
|
||||
<el-form-item :label="$t('dictionary:email:label:businessModule')" prop="BusinessModuleEnum">
|
||||
<el-select v-model="form.BusinessModuleEnum" clearable class="mr">
|
||||
<el-option
|
||||
v-for="item of $d.BusinessModule"
|
||||
:key="`BusinessModule${item.label}`"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-option v-for="item of $d.BusinessModule" :key="`BusinessModule${item.label}`" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -68,80 +48,46 @@
|
||||
<!-- 业务场景 -->
|
||||
<el-form-item :label="$t('trials:emailManageCfg:table:BusinessScenarioEnum')" prop="BusinessScenarioEnum">
|
||||
<el-select v-model="form.BusinessScenarioEnum" clearable class="mr">
|
||||
<el-option
|
||||
v-for="item of $d.Email_BusinessScenario"
|
||||
:key="`BusinessScenarioEnum${item.label}`"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-option v-for="item of $d.Email_BusinessScenario" :key="`BusinessScenarioEnum${item.label}`"
|
||||
:label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- 收件人 -->
|
||||
<el-form-item :label="$t('trials:emailManageCfg:title:toUserTypeList')" prop="ToUserTypeList">
|
||||
<el-select
|
||||
v-model="form.ToUserTypeList"
|
||||
clearable
|
||||
multiple
|
||||
class="mr"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.UserType"
|
||||
:key="`ToUserTypeList${item.label}`"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-select v-model="form.ToUserTypeList" clearable multiple class="mr">
|
||||
<el-option v-for="item of $d.UserType" :key="`ToUserTypeList${item.label}`" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- 抄送人 -->
|
||||
<el-form-item :label="$t('trials:emailManageCfg:title:copyUserTypeList')" prop="CopyUserTypeList">
|
||||
<el-select
|
||||
v-model="form.CopyUserTypeList"
|
||||
clearable
|
||||
multiple
|
||||
class="mr"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.UserType"
|
||||
:key="`CopyUserTypeList${item.label}`"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-select v-model="form.CopyUserTypeList" clearable multiple class="mr">
|
||||
<el-option v-for="item of $d.UserType" :key="`CopyUserTypeList${item.label}`" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- 加急状态 -->
|
||||
<el-form-item :label="$t('dictionary:email:label:IsUrgent')" prop="EmailUrgentEnum">
|
||||
<el-select
|
||||
v-model="form.EmailUrgentEnum"
|
||||
@change="
|
||||
(v) => {
|
||||
v === 1 ? (form.EmailCron = null) : null
|
||||
}
|
||||
"
|
||||
clearable
|
||||
class="mr"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.EmailUrgent"
|
||||
:key="`EmailUrgent${item.label}`"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-select v-model="form.EmailUrgentEnum" @change="
|
||||
(v) => {
|
||||
v === 1 ? (form.EmailCron = null) : null
|
||||
}
|
||||
" clearable class="mr">
|
||||
<el-option v-for="item of $d.EmailUrgent" :key="`EmailUrgent${item.label}`" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- 发送周期和时间 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:emailManageCfg:table:EmailCron')"
|
||||
v-if="form.EmailUrgentEnum !== 1"
|
||||
prop="EmailCron"
|
||||
>
|
||||
<el-form-item :label="$t('trials:emailManageCfg:table:EmailCron')" v-if="form.EmailUrgentEnum !== 1"
|
||||
prop="EmailCron">
|
||||
<el-input style="width: 300px" readonly v-model="form.EmailCron" />
|
||||
<!-- 生成 cron -->
|
||||
<el-button type="primary" @click="showDialog"> {{ $t('dictionary:email:button:cron') }} </el-button>
|
||||
@@ -151,12 +97,8 @@
|
||||
<!-- 是否需要回执 -->
|
||||
<el-form-item :label="$t('trials:emailManageCfg:title:isReturnRequired')" prop="IsReturnRequired">
|
||||
<el-radio-group v-model="form.IsReturnRequired">
|
||||
<el-radio
|
||||
v-for="item of $d.YesOrNo"
|
||||
:label="item.value"
|
||||
:key="`IsReturnRequired${item.value}`"
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
<el-radio v-for="item of $d.YesOrNo" :label="item.value" :key="`IsReturnRequired${item.value}`">{{
|
||||
item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -164,48 +106,30 @@
|
||||
<!-- 是否自动发送 -->
|
||||
<el-form-item :label="$t('trials:emailManageCfg:table:IsAutoSend')" prop="IsAutoSend">
|
||||
<el-radio-group v-model="form.IsAutoSend">
|
||||
<el-radio
|
||||
v-for="item of $d.YesOrNo"
|
||||
:label="item.value"
|
||||
:key="`IsAutoSend${item.value}`"
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
<el-radio v-for="item of $d.YesOrNo" :label="item.value" :key="`IsAutoSend${item.value}`">{{ item.label
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="systemLevel">
|
||||
<!-- 是否区分标准 -->
|
||||
<el-form-item :label="$t('dictionary:email:button:isDistinguishCriteria')" prop="IsDistinguishCriteria">
|
||||
<el-radio-group
|
||||
v-model="form.IsDistinguishCriteria"
|
||||
@change="
|
||||
() => {
|
||||
form.CriterionTypeEnum = null
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-radio
|
||||
v-for="item of $d.YesOrNo"
|
||||
:label="item.value"
|
||||
:key="`IsDistinguishCriteria${item.value}`"
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
<el-radio-group v-model="form.IsDistinguishCriteria" @change="
|
||||
() => {
|
||||
form.CriterionTypeEnum = null
|
||||
}
|
||||
">
|
||||
<el-radio v-for="item of $d.YesOrNo" :label="item.value" :key="`IsDistinguishCriteria${item.value}`">{{
|
||||
item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
:label="$t('trials:auditRecord:table:criterion')"
|
||||
v-if="form.IsDistinguishCriteria"
|
||||
prop="CriterionTypeEnum"
|
||||
>
|
||||
<el-form-item :label="$t('trials:auditRecord:table:criterion')" v-if="form.IsDistinguishCriteria"
|
||||
prop="CriterionTypeEnum">
|
||||
<el-select v-model="form.CriterionTypeEnum" clearable class="mr">
|
||||
<el-option
|
||||
v-for="item of $d.CriterionType"
|
||||
:key="`CriterionType${item.label}`"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-option v-for="item of $d.CriterionType" :key="`CriterionType${item.label}`" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -213,106 +137,65 @@
|
||||
<!-- 是否启用 -->
|
||||
<el-form-item :label="$t('trials:emailManageCfg:table:IsEnable')" prop="IsEnable">
|
||||
<el-radio-group v-model="form.IsEnable">
|
||||
<el-radio
|
||||
v-for="item of $d.YesOrNo"
|
||||
:label="item.value"
|
||||
:key="`IsEnable${item.value}`"
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
<el-radio v-for="item of $d.YesOrNo" :label="item.value" :key="`IsEnable${item.value}`">{{ item.label
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- 附件(CN) -->
|
||||
<el-form-item :label="$t('trials:emailManageCfg:table:fileListCN')" prop="IsEnable">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
:before-upload="beforeUploadCN"
|
||||
:http-request="handleUploadFileCN"
|
||||
:on-preview="handlePreviewCN"
|
||||
:on-remove="handleRemoveFileCN"
|
||||
:show-file-list="true"
|
||||
:limit="1"
|
||||
:file-list="fileListCN"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="fileListCN.length > 0"
|
||||
>{{ $t('common:button:upload') }}</el-button
|
||||
>
|
||||
<el-upload class="upload-demo" action :before-upload="beforeUploadCN" :http-request="handleUploadFileCN"
|
||||
:on-preview="handlePreviewCN" :on-remove="handleRemoveFileCN" :show-file-list="true" :limit="1"
|
||||
:file-list="fileListCN">
|
||||
<el-button size="small" type="primary" :disabled="fileListCN.length > 0">{{ $t('common:button:upload')
|
||||
}}</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- 附件(EN) -->
|
||||
<el-form-item :label="$t('trials:emailManageCfg:table:fileListEN')" prop="IsEnable">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
:before-upload="beforeUploadEN"
|
||||
:http-request="handleUploadFileEN"
|
||||
:on-preview="handlePreviewEN"
|
||||
:on-remove="handleRemoveFileEN"
|
||||
:show-file-list="true"
|
||||
:limit="1"
|
||||
:file-list="fileListEN"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="fileListEN.length > 0"
|
||||
>{{ $t('common:button:upload') }}</el-button
|
||||
>
|
||||
<el-upload class="upload-demo" action :before-upload="beforeUploadEN" :http-request="handleUploadFileEN"
|
||||
:on-preview="handlePreviewEN" :on-remove="handleRemoveFileEN" :show-file-list="true" :limit="1"
|
||||
:file-list="fileListEN">
|
||||
<el-button size="small" type="primary" :disabled="fileListEN.length > 0">{{ $t('common:button:upload')
|
||||
}}</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 邮件内容模版(CN) -->
|
||||
<el-form-item
|
||||
:label="$t('dictionary:email:label:emailHtmlContentCN')"
|
||||
prop="EmailHtmlContentCN"
|
||||
style="position: relative"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.EmailHtmlContentCN"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 8, maxRows: 8 }"
|
||||
/>
|
||||
<el-button
|
||||
:disabled="!form.EmailHtmlContentCN && form.EmailHtmlContent"
|
||||
type="text"
|
||||
<el-form-item :label="$t('dictionary:email:label:emailHtmlContentCN')" prop="EmailHtmlContentCN"
|
||||
style="position: relative">
|
||||
<div class="html_temp">
|
||||
<prism-editor class="my-editor" v-model="form.EmailHtmlContentCN" :highlight="highlighter" :line-numbers="true"
|
||||
style="width: 50%;max-height: 500px;"></prism-editor>
|
||||
<div v-html="form.EmailHtmlContentCN" style="width: 50%;"></div>
|
||||
</div>
|
||||
<!-- <el-input v-model="form.EmailHtmlContentCN" type="textarea" :autosize="{ minRows: 8, maxRows: 8 }" />
|
||||
<el-button :disabled="!form.EmailHtmlContentCN && form.EmailHtmlContent" type="text"
|
||||
@click="PreviewHTML(form.EmailHtmlContentCN, form.EmailHtmlContent)"
|
||||
style="position: absolute; left: -50px; top: 30px"
|
||||
>
|
||||
style="position: absolute; left: -50px; top: 30px">
|
||||
{{ $t('common:button:preview') }}
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</el-form-item>
|
||||
<!-- 邮件内容模版(EN) -->
|
||||
<el-form-item
|
||||
:label="$t('dictionary:email:label:emailHtmlContent')"
|
||||
prop="EmailHtmlContent"
|
||||
style="position: relative"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.EmailHtmlContent"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 8, maxRows: 8 }"
|
||||
/>
|
||||
<el-button
|
||||
:disabled="!form.EmailHtmlContentCN && form.EmailHtmlContent"
|
||||
type="text"
|
||||
<el-form-item :label="$t('dictionary:email:label:emailHtmlContent')" prop="EmailHtmlContent"
|
||||
style="position: relative">
|
||||
<div class="html_temp">
|
||||
<prism-editor class="my-editor" v-model="form.EmailHtmlContent" :highlight="highlighter" :line-numbers="true"
|
||||
style="width: 50%;max-height: 500px;"></prism-editor>
|
||||
<div v-html="form.EmailHtmlContent" style="width: 50%;"></div>
|
||||
</div>
|
||||
<!-- <el-input v-model="form.EmailHtmlContent" type="textarea" :autosize="{ minRows: 8, maxRows: 8 }" />
|
||||
<el-button :disabled="!form.EmailHtmlContentCN && form.EmailHtmlContent" type="text"
|
||||
@click="PreviewHTML(form.EmailHtmlContentCN, form.EmailHtmlContent)"
|
||||
style="position: absolute; left: -50px; top: 30px"
|
||||
>
|
||||
style="position: absolute; left: -50px; top: 30px">
|
||||
{{ $t('common:button:preview') }}
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</el-form-item>
|
||||
<div
|
||||
class="base-dialog-footer"
|
||||
style="text-align: right; margin-top: 10px; padding-bottom: 10px"
|
||||
>
|
||||
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px; padding-bottom: 10px">
|
||||
<el-form-item style="text-align: right">
|
||||
<el-button size="small" type="primary" @click="handleSave">
|
||||
{{ $t('common:button:save') }}
|
||||
@@ -321,12 +204,7 @@
|
||||
</div>
|
||||
<!-- 生成 cron -->
|
||||
<el-dialog append-to-body :title="$t('dictionary:email:button:cron')" :visible.sync="showCron">
|
||||
<vcrontab
|
||||
:hideComponent="['year']"
|
||||
@hide="showCron = false"
|
||||
@fill="crontabFill"
|
||||
:expression="expression"
|
||||
>
|
||||
<vcrontab :hideComponent="['year']" @hide="showCron = false" @fill="crontabFill" :expression="expression">
|
||||
</vcrontab>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
@@ -334,6 +212,14 @@
|
||||
<script>
|
||||
import { Upload, addOrUpdateEmailNoticeConfigList } from '@/api/dictionary'
|
||||
import vcrontab from 'vcrontab'
|
||||
|
||||
import { PrismEditor } from 'vue-prism-editor';
|
||||
import 'vue-prism-editor/dist/prismeditor.min.css';
|
||||
import { highlight, languages } from 'prismjs/components/prism-core';
|
||||
import 'prismjs/components/prism-clike';
|
||||
import 'prismjs/components/prism-javascript';
|
||||
import 'prismjs/themes/prism.css';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
data: {
|
||||
@@ -355,7 +241,7 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
components: { vcrontab },
|
||||
components: { vcrontab, PrismEditor },
|
||||
data() {
|
||||
return {
|
||||
expression: '',
|
||||
@@ -440,6 +326,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
highlighter(code) {
|
||||
return highlight(code, languages.js);
|
||||
},
|
||||
showDialog() {
|
||||
this.expression = this.form.EmailCron //传入的 cron 表达式,可以反解析到 UI 上
|
||||
this.showCron = true
|
||||
@@ -563,3 +452,9 @@ export default {
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.html_temp {
|
||||
display: flex;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -67,13 +67,18 @@
|
||||
<el-button type="primary" @click="handleAdd">
|
||||
{{ $t('common:button:new') }}
|
||||
</el-button>
|
||||
<el-button type="primary" @click="openDrawer" :disabled="multipleSelection.length <= 0">
|
||||
{{ $t('trials:emailManageCfg:button:batchAudit') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- 受试者列表 -->
|
||||
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 45 }" :data="list" stripe height="100" style="width: 100%"
|
||||
@sort-change="handleSortByColumn">
|
||||
<el-table-column type="index" width="40" />
|
||||
@sort-change="handleSortByColumn" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="index" width="40" /> -->
|
||||
<el-table-column type="selection" width="55">
|
||||
</el-table-column>
|
||||
<!-- Code -->
|
||||
<el-table-column prop="Code" :label="$t('trials:emailManageCfg:title:code')" sortable="custom"
|
||||
show-overflow-tooltip min-width="100" />
|
||||
@@ -249,12 +254,76 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-drawer :title="$t('trials:emailManageCfg:title:audit')" :visible.sync="drawer" direction="rtl" size="80%">
|
||||
<!-- <div style="width: 800px">
|
||||
<el-form label-width="100px" @submit.native.prevent size="small" :inline="true" class="demo-form-inline">
|
||||
<el-form-item :label="$t('il8n:search:keyword')">
|
||||
<el-input v-model="key" @input="keyChange" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('il8n:search:state')">
|
||||
<el-select v-model="State" clearable filterable @change="handleStateChange">
|
||||
<el-option v-for="item of $d.InternationalizationKeyState"
|
||||
:key="'InternationalizationKeyState' + item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div> -->
|
||||
<el-table :data="tableData" v-adaptive="{ bottomOffset: 50 }" height="100" style="width: 100%"
|
||||
@sort-change="handleSortByColumnDrawer">
|
||||
<!-- Code -->
|
||||
<el-table-column prop="Code" :label="$t('trials:emailManageCfg:title:code')" sortable="custom"
|
||||
show-overflow-tooltip min-width="100" />
|
||||
<el-table-column v-if="isDistinguishCriteria" prop="TrialReadingCriterionId"
|
||||
:label="$t('trials:reviewTrack:table:criterionName')" show-overflow-tooltip sortable="custom" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('CriterionType', scope.row.CriterionTypeEnum) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 邮件主题(中文) -->
|
||||
<el-table-column prop="EmailTopicCN" :label="$t('trials:emailManageCfg:table:EmailTopicCN')" sortable="custom"
|
||||
show-overflow-tooltip min-width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.EmailTopicCN" @input="
|
||||
(e) => {
|
||||
$set(scope.row, 'EmailTopicCN', e)
|
||||
}
|
||||
" size="mini"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 邮件主题(英文) -->
|
||||
<el-table-column prop="EmailTopic" :label="$t('trials:emailManageCfg:table:EmailTopic')" sortable="custom"
|
||||
show-overflow-tooltip min-width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.EmailTopic" @input="
|
||||
(e) => {
|
||||
$set(scope.row, 'EmailTopic', e)
|
||||
}
|
||||
" size="mini"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 业务层级 -->
|
||||
<el-table-column prop="BusinessLevelEnum" :label="$t('dictionary:email:label:businessLevel')" sortable="custom"
|
||||
show-overflow-tooltip min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('BusinessLevel', scope.row.BusinessLevelEnum) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: right; padding-top: 10px; padding-right: 10px">
|
||||
<el-button size="mini" @click="drawer = false">{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" @click="handleSave">{{
|
||||
$t('common:button:save')
|
||||
}}</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getEmailNoticeConfigList,
|
||||
deleteEmailNoticeConfig,
|
||||
batchUpdateEmail
|
||||
} from '@/api/dictionary'
|
||||
import { GetEmailNoticeConfigList_Export } from '@/api/export'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
@@ -308,6 +377,9 @@ export default {
|
||||
previewVisible: false,
|
||||
previewHTML: null,
|
||||
previewHTMLEN: null,
|
||||
multipleSelection: [],
|
||||
drawer: false,
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -325,6 +397,50 @@ export default {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
async handleSave() {
|
||||
try {
|
||||
let arr = []
|
||||
this.tableData.forEach(item => {
|
||||
let obj = {
|
||||
EmailTopic: item.EmailTopic,
|
||||
EmailTopicCN: item.EmailTopicCN,
|
||||
Id: item.Id
|
||||
}
|
||||
arr.push(obj)
|
||||
})
|
||||
this.drawer = false
|
||||
let res = await batchUpdateEmail(arr)
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t('trials:emailManageCfg:message:auditSuccess'))
|
||||
this.getList()
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumnDrawer(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.tableData.sort((a, b) =>
|
||||
a[column.prop].localeCompare(b[column.prop])
|
||||
)
|
||||
} else {
|
||||
this.tableData.sort((a, b) =>
|
||||
b[column.prop].localeCompare(a[column.prop])
|
||||
)
|
||||
}
|
||||
},
|
||||
openDrawer() {
|
||||
this.tableData = []
|
||||
this.multipleSelection.forEach(item => {
|
||||
let obj = Object.assign({}, item)
|
||||
this.tableData.push(obj)
|
||||
})
|
||||
this.drawer = true
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
// 获取受试者列表
|
||||
getList() {
|
||||
this.loading = true
|
||||
|
||||
@@ -62,8 +62,9 @@
|
||||
<!-- 用户类型 -->
|
||||
<el-form-item :label="$t('trials:signRecords:table:userType')" v-if="!isDoc">
|
||||
<el-select v-model="searchData.UserTypeId" clearable filterable style="width: 120px">
|
||||
<el-option v-for="item of userTypeOptions" v-show="item.UserTypeEnum !== 26 && item.UserTypeEnum !== 27"
|
||||
:key="item.Id" :label="item.UserTypeShortName" :value="item.Id">
|
||||
<el-option v-for="item of userTypeOptions"
|
||||
v-show="isSystem || (item.UserTypeEnum !== 26 && item.UserTypeEnum !== 27)" :key="item.Id"
|
||||
:label="item.UserTypeShortName" :value="item.Id">
|
||||
<span>{{ item.UserType }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
@@ -6,12 +6,8 @@
|
||||
<!-- 中心编号 -->
|
||||
<el-form-item :label="$t('trials:reviewAssign:readingTask:table:siteCode')">
|
||||
<el-select v-model="searchData.TrialSiteId" clearable filterable style="width:120px;">
|
||||
<el-option
|
||||
v-for="(item,index) of siteOptions"
|
||||
:key="index"
|
||||
:label="item.TrialSiteCode"
|
||||
:value="item.TrialSiteId"
|
||||
/>
|
||||
<el-option v-for="(item, index) of siteOptions" :key="index" :label="item.TrialSiteCode"
|
||||
:value="item.TrialSiteId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 受试者编号 -->
|
||||
@@ -20,51 +16,47 @@
|
||||
</el-form-item>
|
||||
<!-- 访视/阅片期名称 -->
|
||||
<el-form-item style="margin-bottom:10px" :label="$t('trials:reviewAssign:readingTask:table:visitName')">
|
||||
<el-input
|
||||
v-model="searchData.TaskName"
|
||||
style="width:100px;"
|
||||
clearable
|
||||
/>
|
||||
<el-input v-model="searchData.TaskName" style="width:100px;" clearable />
|
||||
</el-form-item>
|
||||
<!-- 阅片人 -->
|
||||
<el-form-item style="margin-bottom:10px" :label="$t('trials:reviewAssign:readingTask:table:reader')">
|
||||
<el-select v-model="searchData.DoctorUserId" clearable style="width:120px;">
|
||||
<el-option v-for="item of DoctorUserList" :key="'DoctorUserId' + item.DoctorUserId" :value="item.DoctorUserId" :label="item.UserName" />
|
||||
<el-option v-for="item of DoctorUserList" :key="'DoctorUserId' + item.DoctorUserId"
|
||||
:value="item.DoctorUserId" :label="item.UserName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 是否加急 -->
|
||||
<el-form-item style="margin-bottom:10px" :label="$t('trials:reviewAssign:readingTask:table:isUrgent')">
|
||||
<el-select v-model="searchData.IsUrgent" clearable style="width:120px;">
|
||||
<el-option v-for="item of $d.YesOrNo" :key="'IsUrgent' + item.label" :value="item.value" :label="item.label" />
|
||||
<el-option v-for="item of $d.YesOrNo" :key="'IsUrgent' + item.label" :value="item.value"
|
||||
:label="item.label" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 任务状态 -->
|
||||
<el-form-item style="margin-bottom:10px" :label="$t('trials:reviewAssign:readingTask:table:taskStatus')">
|
||||
<el-select v-model="searchData.TaskState" clearable style="width:120px;">
|
||||
<el-option v-for="item of $d.TaskState" :key="'TaskState' + item.label" :value="item.value" :label="item.label" />
|
||||
<el-option v-for="item of $d.TaskState" :key="'TaskState' + item.label" :value="item.value"
|
||||
:label="item.label" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 任务类型 -->
|
||||
<el-form-item style="margin-bottom:10px" :label="$t('trials:reviewAssign:readingTask:table:taskType')">
|
||||
<el-select v-model="searchData.ReadingCategory" clearable style="width:120px;">
|
||||
<el-option v-for="item of $d.ReadingCategory" :key="'ReadingCategory' + item.label" :value="item.value" :label="item.label" />
|
||||
<el-option v-for="item of $d.ReadingCategory" :key="'ReadingCategory' + item.label" :value="item.value"
|
||||
:label="item.label" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 分配状态 -->
|
||||
<el-form-item style="margin-bottom:10px" :label="$t('trials:reviewAssign:readingTask:table:assignStatus')">
|
||||
<el-select v-model="searchData.TaskAllocationState" clearable style="width:120px;">
|
||||
<el-option v-for="item of $d.TaskAllocationState" :key="'TaskAllocationState' + item.label" :value="item.value" :label="item.label" />
|
||||
<el-option v-for="item of $d.TaskAllocationState" :key="'TaskAllocationState' + item.label"
|
||||
:value="item.value" :label="item.label" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 分配时间 -->
|
||||
<el-form-item style="margin-bottom:10px" :label="$t('trials:reviewAssign:readingTask:table:assignTime')">
|
||||
<el-date-picker
|
||||
v-model="timeList"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="changeTimeList"
|
||||
/>
|
||||
<el-date-picker v-model="timeList" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
|
||||
:default-time="['00:00:00', '23:59:59']" @change="changeTimeList" />
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-bottom:10px">
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
@@ -77,180 +69,117 @@
|
||||
</el-form>
|
||||
</template>
|
||||
<template slot="main-container">
|
||||
<el-table
|
||||
v-adaptive="{bottomOffset:60}"
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
@sort-change="handleSortChange"
|
||||
>
|
||||
<el-table-column
|
||||
prop="OriginalReReadingTask.IsUrgent"
|
||||
:label="$t('trials:consistencyCheck:table:isUrgent')"
|
||||
show-overflow-tooltip
|
||||
min-width="100"
|
||||
sortable="custom"
|
||||
>
|
||||
<el-table v-adaptive="{ bottomOffset: 60 }" v-loading="loading" :data="list" stripe height="100"
|
||||
@sort-change="handleSortChange">
|
||||
<el-table-column prop="OriginalReReadingTask.IsUrgent" :label="$t('trials:consistencyCheck:table:isUrgent')"
|
||||
show-overflow-tooltip min-width="100" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.IsUrgent" type="danger">{{ $fd('YesOrNo', scope.row.OriginalReReadingTask.IsUrgent) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.IsUrgent" type="danger">{{ $fd('YesOrNo',
|
||||
scope.row.OriginalReReadingTask.IsUrgent) }}</el-tag>
|
||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.OriginalReReadingTask.IsUrgent) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 任务编号 -->
|
||||
<el-table-column
|
||||
prop="OriginalReReadingTask.TaskCode"
|
||||
:label="$t('trials:readTask:table:taskCode')"
|
||||
min-width="100"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="OriginalReReadingTask.TaskCode" :label="$t('trials:readTask:table:taskCode')"
|
||||
min-width="100" sortable="custom" show-overflow-tooltip />
|
||||
<!-- 中心编号 -->
|
||||
<el-table-column
|
||||
prop="OriginalReReadingTask.TrialSiteCode"
|
||||
:label="$t('trials:readTask:table:siteCode')"
|
||||
min-width="100"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="OriginalReReadingTask.TrialSiteCode" :label="$t('trials:readTask:table:siteCode')"
|
||||
min-width="100" sortable="custom" show-overflow-tooltip />
|
||||
<!-- 受试者编号 -->
|
||||
<el-table-column
|
||||
prop="OriginalReReadingTask.SubjectCode"
|
||||
:label="$t('trials:readTask:table:subjectCode')"
|
||||
min-width="120"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="OriginalReReadingTask.SubjectCode" :label="$t('trials:readTask:table:subjectCode')"
|
||||
min-width="120" sortable="custom" show-overflow-tooltip />
|
||||
<!-- 访视/阅片期名称 -->
|
||||
<el-table-column
|
||||
prop="OriginalReReadingTask.TaskName"
|
||||
:label="$t('trials:reviewAssign:readingTask:table:visitName')"
|
||||
min-width="160"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="OriginalReReadingTask.TaskName"
|
||||
:label="$t('trials:reviewAssign:readingTask:table:visitName')" min-width="160" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
<!-- 盲态任务标识 -->
|
||||
<el-table-column
|
||||
prop="OriginalReReadingTask.TaskBlindName"
|
||||
:label="$t('trials:reviewAssign:readingTask:table:blindName')"
|
||||
min-width="140"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="OriginalReReadingTask.TaskBlindName"
|
||||
:label="$t('trials:reviewAssign:readingTask:table:blindName')" min-width="140" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
<!-- 任务创建时间 -->
|
||||
<el-table-column
|
||||
prop="OriginalReReadingTask.CreateTime"
|
||||
:label="$t('trials:reviewAssign:readingTask:table:createTime')"
|
||||
min-width="140"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="OriginalReReadingTask.CreateTime"
|
||||
:label="$t('trials:reviewAssign:readingTask:table:createTime')" min-width="140" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
<!-- 任务状态 -->
|
||||
<el-table-column
|
||||
prop="OriginalReReadingTask.TaskState"
|
||||
:label="$t('trials:reviewAssign:readingTask:table:taskStatus')"
|
||||
min-width="100"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="OriginalReReadingTask.TaskState"
|
||||
:label="$t('trials:reviewAssign:readingTask:table:taskStatus')" min-width="100" sortable="custom"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 0" type="primary">{{ $fd('TaskState', scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 1" type="info">{{ $fd('TaskState', scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 3" type="danger">{{ $fd('TaskState', scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 4" type="warning">{{ $fd('TaskState', scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 5" type="danger">{{ $fd('TaskState', scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 0" type="primary">{{ $fd('TaskState',
|
||||
scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 1" type="info">{{ $fd('TaskState',
|
||||
scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 3" type="danger">{{ $fd('TaskState',
|
||||
scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 4" type="warning">{{ $fd('TaskState',
|
||||
scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 5" type="danger">{{ $fd('TaskState',
|
||||
scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 任务类型 -->
|
||||
<el-table-column
|
||||
prop="OriginalReReadingTask.ReadingCategory"
|
||||
:label="$t('trials:reviewAssign:readingTask:table:taskType')"
|
||||
min-width="100"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="OriginalReReadingTask.ReadingCategory"
|
||||
:label="$t('trials:reviewAssign:readingTask:table:taskType')" min-width="100" sortable="custom"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 1" type="primary">{{ $fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 2" type="info">{{ $fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 4" type="danger">{{ $fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 5" type="warning">{{ $fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 1" type="primary">{{
|
||||
$fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 2" type="info">{{ $fd('ReadingCategory',
|
||||
scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 4" type="danger">{{ $fd('ReadingCategory',
|
||||
scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 5" type="warning">{{
|
||||
$fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 角色 -->
|
||||
<el-table-column
|
||||
prop="OriginalReReadingTask.ArmEnum"
|
||||
:label="$t('trials:reviewAssign:readingTask:table:role')"
|
||||
min-width="80"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="OriginalReReadingTask.ArmEnum" :label="$t('trials:reviewAssign:readingTask:table:role')"
|
||||
min-width="80" sortable="custom" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 1" type="primary">{{ $fd('ArmEnum', scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 2" type="success">{{ $fd('ArmEnum', scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 3" type="info">{{ $fd('ArmEnum', scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 4" type="danger">{{ $fd('ArmEnum', scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 5" type="warning">{{ $fd('ArmEnum', scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 1" type="primary">{{ $fd('ArmEnum',
|
||||
scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 2" type="success">{{ $fd('ArmEnum',
|
||||
scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 3" type="info">{{ $fd('ArmEnum',
|
||||
scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 4" type="danger">{{ $fd('ArmEnum',
|
||||
scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OriginalReReadingTask.ArmEnum === 5" type="warning">{{ $fd('ArmEnum',
|
||||
scope.row.OriginalReReadingTask.ArmEnum) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 阅片人 -->
|
||||
<el-table-column
|
||||
prop="OriginalReReadingTask.UserName"
|
||||
:label="$t('trials:reviewAssign:readingTask:table:reader')"
|
||||
min-width="100"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="OriginalReReadingTask.UserName"
|
||||
:label="$t('trials:reviewAssign:readingTask:table:reader')" min-width="100" sortable="custom"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.OriginalReReadingTask.UserName }}({{ scope.row.OriginalReReadingTask.FullName }})
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 阅片完成时间 -->
|
||||
<el-table-column
|
||||
prop="OriginalReReadingTask.SignTime"
|
||||
:label="$t('trials:reviewTrack:table:signTime')"
|
||||
min-width="180"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="OriginalReReadingTask.SignTime" :label="$t('trials:reviewTrack:table:signTime')"
|
||||
min-width="180" sortable="custom" show-overflow-tooltip />
|
||||
<!-- 重阅申请类型 -->
|
||||
<el-table-column
|
||||
prop="OriginalReReadingTask.RequestReReadingType"
|
||||
:label="$t('trials:rereadTask:table:requestReReadingType')"
|
||||
min-width="140"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="OriginalReReadingTask.RequestReReadingType"
|
||||
:label="$t('trials:rereadTask:table:requestReReadingType')" min-width="140" sortable="custom"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.RequestReReadingType">
|
||||
<el-tag v-if="scope.row.RequestReReadingType === 2" type="danger">{{ $fd('RequestReReadingType', scope.row.RequestReReadingType) }}</el-tag>
|
||||
<el-tag v-if="scope.row.RequestReReadingType === 2" type="danger">{{ $fd('RequestReReadingType',
|
||||
scope.row.RequestReReadingType) }}</el-tag>
|
||||
<el-tag v-else type="primary">{{ $fd('RequestReReadingType', scope.row.RequestReReadingType) }}</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 申请时间 -->
|
||||
<el-table-column
|
||||
prop="RequestReReadingTime"
|
||||
:label="$t('trials:rereadTask:table:requestReReadingTime')"
|
||||
min-width="100"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="RequestReReadingTime" :label="$t('trials:rereadTask:table:requestReReadingTime')"
|
||||
min-width="100" sortable="custom" show-overflow-tooltip />
|
||||
<!-- 申请原因 -->
|
||||
<el-table-column
|
||||
prop="RequestReReadingReason"
|
||||
:label="$t('trials:rereadTask:table:requestReReadingReason')"
|
||||
min-width="100"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="RequestReReadingReason" :label="$t('trials:rereadTask:table:requestReReadingReason')"
|
||||
min-width="100" sortable="custom" show-overflow-tooltip />
|
||||
<!-- 审批结果 -->
|
||||
<el-table-column
|
||||
prop="AllocateTime"
|
||||
:label="$t('trials:rereadTask:table:requestReReadingResultEnum')"
|
||||
min-width="100"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="AllocateTime" :label="$t('trials:rereadTask:table:requestReReadingResultEnum')"
|
||||
min-width="100" sortable="custom" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.RequestReReadingResultEnum || scope.row.RequestReReadingResultEnum === 0">
|
||||
<el-tooltip v-if="scope.row.RequestReReadingResultEnum === 2" class="item" effect="dark" placement="top">
|
||||
@@ -259,90 +188,217 @@
|
||||
</div>
|
||||
<el-tag type="danger">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag>
|
||||
</el-tooltip>
|
||||
<el-tag v-if="scope.row.RequestReReadingResultEnum === 1" type="primary">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag>
|
||||
<el-tag v-if="scope.row.RequestReReadingResultEnum === 0" type="warning">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag>
|
||||
<el-tag v-if="scope.row.RequestReReadingResultEnum === 1" type="primary">{{ $fd('RequestReReadingResult',
|
||||
scope.row.RequestReReadingResultEnum) }}</el-tag>
|
||||
<el-tag v-if="scope.row.RequestReReadingResultEnum === 0" type="warning">{{ $fd('RequestReReadingResult',
|
||||
scope.row.RequestReReadingResultEnum) }}</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 新任务编号 -->
|
||||
<el-table-column
|
||||
prop="ReReadingNewTaskCode"
|
||||
:label="$t('trials:rereadTask:table:reReadingNewTaskCode')"
|
||||
min-width="120"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="hasPermi(['role:spm'])"
|
||||
fixed="right"
|
||||
:label="$t('common:action:action')"
|
||||
width="210"
|
||||
>
|
||||
<el-table-column prop="ReReadingNewTaskCode" :label="$t('trials:rereadTask:table:reReadingNewTaskCode')"
|
||||
min-width="120" sortable="custom" show-overflow-tooltip />
|
||||
<el-table-column v-if="hasPermi(['role:spm'])" fixed="right" :label="$t('common:action:action')" width="210">
|
||||
<template slot-scope="scope">
|
||||
<!-- 同意 -->
|
||||
<el-button
|
||||
:disabled="!!scope.row.RequestReReadingResultEnum || scope.row.RequestReReadingType === 1"
|
||||
icon="el-icon-check"
|
||||
circle
|
||||
:title="$t('trials:spmAudit:button:agree')"
|
||||
@click="openReReadingOrBackList(scope.row,1)"
|
||||
/>
|
||||
<!-- <el-button :disabled="!!scope.row.RequestReReadingResultEnum || scope.row.RequestReReadingType === 1"
|
||||
icon="el-icon-check" circle :title="$t('trials:spmAudit:button:agree')"
|
||||
@click="openReReadingOrBackList(scope.row, 1)" /> -->
|
||||
<!-- 拒绝 -->
|
||||
<el-button
|
||||
:disabled="!!scope.row.RequestReReadingResultEnum || scope.row.RequestReReadingType === 1"
|
||||
icon="el-icon-close"
|
||||
circle
|
||||
:title="$t('trials:spmAudit:button:reject')"
|
||||
@click="confirmReReading(scope.row,2, true)"
|
||||
/>
|
||||
<!-- <el-button :disabled="!!scope.row.RequestReReadingResultEnum || scope.row.RequestReReadingType === 1"
|
||||
icon="el-icon-close" circle :title="$t('trials:spmAudit:button:reject')"
|
||||
@click="confirmReReading(scope.row, 2, true)" /> -->
|
||||
<el-button :disabled="!!scope.row.RequestReReadingResultEnum ||
|
||||
scope.row.RequestReReadingType === 1
|
||||
" icon="el-icon-edit-outline" circle :title="$t('trials:spmAudit:table:Approval')"
|
||||
@click="audit(scope.row)" />
|
||||
<!-- 已影响任务列表 -->
|
||||
<el-button
|
||||
:disabled="scope.row.RequestReReadingResultEnum !== 1"
|
||||
icon="el-icon-document-copy"
|
||||
circle
|
||||
:title="$t('trials:spmAudit:button:influenceList')"
|
||||
@click="getInfluencedTaskList(scope.row)"
|
||||
/>
|
||||
<el-button :disabled="scope.row.RequestReReadingResultEnum !== 1" icon="el-icon-document-copy" circle
|
||||
:title="$t('trials:spmAudit:button:influenceList')" @click="getInfluencedTaskList(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
|
||||
@pagination="getList" />
|
||||
<base-model v-if="config.visible" :config="config">
|
||||
<template slot="dialog-body">
|
||||
<el-form ref="imageBackform" :model="form" class="demo-form-inline" :rules="rules"
|
||||
:label-width="isEN ? '200px' : '150px'">
|
||||
<el-form-item :label="$t('trials:spmAudit:table:Matters')" prop="Matters">
|
||||
<span>{{ rowData.title }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:spmAudit:form:ApplyReason')" prop="ApplyReason">
|
||||
<span>{{ rowData.RequestReReadingReason }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:spmAudit:form:IsAgree')" prop="RequestReReadingResultEnum">
|
||||
<el-radio-group v-model="form.RequestReReadingResultEnum">
|
||||
<el-radio :label="1">{{ $t('trials:spmAudit:button:auditYes') }}</el-radio>
|
||||
<el-radio :label="2">{{ $t('trials:spmAudit:button:auditNo') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:spmAudit:form:ResultRemark')" v-if="form.RequestReReadingResultEnum !== 2"
|
||||
key="1">
|
||||
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder=""
|
||||
v-model="form.RequestReReadingRejectReason">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:spmAudit:form:ResultRemark')" prop="RequestReReadingRejectReason" v-else
|
||||
key="2">
|
||||
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder=""
|
||||
v-model="form.RequestReReadingRejectReason">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:reviewTrack:dialog:backImpactList')" />
|
||||
<el-table v-loading="loading" :data="InfluenceTaskList" stripe height="100" style="min-height:200px;max-height: 300px">
|
||||
<!-- 任务编号 -->
|
||||
<el-table-column prop="TaskCode" :label="$t('trials:reviewTrack:table:taskCode')" min-width="100"
|
||||
show-overflow-tooltip />
|
||||
<!-- 中心编号 -->
|
||||
<el-table-column prop="TrialSiteCode" :label="$t('trials:reviewTrack:table:siteCode')" min-width="100"
|
||||
show-overflow-tooltip />
|
||||
<!-- 受试者编号 -->
|
||||
<el-table-column prop="SubjectCode" :label="$t('trials:reviewTrack:table:subjectCode')" min-width="120"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="
|
||||
scope.row.BlindSubjectCode &&
|
||||
scope.row.BlindSubjectCode !== scope.row.SubjectCode
|
||||
">
|
||||
{{ `${scope.row.SubjectCode}/${scope.row.BlindSubjectCode}` }}
|
||||
</span>
|
||||
<span v-else>{{ scope.row.SubjectCode }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 任务名称 -->
|
||||
<el-table-column prop="VisitTaskNum" :label="$t('trials:reviewTrack:table:taskName')" min-width="120"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="
|
||||
scope.row.TaskBlindName &&
|
||||
scope.row.TaskName !== scope.row.TaskBlindName
|
||||
">
|
||||
{{ `${scope.row.TaskName}/${scope.row.TaskBlindName}` }}
|
||||
</span>
|
||||
<span v-else>{{ scope.row.TaskName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 盲态任务标识 -->
|
||||
<!-- <el-table-column
|
||||
prop="TaskBlindName"
|
||||
:label="$t('trials:reviewTrack:table:blindName')"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
/> -->
|
||||
<!-- 阅片标准 -->
|
||||
<el-table-column prop="TrialReadingCriterionName" :label="$t('trials:reviewTrack:table:criterionName')"
|
||||
min-width="100" show-overflow-tooltip />
|
||||
<!-- 任务状态 -->
|
||||
<el-table-column prop="TaskState" :label="$t('trials:reviewTrack:table:taskStatus')" min-width="100"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.TaskState === 0" type="primary">{{
|
||||
$fd('TaskState', scope.row.TaskState)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.TaskState === 1" type="info">{{
|
||||
$fd('TaskState', scope.row.TaskState)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.TaskState === 3" type="danger">{{
|
||||
$fd('TaskState', scope.row.TaskState)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.TaskState === 4" type="warning">{{
|
||||
$fd('TaskState', scope.row.TaskState)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.TaskState === 5" type="danger">{{
|
||||
$fd('TaskState', scope.row.TaskState)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 任务类型 -->
|
||||
<el-table-column prop="ReadingCategory" min-width="100" :label="$t('trials:reviewTrack:table:taskType')"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.ReadingCategory === 1" type="primary">{{
|
||||
$fd('ReadingCategory', scope.row.ReadingCategory)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.ReadingCategory === 2" type="info">{{
|
||||
$fd('ReadingCategory', scope.row.ReadingCategory)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.ReadingCategory === 4" type="danger">{{
|
||||
$fd('ReadingCategory', scope.row.ReadingCategory)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.ReadingCategory === 5" type="warning">{{
|
||||
$fd('ReadingCategory', scope.row.ReadingCategory)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 阅片状态 -->
|
||||
<el-table-column prop="ReadingTaskState" :label="$t('trials:reviewTrack:table:readingStatus')"
|
||||
min-width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.ReadingTaskState === 2" type="primary">{{
|
||||
$fd('ReadingTaskState', scope.row.ReadingTaskState)
|
||||
}}</el-tag>
|
||||
<el-tag v-else type="danger">{{
|
||||
$fd('ReadingTaskState', scope.row.ReadingTaskState)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 生效后影响 -->
|
||||
<el-table-column prop="OptType" :label="$t('trials:reviewTrack:applyReread:title:postEffectiveImpacts')
|
||||
" min-width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.OptType === 0" type="primary">{{
|
||||
$fd('ReReadingOrBackOptType', scope.row.OptType)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.OptType === 1" type="danger">{{
|
||||
$fd('ReReadingOrBackOptType', scope.row.OptType)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.OptType === 2" type="warning">{{
|
||||
$fd('ReReadingOrBackOptType', scope.row.OptType)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 阅片人 -->
|
||||
<el-table-column prop="UserName" :label="$t('trials:reviewTrack:table:reader')" min-width="160"
|
||||
show-overflow-tooltip>
|
||||
<template v-if="scope.row.DoctorUser" slot-scope="scope">
|
||||
{{ scope.row.DoctorUser.UserName }}({{
|
||||
scope.row.DoctorUser.FullName
|
||||
}})
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</template>
|
||||
<template slot="dialog-footer">
|
||||
<el-button type="primary" @click="auditImageBack" :loading="loading">
|
||||
{{ $t('common:button:confirm') }}
|
||||
</el-button>
|
||||
<el-button @click="config.visible = false" :loading="loading">
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</base-model>
|
||||
<!-- 驳回 +++-->
|
||||
<el-dialog
|
||||
v-if="ConfirmReReadingVisible"
|
||||
:title="$t('trials:spmAudit:title:rejected')"
|
||||
:visible.sync="ConfirmReReadingVisible"
|
||||
width="600px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<el-dialog v-if="ConfirmReReadingVisible" :title="$t('trials:spmAudit:title:rejected')"
|
||||
:visible.sync="ConfirmReReadingVisible" width="600px" append-to-body :close-on-click-modal="false"
|
||||
custom-class="base-dialog-wrapper">
|
||||
<div style="padding:10px;border: 1px solid #e0e0e0;max-height:650px;overflow-y: auto;">
|
||||
<el-form
|
||||
ref="reasonForm"
|
||||
:rules="rules"
|
||||
:model="ConfirmReReadingForm"
|
||||
class="demo-ruleForm"
|
||||
size="small"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form ref="reasonForm" :rules="rules" :model="ConfirmReReadingForm" class="demo-ruleForm" size="small"
|
||||
label-width="120px">
|
||||
<!-- 驳回原因 -->
|
||||
<el-form-item :label="$t('trials:spmAudit:title:rejectedReason')" prop="RequestReReadingRejectReason">
|
||||
<el-input
|
||||
v-model="ConfirmReReadingForm.RequestReReadingRejectReason"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:placeholder="$t('common:ruleMessage:specify')"
|
||||
maxlength="500"
|
||||
show-word-limit
|
||||
/>
|
||||
<el-input v-model="ConfirmReReadingForm.RequestReReadingRejectReason" type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }" :placeholder="$t('common:ruleMessage:specify')" maxlength="500"
|
||||
show-word-limit />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<!-- 取消 -->
|
||||
<el-button :disabled="btnLoading" size="small" type="primary" @click="ConfirmReReadingVisible = false;ConfirmReReadingForm = { RequestReReadingRejectReason: null }">
|
||||
<el-button :disabled="btnLoading" size="small" type="primary"
|
||||
@click="ConfirmReReadingVisible = false; ConfirmReReadingForm = { RequestReReadingRejectReason: null }">
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
@@ -352,137 +408,95 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- '重阅影响任务列表' : '已影响任务列表'" +++-->
|
||||
<el-dialog
|
||||
v-if="ReReadingOrBackVisible"
|
||||
:title="opentype === 'read' ? this.$t('trials:spmAudit:title:title1'):this.$t('trials:spmAudit:title:title2')"
|
||||
:visible.sync="ReReadingOrBackVisible"
|
||||
width="1460px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<el-dialog v-if="ReReadingOrBackVisible"
|
||||
:title="opentype === 'read' ? this.$t('trials:spmAudit:title:title1') : this.$t('trials:spmAudit:title:title2')"
|
||||
:visible.sync="ReReadingOrBackVisible" width="1460px" append-to-body :close-on-click-modal="false"
|
||||
custom-class="base-dialog-wrapper">
|
||||
<div class="base-dialog-body">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="InfluenceTaskList"
|
||||
stripe
|
||||
height="100"
|
||||
style="min-height: 400px;"
|
||||
>
|
||||
<el-table v-loading="loading" :data="InfluenceTaskList" stripe height="100" style="min-height: 400px;">
|
||||
<!-- 任务编号 -->
|
||||
<el-table-column
|
||||
prop="TaskCode"
|
||||
:label="$t('trials:readTask:table:taskCode')"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="TaskCode" :label="$t('trials:readTask:table:taskCode')" min-width="100"
|
||||
show-overflow-tooltip />
|
||||
<!-- 中心编号 -->
|
||||
<el-table-column
|
||||
prop="TrialSiteCode"
|
||||
:label="$t('trials:readTask:table:siteCode')"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="TrialSiteCode" :label="$t('trials:readTask:table:siteCode')" min-width="100"
|
||||
show-overflow-tooltip />
|
||||
<!-- 受试者编号 -->
|
||||
<el-table-column
|
||||
prop="SubjectCode"
|
||||
:label="$t('trials:readTask:table:subjectCode')"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="SubjectCode" :label="$t('trials:readTask:table:subjectCode')" min-width="120"
|
||||
show-overflow-tooltip />
|
||||
<!-- 访视/阅片期名称 -->
|
||||
<el-table-column
|
||||
prop="VisitTaskNum"
|
||||
:label="$t('trials:consistencyCheck:table:visitName')"
|
||||
min-width="140"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="VisitTaskNum" :label="$t('trials:consistencyCheck:table:visitName')" min-width="140"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.TaskName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 盲态任务标识 -->
|
||||
<el-table-column
|
||||
prop="TaskBlindName"
|
||||
:label="$t('trials:readTask:table:blindName')"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="TaskBlindName" :label="$t('trials:readTask:table:blindName')" min-width="120"
|
||||
show-overflow-tooltip />
|
||||
<!-- 阅片标准 -->
|
||||
<el-table-column
|
||||
prop="TrialReadingCriterionName"
|
||||
:label="$t('trials:readTask:table:criterionName')"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="TrialReadingCriterionName" :label="$t('trials:readTask:table:criterionName')"
|
||||
min-width="100" show-overflow-tooltip />
|
||||
<!-- 任务状态 -->
|
||||
<el-table-column
|
||||
prop="TaskState"
|
||||
:label="$t('trials:readTask:table:taskState')"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="TaskState" :label="$t('trials:readTask:table:taskState')" min-width="100"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.TaskState === 0" type="primary">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
|
||||
<el-tag v-if="scope.row.TaskState === 1" type="info">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
|
||||
<el-tag v-if="scope.row.TaskState === 3" type="danger">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
|
||||
<el-tag v-if="scope.row.TaskState === 4" type="warning">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
|
||||
<el-tag v-if="scope.row.TaskState === 5" type="danger">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
|
||||
<el-tag v-if="scope.row.TaskState === 0" type="primary">{{ $fd('TaskState', scope.row.TaskState)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.TaskState === 1" type="info">{{ $fd('TaskState', scope.row.TaskState)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.TaskState === 3" type="danger">{{ $fd('TaskState', scope.row.TaskState)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.TaskState === 4" type="warning">{{ $fd('TaskState', scope.row.TaskState)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.TaskState === 5" type="danger">{{ $fd('TaskState', scope.row.TaskState)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 任务类型 -->
|
||||
<el-table-column
|
||||
prop="ReadingCategory"
|
||||
min-width="100"
|
||||
:label="$t('trials:readTask:table:readingCategory')"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="ReadingCategory" min-width="100" :label="$t('trials:readTask:table:readingCategory')"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.ReadingCategory === 1" type="primary">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
|
||||
<el-tag v-if="scope.row.ReadingCategory === 2" type="info">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
|
||||
<el-tag v-if="scope.row.ReadingCategory === 4" type="danger">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
|
||||
<el-tag v-if="scope.row.ReadingCategory === 5" type="warning">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
|
||||
<el-tag v-if="scope.row.ReadingCategory === 1" type="primary">{{ $fd('ReadingCategory',
|
||||
scope.row.ReadingCategory) }}</el-tag>
|
||||
<el-tag v-if="scope.row.ReadingCategory === 2" type="info">{{ $fd('ReadingCategory',
|
||||
scope.row.ReadingCategory) }}</el-tag>
|
||||
<el-tag v-if="scope.row.ReadingCategory === 4" type="danger">{{ $fd('ReadingCategory',
|
||||
scope.row.ReadingCategory) }}</el-tag>
|
||||
<el-tag v-if="scope.row.ReadingCategory === 5" type="warning">{{ $fd('ReadingCategory',
|
||||
scope.row.ReadingCategory) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 阅片状态 -->
|
||||
<el-table-column
|
||||
prop="ReadingTaskState"
|
||||
:label="$t('trials:readTask:table:readingTaskState')"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="ReadingTaskState" :label="$t('trials:readTask:table:readingTaskState')"
|
||||
min-width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.ReadingTaskState === 2" type="primary">{{ $fd('ReadingTaskState', scope.row.ReadingTaskState) }}</el-tag>
|
||||
<el-tag v-if="scope.row.ReadingTaskState === 2" type="primary">{{ $fd('ReadingTaskState',
|
||||
scope.row.ReadingTaskState) }}</el-tag>
|
||||
<el-tag v-else type="danger">{{ $fd('ReadingTaskState', scope.row.ReadingTaskState) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 生效后影响 -->
|
||||
<el-table-column
|
||||
prop="OptType"
|
||||
:label="$t('trials:readTask:table:optType')"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="OptType" :label="$t('trials:readTask:table:optType')" min-width="100"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.OptType === 0" type="primary">{{ $fd('ReReadingOrBackOptType', scope.row.OptType) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OptType === 1" type="danger">{{ $fd('ReReadingOrBackOptType', scope.row.OptType) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OptType === 2" type="warning">{{ $fd('ReReadingOrBackOptType', scope.row.OptType) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OptType === 0" type="primary">{{ $fd('ReReadingOrBackOptType',
|
||||
scope.row.OptType) }}</el-tag>
|
||||
<el-tag v-if="scope.row.OptType === 1" type="danger">{{ $fd('ReReadingOrBackOptType', scope.row.OptType)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.OptType === 2" type="warning">{{ $fd('ReReadingOrBackOptType',
|
||||
scope.row.OptType) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 阅片人 -->
|
||||
<el-table-column
|
||||
prop="UserName"
|
||||
:label="$t('trials:readTask:table:reader')"
|
||||
min-width="160"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="UserName" :label="$t('trials:readTask:table:reader')" min-width="160"
|
||||
show-overflow-tooltip>
|
||||
<template v-if="scope.row.DoctorUser" slot-scope="scope">
|
||||
{{ scope.row.DoctorUser.UserName }}({{ scope.row.DoctorUser.FullName }})
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div v-if="opentype==='read'" slot="footer" class="dialog-footer">
|
||||
<div v-if="opentype === 'read'" slot="footer" class="dialog-footer">
|
||||
<!-- 取消 -->
|
||||
<el-button :disabled="btnLoading" size="small" type="primary" @click="ReReadingOrBackVisible = false">
|
||||
{{ $t('common:button:cancel') }}
|
||||
@@ -493,16 +507,11 @@
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:destroy-on-close="true"
|
||||
:visible.sync="signVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="600px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<el-dialog :destroy-on-close="true" :visible.sync="signVisible" :close-on-click-modal="false" width="600px"
|
||||
custom-class="base-dialog-wrapper">
|
||||
<div slot="title">
|
||||
<span style="font-size:18px;">{{ $t('common:dialogTitle:sign') }}</span>
|
||||
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${ currentUser })` }}</span>
|
||||
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${currentUser})` }}</span>
|
||||
</div>
|
||||
<SignForm ref="signForm" :sign-code-enum="signCode" @closeDialog="closeSignDialog" />
|
||||
</el-dialog>
|
||||
@@ -518,7 +527,7 @@ import { getToken } from '@/utils/auth'
|
||||
import { changeURLStatic } from '@/utils/history.js'
|
||||
import const_ from '@/const/sign-code'
|
||||
import SignForm from '@/views/trials/components/newSignForm'
|
||||
|
||||
import baseModel from '@/components/BaseModel'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
PageIndex: 1,
|
||||
@@ -542,7 +551,7 @@ const searchDataDefault = () => {
|
||||
}
|
||||
export default {
|
||||
name: 'TrialsNotice',
|
||||
components: { BaseContainer, Pagination, SignForm },
|
||||
components: { BaseContainer, Pagination, SignForm, baseModel },
|
||||
data() {
|
||||
return {
|
||||
searchData: searchDataDefault(),
|
||||
@@ -593,9 +602,40 @@ export default {
|
||||
readVisible: false,
|
||||
TaskOptType: null,
|
||||
OtherInfo: null,
|
||||
ReadingType: null
|
||||
ReadingType: null,
|
||||
config: {
|
||||
visible: false,
|
||||
title: this.$t("trials:spmAudit:confirmMessage:imageBack"),
|
||||
width: '1000px',
|
||||
appendToBody: true,
|
||||
},
|
||||
form: {
|
||||
RequestReReadingResultEnum: null,
|
||||
RequestReReadingRejectReason: null
|
||||
},
|
||||
rules: {
|
||||
RequestReReadingResultEnum: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:select'),
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
RequestReReadingRejectReason: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isEN() {
|
||||
return this.$i18n.locale !== 'zh'
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (this.$route.query.SiteId) {
|
||||
this.searchData.TrialSiteId = this.$route.query.SiteId
|
||||
@@ -612,6 +652,39 @@ export default {
|
||||
this.getDoctorUserSelectList()
|
||||
},
|
||||
methods: {
|
||||
async auditImageBack() {
|
||||
try {
|
||||
console.log(this.form)
|
||||
let validate = await this.$refs.imageBackform.validate()
|
||||
if (!validate) return false
|
||||
this.confirmSign(this.form.RequestReReadingResultEnum)
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
async audit(row) {
|
||||
try {
|
||||
this.rowData = Object.assign({}, row)
|
||||
this.rowData.title = `${row.ApplicantName} (${this.$fd('RequestReReadingType', row.RequestReReadingType)}) ${this.$t('trials:spmAudit:title:imageBack').replace('xxx', row.OriginalReReadingTask.SubjectCode).replace('yyy', row.OriginalReReadingTask.TaskName)}`
|
||||
Object.keys(this.form).forEach(key => {
|
||||
this.form[key] = null
|
||||
})
|
||||
this.loading = true
|
||||
let res = await getReReadingOrBackInfluenceTaskList(
|
||||
row.OriginalReReadingTaskId,
|
||||
true,
|
||||
row.Id
|
||||
)
|
||||
if (res.IsSuccess) {
|
||||
this.InfluenceTaskList = res.Result
|
||||
this.config.visible = true
|
||||
this.loading = false
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
getInfluencedTaskList(row) {
|
||||
this.loading = true
|
||||
this.opentype = 'look'
|
||||
@@ -663,7 +736,7 @@ export default {
|
||||
return
|
||||
}
|
||||
if (type === 2) {
|
||||
this.$refs.reasonForm.validate((valid) => {
|
||||
this.$refs.imageBackform.validate((valid) => {
|
||||
if (!valid) return
|
||||
var params = {
|
||||
data: {
|
||||
@@ -675,7 +748,7 @@ export default {
|
||||
NewReReadingTaskId: row.NewReReadingTaskId
|
||||
}
|
||||
],
|
||||
RequestReReadingRejectReason: this.ConfirmReReadingForm.RequestReReadingRejectReason,
|
||||
RequestReReadingRejectReason: this.form.RequestReReadingRejectReason,
|
||||
TrialId: this.$route.query.trialId,
|
||||
RequestReReadingResultEnum: type
|
||||
},
|
||||
@@ -688,7 +761,7 @@ export default {
|
||||
this.btnLoading = false
|
||||
this.$message.success(`${type === 1 ? this.$t('trials:spmAudit:title:title4') : this.$t('trials:spmAudit:title:title5')}`)
|
||||
this.getList()
|
||||
this.ConfirmReReadingVisible = false
|
||||
this.config.visible = false
|
||||
this.$refs['signForm'].btnLoading = false
|
||||
this.signVisible = false
|
||||
}).catch(() => {
|
||||
@@ -720,7 +793,7 @@ export default {
|
||||
this.loading = false
|
||||
this.btnLoading = false
|
||||
this.$message.success(`${type === 1 ? this.$t('trials:spmAudit:title:title4') : this.$t('trials:spmAudit:title:title5')}`)
|
||||
this.ReReadingOrBackVisible = false
|
||||
this.config.visible = false
|
||||
this.$refs['signForm'].btnLoading = false
|
||||
this.signVisible = false
|
||||
this.getList()
|
||||
@@ -787,22 +860,25 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .hidden-row{
|
||||
::v-deep .hidden-row {
|
||||
display: none;
|
||||
}
|
||||
|
||||
::v-deep .el-dialog__body {
|
||||
padding: 15px 20px;
|
||||
}
|
||||
|
||||
::v-deep .el-tag--danger.el-tag--dark {
|
||||
// background-color: #f56c6c!important;
|
||||
border-color: none!important;
|
||||
border-color: none !important;
|
||||
// color: #fff!important;
|
||||
}
|
||||
::v-deep #TaskAllocationRuleList thead .el-checkbox__inner{
|
||||
|
||||
::v-deep #TaskAllocationRuleList thead .el-checkbox__inner {
|
||||
display: none;
|
||||
}
|
||||
::v-deep .el-descriptions-item__label.has-colon:after{
|
||||
|
||||
::v-deep .el-descriptions-item__label.has-colon:after {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -130,10 +130,12 @@
|
||||
<SignForm :is-system-doc="currentRow.IsSystemDoc" :document-id="currentRow.Id" :file-name="fileName"
|
||||
:trial-id="trialId" @closeDialog="closeSignDialog" />
|
||||
</el-dialog>
|
||||
<attachmentList v-if="config.visible" :config="config" :rowData="currentRow" :SystemDocumentId="SystemDocumentId"
|
||||
:isView="true" @getList="getList" />
|
||||
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" :isView="true"
|
||||
v-if="perview_visible" />
|
||||
<attachmentList2 v-if="config.visible && !currentRow.IsSystemDoc" :config="config" :rowData="currentRow"
|
||||
:TrialDocumentId="TrialDocumentId" :isView="true" @getList="getList" />
|
||||
<attachmentList v-if="config.visible && currentRow.IsSystemDoc" :config="config" :rowData="currentRow"
|
||||
:SystemDocumentId="TrialDocumentId" :isView="true" @getList="getList" />
|
||||
<attachmentPreview :SystemDocumentId="TrialDocumentId" :isTrial="!currentRow.IsSystemDoc"
|
||||
:visible.sync="perview_visible" :isView="true" v-if="perview_visible" />
|
||||
</BaseContainer>
|
||||
</template>
|
||||
<script>
|
||||
@@ -145,6 +147,7 @@ import SignForm from './components/SignForm'
|
||||
import store from '@/store'
|
||||
import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview'
|
||||
import attachmentList from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentList'
|
||||
import attachmentList2 from '@/views/trials/trials-panel/setting/attachment/components/attachmentList'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
FileTypeId: '',
|
||||
@@ -158,7 +161,7 @@ const searchDataDefault = () => {
|
||||
}
|
||||
export default {
|
||||
name: 'TrialAttachments',
|
||||
components: { BaseContainer, Pagination, PreviewFile, SignForm, attachmentPreview, attachmentList },
|
||||
components: { BaseContainer, Pagination, PreviewFile, SignForm, attachmentPreview, attachmentList, attachmentList2 },
|
||||
data() {
|
||||
return {
|
||||
searchData: searchDataDefault(),
|
||||
@@ -180,7 +183,7 @@ export default {
|
||||
currentUser: zzSessionStorage.getItem('userName'),
|
||||
typeOptions: [],
|
||||
trialId: this.$route.query.trialId,
|
||||
SystemDocumentId: null,
|
||||
TrialDocumentId: null,
|
||||
perview_visible: null,
|
||||
config: {
|
||||
visible: false,
|
||||
@@ -205,7 +208,7 @@ export default {
|
||||
methods: {
|
||||
openAttachment(row, isList = false) {
|
||||
if (!row.AttachmentCount) return false
|
||||
this.SystemDocumentId = row.Id
|
||||
this.TrialDocumentId = row.Id
|
||||
this.currentRow = { ...row }
|
||||
if (!isList) {
|
||||
this.perview_visible = true
|
||||
|
||||
@@ -1694,7 +1694,7 @@ export default {
|
||||
cornerstoneTools.getToolState(
|
||||
this.canvas,
|
||||
'playClip'
|
||||
).data[0].loop = false
|
||||
).data[0].loop = true
|
||||
} else {
|
||||
cornerstoneTools.stopClip(this.canvas)
|
||||
this.toolState.clipPlaying = false
|
||||
|
||||
@@ -8,27 +8,39 @@
|
||||
<span style="margin-left:5px;">{{ taskBlindName }}</span>
|
||||
</h3>
|
||||
<div v-if="readingTaskState < 2">
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')"
|
||||
placement="bottom">
|
||||
<i class="el-icon-refresh-left" @click="resetMeasuredData" />
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')" placement="bottom">
|
||||
<i
|
||||
class="el-icon-refresh-left"
|
||||
@click="resetMeasuredData"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 影像质量问题 -->
|
||||
<div class="lesions">
|
||||
<Questions ref="ecrf" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
|
||||
:group-classify="1" />
|
||||
<Questions
|
||||
ref="ecrf"
|
||||
:question-form-change-state="true"
|
||||
:question-form-change-num="0"
|
||||
:is-qulity-issues="false"
|
||||
:group-classify="1"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 测量问题 -->
|
||||
<template v-if="questions.length > 0">
|
||||
<div v-for="(qs, index) in questions" :key="index" v-loading="loading" class="lesions lesions_wrapper"
|
||||
style="margin-bottom: 10px">
|
||||
<div v-for="(qs,index) in questions" :key="index" v-loading="loading" class="lesions lesions_wrapper" style="margin-bottom: 10px">
|
||||
<h4 v-if="qs.Type === 'group'" style="color: #ddd;padding: 5px 0px;margin: 0;">
|
||||
{{ language === 'en' ? qs.GroupEnName : qs.GroupName }}
|
||||
{{ language==='en'?qs.GroupEnName:qs.GroupName }}
|
||||
</h4>
|
||||
<div class="lesion_list">
|
||||
<el-form v-if="questions.length > 0" :ref="`questions${index}`" size="small" :model="questionForm">
|
||||
<el-form
|
||||
v-if="questions.length > 0"
|
||||
:ref="`questions${index}`"
|
||||
size="small"
|
||||
:model="questionForm"
|
||||
>
|
||||
<div class="table-wrapper">
|
||||
<div v-for="item in qs.Childrens" :key="item.Id">
|
||||
<div v-if="item.Type === 'basicTable'" class="flex-row" style="margin:3px 0;">
|
||||
@@ -40,25 +52,34 @@
|
||||
<div class="add-icon" style="margin: 0 5px;" @click.prevent="uploadTpl(item.LesionType)">
|
||||
<i class="el-icon-upload2" />
|
||||
</div>
|
||||
<div class="add-icon" @click.prevent="handleAddOrEdit('add', item)">
|
||||
<div class="add-icon" @click.prevent="handleAddOrEdit('add',item)">
|
||||
<i class="el-icon-plus" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<el-table v-if="item.Type === 'basicTable' && item.TableQuestions" :ref="item.Id"
|
||||
:data="item.TableQuestions.Answers">
|
||||
<el-table
|
||||
v-if="item.Type === 'basicTable' && item.TableQuestions"
|
||||
:ref="item.Id"
|
||||
:data="item.TableQuestions.Answers"
|
||||
>
|
||||
<!-- <el-table-column :label="$t('CustomizeQuestionFormItem:label:OrderMark')" width="60px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ getLesionName(item.OrderMark,scope.row.RowIndex) }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column
|
||||
type="index"
|
||||
width="40px"
|
||||
/> -->
|
||||
<el-table-column v-for="q of item.TableQuestions.Questions" :key="q.Id" :prop="q.Id"
|
||||
:label="q.QuestionName" show-overflow-tooltip :render-header="renderHeader">
|
||||
<el-table-column
|
||||
v-for="q of item.TableQuestions.Questions"
|
||||
:key="q.Id"
|
||||
:prop="q.Id"
|
||||
:label="q.QuestionName"
|
||||
show-overflow-tooltip
|
||||
:render-header="renderHeader"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="q.Unit > 0 && !isNaN(parseFloat(scope.row[q.Id]))">
|
||||
{{ `${scope.row[q.Id]} ${$fd('ValueUnit', parseInt(q.Unit))}` }}
|
||||
@@ -71,10 +92,14 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="readingTaskState < 2 && item.LesionType === 102"
|
||||
:label="$t('common:action:action')" width="90px" fixed="right">
|
||||
<el-table-column
|
||||
v-if="readingTaskState < 2 && item.LesionType === 102"
|
||||
:label="$t('common:action:action')"
|
||||
width="90px"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="handleAddOrEdit('edit', item, scope.$index)">
|
||||
<el-button type="text" size="mini" @click="handleAddOrEdit('edit',item, scope.$index)">
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<el-button type="text" size="mini" @click="handleDelete(item, scope.$index)">
|
||||
@@ -86,57 +111,41 @@
|
||||
|
||||
<template v-else>
|
||||
<!-- 数值 -->
|
||||
<el-form-item v-if="item.ShowQuestion !== 2" :key="item.Id" :label="`${item.QuestionName}`"
|
||||
:prop="item.Id" :rules="[
|
||||
{
|
||||
required: (item.IsRequired === 0 || (item.IsRequired === 1 && item.RelevanceId && (item.RelevanceValue.includes(questionForm[item.RelevanceId])))) && item.Type !== 'group' && item.Type !== 'summary',
|
||||
message: ['radio', 'select', 'checkbox'].includes(item.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur', 'change']
|
||||
},
|
||||
]">
|
||||
<el-form-item
|
||||
v-if="item.ShowQuestion!==2"
|
||||
:key="item.Id"
|
||||
:label="`${item.QuestionName}`"
|
||||
:prop="item.Id"
|
||||
:rules="[
|
||||
{ required: (item.IsRequired === 0 || (item.IsRequired ===1 && item.RelevanceId && (item.RelevanceValue.includes(questionForm[item.RelevanceId])))) && item.Type!=='group' && item.Type!=='summary',
|
||||
message:['radio', 'select', 'checkbox'].includes(item.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur','change']},
|
||||
]"
|
||||
>
|
||||
<!-- 数值类型 -->
|
||||
<template v-if="item.Type === 'textarea'">
|
||||
<el-input v-model="questionForm[item.Id]" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }"
|
||||
:disabled="!isCurrentTask || readingTaskState >= 2"
|
||||
@change="((val) => { formItemChange(val, item) })" />
|
||||
</template>
|
||||
<template v-if="item.Type === 'number'">
|
||||
<el-input-number v-model="questionForm[item.Id]"
|
||||
:disabled="!isCurrentTask || readingTaskState >= 2" :precision="0"
|
||||
@change="((val) => { formItemChange(val, item) })" />
|
||||
</template>
|
||||
<template v-if="item.Type === 'select'">
|
||||
<el-select v-model="questionForm[item.Id]" :disabled="!isCurrentTask || readingTaskState >= 2"
|
||||
@change="((val) => { formItemChange(val, item) })">
|
||||
<el-option v-for="dict of $d[item.DictionaryCode]" :key="dict.id" :value="String(dict.value)"
|
||||
:label="dict.label" />
|
||||
</el-select>
|
||||
<template v-if="item.Type==='textarea'">
|
||||
<el-input
|
||||
v-model="questionForm[qs.Id]"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||
@change="((val)=>{formItemChange(val, qs)})"
|
||||
/>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<template v-if="item.Childrens && item.Childrens.length > 0">
|
||||
<template v-for="child in item.Childrens">
|
||||
<el-form-item :key="child.Id"
|
||||
v-if="(child.ShowQuestion === 1 && child.ParentTriggerValueList.includes(String(questionForm[item.Id]))) || child.ShowQuestion === 0"
|
||||
:label="`${child.QuestionName}`" :prop="child.Id" :rules="[
|
||||
{
|
||||
required: (child.IsRequired === 0 || (child.IsRequired === 1 && child.RelevanceId && (child.RelevanceValue.includes(questionForm[child.RelevanceId])))) && child.Type !== 'group' && child.Type !== 'summary',
|
||||
message: ['radio', 'select', 'checkbox'].includes(child.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur', 'change']
|
||||
},
|
||||
]">
|
||||
<template v-if="child.Type === 'input'">
|
||||
<el-input v-model="questionForm[child.Id]"
|
||||
:disabled="!isCurrentTask || readingTaskState >= 2"
|
||||
@change="((val) => { formItemChange(val, child) })" />
|
||||
</template>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<div v-if="isCurrentTask && readingTaskState < 2 && (qs.GroupClassify === 5 || qs.GroupClassify === 6)"
|
||||
class="base-dialog-footer" style="text-align:right;margin-top:10px;">
|
||||
<div
|
||||
v-if="isCurrentTask && readingTaskState<2 && qs.GroupClassify === 5"
|
||||
class="base-dialog-footer"
|
||||
style="text-align:right;margin-top:10px;"
|
||||
>
|
||||
<!-- 保存 -->
|
||||
<el-button type="primary" size="mini" :disabled="!formChanged" @click="handleSave(index)">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
:disabled="!formChanged"
|
||||
@click="handleSave(index)"
|
||||
>
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -147,21 +156,51 @@
|
||||
</template>
|
||||
|
||||
<!-- 计算值 -->
|
||||
<Questions ref="ecrf2" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
|
||||
:group-classify="4" style="margin-top:20px" />
|
||||
<Questions
|
||||
ref="ecrf2"
|
||||
:question-form-change-state="true"
|
||||
:question-form-change-num="0"
|
||||
:is-qulity-issues="false"
|
||||
:group-classify="4"
|
||||
style="margin-top:20px"
|
||||
/>
|
||||
|
||||
<!-- 评估结果 -->
|
||||
<Questions ref="ecrf3" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
|
||||
:group-classify="5" />
|
||||
<Questions
|
||||
ref="ecrf3"
|
||||
:question-form-change-state="true"
|
||||
:question-form-change-num="0"
|
||||
:is-qulity-issues="false"
|
||||
:group-classify="5"
|
||||
/>
|
||||
<!-- 新增、编辑弹窗 -->
|
||||
<el-dialog v-if="addOrEdit.visible" :visible.sync="addOrEdit.visible" :close-on-click-modal="false"
|
||||
:title="addOrEdit.title" width="500px">
|
||||
<el-form ref="tableQsForm" v-loading="loading" :model="qsForm" size="small">
|
||||
<QuestionTableFormItem v-for="item in qsList" :key="item.Id" :question="item" :question-form="qsForm"
|
||||
:reading-task-state="readingTaskState" @setFormItemData="setFormItemData"
|
||||
@resetFormItemData="resetFormItemData" />
|
||||
<el-dialog
|
||||
v-if="addOrEdit.visible"
|
||||
:visible.sync="addOrEdit.visible"
|
||||
:close-on-click-modal="false"
|
||||
:title="addOrEdit.title"
|
||||
width="500px"
|
||||
>
|
||||
<el-form
|
||||
ref="tableQsForm"
|
||||
v-loading="loading"
|
||||
:model="qsForm"
|
||||
size="small"
|
||||
>
|
||||
<QuestionTableFormItem
|
||||
v-for="item in qsList"
|
||||
:key="item.Id"
|
||||
:question="item"
|
||||
:question-form="qsForm"
|
||||
:reading-task-state="readingTaskState"
|
||||
@setFormItemData="setFormItemData"
|
||||
@resetFormItemData="resetFormItemData"
|
||||
/>
|
||||
<el-form-item style="text-align: right">
|
||||
<el-button size="small" @click="addOrEdit.visible = false">
|
||||
<el-button
|
||||
size="small"
|
||||
@click="addOrEdit.visible = false"
|
||||
>
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
@@ -172,9 +211,17 @@
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<!-- 导入 -->
|
||||
<el-dialog v-if="upload.visible" :visible.sync="upload.visible" :close-on-click-modal="false"
|
||||
:title="upload.title" width="500px">
|
||||
<UploadExcel :visit-task-id="visitTaskId" @close="uploadDlgClose" />
|
||||
<el-dialog
|
||||
v-if="upload.visible"
|
||||
:visible.sync="upload.visible"
|
||||
:close-on-click-modal="false"
|
||||
:title="upload.title"
|
||||
width="500px"
|
||||
>
|
||||
<UploadExcel
|
||||
:visit-task-id="visitTaskId"
|
||||
@close="uploadDlgClose"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
@@ -438,22 +485,8 @@ export default {
|
||||
setMeasuredData(measureData) {
|
||||
|
||||
},
|
||||
formItemChange(val, item) {
|
||||
formItemChange() {
|
||||
this.formChanged = true
|
||||
if (item.Type === 'number') {
|
||||
this.limitBlur(item.Id, item.ValueType)
|
||||
}
|
||||
if (question.Childrens.length > 0) {
|
||||
this.resetChild(question.Childrens)
|
||||
}
|
||||
},
|
||||
resetChild(obj) {
|
||||
obj.forEach(i => {
|
||||
this.resetData(i.Id)
|
||||
if (i.Childrens && i.Childrens.length > 0) {
|
||||
this.resetChild(i.Childrens)
|
||||
}
|
||||
})
|
||||
},
|
||||
limitBlur(qId, valueType) {
|
||||
const value = this.questionForm[qId]
|
||||
@@ -490,7 +523,7 @@ export default {
|
||||
answers: answers
|
||||
}
|
||||
try {
|
||||
await saveTaskQuestion(12, params)
|
||||
await saveTaskQuestion(8, params)
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
loading.close()
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
@@ -545,9 +578,6 @@ export default {
|
||||
},
|
||||
receiveMsg(event) {
|
||||
},
|
||||
resetData(v) {
|
||||
this.questionForm[v] = null
|
||||
},
|
||||
resetFormItemData(v) {
|
||||
this.qsForm[v] = null
|
||||
},
|
||||
@@ -700,25 +730,21 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.measurement-wrapper {
|
||||
.measurement-wrapper{
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
|
||||
.container {
|
||||
.container{
|
||||
padding: 10px;
|
||||
|
||||
.basic-info {
|
||||
.basic-info{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
h3 {
|
||||
h3{
|
||||
color: #ddd;
|
||||
padding: 5px 0px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
i {
|
||||
i{
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
@@ -726,16 +752,14 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
.title{
|
||||
padding: 5px;
|
||||
font-weight: bold;
|
||||
color: #ddd;
|
||||
font-size: 15px;
|
||||
|
||||
}
|
||||
|
||||
.add-icon {
|
||||
.add-icon{
|
||||
display: inline-block;
|
||||
padding: 5px;
|
||||
font-weight: bold;
|
||||
@@ -745,123 +769,103 @@ export default {
|
||||
margin-bottom: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.add-icon:hover {
|
||||
.add-icon:hover{
|
||||
background-color: #607d8b;
|
||||
}
|
||||
|
||||
.flex-row {
|
||||
.flex-row{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
background-color: #424242;
|
||||
|
||||
}
|
||||
|
||||
.lesion_list {
|
||||
.lesion_list{
|
||||
position: relative;
|
||||
|
||||
::v-deep .el-form-item__label {
|
||||
::v-deep .el-form-item__label{
|
||||
color: #c3c3c3;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
::v-deep .el-input .el-input__inner {
|
||||
::v-deep .el-input .el-input__inner{
|
||||
background-color: transparent;
|
||||
color: #ddd;
|
||||
border: 1px solid #5e5e5e;
|
||||
}
|
||||
|
||||
::v-deep .el-textarea__inner {
|
||||
::v-deep .el-textarea__inner{
|
||||
background-color: transparent;
|
||||
color: #ddd;
|
||||
border: 1px solid #5e5e5e;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item {
|
||||
::v-deep .el-form-item{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__content {
|
||||
::v-deep .el-form-item__content{
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
::v-deep .el-input.is-disabled .el-input__inner {
|
||||
::v-deep .el-input.is-disabled .el-input__inner{
|
||||
background-color: #646464a1;
|
||||
}
|
||||
::v-deep .el-select.is-disabled .el-input__inner{
|
||||
background-color: #646464a1;
|
||||
}
|
||||
|
||||
::v-deep .el-select.is-disabled .el-input__inner {
|
||||
background-color: #646464a1;
|
||||
}
|
||||
|
||||
.el-form-item__content .el-select {
|
||||
.el-form-item__content
|
||||
.el-select{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.table-wrapper {
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background: #d0d0d0;
|
||||
}
|
||||
|
||||
::v-deep .el-table,
|
||||
.el-table__expanded-cell {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
border-color: #444444;
|
||||
}
|
||||
|
||||
::v-deep .el-table th,
|
||||
.el-table tr {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
border-color: #444444;
|
||||
}
|
||||
|
||||
::v-deep .el-table__body tr>td {
|
||||
::v-deep .el-table__body tr > td {
|
||||
background-color: #000 !important;
|
||||
color: #fff;
|
||||
border-color: #444444;
|
||||
}
|
||||
|
||||
::v-deep .el-table__body tr:hover>td {
|
||||
::v-deep .el-table__body tr:hover > td {
|
||||
background-color: #858282 !important;
|
||||
color: #fff;
|
||||
border-color: #444444;
|
||||
}
|
||||
|
||||
::v-deep .el-table--border th.gutter:last-of-type {
|
||||
border: none;
|
||||
}
|
||||
|
||||
::v-deep .el-table__fixed-right {
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
// ::v-deep .el-table .cell {
|
||||
// line-height: 20px;
|
||||
// }
|
||||
::v-deep .el-table__cell {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
::v-deep.el-table__fixed-right-patch {
|
||||
background-color: #000 !important;
|
||||
border-color: #444444;
|
||||
}
|
||||
|
||||
::v-deep.el-table__fixed-body-wrapper tr:hover>td {
|
||||
::v-deep.el-table__fixed-body-wrapper tr:hover > td {
|
||||
background-color: #000 !important;
|
||||
}
|
||||
|
||||
::v-deep.el-table--scrollable-x .el-table__body-wrapper {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
@@ -7,28 +7,39 @@
|
||||
<span style="margin-left:5px;">{{ taskBlindName }}</span>
|
||||
</h3>
|
||||
<div v-if="readingTaskState < 2">
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')"
|
||||
placement="bottom">
|
||||
<i class="el-icon-refresh-left" @click="resetMeasuredData" />
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')" placement="bottom">
|
||||
<i
|
||||
class="el-icon-refresh-left"
|
||||
@click="resetMeasuredData"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 影像质量问题 -->
|
||||
<div class="lesions">
|
||||
<Questions ref="ecrf" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
|
||||
:group-classify="1" />
|
||||
<Questions
|
||||
ref="ecrf"
|
||||
:question-form-change-state="true"
|
||||
:question-form-change-num="0"
|
||||
:is-qulity-issues="false"
|
||||
:group-classify="1"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 测量问题 -->
|
||||
<template v-if="questions.length > 0">
|
||||
<div v-for="(qs, index) in questions" :key="index" v-loading="loading" class="lesions lesions_wrapper"
|
||||
style="margin-bottom: 10px">
|
||||
<div v-for="(qs,index) in questions" :key="index" v-loading="loading" class="lesions lesions_wrapper" style="margin-bottom: 10px">
|
||||
<h4 v-if="qs.Type === 'group'" style="color: #ddd;padding: 5px 0px;margin: 0;">
|
||||
{{ language === 'en' ? qs.GroupEnName : qs.GroupName }}
|
||||
{{ language==='en'?qs.GroupEnName:qs.GroupName }}
|
||||
</h4>
|
||||
<div class="lesion_list">
|
||||
<el-form v-if="questions.length > 0" :ref="`questions${index}`" size="small" :model="questionForm">
|
||||
<el-form
|
||||
v-if="questions.length > 0"
|
||||
:ref="`questions${index}`"
|
||||
size="small"
|
||||
:model="questionForm"
|
||||
>
|
||||
<div class="table-wrapper">
|
||||
<div v-for="item in qs.Childrens" :key="item.Id">
|
||||
<div v-if="item.Type === 'basicTable'" class="flex-row" style="margin:3px 0;">
|
||||
@@ -40,25 +51,35 @@
|
||||
<div class="add-icon" style="margin: 0 5px;" @click.prevent="uploadTpl(item.LesionType)">
|
||||
<i class="el-icon-upload2" />
|
||||
</div>
|
||||
<div class="add-icon" @click.prevent="handleAddOrEdit('add', item)">
|
||||
<div class="add-icon" @click.prevent="handleAddOrEdit('add',item)">
|
||||
<i class="el-icon-plus" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<el-table v-if="item.Type === 'basicTable' && item.TableQuestions" :ref="item.Id"
|
||||
:data="item.TableQuestions.Answers" max-height="600">
|
||||
<el-table
|
||||
v-if="item.Type === 'basicTable' && item.TableQuestions"
|
||||
:ref="item.Id"
|
||||
:data="item.TableQuestions.Answers"
|
||||
max-height="600"
|
||||
>
|
||||
<!-- <el-table-column :label="$t('CustomizeQuestionFormItem:label:OrderMark')" width="60px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ getLesionName(item.OrderMark,scope.row.RowIndex) }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column
|
||||
type="index"
|
||||
width="40px"
|
||||
/> -->
|
||||
<el-table-column v-for="q of item.TableQuestions.Questions" :key="q.Id" :prop="q.Id"
|
||||
:label="q.QuestionName" show-overflow-tooltip :render-header="renderHeader">
|
||||
<el-table-column
|
||||
v-for="q of item.TableQuestions.Questions"
|
||||
:key="q.Id"
|
||||
:prop="q.Id"
|
||||
:label="q.QuestionName"
|
||||
show-overflow-tooltip
|
||||
:render-header="renderHeader"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="q.Unit > 0 && !isNaN(parseFloat(scope.row[q.Id]))">
|
||||
{{ `${scope.row[q.Id]} ${$fd('ValueUnit', parseInt(q.Unit))}` }}
|
||||
@@ -71,14 +92,17 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="readingTaskState < 2" :label="$t('common:action:action')" width="90px"
|
||||
fixed="right">
|
||||
<el-table-column
|
||||
v-if="readingTaskState < 2"
|
||||
:label="$t('common:action:action')"
|
||||
width="90px"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="handleAddOrEdit('edit', item, scope.$index)">
|
||||
<el-button type="text" size="mini" @click="handleAddOrEdit('edit',item, scope.$index)">
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<el-button v-if="item.LesionType === 112 || item.LesionType === 111" type="text" size="mini"
|
||||
@click="handleDelete(item, scope.$index)">
|
||||
<el-button v-if="item.LesionType === 112 || item.LesionType === 111" type="text" size="mini" @click="handleDelete(item, scope.$index)">
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -87,52 +111,41 @@
|
||||
|
||||
<template v-else>
|
||||
<!-- 数值 -->
|
||||
<el-form-item v-if="item.ShowQuestion !== 2" :key="item.Id" :label="`${item.QuestionName}`"
|
||||
:prop="item.Id" :rules="[
|
||||
{
|
||||
required: (item.IsRequired === 0 || (item.IsRequired === 1 && item.RelevanceId && (item.RelevanceValue.includes(questionForm[item.RelevanceId])))) && item.Type !== 'group' && item.Type !== 'summary',
|
||||
message: ['radio', 'select', 'checkbox'].includes(item.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur', 'change']
|
||||
},
|
||||
]">
|
||||
<el-form-item
|
||||
v-if="item.ShowQuestion!==2"
|
||||
:key="item.Id"
|
||||
:label="`${item.QuestionName}`"
|
||||
:prop="item.Id"
|
||||
:rules="[
|
||||
{ required: (item.IsRequired === 0 || (item.IsRequired ===1 && item.RelevanceId && (item.RelevanceValue.includes(questionForm[item.RelevanceId])))) && item.Type!=='group' && item.Type!=='summary',
|
||||
message:['radio', 'select', 'checkbox'].includes(item.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur','change']},
|
||||
]"
|
||||
>
|
||||
<!-- 数值类型 -->
|
||||
<template v-if="item.Type === 'textarea'">
|
||||
<el-input v-model="questionForm[item.Id]" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }"
|
||||
:disabled="!isCurrentTask || readingTaskState >= 2"
|
||||
@change="((val) => { formItemChange(val, item) })" />
|
||||
</template>
|
||||
<template v-if="item.Type === 'select'">
|
||||
<el-select v-model="questionForm[item.Id]" :disabled="!isCurrentTask || readingTaskState >= 2"
|
||||
@change="((val) => { formItemChange(val, item) })">
|
||||
<el-option v-for="dict of $d[item.DictionaryCode]" :key="dict.id" :value="String(dict.value)"
|
||||
:label="dict.label" />
|
||||
</el-select>
|
||||
<template v-if="item.Type==='textarea'">
|
||||
<el-input
|
||||
v-model="questionForm[qs.Id]"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:disabled="!isCurrentTask || readingTaskState>=2"
|
||||
@change="((val)=>{formItemChange(val, qs)})"
|
||||
/>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<template v-if="item.Childrens && item.Childrens.length > 0">
|
||||
<template v-for="child in item.Childrens">
|
||||
<el-form-item :key="child.Id"
|
||||
v-if="(child.ShowQuestion === 1 && child.ParentTriggerValueList.includes(String(questionForm[item.Id]))) || child.ShowQuestion === 0"
|
||||
:label="`${child.QuestionName}`" :prop="child.Id" :rules="[
|
||||
{
|
||||
required: (child.IsRequired === 0 || (child.IsRequired === 1 && child.RelevanceId && (child.RelevanceValue.includes(questionForm[child.RelevanceId])))) && child.Type !== 'group' && child.Type !== 'summary',
|
||||
message: ['radio', 'select', 'checkbox'].includes(child.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur', 'change']
|
||||
},
|
||||
]">
|
||||
<template v-if="child.Type === 'input'">
|
||||
<el-input v-model="questionForm[child.Id]"
|
||||
:disabled="!isCurrentTask || readingTaskState >= 2"
|
||||
@change="((val) => { formItemChange(val, child) })" />
|
||||
</template>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<div v-if="isCurrentTask && readingTaskState < 2 && (qs.GroupClassify === 5 || qs.GroupClassify === 6)"
|
||||
class="base-dialog-footer" style="text-align:right;margin-top:10px;">
|
||||
<div
|
||||
v-if="isCurrentTask && readingTaskState<2 && qs.GroupClassify === 5"
|
||||
class="base-dialog-footer"
|
||||
style="text-align:right;margin-top:10px;"
|
||||
>
|
||||
<!-- 保存 -->
|
||||
<el-button type="primary" size="mini" :disabled="!formChanged" @click="handleSave(index)">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
:disabled="!formChanged"
|
||||
@click="handleSave(index)"
|
||||
>
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -143,20 +156,50 @@
|
||||
</template>
|
||||
|
||||
<!-- 计算值 -->
|
||||
<Questions ref="ecrf2" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
|
||||
:group-classify="4" style="margin-top:20px" />
|
||||
<Questions
|
||||
ref="ecrf2"
|
||||
:question-form-change-state="true"
|
||||
:question-form-change-num="0"
|
||||
:is-qulity-issues="false"
|
||||
:group-classify="4"
|
||||
style="margin-top:20px"
|
||||
/>
|
||||
|
||||
<!-- 评估结果 -->
|
||||
<Questions ref="ecrf3" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
|
||||
:group-classify="5" />
|
||||
<el-dialog v-if="addOrEdit.visible" :visible.sync="addOrEdit.visible" :close-on-click-modal="false"
|
||||
:title="addOrEdit.title" width="500px">
|
||||
<el-form ref="tableQsForm" v-loading="loading" :model="qsForm" size="small">
|
||||
<QuestionTableFormItem v-for="item in qsList" :key="item.Id" :question="item" :question-form="qsForm"
|
||||
:reading-task-state="readingTaskState" @setFormItemData="setFormItemData"
|
||||
@resetFormItemData="resetFormItemData" />
|
||||
<Questions
|
||||
ref="ecrf3"
|
||||
:question-form-change-state="true"
|
||||
:question-form-change-num="0"
|
||||
:is-qulity-issues="false"
|
||||
:group-classify="5"
|
||||
/>
|
||||
<el-dialog
|
||||
v-if="addOrEdit.visible"
|
||||
:visible.sync="addOrEdit.visible"
|
||||
:close-on-click-modal="false"
|
||||
:title="addOrEdit.title"
|
||||
width="500px"
|
||||
>
|
||||
<el-form
|
||||
ref="tableQsForm"
|
||||
v-loading="loading"
|
||||
:model="qsForm"
|
||||
size="small"
|
||||
>
|
||||
<QuestionTableFormItem
|
||||
v-for="item in qsList"
|
||||
:key="item.Id"
|
||||
:question="item"
|
||||
:question-form="qsForm"
|
||||
:reading-task-state="readingTaskState"
|
||||
@setFormItemData="setFormItemData"
|
||||
@resetFormItemData="resetFormItemData"
|
||||
/>
|
||||
<el-form-item style="text-align: right">
|
||||
<el-button size="small" @click="addOrEdit.visible = false">
|
||||
<el-button
|
||||
size="small"
|
||||
@click="addOrEdit.visible = false"
|
||||
>
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
@@ -167,9 +210,18 @@
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<!-- 导入 -->
|
||||
<el-dialog v-if="upload.visible" :visible.sync="upload.visible" :close-on-click-modal="false"
|
||||
:title="upload.title" width="500px">
|
||||
<UploadExcel :visit-task-id="visitTaskId" :lesion-type="upload.lesionType" @close="uploadDlgClose" />
|
||||
<el-dialog
|
||||
v-if="upload.visible"
|
||||
:visible.sync="upload.visible"
|
||||
:close-on-click-modal="false"
|
||||
:title="upload.title"
|
||||
width="500px"
|
||||
>
|
||||
<UploadExcel
|
||||
:visit-task-id="visitTaskId"
|
||||
:lesion-type="upload.lesionType"
|
||||
@close="uploadDlgClose"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
@@ -434,22 +486,8 @@ export default {
|
||||
setMeasuredData(measureData) {
|
||||
|
||||
},
|
||||
formItemChange(val, question) {
|
||||
formItemChange() {
|
||||
this.formChanged = true
|
||||
if (item.Type === 'number') {
|
||||
this.limitBlur(item.Id, item.ValueType)
|
||||
}
|
||||
if (question.Childrens.length > 0) {
|
||||
this.resetChild(question.Childrens)
|
||||
}
|
||||
},
|
||||
resetChild(obj) {
|
||||
obj.forEach(i => {
|
||||
this.resetData(i.Id)
|
||||
if (i.Childrens && i.Childrens.length > 0) {
|
||||
this.resetChild(i.Childrens)
|
||||
}
|
||||
})
|
||||
},
|
||||
limitBlur(qId, valueType) {
|
||||
const value = this.questionForm[qId]
|
||||
@@ -483,7 +521,7 @@ export default {
|
||||
answers: answers
|
||||
}
|
||||
try {
|
||||
await saveTaskQuestion(12, params)
|
||||
await saveTaskQuestion(8, params)
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
loading.close()
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
@@ -538,9 +576,6 @@ export default {
|
||||
},
|
||||
receiveMsg(event) {
|
||||
},
|
||||
resetData(v) {
|
||||
this.questionForm[v] = null
|
||||
},
|
||||
resetFormItemData(v) {
|
||||
this.qsForm[v] = null
|
||||
},
|
||||
@@ -706,26 +741,23 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.measurement-wrapper {
|
||||
.measurement-wrapper{
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
// overflow: hidden;
|
||||
|
||||
.container {
|
||||
.container{
|
||||
padding: 10px;
|
||||
|
||||
.basic-info {
|
||||
.basic-info{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
h3 {
|
||||
h3{
|
||||
color: #ddd;
|
||||
padding: 5px 0px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
i {
|
||||
i{
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
@@ -733,16 +765,14 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
.title{
|
||||
padding: 5px;
|
||||
font-weight: bold;
|
||||
color: #ddd;
|
||||
font-size: 15px;
|
||||
|
||||
}
|
||||
|
||||
.add-icon {
|
||||
.add-icon{
|
||||
display: inline-block;
|
||||
padding: 5px;
|
||||
font-weight: bold;
|
||||
@@ -752,123 +782,103 @@ export default {
|
||||
margin-bottom: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.add-icon:hover {
|
||||
.add-icon:hover{
|
||||
background-color: #607d8b;
|
||||
}
|
||||
|
||||
.flex-row {
|
||||
.flex-row{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
background-color: #424242;
|
||||
|
||||
}
|
||||
|
||||
.lesion_list {
|
||||
.lesion_list{
|
||||
position: relative;
|
||||
|
||||
::v-deep .el-form-item__label {
|
||||
::v-deep .el-form-item__label{
|
||||
color: #c3c3c3;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
::v-deep .el-input .el-input__inner {
|
||||
::v-deep .el-input .el-input__inner{
|
||||
background-color: transparent;
|
||||
color: #ddd;
|
||||
border: 1px solid #5e5e5e;
|
||||
}
|
||||
|
||||
::v-deep .el-textarea__inner {
|
||||
::v-deep .el-textarea__inner{
|
||||
background-color: transparent;
|
||||
color: #ddd;
|
||||
border: 1px solid #5e5e5e;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item {
|
||||
::v-deep .el-form-item{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__content {
|
||||
::v-deep .el-form-item__content{
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
::v-deep .el-input.is-disabled .el-input__inner {
|
||||
::v-deep .el-input.is-disabled .el-input__inner{
|
||||
background-color: #646464a1;
|
||||
}
|
||||
::v-deep .el-select.is-disabled .el-input__inner{
|
||||
background-color: #646464a1;
|
||||
}
|
||||
|
||||
::v-deep .el-select.is-disabled .el-input__inner {
|
||||
background-color: #646464a1;
|
||||
}
|
||||
|
||||
.el-form-item__content .el-select {
|
||||
.el-form-item__content
|
||||
.el-select{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.table-wrapper {
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background: #d0d0d0;
|
||||
}
|
||||
|
||||
::v-deep .el-table,
|
||||
.el-table__expanded-cell {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
border-color: #444444;
|
||||
}
|
||||
|
||||
::v-deep .el-table th,
|
||||
.el-table tr {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
border-color: #444444;
|
||||
}
|
||||
|
||||
::v-deep .el-table__body tr>td {
|
||||
::v-deep .el-table__body tr > td {
|
||||
background-color: #000 !important;
|
||||
color: #fff;
|
||||
border-color: #444444;
|
||||
}
|
||||
|
||||
::v-deep .el-table__body tr:hover>td {
|
||||
::v-deep .el-table__body tr:hover > td {
|
||||
background-color: #858282 !important;
|
||||
color: #fff;
|
||||
border-color: #444444;
|
||||
}
|
||||
|
||||
::v-deep .el-table--border th.gutter:last-of-type {
|
||||
border: none;
|
||||
}
|
||||
|
||||
::v-deep .el-table__fixed-right {
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
// ::v-deep .el-table .cell {
|
||||
// line-height: 20px;
|
||||
// }
|
||||
::v-deep .el-table__cell {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
::v-deep.el-table__fixed-right-patch {
|
||||
background-color: #000 !important;
|
||||
border-color: #444444;
|
||||
}
|
||||
|
||||
::v-deep.el-table__fixed-body-wrapper tr:hover>td {
|
||||
::v-deep.el-table__fixed-body-wrapper tr:hover > td {
|
||||
background-color: #000 !important;
|
||||
}
|
||||
|
||||
::v-deep.el-table--scrollable-x .el-table__body-wrapper {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
@@ -1624,7 +1624,7 @@ export default {
|
||||
cornerstoneTools.getToolState(
|
||||
this.canvas,
|
||||
'playClip'
|
||||
).data[0].loop = false
|
||||
).data[0].loop = true
|
||||
} else {
|
||||
cornerstoneTools.stopClip(this.canvas)
|
||||
this.toolState.clipPlaying = false
|
||||
|
||||
+7
-29
@@ -69,10 +69,6 @@
|
||||
:rules="[
|
||||
{ required: (question.IsRequired === 0 || (question.IsRequired ===1 && question.RelevanceId && (question.RelevanceValueList.includes(isNaN(parseFloat(questionForm[question.RelevanceId])) ? questionForm[question.RelevanceId] : questionForm[question.RelevanceId].toString())))) && question.Type!=='group' && question.Type!=='summary',
|
||||
message: $t('common:ruleMessage:specify'), trigger: ['blur', 'change']},
|
||||
{
|
||||
validator: question.Type === 'number' && !question.TypeValue ? validatorNumberInput :(rule,value,callback )=>{callback()},
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
]"
|
||||
:class="[question.Type==='group'?'mb':question.Type==='upload'?'uploadWrapper':'']"
|
||||
>
|
||||
@@ -232,12 +228,11 @@
|
||||
/>
|
||||
</el-select>
|
||||
<el-input
|
||||
type="text"
|
||||
type="number"
|
||||
v-if="question.Type === 'number' && !question.TypeValue && question.DataSource !== 1"
|
||||
@change="(val) => { formItemNumberChange(val, question) }"
|
||||
@input="numberInput(question.Id)"
|
||||
@blur="handleBlur(questionForm[question.Id], questionForm, question.Id)"
|
||||
v-model.trim="questionForm[question.Id]"
|
||||
v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState === 2"
|
||||
>
|
||||
<!-- <template slot="append">1</template> -->
|
||||
@@ -245,12 +240,11 @@
|
||||
<template slot="append" v-else-if="question.ValueType === 2">%</template>
|
||||
</el-input>
|
||||
<el-input
|
||||
type="text"
|
||||
@input="numberInput(question.Id)"
|
||||
type="number"
|
||||
v-if="question.Type === 'number' && !question.TypeValue && question.DataSource === 1"
|
||||
@blur="handleBlur(questionForm[question.Id], questionForm, question.Id)"
|
||||
:disabled="question.DataSource === 1 || readingTaskState === 2"
|
||||
v-model.trim="questionForm[question.Id]"
|
||||
v-model="questionForm[question.Id]"
|
||||
>
|
||||
<!-- <template slot="append">2</template> -->
|
||||
<template slot="append" v-if="question.Unit !== 0">{{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}}</template>
|
||||
@@ -508,21 +502,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
numberInput(id) {
|
||||
this.questionForm[id] = this.questionForm[id].toUpperCase();
|
||||
},
|
||||
validatorNumberInput(rule, value, callback) {
|
||||
let reg = new RegExp(/^(?:-?(?:(?:0|[1-9]\d*)(?:\.\d+)?|\.\d+)|NE)$/, 'g')
|
||||
if (value === '') {
|
||||
callback(new Error(this.$t('common:ruleMessage:specify')));
|
||||
} else {
|
||||
if (!reg.test(value)) {
|
||||
callback(new Error(this.$t('trials:reading:ruleMessage:validatorNumberInput')));
|
||||
}else{
|
||||
callback();
|
||||
}
|
||||
}
|
||||
},
|
||||
limitInput(value, a, b) {
|
||||
if (value.indexOf('.') > -1) {
|
||||
if (value.split('.')[1].length >= this.digitPlaces) {
|
||||
@@ -531,10 +510,7 @@ export default {
|
||||
}
|
||||
},
|
||||
handleBlur(value, a, b) {
|
||||
if (!value) return false
|
||||
if(!isNaN(parseFloat(value))) {
|
||||
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
|
||||
}
|
||||
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
|
||||
},
|
||||
deleteTableCol(row, index) {
|
||||
this.$confirm(this.$t('trials:uploadNonDicoms:message:msg1')).then(() => {
|
||||
@@ -1109,6 +1085,8 @@ export default {
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
}
|
||||
::v-deep .el-form-item__content{
|
||||
}
|
||||
.el-input{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
+9
-39
@@ -7,10 +7,6 @@
|
||||
:rules="[
|
||||
{ required: (question.IsRequired === 0 || (question.IsRequired ===1 && question.RelevanceId && !!~question.RelevanceValueList.indexOf(questionForm[question.RelevanceId]))) && question.Type!=='group' && question.Type!=='summary',
|
||||
message: $t('common:ruleMessage:select'), trigger: ['blur', 'change']},
|
||||
{
|
||||
validator: question.Type === 'number' && !question.TypeValue ? validatorNumberInput :(rule,value,callback )=>{callback()},
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
]"
|
||||
:class="[question.Type==='group'?'mb':question.Type==='upload'?'uploadWrapper':'']"
|
||||
>
|
||||
@@ -148,23 +144,21 @@
|
||||
<!-- 数值 -->
|
||||
<!-- :precision="2" :step="0.1" :max="10" -->
|
||||
<el-input
|
||||
type="text"
|
||||
type="number"
|
||||
v-if="question.Type === 'number' && question.DataSource !== 1"
|
||||
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !IsBaseline && questionForm.IsCurrentTaskAdd === 'False')"
|
||||
@change="((val)=>{formItemNumberChange(val, question)})"
|
||||
@input="numberInput(question.Id)"
|
||||
@blur="handleBlur(questionForm[question.Id], questionForm, question.Id)"
|
||||
v-model.trim="questionForm[question.Id]"
|
||||
v-model="questionForm[question.Id]"
|
||||
>
|
||||
<template slot="append" v-if="question.Unit !== 0">{{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}}</template>
|
||||
</el-input>
|
||||
<el-input
|
||||
type="text"
|
||||
type="number"
|
||||
v-if="question.Type === 'number' && question.DataSource === 1"
|
||||
:disabled="question.DataSource === 1"
|
||||
@input="numberInput(question.Id, true )"
|
||||
@blur="handleCalculationBlur(calculationValue)"
|
||||
v-model.trim="calculationValue"
|
||||
v-model="calculationValue"
|
||||
>
|
||||
<template slot="append" v-if="question.Unit !== 0">{{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}}</template>
|
||||
</el-input>
|
||||
@@ -337,6 +331,7 @@ export default {
|
||||
this.fileList.push({ name: '', url: `${url}` })
|
||||
})
|
||||
}
|
||||
console.log('11')
|
||||
}
|
||||
if (this.type === 'edit') return
|
||||
// if (this.question.Type === 'number') {
|
||||
@@ -347,25 +342,6 @@ export default {
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
numberInput(id,notId = false) {
|
||||
if(notId ) {
|
||||
this.calculationValue = this.calculationValue.toUpperCase();
|
||||
}else {
|
||||
this.questionForm[id] = this.questionForm[id].toUpperCase();
|
||||
}
|
||||
},
|
||||
validatorNumberInput(rule, value, callback) {
|
||||
let reg = new RegExp(/^(?:-?(?:(?:0|[1-9]\d*)(?:\.\d+)?|\.\d+)|NE)$/, 'g')
|
||||
if (value === '') {
|
||||
callback(new Error(this.$t('common:ruleMessage:specify')));
|
||||
} else {
|
||||
if (!reg.test(value)) {
|
||||
callback(new Error(this.$t('trials:reading:ruleMessage:validatorNumberInput')));
|
||||
}else{
|
||||
callback();
|
||||
}
|
||||
}
|
||||
},
|
||||
save() {
|
||||
},
|
||||
openAddTableCol(row) {
|
||||
@@ -406,17 +382,10 @@ export default {
|
||||
}
|
||||
},
|
||||
handleBlur(value, a, b) {
|
||||
if (!value) return false
|
||||
if(!isNaN(parseFloat(value))) {
|
||||
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
|
||||
}
|
||||
// this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
|
||||
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
|
||||
},
|
||||
handleCalculationBlur(v) {
|
||||
if (!v) return false
|
||||
if(!isNaN(parseFloat(v))) {
|
||||
this.calculationValue = parseFloat(v).toFixed(this.digitPlaces)
|
||||
}
|
||||
this.calculationValue = parseFloat(v).toFixed(this.digitPlaces)
|
||||
},
|
||||
limitInput(value, q) {
|
||||
console.log(value)
|
||||
@@ -519,7 +488,8 @@ export default {
|
||||
return num.toFixed(this.digitPlaces)
|
||||
},
|
||||
formItemNumberChange(v, question) {
|
||||
this.$emit('formItemTableNumberChange', v, question)
|
||||
this.$emit('formItemTableNumberChange')
|
||||
this.$emit('setFormItemData', { key: question.Id, val: v, question: question })
|
||||
// this.$emit('formItemTableNumberChange', v, question)
|
||||
},
|
||||
resetChild(obj) {
|
||||
|
||||
+4
-6
@@ -137,7 +137,7 @@ export default {
|
||||
this.classArr.push({triggerId: v.ClassifyQuestionId, classId: v.Id, classifyAlgorithms: v.ClassifyAlgorithms, classifyType: v.ClassifyType})
|
||||
}
|
||||
if (v.Type === 'number') {
|
||||
this.$set(this.questionForm, v.Id, isNaN(parseFloat(v.Answer)) ? v.Answer : parseFloat(v.Answer).toFixed(this.digitPlaces))
|
||||
this.$set(this.questionForm, v.Id, v.Answer === '' ? '' : parseFloat(v.Answer).toFixed(this.digitPlaces))
|
||||
}
|
||||
if (v.Childrens.length > 0) {
|
||||
this.setChild(v.Childrens)
|
||||
@@ -191,7 +191,7 @@ export default {
|
||||
this.$set(this.questionForm, v.Id, v.TableQuestions.Answers)
|
||||
}
|
||||
if (v.Type === 'number') {
|
||||
this.$set(this.questionForm, v.Id, isNaN(parseFloat(v.Answer)) ? v.Answer : parseFloat(v.Answer).toFixed(this.digitPlaces))
|
||||
this.$set(this.questionForm, v.Id, v.Answer === '' ? '' : parseFloat(v.Answer).toFixed(this.digitPlaces))
|
||||
}
|
||||
if (v.Childrens.length > 0) {
|
||||
this.setChild(v.Childrens)
|
||||
@@ -212,7 +212,7 @@ export default {
|
||||
i.TableQuestions.Questions.forEach(o => {
|
||||
if (o.Type === 'number') {
|
||||
i.TableQuestions.Answers.forEach((ite, index) => {
|
||||
this.$set(i.TableQuestions.Answers[index], o.Id, isNaN(parseFloat(i.TableQuestions.Answers[index][o.Id])) ? i.TableQuestions.Answers[index][o.Id] : parseFloat(i.TableQuestions.Answers[index][o.Id]).toFixed(this.digitPlaces))
|
||||
this.$set(i.TableQuestions.Answers[index], o.Id, i.TableQuestions.Answers[index][o.Id] ? parseFloat(i.TableQuestions.Answers[index][o.Id]).toFixed(this.digitPlaces) : null)
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -222,7 +222,7 @@ export default {
|
||||
this.classArr.push({triggerId: i.ClassifyQuestionId, classId: i.Id, classifyAlgorithms: i.ClassifyAlgorithms, classifyType: i.ClassifyType})
|
||||
}
|
||||
if (i.Type === 'number') {
|
||||
this.$set(this.questionForm, i.Id, isNaN(parseFloat(i.Answer)) ? i.Answer : parseFloat(i.Answer).toFixed(this.digitPlaces))
|
||||
this.$set(this.questionForm, i.Id, i.Answer === '' ? '' : parseFloat(i.Answer).toFixed(this.digitPlaces))
|
||||
}
|
||||
if (i.Childrens && i.Childrens.length > 0) {
|
||||
this.setChild(i.Childrens)
|
||||
@@ -233,9 +233,7 @@ export default {
|
||||
this.questionForm[v] = ''
|
||||
},
|
||||
setFormItemData(obj) {
|
||||
console.log('setFormItemData', obj)
|
||||
this.$set(this.questionForm, obj.key, JSON.parse(JSON.stringify(obj.val)))
|
||||
console.log(this.questionForm)
|
||||
this.classArr.map(i=>{
|
||||
if (i.triggerId === obj.key) {
|
||||
let answer = null
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -319,7 +319,7 @@ export default {
|
||||
const viewport = renderingEngine.getViewport(this.viewportId)
|
||||
|
||||
if (isPlay) {
|
||||
cornerstoneTools.utilities.cine.playClip(viewport.element, { framesPerSecond, loop: false })
|
||||
cornerstoneTools.utilities.cine.playClip(viewport.element, { framesPerSecond, loop: true })
|
||||
} else {
|
||||
cornerstoneTools.utilities.cine.stopClip(viewport.element)
|
||||
}
|
||||
@@ -399,16 +399,17 @@ export default {
|
||||
}
|
||||
// if (isLocate && obj.SliceIndex === this.series.SliceIndex) return
|
||||
if (this.series?.Stack && obj.Stack[obj.SliceIndex] === this.series.Stack[this.series.SliceIndex]) return
|
||||
this.toggleClipPlay(false)
|
||||
this.series = { ...obj }
|
||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||
const viewport = renderingEngine.getViewport(this.viewportId)
|
||||
let imageId = obj.ImageIds[obj.SliceIndex] ? obj.ImageIds[obj.SliceIndex] : obj.ImageIds[0]
|
||||
const image = await cornerstoneDICOMImageLoader.wadouri.loadImage(imageId).promise
|
||||
const image = await cornerstoneDICOMImageLoader.wadouri.loadImage(obj.ImageIds[obj.SliceIndex]).promise
|
||||
if (obj.Modality === 'PT') {
|
||||
this.cachePTMetadata([image])
|
||||
}
|
||||
this.prefetchMetadataInformation(obj.ImageIds, obj.Modality)
|
||||
await viewport.setStack(this.series.Stack, obj.SliceIndex)
|
||||
|
||||
viewport.render()
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
|
||||
+1435
File diff suppressed because it is too large
Load Diff
+652
-16
@@ -32,9 +32,14 @@
|
||||
:reading-task-state="readingTaskState"
|
||||
:criterion-id="criterionId"
|
||||
:calculation-list="calculationList"
|
||||
:question-mark-info-list="questionMarkInfoList"
|
||||
:questions-mark-status="questionsMarkStatus"
|
||||
:is-baseline="isBaseLineTask"
|
||||
@resetFormItemData="resetFormItemData"
|
||||
@setFormItemData="setFormItemData"
|
||||
@getQuestions="getQuestions"
|
||||
@operateImageMarker="operateImageMarker"
|
||||
@unBindAnnotationToQuestion="unBindAnnotationToQuestion"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -74,11 +79,12 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { getCustomTableQuestionAnswer, changeDicomReadingQuestionAnswer, submitVisitTaskQuestionsInDto, getQuestionCalculateRelation } from '@/api/trials'
|
||||
import { setSkipReadingCache, resetReadingTask } from '@/api/reading'
|
||||
import { getCustomTableQuestionAnswer, changeDicomReadingQuestionAnswer, submitVisitTaskQuestionsInDto, getQuestionCalculateRelation, saveTaskQuestion } from '@/api/trials'
|
||||
import { setSkipReadingCache, resetReadingTask, saveTableQuestionMark } from '@/api/reading'
|
||||
import const_ from '@/const/sign-code'
|
||||
import QuestionFormItem from '@/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem'
|
||||
import QuestionFormItem from './QuestionFormItem'
|
||||
import SignForm from '@/views/trials/components/newSignForm'
|
||||
import store from '@/store'
|
||||
export default {
|
||||
name: 'EcrfList',
|
||||
components: {
|
||||
@@ -93,7 +99,7 @@ export default {
|
||||
readingTaskState: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -113,7 +119,17 @@ export default {
|
||||
taskInfo: null,
|
||||
isBaseLineTask: false,
|
||||
rerender: true,
|
||||
digitPlaces: 2
|
||||
questionMarkInfoList: [],
|
||||
operateStateEnum: null, // 0:绑定;1:标记;2:查看;3:更改;4:移除;5:保存;6:更改数值内容;
|
||||
operateQuestionId: '',
|
||||
operateRowId: '',
|
||||
operateParentQsId: '',
|
||||
isTableQuestion: false,
|
||||
imageTool: '',
|
||||
imageToolAttribute: '',
|
||||
questionsMarkStatus: {},
|
||||
digitPlaces: 2,
|
||||
questionImageToolAttributeInfo: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -121,14 +137,14 @@ export default {
|
||||
this.visitTaskId = this.visitInfo.VisitTaskId
|
||||
this.taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
|
||||
this.isBaseLineTask = this.taskInfo.IsBaseLine
|
||||
this.criterionType = this.taskInfo.CriterionType
|
||||
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||
this.criterionId = this.taskInfo.TrialReadingCriterionId
|
||||
const digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
||||
this.getQuestionCalculateRelation()
|
||||
this.getQuestions()
|
||||
this.getQuestions(true)
|
||||
},
|
||||
methods: {
|
||||
async getQuestions() {
|
||||
async getQuestions(isInit) {
|
||||
this.loading = true
|
||||
try {
|
||||
const param = {
|
||||
@@ -149,13 +165,31 @@ export default {
|
||||
this.classArr.push({ triggerId: v.ClassifyQuestionId, classId: v.Id, classifyAlgorithms: v.ClassifyAlgorithms, classifyType: v.ClassifyType })
|
||||
}
|
||||
if (v.Type === 'number') {
|
||||
this.$set(this.questionForm, v.Id, isNaN(parseFloat(v.Answer)) ? v.Answer : parseFloat(v.Answer).toFixed(this.digitPlaces))
|
||||
this.$set(this.questionForm, v.Id, v.Answer === '' ? '' : parseFloat(v.Answer).toFixed(this.digitPlaces))
|
||||
if (v.ImageToolAttribute) {
|
||||
this.$set(this.questionImageToolAttributeInfo, v.Id, v.ImageToolAttribute)
|
||||
}
|
||||
}
|
||||
if (v.Childrens.length > 0) {
|
||||
this.setChild(v.Childrens)
|
||||
}
|
||||
})
|
||||
this.questions = res.Result.SinglePage
|
||||
this.questionsMarkStatus = {}
|
||||
this.questionMarkInfoList = res.OtherInfo.QuestionMarkInfoList.map(i => {
|
||||
if (i.RowId) {
|
||||
this.$set(this.questionsMarkStatus, `${i.RowId}_${i.TableQuestionId}`, {isMarked: i.MeasureData !== '', isSaved: true})
|
||||
} else if (i.QuestionId) {
|
||||
this.$set(this.questionsMarkStatus, i.QuestionId, {isMarked: i.MeasureData !== '', isSaved: true})
|
||||
}
|
||||
if (typeof i.MeasureData === 'string' && i.MeasureData) {
|
||||
i.MeasureData = JSON.parse(i.MeasureData)
|
||||
}
|
||||
return i
|
||||
})
|
||||
if (!isInit) {
|
||||
this.$emit('resetAnnotations', this.visitTaskId)
|
||||
}
|
||||
this.loading = false
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -172,7 +206,7 @@ export default {
|
||||
i.TableQuestions.Questions.forEach(o => {
|
||||
if (o.Type === 'number') {
|
||||
i.TableQuestions.Answers.forEach((ite, index) => {
|
||||
this.$set(i.TableQuestions.Answers[index], o.Id, isNaN(parseFloat(i.TableQuestions.Answers[index][o.Id])) ? i.TableQuestions.Answers[index][o.Id] : parseFloat(i.TableQuestions.Answers[index][o.Id]).toFixed(this.digitPlaces))
|
||||
this.$set(i.TableQuestions.Answers[index], o.Id, i.TableQuestions.Answers[index][o.Id] ? parseFloat(i.TableQuestions.Answers[index][o.Id]).toFixed(this.digitPlaces) : null)
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -182,7 +216,10 @@ export default {
|
||||
this.classArr.push({ triggerId: i.ClassifyQuestionId, classId: i.Id, classifyAlgorithms: i.ClassifyAlgorithms, classifyType: i.ClassifyType })
|
||||
}
|
||||
if (i.Type === 'number') {
|
||||
this.$set(this.questionForm, i.Id, isNaN(parseFloat(i.Answer)) ? i.Answer : parseFloat(i.Answer).toFixed(this.digitPlaces))
|
||||
this.$set(this.questionForm, i.Id, i.Answer === '' ? '' : parseFloat(i.Answer).toFixed(this.digitPlaces))
|
||||
if (i.ImageToolAttribute) {
|
||||
this.$set(this.questionImageToolAttributeInfo, i.Id, i.ImageToolAttribute)
|
||||
}
|
||||
}
|
||||
if (i.Childrens && i.Childrens.length > 0) {
|
||||
this.setChild(i.Childrens)
|
||||
@@ -328,6 +365,604 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
verifyAnnotationIsBound(annotation) {
|
||||
const i = this.questionMarkInfoList.findIndex(i => i.MeasureData && i.MeasureData.annotationUID === annotation.annotationUID)
|
||||
return i > -1
|
||||
},
|
||||
// async operateImageMarker(obj) {
|
||||
// this.operateStateEnum = obj.operateStateEnum
|
||||
// this.isTableQuestion = obj.question.IsTableQuestion ? true : false
|
||||
// this.imageTool = obj.question.ImageTool
|
||||
// this.imageToolAttribute = obj.question.ImageToolAttribute
|
||||
// this.operateQuestionId = obj.question.Id
|
||||
// this.operateRowId = obj.question.RowId
|
||||
// this.operateParentQsId = obj.question.ParentQsId
|
||||
// if (obj.operateStateEnum === 0) {
|
||||
// // 绑定标记
|
||||
// this.$emit('setReadingToolPassive')
|
||||
// } else if (obj.operateStateEnum === 1) {
|
||||
// // 添加标记
|
||||
// this.$emit('setReadingToolActive', obj.question.ImageTool)
|
||||
// } else if (obj.operateStateEnum === 2) {
|
||||
// // 查看标记
|
||||
// let i = -1
|
||||
// if (this.isTableQuestion) {
|
||||
// if (this.operateRowId) {
|
||||
// i = this.questionMarkInfoList.findIndex(i => i.TableQuestionId === obj.question.Id && i.RowId === this.operateRowId)
|
||||
// } else {
|
||||
// i = this.questionMarkInfoList.findIndex(i => i.TableQuestionId === obj.question.Id && !i.RowId)
|
||||
// }
|
||||
// } else {
|
||||
// i = this.questionMarkInfoList.findIndex(i => i.QuestionId === obj.question.Id)
|
||||
// }
|
||||
// if (i > -1) {
|
||||
// const annotation = this.questionMarkInfoList[i].MeasureData
|
||||
// this.$emit('viewCustomAnnotationSeries', { visitTaskId: this.visitTaskId, annotation })
|
||||
// }
|
||||
// } else if (obj.operateStateEnum === 3) {
|
||||
// // 更改标记
|
||||
// this.$emit('setReadingToolPassive')
|
||||
// } else if (obj.operateStateEnum === 4) {
|
||||
// this.$emit('setReadingToolPassive')
|
||||
// // 移除标记
|
||||
// let i = -1
|
||||
// let questionMarkInfo = {}
|
||||
// if (this.isTableQuestion) {
|
||||
// if (this.operateRowId) {
|
||||
// i = this.questionMarkInfoList.findIndex(i => i.TableQuestionId === obj.question.Id && i.RowId === this.operateRowId)
|
||||
// } else {
|
||||
// i = this.questionMarkInfoList.findIndex(i => i.TableQuestionId === obj.question.Id && !i.RowId)
|
||||
// }
|
||||
// } else {
|
||||
// this.$set(this.questionForm, obj.question.Id, '')
|
||||
// i = this.questionMarkInfoList.findIndex(i => i.QuestionId === obj.question.Id)
|
||||
// }
|
||||
// if (i === -1) return
|
||||
// this.questionMarkInfoList[i].MeasureData = ''
|
||||
// this.questionMarkInfoList[i].StudyId = ''
|
||||
// this.questionMarkInfoList[i].SeriesId = ''
|
||||
// this.questionMarkInfoList[i].InstanceId = ''
|
||||
// questionMarkInfo = this.questionMarkInfoList[i]
|
||||
// questionMarkInfo.isMarked = false
|
||||
// questionMarkInfo.isSaved = false
|
||||
// this.$set(this.questionsMarkStatus, this.operateRowId ? `${this.operateRowId}_${obj.question.Id}` : obj.question.Id, questionMarkInfo)
|
||||
// } else if (obj.operateStateEnum === 5) {
|
||||
// // 保存外层标记
|
||||
// this.loading = true
|
||||
// try {
|
||||
// const answers = []
|
||||
// answers.push({ id: obj.question.Id, answer: this.questionForm[obj.question.Id] })
|
||||
// const markInfo = []
|
||||
// const i = this.questionMarkInfoList.findIndex(i => i.QuestionId === this.operateQuestionId)
|
||||
// if (i > -1) {
|
||||
// const obj = Object.assign({}, this.questionMarkInfoList[i])
|
||||
// obj.MeasureData = obj.MeasureData ? JSON.stringify(obj.MeasureData) : ''
|
||||
// markInfo.push(obj)
|
||||
// }
|
||||
// // 上传截图
|
||||
// const params = {
|
||||
// visitTaskId: this.visitTaskId,
|
||||
// answers: answers,
|
||||
// questionMarkInfoList: markInfo
|
||||
// }
|
||||
// await saveTaskQuestion(-10, params)
|
||||
|
||||
// this.$set(this.questionsMarkStatus, obj.question.Id, {isMarked: this.questionMarkInfoList[i].MeasureData ? true : false, isSaved: true})
|
||||
// this.loading = false
|
||||
// } catch (e) {
|
||||
// console.log(e)
|
||||
// this.loading = false
|
||||
// }
|
||||
// } else if (obj.operateStateEnum === 6) {
|
||||
// // 更改数值内容
|
||||
// let questionMarkInfo = {}
|
||||
// if (this.isTableQuestion) {
|
||||
// questionMarkInfo.isMarked = false
|
||||
// questionMarkInfo.isSaved = false
|
||||
// } else {
|
||||
// questionMarkInfo.isMarked = false
|
||||
// questionMarkInfo.isSaved = false
|
||||
// }
|
||||
// this.$set(this.questionsMarkStatus, this.operateRowId ? `${this.operateRowId}_obj.question.Id` : obj.question.Id, questionMarkInfo)
|
||||
// } else if (obj.operateStateEnum === 7) {
|
||||
// // 保存表格问题标记
|
||||
// const loading = this.$loading({ fullscreen: true })
|
||||
// try {
|
||||
// let annotation = null
|
||||
// if (!this.operateRowId && obj.rowId && obj.question.ParentQsId) {
|
||||
// this.operateRowId = obj.rowId
|
||||
// this.questionMarkInfoList.forEach(item => {
|
||||
// if (item.QuestionId === obj.question.ParentQsId && !item.RowId) {
|
||||
// item.RowId = obj.rowId
|
||||
// let questionMarkStatus = Object.assign({}, this.questionsMarkStatus[item.TableQuestionId])
|
||||
// delete this.questionsMarkStatus[item.TableQuestionId]
|
||||
// if (item.TableQuestionId === this.operateQuestionId) {
|
||||
// annotation = item.MeasureData
|
||||
// this.$set(this.questionsMarkStatus, `${obj.rowId}_${item.TableQuestionId}`, questionMarkStatus)
|
||||
// } else {
|
||||
// this.$set(this.questionsMarkStatus, `${obj.rowId}_${item.TableQuestionId}`, {isMarked: item.MeasureData ? true : false, isSaved: false})
|
||||
// }
|
||||
|
||||
// }
|
||||
// })
|
||||
// } else if (this.operateRowId && this.operateQuestionId) {
|
||||
// const i = this.questionMarkInfoList.findIndex(i => i.RowId === this.operateRowId && i.TableQuestionId === this.operateQuestionId)
|
||||
// if (i === -1) return
|
||||
// annotation = this.questionMarkInfoList[i].MeasureData
|
||||
// }
|
||||
// let picturePath = ''
|
||||
// if (annotation) {
|
||||
// // 上传截图
|
||||
// const base64Str = await this.getScreenshots({ visitTaskId: this.visitTaskId, annotation })
|
||||
// const pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, base64Str)
|
||||
// picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
|
||||
// }
|
||||
// let params = {
|
||||
// Answer: obj.answer,
|
||||
// VisitTaskId: this.visitTaskId,
|
||||
// QuestionId: obj.question.ParentQsId,
|
||||
// InstanceId: annotation ? annotation.instanceId : '',
|
||||
// SeriesId: annotation ? annotation.seriesId : '',
|
||||
// StudyId: annotation ? annotation.studyId : '',
|
||||
// MarkTool: annotation ? annotation.markTool : '',
|
||||
// PicturePath: picturePath,
|
||||
// NumberOfFrames: annotation ? annotation.numberOfFrames : null,
|
||||
// MeasureData: annotation ? JSON.stringify(annotation) : '',
|
||||
// QuestionType: 0,
|
||||
// OrderMarkName: annotation ? annotation.data.label : '',
|
||||
// RowId: this.operateRowId,
|
||||
// TableQuestionId: this.operateQuestionId,
|
||||
// RowIndex: obj.rowIndex
|
||||
// }
|
||||
// // 保存标记
|
||||
// await saveTableQuestionMark(params, -10)
|
||||
// this.$set(this.questionsMarkStatus, `${this.operateRowId}_${this.operateQuestionId}`, {isMarked: annotation ? true : false, isSaved: true})
|
||||
// this.resetOperateState()
|
||||
// loading.close()
|
||||
// } catch(e) {
|
||||
// console.log(e)
|
||||
// loading.close()
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
async operateImageMarker(obj) {
|
||||
const STATE = {
|
||||
BIND: 0, // 绑定标记
|
||||
ADD: 1, // 添加标记
|
||||
VIEW: 2, // 查看标记
|
||||
CHANGE: 3, // 更改标记
|
||||
REMOVE: 4, // 移除标记
|
||||
SAVE_OUTER: 5, // 保存外层标记
|
||||
UPDATE: 6, // 更改数值内容
|
||||
SAVE_TABLE: 7 // 保存表格标记
|
||||
}
|
||||
const { question, operateStateEnum, rowId, answer } = obj
|
||||
const { Id, IsTableQuestion, ImageTool, ImageToolAttribute, ParentQsId, RowId } = question
|
||||
|
||||
Object.assign(this, {
|
||||
operateStateEnum,
|
||||
isTableQuestion: !!IsTableQuestion,
|
||||
imageTool: ImageTool,
|
||||
imageToolAttribute: ImageToolAttribute,
|
||||
operateQuestionId: Id,
|
||||
operateRowId: RowId,
|
||||
operateParentQsId: ParentQsId
|
||||
})
|
||||
const stateHandlers = {
|
||||
[STATE.BIND]: () => this.$emit('setReadingToolPassive'),
|
||||
[STATE.ADD]: () => this.$emit('setReadingToolActive', ImageTool),
|
||||
[STATE.VIEW]: this.handleViewAnnotation,
|
||||
[STATE.CHANGE]: () => this.$emit('setReadingToolPassive'),
|
||||
[STATE.REMOVE]: this.handleRemoveAnnotation,
|
||||
[STATE.SAVE_OUTER]: this.handleSaveOuterQuestions,
|
||||
[STATE.UPDATE]: this.handleUpdateValue,
|
||||
[STATE.SAVE_TABLE]: this.handleSaveTableQuestions
|
||||
}
|
||||
|
||||
const handler = stateHandlers[operateStateEnum]
|
||||
handler && await handler.call(this, obj)
|
||||
},
|
||||
async handleViewAnnotation(obj) {
|
||||
const index = this.findMarkIndex(obj.question)
|
||||
if (index === -1) return
|
||||
const annotation = this.questionMarkInfoList[index].MeasureData
|
||||
this.$emit('viewCustomAnnotationSeries', {
|
||||
visitTaskId: this.visitTaskId,
|
||||
annotation
|
||||
})
|
||||
},
|
||||
handleRemoveAnnotation(obj) {
|
||||
const index = this.findMarkIndex(obj.question)
|
||||
if (index === -1) return
|
||||
Object.assign(this.questionMarkInfoList[index], {
|
||||
MeasureData: '',
|
||||
StudyId: '',
|
||||
SeriesId: '',
|
||||
InstanceId: ''
|
||||
})
|
||||
const key = this.operateRowId
|
||||
? `${this.operateRowId}_${obj.question.Id}`
|
||||
: obj.question.Id
|
||||
this.$set(this.questionsMarkStatus, key, {
|
||||
isMarked: false,
|
||||
isSaved: false
|
||||
})
|
||||
},
|
||||
async handleSaveOuterQuestions(obj) {
|
||||
this.loading = true;
|
||||
try {
|
||||
const answers = [{ id: obj.question.Id, answer: this.questionForm[obj.question.Id] }]
|
||||
const markInfo = []
|
||||
|
||||
const index = this.questionMarkInfoList.findIndex(
|
||||
item => item.QuestionId === this.operateQuestionId
|
||||
)
|
||||
|
||||
if (index > -1) {
|
||||
const item = { ...this.questionMarkInfoList[index] }
|
||||
item.MeasureData = item.MeasureData ? JSON.stringify(item.MeasureData) : ''
|
||||
markInfo.push(item)
|
||||
}
|
||||
|
||||
await saveTaskQuestion(-10, {
|
||||
visitTaskId: this.visitTaskId,
|
||||
answers,
|
||||
questionMarkInfoList: markInfo
|
||||
})
|
||||
this.$set(this.questionsMarkStatus, obj.question.Id, {
|
||||
isMarked: !!this.questionMarkInfoList[index]?.MeasureData,
|
||||
isSaved: true
|
||||
})
|
||||
} catch (e) {
|
||||
console.error('保存失败:', e)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
handleUpdateValue(obj) {
|
||||
const key = this.operateRowId
|
||||
? `${this.operateRowId}_${obj.question.Id}`
|
||||
: obj.question.Id
|
||||
this.$set(this.questionsMarkStatus, key, {
|
||||
isMarked: false,
|
||||
isSaved: false
|
||||
})
|
||||
},
|
||||
async handleSaveTableQuestions(obj) {
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
try {
|
||||
let annotation = null
|
||||
if (!this.operateRowId && obj.rowId && obj.question.ParentQsId) {
|
||||
this.operateRowId = obj.rowId
|
||||
this.updateQuestionsMarkStatus(obj)
|
||||
}
|
||||
annotation = this.getAnnotationByRow(this.operateRowId)
|
||||
// 截图上传
|
||||
let picturePath = ''
|
||||
if (annotation) {
|
||||
const base64Str = await this.getScreenshots({
|
||||
visitTaskId: this.visitTaskId,
|
||||
annotation
|
||||
})
|
||||
const pictureObj = await this.uploadScreenshots(`${Date.now()}`, base64Str)
|
||||
picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
|
||||
}
|
||||
await saveTableQuestionMark({
|
||||
Answer: obj.answer,
|
||||
VisitTaskId: this.visitTaskId,
|
||||
QuestionId: obj.question.ParentQsId,
|
||||
...(annotation ? {
|
||||
InstanceId: annotation.instanceId,
|
||||
SeriesId: annotation.seriesId,
|
||||
StudyId: annotation.studyId,
|
||||
MarkTool: annotation.markTool,
|
||||
NumberOfFrames: annotation.numberOfFrames,
|
||||
MeasureData: JSON.stringify(annotation),
|
||||
OrderMarkName: annotation.data.label
|
||||
} : {}),
|
||||
PicturePath: picturePath,
|
||||
QuestionType: 0,
|
||||
RowId: this.operateRowId,
|
||||
TableQuestionId: this.operateQuestionId,
|
||||
RowIndex: obj.rowIndex
|
||||
}, -10)
|
||||
this.$set(this.questionsMarkStatus,
|
||||
`${this.operateRowId}_${this.operateQuestionId}`,
|
||||
{ isMarked: !!annotation, isSaved: true }
|
||||
)
|
||||
this.resetOperateState()
|
||||
} catch(e) {
|
||||
console.error('表格保存失败:', e)
|
||||
} finally {
|
||||
loading.close()
|
||||
}
|
||||
},
|
||||
findMarkIndex(question) {
|
||||
const { Id, RowId } = question
|
||||
if (this.isTableQuestion) {
|
||||
return RowId
|
||||
? this.questionMarkInfoList.findIndex(i =>
|
||||
i.TableQuestionId === Id && i.RowId === RowId)
|
||||
: this.questionMarkInfoList.findIndex(i =>
|
||||
i.TableQuestionId === Id && !i.RowId)
|
||||
}
|
||||
return this.questionMarkInfoList.findIndex(i => i.QuestionId === Id)
|
||||
},
|
||||
updateQuestionsMarkStatus(obj) {
|
||||
this.questionMarkInfoList.forEach(item => {
|
||||
if (item.QuestionId === obj.question.ParentQsId && !item.RowId) {
|
||||
item.RowId = obj.rowId
|
||||
const oldKey = item.TableQuestionId
|
||||
const newKey = `${obj.rowId}_${item.TableQuestionId}`
|
||||
|
||||
if (this.questionsMarkStatus[oldKey]) {
|
||||
const status = { ...this.questionsMarkStatus[oldKey] }
|
||||
delete this.questionsMarkStatus[oldKey]
|
||||
this.$set(this.questionsMarkStatus, newKey, status)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getAnnotationByRow(rowId) {
|
||||
const index = this.questionMarkInfoList.findIndex(
|
||||
i => i.RowId === rowId && i.TableQuestionId === this.operateQuestionId
|
||||
)
|
||||
return index > -1 ? this.questionMarkInfoList[index].MeasureData : null
|
||||
},
|
||||
async bindAnnotationToQuestion(annotation) {
|
||||
try {
|
||||
const VALID_STATES = [null, 0, 1, 3]
|
||||
const currentState = this.operateStateEnum
|
||||
if (!VALID_STATES.includes(currentState)) return
|
||||
const isInvalidAnnotation = currentState === 1 && annotation.markTool !== this.imageTool
|
||||
if (isInvalidAnnotation) return
|
||||
if (currentState === null) {
|
||||
return this.handleNullState(annotation)
|
||||
}
|
||||
if (!this.operateQuestionId) return
|
||||
if ([0, 3].includes(currentState)) {
|
||||
if (!annotation.data.label || annotation.markTool !== this.imageTool) {
|
||||
this.$alert('该标记不能与问题绑定!')
|
||||
return
|
||||
}
|
||||
if (currentState === 3) {
|
||||
const conflictIndex = this.questionMarkInfoList.findIndex(
|
||||
item => item.MeasureData.annotationUID === annotation.annotationUID
|
||||
&& item.RowId !== this.operateRowId
|
||||
)
|
||||
if (conflictIndex > -1) {
|
||||
this.$alert('该标记已绑定到其他行,不能更改绑定!')
|
||||
return
|
||||
}
|
||||
}
|
||||
const message = currentState === 0 ? '是否确认绑定?' : '是否确认更改?'
|
||||
const result = await this.$confirm(message, {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
const isConfirmed = result === 'confirm'
|
||||
if (!isConfirmed) return
|
||||
}
|
||||
const targetIndex = this.findTargetIndex()
|
||||
if (targetIndex === -1) {
|
||||
this.questionMarkInfoList.push({
|
||||
InstanceId: annotation.instanceId,
|
||||
SeriesId: annotation.seriesId,
|
||||
StudyId: annotation.studyId,
|
||||
MarkTool: annotation.metadata.toolName,
|
||||
PicturePath: '',
|
||||
NumberOfFrames: annotation.numberOfFrames,
|
||||
MeasureData: annotation,
|
||||
RowId: this.operateRowId || '',
|
||||
QuestionId: this.isTableQuestion
|
||||
? this.operateParentQsId
|
||||
: this.operateQuestionId,
|
||||
TableQuestionId: this.isTableQuestion
|
||||
? this.operateQuestionId
|
||||
: ''
|
||||
})
|
||||
} else {
|
||||
const target = this.questionMarkInfoList[targetIndex]
|
||||
Object.assign(target, {
|
||||
InstanceId: annotation.instanceId,
|
||||
SeriesId: annotation.seriesId,
|
||||
StudyId: annotation.studyId,
|
||||
MarkTool: annotation.metadata.toolName,
|
||||
PicturePath: '',
|
||||
NumberOfFrames: annotation.numberOfFrames,
|
||||
MeasureData: annotation
|
||||
})
|
||||
}
|
||||
this.updateMarkStatus(targetIndex, annotation)
|
||||
this.operateStateEnum = null
|
||||
} catch (e) {
|
||||
console.error('绑定失败:', e); // 增强错误信息
|
||||
}
|
||||
},
|
||||
handleNullState(annotation) {
|
||||
const qsArr = []
|
||||
const markList = this.questionMarkInfoList
|
||||
for (let i = 0; i < markList.length; i++) {
|
||||
const item = markList[i];
|
||||
if (item.MeasureData?.annotationUID !== annotation.annotationUID) continue
|
||||
item.MeasureData = annotation
|
||||
|
||||
if (item.TableQuestionId) {
|
||||
qsArr.push({ ...item, ImageToolAttribute: this.imageToolAttribute })
|
||||
|
||||
const keyId = item.RowId
|
||||
? `${item.RowId}_${item.TableQuestionId}`
|
||||
: item.TableQuestionId
|
||||
|
||||
this.$set(this.questionsMarkStatus, keyId, {
|
||||
isMarked: true,
|
||||
isSaved: false
|
||||
})
|
||||
} else {
|
||||
this.setAnswerToQuestion(annotation, item.QuestionId)
|
||||
this.$set(this.questionsMarkStatus, item.QuestionId, {
|
||||
isMarked: true,
|
||||
isSaved: false
|
||||
})
|
||||
}
|
||||
}
|
||||
if (qsArr.length) {
|
||||
store.dispatch('dicom3d/setOperateInfo', qsArr)
|
||||
}
|
||||
},
|
||||
findTargetIndex() {
|
||||
if (this.isTableQuestion && this.operateRowId) {
|
||||
return this.questionMarkInfoList.findIndex(
|
||||
item => item.TableQuestionId === this.operateQuestionId
|
||||
&& item.RowId === this.operateRowId
|
||||
)
|
||||
} else if (this.isTableQuestion) {
|
||||
return this.questionMarkInfoList.findIndex(
|
||||
item => item.TableQuestionId === this.operateQuestionId
|
||||
&& !item.RowId
|
||||
)
|
||||
}
|
||||
return this.questionMarkInfoList.findIndex(
|
||||
item => item.QuestionId === this.operateQuestionId
|
||||
)
|
||||
},
|
||||
|
||||
updateMarkStatus(index, annotation) {
|
||||
const status = { isMarked: true, isSaved: false }
|
||||
if (this.isTableQuestion) {
|
||||
const keyId = index > -1 && this.questionMarkInfoList[index].RowId
|
||||
? `${this.questionMarkInfoList[index].RowId}_${this.questionMarkInfoList[index].TableQuestionId}`
|
||||
: this.operateRowId
|
||||
? `${this.operateRowId}_${this.operateQuestionId}`
|
||||
: this.operateQuestionId
|
||||
|
||||
this.$set(this.questionsMarkStatus, keyId, status)
|
||||
store.dispatch('dicom3d/setOperateInfo', [{
|
||||
MeasureData: annotation,
|
||||
QuestionId: this.operateParentQsId,
|
||||
TableQuestionId: this.operateQuestionId,
|
||||
RowId: this.operateRowId,
|
||||
ImageToolAttribute: this.imageToolAttribute
|
||||
}])
|
||||
} else {
|
||||
this.setAnswerToQuestion(annotation, this.operateQuestionId)
|
||||
this.$set(this.questionsMarkStatus, this.operateQuestionId, status)
|
||||
}
|
||||
},
|
||||
|
||||
updateAnnotationToQuestion(annotation) {
|
||||
const questionMarkInfo = { isMarked: true, isSaved: false }
|
||||
const qsArr = []
|
||||
for (let i = 0; i < this.questionMarkInfoList.length; i++) {
|
||||
const item = this.questionMarkInfoList[i]
|
||||
if (!item.MeasureData || item.MeasureData.annotationUID !== annotation.annotationUID) continue
|
||||
item.MeasureData = annotation
|
||||
const isTableMode = this.isTableQuestion || item.TableQuestionId
|
||||
if (!isTableMode) {
|
||||
this.setAnswerToQuestion(annotation, item.QuestionId)
|
||||
this.$set(this.questionsMarkStatus, item.QuestionId, questionMarkInfo)
|
||||
continue
|
||||
}
|
||||
this.operateParentQsId = item.QuestionId
|
||||
this.operateQuestionId = item.TableQuestionId
|
||||
this.operateRowId ||= item.RowId
|
||||
qsArr.push({ ...item })
|
||||
const keyId = item.RowId ? `${item.RowId}_${item.TableQuestionId}` : item.TableQuestionId;
|
||||
this.$set(this.questionsMarkStatus, keyId, questionMarkInfo);
|
||||
}
|
||||
if (qsArr.length > 0) {
|
||||
store.dispatch('dicom3d/setOperateInfo', qsArr);
|
||||
}
|
||||
},
|
||||
setAnswerToQuestion(annotation, questionId) {
|
||||
if (!questionId || !annotation) return
|
||||
let prop = ''
|
||||
if (!this.imageToolAttribute) {
|
||||
prop = this.questionImageToolAttributeInfo[questionId]
|
||||
} else {
|
||||
prop = this.imageToolAttribute
|
||||
}
|
||||
let val = this.getAnnotationProp(annotation, prop)
|
||||
this.$set(this.questionForm, questionId, val)
|
||||
},
|
||||
getAnnotationProp(annotation, prop) {
|
||||
if (!annotation || !prop) return
|
||||
const referencedImageId = annotation?.metadata?.referencedImageId
|
||||
if (!referencedImageId) return null
|
||||
const cacheKey = `imageId:${referencedImageId}`
|
||||
const cachedStats = annotation.data?.cachedStats?.[cacheKey]
|
||||
const hasProp = cachedStats
|
||||
&& Object.prototype.hasOwnProperty.call(cachedStats, prop)
|
||||
if (!hasProp) return null
|
||||
const value = cachedStats[prop]
|
||||
return value !== null
|
||||
? parseFloat(value).toFixed(this.digitPlaces)
|
||||
: value
|
||||
},
|
||||
unBindAnnotationToQuestion(obj) {
|
||||
const { markTableQuestions = [], questionId } = obj || {}
|
||||
const { questionMarkInfoList, questionsMarkStatus } = this
|
||||
if (!Array.isArray(markTableQuestions) || !questionId || !Array.isArray(questionMarkInfoList)) {
|
||||
return
|
||||
}
|
||||
this.questionMarkInfoList = questionMarkInfoList.filter(item => {
|
||||
const { TableQuestionId, QuestionId } = item || {}
|
||||
if ((TableQuestionId && QuestionId === questionId && markTableQuestions.includes(TableQuestionId))) {
|
||||
if (questionsMarkStatus && questionsMarkStatus[TableQuestionId]) {
|
||||
delete questionsMarkStatus[TableQuestionId]
|
||||
}
|
||||
} else {
|
||||
return
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取截图
|
||||
getScreenshots(obj) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$emit('getCustomScreenshots', obj, resolve) // 将resolve传递给父组件
|
||||
})
|
||||
},
|
||||
async uploadScreenshots(fileName, file) {
|
||||
try {
|
||||
file = this.convertBase64ToBlob(file)
|
||||
const trialId = this.$route.query.trialId
|
||||
const taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
|
||||
const subjectId = taskInfo.SubjectId
|
||||
const result = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/Visit/${fileName}.png`, file)
|
||||
return { isSuccess: true, result: result }
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
return { isSuccess: false, result: e }
|
||||
}
|
||||
},
|
||||
convertBase64ToBlob(imageEditorBase64) {
|
||||
const base64Arr = imageEditorBase64.split(',')
|
||||
let imgtype = ''
|
||||
let base64String = ''
|
||||
if (base64Arr.length > 1) {
|
||||
base64String = base64Arr[1]
|
||||
imgtype = base64Arr[0].substring(
|
||||
base64Arr[0].indexOf(':') + 1,
|
||||
base64Arr[0].indexOf(';')
|
||||
)
|
||||
}
|
||||
const bytes = atob(base64String)
|
||||
const bytesCode = new ArrayBuffer(bytes.length)
|
||||
const byteArray = new Uint8Array(bytesCode)
|
||||
for (let i = 0; i < bytes.length; i++) {
|
||||
byteArray[i] = bytes.charCodeAt(i)
|
||||
}
|
||||
return new Blob([bytesCode], { type: imgtype })
|
||||
},
|
||||
resetOperateState() {
|
||||
console.log('resetOperateState')
|
||||
this.operateStateEnum = null
|
||||
this.operateQuestionId = ''
|
||||
this.operateRowId = ''
|
||||
this.imageTool = ''
|
||||
this.imageToolAttribute = ''
|
||||
},
|
||||
async resetForm() {
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:dicomReading:message:confirmReset1'),
|
||||
@@ -338,15 +973,16 @@ export default {
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
this.$emit('setReadingToolPassive')
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
try {
|
||||
const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
|
||||
if (res.IsSuccess) {
|
||||
this.rerender = false
|
||||
await this.getQuestionCalculateRelation()
|
||||
await this.getQuestions()
|
||||
await this.getQuestions(true)
|
||||
this.$emit('resetAnnotations', this.visitTaskId)
|
||||
this.$nextTick(()=>{
|
||||
this.$nextTick(() => {
|
||||
this.rerender = true
|
||||
})
|
||||
}
|
||||
@@ -355,7 +991,7 @@ export default {
|
||||
loading.close()
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -436,6 +1072,6 @@ export default {
|
||||
// .ecrf-list-container{
|
||||
// min-height:400px;
|
||||
// color: #ddd;
|
||||
|
||||
|
||||
// }
|
||||
</style>
|
||||
|
||||
+704
@@ -0,0 +1,704 @@
|
||||
<template>
|
||||
<div class="criterion-table-form-item">
|
||||
<el-form-item
|
||||
v-if="(question.ShowQuestion===1 && !!~question.ParentTriggerValueList.indexOf(questionForm[question.ParentId])) || question.ShowQuestion===0"
|
||||
:label="`${question.QuestionName}`"
|
||||
:prop="question.Id"
|
||||
:rules="[
|
||||
{ required: (question.IsRequired === 0 || (question.IsRequired ===1 && question.RelevanceId && !!~question.RelevanceValueList.indexOf(questionForm[question.RelevanceId]))) && question.Type!=='group' && question.Type!=='summary',
|
||||
message: $t('common:ruleMessage:select'), trigger: ['blur', 'change']},
|
||||
]"
|
||||
:class="[question.Type==='group'?'mb':question.Type==='upload'?'uploadWrapper':'']"
|
||||
>
|
||||
<!-- 输入框 -->
|
||||
<el-input
|
||||
v-if="question.Type==='input'"
|
||||
v-model="questionForm[question.Id]"
|
||||
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !isBaseline && questionForm.IsCurrentTaskAdd === 'False')"
|
||||
/>
|
||||
<!-- 多行文本输入框 -->
|
||||
<el-input
|
||||
v-if="question.Type==='textarea'"
|
||||
v-model="questionForm[question.Id]"
|
||||
type="textarea"
|
||||
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !isBaseline && questionForm.IsCurrentTaskAdd === 'False')"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
/>
|
||||
<!-- 下拉框 -->
|
||||
<el-select
|
||||
v-if="question.Type==='select'"
|
||||
v-model="questionForm[question.Id]"
|
||||
clearable
|
||||
:disabled="(question.TableQuestionType === 2 || question.QuestionGenre === 2) || (question.IsCopy && type === 'edit' && !IsBaseline && questionForm.IsCurrentTaskAdd === 'False')"
|
||||
@change="((val)=>{formItemChange(val, question)})"
|
||||
>
|
||||
<template v-if="question.TableQuestionType === 1">
|
||||
<el-option
|
||||
v-for="item in organList"
|
||||
:key="item.Id"
|
||||
:label="item[question.DataTableColumn]"
|
||||
:value="item[question.DataTableColumn]"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="question.TableQuestionType === 3 || question.QuestionGenre === 3">
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="(question.TableQuestionType === 2 || question.QuestionGenre === 2) && question.DictionaryCode">
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-option
|
||||
v-for="val in question.TypeValue.split('|')"
|
||||
:key="val"
|
||||
:label="val"
|
||||
:value="val"
|
||||
/>
|
||||
</template>
|
||||
|
||||
</el-select>
|
||||
<!-- 单选 -->
|
||||
<el-radio-group
|
||||
v-if="question.Type==='radio'"
|
||||
v-model="questionForm[question.Id]"
|
||||
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !isBaseline && questionForm.IsCurrentTaskAdd === 'False')"
|
||||
@change="((val)=>{formItemChange(val, question)})"
|
||||
>
|
||||
<el-radio
|
||||
v-for="val in question.TypeValue.split('|')"
|
||||
:key="val"
|
||||
:label="val"
|
||||
>
|
||||
{{ val }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
<!-- 复选框 -->
|
||||
<el-checkbox-group
|
||||
v-if="question.Type==='checkbox'"
|
||||
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !isBaseline && questionForm.IsCurrentTaskAdd === 'False')"
|
||||
v-model="questionForm[question.Id]"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="val in question.TypeValue.split('|')"
|
||||
:key="val"
|
||||
:label="val"
|
||||
>
|
||||
{{ val }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<!-- 自动分类 -->
|
||||
<el-input
|
||||
v-if="question.Type === 'class' && question.ClassifyShowType === 1"
|
||||
v-model="questionForm[question.Id]"
|
||||
/>
|
||||
<el-select
|
||||
v-if="question.Type === 'class' && question.ClassifyShowType === 2"
|
||||
v-model="questionForm[question.Id]"
|
||||
:disabled="!question.ClassifyEditType"
|
||||
@change="(val) => { formItemChange(val, question) }"
|
||||
>
|
||||
<el-option
|
||||
v-for="val in question.TypeValue.split('|')"
|
||||
:key="val"
|
||||
:label="val.trim()"
|
||||
:value="val.trim()"
|
||||
/>
|
||||
</el-select>
|
||||
<el-radio-group
|
||||
v-if="question.Type === 'class' && question.ClassifyShowType === 3"
|
||||
v-model="questionForm[question.Id]"
|
||||
:disabled="!question.ClassifyEditType"
|
||||
@change="(val) => { formItemChange(val, question) }"
|
||||
>
|
||||
<el-radio
|
||||
v-for="item of question.TypeValue.split('|')"
|
||||
:key="item.trim()"
|
||||
:label="item.trim()"
|
||||
>
|
||||
{{ item.trim() }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
<!-- 自动计算 -->
|
||||
<!-- :precision="2" :step="0.1" :max="10" -->
|
||||
<el-input
|
||||
v-if="question.Type==='calculation'"
|
||||
v-model="questionForm[question.Id]"
|
||||
oninput="value=value.replace(/^\D*(\d*(?:.\d{0,2})?).*$/g, '$1')"
|
||||
disabled
|
||||
/>
|
||||
<!-- 自增 -->
|
||||
<el-input
|
||||
v-if="question.Type==='increment'"
|
||||
v-model="questionForm[question.Id]"
|
||||
disabled
|
||||
/>
|
||||
<!-- 数值 -->
|
||||
<template v-if="question.Type === 'number' && (question.ImageMarkEnum === 1 || question.ImageMarkEnum === 2)">
|
||||
<div style="display: flex;flex-direction: row;justify-content: flex-start;align-items: center;">
|
||||
<el-input
|
||||
type="number"
|
||||
@change="(val) => { formItemNumberChange(val, question) }"
|
||||
@blur="questionsMarkStatus[question.Id] && questionsMarkStatus[question.Id].isMarked ? ()=>{} : handleMarkedQsBlur(questionForm[question.Id], questionForm, question.Id, question) "
|
||||
v-model="questionForm[question.Id]"
|
||||
:disabled="(questionsMarkStatus[question.Id] && questionsMarkStatus[question.Id].isMarked && question.ImageMarkEnum === 2) || question.ImageMarkEnum === 1"
|
||||
style="width: 150px;"
|
||||
>
|
||||
<template v-if="question.Unit !== 0" slot="append">
|
||||
{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit }}
|
||||
</template>
|
||||
</el-input>
|
||||
<!-- 测量 -->
|
||||
<el-button
|
||||
v-if="readingTaskState < 2 && (!questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] || (questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] && !questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id].isMarked))"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="operateImageMarker({operateStateEnum: 1, question})"
|
||||
>
|
||||
测量
|
||||
</el-button>
|
||||
<!-- 绑定 -->
|
||||
<el-button
|
||||
v-if="readingTaskState < 2 && (!questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] || (questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] && !questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id].isMarked))"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="operateImageMarker({operateStateEnum: 0, question})"
|
||||
>
|
||||
绑定
|
||||
</el-button>
|
||||
<!-- 查看 -->
|
||||
<el-button
|
||||
v-if="questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] && questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id].isMarked"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="operateImageMarker({operateStateEnum: 2, question})"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<!-- 更改 -->
|
||||
<el-button
|
||||
v-if="readingTaskState < 2 && (questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] && questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id].isMarked)"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="operateImageMarker({operateStateEnum: 3, question})"
|
||||
>
|
||||
更改
|
||||
</el-button>
|
||||
<!-- 移除 -->
|
||||
<el-button
|
||||
v-if="readingTaskState < 2 && (questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] && questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id].isMarked)"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="operateImageMarker({operateStateEnum: 4, question})"
|
||||
>
|
||||
移除
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
<el-button
|
||||
v-if="readingTaskState < 2 && (questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] && !questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id].isSaved)"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="operateImageMarker({operateStateEnum: 7, question})"
|
||||
>
|
||||
<el-tooltip v-if="questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id] && !questionsMarkStatus[rowId ? `${rowId}_${question.Id}` : question.Id].isSaved" class="item" effect="dark" :content="$t('trials:reading:button:unsaved')" placement="bottom">
|
||||
<i class="el-icon-warning" style="color:red" />
|
||||
</el-tooltip>
|
||||
保存
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="question.Type === 'number'">
|
||||
<el-input
|
||||
type="number"
|
||||
v-if="question.Type === 'number' && question.DataSource !== 1"
|
||||
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !isBaseline && questionForm.IsCurrentTaskAdd === 'False')"
|
||||
@change="((val)=>{formItemNumberChange(val, question)})"
|
||||
@blur="handleBlur(questionForm[question.Id], questionForm, question.Id)"
|
||||
v-model="questionForm[question.Id]"
|
||||
>
|
||||
<template slot="append" v-if="question.Unit !== 0">{{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}}</template>
|
||||
</el-input>
|
||||
<el-input
|
||||
type="number"
|
||||
v-if="question.Type === 'number' && question.DataSource === 1"
|
||||
:disabled="question.DataSource === 1"
|
||||
@blur="handleCalculationBlur(calculationValue)"
|
||||
v-model="calculationValue"
|
||||
>
|
||||
<template slot="append" v-if="question.Unit !== 0">{{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}}</template>
|
||||
</el-input>
|
||||
</template>
|
||||
<!-- 上传图像 -->
|
||||
<el-upload
|
||||
v-if="question.Type==='upload'"
|
||||
action
|
||||
:accept="question.FileType"
|
||||
:limit="question.ImageCount === 0 ? 100 : question.ImageCount"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:http-request="uploadScreenshot"
|
||||
list-type="picture-card"
|
||||
:on-remove="handleRemove"
|
||||
:file-list="fileList"
|
||||
:class="{disabled: question.ImageCount === 0 ? false : fileList.length >= question.ImageCount}"
|
||||
>
|
||||
<i slot="default" class="el-icon-plus" />
|
||||
<div slot="file" slot-scope="{file}">
|
||||
<viewer
|
||||
:ref="file.url"
|
||||
:images="[imageUrl]"
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
"
|
||||
>
|
||||
<img
|
||||
class="el-upload-list__item-thumbnail"
|
||||
:src="OSSclientConfig.basePath + file.url"
|
||||
crossOrigin="anonymous"
|
||||
alt=""
|
||||
style="max-width: 100%; max-height: 100%"
|
||||
/>
|
||||
<span class="el-upload-list__item-actions">
|
||||
<span
|
||||
class="el-upload-list__item-preview"
|
||||
@click="handlePictureCardPreview(file)"
|
||||
>
|
||||
<i class="el-icon-zoom-in" />
|
||||
</span>
|
||||
|
||||
<span
|
||||
v-if="readingTaskState < 2"
|
||||
class="el-upload-list__item-delete"
|
||||
@click="handleRemove(file)"
|
||||
>
|
||||
<i class="el-icon-delete" />
|
||||
</span>
|
||||
</span>
|
||||
</viewer>
|
||||
</div>
|
||||
</el-upload>
|
||||
<el-dialog
|
||||
v-if="question.Type==='upload'"
|
||||
append-to-body
|
||||
:visible.sync="imgVisible"
|
||||
width="600px"
|
||||
>
|
||||
<el-image :src="imageUrl" width="100%">
|
||||
<div slot="placeholder" class="image-slot">
|
||||
{{$t('trials:readingUnit:qsList:message:loading')}}<span class="dot">...</span>
|
||||
</div>
|
||||
</el-image>
|
||||
</el-dialog>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { submitTableQuestion } from '@/api/trials'
|
||||
export default {
|
||||
name: 'QuestionTableFormItem',
|
||||
props: {
|
||||
isBaseline: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
questionForm: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
question: {
|
||||
type: Object,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
criterionId: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
calculationList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
readingTaskState: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
visitTaskId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'add'
|
||||
},
|
||||
questionsMarkStatus: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
parentQsId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
calculationValue: {
|
||||
get() {
|
||||
return this.questionForm[this.question.Id]
|
||||
},
|
||||
set() {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
addOrEdit: { visible: false, title: '' },
|
||||
fileList: [],
|
||||
accept: '.png,.jpg,.jpeg',
|
||||
imgVisible: false,
|
||||
imageUrl: '',
|
||||
urls: [],
|
||||
organList: [],
|
||||
QuestionsList: [],
|
||||
QuestionsForm: {},
|
||||
digitPlaces: 2,
|
||||
rowId: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
questionForm: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(v, oldv) {
|
||||
// try {
|
||||
// if (!v[this.question.Id] || !oldv[this.question.Id]) return
|
||||
// } catch (e) {
|
||||
// }
|
||||
// this.formItemNumberChange(this.question.Id, false)
|
||||
this.rowId = this.questionForm.RowId
|
||||
}
|
||||
},
|
||||
questionsMarkStatus: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(v) {
|
||||
this.$forceUpdate()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
||||
if (this.question.Type === 'upload') {
|
||||
if (this.questionForm[this.question.Id]) {
|
||||
this.urls = this.questionForm[this.question.Id].split('|')
|
||||
this.fileList = []
|
||||
this.urls.map(url => {
|
||||
this.fileList.push({ name: '', url: `${url}` })
|
||||
})
|
||||
}
|
||||
}
|
||||
if (this.type === 'edit') return
|
||||
},
|
||||
methods: {
|
||||
save() {
|
||||
},
|
||||
openAddTableCol(row) {
|
||||
this.addOrEdit.visible = true
|
||||
this.addOrEdit.title = row.QuestionName + this.$t('trials:readingUnit:qsList:title:tableQs')
|
||||
this.QuestionsList = row.TableQuestions.Questions
|
||||
this.AnswersList = row.TableQuestions.Answers
|
||||
this.QuestionsForm = {}
|
||||
},
|
||||
formItemChange(v, question) {
|
||||
if (question.Childrens && question.Childrens.length > 0) {
|
||||
this.resetChild(question.Childrens)
|
||||
}
|
||||
if (question.TableQuestionType === 1 && question.RelationQuestions.length > 0) {
|
||||
var index = this.organList.findIndex(item => item[question.DataTableColumn] === v)
|
||||
if (index < 0) return
|
||||
var selected = this.organList[index]
|
||||
this.question.RelationQuestions.map(qs => {
|
||||
var val = selected[qs.DataTableColumn]
|
||||
// if (typeof val === 'boolean') {
|
||||
// // val = String(val)
|
||||
// }
|
||||
this.$emit('setFormItemData', { key: qs.Id, val: val, question: qs })
|
||||
})
|
||||
} else {
|
||||
this.$emit('setFormItemData', { key: question.Id, val: v, question: question })
|
||||
}
|
||||
},
|
||||
handleBlur(value, a, b) {
|
||||
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
|
||||
},
|
||||
handleMarkedQsBlur(value, a, b, question) {
|
||||
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
|
||||
question.IsTableQuestion = true
|
||||
// this.$emit('operateImageMarker', {operateStateEnum: 6, question})
|
||||
},
|
||||
handleCalculationBlur(v) {
|
||||
this.calculationValue = parseFloat(v).toFixed(this.digitPlaces)
|
||||
},
|
||||
limitInput(value, q) {
|
||||
if (value.indexOf('.') > -1) {
|
||||
if (value.split('.')[1].length >= this.digitPlaces) {
|
||||
this.$set(this.questionForm, q.Id, parseFloat(value).toFixed(this.digitPlaces))
|
||||
}
|
||||
} else {
|
||||
}
|
||||
},
|
||||
logic(rules, num = 0) {
|
||||
try {
|
||||
if (rules.CalculateQuestionList.length === 0) {
|
||||
return false
|
||||
}
|
||||
let dataArr = []
|
||||
var count = 0
|
||||
var maxList = [], minList = []
|
||||
rules.CalculateQuestionList.forEach((o, i) => {
|
||||
if (rules.CustomCalculateMark > 4 && rules.CustomCalculateMark < 10) {
|
||||
if (i !== 0) {
|
||||
switch (rules.CustomCalculateMark) {
|
||||
case 7:
|
||||
count += parseFloat(this.questionForm[o.TableQuestionId])
|
||||
if (i === rules.CalculateQuestionList.length - 1) {
|
||||
num = count / rules.CalculateQuestionList.length
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
maxList.push(this.questionForm[o.TableQuestionId])
|
||||
if (i === rules.CalculateQuestionList.length - 1) {
|
||||
num = Math.max(...maxList)
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
minList.push(this.questionForm[o.TableQuestionId])
|
||||
if (i === rules.CalculateQuestionList.length - 1) {
|
||||
num = Math.min(...minList)
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
maxList.push(this.questionForm[o.TableQuestionId])
|
||||
minList.push(this.questionForm[o.TableQuestionId])
|
||||
count = parseFloat(this.questionForm[o.TableQuestionId])
|
||||
num = parseFloat(this.questionForm[o.TableQuestionId])
|
||||
dataArr.push(num)
|
||||
}
|
||||
} else {
|
||||
if (i !== 0) {
|
||||
switch (rules.CustomCalculateMark) {
|
||||
case 1:
|
||||
num += parseFloat(this.questionForm[o.TableQuestionId])
|
||||
break;
|
||||
case 2:
|
||||
num -= parseFloat(this.questionForm[o.TableQuestionId])
|
||||
break;
|
||||
case 3:
|
||||
num *= parseFloat(this.questionForm[o.TableQuestionId])
|
||||
break;
|
||||
case 4:
|
||||
if (parseFloat(this.questionForm[o.TableQuestionId]) === 0) {
|
||||
num = 0
|
||||
} else {
|
||||
num /= parseFloat(this.questionForm[o.TableQuestionId])
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||
}
|
||||
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => {
|
||||
return acc + (typeof curr === "number" ? curr : 0);
|
||||
}, 0) / dataArr.length;
|
||||
break;
|
||||
case 11:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||
}
|
||||
num = Math.max(...dataArr);
|
||||
break;
|
||||
case 12:
|
||||
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
|
||||
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
|
||||
}
|
||||
num = Math.min(...dataArr);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
num = parseFloat(this.questionForm[o.TableQuestionId])
|
||||
}
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
if (rules.ValueType === 2) {
|
||||
num = num * 100
|
||||
}
|
||||
return num.toFixed(this.digitPlaces)
|
||||
},
|
||||
formItemNumberChange(v, question) {
|
||||
this.$emit('formItemTableNumberChange', v, question)
|
||||
this.$emit('setFormItemData', { key: question.Id, val: v, question: question })
|
||||
// this.$emit('formItemTableNumberChange', v, question)
|
||||
},
|
||||
resetChild(obj) {
|
||||
obj.forEach(i => {
|
||||
this.$emit('resetFormItemData', i.Id)
|
||||
if (i.Childrens && i.Childrens.length > 0) {
|
||||
this.resetChild(i.Childrens)
|
||||
}
|
||||
})
|
||||
},
|
||||
resetFormItemData(v) {
|
||||
this.$emit('resetFormItemData', v)
|
||||
},
|
||||
setFormItemData(obj) {
|
||||
this.$emit('setFormItemData', obj)
|
||||
},
|
||||
async operateImageMarker(obj) {
|
||||
obj.question.IsTableQuestion = true
|
||||
obj.question.RowId = this.rowId
|
||||
obj.question.ParentQsId = this.parentQsId
|
||||
if (obj.operateStateEnum === 7) {
|
||||
// 保存表格问题标记
|
||||
// if (!obj.question.RowId) {
|
||||
// // 生成rowId
|
||||
// const loading = this.$loading({ fullscreen: true })
|
||||
// try {
|
||||
// let params = {
|
||||
// questionId: this.parentQsId,
|
||||
// RowIndex: this.questionForm.RowIndex,
|
||||
// visitTaskId: this.visitTaskId,
|
||||
// trialId: this.$route.query.trialId,
|
||||
// answerList: [],
|
||||
// }
|
||||
// let res = await submitTableQuestion(params)
|
||||
// // this.$emit('save',rowId)
|
||||
// this.QuestionsForm.RowId = res.Result.RowId
|
||||
// obj.rowId = res.Result.RowId
|
||||
// this.rowId = res.Result.RowId
|
||||
// loading.close()
|
||||
// } catch(e) {
|
||||
// loading.close()
|
||||
// }
|
||||
// }
|
||||
obj.rowIndex = this.questionForm.RowIndex
|
||||
// obj.parentQsId = this.parentQsId
|
||||
obj.answer = this.questionForm[obj.question.Id]
|
||||
}
|
||||
this.$emit('operateImageMarker', obj)
|
||||
},
|
||||
async uploadScreenshot(param) {
|
||||
if (!this.visitTaskId) return
|
||||
const loading = this.$loading({
|
||||
target: document.querySelector('.el-dialog'),
|
||||
fullscreen: false,
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading'
|
||||
})
|
||||
var trialId = this.$route.query.trialId
|
||||
var subjectId = this.$route.query.trialId
|
||||
var file = await this.fileToBlob(param.file)
|
||||
const res = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/Visit/${param.file.name}`, file)
|
||||
this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url)})
|
||||
this.urls.push(this.$getObjectName(res.url))
|
||||
this.$emit('setFormItemData', { key:this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '', question: this.question })
|
||||
loading.close()
|
||||
},
|
||||
handleBeforeUpload(file) {
|
||||
// 检测文件类型是否符合要求
|
||||
if (this.checkFileSuffix(file.name)) {
|
||||
// this.fileList = []
|
||||
return true
|
||||
} else {
|
||||
let msg = this.$t(
|
||||
"trials:readingUnit:qsList:message:imageFormat"
|
||||
).replace("xxx", this.question.FileType)
|
||||
this.$alert(msg)
|
||||
return false
|
||||
}
|
||||
},
|
||||
checkFileSuffix(fileName) {
|
||||
var index = fileName.lastIndexOf('.')
|
||||
var suffix = fileName.substring(index + 1, fileName.length)
|
||||
if (this.question.FileType.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === -1) {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
// 预览图片
|
||||
handlePictureCardPreview(file) {
|
||||
var suffix = file.url.substring(file.url.lastIndexOf(".")+1)
|
||||
suffix = suffix ? suffix.toLowerCase() : ''
|
||||
if (suffix === 'doc' || suffix === 'docx' || suffix === 'pdf'){
|
||||
window.open(this.OSSclientConfig.basePath + file.url,'_blank')
|
||||
}else{
|
||||
this.imageUrl = this.OSSclientConfig.basePath + file.url
|
||||
// this.imgVisible = true
|
||||
this.$refs[file.url].$viewer.show()
|
||||
}
|
||||
|
||||
},
|
||||
// 删除图片
|
||||
handleRemove(file, fileList) {
|
||||
this.imageUrl = ''
|
||||
this.fileList.splice(this.fileList.findIndex(f => f.url === file.url), 1)
|
||||
this.urls.splice(this.fileList.findIndex(f => f === file.url), 1)
|
||||
this.$emit('setFormItemData', { key:this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '', question: this.question })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.criterion-table-form-item{
|
||||
.el-form-item{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.el-input{
|
||||
width:100%;
|
||||
}
|
||||
.el-select {
|
||||
width:100%;
|
||||
}
|
||||
.mb{
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.disabled{
|
||||
::v-deep .el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.uploadWrapper{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -396,7 +396,7 @@ export default {
|
||||
if (v.Type === 'number') {
|
||||
let val = null
|
||||
if (v.ValueType === 0) {
|
||||
val = isNaN(parseFloat(v.Answers[this.visitTaskId])) ? v.Answers[this.visitTaskId] : parseInt(v.Answers[this.visitTaskId])
|
||||
val = parseInt(v.Answers[this.visitTaskId])
|
||||
} else if (v.ValueType === 3) {
|
||||
val = v.Answers[this.visitTaskId]
|
||||
} else {
|
||||
@@ -422,7 +422,7 @@ export default {
|
||||
if (i.Type === 'number') {
|
||||
let val = null
|
||||
if (i.ValueType === 0) {
|
||||
val = isNaN(parseFloat(i.Answers[this.visitTaskId])) ? i.Answers[this.visitTaskId] : parseInt(i.Answers[this.visitTaskId])
|
||||
val = parseInt(i.Answers[this.visitTaskId])
|
||||
} else if (i.ValueType === 3) {
|
||||
val = i.Answers[this.visitTaskId]
|
||||
} else {
|
||||
@@ -561,7 +561,7 @@ export default {
|
||||
if (item.Type === 'number') {
|
||||
let val = null
|
||||
if (item.ValueType === 0) {
|
||||
val = isNaN(parseFloat(i.Answer)) ? i.Answer : parseInt(i.Answer)
|
||||
val = parseInt(i.Answer)
|
||||
} else if (item.ValueType === 3) {
|
||||
val = i.Answer
|
||||
} else {
|
||||
|
||||
@@ -234,6 +234,7 @@ const config = {
|
||||
'name': '直径测量工具',
|
||||
'icon': 'length',
|
||||
'toolName': 'Length',
|
||||
'props': ['length'],
|
||||
'i18nKey': 'trials:reading:button:length',
|
||||
'isDisabled': false,
|
||||
'disabledReason': ''
|
||||
@@ -242,6 +243,7 @@ const config = {
|
||||
'name': '长短径测量工具',
|
||||
'icon': 'bidirection',
|
||||
'toolName': 'Bidirectional',
|
||||
'props': ['length', 'width'],
|
||||
'i18nKey': 'trials:reading:button:bidirectional',
|
||||
'isDisabled': false,
|
||||
'disabledReason': ''
|
||||
@@ -250,6 +252,7 @@ const config = {
|
||||
'name': '矩形工具',
|
||||
'icon': 'rectangle',
|
||||
'toolName': 'RectangleROI',
|
||||
'props': ['area', 'mean', 'max', 'stdDev'],
|
||||
'i18nKey': 'trials:reading:button:rectangle',
|
||||
'isDisabled': false,
|
||||
'disabledReason': ''
|
||||
@@ -258,6 +261,7 @@ const config = {
|
||||
'name': '箭头工具',
|
||||
'icon': 'arrow',
|
||||
'toolName': 'ArrowAnnotate',
|
||||
'props': [],
|
||||
'i18nKey': 'trials:reading:button:arrowAnnotate',
|
||||
'isDisabled': false,
|
||||
'disabledReason': ''
|
||||
@@ -266,9 +270,28 @@ const config = {
|
||||
'name': '椭圆工具',
|
||||
'icon': 'oval',
|
||||
'toolName': 'CircleROI',
|
||||
'props': ['radius', 'area', 'mean', 'max', 'stdDev'],
|
||||
'i18nKey': 'trials:reading:button:Circle',
|
||||
'isDisabled': false,
|
||||
'disabledReason': ''
|
||||
},
|
||||
{
|
||||
'name': '角度工具',
|
||||
'icon': 'angle',
|
||||
'toolName': 'Angle',
|
||||
'props': ['angle'],
|
||||
'i18nKey': 'trials:reading:button:Angle',
|
||||
'isDisabled': false,
|
||||
'disabledReason': ''
|
||||
},
|
||||
{
|
||||
'name': '角度工具',
|
||||
'icon': 'cobb',
|
||||
'toolName': 'CobbAngle',
|
||||
'props': ['angle'],
|
||||
'i18nKey': 'trials:reading:button:CobbAngle',
|
||||
'isDisabled': false,
|
||||
'disabledReason': ''
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -71,7 +71,7 @@
|
||||
</el-button>
|
||||
<!-- 随机排序 -->
|
||||
<el-button type="primary" @click="randomOrder"
|
||||
:disabled="!searchData.TrialReadingCriterionId || !searchData.DoctorUserId" v-if="!isAdmin">
|
||||
:disabled="!searchData.TrialReadingCriterionId || !searchData.DoctorUserId">
|
||||
{{ $t('trials:readingTracking:button:order') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
@@ -188,9 +188,8 @@
|
||||
sortable="custom" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.RandomOrder"
|
||||
@change="(value, old) => handleChange(scope.row, value, old)" :min="0" style="width: 150px;"
|
||||
v-if="scope.row.ReadingTaskState !== 1 && !isAdmin"></el-input-number>
|
||||
<span v-else>{{ scope.row.RandomOrder }}</span>
|
||||
@change="(value, old) => handleChange(scope.row, value, old)" :min="1" style="width: 150px;"
|
||||
:disabled="scope.row.ReadingTaskState === 1"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -260,12 +259,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (!this.hasPermi(['role:pm', 'role:apm', 'role:admin'])) return this.$router.replace("/login")
|
||||
},
|
||||
computed: {
|
||||
isAdmin() {
|
||||
return !!this.hasPermi(['role:admin'])
|
||||
}
|
||||
if (!this.hasPermi(['role:pm', 'role:apm'])) return this.$router.replace("/login")
|
||||
},
|
||||
mounted() {
|
||||
this.getSite()
|
||||
@@ -284,7 +278,6 @@ export default {
|
||||
async handleChange(row, value, old) {
|
||||
try {
|
||||
if (!this.searchData.DoctorUserId || !this.searchData.TrialReadingCriterionId) return false
|
||||
if (!value) throw this.$t('trials:readOrder:message:min1')
|
||||
let data = {
|
||||
TrialId: this.$route.query.trialId,
|
||||
TrialReadingCriterionId: this.searchData.TrialReadingCriterionId,
|
||||
@@ -305,8 +298,6 @@ export default {
|
||||
} catch (err) {
|
||||
row.RandomOrder = old
|
||||
console.log(err)
|
||||
this.$message.warning(err)
|
||||
this.getList()
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
@@ -373,11 +364,8 @@ export default {
|
||||
getReadingTaskList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false
|
||||
this.list = []
|
||||
this.$nextTick(() => {
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
})
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<el-input
|
||||
v-model="scope.row.CDISCCode"
|
||||
size="mini"
|
||||
:disabled="scope.row.HasChildren || scope.row.IsTableQuestion"
|
||||
:disabled="scope.row.HasChildren || (scope.row.IsTableQuestion && exportInfo.CriterionType !== 0)"
|
||||
v-show="!scope.row.IsGroup || !scope.row.HasChildren"
|
||||
>
|
||||
</el-input>
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
exportInfo: []
|
||||
exportInfo: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -152,7 +152,8 @@ export default {
|
||||
} else if ((this.exportInfo.CriterionGroup === 0 || this.exportInfo.CriterionType === 0 ) && item.Code === 1 && (row.HasChildren || row.IsTableQuestion)) {
|
||||
// 自定义或非肿瘤阅片标准阅片结果表(1)不能配置表格问题
|
||||
return true
|
||||
} else if (item.Code === 8 && (row.HasChildren || row.IsTableQuestion)) {
|
||||
} else if (item.Code === 8 && (row.HasChildren || (row.IsTableQuestion && this.exportInfo.CriterionType !== 0))) {
|
||||
// else if (item.Code === 8 && (row.HasChildren || row.IsTableQuestion))
|
||||
// CDISC导出不能配置表格问题
|
||||
return true
|
||||
} else if (item.Code === 2 && row.HasChildren) {
|
||||
|
||||
@@ -1038,26 +1038,26 @@ export default {
|
||||
if (area) {
|
||||
const areaLine = isEmptyArea
|
||||
? `Area: Oblique not supported`
|
||||
: `Area: ${ps ? parseFloat(area * ps * ps).toFixed(this.digitPlaces) : parseFloat(area).toFixed(this.digitPlaces)} ${ps ? 'mm' + '\xb2' : areaUnit}`
|
||||
: `Area: ${ps ? this.reRound(csUtils.roundNumber(area * ps * ps), this.digitPlaces) : this.reRound(csUtils.roundNumber(area), this.digitPlaces)} ${ps ? 'mm' + '\xb2' : areaUnit}`
|
||||
textLines.push(areaLine)
|
||||
}
|
||||
if (mean) {
|
||||
textLines.push(`Mean: ${parseFloat(mean).toFixed(this.digitPlaces)} ${modalityUnit}`)
|
||||
textLines.push(`Mean: ${this.reRound(csUtils.roundNumber(mean), this.digitPlaces)} ${modalityUnit}`)
|
||||
}
|
||||
|
||||
if (Number.isFinite(max)) {
|
||||
textLines.push(`Max: ${csUtils.roundNumber(max)} ${modalityUnit}`)
|
||||
|
||||
if (max) {
|
||||
textLines.push(`Max: ${this.reRound(csUtils.roundNumber(max), this.digitPlaces)} ${modalityUnit}`)
|
||||
}
|
||||
|
||||
if (stdDev) {
|
||||
textLines.push(`Std Dev: ${csUtils.roundNumber(stdDev)} ${modalityUnit}`)
|
||||
textLines.push(`Std Dev: ${this.reRound(csUtils.roundNumber(stdDev), this.digitPlaces)} ${modalityUnit}`)
|
||||
}
|
||||
|
||||
if (perimeter) {
|
||||
if (ps) {
|
||||
textLines.push(`Perimeter: ${parseFloat(perimeter * ps).toFixed(this.digitPlaces)} mm`)
|
||||
textLines.push(`Perimeter: ${this.reRound(csUtils.roundNumber(perimeter * ps), this.digitPlaces)} mm`)
|
||||
} else {
|
||||
textLines.push(`Perimeter: ${parseFloat(perimeter).toFixed(this.digitPlaces)} ${unit}`)
|
||||
textLines.push(`Perimeter: ${this.reRound(csUtils.roundNumber(perimeter), this.digitPlaces)} ${unit}`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1084,17 +1084,33 @@ export default {
|
||||
ps = parseFloat(this.psArr[i].PS).toFixed(3)
|
||||
}
|
||||
if (ps) {
|
||||
textLines.push(`Area: ${parseFloat(area * ps * ps).toFixed(this.digitPlaces)} ${'mm' + '\xb2'}`)
|
||||
textLines.push(`Area: ${this.reRound(csUtils.roundNumber(area * ps * ps), this.digitPlaces)} ${'mm' + '\xb2'}`)
|
||||
} else {
|
||||
textLines.push(`Area: ${parseFloat(area).toFixed(this.digitPlaces)} ${areaUnit}`)
|
||||
textLines.push(`Area: ${this.reRound(csUtils.roundNumber(area), this.digitPlaces)} ${areaUnit}`)
|
||||
}
|
||||
|
||||
textLines.push(`Mean: ${csUtils.roundNumber(mean)} ${modalityUnit}`)
|
||||
textLines.push(`Max: ${csUtils.roundNumber(max)} ${modalityUnit}`)
|
||||
textLines.push(`Std Dev: ${csUtils.roundNumber(stdDev)} ${modalityUnit}`)
|
||||
textLines.push(`Mean: ${this.reRound(csUtils.roundNumber(mean), this.digitPlaces)} ${modalityUnit}`)
|
||||
textLines.push(`Max: ${this.reRound(csUtils.roundNumber(max), this.digitPlaces)} ${modalityUnit}`)
|
||||
textLines.push(`Std Dev: ${this.reRound(csUtils.roundNumber(stdDev), this.digitPlaces)} ${modalityUnit}`)
|
||||
|
||||
return textLines
|
||||
},
|
||||
reRound(result, finalPrecision) {
|
||||
if (typeof result === 'string' && result.includes(', ')) {
|
||||
const numStrs = result.split(', ')
|
||||
const processed = numStrs.map(str => this.processSingle(str, finalPrecision))
|
||||
return processed.join(', ')
|
||||
}
|
||||
return this.processSingle(result, finalPrecision)
|
||||
},
|
||||
processSingle(str, precision) {
|
||||
const num = parseFloat(str)
|
||||
if (isNaN(num)) return 'NaN'
|
||||
|
||||
// 保留原极小值处理逻辑
|
||||
if (Math.abs(num) < 0.0001) return str
|
||||
const factor = 10 ** precision
|
||||
return (Math.round(num * factor + 0.0000001) / factor).toFixed(precision)
|
||||
},
|
||||
debounce(callback, delay) {
|
||||
let timerId
|
||||
return function() {
|
||||
|
||||
@@ -1,288 +1,213 @@
|
||||
<template>
|
||||
<el-form
|
||||
ref="trialAttachmentFrom"
|
||||
v-loading="loading"
|
||||
:model="form"
|
||||
label-width="240px"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
class="upload-temporary-file"
|
||||
>
|
||||
<div class="base-dialog-body">
|
||||
<!-- 文件类型 -->
|
||||
<el-form-item :label="$t('trials:attachment:table:fileType')" prop="FileTypeId">
|
||||
<el-select
|
||||
v-model="form.FileTypeId"
|
||||
style="width:100%;"
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of dictionaryList.Trial_Document"
|
||||
:key="item.Id"
|
||||
:label="item.Value"
|
||||
:value="item.Id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 文件 -->
|
||||
<el-form-item :label="$t('trials:attachment:form:file')">
|
||||
<div class="upload-container">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
accept=".pdf"
|
||||
:before-upload="beforeUpload"
|
||||
:http-request="handleUploadFile"
|
||||
:on-remove="handleRemoveFile"
|
||||
:show-file-list="true"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:disabled="form.FileTypeId === ''"
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="form.FileTypeId === '' || saveBtnLoading" :loading="btnLoading">
|
||||
{{ $t('trials:attachment:button:select') }}
|
||||
</el-button>
|
||||
<span
|
||||
slot="tip"
|
||||
style="margin-left:10px;"
|
||||
class="el-upload__tip"
|
||||
>
|
||||
{{ $t('system:tip:file:pdf') }}
|
||||
</span>
|
||||
</el-upload>
|
||||
<el-form ref="attachmentFrom" v-loading="loading" :model="form" label-width="190px" size="small" :rules="rules"
|
||||
class="upload-temporary-file">
|
||||
<div class="base-dialog-body">
|
||||
<el-form-item :label="$t('trials:attachment:form:FileName')" prop="Name">
|
||||
<el-input v-model="form.Name" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:attachment:form:OffLine')" prop="OffLine">
|
||||
<el-switch v-model="form.OffLine" :active-value="true" :inactive-value="false"
|
||||
:active-text="$fd('YesOrNo', true)" :inactive-text="$fd('YesOrNo', false)">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:attachment:form:File')">
|
||||
<div class="upload-container">
|
||||
<el-upload class="upload-demo" action :accept="this.accept.join(',')" :before-upload="beforeUpload"
|
||||
:http-request="handleUploadFile" :on-preview="handlePreview" :on-remove="handleRemoveFile"
|
||||
:show-file-list="true" :file-list="fileList" :limit="1" :on-exceed="handleExceed">
|
||||
<el-button size="small" type="primary" :loading="btnLoading">{{ $t('common:button:check')
|
||||
}}</el-button>
|
||||
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">
|
||||
({{ $t('trials:signature:label:type').replace("xxx", this.accept.join(", ")) }})
|
||||
</span>
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<!-- 需要签署的用户类型 -->
|
||||
<el-form-item :label="$t('trials:attachment:table:userType')" prop="NeedConfirmedUserTypeIdList">
|
||||
<el-select
|
||||
v-model="form.NeedConfirmedUserTypeIdList"
|
||||
style="width:100%;"
|
||||
multiple
|
||||
>
|
||||
<el-option
|
||||
v-for="item of userTypeOptions"
|
||||
v-show="item.UserTypeEnum !== 1 && item.UserTypeEnum !== 8 && item.UserTypeEnum !== 20 && item.UserTypeEnum !== 26 && item.UserTypeEnum !== 27 && item.UserTypeEnum !== 31"
|
||||
:key="item.Id"
|
||||
:label="item.UserTypeShortName"
|
||||
:value="item.Id"
|
||||
>
|
||||
<span>{{ item.UserType }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 查看最短时间(分钟) -->
|
||||
<el-form-item :label="$t('trials:attachment:table:min')" prop="SignViewMinimumMinutes">
|
||||
<el-input-number
|
||||
v-model="form.SignViewMinimumMinutes"
|
||||
controls-position="right"
|
||||
:min="1"
|
||||
:max="50"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 描述 -->
|
||||
<el-form-item :label="$t('trials:attachment:table:description')" prop="Description">
|
||||
<el-input
|
||||
v-model="form.Description"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 5, maxRows: 6}"
|
||||
maxlength="500"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
|
||||
<el-form-item style="text-align:right;">
|
||||
<!-- Save -->
|
||||
<el-button size="small" type="primary" :disabled="form.FileTypeId === '' || form.Name === ''" :loading="saveBtnLoading" @click="handleSave">
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
|
||||
<el-form-item style="text-align: right">
|
||||
<el-button size="small" type="primary" :disabled="form.FileTypeId === '' || form.Name === ''"
|
||||
:loading="saveBtnLoading" @click="handleSave">{{ $t('common:button:save') }}</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { addOrUpdateTrialDocument, uploadTrialDoc, getTrialUserTypeList } from '@/api/trials'
|
||||
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
|
||||
import { addOrUpdateTrialDocumentAttachment } from '@/api/trials'
|
||||
export default {
|
||||
name: 'TrialAttachmentFrom',
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() { return {} }
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
Id: '',
|
||||
TrialId: '',
|
||||
FileTypeId: '',
|
||||
Name: '',
|
||||
Path: '',
|
||||
IsDeleted: false,
|
||||
SignViewMinimumMinutes: null,
|
||||
Description: '',
|
||||
NeedConfirmedUserTypeIdList: []
|
||||
},
|
||||
rules: {
|
||||
FileTypeId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
|
||||
SignViewMinimumMinutes: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['change'] }],
|
||||
NeedConfirmedUserTypeIdList: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
|
||||
Description: [{ max: 500, message: `${this.$t('common:ruleMessage:maxLength')} 500`, trigger: ['blur', 'change'] }]
|
||||
},
|
||||
fileList: [],
|
||||
userTypeOptions: [],
|
||||
btnLoading: false,
|
||||
saveBtnLoading: false,
|
||||
loading: false,
|
||||
dictionaryList: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initForm()
|
||||
},
|
||||
methods: {
|
||||
// 保存
|
||||
handleSave() {
|
||||
this.$refs.trialAttachmentFrom.validate(valid => {
|
||||
if (!valid) return
|
||||
if (!this.form.Name) {
|
||||
this.$alert(this.$t('trials:attachment:message:selectFile'))
|
||||
return
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
TrialDocumentId: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
if (this.form.TrialId === '') {
|
||||
this.form.TrialId = this.$route.query.trialId
|
||||
}
|
||||
this.saveBtnLoading = true
|
||||
addOrUpdateTrialDocument(this.form).then(res => {
|
||||
this.saveBtnLoading = false
|
||||
this.$emit('closeDialog')
|
||||
this.$emit('getList')
|
||||
if (this.form.Id) {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
} else {
|
||||
this.$message.success(this.$t('common:message:addedSuccessfully'))
|
||||
}
|
||||
// this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
}).catch(() => {
|
||||
this.saveBtnLoading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
async initForm() {
|
||||
this.loading = true
|
||||
await this.getDicData()
|
||||
await this.getUserType()
|
||||
if (Object.keys(this.data).length > 0) {
|
||||
if (this.data.Path) {
|
||||
this.fileList = [
|
||||
{
|
||||
name: this.data.Name,
|
||||
path: this.data.Path,
|
||||
url: this.data.Path,
|
||||
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
Id: '',
|
||||
Name: null,
|
||||
FileFormat: null,
|
||||
FileName: null,
|
||||
FilePath: null,
|
||||
FileSize: null,
|
||||
OffLine: false,
|
||||
TrialDocumentId: null,
|
||||
},
|
||||
rules: {
|
||||
Name: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: ['change'],
|
||||
},
|
||||
],
|
||||
},
|
||||
fileList: [],
|
||||
btnLoading: false,
|
||||
saveBtnLoading: false,
|
||||
loading: false,
|
||||
accept: ['.jpg',
|
||||
'.jpeg',
|
||||
'.png',
|
||||
'.pdf',
|
||||
'.ppt',
|
||||
'.pptx',
|
||||
'.doc',
|
||||
'.docx',
|
||||
'.xls',
|
||||
'.xlsx',
|
||||
".mp4"]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initForm()
|
||||
},
|
||||
methods: {
|
||||
async initForm() {
|
||||
this.loading = true
|
||||
if (this.data && this.data.Id) {
|
||||
Object.keys(this.form).forEach(key => {
|
||||
this.form[key] = this.data[key]
|
||||
})
|
||||
this.fileList = [
|
||||
{
|
||||
name: this.data.FileName,
|
||||
url: this.data.FilePath,
|
||||
path: this.data.FilePath,
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
this.form.Id = this.data.Id
|
||||
this.form.FileTypeId = this.data.FileTypeId
|
||||
this.form.Name = this.data.Name
|
||||
this.form.Path = this.data.Path
|
||||
this.form.IsDeleted = this.data.IsDeleted
|
||||
this.form.Description = this.data.Description
|
||||
this.form.SignViewMinimumMinutes = this.data.SignViewMinimumMinutes
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
// 获取文件类型下拉框数据
|
||||
getDicData() {
|
||||
getBasicDataSelects(['Trial_Document']).then(res => {
|
||||
this.dictionaryList = { ...res.Result }
|
||||
})
|
||||
},
|
||||
// 获取用户类型下拉数据
|
||||
getUserType() {
|
||||
getTrialUserTypeList().then(res => {
|
||||
this.userTypeOptions = res.Result
|
||||
if (this.form.Id) {
|
||||
this.form.NeedConfirmedUserTypeIdList = this.data.NeedConfirmedUserTypeeIds
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
handleViewableUserTypeChange(valArr) {
|
||||
this.form.NeedConfirmedUserTypeIdList = []
|
||||
this.needConfirmedUserTypeOptions = []
|
||||
valArr.forEach((val) => {
|
||||
const i = this.userTypeOptions.findIndex(userType => { return userType.Id === val })
|
||||
this.needConfirmedUserTypeOptions.push(this.userTypeOptions[i])
|
||||
})
|
||||
},
|
||||
// 检测文件类型是否符合要求
|
||||
beforeUpload(file) {
|
||||
if (this.checkFileSuffix(file.name)) {
|
||||
this.fileList = []
|
||||
return true
|
||||
} else {
|
||||
this.$alert(this.$t('trials:attachment:message:pdf'))
|
||||
this.loading = false
|
||||
},
|
||||
beforeUpload(file) {
|
||||
// 检测文件类型是否符合要求
|
||||
if (this.checkFileSuffix(file.name)) {
|
||||
this.fileList = []
|
||||
return true
|
||||
} else {
|
||||
this.$alert(this.$t('trials:signature:label:type').replace("xxx", this.accept.join(", ")))
|
||||
|
||||
return false
|
||||
}
|
||||
return false
|
||||
}
|
||||
},
|
||||
async handleUploadFile(param) {
|
||||
this.loading = true
|
||||
var file = await this.fileToBlob(param.file)
|
||||
const res = await this.OSSclient.put(
|
||||
`/${this.$route.query.trialId}/DocumentToSign/${param.file.name}${new Date().getTime()}`,
|
||||
file
|
||||
)
|
||||
this.fileList.push({
|
||||
name: param.file.name,
|
||||
path: this.$getObjectName(res.url),
|
||||
url: this.$getObjectName(res.url),
|
||||
})
|
||||
this.form.Name = param.file.name
|
||||
this.form.FileName = param.file.name
|
||||
this.form.FilePath = this.$getObjectName(res.url)
|
||||
this.form.FileSize = param.file.size
|
||||
this.form.FileFormat = param.file.name
|
||||
.substring(param.file.name.lastIndexOf('.'))
|
||||
.toLocaleLowerCase().split('.')[1]
|
||||
this.loading = false
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.attachmentFrom.validate((valid) => {
|
||||
if (!valid) return false
|
||||
if (!this.form.FilePath)
|
||||
return this.$alert(this.$t('trials:signature:message:selectFile'))
|
||||
this.saveBtnLoading = true
|
||||
if (this.TrialDocumentId) this.form.TrialDocumentId = this.TrialDocumentId
|
||||
addOrUpdateTrialDocumentAttachment(this.form)
|
||||
.then((res) => {
|
||||
this.saveBtnLoading = false
|
||||
this.$emit('closeDialog')
|
||||
this.$emit('getList')
|
||||
this.$message.success(this.$t('common:message:updatedSuccessfully'))
|
||||
})
|
||||
.catch(() => {
|
||||
this.saveBtnLoading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
handleRemoveFile() {
|
||||
this.fileList = []
|
||||
this.form.FilePath = ''
|
||||
this.form.FileSize = ''
|
||||
this.form.FileFormat = ''
|
||||
this.form.FileName = ''
|
||||
},
|
||||
handlePreview(file) {
|
||||
if (file.fullPath) {
|
||||
window.open(file.fullPath, '_blank')
|
||||
}
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
this.$message.warning(this.$t('upload:rule:maxFile1'))
|
||||
},
|
||||
checkFileSuffix(fileName) {
|
||||
var typeArr = this.accept.map(item => item.split('.')[1])
|
||||
var extendName = fileName
|
||||
.substring(fileName.lastIndexOf('.') + 1)
|
||||
.toLocaleLowerCase()
|
||||
if (typeArr.indexOf(extendName) !== -1) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
},
|
||||
// 上传文件
|
||||
async handleUploadFile(param) {
|
||||
this.loading = true
|
||||
var file = await this.fileToBlob(param.file)
|
||||
const trialId = this.$route.query.trialId
|
||||
console.log(this.OSSclient.put)
|
||||
const res = await this.OSSclient.put(`/${trialId}/DocumentToSign/${param.file.name}`, file)
|
||||
this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url) })
|
||||
this.form.Path = this.$getObjectName(res.url)
|
||||
this.form.Name = param.file.name
|
||||
this.loading = false
|
||||
},
|
||||
// 移除
|
||||
handleRemoveFile() {
|
||||
this.fileList = []
|
||||
this.form.Path = ''
|
||||
this.form.Name = ''
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
this.$message.warning(this.$t('trials:attachment:message:uploadFile'))
|
||||
},
|
||||
// 文件类型是否是pdf
|
||||
checkFileSuffix(fileName) {
|
||||
var typeArr = ['pdf']
|
||||
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
|
||||
if (typeArr.indexOf(extendName) !== -1) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.upload-temporary-file{
|
||||
.upload-container .el-upload--text {
|
||||
border: none;
|
||||
width: 80px;
|
||||
height: 40px;
|
||||
}
|
||||
.upload-container .el-input--small {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.upload-container .el-icon-circle-check {
|
||||
color: #428bca;
|
||||
font-size: 13px;
|
||||
}
|
||||
.account_item_clear{
|
||||
.el-tag__close{
|
||||
display: none !important;
|
||||
.upload-temporary-file {
|
||||
.upload-container .el-upload--text {
|
||||
border: none;
|
||||
width: 80px;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-container .el-input--small {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.upload-container .el-icon-circle-check {
|
||||
color: #428bca;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.account_item_clear {
|
||||
.el-tag__close {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -0,0 +1,265 @@
|
||||
<template>
|
||||
<div v-if="config.visible">
|
||||
<base-model :config="config">
|
||||
<template slot="dialog-body">
|
||||
<el-form ref="form" :model="rowData" label-width="80px" style="width: 80%;display: inline-block;">
|
||||
<el-form-item :label="`${$t('trials:attachment:table:Name')}: `">
|
||||
<span class="name text-ellipsis" :title="rowData.Name">{{ rowData.Name }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button size="mini" type="primary" style="float:right" @click.stop="edit({})" v-if="!isView">
|
||||
{{ $t('common:button:add') }}</el-button>
|
||||
<el-table :data="list" style="width: 100%" max-height="300px" v-loading="loading"
|
||||
@sort-change="handleSortByColumn">
|
||||
<el-table-column type="index" width="60" />
|
||||
<el-table-column prop="Name" :label="$t('trials:attachment:attachmentList:FileName')"
|
||||
sortable="custom" />
|
||||
<el-table-column prop="OffLine" :label="$t('trials:attachment:attachmentList:OffLine')"
|
||||
sortable="custom" v-if="!isView">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.OffLine" @change="(val) => OffLine(scope.row, val)"
|
||||
:active-value="true" :inactive-value="false" :active-text="$fd('YesOrNo', true)"
|
||||
:inactive-text="$fd('YesOrNo', false)">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CreateTime" :label="$t('trials:attachment:attachmentList:CreateTime')"
|
||||
sortable="custom" />
|
||||
<el-table-column :label="$t('common:action:action')" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click.stop="preview(scope.row)">
|
||||
{{ $t('common:button:preview') }}
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" @click.stop="edit(scope.row)" v-if="!isView">
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<!-- <el-button size="mini" type="text" @click.stop="OffLine(scope.row, true)"
|
||||
:disabled="scope.row.OffLine">
|
||||
{{ $t('trials:attachment:attachmentList:OffLine') }}
|
||||
</el-button> -->
|
||||
<el-button size="mini" type="text" @click.stop="del(scope.row)" v-if="!isView">
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 新增/编辑附件 -->
|
||||
<el-dialog :visible.sync="visible" :close-on-click-modal="false" :append-to-body="true" :title="title"
|
||||
width="800px" custom-class="base-dialog-wrapper">
|
||||
<attachmentForm v-if="visible" :data="rowDATA" :TrialDocumentId="TrialDocumentId"
|
||||
@closeDialog="closeDialog" @getList="getAllList" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
</base-model>
|
||||
<viewer ref="picture_perview3" style="margin: 0 10px"
|
||||
v-if="rowDATA.FileFormat && ['png', 'jpg', 'jpeg'].includes(rowDATA.FileFormat.toLowerCase())"
|
||||
:images="[`${OSSclientConfig.basePath}${rowDATA.FilePath}`]" :options="viewerOptions">
|
||||
|
||||
<img v-show="false" :src="`${OSSclientConfig.basePath}${rowDATA.FilePath}`" alt="Image" />
|
||||
</viewer>
|
||||
<!-- <attachmentPreview :TrialDocumentId="TrialDocumentId" :visible.sync="perview_visible"
|
||||
v-if="perview_visible" /> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
import attachmentForm from './attachmentForm'
|
||||
// import attachmentPreview from './attachmentPreview'
|
||||
import { addOrUpdateTrialDocumentAttachment, getTrialDocumentAttachmentList, deleteTrialDocumentAttachment } from '@/api/trials'
|
||||
const defaultSearchData = () => {
|
||||
return {
|
||||
PageIndex: 1,
|
||||
PageSize: 1000,
|
||||
Asc: false,
|
||||
OffLine: null,
|
||||
SortField: null
|
||||
}
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
BaseModel,
|
||||
attachmentForm,
|
||||
// attachmentPreview
|
||||
},
|
||||
props: {
|
||||
config: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
visible: false,
|
||||
title: this.$t('trials:attachment:attachmentList:title'),
|
||||
width: '800px',
|
||||
}
|
||||
}
|
||||
},
|
||||
isView: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowData: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
TrialDocumentId: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchData: defaultSearchData(),
|
||||
visible: false,
|
||||
title: null,
|
||||
list: [],
|
||||
rowDATA: {},
|
||||
loading: false,
|
||||
viewerOptions: {
|
||||
toolbar: {
|
||||
zoomIn: true,
|
||||
zoomOut: true,
|
||||
reset: true,
|
||||
prev: false,
|
||||
next: false,
|
||||
rotateLeft: true,
|
||||
rotateRight: true,
|
||||
flipHorizontal: true,
|
||||
flipVertical: true,
|
||||
}
|
||||
},
|
||||
// perview_visible: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
TrialDocumentId: {
|
||||
handler() {
|
||||
this.getList()
|
||||
},
|
||||
immediate: true,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
closeDialog() {
|
||||
this.visible = false
|
||||
},
|
||||
getAllList() {
|
||||
this.getList()
|
||||
this.$emit("getList")
|
||||
},
|
||||
async del(row) {
|
||||
try {
|
||||
let confirm = await this.$confirm(this.$t("trials:attachment:attachmentList:message:del"))
|
||||
if (!confirm) return false
|
||||
this.loading = true
|
||||
let res = await deleteTrialDocumentAttachment(row.Id)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.getAllList()
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
edit(row) {
|
||||
this.title = this.$t('trials:attachment:attachmentForm:title:update')
|
||||
if (!row.Id) {
|
||||
this.title = this.$t('trials:attachment:attachmentForm:title:add')
|
||||
}
|
||||
this.rowDATA = Object.assign({}, row)
|
||||
this.visible = true
|
||||
},
|
||||
async getList() {
|
||||
try {
|
||||
if (!this.TrialDocumentId) return false
|
||||
this.loading = true
|
||||
this.searchData.TrialDocumentId = this.TrialDocumentId
|
||||
if (this.isView) {
|
||||
this.searchData.OffLine = false
|
||||
}
|
||||
let res = await getTrialDocumentAttachmentList(this.searchData)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.list = res.Result.CurrentPageData
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
async OffLine(row, val) {
|
||||
try {
|
||||
let data = Object.assign({}, row)
|
||||
data.OffLine = val
|
||||
this.loading = true
|
||||
let res = await addOrUpdateTrialDocumentAttachment(data)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.$t('trials:attachment:attachmentList:updateSuccessfully')
|
||||
this.getList()
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
row.OffLine = !row.OffLine
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
preview(data) {
|
||||
// return this.perview_visible = true
|
||||
this.rowDATA = Object.assign({}, data)
|
||||
if (['.ppt',
|
||||
'.pptx',
|
||||
'.doc',
|
||||
'.docx',
|
||||
'.xls',
|
||||
'.xlsx'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$onlyOffice({
|
||||
path: data.FilePath,
|
||||
type: data.FileFormat,
|
||||
title: data.Name
|
||||
})
|
||||
}
|
||||
if (['.jpg',
|
||||
'.jpeg',
|
||||
'.png'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['picture_perview3'].$viewer.show()
|
||||
})
|
||||
}
|
||||
if (['.pdf'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$preview({
|
||||
path: data.Path || data.FilePath,
|
||||
type: 'pdf',
|
||||
title: data.Name,
|
||||
})
|
||||
}
|
||||
if (['.mp4'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$video({
|
||||
path: data.Path || data.FilePath,
|
||||
type: 'mp4',
|
||||
title: data.Name,
|
||||
})
|
||||
}
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.name {
|
||||
display: block;
|
||||
width: 90%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,257 @@
|
||||
<template>
|
||||
<el-form ref="trialAttachmentFrom" v-loading="loading" :model="form" label-width="240px" size="small" :rules="rules"
|
||||
class="upload-temporary-file">
|
||||
<div class="base-dialog-body">
|
||||
<!-- 文件类型 -->
|
||||
<el-form-item :label="$t('trials:attachment:table:fileType')" prop="FileTypeId">
|
||||
<el-select v-model="form.FileTypeId" style="width:100%;" size="small">
|
||||
<el-option v-for="item of dictionaryList.Trial_Document" :key="item.Id" :label="item.Value"
|
||||
:value="item.Id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 文件 -->
|
||||
<el-form-item :label="$t('trials:attachment:form:file')">
|
||||
<div class="upload-container">
|
||||
<el-upload class="upload-demo" action accept=".pdf,.mp4" :before-upload="beforeUpload"
|
||||
:http-request="handleUploadFile" :on-remove="handleRemoveFile" :show-file-list="true" :file-list="fileList"
|
||||
:limit="1" :on-exceed="handleExceed" :disabled="form.FileTypeId === ''">
|
||||
<el-button size="small" type="primary" :disabled="form.FileTypeId === '' || saveBtnLoading"
|
||||
:loading="btnLoading">
|
||||
{{ $t('trials:attachment:button:select') }}
|
||||
</el-button>
|
||||
<span slot="tip" style="margin-left:10px;" class="el-upload__tip">
|
||||
{{ $t('system:tip:file:pdf') }}
|
||||
</span>
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<!-- 需要签署的用户类型 -->
|
||||
<el-form-item :label="$t('trials:attachment:table:userType')" prop="NeedConfirmedUserTypeIdList">
|
||||
<el-select v-model="form.NeedConfirmedUserTypeIdList" style="width:100%;" multiple>
|
||||
<el-option v-for="item of userTypeOptions"
|
||||
v-show="item.UserTypeEnum !== 1 && item.UserTypeEnum !== 8 && item.UserTypeEnum !== 20 && item.UserTypeEnum !== 26 && item.UserTypeEnum !== 27 && item.UserTypeEnum !== 31"
|
||||
:key="item.Id" :label="item.UserTypeShortName" :value="item.Id">
|
||||
<span>{{ item.UserType }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 查看最短时间(分钟) -->
|
||||
<el-form-item :label="$t('trials:attachment:table:min')" prop="SignViewMinimumMinutes">
|
||||
<el-input-number v-model="form.SignViewMinimumMinutes" controls-position="right" :min="1" :max="50" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:attachment:form:CurrentStaffTrainDays')" prop="CurrentStaffTrainDays">
|
||||
<el-input-number v-model="form.CurrentStaffTrainDays" controls-position="right" :min="0" :max="1000" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:attachment:form:NewStaffTrainDays')" prop="NewStaffTrainDays">
|
||||
<el-input-number v-model="form.NewStaffTrainDays" controls-position="right" :min="0" :max="1000" />
|
||||
</el-form-item>
|
||||
<!-- 描述 -->
|
||||
<el-form-item :label="$t('trials:attachment:table:description')" prop="Description">
|
||||
<el-input v-model="form.Description" type="textarea" :autosize="{ minRows: 5, maxRows: 6 }" maxlength="500"
|
||||
show-word-limit />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
|
||||
<el-form-item style="text-align:right;">
|
||||
<!-- Save -->
|
||||
<el-button size="small" type="primary" :disabled="form.FileTypeId === '' || form.Name === ''"
|
||||
:loading="saveBtnLoading" @click="handleSave">
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { addOrUpdateTrialDocument, uploadTrialDoc, getTrialUserTypeList } from '@/api/trials'
|
||||
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
|
||||
export default {
|
||||
name: 'TrialAttachmentFrom',
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() { return {} }
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
Id: '',
|
||||
TrialId: '',
|
||||
FileTypeId: '',
|
||||
Name: '',
|
||||
Path: '',
|
||||
IsPublish: false,
|
||||
IsDeleted: false,
|
||||
SignViewMinimumMinutes: null,
|
||||
Description: '',
|
||||
NeedConfirmedUserTypeIdList: [],
|
||||
CurrentStaffTrainDays: 1,
|
||||
NewStaffTrainDays: 14,
|
||||
},
|
||||
rules: {
|
||||
FileTypeId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
|
||||
SignViewMinimumMinutes: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['change'] }],
|
||||
NeedConfirmedUserTypeIdList: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
|
||||
Description: [{ max: 500, message: `${this.$t('common:ruleMessage:maxLength')} 500`, trigger: ['blur', 'change'] }]
|
||||
},
|
||||
fileList: [],
|
||||
userTypeOptions: [],
|
||||
btnLoading: false,
|
||||
saveBtnLoading: false,
|
||||
loading: false,
|
||||
dictionaryList: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initForm()
|
||||
},
|
||||
methods: {
|
||||
// 保存
|
||||
handleSave() {
|
||||
this.$refs.trialAttachmentFrom.validate(valid => {
|
||||
if (!valid) return
|
||||
if (!this.form.Name) {
|
||||
this.$alert(this.$t('trials:attachment:message:selectFile'))
|
||||
return
|
||||
}
|
||||
if (this.form.TrialId === '') {
|
||||
this.form.TrialId = this.$route.query.trialId
|
||||
}
|
||||
this.saveBtnLoading = true
|
||||
addOrUpdateTrialDocument(this.form).then(res => {
|
||||
this.saveBtnLoading = false
|
||||
this.$emit('closeDialog')
|
||||
this.$emit('getList')
|
||||
if (this.form.Id) {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
} else {
|
||||
this.$message.success(this.$t('common:message:addedSuccessfully'))
|
||||
}
|
||||
// this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
}).catch(() => {
|
||||
this.saveBtnLoading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
async initForm() {
|
||||
this.loading = true
|
||||
await this.getDicData()
|
||||
await this.getUserType()
|
||||
if (Object.keys(this.data).length > 0) {
|
||||
if (this.data.Path) {
|
||||
this.fileList = [
|
||||
{
|
||||
name: this.data.Name,
|
||||
path: this.data.Path,
|
||||
url: this.data.Path,
|
||||
}
|
||||
]
|
||||
}
|
||||
this.form.Id = this.data.Id
|
||||
this.form.FileTypeId = this.data.FileTypeId
|
||||
this.form.Name = this.data.Name
|
||||
this.form.Path = this.data.Path
|
||||
this.form.IsDeleted = this.data.IsDeleted
|
||||
this.form.IsPublish = this.data.IsPublish
|
||||
this.form.Description = this.data.Description
|
||||
this.form.SignViewMinimumMinutes = this.data.SignViewMinimumMinutes
|
||||
this.form.CurrentStaffTrainDays = this.data.CurrentStaffTrainDays
|
||||
this.form.NewStaffTrainDays = this.data.NewStaffTrainDays
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
// 获取文件类型下拉框数据
|
||||
getDicData() {
|
||||
getBasicDataSelects(['Trial_Document']).then(res => {
|
||||
this.dictionaryList = { ...res.Result }
|
||||
})
|
||||
},
|
||||
// 获取用户类型下拉数据
|
||||
getUserType() {
|
||||
getTrialUserTypeList().then(res => {
|
||||
this.userTypeOptions = res.Result
|
||||
if (this.form.Id) {
|
||||
this.form.NeedConfirmedUserTypeIdList = this.data.NeedConfirmedUserTypeeIds
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
handleViewableUserTypeChange(valArr) {
|
||||
this.form.NeedConfirmedUserTypeIdList = []
|
||||
this.needConfirmedUserTypeOptions = []
|
||||
valArr.forEach((val) => {
|
||||
const i = this.userTypeOptions.findIndex(userType => { return userType.Id === val })
|
||||
this.needConfirmedUserTypeOptions.push(this.userTypeOptions[i])
|
||||
})
|
||||
},
|
||||
// 检测文件类型是否符合要求
|
||||
beforeUpload(file) {
|
||||
if (this.checkFileSuffix(file.name)) {
|
||||
this.fileList = []
|
||||
return true
|
||||
} else {
|
||||
this.$alert(this.$t('trials:attachment:message:pdf'))
|
||||
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 上传文件
|
||||
async handleUploadFile(param) {
|
||||
this.loading = true
|
||||
var file = await this.fileToBlob(param.file)
|
||||
const trialId = this.$route.query.trialId
|
||||
const res = await this.OSSclient.put(`/${trialId}/DocumentToSign/${param.file.name}${new Date().getTime()}`, file)
|
||||
this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url) })
|
||||
this.form.Path = this.$getObjectName(res.url)
|
||||
this.form.Name = param.file.name
|
||||
this.loading = false
|
||||
},
|
||||
// 移除
|
||||
handleRemoveFile() {
|
||||
this.fileList = []
|
||||
this.form.Path = ''
|
||||
this.form.Name = ''
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
this.$message.warning(this.$t('trials:attachment:message:uploadFile'))
|
||||
},
|
||||
// 文件类型是否是pdf
|
||||
checkFileSuffix(fileName) {
|
||||
var typeArr = ['pdf', 'mp4']
|
||||
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
|
||||
if (typeArr.indexOf(extendName) !== -1) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.upload-temporary-file {
|
||||
.upload-container .el-upload--text {
|
||||
border: none;
|
||||
width: 80px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.upload-container .el-input--small {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.upload-container .el-icon-circle-check {
|
||||
color: #428bca;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.account_item_clear {
|
||||
.el-tag__close {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -5,17 +5,8 @@
|
||||
<el-form :inline="true" class="base-search-form">
|
||||
<!-- 文件类型 -->
|
||||
<el-form-item :label="$t('trials:attachment:table:fileType')">
|
||||
<el-select
|
||||
v-model="searchData.FileTypeId"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.Trial_Document"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
/>
|
||||
<el-select v-model="searchData.FileTypeId" clearable style="width: 150px">
|
||||
<el-option v-for="item of $d.Trial_Document" :key="item.id" :label="item.label" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 文件名称 -->
|
||||
@@ -24,40 +15,20 @@
|
||||
</el-form-item>
|
||||
<!-- 培训状态 -->
|
||||
<el-form-item :label="$t('trials:attachment:table:isDeleted')">
|
||||
<el-select
|
||||
clearable
|
||||
v-model="searchData.IsDeleted"
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.TrainingStatus"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-select clearable v-model="searchData.IsDeleted" style="width: 150px">
|
||||
<el-option v-for="item of $d.TrainingStatus" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 培训角色 -->
|
||||
<el-form-item :label="$t('trials:attachment:table:userType')">
|
||||
<el-select
|
||||
v-model="searchData.UserTypeId"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of userTypeOptions"
|
||||
v-show="
|
||||
item.UserTypeEnum !== 1 &&
|
||||
item.UserTypeEnum !== 8 &&
|
||||
item.UserTypeEnum !== 20 &&
|
||||
item.UserTypeEnum !== 26 &&
|
||||
item.UserTypeEnum !== 27 &&
|
||||
item.UserTypeEnum !== 31
|
||||
"
|
||||
:key="item.Id"
|
||||
:label="item.UserTypeShortName"
|
||||
:value="item.Id"
|
||||
>
|
||||
<el-select v-model="searchData.UserTypeId" clearable style="width: 100%">
|
||||
<el-option v-for="item of userTypeOptions" v-show="item.UserTypeEnum !== 1 &&
|
||||
item.UserTypeEnum !== 8 &&
|
||||
item.UserTypeEnum !== 20 &&
|
||||
item.UserTypeEnum !== 26 &&
|
||||
item.UserTypeEnum !== 27 &&
|
||||
item.UserTypeEnum !== 31
|
||||
" :key="item.Id" :label="item.UserTypeShortName" :value="item.Id">
|
||||
<span>{{ item.UserType }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
@@ -69,71 +40,52 @@
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<!-- 重置 -->
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left: auto">
|
||||
<!-- 新增 -->
|
||||
<el-button
|
||||
v-hasPermi="['trials:trials-panel:setting:attachment:add']"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
>
|
||||
<el-button v-hasPermi="['trials:trials-panel:setting:attachment:add']" type="primary" icon="el-icon-plus"
|
||||
@click="handleAdd">
|
||||
{{ $t('common:button:add') }}
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- 系统文件列表 -->
|
||||
<el-table
|
||||
ref="attachmentList"
|
||||
v-loading="loading"
|
||||
v-adaptive="{ bottomOffset: 60 }"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
@sort-change="handleSortByColumn"
|
||||
>
|
||||
<el-table ref="attachmentList" v-loading="loading" v-adaptive="{ bottomOffset: 60 }" :data="list" stripe
|
||||
height="100" @sort-change="handleSortByColumn">
|
||||
<el-table-column type="index" width="40" />
|
||||
<!-- 文件类型 -->
|
||||
<el-table-column
|
||||
prop="FileType"
|
||||
:label="$t('trials:attachment:table:fileType')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
min-width="160"
|
||||
/>
|
||||
<el-table-column prop="FileType" :label="$t('trials:attachment:table:fileType')" show-overflow-tooltip
|
||||
sortable="custom" min-width="160" />
|
||||
<!-- 文件名称 -->
|
||||
<el-table-column
|
||||
prop="Name"
|
||||
:label="$t('trials:attachment:table:fileName')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
min-width="160"
|
||||
/>
|
||||
<el-table-column prop="Name" :label="$t('trials:attachment:table:fileName')" show-overflow-tooltip
|
||||
sortable="custom" min-width="160" />
|
||||
<!--附件-->
|
||||
<el-table-column prop="AttachmentCount" :label="$t('trials:attachment:table:AttachmentCount')"
|
||||
show-overflow-tooltip sortable="custom" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click.stop="openAttachment(scope.row, true)">
|
||||
{{ scope.row.AttachmentCount }}
|
||||
<i class="el-icon-upload2" />
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 查看最短时间(分钟) -->
|
||||
<el-table-column
|
||||
prop="SignViewMinimumMinutes"
|
||||
:label="$t('trials:attachment:table:min')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
min-width="150"
|
||||
/>
|
||||
<el-table-column prop="SignViewMinimumMinutes" :label="$t('trials:attachment:table:min')" show-overflow-tooltip
|
||||
sortable="custom" min-width="150" />
|
||||
<!-- 已有成员(分钟) -->
|
||||
<el-table-column prop="CurrentStaffTrainDays" :label="$t('trials:attachment:table:CurrentStaffTrainDays')"
|
||||
show-overflow-tooltip sortable="custom" min-width="150" />
|
||||
<!-- 新加入成员(分钟) -->
|
||||
<el-table-column prop="NewStaffTrainDays" :label="$t('trials:attachment:table:NewStaffTrainDays')"
|
||||
show-overflow-tooltip sortable="custom" min-width="150" />
|
||||
<!-- 是否废除 -->
|
||||
<el-table-column
|
||||
prop="IsDeleted"
|
||||
:label="$t('trials:attachment:table:isDeleted')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
min-width="100"
|
||||
>
|
||||
<el-table-column prop="IsDeleted" :label="$t('trials:attachment:table:isDeleted')" show-overflow-tooltip
|
||||
sortable="custom" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||
$fd('TrainingStatus', scope.row.IsDeleted)
|
||||
@@ -143,13 +95,18 @@
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--发布状态-->
|
||||
<el-table-column prop="IsPublish" :label="$t('trials:attachment:table:IsPublish')" show-overflow-tooltip
|
||||
sortable="custom" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.IsPublish ? 'primary' : 'danger'">{{
|
||||
$fd('AttachmentPublishStatus', scope.row.IsPublish)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 需要签署的用户类型 -->
|
||||
<el-table-column
|
||||
prop="NeedConfirmedUserTypes"
|
||||
:label="$t('trials:attachment:table:userType')"
|
||||
show-overflow-tooltip
|
||||
min-width="100"
|
||||
>
|
||||
<el-table-column prop="NeedConfirmedUserTypes" :label="$t('trials:attachment:table:userType')"
|
||||
show-overflow-tooltip min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
scope.row.NeedConfirmedUserTypes
|
||||
@@ -174,91 +131,52 @@
|
||||
min-width="160"
|
||||
/> -->
|
||||
<!--创建时间-->
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
:label="$t('trials:attachment:table:CreateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
min-width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('common:action:action')"
|
||||
min-width="140"
|
||||
fixed="right"
|
||||
>
|
||||
<el-table-column prop="CreateTime" :label="$t('trials:attachment:table:CreateTime')" show-overflow-tooltip
|
||||
sortable="custom" min-width="160" />
|
||||
<el-table-column :label="$t('common:action:action')" min-width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<!-- 预览 -->
|
||||
<el-button
|
||||
icon="el-icon-view"
|
||||
circle
|
||||
:title="$t('trials:attachment:action:preview')"
|
||||
@click="handlePreview(scope.row)"
|
||||
/>
|
||||
<el-button icon="el-icon-view" circle :title="$t('trials:attachment:action:preview')"
|
||||
@click="handlePreview(scope.row)" />
|
||||
<!-- 编辑 -->
|
||||
<el-button
|
||||
v-hasPermi="['trials:trials-panel:setting:attachment:edit']"
|
||||
circle
|
||||
:title="$t('trials:attachment:action:edit')"
|
||||
icon="el-icon-edit-outline"
|
||||
:disabled="scope.row.IsSomeUserSigned || scope.row.IsDeleted"
|
||||
@click="handleEdit(scope.row)"
|
||||
/>
|
||||
<el-button v-hasPermi="['trials:trials-panel:setting:attachment:edit']" circle
|
||||
:title="$t('trials:attachment:action:edit')" icon="el-icon-edit-outline"
|
||||
:disabled="scope.row.IsSomeUserSigned || scope.row.IsDeleted" @click="handleEdit(scope.row)" />
|
||||
<el-button :disabled="scope.row.IsPublish" circle icon="el-icon-position"
|
||||
:title="$t('dictionary:signature:button:publish')" @click="publishTrialDocument([scope.row])">
|
||||
</el-button>
|
||||
<!-- 废除 -->
|
||||
<el-button
|
||||
v-hasPermi="['trials:trials-panel:setting:attachment:abolish']"
|
||||
:disabled="scope.row.IsDeleted"
|
||||
circle
|
||||
:title="$t('trials:attachment:action:apolish')"
|
||||
icon="el-icon-delete"
|
||||
@click="handleRepeal(scope.row)"
|
||||
/>
|
||||
<el-button v-hasPermi="['trials:trials-panel:setting:attachment:abolish']" :disabled="scope.row.IsDeleted"
|
||||
circle :title="$t('trials:attachment:action:apolish')" icon="el-icon-delete"
|
||||
@click="handleRepeal(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 新增/编辑 -->
|
||||
<el-dialog
|
||||
v-if="editVisible"
|
||||
:visible.sync="editVisible"
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
width="800px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<AttachmentForm
|
||||
:data="currentRow"
|
||||
@closeDialog="closeDialog"
|
||||
@getList="getList"
|
||||
/>
|
||||
<el-dialog v-if="editVisible" :visible.sync="editVisible" :close-on-click-modal="false" :title="title" width="800px"
|
||||
custom-class="base-dialog-wrapper">
|
||||
<templateForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" />
|
||||
</el-dialog>
|
||||
|
||||
<!--附件列表-->
|
||||
<attachmentList v-if="config.visible" :config="config" :rowData="currentRow" :TrialDocumentId="TrialDocumentId"
|
||||
@getList="getList" />
|
||||
<!-- 预览文件 -->
|
||||
<el-dialog
|
||||
v-if="previewVisible"
|
||||
:visible.sync="previewVisible"
|
||||
:title="$t('trials:attachment:dialogTitle:preview')"
|
||||
:fullscreen="true"
|
||||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<div
|
||||
class="base-modal-body"
|
||||
style="border: 2px solid #ccc; padding: 10px"
|
||||
>
|
||||
<PreviewFile
|
||||
v-if="previewVisible"
|
||||
:file-path="currentPath"
|
||||
:file-type="currentType"
|
||||
/>
|
||||
<attachmentPreview :SystemDocumentId="TrialDocumentId" :isTrial="true" :visible.sync="perview_visible"
|
||||
:isView="true" v-if="perview_visible" />
|
||||
<!-- 预览文件 -->
|
||||
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="$t('trials:attachment:dialogTitle:preview')"
|
||||
:fullscreen="true" append-to-body custom-class="base-dialog-wrapper">
|
||||
<span style="position: fixed; left: 16px; top: 45px;cursor: pointer;font-size: 18px;color:#409EFF"
|
||||
@click.stop="openAttachment(currentRow)" v-if="currentRow.AttachmentCount">{{
|
||||
$t('trials:attachment:table:AttachmentCount') }} ({{
|
||||
currentRow.AttachmentCount }})</span>
|
||||
<div class="base-modal-body" style="border: 2px solid #ccc; padding: 10px">
|
||||
<PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
</box-content>
|
||||
@@ -268,11 +186,14 @@ import {
|
||||
getTrialDocumentList,
|
||||
userAbandonDoc,
|
||||
getTrialUserTypeList,
|
||||
publishTrialDocument
|
||||
} from '@/api/trials'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import AttachmentForm from './components/attachmentForm'
|
||||
import templateForm from './components/templateForm'
|
||||
import PreviewFile from './components/previewFile'
|
||||
import attachmentList from './components/attachmentList'
|
||||
import attachmentPreview from '@/views/dictionary/attachment/components/SignatureTemplate/attachmentPreview'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
FileTypeId: '',
|
||||
@@ -287,7 +208,7 @@ const searchDataDefault = () => {
|
||||
}
|
||||
export default {
|
||||
name: 'TrialAttachmentList',
|
||||
components: { BoxContent, Pagination, AttachmentForm, PreviewFile },
|
||||
components: { BoxContent, Pagination, templateForm, PreviewFile, attachmentList, attachmentPreview },
|
||||
dicts: ['Trial_Document'],
|
||||
data() {
|
||||
return {
|
||||
@@ -303,6 +224,13 @@ export default {
|
||||
currentType: '',
|
||||
trialId: '',
|
||||
userTypeOptions: [],
|
||||
TrialDocumentId: null,
|
||||
perview_visible: false,
|
||||
config: {
|
||||
visible: false,
|
||||
title: this.$t('dictionary:signature:attachmentList:title'),
|
||||
width: '800px',
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -311,6 +239,39 @@ export default {
|
||||
this.getUserType()
|
||||
},
|
||||
methods: {
|
||||
openAttachment(row, isList = false) {
|
||||
this.TrialDocumentId = row.Id
|
||||
this.currentRow = { ...row }
|
||||
if (!isList) {
|
||||
this.perview_visible = true
|
||||
} else {
|
||||
this.config.visible = true
|
||||
}
|
||||
},
|
||||
// 发布
|
||||
async publishTrialDocument(list) {
|
||||
try {
|
||||
let confirm = await this.$confirm(this.$t('trials:attachment:confirm:publishFile'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
})
|
||||
if (!confirm) return false
|
||||
let arr = list.filter(item => !item.IsPublish)
|
||||
if (arr.length <= 0) return this.getList()
|
||||
let data = {
|
||||
ids: arr.map(item => item.Id)
|
||||
}
|
||||
this.loading = true
|
||||
let res = await publishTrialDocument(data)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 获取系统文件数据
|
||||
getList() {
|
||||
this.loading = true
|
||||
@@ -361,6 +322,7 @@ export default {
|
||||
this.currentType = row.Name
|
||||
? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase()
|
||||
: ''
|
||||
this.currentRow = Object.assign({}, row)
|
||||
this.previewVisible = true
|
||||
},
|
||||
// 编辑
|
||||
@@ -391,7 +353,7 @@ export default {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => { })
|
||||
},
|
||||
// 关闭编辑弹窗
|
||||
closeDialog() {
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
<template>
|
||||
<BoxContent style="min-height: 100%; background: #fff">
|
||||
<div class="inspection-content" v-loading="loading">
|
||||
<!-- <div class="top">
|
||||
<span class="title">{{ this.$t("trials:setting:inspection:module") }}</span>
|
||||
<span>{{ this.$t("trials:setting:inspection:optName") }}</span>
|
||||
</div> -->
|
||||
<el-tree :data="tree" show-checkbox node-key="id" :expand-on-click-node="false" ref="tree">
|
||||
<span class="custom-tree-node" slot-scope="{ node }">
|
||||
<span>{{ node.label }}</span>
|
||||
<!-- <span>
|
||||
{{ node.data.optName }}
|
||||
</span> -->
|
||||
</span>
|
||||
</el-tree>
|
||||
</div>
|
||||
<div class="btnBox">
|
||||
<el-button @click.stop="getCheckedNodes" type="primary"
|
||||
v-if="hasPermi(['trials:setting:inspection:update'])" class="btn">
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</BoxContent>
|
||||
</template>
|
||||
<script>
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import {
|
||||
getTrialShowInspection,
|
||||
setTrialShowInspection
|
||||
} from '@/api/trials'
|
||||
export default {
|
||||
components: { BoxContent },
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
tree: [
|
||||
{
|
||||
id: 1,
|
||||
label: this.$t("trials:setting:inspection:module"),
|
||||
optName: this.$t("trials:setting:inspection:optName"),
|
||||
}
|
||||
],
|
||||
list: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getTree()
|
||||
},
|
||||
computed: {
|
||||
isEN() {
|
||||
return this.$i18n.locale !== 'zh'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getCheckedNodes() {
|
||||
try {
|
||||
this.loading = true
|
||||
let ids = this.$refs.tree.getCheckedKeys()
|
||||
let list = []
|
||||
this.list.forEach(item => {
|
||||
let obj = {
|
||||
FrontAuditConfigId: item.FrontAuditConfigId,
|
||||
isShow: false
|
||||
}
|
||||
if (ids.includes(item.FrontAuditConfigId)) {
|
||||
obj.isShow = true
|
||||
}
|
||||
list.push(obj)
|
||||
})
|
||||
let data = {
|
||||
TrialId: this.$route.query.trialId,
|
||||
TrialShowInspectionList: list
|
||||
}
|
||||
let res = await setTrialShowInspection(data)
|
||||
if (res.IsSuccess) {
|
||||
this.getTree()
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
async getTree() {
|
||||
try {
|
||||
let data = {
|
||||
TrialId: this.$route.query.trialId
|
||||
}
|
||||
this.loading = true
|
||||
let res = await getTrialShowInspection(data);
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.list = this.formatList(res.Result)
|
||||
let { tree, ids } = this.formatTree(res.Result);
|
||||
this.tree = tree
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tree.setCheckedKeys(ids)
|
||||
})
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
formatTree(list) {
|
||||
let tree = [], ids = []
|
||||
list.forEach(item => {
|
||||
let obj = {
|
||||
id: item.FrontAuditConfigId,
|
||||
label: this.isEN ? item.Description : item.DescriptionCN
|
||||
}
|
||||
if (item.IsShow) {
|
||||
ids.push(item.FrontAuditConfigId)
|
||||
}
|
||||
if (item.Children && item.Children.length > 0) {
|
||||
obj.children = []
|
||||
item.Children.forEach(it => {
|
||||
let o = {
|
||||
id: it.FrontAuditConfigId,
|
||||
label: this.isEN ? it.Description : it.DescriptionCN
|
||||
}
|
||||
if (it.IsShow) {
|
||||
ids.push(it.FrontAuditConfigId)
|
||||
}
|
||||
obj.children.push(o)
|
||||
})
|
||||
}
|
||||
tree.push(obj)
|
||||
})
|
||||
return { tree, ids }
|
||||
},
|
||||
formatList(list) {
|
||||
let arr = []
|
||||
list.forEach(item => {
|
||||
let obj = {
|
||||
FrontAuditConfigId: item.FrontAuditConfigId,
|
||||
ParentId: item.ParentId
|
||||
}
|
||||
arr.push(obj)
|
||||
if (item.Children && item.Children.length > 0) {
|
||||
item.Children.forEach(it => {
|
||||
let o = {
|
||||
FrontAuditConfigId: it.FrontAuditConfigId,
|
||||
ParentId: it.ParentId
|
||||
}
|
||||
arr.push(o)
|
||||
})
|
||||
}
|
||||
})
|
||||
return arr;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.inspection-content {
|
||||
width: 40%;
|
||||
min-height: 500px;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
padding-top: 20px;
|
||||
|
||||
.title {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.custom-tree-node {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 20px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.btnBox {
|
||||
width: 40%;
|
||||
padding: 0 20px 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
</style>
|
||||
@@ -738,7 +738,7 @@ export default {
|
||||
},
|
||||
handleIsDeletedChanged(val) {
|
||||
if (val) {
|
||||
this.statusForm.joinTime = ''
|
||||
// this.statusForm.joinTime = ''
|
||||
} else {
|
||||
this.statusForm.removeTime = ''
|
||||
}
|
||||
|
||||
+3
-1
@@ -353,7 +353,9 @@ export default {
|
||||
}
|
||||
},
|
||||
formItemNumberChange(v, question) {
|
||||
this.$emit('formItemTableNumberChange', v, question)
|
||||
// this.$emit('formItemTableNumberChange', v, question)
|
||||
this.$emit('formItemTableNumberChange')
|
||||
this.$emit('setFormItemData', { key: question.Id, val: v, question: question })
|
||||
},
|
||||
resetChild(obj) {
|
||||
obj.forEach(i => {
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<template v-else>
|
||||
<el-option
|
||||
v-for="item of $d.Criterion_Question_Type"
|
||||
v-show="item.value !== 'calculation' && item.value !== 'increment' && item.value !== 'table'"
|
||||
v-show="item.value !== 'calculation' && item.value !== 'increment' && item.value !== 'table' && item.value !== 'fixedTable'"
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
@@ -727,6 +727,63 @@
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 影像标记 -->
|
||||
<el-form-item
|
||||
v-if="form.Type === 'number' && !isFromSystem && readingVersionEnum"
|
||||
:label="$t('trials:readingUnit:qsList:title:imageMarkEnum')"
|
||||
prop="ImageMarkEnum"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.ImageMarkEnum"
|
||||
:disabled="form.IsRequired === 0"
|
||||
@change="imageMarkEnumChange"
|
||||
>
|
||||
<el-radio v-for="item of $d.ImageMark" :key="item.id" :label="item.value" :disabled="form.IsRequired === 2 && item.value === 1">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 测量工具 ImageTool -->
|
||||
<el-form-item
|
||||
v-if="form.ImageMarkEnum === 1 || form.ImageMarkEnum === 2"
|
||||
:label="$t('trials:readingUnit:qsList:title:ImageTool')"
|
||||
prop="ImageTool"
|
||||
:rules="[
|
||||
{ required: true, message: this.$t('common:ruleMessage:select')}
|
||||
]"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.ImageTool"
|
||||
@change="imageToolChange"
|
||||
>
|
||||
<el-radio
|
||||
v-for="tool of readingTools"
|
||||
:key="tool.toolName"
|
||||
:label="tool.toolName"
|
||||
>
|
||||
{{ $t(tool.i18nKey) }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 测量值 ImageToolAttribute -->
|
||||
<el-form-item
|
||||
v-if="form.ImageTool"
|
||||
:label="$t('trials:readingUnit:qsList:title:ImageToolAttribute')"
|
||||
prop="ImageToolAttribute"
|
||||
:rules="[
|
||||
{ required: true, message: this.$t('common:ruleMessage:select')}
|
||||
]"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.ImageToolAttribute"
|
||||
>
|
||||
<el-radio
|
||||
v-for="i of imageToolAttributes"
|
||||
:key="i"
|
||||
:label="i"
|
||||
>
|
||||
{{ i }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 最大上传个数 -->
|
||||
<el-form-item
|
||||
v-if="form.Type === 'upload'"
|
||||
@@ -1018,6 +1075,16 @@ export default {
|
||||
isLook: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
readingTools: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
readingVersionEnum: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1071,9 +1138,14 @@ export default {
|
||||
ExportResult: [],
|
||||
ClassifyType: null,
|
||||
ClassifyEditType: null,
|
||||
ClassifyShowType: null
|
||||
ClassifyShowType: null,
|
||||
ImageMarkEnum: 0,
|
||||
ImageTool: '',
|
||||
ImageToolAttribute: '',
|
||||
|
||||
// IsEnable: true
|
||||
},
|
||||
imageToolAttributes: [],
|
||||
rules: {
|
||||
Type: [
|
||||
{required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change']}
|
||||
@@ -1349,6 +1421,9 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.form.ImageTool) {
|
||||
this.imageToolChange(this.form.ImageTool)
|
||||
}
|
||||
}
|
||||
if (!this.data.ShowOrder && this.data.ShowOrder !== 0) {
|
||||
if (this.list.length > 0) {
|
||||
@@ -1456,9 +1531,27 @@ export default {
|
||||
form.RelevanceId = ''
|
||||
form.RelevanceValueList = []
|
||||
}
|
||||
if (val === 0 && form.Type === 'number' && !this.isFromSystem) {
|
||||
form.ImageMarkEnum = 1
|
||||
}
|
||||
if (val === 2 && form.Type === 'number' && !this.isFromSystem) {
|
||||
form.ImageMarkEnum = 0
|
||||
}
|
||||
},
|
||||
imageMarkEnumChange(val) {
|
||||
if (val === 0) {
|
||||
this.form.ImageTool = ''
|
||||
this.form.ImageToolAttribute = ''
|
||||
this.imageToolAttributes = []
|
||||
}
|
||||
},
|
||||
imageToolChange(v) {
|
||||
let i = this.readingTools.findIndex(tool=>tool.toolName === v)
|
||||
if (i > -1) {
|
||||
this.imageToolAttributes = this.readingTools[i].props
|
||||
}
|
||||
},
|
||||
parentQuestionChange(val, form) {
|
||||
console.log(val)
|
||||
this.isParentExistGroup = false
|
||||
if (val) {
|
||||
var index = this.parentOptions.findIndex(item => {
|
||||
@@ -1550,6 +1643,10 @@ export default {
|
||||
form.ExportResult = []
|
||||
form.ClassifyType = null
|
||||
form.ClassifyShowType = null
|
||||
form.ImageMarkEnum = 0
|
||||
form.ImageTool = ''
|
||||
form.ImageToolAttribute = ''
|
||||
this.imageToolAttributes = []
|
||||
},
|
||||
getLesionType() {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
@@ -210,12 +210,14 @@
|
||||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<QuestionsForm
|
||||
<questions-form
|
||||
ref="addOrEdit"
|
||||
:data="rowData"
|
||||
:trial-criterion-id="trialCriterionId"
|
||||
:is-from-system="isFromSystem"
|
||||
:digit-places="digitPlaces"
|
||||
:readingTools="readingTools"
|
||||
:readingVersionEnum="readingVersionEnum"
|
||||
:list="tblList"
|
||||
:is-look="isLook"
|
||||
:is-system-criterion="isSystemCriterion"
|
||||
@@ -231,7 +233,7 @@
|
||||
:title="preview.title"
|
||||
:fullscreen="true"
|
||||
>
|
||||
<QuestionsPreview :criterion-id="trialCriterionId" :is-system-criterion="isSystemCriterion" :form-type="1" />
|
||||
<questions-preview :criterion-id="trialCriterionId" :is-system-criterion="isSystemCriterion" :form-type="1" />
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
@@ -241,12 +243,14 @@
|
||||
:title="config.title"
|
||||
:fullscreen="true"
|
||||
>
|
||||
<TableQsList
|
||||
<table-qs-list
|
||||
:digit-places="digitPlaces"
|
||||
:reading-question-id="rowData.Id"
|
||||
:is-from-system="isFromSystem"
|
||||
:is-confirm="isConfirm"
|
||||
:criterion-id="trialCriterionId"
|
||||
:readingTools="readingTools"
|
||||
:readingVersionEnum="readingVersionEnum"
|
||||
@close="config.visible = false"
|
||||
/>
|
||||
</el-dialog>
|
||||
@@ -299,6 +303,16 @@ export default {
|
||||
isFromSystem: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
readingTools: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
readingVersionEnum: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
|
||||
},
|
||||
@@ -321,7 +335,6 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.tblList = this.list
|
||||
console.log('ql', this.isSystemCriterion)
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
|
||||
+12
-4
@@ -10,7 +10,7 @@
|
||||
>
|
||||
<!-- '表单问题' -->
|
||||
<el-form-item :label="$t('trials:readingUnit:readingCriterion:title:formQs')">
|
||||
<QuestionsList
|
||||
<questions-list
|
||||
:ref="`questionList${trialReadingCriterionId}`"
|
||||
v-if="form.FormType===1"
|
||||
:trial-reading-criterion-id="trialReadingCriterionId"
|
||||
@@ -20,6 +20,8 @@
|
||||
:is-system-criterion="isSystemCriterion"
|
||||
:is-from-system="readingInfo.IsFromSystem"
|
||||
:digit-places="digitPlaces"
|
||||
:readingTools="readingTools"
|
||||
:readingVersionEnum="readingVersionEnum"
|
||||
@reloadArbitrationRules="reloadArbitrationRules"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -77,6 +79,12 @@ export default {
|
||||
isAdditionalAssessment: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
readingTools: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -99,7 +107,8 @@ export default {
|
||||
readingInfo: {},
|
||||
isConfirm: true,
|
||||
configBaseDataVisible: false,
|
||||
additionalAssessmentOptionList: null
|
||||
additionalAssessmentOptionList: null,
|
||||
readingVersionEnum: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -118,6 +127,7 @@ export default {
|
||||
}
|
||||
getTrialReadingCriterionInfo({ trialId, TrialReadingCriterionId: this.trialReadingCriterionId }).then(res => {
|
||||
this.loading = false
|
||||
this.readingVersionEnum = res.OtherInfo.ReadingVersionEnum
|
||||
this.readingInfo = res.Result
|
||||
for (const k in this.form) {
|
||||
if (res.Result.hasOwnProperty(k)) {
|
||||
@@ -126,7 +136,6 @@ export default {
|
||||
}
|
||||
this.isConfirm = res.Result.IsSign
|
||||
this.isSystemCriterion = res.Result.IsSystemCriterion
|
||||
console.log(this.isSystemCriterion)
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
@@ -137,7 +146,6 @@ export default {
|
||||
// 配置信息保存
|
||||
handleSave(isPrompt = true) {
|
||||
return new Promise((resolve, reject) => {
|
||||
console.log(this.form)
|
||||
this.$refs['readingCriterionsForm'].validate((valid) => {
|
||||
if (!valid) {
|
||||
resolve(false)
|
||||
|
||||
@@ -917,6 +917,8 @@ export default {
|
||||
this.$emit('setGlobalReading', res.Result.IsGlobalReading)
|
||||
this.$emit('setOncologyReading', res.Result.IsOncologyReading)
|
||||
this.$emit('setDigitPlaces', res.Result.DigitPlaces)
|
||||
this.$emit('setReadingTools', res.Result.ReadingToolList)
|
||||
|
||||
if (res.Result.ReadingType === 1) {
|
||||
this.$emit('setArbitrationReading', false)
|
||||
}
|
||||
@@ -957,6 +959,7 @@ export default {
|
||||
this.$emit('setGlobalReading', this.form.IsGlobalReading)
|
||||
this.$emit('setOncologyReading', this.form.IsOncologyReading)
|
||||
this.$emit('setDigitPlaces', this.form.DigitPlaces)
|
||||
this.$emit('setReadingTools', this.form.ReadingToolList)
|
||||
if (this.form.ReadingType === 1) {
|
||||
this.$emit('setArbitrationReading', false)
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
>
|
||||
<template v-for="item of $d.Criterion_Question_Type">
|
||||
<el-option
|
||||
v-if="item.value !== 'increment' && item.value !== 'table' && item.value !== 'basicTable' && item.value !== 'group'"
|
||||
v-if="item.value !== 'increment' && item.value !== 'table' && item.value !== 'basicTable' && item.value !== 'group' && item.value !== 'fixedTable' && item.value !== 'calculation' "
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
@@ -429,6 +429,64 @@
|
||||
<i class="el-icon-info" />{{ [1, 2, 3, 4].includes(form.CustomCalculateMark) ? $t('trials:readingUnit:qsList:message:msg1') : $t('trials:readingUnit:qsList:message:msg2') }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 影像标记 -->
|
||||
<el-form-item
|
||||
v-if="form.Type === 'number' && !isFromSystem && readingVersionEnum"
|
||||
:label="$t('trials:readingUnit:qsList:title:imageMarkEnum')"
|
||||
prop="ImageMarkEnum"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.ImageMarkEnum"
|
||||
:disabled="form.IsRequired === 0"
|
||||
@change="imageMarkEnumChange"
|
||||
>
|
||||
<el-radio v-for="item of $d.ImageMark" :key="item.id" :label="item.value" :disabled="form.IsRequired === 2 && item.value === 1">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 测量工具 ImageTool -->
|
||||
<el-form-item
|
||||
v-if="form.ImageMarkEnum === 1 || form.ImageMarkEnum === 2"
|
||||
:label="$t('trials:readingUnit:qsList:title:ImageTool')"
|
||||
prop="ImageTool"
|
||||
:rules="[
|
||||
{ required: true, message: this.$t('common:ruleMessage:select')}
|
||||
]"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.ImageTool"
|
||||
@change="imageToolChange"
|
||||
>
|
||||
<el-radio
|
||||
v-for="tool of readingTools"
|
||||
:key="tool.toolName"
|
||||
:label="tool.toolName"
|
||||
>
|
||||
{{ $t(tool.i18nKey) }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 测量值 ImageToolAttribute -->
|
||||
<el-form-item
|
||||
v-if="form.ImageTool"
|
||||
:label="$t('trials:readingUnit:qsList:title:ImageToolAttribute')"
|
||||
prop="ImageToolAttribute"
|
||||
:rules="[
|
||||
{ required: true, message: this.$t('common:ruleMessage:select')}
|
||||
]"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.ImageToolAttribute"
|
||||
>
|
||||
<el-radio
|
||||
v-for="i of imageToolAttributes"
|
||||
:key="i"
|
||||
:label="i"
|
||||
>
|
||||
{{ i }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
v-if="(form.Type === 'select' || form.Type === 'radio' || form.Type === 'input') && isFromSystem"
|
||||
:label="$t('trials:readingUnit:label:QuestionGenre')"
|
||||
@@ -847,6 +905,16 @@ export default {
|
||||
type: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
readingTools: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
readingVersionEnum: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
|
||||
@@ -896,8 +964,12 @@ export default {
|
||||
ClassifyType: null,
|
||||
ClassifyEditType: null,
|
||||
ClassifyShowType: null,
|
||||
ImageMarkEnum: 0,
|
||||
ImageTool: '',
|
||||
ImageToolAttribute: '',
|
||||
// IsEnable: true
|
||||
},
|
||||
imageToolAttributes: [],
|
||||
rules: {
|
||||
Type: [
|
||||
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }
|
||||
@@ -1171,6 +1243,9 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.form.ImageTool) {
|
||||
this.imageToolChange(this.form.ImageTool)
|
||||
}
|
||||
}
|
||||
if (this.form.ClassifyTableQuestionId) {
|
||||
this.classifyQuestionChange(this.form.ClassifyTableQuestionId)
|
||||
@@ -1182,6 +1257,12 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
classifyQuestionChange (v){
|
||||
let obj = this.selectQuestions.find(i=>i.Id === v)
|
||||
let arr = obj && obj.TypeValue ? obj.TypeValue.split('|') : []
|
||||
arr = arr.length > 0 ? arr.map(i=>i.trim()) : []
|
||||
this.classifyQuestionOptions = arr
|
||||
},
|
||||
getBasicConfigSelect() {
|
||||
getCriterionDictionaryList({
|
||||
CriterionId: this.criterionId,
|
||||
@@ -1263,6 +1344,25 @@ export default {
|
||||
form.RelevanceId = ''
|
||||
form.RelevanceValueList = []
|
||||
}
|
||||
if (val === 0 && form.Type === 'number' && !this.isFromSystem) {
|
||||
form.ImageMarkEnum = 1
|
||||
}
|
||||
if (val === 2 && form.Type === 'number' && !this.isFromSystem) {
|
||||
form.ImageMarkEnum = 0
|
||||
}
|
||||
},
|
||||
imageMarkEnumChange(val) {
|
||||
if (val === 0) {
|
||||
this.form.ImageTool = ''
|
||||
this.form.ImageToolAttribute = ''
|
||||
this.imageToolAttributes = []
|
||||
}
|
||||
},
|
||||
imageToolChange(v) {
|
||||
let i = this.readingTools.findIndex(tool=>tool.toolName === v)
|
||||
if (i > -1) {
|
||||
this.imageToolAttributes = this.readingTools[i].props
|
||||
}
|
||||
},
|
||||
async parentQuestionChange(val, form) {
|
||||
if (val) {
|
||||
@@ -1372,6 +1472,10 @@ export default {
|
||||
form.ImageCount = 0
|
||||
form.ClassifyType = null
|
||||
form.ClassifyShowType = null
|
||||
form.ImageMarkEnum = 0
|
||||
form.ImageTool = ''
|
||||
form.ImageToolAttribute = ''
|
||||
this.imageToolAttributes = []
|
||||
},
|
||||
close() {
|
||||
this.$emit('close')
|
||||
|
||||
@@ -202,6 +202,8 @@
|
||||
:digit-places="digitPlaces"
|
||||
:reading-question-id="readingQuestionId"
|
||||
:criterion-id="criterionId"
|
||||
:readingTools="readingTools"
|
||||
:readingVersionEnum="readingVersionEnum"
|
||||
@close="addOrEdit.visible = false"
|
||||
@getList="getList"
|
||||
/>
|
||||
@@ -241,6 +243,16 @@ export default {
|
||||
criterionId: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
readingTools: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
readingVersionEnum: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
@setGlobalReading="setGlobalReading"
|
||||
@setOncologyReading="setOncologyReading"
|
||||
@setDigitPlaces="setDigitPlaces"
|
||||
@setReadingTools="setReadingTools"
|
||||
/>
|
||||
</el-collapse-item>
|
||||
<!-- 阅片标准 -->
|
||||
@@ -57,6 +58,7 @@
|
||||
:ref="`readingCriterions${item.TrialReadingCriterionId}`"
|
||||
:trial-reading-criterion-id="TrialReadingCriterionId"
|
||||
:digit-places="digitPlaces"
|
||||
:readingTools="readingTools"
|
||||
:is-additional-assessment="isAdditionalAssessment"
|
||||
@reloadArbitrationRules="reloadArbitrationRules"
|
||||
/>
|
||||
@@ -174,7 +176,7 @@ import GlobalReading from "./components/GlobalReading";
|
||||
import OncologyForm from "./components/OncologyForm";
|
||||
import SignForm from "@/views/trials/components/newSignForm";
|
||||
import const_ from "@/const/sign-code";
|
||||
|
||||
import { getCustomizeStandardsTools } from '@/views/trials/trials-panel/reading/dicoms3D/components/toolConfig'
|
||||
export default {
|
||||
name: "ReadingUnit",
|
||||
components: {
|
||||
@@ -208,6 +210,7 @@ export default {
|
||||
isGlobalReading: false,
|
||||
digitPlaces: 0,
|
||||
isAdditionalAssessment: false,
|
||||
readingTools: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -295,6 +298,9 @@ export default {
|
||||
setDigitPlaces(digitPlaces) {
|
||||
this.digitPlaces = digitPlaces;
|
||||
},
|
||||
setReadingTools(readingTools) {
|
||||
this.readingTools = getCustomizeStandardsTools(readingTools)
|
||||
},
|
||||
setIsClinicalReading(isClinicalReading) {
|
||||
this.isClinicalReading = isClinicalReading;
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,357 @@
|
||||
<template>
|
||||
<BaseContainer class="image-summary-wrapper">
|
||||
<template slot="search-container">
|
||||
<el-form :inline="true">
|
||||
<!-- 中心 -->
|
||||
<el-form-item :label="$t('trials:imageSummary:table:siteNo')">
|
||||
<el-select v-model="searchData.TrialSiteId" clearable filterable>
|
||||
<el-option v-for="(item, index) of siteOptions" :key="index" :label="item.TrialSiteCode"
|
||||
:value="item.TrialSiteId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 受试者 -->
|
||||
<el-form-item :label="$t('trials:imageSummary:table:subject')">
|
||||
<el-input v-model="searchData.SubjectCode" />
|
||||
</el-form-item>
|
||||
<!-- 拍片时间 -->
|
||||
<el-form-item :label="$t('trials:imageSummary:table:operateTime')">
|
||||
<el-date-picker v-model="timeList" @change="changeTimeList" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
:default-time="['00:00:00', '23:59:59']" type="datetimerange">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleExport">
|
||||
{{ $t('common:button:export') }}
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleExportImage(false)" :disabled="selectArr.length <= 0"
|
||||
v-if="hasPermi(['trials:trials-panel:trial-summary:image-summary:export'])">
|
||||
{{ $t('trials:imageSummary:button:export_dicom') }}
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleExportImage(true)" :disabled="selectArr.length <= 0"
|
||||
v-if="hasPermi(['trials:trials-panel:trial-summary:image-summary:export'])">
|
||||
{{ $t('trials:imageSummary:button:export_image') }}
|
||||
</el-button>
|
||||
<el-button type="primary" @click="statistics">
|
||||
{{ $t('trials:imageSummary:button:statistics') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<template slot="main-container">
|
||||
<el-table v-adaptive="{ bottomOffset: 60 }" v-loading="loading" :data="list" @sort-change="handleSortChange"
|
||||
@selection-change="handleSelectionChange" stripe height="100"
|
||||
:default-sort="{ prop: 'CreateTime', order: 'descending' }">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<!-- 中心编号 -->
|
||||
<el-table-column prop="TrialSiteCode" min-width="100" :label="$t('trials:imageSummary:table:siteNo')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- 受试者 -->
|
||||
<el-table-column prop="SubjectCode" min-width="100" :label="$t('trials:imageSummary:table:subject')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- 访视 -->
|
||||
<el-table-column prop="VisitName" min-width="120" :label="$t('trials:imageSummary:table:visit')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- 检查数量 -->
|
||||
<el-table-column prop="TotalStudyCount" min-width="120"
|
||||
:label="$t('trials:imageSummary:table:TotalStudyCount')" show-overflow-tooltip sortable="custom" />
|
||||
<!-- 影像类型 -->
|
||||
<el-table-column prop="VisitName" min-width="120" :label="$t('trials:imageSummary:table:imageType')"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsHaveDicom" type="primary">{{
|
||||
$fd('IsDicom', true)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.IsHaveNoneDicom" type="primary">{{
|
||||
$fd('IsDicom', false)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 影像数量 -->
|
||||
<el-table-column prop="TotalImageCount" min-width="120"
|
||||
:label="$t('trials:imageSummary:table:TotalImageCount')" show-overflow-tooltip sortable="custom" />
|
||||
<!-- 影像大小 -->
|
||||
<el-table-column prop="TotalImageSizeStr" min-width="120"
|
||||
:label="$t('trials:imageSummary:table:TotalImageSizeStr')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<!-- 最早拍片日期 -->
|
||||
<el-table-column prop="EarliestScanDate" min-width="120"
|
||||
:label="$t('trials:imageSummary:table:EarliestScanDate')" show-overflow-tooltip sortable="custom" />
|
||||
<!-- 最晚拍片日期 -->
|
||||
<el-table-column prop="LatestScanDate" min-width="120"
|
||||
:label="$t('trials:imageSummary:table:LatestScanDate')" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column prop="" fixed="right" :label="$t('common:action:action')" show-overflow-tooltip
|
||||
v-if="hasPermi(['trials:trials-panel:trial-summary:image-summary:toUpload', 'trials:tab:uploadMonitor'])">
|
||||
<template slot-scope="scope">
|
||||
<!-- 详情 -->
|
||||
<el-button icon="el-icon-position" circle @click="toUpload(scope.row)"
|
||||
:title="$t('trials:imageSummary:action:toUpload')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
|
||||
@pagination="getList" />
|
||||
<div class="remark">
|
||||
<span>{{ $t('trials:imageSummary:remark:TotalImageSizeStr') }}</span>
|
||||
<span class="size">{{ image_size.TotalImageSizeStr }}</span>,
|
||||
<span>{{ $t('trials:imageSummary:remark:SubjectImageAVGSizeStr') }}</span>
|
||||
<span class="size">{{ image_size.SubjectImageAVGSizeStr }} </span>,
|
||||
<span>{{ $t('trials:imageSummary:remark:SubjectVisitImageAVGSizeStr') }}</span>
|
||||
<span class="size">{{ image_size.SubjectVisitImageAVGSizeStr }}</span>,
|
||||
<span>{{ $t('trials:imageSummary:remark:CheckImageSize') }}</span>
|
||||
<span class="size">{{ image_size.CheckImageSize }} </span>
|
||||
</div>
|
||||
</template>
|
||||
</BaseContainer>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import BaseContainer from '@/components/BaseContainer'
|
||||
import { getTrialSiteSelect, getTrialVisitImageStatList, getTrialVisitImageStatInfo, getExportSubjectVisitImageList } from '@/api/trials'
|
||||
import { downLoadFile } from '@/utils/stream.js'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
SortField: '',
|
||||
Asc: false,
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
TrialSiteId: null,
|
||||
SubjectCode: null,
|
||||
BeginScanDate: null,
|
||||
EndScanDate: null
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: "imageSummary",
|
||||
components: { Pagination, BaseContainer },
|
||||
data() {
|
||||
return {
|
||||
total: 0,
|
||||
loading: false,
|
||||
searchData: searchDataDefault(),
|
||||
ResearchProgramNo: null,
|
||||
list: [],
|
||||
siteOptions: [],
|
||||
timeList: [],
|
||||
selectArr: [],
|
||||
image_size: {
|
||||
TotalImageSizeStr: null,
|
||||
SubjectImageAVGSizeStr: null,
|
||||
SubjectVisitImageAVGSizeStr: null,
|
||||
CheckImageSize: null
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getSite()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
try {
|
||||
this.searchData.TrialId = this.$route.query.trialId
|
||||
this.loading = true
|
||||
let res = await getTrialVisitImageStatList(this.searchData)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 导出表格
|
||||
handleExport() { },
|
||||
// 导出影像或关键图
|
||||
async handleExportImage(IsKeyImage = false) {
|
||||
try {
|
||||
let data = {
|
||||
TrialId: this.$route.query.trialId,
|
||||
IsKeyImage
|
||||
}
|
||||
data.SubjectVisitIdList = this.selectArr.map(item => item.SubjectVisitId)
|
||||
if (!IsKeyImage) {
|
||||
let confirm = await this.$confirm(this.$t('trials:imageSummary:confirm:space').replace('xxx', this.image_size.CheckImageSize))
|
||||
if (!confirm) return false
|
||||
}
|
||||
let res = await getExportSubjectVisitImageList(data)
|
||||
if (res.IsSuccess) {
|
||||
this.downLoad(IsKeyImage, res.Result)
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 下载
|
||||
async downLoad(IsKeyImage = false, row) {
|
||||
try {
|
||||
let { files, name } = this.formatDownloadFile(IsKeyImage, row)
|
||||
let res = await downLoadFile(files, name, 'zip')
|
||||
// }
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 格式化下载文件路径
|
||||
formatDownloadFile(IsKeyImage = false, row) {
|
||||
let files = [],
|
||||
name = `${this.$route.query.researchProgramNo}.zip`;
|
||||
if (!IsKeyImage) {
|
||||
//中心ID/受试者ID/访视名/Study ID_Study Date_Modality/文件
|
||||
row.VisitList.forEach(visit => {
|
||||
if (visit.StudyList && visit.StudyList.length > 0) {
|
||||
visit.StudyList.forEach(study => {
|
||||
if (study.SeriesList && study.SeriesList.length > 0) {
|
||||
study.SeriesList.forEach(serie => {
|
||||
if (serie.InstancePathList && serie.InstancePathList.length > 0) {
|
||||
serie.InstancePathList.forEach(instance => {
|
||||
let instanceArr = instance.Path.split("/")
|
||||
let fileName = instanceArr[instanceArr.length - 1]
|
||||
let obj = {
|
||||
name: `${visit.TrialSiteCode}/${visit.SubjectCode}/${visit.VisitName}/${study.StudyCode}_${study.StudyTime}_${serie.Modality}/${fileName}`,
|
||||
url: this.OSSclientConfig.basePath + instance.Path,
|
||||
}
|
||||
files.push(obj)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
if (visit.NoneDicomStudyList && visit.NoneDicomStudyList.length > 0) {
|
||||
visit.NoneDicomStudyList.forEach(noneDicomStudy => {
|
||||
if (noneDicomStudy.FileList && noneDicomStudy.FileList.length > 0) {
|
||||
noneDicomStudy.FileList.forEach(file => {
|
||||
let obj = {
|
||||
name: `${visit.TrialSiteCode}/${visit.SubjectCode}/${visit.VisitName}/${noneDicomStudy.StudyCode}_${noneDicomStudy.ImageDate}_${noneDicomStudy.Modality}/${file.FileName}`,
|
||||
url: this.OSSclientConfig.basePath + file.Path,
|
||||
}
|
||||
files.push(obj)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
//项目研究方案号(评估标准)/中心ID/受试者ID/访视名/阅片人角色-裁判选择标记/文件名
|
||||
row.forEach(item => {
|
||||
['QuestionMarkPictureList', 'TableQuestionRowPictureList'].forEach(key => {
|
||||
if (item[key] && item[key].length > 0) {
|
||||
item[key].forEach(data => {
|
||||
['PicturePath', 'otherPicturePath'].forEach(imgKey => {
|
||||
if (data[imgKey]) {
|
||||
let arr = data[imgKey].split("/")
|
||||
let fileName = arr[arr.length - 1]
|
||||
let obj = {
|
||||
name: `${item.CriterionName}/${item.TrialSiteCode}/${item.SubjectCode}/${item.VisitName}/${this.$fd('ArmEnum', item.ArmEnum)}_${this.$fd('YesOrNo', item.IsJudgeSelect)}/${fileName}`,
|
||||
url: this.OSSclientConfig.basePath + data[imgKey],
|
||||
}
|
||||
files.push(obj)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
return { files, name }
|
||||
},
|
||||
// 获取统计数据
|
||||
async statistics() {
|
||||
try {
|
||||
let params = {
|
||||
TrialId: this.$route.query.trialId
|
||||
}
|
||||
this.loading = true
|
||||
let res = await getTrialVisitImageStatInfo(params)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.image_size.TotalImageSizeStr = res.Result.TotalImageSizeStr;
|
||||
this.image_size.SubjectImageAVGSizeStr = res.Result.SubjectImageAVGSizeStr;
|
||||
this.image_size.SubjectVisitImageAVGSizeStr = res.Result.SubjectVisitImageAVGSizeStr;
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 跳转至上传记录页
|
||||
toUpload(row) {
|
||||
let query = this.$route.query
|
||||
query.siteId = row.TrialSiteId
|
||||
query.subjectCode = row.SubjectCode
|
||||
query.visitNum = row.VisitNum
|
||||
this.$router.push({
|
||||
path: '/trials/trials-panel/trial-summary/upload-monitor',
|
||||
query
|
||||
})
|
||||
},
|
||||
handleSelectionChange(selection) {
|
||||
this.selectArr = selection
|
||||
let num = this.selectArr.reduce((sum, item) => sum + item.TotalImageSize, 0)
|
||||
if (num <= 0) return this.image_size.CheckImageSize = null
|
||||
this.image_size.CheckImageSize = (num / 1024 / 1024).toFixed(3) + 'MB'
|
||||
},
|
||||
// 获取site下拉框数据
|
||||
getSite() {
|
||||
getTrialSiteSelect(this.$route.query.trialId).then(res => {
|
||||
this.siteOptions = res.Result
|
||||
})
|
||||
},
|
||||
changeTimeList() {
|
||||
if (this.timeList) {
|
||||
this.searchData.BeginScanDate = this.timeList[0]
|
||||
this.searchData.EndScanDate = this.timeList[1]
|
||||
} else {
|
||||
this.searchData.BeginScanDate = null
|
||||
this.searchData.EndScanDate = null
|
||||
}
|
||||
|
||||
},
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.timeList = []
|
||||
this.getList()
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
handleSortChange(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.image-summary-wrapper {
|
||||
position: relative;
|
||||
|
||||
.remark {
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
bottom: 7px;
|
||||
font-size: 12px;
|
||||
|
||||
.size {
|
||||
display: inline-block;
|
||||
min-width: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+103
-271
@@ -4,52 +4,25 @@
|
||||
{{ TITLE }}
|
||||
</div>
|
||||
<el-form :inline="true" class="base-search-form topForm">
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:fileRecord:form:isConfirmRecord')"
|
||||
v-if="isManage && hasEdit && !viewStatus"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="DATA.IsConfirmRecord"
|
||||
:disabled="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-radio
|
||||
:label="item.value"
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
>{{ item.label }}
|
||||
<el-form-item :label="$t('trials:trialDocument:fileRecord:form:isConfirmRecord')"
|
||||
v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-radio-group v-model="DATA.IsConfirmRecord" :disabled="rowBtnStatus === 'edit'">
|
||||
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:fileRecord:form:isEnable')"
|
||||
v-if="isManage && hasEdit && !viewStatus"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="DATA.IsEnable"
|
||||
:disabled="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-radio
|
||||
:label="item.value"
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
>{{ item.label }}
|
||||
<el-form-item :label="$t('trials:trialDocument:fileRecord:form:isEnable')"
|
||||
v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-radio-group v-model="DATA.IsEnable" :disabled="rowBtnStatus === 'edit'">
|
||||
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="rowBtnStatus = 'save'"
|
||||
v-if="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-button type="primary" @click="rowBtnStatus = 'save'" v-if="rowBtnStatus === 'edit'">
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="rowBtnLoading"
|
||||
@click="saveRowData"
|
||||
v-if="rowBtnStatus === 'save'"
|
||||
>
|
||||
<el-button type="primary" :loading="rowBtnLoading" @click="saveRowData" v-if="rowBtnStatus === 'save'">
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
@@ -58,32 +31,14 @@
|
||||
<!-- 搜索框 -->
|
||||
<div class="search" style="position: relative">
|
||||
<el-form :inline="true" class="base-search-form">
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:fileRecord:search:name')"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchData.FileName"
|
||||
style="width: 100px"
|
||||
clearable
|
||||
/>
|
||||
<el-form-item :label="$t('trials:trialDocument:fileRecord:search:name')">
|
||||
<el-input v-model="searchData.FileName" style="width: 100px" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:fileRecord:search:isAuthorizedView')"
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-select
|
||||
v-if="!viewStatus"
|
||||
v-model="searchData.IsAuthorizedView"
|
||||
style="width: 100px"
|
||||
placeholder=""
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
<el-form-item :label="$t('trials:trialDocument:fileRecord:search:isAuthorizedView')"
|
||||
v-if="isManage && !viewStatus">
|
||||
<el-select v-if="!viewStatus" v-model="searchData.IsAuthorizedView" style="width: 100px" placeholder=""
|
||||
clearable>
|
||||
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -91,134 +46,70 @@
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isManage && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth"
|
||||
>
|
||||
<el-button type="primary" :disabled="selectTable.length <= 0" v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth">
|
||||
{{ $t('trials:trialDocument:fileRecord:button:accredit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
@click.stop="openFile(false)"
|
||||
>
|
||||
<el-button type="primary" v-if="hasEdit && isManage && !viewStatus" @click.stop="openFile(false)">
|
||||
{{ $t('trials:trialDocument:fileRecord:button:uploadFile') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
@click.stop="openFile(true)"
|
||||
>
|
||||
<el-button type="primary" v-if="hasEdit && isManage && !viewStatus" @click.stop="openFile(true)">
|
||||
{{ $t('trials:trialDocument:fileRecord:button:uploadFolder') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-bottom"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
@click.stop="downLoad"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-bottom" :disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus" @click.stop="downLoad">
|
||||
{{ $t('trials:trialDocument:fileRecord:button:downLoadFile') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="hasDel && isManage && !viewStatus"
|
||||
:disabled="selectTable.length <= 0"
|
||||
@click.stop="delList"
|
||||
>
|
||||
<el-button type="primary" v-if="hasDel && isManage && !viewStatus" :disabled="selectTable.length <= 0"
|
||||
@click.stop="delList">
|
||||
{{ $t('trials:trialDocument:fileRecord:button:del') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{ bottomOffset: 75 }"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width: 100%"
|
||||
@sort-change="handleSortByColumn"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
v-if="isManage && !viewStatus"
|
||||
/>
|
||||
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100" style="width: 100%"
|
||||
@sort-change="handleSortByColumn" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" v-if="isManage && !viewStatus" />
|
||||
<el-table-column type="index" v-else />
|
||||
|
||||
<!--名称-->
|
||||
<el-table-column
|
||||
prop="FileName"
|
||||
:label="$t('trials:trialDocument:fileRecord:table:name')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<el-table-column prop="FileName" :label="$t('trials:trialDocument:fileRecord:table:name')" show-overflow-tooltip
|
||||
sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.TrialFileRecord &&
|
||||
scope.row.TrialFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<div v-if="
|
||||
scope.row.TrialFileRecord &&
|
||||
scope.row.TrialFileRecord.TrialFileTypeId
|
||||
" style="display: flex; align-items: center">
|
||||
<span class="fileName">{{
|
||||
scope.row.TrialFileRecord.FileName
|
||||
}}</span>
|
||||
<div v-if="isManage && !viewStatus" class="fileBtnBox">
|
||||
<i
|
||||
class="el-icon-view"
|
||||
@click.stop="preview(scope.row.TrialFileRecord)"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-download"
|
||||
v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
v-if="hasDel"
|
||||
@click.stop="delFile(scope.row, 'Trial')"
|
||||
/>
|
||||
<i class="el-icon-view" @click.stop="preview(scope.row.TrialFileRecord)" />
|
||||
<i class="el-icon-download" v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')" />
|
||||
<i class="el-icon-delete" v-if="hasDel" @click.stop="delFile(scope.row, 'Trial')" />
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus && hasEdit"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'Trial', ['.pdf'])"
|
||||
/>
|
||||
<i v-else-if="isManage && !viewStatus && hasEdit" class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff" @click.stop="upload(scope.row, 'Trial', ['.pdf'])" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileType"
|
||||
:label="$t('trials:trialDocument:fileRecord:table:fileType')"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="fileType" :label="$t('trials:trialDocument:fileRecord:table:fileType')"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.TrialFileRecord">{{
|
||||
scope.row.TrialFileRecord.FileFormat
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileType"
|
||||
:label="$t('trials:trialDocument:fileRecord:table:fileSize')"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="fileType" :label="$t('trials:trialDocument:fileRecord:table:fileSize')"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.TrialFileRecord">{{
|
||||
scope.row.TrialFileRecord.FileSize
|
||||
@@ -228,133 +119,52 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--历史记录-->
|
||||
<el-table-column
|
||||
prop="HistoryFileRecord"
|
||||
:label="$t('trials:trialDocument:fileRecord:table:historyFileRecord')"
|
||||
show-overflow-tooltip
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="HistoryFileRecord" :label="$t('trials:trialDocument:fileRecord:table:historyFileRecord')"
|
||||
show-overflow-tooltip v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.HistoryFileRecord &&
|
||||
scope.row.HistoryFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<span class="fileName">{{
|
||||
scope.row.HistoryFileRecord.FileName
|
||||
}}</span>
|
||||
<div v-if="isManage && !viewStatus" class="fileBtnBox">
|
||||
<i
|
||||
class="el-icon-download"
|
||||
v-if="hasDownLoad"
|
||||
@click.stop="
|
||||
downLoad(false, scope.row.HistoryFileRecord, 'file')
|
||||
"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
v-if="hasDel"
|
||||
@click.stop="delFile(scope.row, 'History')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'History', ['.zip'])"
|
||||
/>
|
||||
<el-button type="text" @click.stop="openHistory(scope.row)">
|
||||
{{ scope.row.HistoryCount }}
|
||||
<i class="el-icon-upload2" />
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="IsAuthorizedView"
|
||||
:label="$t('trials:trialDocument:fileRecord:table:isAuthorizedView')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="IsAuthorizedView" :label="$t('trials:trialDocument:fileRecord:table:isAuthorizedView')"
|
||||
show-overflow-tooltip sortable="custom" v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
:disabled="!scope.row.TrialFileRecord"
|
||||
v-if="isManage && !viewStatus && hasEdit"
|
||||
v-model="scope.row.IsAuthorizedView"
|
||||
@change="(val) => auth(false, scope.row, val)"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
:active-text="$fd('YesOrNo', true)"
|
||||
:inactive-text="$fd('YesOrNo', false)"
|
||||
>
|
||||
<el-switch :disabled="!scope.row.TrialFileRecord" v-if="isManage && !viewStatus && hasEdit"
|
||||
v-model="scope.row.IsAuthorizedView" @change="(val) => auth(false, scope.row, val)" :active-value="true"
|
||||
:inactive-value="false" :active-text="$fd('YesOrNo', true)" :inactive-text="$fd('YesOrNo', false)">
|
||||
</el-switch>
|
||||
<span v-else>{{ $fd('YesOrNo', scope.row.IsAuthorizedView) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
:label="$t('trials:trialDocument:fileRecord:table:updateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
:label="$t('trials:trialDocument:fileRecord:table:createTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="UpdateTime" :label="$t('trials:trialDocument:fileRecord:table:updateTime')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column prop="CreateTime" :label="$t('trials:trialDocument:fileRecord:table:createTime')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column :label="$t('common:action:action')" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
icon="el-icon-view"
|
||||
:title="$t('common:button:view')"
|
||||
circle
|
||||
:disabled="
|
||||
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
"
|
||||
@click.stop="preview(scope.row.TrialFileRecord)"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
icon="el-icon-download"
|
||||
:title="$t('trials:trialDocument:fileRecord:button:downLoadFile')"
|
||||
circle
|
||||
:disabled="
|
||||
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
"
|
||||
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasDel && isManage && !viewStatus"
|
||||
icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:fileRecord:button:delete')"
|
||||
circle
|
||||
@click.stop="handleDel(scope.row)"
|
||||
/>
|
||||
<el-button icon="el-icon-view" :title="$t('common:button:view')" circle :disabled="!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
" @click.stop="preview(scope.row.TrialFileRecord)" />
|
||||
<el-button v-if="hasDownLoad && isManage && !viewStatus" icon="el-icon-download"
|
||||
:title="$t('trials:trialDocument:fileRecord:button:downLoadFile')" circle :disabled="!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
" @click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')" />
|
||||
<el-button v-if="hasDel && isManage && !viewStatus" icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:fileRecord:button:delete')" circle @click.stop="handleDel(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<upload-files
|
||||
:config="config"
|
||||
:faccept="faccept"
|
||||
:uploadPath="uploadPath"
|
||||
:limitLength="limitLength"
|
||||
v-if="config.visible"
|
||||
@close="close"
|
||||
@uplaodFile="uplaodFile"
|
||||
/>
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
|
||||
@pagination="getList" />
|
||||
<upload-files :config="config" :faccept="faccept" :uploadPath="uploadPath" :limitLength="limitLength"
|
||||
v-if="config.visible" @close="close" @uplaodFile="uplaodFile" />
|
||||
<history-file-list :config="file_config" :rowData="fileData" :uploadPath="uploadPath" @getList="getList" />
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
<script>
|
||||
import {
|
||||
addOrUpdateTrialFileType,
|
||||
getTrialNormalRecordList,
|
||||
@@ -369,6 +179,7 @@ import { deepClone } from '@/utils/index.js'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import uploadFiles from '../uploadFiles.vue'
|
||||
import historyFileList from '../historyFileList.vue'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
IsAuthorizedView: null,
|
||||
@@ -381,7 +192,7 @@ const searchDataDefault = () => {
|
||||
}
|
||||
export default {
|
||||
name: 'fileRecord',
|
||||
components: { BoxContent, Pagination, uploadFiles },
|
||||
components: { BoxContent, Pagination, uploadFiles, historyFileList },
|
||||
props: {
|
||||
viewStatus: {
|
||||
type: Boolean,
|
||||
@@ -426,9 +237,25 @@ export default {
|
||||
limitLength: 0,
|
||||
|
||||
DATA: {},
|
||||
|
||||
fileData: {},
|
||||
file_config: {
|
||||
visible: false,
|
||||
title: this.$t('trials:trialDocument:historyFileList:title'),
|
||||
width: '800px',
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openHistory(row) {
|
||||
this.fileData = {
|
||||
Name: row.TrialFileRecord ? row.TrialFileRecord.FileName : '',
|
||||
Id: row.Id,
|
||||
TrialFileTypeId: this.rowData.Id
|
||||
}
|
||||
this.file_config.visible = true
|
||||
},
|
||||
// 新增列表数据
|
||||
async uplaodFile(list) {
|
||||
console.log(list, 'list')
|
||||
@@ -775,7 +602,7 @@ export default {
|
||||
this.DATA = Object.assign({}, this.rowData)
|
||||
},
|
||||
immediate: true,
|
||||
deep:true
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
created() {
|
||||
@@ -823,34 +650,39 @@ export default {
|
||||
])
|
||||
},
|
||||
TITLE() {
|
||||
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)} — ${
|
||||
this.isEN ? this.rowData.Name : this.rowData.NameCN
|
||||
}`
|
||||
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)} — ${this.isEN ? this.rowData.Name : this.rowData.NameCN
|
||||
}`
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
<style lang="scss" scoped>
|
||||
.title {
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.fileName {
|
||||
display: inline-block;
|
||||
max-width: calc(100% - 60px);
|
||||
white-space: nowrap; /* 文本不换行 */
|
||||
overflow: hidden; /* 超出部分隐藏 */
|
||||
white-space: nowrap;
|
||||
/* 文本不换行 */
|
||||
overflow: hidden;
|
||||
/* 超出部分隐藏 */
|
||||
text-overflow: ellipsis;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.fileBtnBox {
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
color: #409eff;
|
||||
margin-right: 3px;
|
||||
|
||||
&:last-child {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
+351
@@ -0,0 +1,351 @@
|
||||
<template>
|
||||
<div v-if="config.visible">
|
||||
<base-model :config="config">
|
||||
<template slot="dialog-body">
|
||||
<el-form ref="form" :model="rowData" label-width="80px" style="width: 80%;display: inline-block;">
|
||||
<el-form-item :label="`${$t('trials:trialDocument:table:Name')}: `">
|
||||
<span class="name text-ellipsis" :title="rowData.Name">{{ rowData.Name }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button size="mini" type="primary" style="float:right" @click.stop="openFile(true)">
|
||||
{{ $t('trials:trialDocument:historyFileList:button:addFolder') }}</el-button>
|
||||
<div style="float:right;padding: 0 5px;width: 10px;height: 10px;"></div>
|
||||
<el-button size="mini" type="primary" style="float:right" @click.stop="openFile(false)">
|
||||
{{ $t('trials:trialDocument:historyFileList:button:addFile') }}</el-button>
|
||||
<el-table :data="list" style="width: 100%" max-height="300px" v-loading="loading"
|
||||
@sort-change="handleSortByColumn" @cell-mouse-enter="handleCellMouseEnter">
|
||||
<el-table-column type="index" width="60" />
|
||||
<el-table-column prop="FileName" :label="$t('trials:trialDocument:historyFileList:FileName')"
|
||||
sortable="custom" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="renameId !== scope.row.Id" class="name_box">
|
||||
<span class="name" :title="scope.row.FileName">{{ scope.row.FileName }}</span>
|
||||
<i class="el-icon-edit icon_edit" @click="addRenameId(scope.row)"
|
||||
:title="$t('trials:trialDocument:historyFileList:icon:rename')" />
|
||||
</div>
|
||||
|
||||
|
||||
<el-input v-model="scope.row.FileName" :ref="`renameInp_${scope.row.Id}`" :autofocus="true"
|
||||
class="renameInp" @blur="save(scope.row)" v-else />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="FileFormat" :label="$t('trials:trialDocument:historyFileList:FileType')"
|
||||
sortable="custom" />
|
||||
<el-table-column prop="FileSize" :label="$t('trials:trialDocument:historyFileList:FileSize')"
|
||||
sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
scope.row.FileSize && scope.row.FileSize > 0
|
||||
? `${(scope.row.FileSize / 1024 / 1024).toFixed(3)}MB`
|
||||
: ''
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CreateTime" :label="$t('trials:trialDocument:historyFileList:CreateTime')"
|
||||
sortable="custom" />
|
||||
<el-table-column :label="$t('common:action:action')" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click.stop="preview(scope.row)">
|
||||
{{ $t('common:button:preview') }}
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" @click.stop="del(scope.row)">
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</base-model>
|
||||
<viewer ref="picture_perview4" style="margin: 0 10px"
|
||||
v-if="rowDATA.FileFormat && ['png', 'jpg', 'jpeg'].includes(rowDATA.FileFormat.toLowerCase())"
|
||||
:images="[`${OSSclientConfig.basePath}${rowDATA.FilePath}`]" :options="viewerOptions">
|
||||
|
||||
<img v-show="false" :src="`${OSSclientConfig.basePath}${rowDATA.FilePath}`" alt="Image" />
|
||||
</viewer>
|
||||
<upload-files :config="upload_config" :faccept="faccept" :uploadPath="uploadPath" v-if="upload_config.visible"
|
||||
@close="close" @uplaodFile="uplaodFile" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
import uploadFiles from './uploadFiles.vue'
|
||||
import { addOrUpdateTrialHistoryRecordFile, batchAddTrialHistoryRecordFile, getTrialHistoryRecordFileList, deleteTrialHistoryRecordFile } from '@/api/dictionary'
|
||||
const defaultSearchData = () => {
|
||||
return {
|
||||
PageIndex: 1,
|
||||
PageSize: 1000,
|
||||
Asc: false,
|
||||
OffLine: null,
|
||||
SortField: null
|
||||
}
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
BaseModel,
|
||||
uploadFiles
|
||||
},
|
||||
props: {
|
||||
config: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
visible: false,
|
||||
title: this.$t('trials:trialDocument:historyFileList:title'),
|
||||
width: '800px',
|
||||
}
|
||||
}
|
||||
},
|
||||
rowData: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
uploadPath: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchData: defaultSearchData(),
|
||||
visible: false,
|
||||
title: null,
|
||||
list: [],
|
||||
rowDATA: {},
|
||||
loading: false,
|
||||
viewerOptions: {
|
||||
toolbar: {
|
||||
zoomIn: true,
|
||||
zoomOut: true,
|
||||
reset: true,
|
||||
prev: false,
|
||||
next: false,
|
||||
rotateLeft: true,
|
||||
rotateRight: true,
|
||||
flipHorizontal: true,
|
||||
flipVertical: true,
|
||||
}
|
||||
},
|
||||
upload_config: {
|
||||
visible: false,
|
||||
showClose: true,
|
||||
width: '800px',
|
||||
title: '',
|
||||
appendToBody: false,
|
||||
isFolder: false,
|
||||
},
|
||||
faccept: ['.jpg',
|
||||
'.jpeg',
|
||||
'.png',
|
||||
'.pdf',
|
||||
'.ppt',
|
||||
'.pptx',
|
||||
'.doc',
|
||||
'.docx',
|
||||
'.xls',
|
||||
'.xlsx',
|
||||
".mp4",
|
||||
".zip"],
|
||||
renameId: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'rowData.Id': {
|
||||
handler() {
|
||||
if (this.rowData.Id) {
|
||||
console.log(this.rowData)
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 单行hover移入
|
||||
handleCellMouseEnter(row) {
|
||||
this.hoverId = row.Id
|
||||
},
|
||||
addRenameId(row) {
|
||||
this.renameId = row.Id
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs[`renameInp_${row.Id}`]) {
|
||||
this.$refs[`renameInp_${row.Id}`].focus()
|
||||
}
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.upload_config.visible = false
|
||||
},
|
||||
getAllList() {
|
||||
this.getList()
|
||||
this.$emit("getList")
|
||||
},
|
||||
openAudit(row) {
|
||||
this.form = Object.assign({}, row)
|
||||
this.visible = true
|
||||
},
|
||||
async save(row) {
|
||||
try {
|
||||
if (!row.FileName) {
|
||||
this.$message.warning(this.$t("trials:trialDocument:historyFileList:message:fileNameMust"))
|
||||
return this.addRenameId(row)
|
||||
}
|
||||
|
||||
this.renameId = null
|
||||
let res = await addOrUpdateTrialHistoryRecordFile(row)
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
async del(row) {
|
||||
try {
|
||||
let confirm = await this.$confirm(this.$t("trials:trialDocument:historyFileList:message:del"))
|
||||
if (!confirm) return false
|
||||
this.loading = true
|
||||
let res = await deleteTrialHistoryRecordFile(row.Id)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.getAllList()
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async uplaodFile(list) {
|
||||
console.log(list, 'list')
|
||||
try {
|
||||
let arr = []
|
||||
list.forEach(item => {
|
||||
let obj = Object.assign({}, item)
|
||||
obj.TrialFileTypeId = this.rowData.TrialFileTypeId
|
||||
obj.TrialRecordId = this.rowData.Id
|
||||
arr.push(obj)
|
||||
});
|
||||
this.loading = true
|
||||
let res = await batchAddTrialHistoryRecordFile(arr)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.getAllList()
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
openFile(isFolder = false) {
|
||||
this.upload_config.title = this.$t(
|
||||
'trials:trialDocument:fileRecord:form:title:uploadFile'
|
||||
)
|
||||
this.upload_config.visible = true
|
||||
this.upload_config.isFolder = isFolder
|
||||
},
|
||||
async getList() {
|
||||
try {
|
||||
if (!this.rowData.Id) return false
|
||||
this.searchData.TrialRecordId = this.rowData.Id
|
||||
let res = await getTrialHistoryRecordFileList(this.searchData)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.list = res.Result.CurrentPageData
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
preview(data) {
|
||||
// return this.perview_visible = true
|
||||
this.rowDATA = Object.assign({}, data)
|
||||
if (['.ppt',
|
||||
'.pptx',
|
||||
'.doc',
|
||||
'.docx',
|
||||
'.xls',
|
||||
'.xlsx'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$onlyOffice({
|
||||
path: data.FilePath,
|
||||
type: data.FileFormat,
|
||||
title: data.Name
|
||||
})
|
||||
}
|
||||
if (['.jpg',
|
||||
'.jpeg',
|
||||
'.png'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['picture_perview4'].$viewer.show()
|
||||
})
|
||||
}
|
||||
if (['.pdf'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$preview({
|
||||
path: data.Path || data.FilePath,
|
||||
type: 'pdf',
|
||||
title: data.Name,
|
||||
})
|
||||
}
|
||||
if (['.mp4'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$video({
|
||||
path: data.Path || data.FilePath,
|
||||
type: 'mp4',
|
||||
title: data.Name,
|
||||
})
|
||||
}
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.name {
|
||||
display: block;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.name_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: calc(100% - 20px);
|
||||
|
||||
.name {
|
||||
max-width: calc(100% - 60px);
|
||||
white-space: nowrap;
|
||||
/* 文本不换行 */
|
||||
overflow: hidden;
|
||||
/* 超出部分隐藏 */
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.icon_edit {
|
||||
cursor: pointer;
|
||||
color: rgba(0, 0, 0, 0.3);
|
||||
margin-left: 2px;
|
||||
|
||||
&:hover {
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
.renameInp {
|
||||
::v-deep .el-input__inner {
|
||||
line-height: 23px;
|
||||
height: 23px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+33
-100
@@ -1,131 +1,64 @@
|
||||
<template>
|
||||
<base-model :config="config">
|
||||
<div slot="dialog-body">
|
||||
<el-form
|
||||
ref="reportDocForm"
|
||||
:model="form"
|
||||
label-width="140px"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form ref="reportDocForm" :model="form" label-width="140px" size="small" :rules="rules">
|
||||
<div class="base-dialog-body">
|
||||
<el-form-item
|
||||
v-if="!config.upload"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:name')"
|
||||
prop="Name"
|
||||
>
|
||||
<el-form-item v-if="!config.upload" :label="$t('trials:trialDocument:reportDoc:form:name')" prop="Name">
|
||||
<el-input v-model="form.Name" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="!config.upload"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:version')"
|
||||
prop="Version"
|
||||
>
|
||||
<el-form-item v-if="!config.upload" :label="$t('trials:trialDocument:reportDoc:form:version')" prop="Version">
|
||||
<el-input v-model="form.Version" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="!config.upload"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:isAuthorizedView')"
|
||||
prop="IsAuthorizedView"
|
||||
>
|
||||
<el-switch
|
||||
v-model="form.IsAuthorizedView"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
:active-text="$fd('YesOrNo', true)"
|
||||
:inactive-text="$fd('YesOrNo', false)"
|
||||
>
|
||||
<el-form-item v-if="!config.upload" :label="$t('trials:trialDocument:reportDoc:form:isAuthorizedView')"
|
||||
prop="IsAuthorizedView">
|
||||
<el-switch v-model="form.IsAuthorizedView" :active-value="true" :inactive-value="false"
|
||||
:active-text="$fd('YesOrNo', true)" :inactive-text="$fd('YesOrNo', false)">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="!config.upload || config.upload === 'PDF'"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:pdfFileRecord')"
|
||||
prop="PDFFileRecord"
|
||||
>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
:before-upload="(param) => beforeUpload(param, 'PDF', '.pdf')"
|
||||
:http-request="(param) => handleUploadFile(param, 'PDF')"
|
||||
:on-remove="() => handleRemoveFile('PDF')"
|
||||
:limit="1"
|
||||
accept=".pdf"
|
||||
:file-list="PDFFile"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="
|
||||
!!form.PDFFileRecord && !!form.PDFFileRecord.FilePath
|
||||
"
|
||||
>{{ $t('common:button:upload') }}
|
||||
<el-form-item v-if="!config.upload || config.upload === 'PDF'"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:pdfFileRecord')" prop="PDFFileRecord">
|
||||
<el-upload class="upload-demo" action :before-upload="(param) => beforeUpload(param, 'PDF', '.pdf')"
|
||||
:http-request="(param) => handleUploadFile(param, 'PDF')" :on-remove="() => handleRemoveFile('PDF')"
|
||||
:limit="1" accept=".pdf" :file-list="PDFFile">
|
||||
<el-button size="small" type="primary" :disabled="!!form.PDFFileRecord && !!form.PDFFileRecord.FilePath
|
||||
">{{ $t('common:button:upload') }}
|
||||
</el-button>
|
||||
<span slot="tip" class="el-upload__tip">
|
||||
{{ $t('trials:trialDocument:reportDoc:rule:mustPDF') }}
|
||||
</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="!config.upload || config.upload === 'Word'"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:wordFileRecord')"
|
||||
>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
:before-upload="(param) => beforeUpload(param, 'Word', '.docx')"
|
||||
:http-request="(param) => handleUploadFile(param, 'Word')"
|
||||
:on-remove="() => handleRemoveFile('Word')"
|
||||
:limit="1"
|
||||
accept=".docx"
|
||||
:file-list="WordFile"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="
|
||||
!!form.WordFileRecord && !!form.WordFileRecord.FilePath
|
||||
"
|
||||
>{{ $t('common:button:upload') }}
|
||||
<el-form-item v-if="!config.upload || config.upload === 'Word'"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:wordFileRecord')">
|
||||
<el-upload class="upload-demo" action :before-upload="(param) => beforeUpload(param, 'Word', '.docx')"
|
||||
:http-request="(param) => handleUploadFile(param, 'Word')" :on-remove="() => handleRemoveFile('Word')"
|
||||
:limit="1" accept=".docx" :file-list="WordFile">
|
||||
<el-button size="small" type="primary" :disabled="!!form.WordFileRecord && !!form.WordFileRecord.FilePath
|
||||
">{{ $t('common:button:upload') }}
|
||||
</el-button>
|
||||
<span slot="tip" class="el-upload__tip">
|
||||
{{ $t('trials:trialDocument:reportDoc:rule:mustDOCX') }}
|
||||
</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="!config.upload || config.upload === 'Sign'"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:signFileRecord')"
|
||||
:prop="
|
||||
rowData.IsConfirmRecord &&
|
||||
(!config.upload || config.upload === 'Sign')
|
||||
<el-form-item v-if="!config.upload || config.upload === 'Sign'"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:signFileRecord')" :prop="rowData.IsConfirmRecord &&
|
||||
(!config.upload || config.upload === 'Sign')
|
||||
? 'SignFileRecord'
|
||||
: ''
|
||||
"
|
||||
>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
:before-upload="(param) => beforeUpload(param, 'Sign', '.pdf')"
|
||||
:http-request="(param) => handleUploadFile(param, 'Sign')"
|
||||
:on-remove="() => handleRemoveFile('Sign')"
|
||||
:limit="1"
|
||||
accept=".pdf"
|
||||
:file-list="SignFile"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="
|
||||
!!form.SignFileRecord && !!form.SignFileRecord.FilePath
|
||||
"
|
||||
>{{ $t('common:button:upload') }}
|
||||
">
|
||||
<el-upload class="upload-demo" action :before-upload="(param) => beforeUpload(param, 'Sign', '.pdf')"
|
||||
:http-request="(param) => handleUploadFile(param, 'Sign')" :on-remove="() => handleRemoveFile('Sign')"
|
||||
:limit="1" accept=".pdf" :file-list="SignFile">
|
||||
<el-button size="small" type="primary" :disabled="!!form.SignFileRecord && !!form.SignFileRecord.FilePath
|
||||
">{{ $t('common:button:upload') }}
|
||||
</el-button>
|
||||
<span slot="tip" class="el-upload__tip">
|
||||
{{ $t('trials:trialDocument:reportDoc:rule:mustPDF') }}
|
||||
</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
<!-- <el-form-item
|
||||
v-if="!config.upload || config.upload === 'History'"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:historyFileRecord')"
|
||||
>
|
||||
@@ -151,7 +84,7 @@
|
||||
{{ $t('trials:trialDocument:reportDoc:rule:mustZIP') }}
|
||||
</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -165,7 +98,7 @@
|
||||
</div>
|
||||
</base-model>
|
||||
</template>
|
||||
<script>
|
||||
<script>
|
||||
import baseModel from '@/components/BaseModel'
|
||||
import { addOrUpdateTrialFinalRecord } from '@/api/dictionary'
|
||||
export default {
|
||||
|
||||
+130
-334
@@ -4,65 +4,30 @@
|
||||
{{ TITLE }}
|
||||
</div>
|
||||
<el-form :inline="true" class="base-search-form topForm">
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:reportDoc:form:firstFinalDate')"
|
||||
>
|
||||
<el-date-picker
|
||||
:disabled="!isManage || rowBtnStatus === 'edit'"
|
||||
v-model="DATA.FirstFinalDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder=""
|
||||
>
|
||||
<el-form-item :label="$t('trials:trialDocument:reportDoc:form:firstFinalDate')">
|
||||
<el-date-picker :disabled="!isManage || rowBtnStatus === 'edit'" v-model="DATA.FirstFinalDate" type="date"
|
||||
value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:reportDoc:form:isConfirmRecord')"
|
||||
v-if="isManage && hasEdit && !viewStatus"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="DATA.IsConfirmRecord"
|
||||
:disabled="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-radio
|
||||
:label="item.value"
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
>{{ item.label }}
|
||||
<el-form-item :label="$t('trials:trialDocument:reportDoc:form:isConfirmRecord')"
|
||||
v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-radio-group v-model="DATA.IsConfirmRecord" :disabled="rowBtnStatus === 'edit'">
|
||||
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:reportDoc:form:isEnable')"
|
||||
v-if="isManage && hasEdit && !viewStatus"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="DATA.IsEnable"
|
||||
:disabled="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-radio
|
||||
:label="item.value"
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
>{{ item.label }}
|
||||
<el-form-item :label="$t('trials:trialDocument:reportDoc:form:isEnable')"
|
||||
v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-radio-group v-model="DATA.IsEnable" :disabled="rowBtnStatus === 'edit'">
|
||||
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="rowBtnStatus = 'save'"
|
||||
v-if="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-button type="primary" @click="rowBtnStatus = 'save'" v-if="rowBtnStatus === 'edit'">
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="rowBtnLoading"
|
||||
@click="saveRowData"
|
||||
v-if="rowBtnStatus === 'save'"
|
||||
>
|
||||
<el-button type="primary" :loading="rowBtnLoading" @click="saveRowData" v-if="rowBtnStatus === 'save'">
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
@@ -74,32 +39,14 @@
|
||||
<el-form-item :label="$t('trials:trialDocument:reportDoc:search:name')">
|
||||
<el-input v-model="searchData.Name" style="width: 100px" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:reportDoc:search:version')"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchData.Version"
|
||||
style="width: 100px"
|
||||
clearable
|
||||
/>
|
||||
<el-form-item :label="$t('trials:trialDocument:reportDoc:search:version')">
|
||||
<el-input v-model="searchData.Version" style="width: 100px" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:reportDoc:search:isAuthorizedView')"
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-select
|
||||
v-if="!viewStatus"
|
||||
v-model="searchData.IsAuthorizedView"
|
||||
style="width: 100px"
|
||||
placeholder=""
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
<el-form-item :label="$t('trials:trialDocument:reportDoc:search:isAuthorizedView')"
|
||||
v-if="isManage && !viewStatus">
|
||||
<el-select v-if="!viewStatus" v-model="searchData.IsAuthorizedView" style="width: 100px" placeholder=""
|
||||
clearable>
|
||||
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -107,321 +54,143 @@
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isManage && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth"
|
||||
>
|
||||
<el-button type="primary" :disabled="selectTable.length <= 0" v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth">
|
||||
{{ $t('trials:trialDocument:reportDoc:button:accredit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="hasAdd && isManage && !viewStatus"
|
||||
@click.stop="handleAdd"
|
||||
>
|
||||
<el-button type="primary" v-if="hasAdd && isManage && !viewStatus" @click.stop="handleAdd">
|
||||
{{ $t('trials:trialDocument:reportDoc:button:add') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-bottom"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
@click.stop="downLoad"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-bottom" :disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus" @click.stop="downLoad">
|
||||
{{ $t('trials:trialDocument:reportDoc:button:downLoadFile') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{ bottomOffset: 75 }"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width: 100%"
|
||||
@sort-change="handleSortByColumn"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
v-if="isManage && !viewStatus"
|
||||
/>
|
||||
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100" style="width: 100%"
|
||||
@sort-change="handleSortByColumn" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" v-if="isManage && !viewStatus" />
|
||||
<el-table-column type="index" v-else />
|
||||
|
||||
<el-table-column
|
||||
prop="Name"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:name')"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Version"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:version')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="Name" :label="$t('trials:trialDocument:reportDoc:table:name')" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="Version" :label="$t('trials:trialDocument:reportDoc:table:version')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<!--定稿PDF-->
|
||||
<el-table-column
|
||||
prop="PDFFileRecord"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:pdfFileRecord')"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="PDFFileRecord" :label="$t('trials:trialDocument:reportDoc:table:pdfFileRecord')"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.PDFFileRecord && scope.row.PDFFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<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')"
|
||||
/>
|
||||
<i class="el-icon-view" @click.stop="preview(scope.row.PDFFileRecord)" />
|
||||
<i class="el-icon-download" v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.PDFFileRecord, 'file')" />
|
||||
<i class="el-icon-delete" v-if="hasDel" @click.stop="delFile(scope.row, 'PDF')" />
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus && hasEdit"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'PDF')"
|
||||
/>
|
||||
<i v-else-if="isManage && !viewStatus && hasEdit" class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff" @click.stop="upload(scope.row, 'PDF')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--定稿WORD-->
|
||||
<el-table-column
|
||||
prop="WordFileRecord"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:wordFileRecord')"
|
||||
show-overflow-tooltip
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="WordFileRecord" :label="$t('trials:trialDocument:reportDoc:table:wordFileRecord')"
|
||||
show-overflow-tooltip v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.WordFileRecord &&
|
||||
scope.row.WordFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<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')"
|
||||
/>
|
||||
<i class="el-icon-download" v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.WordFileRecord, 'file')" />
|
||||
<i class="el-icon-delete" v-if="hasDel" @click.stop="delFile(scope.row, 'Word')" />
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus && hasEdit"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'Word')"
|
||||
/>
|
||||
<i v-else-if="isManage && !viewStatus && hasEdit" class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff" @click.stop="upload(scope.row, 'Word')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--签字页-->
|
||||
<el-table-column
|
||||
prop="SignFileRecord"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:signFileRecord')"
|
||||
show-overflow-tooltip
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="SignFileRecord" :label="$t('trials:trialDocument:reportDoc:table:signFileRecord')"
|
||||
show-overflow-tooltip v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.SignFileRecord &&
|
||||
scope.row.SignFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<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')"
|
||||
/>
|
||||
<i class="el-icon-view" @click.stop="preview(scope.row.SignFileRecord)" />
|
||||
<i class="el-icon-download" v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.SignFileRecord, 'file')" />
|
||||
<i class="el-icon-delete" v-if="hasDel" @click.stop="delFile(scope.row, 'Sign')" />
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus && hasEdit"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'Sign')"
|
||||
/>
|
||||
<i v-else-if="isManage && !viewStatus && hasEdit" class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff" @click.stop="upload(scope.row, 'Sign')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--历史记录-->
|
||||
<el-table-column
|
||||
prop="HistoryFileRecord"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:historyFileRecord')"
|
||||
show-overflow-tooltip
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="HistoryFileRecord" :label="$t('trials:trialDocument:reportDoc:table:historyFileRecord')"
|
||||
show-overflow-tooltip v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.HistoryFileRecord &&
|
||||
scope.row.HistoryFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<span class="fileName">{{
|
||||
scope.row.HistoryFileRecord.FileName
|
||||
}}</span>
|
||||
<div v-if="isManage && !viewStatus" class="fileBtnBox">
|
||||
<i
|
||||
class="el-icon-download"
|
||||
v-if="hasDownLoad"
|
||||
@click.stop="
|
||||
downLoad(false, scope.row.HistoryFileRecord, 'file')
|
||||
"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
v-if="hasDel"
|
||||
@click.stop="delFile(scope.row, 'History')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus && hasEdit"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'History')"
|
||||
/>
|
||||
<el-button type="text" @click.stop="openHistory(scope.row)">
|
||||
{{ scope.row.HistoryCount }}
|
||||
<i class="el-icon-upload2" />
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="IsAuthorizedView"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:isAuthorizedView')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="IsAuthorizedView" :label="$t('trials:trialDocument:reportDoc:table:isAuthorizedView')"
|
||||
show-overflow-tooltip sortable="custom" v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-if="isManage && !viewStatus && hasEdit"
|
||||
v-model="scope.row.IsAuthorizedView"
|
||||
@change="(val) => auth(false, scope.row, val)"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
:active-text="$fd('YesOrNo', true)"
|
||||
:inactive-text="$fd('YesOrNo', false)"
|
||||
>
|
||||
<el-switch v-if="isManage && !viewStatus && hasEdit" v-model="scope.row.IsAuthorizedView"
|
||||
@change="(val) => auth(false, scope.row, val)" :active-value="true" :inactive-value="false"
|
||||
:active-text="$fd('YesOrNo', true)" :inactive-text="$fd('YesOrNo', false)">
|
||||
</el-switch>
|
||||
<span v-else>{{ $fd('YesOrNo', scope.row.IsAuthorizedView) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:updateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:createTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="UpdateTime" :label="$t('trials:trialDocument:reportDoc:table:updateTime')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column prop="CreateTime" :label="$t('trials:trialDocument:reportDoc:table:createTime')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column :label="$t('common:action:action')" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
icon="el-icon-view"
|
||||
:title="$t('common:button:view')"
|
||||
circle
|
||||
:disabled="
|
||||
!scope.row.PDFFileRecord || !scope.row.PDFFileRecord.FilePath
|
||||
"
|
||||
@click.stop="preview(scope.row.PDFFileRecord)"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
icon="el-icon-edit-outline"
|
||||
:title="$t('common:button:edit')"
|
||||
circle
|
||||
@click.stop="handleEdit(scope.row)"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
icon="el-icon-download"
|
||||
:title="$t('trials:trialDocument:reportDoc:button:download')"
|
||||
circle
|
||||
@click.stop="downLoad(false, scope.row)"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasDel && isManage && !viewStatus"
|
||||
icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:reportDoc:button:delete')"
|
||||
circle
|
||||
@click.stop="handleDel(scope.row)"
|
||||
/>
|
||||
<el-button icon="el-icon-view" :title="$t('common:button:view')" circle :disabled="!scope.row.PDFFileRecord || !scope.row.PDFFileRecord.FilePath
|
||||
" @click.stop="preview(scope.row.PDFFileRecord)" />
|
||||
<el-button v-if="hasEdit && isManage && !viewStatus" icon="el-icon-edit-outline"
|
||||
:title="$t('common:button:edit')" circle @click.stop="handleEdit(scope.row)" />
|
||||
<el-button v-if="hasDownLoad && isManage && !viewStatus" icon="el-icon-download"
|
||||
:title="$t('trials:trialDocument:reportDoc:button:download')" circle
|
||||
@click.stop="downLoad(false, scope.row)" />
|
||||
<el-button v-if="hasDel && isManage && !viewStatus" icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:reportDoc:button:delete')" circle @click.stop="handleDel(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<reportDoc-form
|
||||
:ArchiveTypeEnum="ArchiveTypeEnum"
|
||||
:rowData="rowData"
|
||||
:config="config"
|
||||
:data="selectData"
|
||||
v-if="config.visible"
|
||||
@close="close"
|
||||
@getList="getList"
|
||||
/>
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
|
||||
@pagination="getList" />
|
||||
<reportDoc-form :ArchiveTypeEnum="ArchiveTypeEnum" :rowData="rowData" :config="config" :data="selectData"
|
||||
v-if="config.visible" @close="close" @getList="getList" />
|
||||
<history-file-list :config="file_config" :rowData="fileData" :uploadPath="uploadPath" @getList="getList" />
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
@@ -437,6 +206,7 @@ import { deepClone } from '@/utils/index.js'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import reportDocForm from './form.vue'
|
||||
import historyFileList from '../historyFileList.vue'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
IsAuthorizedView: null,
|
||||
@@ -450,7 +220,7 @@ const searchDataDefault = () => {
|
||||
}
|
||||
export default {
|
||||
name: 'reportDoc',
|
||||
components: { BoxContent, Pagination, reportDocForm },
|
||||
components: { BoxContent, Pagination, reportDocForm, historyFileList },
|
||||
props: {
|
||||
viewStatus: {
|
||||
type: Boolean,
|
||||
@@ -491,9 +261,30 @@ export default {
|
||||
},
|
||||
selectData: {},
|
||||
DATA: {},
|
||||
|
||||
fileData: {},
|
||||
file_config: {
|
||||
visible: false,
|
||||
title: this.$t('trials:trialDocument:historyFileList:title'),
|
||||
width: '800px',
|
||||
},
|
||||
uploadPath: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let typeArr = ['', 'Report', 'Doc', 'Record', 'Reviewer', 'Template']
|
||||
let types = typeArr[this.ArchiveTypeEnum]
|
||||
this.uploadPath = `/${this.$route.query.trialId}/Document/${types}`
|
||||
},
|
||||
methods: {
|
||||
openHistory(row) {
|
||||
this.fileData = {
|
||||
Name: row.Name,
|
||||
Id: row.Id,
|
||||
TrialFileTypeId: this.rowData.Id
|
||||
}
|
||||
this.file_config.visible = true
|
||||
},
|
||||
// 上传单个文件
|
||||
upload(row, key) {
|
||||
this.selectData = deepClone(row)
|
||||
@@ -771,7 +562,7 @@ export default {
|
||||
this.DATA = Object.assign({}, this.rowData)
|
||||
},
|
||||
immediate: true,
|
||||
deep:true
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
@@ -814,9 +605,8 @@ export default {
|
||||
])
|
||||
},
|
||||
TITLE() {
|
||||
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)} — ${
|
||||
this.isEN ? this.rowData.Name : this.rowData.NameCN
|
||||
}`
|
||||
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)} — ${this.isEN ? this.rowData.Name : this.rowData.NameCN
|
||||
}`
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -827,21 +617,27 @@ export default {
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.fileName {
|
||||
display: inline-block;
|
||||
max-width: calc(100% - 60px);
|
||||
white-space: nowrap; /* 文本不换行 */
|
||||
overflow: hidden; /* 超出部分隐藏 */
|
||||
white-space: nowrap;
|
||||
/* 文本不换行 */
|
||||
overflow: hidden;
|
||||
/* 超出部分隐藏 */
|
||||
text-overflow: ellipsis;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.fileBtnBox {
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
color: #409eff;
|
||||
margin-right: 3px;
|
||||
|
||||
&:last-child {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@
|
||||
</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="!config.upload || config.upload === 'History'" :label="$t('trials:trialDocument:trainRecord:form:historyFileRecord')
|
||||
<!-- <el-form-item v-if="!config.upload || config.upload === 'History'" :label="$t('trials:trialDocument:trainRecord:form:historyFileRecord')
|
||||
">
|
||||
<el-upload class="upload-demo" action :before-upload="(param) => beforeUpload(param, 'History', '.zip')"
|
||||
:http-request="(param) => handleUploadFile(param, 'History')"
|
||||
@@ -45,7 +45,7 @@
|
||||
{{ $t('trials:trialDocument:trainRecord:rule:mustZIP') }}
|
||||
</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
+119
-341
@@ -4,52 +4,25 @@
|
||||
{{ TITLE }}
|
||||
</div>
|
||||
<el-form :inline="true" class="base-search-form topForm">
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:trainRecord:form:isConfirmRecord')"
|
||||
v-if="isManage && hasEdit && !viewStatus"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="DATA.IsConfirmRecord"
|
||||
:disabled="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-radio
|
||||
:label="item.value"
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
>{{ item.label }}
|
||||
<el-form-item :label="$t('trials:trialDocument:trainRecord:form:isConfirmRecord')"
|
||||
v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-radio-group v-model="DATA.IsConfirmRecord" :disabled="rowBtnStatus === 'edit'">
|
||||
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:trainRecord:form:isEnable')"
|
||||
v-if="isManage && hasEdit && !viewStatus"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="DATA.IsEnable"
|
||||
:disabled="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-radio
|
||||
:label="item.value"
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
>{{ item.label }}
|
||||
<el-form-item :label="$t('trials:trialDocument:trainRecord:form:isEnable')"
|
||||
v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-radio-group v-model="DATA.IsEnable" :disabled="rowBtnStatus === 'edit'">
|
||||
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="rowBtnStatus = 'save'"
|
||||
v-if="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-button type="primary" @click="rowBtnStatus = 'save'" v-if="rowBtnStatus === 'edit'">
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="rowBtnLoading"
|
||||
@click="saveRowData"
|
||||
v-if="rowBtnStatus === 'save'"
|
||||
>
|
||||
<el-button type="primary" :loading="rowBtnLoading" @click="saveRowData" v-if="rowBtnStatus === 'save'">
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
@@ -59,371 +32,155 @@
|
||||
<div class="search" style="position: relative">
|
||||
<el-form :inline="true" class="base-search-form">
|
||||
<!--培训日期-->
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:trainRecord:search:TrianingDate')"
|
||||
>
|
||||
<el-date-picker
|
||||
style="width: 240px"
|
||||
v-model="TrianingDate"
|
||||
type="daterange"
|
||||
:range-separator="$t('baseForm:daterange:rangeSeparator')"
|
||||
start-placeholder=""
|
||||
end-placeholder=""
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
>
|
||||
<el-form-item :label="$t('trials:trialDocument:trainRecord:search:TrianingDate')">
|
||||
<el-date-picker style="width: 240px" v-model="TrianingDate" type="daterange"
|
||||
:range-separator="$t('baseForm:daterange:rangeSeparator')" start-placeholder="" end-placeholder=""
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:trainRecord:search:name')"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchData.FileName"
|
||||
style="width: 100px"
|
||||
clearable
|
||||
/>
|
||||
<el-form-item :label="$t('trials:trialDocument:trainRecord:search:name')">
|
||||
<el-input v-model="searchData.FileName" style="width: 100px" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="
|
||||
$t('trials:trialDocument:trainRecord:search:isAuthorizedView')
|
||||
"
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-select
|
||||
v-if="!viewStatus"
|
||||
v-model="searchData.IsAuthorizedView"
|
||||
style="width: 100px"
|
||||
placeholder=""
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
<el-form-item :label="$t('trials:trialDocument:trainRecord:search:isAuthorizedView')
|
||||
" v-if="isManage && !viewStatus">
|
||||
<el-select v-if="!viewStatus" v-model="searchData.IsAuthorizedView" style="width: 100px" placeholder=""
|
||||
clearable>
|
||||
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--更新时间-->
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:trainRecord:search:UpdateTime')"
|
||||
style="margin-bottom: 10px"
|
||||
>
|
||||
<el-date-picker
|
||||
style="width: 240px"
|
||||
v-model="UpdateTime"
|
||||
type="daterange"
|
||||
:range-separator="$t('baseForm:daterange:rangeSeparator')"
|
||||
start-placeholder=""
|
||||
end-placeholder=""
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
>
|
||||
<el-form-item :label="$t('trials:trialDocument:trainRecord:search:UpdateTime')" style="margin-bottom: 10px">
|
||||
<el-date-picker style="width: 240px" v-model="UpdateTime" type="daterange"
|
||||
:range-separator="$t('baseForm:daterange:rangeSeparator')" start-placeholder="" end-placeholder=""
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isManage && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth"
|
||||
>
|
||||
<el-button type="primary" :disabled="selectTable.length <= 0" v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth">
|
||||
{{ $t('trials:trialDocument:trainRecord:button:accredit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
@click.stop="openFile(false)"
|
||||
>
|
||||
<el-button type="primary" v-if="hasEdit && isManage && !viewStatus" @click.stop="openFile(false)">
|
||||
{{ $t('trials:trialDocument:trainRecord:button:uploadFile') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
@click.stop="openFile(true)"
|
||||
>
|
||||
<el-button type="primary" v-if="hasEdit && isManage && !viewStatus" @click.stop="openFile(true)">
|
||||
{{ $t('trials:trialDocument:trainRecord:button:uploadFolder') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="hasAdd && isManage && !viewStatus"
|
||||
@click.stop="handleAdd"
|
||||
>
|
||||
<el-button type="primary" v-if="hasAdd && isManage && !viewStatus" @click.stop="handleAdd">
|
||||
{{ $t('trials:trialDocument:trainRecord:button:add') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-bottom"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
@click.stop="downLoad"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-bottom" :disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus" @click.stop="downLoad">
|
||||
{{ $t('trials:trialDocument:trainRecord:button:downLoadFile') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{ bottomOffset: 75 }"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width: 100%"
|
||||
@sort-change="handleSortByColumn"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
v-if="isManage && !viewStatus"
|
||||
/>
|
||||
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100" style="width: 100%"
|
||||
@sort-change="handleSortByColumn" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" v-if="isManage && !viewStatus" />
|
||||
<el-table-column type="index" v-else />
|
||||
|
||||
<el-table-column
|
||||
prop="TrianingDate"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:TrianingDate')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<el-table-column prop="TrianingDate" :label="$t('trials:trialDocument:trainRecord:table:TrianingDate')"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip
|
||||
v-if="!scope.row.TrianingDate"
|
||||
class="item"
|
||||
effect="dark"
|
||||
:content="$t('trials:trialDocument:trainRecord:tip:noTrianingDate')"
|
||||
placement="top"
|
||||
>
|
||||
<i
|
||||
class="el-icon-warning"
|
||||
style="cursor: pointer; color: #f56c6c"
|
||||
></i>
|
||||
<el-tooltip v-if="!scope.row.TrianingDate" class="item" effect="dark"
|
||||
:content="$t('trials:trialDocument:trainRecord:tip:noTrianingDate')" placement="top">
|
||||
<i class="el-icon-warning" style="cursor: pointer; color: #f56c6c"></i>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ scope.row.TrianingDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="TrianingCount"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:TrianingCount')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="TrianingState"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:TrianingState')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Note"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:Note')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="TrianingCount" :label="$t('trials:trialDocument:trainRecord:table:TrianingCount')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column prop="TrianingState" :label="$t('trials:trialDocument:trainRecord:table:TrianingState')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column prop="Note" :label="$t('trials:trialDocument:trainRecord:table:Note')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<!--文件名称-->
|
||||
<el-table-column
|
||||
prop="FileName"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:name')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<el-table-column prop="FileName" :label="$t('trials:trialDocument:trainRecord:table:name')" show-overflow-tooltip
|
||||
sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.TrialFileRecord &&
|
||||
scope.row.TrialFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<div v-if="
|
||||
scope.row.TrialFileRecord &&
|
||||
scope.row.TrialFileRecord.TrialFileTypeId
|
||||
" style="display: flex; align-items: center">
|
||||
<span class="fileName">{{
|
||||
scope.row.TrialFileRecord.FileName
|
||||
}}</span>
|
||||
<div v-if="isManage && !viewStatus" class="fileBtnBox">
|
||||
<i
|
||||
class="el-icon-view"
|
||||
@click.stop="preview(scope.row.TrialFileRecord)"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-download"
|
||||
v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
v-if="hasDel"
|
||||
@click.stop="delFile(scope.row, 'Trial')"
|
||||
/>
|
||||
<i class="el-icon-view" @click.stop="preview(scope.row.TrialFileRecord)" />
|
||||
<i class="el-icon-download" v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')" />
|
||||
<i class="el-icon-delete" v-if="hasDel" @click.stop="delFile(scope.row, 'Trial')" />
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus && hasEdit"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'Trial')"
|
||||
/>
|
||||
<i v-else-if="isManage && !viewStatus && hasEdit" class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff" @click.stop="upload(scope.row, 'Trial')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!--历史记录-->
|
||||
<el-table-column
|
||||
prop="HistoryFileRecord"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:historyFileRecord')"
|
||||
show-overflow-tooltip
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="HistoryFileRecord" :label="$t('trials:trialDocument:trainRecord:table:historyFileRecord')"
|
||||
show-overflow-tooltip v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.HistoryFileRecord &&
|
||||
scope.row.HistoryFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<span class="fileName">{{
|
||||
scope.row.HistoryFileRecord.FileName
|
||||
}}</span>
|
||||
<div v-if="isManage && !viewStatus" class="fileBtnBox">
|
||||
<i
|
||||
class="el-icon-download"
|
||||
v-if="hasDownLoad"
|
||||
@click.stop="
|
||||
downLoad(false, scope.row.HistoryFileRecord, 'file')
|
||||
"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
v-if="hasDel"
|
||||
@click.stop="delFile(scope.row, 'History')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'History')"
|
||||
/>
|
||||
<el-button type="text" @click.stop="openHistory(scope.row)">
|
||||
{{ scope.row.HistoryCount }}
|
||||
<i class="el-icon-upload2" />
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="IsAuthorizedView"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:isAuthorizedView')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="IsAuthorizedView" :label="$t('trials:trialDocument:trainRecord:table:isAuthorizedView')"
|
||||
show-overflow-tooltip sortable="custom" v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
:disabled="!scope.row.TrianingDate"
|
||||
v-if="isManage && !viewStatus && hasEdit"
|
||||
v-model="scope.row.IsAuthorizedView"
|
||||
@change="(val) => auth(false, scope.row, val)"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
:active-text="$fd('YesOrNo', true)"
|
||||
:inactive-text="$fd('YesOrNo', false)"
|
||||
>
|
||||
<el-switch :disabled="!scope.row.TrianingDate" v-if="isManage && !viewStatus && hasEdit"
|
||||
v-model="scope.row.IsAuthorizedView" @change="(val) => auth(false, scope.row, val)" :active-value="true"
|
||||
:inactive-value="false" :active-text="$fd('YesOrNo', true)" :inactive-text="$fd('YesOrNo', false)">
|
||||
</el-switch>
|
||||
<span v-else>{{ $fd('YesOrNo', scope.row.IsAuthorizedView) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:updateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:createTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="UpdateTime" :label="$t('trials:trialDocument:trainRecord:table:updateTime')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column prop="CreateTime" :label="$t('trials:trialDocument:trainRecord:table:createTime')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column :label="$t('common:action:action')" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
icon="el-icon-view"
|
||||
:title="$t('common:button:view')"
|
||||
circle
|
||||
:disabled="
|
||||
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
"
|
||||
@click.stop="preview(scope.row.TrialFileRecord)"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
icon="el-icon-edit-outline"
|
||||
:title="$t('common:button:edit')"
|
||||
circle
|
||||
@click.stop="handleEdit(scope.row)"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
icon="el-icon-download"
|
||||
:title="
|
||||
$t('trials:trialDocument:trainRecord:button:downLoadFile')
|
||||
"
|
||||
circle
|
||||
:disabled="
|
||||
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
"
|
||||
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasDel && isManage && !viewStatus"
|
||||
icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:trainRecord:button:delete')"
|
||||
circle
|
||||
@click.stop="handleDel(scope.row)"
|
||||
/>
|
||||
<el-button icon="el-icon-view" :title="$t('common:button:view')" circle :disabled="!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
" @click.stop="preview(scope.row.TrialFileRecord)" />
|
||||
<el-button v-if="hasEdit && isManage && !viewStatus" icon="el-icon-edit-outline"
|
||||
:title="$t('common:button:edit')" circle @click.stop="handleEdit(scope.row)" />
|
||||
<el-button v-if="hasDownLoad && isManage && !viewStatus" icon="el-icon-download" :title="$t('trials:trialDocument:trainRecord:button:downLoadFile')
|
||||
" circle :disabled="!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
" @click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')" />
|
||||
<el-button v-if="hasDel && isManage && !viewStatus" icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:trainRecord:button:delete')" circle @click.stop="handleDel(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<upload-files
|
||||
:config="config"
|
||||
:faccept="faccept"
|
||||
:uploadPath="uploadPath"
|
||||
:limitLength="limitLength"
|
||||
v-if="config.visible"
|
||||
@close="close"
|
||||
@uplaodFile="uplaodFile"
|
||||
/>
|
||||
<trainRecord-form
|
||||
:ArchiveTypeEnum="ArchiveTypeEnum"
|
||||
:rowData="rowData"
|
||||
:config="update_config"
|
||||
:data="selectData"
|
||||
v-if="update_config.visible"
|
||||
@close="updateClose"
|
||||
@getList="getList"
|
||||
/>
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
|
||||
@pagination="getList" />
|
||||
<upload-files :config="config" :faccept="faccept" :uploadPath="uploadPath" :limitLength="limitLength"
|
||||
v-if="config.visible" @close="close" @uplaodFile="uplaodFile" />
|
||||
<trainRecord-form :ArchiveTypeEnum="ArchiveTypeEnum" :rowData="rowData" :config="update_config" :data="selectData"
|
||||
v-if="update_config.visible" @close="updateClose" @getList="getList" />
|
||||
<history-file-list :config="file_config" :rowData="fileData" :uploadPath="uploadPath" @getList="getList" />
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
<script>
|
||||
import {
|
||||
addOrUpdateTrialFileType,
|
||||
getTrialTrianingRecordList,
|
||||
@@ -438,6 +195,7 @@ import Pagination from '@/components/Pagination'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import uploadFiles from '../uploadFiles.vue'
|
||||
import trainRecordForm from './form.vue'
|
||||
import historyFileList from '../historyFileList.vue'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
IsAuthorizedView: null,
|
||||
@@ -454,7 +212,7 @@ const searchDataDefault = () => {
|
||||
}
|
||||
export default {
|
||||
name: 'trainRecord',
|
||||
components: { BoxContent, Pagination, uploadFiles, trainRecordForm },
|
||||
components: { BoxContent, Pagination, uploadFiles, trainRecordForm, historyFileList },
|
||||
props: {
|
||||
viewStatus: {
|
||||
type: Boolean,
|
||||
@@ -509,9 +267,24 @@ export default {
|
||||
upload: null,
|
||||
},
|
||||
DATA: {},
|
||||
|
||||
fileData: {},
|
||||
file_config: {
|
||||
visible: false,
|
||||
title: this.$t('trials:trialDocument:historyFileList:title'),
|
||||
width: '800px',
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openHistory(row) {
|
||||
this.fileData = {
|
||||
Name: row.TrialFileRecord ? row.TrialFileRecord.FileName : '',
|
||||
Id: row.Id,
|
||||
TrialFileTypeId: this.rowData.Id
|
||||
}
|
||||
this.file_config.visible = true
|
||||
},
|
||||
// 新增列表数据
|
||||
async uplaodFile(list) {
|
||||
console.log(list, 'list')
|
||||
@@ -870,7 +643,7 @@ export default {
|
||||
this.DATA = Object.assign({}, this.rowData)
|
||||
},
|
||||
immediate: true,
|
||||
deep:true
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
created() {
|
||||
@@ -918,9 +691,8 @@ export default {
|
||||
])
|
||||
},
|
||||
TITLE() {
|
||||
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)} — ${
|
||||
this.isEN ? this.rowData.Name : this.rowData.NameCN
|
||||
}`
|
||||
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)} — ${this.isEN ? this.rowData.Name : this.rowData.NameCN
|
||||
}`
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -931,21 +703,27 @@ export default {
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.fileName {
|
||||
display: inline-block;
|
||||
max-width: calc(100% - 60px);
|
||||
white-space: nowrap; /* 文本不换行 */
|
||||
overflow: hidden; /* 超出部分隐藏 */
|
||||
white-space: nowrap;
|
||||
/* 文本不换行 */
|
||||
overflow: hidden;
|
||||
/* 超出部分隐藏 */
|
||||
text-overflow: ellipsis;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.fileBtnBox {
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
color: #409eff;
|
||||
margin-right: 3px;
|
||||
|
||||
&:last-child {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -5,45 +5,20 @@
|
||||
<el-form :inline="true">
|
||||
<!-- 中心编号 -->
|
||||
<el-form-item :label="$t('trials:uploadMonitor:table:siteId')">
|
||||
<el-select
|
||||
v-model="searchData.TrialSiteId"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) of siteOptions"
|
||||
:key="index"
|
||||
:label="item.TrialSiteCode"
|
||||
:value="item.TrialSiteId"
|
||||
/>
|
||||
<el-select v-model="searchData.TrialSiteId" clearable filterable style="width: 120px">
|
||||
<el-option v-for="(item, index) of siteOptions" :key="index" :label="item.TrialSiteCode"
|
||||
:value="item.TrialSiteId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 受试者编号 -->
|
||||
<el-form-item :label="$t('trials:uploadMonitor:table:subjectId')">
|
||||
<el-input
|
||||
v-model="searchData.SubjectInfo"
|
||||
style="width: 120px"
|
||||
clearable
|
||||
/>
|
||||
<el-input v-model="searchData.SubjectInfo" style="width: 120px" clearable />
|
||||
</el-form-item>
|
||||
<!-- 访视名称 -->
|
||||
<el-form-item
|
||||
class="my_multiple"
|
||||
:label="$t('trials:uploadMonitor:table:visitName')"
|
||||
>
|
||||
<el-select
|
||||
v-model="searchData.VisitPlanArray"
|
||||
style="width: 140px"
|
||||
clearable
|
||||
multiple
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) of visitPlanOptions"
|
||||
:key="index"
|
||||
:label="item.VisitName"
|
||||
:value="item.VisitNum"
|
||||
>
|
||||
<el-form-item class="my_multiple" :label="$t('trials:uploadMonitor:table:visitName')">
|
||||
<el-select v-model="searchData.VisitPlanArray" style="width: 140px" clearable multiple>
|
||||
<el-option v-for="(item, index) of visitPlanOptions" :key="index" :label="item.VisitName"
|
||||
:value="item.VisitNum">
|
||||
<span style="float: left">{{ item.VisitName }}</span>
|
||||
</el-option>
|
||||
<el-option key="Other" label="Out of Plan" value="1.11" />
|
||||
@@ -54,50 +29,25 @@
|
||||
<el-input v-model="searchData.StudyCode" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:uploadMonitor:table:imageType')">
|
||||
<el-select
|
||||
v-model="searchData.IsDicom"
|
||||
style="width: 120px"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.IsDicom"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:key="`RoleName${item.value}`"
|
||||
/>
|
||||
<el-select v-model="searchData.IsDicom" style="width: 120px" clearable>
|
||||
<el-option v-for="item of $d.IsDicom" :label="item.label" :value="item.value"
|
||||
:key="`RoleName${item.value}`" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:uploadMonitor:table:uploader')">
|
||||
<el-input
|
||||
v-model="searchData.Uploader"
|
||||
style="width: 120px"
|
||||
clearable
|
||||
/>
|
||||
<el-input v-model="searchData.Uploader" style="width: 120px" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:uploadMonitor:table:uploadStatus')">
|
||||
<el-select
|
||||
v-model="searchData.IsSuccess"
|
||||
style="width: 120px"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.YesOrNo"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:key="`RoleName${item.value}`"
|
||||
/>
|
||||
<el-select v-model="searchData.IsSuccess" style="width: 120px" clearable>
|
||||
<el-option v-for="item of $d.YesOrNo" :label="item.label" :value="item.value"
|
||||
:key="`RoleName${item.value}`" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:uploadMonitor:table:uploadTime')">
|
||||
<el-date-picker
|
||||
v-model="datetimerange"
|
||||
type="datetimerange"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
<el-date-picker v-model="datetimerange" type="datetimerange" :default-time="['00:00:00', '23:59:59']"
|
||||
:start-placeholder="$t('trials:loginLog:table:beginTime')"
|
||||
:end-placeholder="$t('trials:loginLog:table:endTime')"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@change="handleDatetimeChange"
|
||||
/>
|
||||
:end-placeholder="$t('trials:loginLog:table:endTime')" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@change="handleDatetimeChange" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<!-- 查询 -->
|
||||
@@ -105,234 +55,119 @@
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<!-- 重置 -->
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
</el-button>
|
||||
<!--导出-->
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-download"
|
||||
@click="handleExport"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-download" @click="handleExport">
|
||||
{{ $t('common:button:export') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<template slot="main-container">
|
||||
<el-table
|
||||
v-adaptive="{ bottomOffset: 60 }"
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
@sort-change="handleSortByColumn"
|
||||
:default-sort="{ prop: 'ArchiveFinishedTime', order: 'descending' }"
|
||||
>
|
||||
<el-table v-adaptive="{ bottomOffset: 60 }" v-loading="loading" :data="list" stripe height="100"
|
||||
@sort-change="handleSortByColumn" :default-sort="{ prop: 'ArchiveFinishedTime', order: 'descending' }">
|
||||
<el-table-column type="index" width="40" align="left" />
|
||||
<!-- 中心编号 -->
|
||||
<el-table-column
|
||||
prop="TrialSiteCode"
|
||||
min-width="100"
|
||||
:label="$t('trials:uploadMonitor:table:siteId')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="TrialSiteCode" min-width="100" :label="$t('trials:uploadMonitor:table:siteId')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- 受试者编号 -->
|
||||
<el-table-column
|
||||
prop="SubjectCode"
|
||||
min-width="130"
|
||||
:label="$t('trials:uploadMonitor:table:subjectId')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="SubjectCode" min-width="130" :label="$t('trials:uploadMonitor:table:subjectId')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- 访视名 -->
|
||||
<el-table-column
|
||||
prop="VisitName"
|
||||
min-width="130"
|
||||
:label="$t('trials:uploadMonitor:table:visitName')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="VisitName" min-width="130" :label="$t('trials:uploadMonitor:table:visitName')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- 检查编号 -->
|
||||
<el-table-column
|
||||
prop="StudyCode"
|
||||
min-width="130"
|
||||
:label="$t('trials:uploadMonitor:table:studyId')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="StudyCode" min-width="130" :label="$t('trials:uploadMonitor:table:studyId')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- 影像类型 -->
|
||||
<el-table-column
|
||||
prop="IsDicom"
|
||||
min-width="130"
|
||||
:label="$t('trials:uploadMonitor:table:imageType')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<el-table-column prop="IsDicom" min-width="130" :label="$t('trials:uploadMonitor:table:imageType')"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('IsDicom', scope.row.IsDicom) }}
|
||||
<el-tag type="primary">{{ $fd('IsDicom', scope.row.IsDicom) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 上传人 -->
|
||||
<el-table-column
|
||||
prop="Uploader"
|
||||
min-width="130"
|
||||
:label="$t('trials:uploadMonitor:table:uploader')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="Uploader" min-width="130" :label="$t('trials:uploadMonitor:table:uploader')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- IP -->
|
||||
<el-table-column
|
||||
prop="IP"
|
||||
min-width="100"
|
||||
:label="$t('trials:uploadMonitor:table:ip')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="IP" min-width="100" :label="$t('trials:uploadMonitor:table:ip')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<!-- 文件数 -->
|
||||
<el-table-column
|
||||
prop="FileCount"
|
||||
min-width="120"
|
||||
:label="$t('trials:uploadMonitor:table:fileCount')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="FileCount" min-width="120" :label="$t('trials:uploadMonitor:table:fileCount')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- 文件大小 -->
|
||||
<el-table-column
|
||||
prop="FileSize"
|
||||
min-width="130"
|
||||
:label="$t('trials:uploadMonitor:table:fileSize')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<el-table-column prop="FileSize" min-width="130" :label="$t('trials:uploadMonitor:table:fileSize')"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ fileSizeFormatter(scope.row.FileSize) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 是否有重复文件 -->
|
||||
<el-table-column
|
||||
prop="IsDicomReUpload"
|
||||
min-width="150"
|
||||
:label="$t('trials:uploadMonitor:table:isRepetition')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<el-table-column prop="IsDicomReUpload" min-width="150" :label="$t('trials:uploadMonitor:table:isRepetition')"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('YesOrNo', scope.row.IsDicomReUpload) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 是否上传成功 -->
|
||||
<el-table-column
|
||||
prop="IsSuccess"
|
||||
min-width="150"
|
||||
:label="$t('trials:uploadMonitor:table:uploadStatus')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<el-table-column prop="IsSuccess" min-width="150" :label="$t('trials:uploadMonitor:table:uploadStatus')"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsSuccess" type="primary">
|
||||
{{ $fd('YesOrNo', scope.row.IsSuccess) }}</el-tag
|
||||
>
|
||||
{{ $fd('YesOrNo', scope.row.IsSuccess) }}</el-tag>
|
||||
<el-tag v-else type="danger">
|
||||
{{ $fd('YesOrNo', scope.row.IsSuccess) }}</el-tag
|
||||
>
|
||||
{{ $fd('YesOrNo', scope.row.IsSuccess) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 开始时间 -->
|
||||
<el-table-column
|
||||
prop="UploadStartTime"
|
||||
min-width="140"
|
||||
:label="$t('trials:uploadMonitor:table:beginTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<el-table-column prop="UploadStartTime" min-width="140" :label="$t('trials:uploadMonitor:table:beginTime')"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.UploadStartTimeStr }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 结束时间 -->
|
||||
<el-table-column
|
||||
prop="ArchiveFinishedTime"
|
||||
min-width="140"
|
||||
:label="$t('trials:uploadMonitor:table:endTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<el-table-column prop="ArchiveFinishedTime" min-width="140" :label="$t('trials:uploadMonitor:table:endTime')"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.ArchiveFinishedTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 总共用时 -->
|
||||
<el-table-column
|
||||
prop="TotalMillisecondsInterval"
|
||||
min-width="100"
|
||||
:label="$t('trials:uploadMonitor:table:totalTime')"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="TotalMillisecondsInterval" min-width="100"
|
||||
:label="$t('trials:uploadMonitor:table:totalTime')" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.TimeInterval }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('common:action:action')"
|
||||
width="80"
|
||||
fixed="right"
|
||||
>
|
||||
<el-table-column :label="$t('common:action:action')" width="80" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<!-- 查看 -->
|
||||
<el-button
|
||||
circle
|
||||
:title="$t('trials:readTask:button:view')"
|
||||
:disabled="!scope.row.RecordPath"
|
||||
icon="el-icon-view"
|
||||
@click="handleLook(scope.row)"
|
||||
/>
|
||||
<el-button circle :title="$t('trials:readTask:button:view')" :disabled="!scope.row.RecordPath"
|
||||
icon="el-icon-view" @click="handleLook(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
|
||||
@pagination="getList" />
|
||||
</template>
|
||||
<el-dialog
|
||||
v-if="lookVisible"
|
||||
:title="$t('trials:uploadMonitor:dagTitle:look')"
|
||||
:visible.sync="lookVisible"
|
||||
width="800px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<el-dialog v-if="lookVisible" :title="$t('trials:uploadMonitor:dagTitle:look')" :visible.sync="lookVisible"
|
||||
width="800px" append-to-body :close-on-click-modal="false" custom-class="base-dialog-wrapper">
|
||||
<div style="max-height: 500px; overflow-y: auto; padding: 0 20px">
|
||||
<div
|
||||
style="
|
||||
<div style="
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-bottom: 20px;
|
||||
"
|
||||
>
|
||||
<span
|
||||
>{{ $t('trials:uploadDicomList:table:FailedNumber') }}:
|
||||
{{ lookText.Failed.length }}</span
|
||||
>
|
||||
<span
|
||||
>{{ $t('trials:uploadDicomList:table:ExistedNumber') }}:
|
||||
{{ lookText.Existed.length }}</span
|
||||
>
|
||||
<span
|
||||
>{{ $t('trials:uploadDicomList:table:UploadedNumber') }}:
|
||||
{{ lookText.Uploaded.length }}</span
|
||||
>
|
||||
">
|
||||
<span>{{ $t('trials:uploadDicomList:table:FailedNumber') }}:
|
||||
{{ lookText.Failed.length }}</span>
|
||||
<span>{{ $t('trials:uploadDicomList:table:ExistedNumber') }}:
|
||||
{{ lookText.Existed.length }}</span>
|
||||
<span>{{ $t('trials:uploadDicomList:table:UploadedNumber') }}:
|
||||
{{ lookText.Uploaded.length }}</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px; font-size: 12px">
|
||||
<div style="font-size: 14px; margin-bottom: 5px">
|
||||
@@ -379,6 +214,7 @@ import { getStudyUploadMonitor_Export } from '@/api/export'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import BaseContainer from '@/components/BaseContainer'
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
import { changeURLStatic } from '@/utils/history.js'
|
||||
import axios from 'axios'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
@@ -421,10 +257,26 @@ export default {
|
||||
if (this.$route.query.studyCode) {
|
||||
this.searchData.StudyCode = this.$route.query.studyCode
|
||||
}
|
||||
if (this.$route.query.siteId) {
|
||||
this.searchData.TrialSiteId = this.$route.query.siteId
|
||||
}
|
||||
if (this.$route.query.subjectCode) {
|
||||
this.searchData.SubjectInfo = this.$route.query.subjectCode
|
||||
}
|
||||
if (this.$route.query.visitNum || this.$route.query.visitNum === 0) {
|
||||
this.searchData.VisitPlanArray = [Number(this.$route.query.visitNum)]
|
||||
}
|
||||
this.getList()
|
||||
this.getVisitPlanOptions()
|
||||
this.clearnUrl()
|
||||
},
|
||||
methods: {
|
||||
clearnUrl() {
|
||||
changeURLStatic('siteId', '')
|
||||
changeURLStatic('subjectCode', '')
|
||||
changeURLStatic('visitNum', '')
|
||||
|
||||
},
|
||||
async handleLook(row) {
|
||||
this.lookVisible = true
|
||||
var htmlUrl = this.OSSclientConfig.basePath + row.RecordPath
|
||||
@@ -482,8 +334,8 @@ export default {
|
||||
},
|
||||
handleExport() {
|
||||
getStudyUploadMonitor_Export(this.searchData)
|
||||
.then((res) => {})
|
||||
.catch(() => {})
|
||||
.then((res) => { })
|
||||
.catch(() => { })
|
||||
},
|
||||
handleDatetimeChange(val) {
|
||||
if (val) {
|
||||
|
||||
@@ -952,19 +952,19 @@ export default {
|
||||
) {
|
||||
++instanceIndex
|
||||
}
|
||||
// if (instanceIndex >= fileList.length) {
|
||||
// fileList.push({
|
||||
// instanceUid: instanceUid,
|
||||
// file: file,
|
||||
// })
|
||||
// }
|
||||
// scope.uploadQueues[studyIndex].dicomInfo.fileCount = fileList.length
|
||||
// scope.uploadQueues[studyIndex].dicomInfo.fileSize = fileList.reduce(
|
||||
// (prev, next) => {
|
||||
// return prev + next.file.size
|
||||
// },
|
||||
// 0
|
||||
// )
|
||||
if (instanceIndex >= fileList.length) {
|
||||
fileList.push({
|
||||
instanceUid: instanceUid,
|
||||
file: file,
|
||||
})
|
||||
}
|
||||
scope.uploadQueues[studyIndex].dicomInfo.fileCount = fileList.length
|
||||
scope.uploadQueues[studyIndex].dicomInfo.fileSize = fileList.reduce(
|
||||
(prev, next) => {
|
||||
return prev + next.file.size
|
||||
},
|
||||
0
|
||||
)
|
||||
|
||||
var seriesUid = data.string('x0020000e')
|
||||
var seriesList = scope.uploadQueues[studyIndex].seriesList
|
||||
@@ -1065,19 +1065,6 @@ export default {
|
||||
}
|
||||
instanceList.push(instanceItem)
|
||||
}
|
||||
if (instanceIndex >= fileList.length) {
|
||||
fileList.push({
|
||||
instanceUid: instanceUid,
|
||||
file: file,
|
||||
})
|
||||
}
|
||||
scope.uploadQueues[studyIndex].dicomInfo.fileCount = fileList.length
|
||||
scope.uploadQueues[studyIndex].dicomInfo.fileSize = fileList.reduce(
|
||||
(prev, next) => {
|
||||
return prev + next.file.size
|
||||
},
|
||||
0
|
||||
)
|
||||
resolve()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user