1 Commits

Author SHA1 Message Date
wangxiaoshuang 65e4192312 初始化 2026-07-13 12:59:14 +08:00
76 changed files with 1510 additions and 5348 deletions
-10
View File
@@ -57,7 +57,6 @@
"sortablejs": "^1.15.5",
"streamsaver": "^2.0.6",
"svgo": "^1.2.2",
"unzipit": "^2.0.3",
"v-viewer": "^1.7.4",
"vcrontab": "^0.3.5",
"vue": "2.7.16",
@@ -21836,15 +21835,6 @@
"node": ">=0.10.0"
}
},
"node_modules/unzipit": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/unzipit/-/unzipit-2.0.3.tgz",
"integrity": "sha512-e6+ftgSQRj9Hwf2mIWFwYIGqBoKV7AziG/d7pep2Uv3NCzHbhLO5d9dGRwpahVlnpQ7aQC+5kWk72dnWocdYyA==",
"license": "MIT",
"engines": {
"node": ">=18"
}
},
"node_modules/unzipper": {
"version": "0.10.14",
"resolved": "https://registry.npmmirror.com/unzipper/-/unzipper-0.10.14.tgz",
-1
View File
@@ -63,7 +63,6 @@
"sortablejs": "^1.15.5",
"streamsaver": "^2.0.6",
"svgo": "^1.2.2",
"unzipit": "^2.0.3",
"v-viewer": "^1.7.4",
"vcrontab": "^0.3.5",
"vue": "2.7.16",
Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

+1 -2
View File
@@ -98,7 +98,6 @@ import timeTag from '@/components/timeTag'
import Vue from 'vue'
import i18n from './lang'
import DicomEvent from '@/views/trials/trials-panel/reading/dicoms/components/DicomEvent'
import WHITELIST from "./utils/whiteList"
export default {
name: 'App',
components: {
@@ -157,7 +156,7 @@ export default {
// },
methods: {
getIsLock() {
if (zzSessionStorage.getItem('isLock') === 'true' && !WHITELIST.includes(this.$route.path)) {
if (zzSessionStorage.getItem('isLock') === 'true') {
this.isLock = true
} else {
this.isLock = false
-27
View File
@@ -316,30 +316,3 @@ export function GetReadingMedicineSystemQuestionList_Export(data) {
data
})
}
// 导出中心调研
export function getTrialSiteSurveyList_Export(data) {
return requestDownload({
url: `/ExcelExport/getTrialSiteSurveyList_Export`,
responseType: 'blob',
method: 'post',
data
})
}
// 导出中心设备
export function getSiteSurveyEquipmentList_Export(data) {
return requestDownload({
url: `/ExcelExport/getSiteSurveyEquipmentList_Export`,
responseType: 'blob',
method: 'post',
data
})
}
// 导出中心调研基本信息
export function getSiteSurveyInfoList_Export(data) {
return requestDownload({
url: `/ExcelExport/getSiteSurveyInfoList_Export`,
responseType: 'blob',
method: 'post',
data
})
}
+2 -2
View File
@@ -81,11 +81,11 @@ export function verifyIRStudyAllowUpload(data) {
})
}
// 影像下载成功确认
export function downloadImageSuccess(data) {
export function downloadImageSuccess(params) {
return request({
url: '/DownloadAndUpload/downloadImageSuccess',
method: 'post',
data
params
})
}
// 影像下载记录列表
+1 -24
View File
@@ -213,14 +213,6 @@ export function getIVUSTemplate(param) {
data: param
})
}
export function getIVUSTemplatesZip(param) {
return requestDownload({
url: '/IVUSCalculate/getIVUSTemplatesZip',
method: 'post',
responseType: 'blob',
data: param
})
}
export function uploadIVUSTemplate(param) {
return request({
url: `/IVUSCalculate/uploadIVUSTemplate`,
@@ -237,14 +229,7 @@ export function getOCTFCTTemplate(param) {
data: param
})
}
export function getOCTFCTTemplatesZip(param) {
return requestDownload({
url: '/OCTCalculate/getOCTFCTTemplatesZip',
method: 'post',
responseType: 'blob',
data: param
})
}
export function uploadOCTFCTTemplate(param) {
return request({
url: `/OCTCalculate/uploadOCTFCTTemplate`,
@@ -495,11 +480,3 @@ export function getNoneDicomMarkList(data) {
data
})
}
export function getFilterTableQuestion(data) {
return request({
url: `/ReadingImageTask/getFilterTableQuestion`,
method: 'post',
data
})
}
-28
View File
@@ -129,31 +129,3 @@ export function getUserTypeList(userTypeEnum) {
method: 'get'
})
}
export function getSiteSurveyLogList(param) {
return request({
url: `/TrialSiteSurvey/getSiteSurveyLogList`,
method: 'post',
data: param
})
}
export function getTrialIsSPMJoin(trialId) {
return request({
url: `/TrialSiteSurvey/getTrialIsSPMJoin?trialId=${trialId}`,
method: 'get'
})
}
export function getSiteSurveyEquipmentList(param) {
return request({
url: `/TrialSiteSurvey/getSiteSurveyEquipmentList`,
method: 'post',
data: param
})
}
export function getSiteSurveyInfoList(param) {
return request({
url: `/TrialSiteSurvey/getSiteSurveyInfoList`,
method: 'post',
data: param
})
}
-64
View File
@@ -488,67 +488,3 @@ export function setRandomTaskOrder(data) {
data
})
}
export function getJudgeForm(data) {
return request({
url: `/ReadingImageTask/getJudgeForm`,
method: 'post',
data
})
}
export function setJudgeForm(data) {
return request({
url: `/ReadingImageTask/setJudgeForm`,
method: 'post',
data
})
}
export function getSingleVisitJudgeAnswer(data) {
return request({
url: `/ReadingImageTask/getSingleVisitJudgeAnswer`,
method: 'post',
data
})
}
export function submitJudgeForm(data) {
return request({
url: `/Inspection/ReadingImageTask/SubmitJudgeForm`,
method: 'post',
data
})
}
export function getTrialQuestionVisitJudgeRule(data) {
return request({
url: `/ReadingQuestion/getTrialQuestionVisitJudgeRule`,
method: 'post',
data
})
}
export function setTrialQuestionVisitJudgeRule(data) {
return request({
url: `/ReadingQuestion/setTrialQuestionVisitJudgeRule`,
method: 'post',
data
})
}
export function copyTrialQuestionVisitJudgeRule(data) {
return request({
url: `/ReadingQuestion/copyTrialQuestionVisitJudgeRule`,
method: 'post',
data
})
}
export function applyBaseLineTrialQuestionVisitJudgeRule(data) {
return request({
url: `/ReadingQuestion/applyBaseLineTrialQuestionVisitJudgeRule`,
method: 'post',
data
})
}
-8
View File
@@ -94,14 +94,6 @@ export function getTrialJudgyInfo(params) {
data: params
})
}
export function setTrialJudgeRuleInfo(params) {
return request({
url: `/ReadingQuestion/setTrialJudgeRuleInfo`,
method: 'post',
data: params
})
}
// 获取检查部位列表
export function getTrialBodyPartList(params) {
return request({
Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 KiB

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 KiB

After

Width:  |  Height:  |  Size: 353 KiB

@@ -24,7 +24,7 @@
</div>
<!--上传列表@selection-change="handleSelectionChange" @sort-change="handleSortByColumn"-->
<el-table ref="dicomFilesTable" v-adaptive="{ bottomOffset: 85 }" height="100" :data="list" :loading="loading"
class="dicomFiles-table" :default-sort="{ prop: 'TaskBlindName', order: 'ascending' }">
class="dicomFiles-table" :default-sort="{ prop: 'TaskBlindName', order: 'descending' }">
<!-- <el-table-column
type="selection"
width="55"
@@ -32,8 +32,8 @@
/> -->
<el-table-column type="index" width="40" />
<!--受试者-->
<el-table-column :label="$t('download:table:subjectCode')" prop="SubjectCode" show-overflow-tooltip
v-if="isReadingTaskViewInOrder !== 0 || IsImageSegment" />
<el-table-column :label="$t('download:table:subjectCode')" min-width="130" prop="SubjectCode"
show-overflow-tooltip v-if="isReadingTaskViewInOrder !== 0" />
<!--访视名称-->
<el-table-column prop="VisitName" :label="$t('download:table:VisitName')" sortable v-if="IsImageSegment" />
<!--任务名称-->
@@ -67,8 +67,8 @@
</el-table-column>
<el-table-column :label="$t('common:action:action')" fixed="right" width="150">
<template slot-scope="scope">
<!--预览:disabled="forbid"--->
<el-button circle icon="el-icon-view" :title="$t('download:button:preview')"
<!--预览--->
<el-button circle icon="el-icon-view" :title="$t('download:button:preview')" :disabled="forbid"
@click.stop="preview(scope.row)" />
<!--下载--->
<el-button circle icon="el-icon-download" :title="$t('download:button:download')"
@@ -141,10 +141,6 @@ export default {
type: Number,
default: 2,
},
isReading: {
type: Boolean,
default: false,
}
},
data() {
return {
@@ -297,7 +293,7 @@ export default {
if (res.IsSuccess) {
this.downloadId = res.OtherInfo.PreDownloadId
this.IsReadingTaskViewInOrder = res.OtherInfo.IsReadingTaskViewInOrder
this.downloadImage(res.Result, data.SubjectVisitTaskList)
this.downloadImage(res.Result)
}
} catch (err) {
this.btnLoading = false
@@ -305,12 +301,12 @@ export default {
}
},
// 打包下载
async downloadImage(data, params) {
async downloadImage(data) {
try {
let { files, name, fileType } = this.formatDownloadFile(data)
let res = await downLoadFile(files, name, 'zip')
if (res && this.downloadId) {
this.downloadImageSuccess(params)
this.downloadImageSuccess()
}
} catch (err) {
console.log(err)
@@ -336,14 +332,6 @@ export default {
if (data.StudyList && data.StudyList.length > 0) {
let StudyList = data.StudyList
StudyList.forEach((study) => {
let arr = []
study.SeriesList.forEach(item => {
if (!arr.includes(item.Modality)) {
arr.push(item.Modality)
}
})
let str = arr.join('_')
let time = study.StudyTime.split(' ')[0]
if (study.StudyDIRPath) {
let obj = {
name: `${data.SubjectCode}/${data.TaskBlindName
@@ -355,7 +343,7 @@ export default {
obj = {
name: `${data.SubjectCode}/${data.VisitName
}/${this.$fd('IsDicom', true)}/${study.StudyCode
}_${time}_${str}/DICOMDIR`,
}/DICOMDIR`,
url: this.OSSclientConfig.basePath + study.StudyDIRPath,
}
} else if (this.IsReadingTaskViewInOrder === 0) {
@@ -388,7 +376,7 @@ export default {
obj = {
name: `${data.SubjectCode}/${data.VisitName
}/${this.$fd('IsDicom', true)}/${study.StudyCode
}_${time}_${str}/IMAGE/${fileName}`,
}/IMAGE/${fileName}`,
url: this.OSSclientConfig.basePath + instance.Path,
IsEncapsulated: instance.IsEncapsulated
}
@@ -449,14 +437,11 @@ export default {
return { files, name }
},
// 影像下载成功确认
async downloadImageSuccess(data) {
async downloadImageSuccess() {
try {
let params = {
TrialImageDownloadId: this.downloadId,
}
if (this.isReading) {
params.VisitTaskIdList = data.map(item => item.TaskId)
}
await downloadImageSuccess(params)
} catch (err) {
console.log(err)
@@ -8,11 +8,10 @@
</div>
</div>
<!--检查列表-->
<el-table :data="list" style="width: 100%" height="300" :loading="loading"
:default-sort="{ prop: 'TaskBlindName', order: 'ascending' }">
<el-table :data="list" style="width: 100%" height="300" :loading="loading">
<!--受试者-->
<el-table-column prop="SubjectCode" :label="$t('upload:dicom:table:subjectCode')" sortable
v-if="isReadingTaskViewInOrder !== 0 || IsImageSegment" />
v-if="isReadingTaskViewInOrder !== 0" />
<!--访视名称-->
<el-table-column prop="VisitName" :label="$t('download:table:VisitName')" v-if="IsImageSegment" sortable />
<!--任务名称-->
@@ -44,10 +43,7 @@
<template slot-scope="scope">
<div class="btnBox">
<!--上传--->
<form id="inputForm" :ref="`uploadForm_${scope.row.Id}`" enctype="multipart/form-data" v-if="hasPermi(['role:ir']) && !forbid && (!isReading || scope.row.IsIRImageDownloaded || (!scope.row.IsIRImageDownloaded && Criterion && Criterion.CriterionType &&
Criterion.CriterionType != 19 &&
Criterion.CriterionType != 20
)) && scope.row.ReadingTaskState < 2">
<form id="inputForm" :ref="`uploadForm_${scope.row.Id}`" enctype="multipart/form-data" v-if="!forbid">
<div class="form-group" style="margin-right: 10px">
<div :id="`directoryInputWrapper_${scope.row.Id}`" class="btn btn-link file-input">
<el-button circle icon="el-icon-upload2" :disabled="btnLoading" :loading="btnLoading"
@@ -67,8 +63,7 @@
<el-button circle :disabled="!scope.row.UploadStudyList ||
scope.row.UploadStudyList.length <= 0 ||
scope.row.ReadingTaskState === 2
" v-if="hasPermi(['role:ir'])" icon="el-icon-delete" :title="$t('upload:dicom:button:delete')"
@click.stop="remove(scope.row)" />
" icon="el-icon-delete" :title="$t('upload:dicom:button:delete')" @click.stop="remove(scope.row)" />
</div>
</template>
</el-table-column>
@@ -77,7 +72,7 @@
<span>{{ $t('upload:dicom:uploadTitle') }}</span>
<div class="btnBox" v-if="!forbid">
<span style="margin-right: 10px">{{ $store.state.trials.uploadTip }}</span>
<form id="inputForm" ref="uploadForm" enctype="multipart/form-data" v-if="!isReading">
<form id="inputForm" ref="uploadForm" enctype="multipart/form-data">
<div class="form-group">
<div id="directoryInputWrapper" class="btn btn-link file-input">
<el-button type="primary" :disabled="btnLoading" :loading="btnLoading" size="mini">{{
@@ -384,10 +379,6 @@ export default {
type: Boolean,
default: false,
},
isReading: {
type: Boolean,
default: false,
}
},
components: {
'study-view': studyView,
@@ -437,8 +428,7 @@ export default {
openSubjectVisitId: null,
openVisitTaskId: null,
TrialModality: [],
IsReadingTaskViewInOrder: 2,
isDownloaded: false
IsReadingTaskViewInOrder: 2
}
},
async mounted() {
@@ -481,10 +471,6 @@ export default {
let res = await getSubjectImageUploadList(params)
this.loading = false
if (res.IsSuccess) {
this.isDownloaded = this.Criterion && this.Criterion.CriterionType && (
this.Criterion.CriterionType == 19 ||
this.Criterion.CriterionType == 20
) ? res.OtherInfo.IsIRImageDownloaded : true
this.TrialModality = res.OtherInfo.TrialModality.split('|')
this.IsReadingTaskViewInOrder = res.OtherInfo.IsReadingTaskViewInOrder || res.OtherInfo.IsReadingTaskViewInOrder === 0 ? res.OtherInfo.IsReadingTaskViewInOrder : 2
this.StudyInstanceUidList = []
@@ -3,16 +3,15 @@
:append-to-body="true" class="uploadDicomAndNonedicom">
<span slot="title">{{ title }}</span>
<el-tabs type="border-card" v-model="activeName">
<el-tab-pane :label="$t('uploadDicomAndNonedicom:label:dicom')" name="dicom" v-if="!IsImageSegment">
<el-tab-pane :label="$t('uploadDicomAndNonedicom:label:dicom')" name="dicom">
<dicomFile v-if="activeName === 'dicom'" :SubjectId="SubjectId" :SubjectCode="SubjectCode"
:Criterion="Criterion" :TaskId="VisitTaskId" :isUpload.sync="isUpload"
:isReadingTaskViewInOrder="isReadingTaskViewInOrder" :IsImageSegment="IsImageSegment" :forbid="forbid"
:isReading="isReading" />
:isReadingTaskViewInOrder="isReadingTaskViewInOrder" :IsImageSegment="IsImageSegment" :forbid="forbid" />
</el-tab-pane>
<el-tab-pane :label="$t('uploadDicomAndNonedicom:label:nonedicom')" name="nonedicom">
<nonedicomFile v-if="activeName === 'nonedicom'" :SubjectId="SubjectId" :SubjectCode="SubjectCode"
:Criterion="Criterion" :VisitTaskId="VisitTaskId" :isUpload.sync="isUpload" :IsImageSegment="IsImageSegment"
:isReadingTaskViewInOrder="isReadingTaskViewInOrder" :forbid="forbid" :isReading="isReading" />
:isReadingTaskViewInOrder="isReadingTaskViewInOrder" :forbid="forbid" />
</el-tab-pane>
</el-tabs>
</el-dialog>
@@ -59,10 +58,6 @@ export default {
IsImageSegment: {
type: Boolean,
default: false,
},
isReading: {
type: Boolean,
default: false,
}
},
data() {
@@ -72,16 +67,10 @@ export default {
isUpload: false,
}
},
watch: {
IsImageSegment() {
if (this.IsImageSegment) this.activeName = 'nonedicom'
}
},
mounted() {
this.title = `Upload Images${this.SubjectCode}${this.Criterion.TrialReadingCriterionName}`
if (this.IsImageSegment) this.title = `Upload Images${this.SubjectCode}`
if (this.isReadingTaskViewInOrder === 0) this.title = ''
if (this.IsImageSegment) this.activeName = 'nonedicom'
store.dispatch('trials/setUnLock', true)
},
methods: {
@@ -12,10 +12,10 @@
</div>
<!--检查列表 @sort-change="handleSortByColumn"-->
<el-table :data="list" style="width: 100%" v-adaptive="{ bottomOffset: 60 }" :loading="loading"
:default-sort="{ prop: 'TaskBlindName', order: 'ascending' }">
:default-sort="{ prop: 'TaskBlindName', order: 'descending' }">
<!--受试者 sortable="custom"-->
<el-table-column prop="SubjectCode" :label="$t('upload:nonedicom:table:subject')"
v-if="isReadingTaskViewInOrder !== 0 || IsImageSegment" />
v-if="isReadingTaskViewInOrder !== 0" />
<!--访视名称-->
<el-table-column prop="VisitName" :label="$t('upload:nonedicom:table:VisitName')" sortable
v-if="IsImageSegment" />
@@ -110,16 +110,12 @@
<el-button circle :disabled="scope.row.UploadedFileCount <= 0" icon="el-icon-view"
:title="$t('upload:nonedicom:button:preview')" @click.stop="handlePreviewNoneDicomFiles(scope.row)" />
<!--上传--->
<el-button circle icon="el-icon-upload2" :title="$t('upload:nonedicom:button:upload')" v-if="hasPermi(['role:ir']) && !forbid && (!isReading || scope.row.IsIRImageDownloaded || (!scope.row.IsIRImageDownloaded && Criterion && Criterion.CriterionType &&
Criterion.CriterionType != 19 &&
Criterion.CriterionType != 20
)) && scope.row.ReadingTaskState < 2" @click.native.prevent="handleUpload(scope.row)" />
<!-- <el-button circle icon="el-icon-upload2" :title="$t('upload:nonedicom:button:upload')"
@click.native.prevent="handleUpload(scope.row)" /> -->
<el-button circle icon="el-icon-upload2" :title="$t('upload:nonedicom:button:upload')" v-if="!forbid"
@click.native.prevent="handleUpload(scope.row)" />
<!--删除--->
<el-button :disabled="scope.row.UploadedFileCount <= 0 ||
scope.row.ReadingTaskState === 2
" v-if="hasPermi(['role:ir'])" circle icon="el-icon-delete" :title="$t('upload:nonedicom:button:delete')"
" circle icon="el-icon-delete" :title="$t('upload:nonedicom:button:delete')"
@click.stop="remove(scope.row)" />
</template>
</el-table-column>
@@ -228,7 +224,6 @@ import {
import { preArchiveStudy, uploadNoneDicomFile } from '@/api/trials'
import store from '@/store'
import { getToken } from '@/utils/auth'
import { unzipRaw } from 'unzipit';
let defaultSearchData = () => {
return {
SubjectId: null,
@@ -275,10 +270,6 @@ export default {
type: Number,
default: 0,
},
isReading: {
type: Boolean,
default: false,
}
},
data() {
return {
@@ -300,8 +291,7 @@ export default {
BodyPart: {},
relationInfo: {
ImageFormatList: []
},
isDownloaded: false
}
}
},
watch: {
@@ -337,34 +327,6 @@ export default {
store.dispatch('trials/setUnLock', false)
},
methods: {
async readZipFileListRaw(zipFile) {
try {
// 1. 使用 unzipRaw 读取原始条目列表
const { entries } = await unzipRaw(zipFile);
// 2. entries 是一个数组,需要手动处理
const fileList = entries.map(entry => {
// 3. 使用 TextDecoder 指定编码来解码文件名
// 例如,对于简体中文 ZIP 包,可以使用 'gbk'
const decoder = new TextDecoder('gbk'); // 或者 'big5'
const name = decoder.decode(entry.nameBytes);
return {
path: name,
name: name.split('/').pop(),
isDirectory: entry.isDirectory,
size: entry.size,
lastModified: entry.lastModDate
};
});
console.log('解码后的文件列表:', fileList);
return fileList;
} catch (error) {
console.error('读取 ZIP 失败:', error);
throw error;
}
},
async getList() {
try {
this.searchData.SubjectId = this.SubjectId
@@ -386,10 +348,6 @@ export default {
if (res.IsSuccess) {
this.list = res.Result
this.relationInfo = res.OtherInfo
this.isDownloaded = this.Criterion && this.Criterion.CriterionType && (
this.Criterion.CriterionType == 19 ||
this.Criterion.CriterionType == 20
) ? res.OtherInfo.IsIRImageDownloaded : true
this.faccept = []
this.relationInfo.ImageFormatList.forEach((item) => {
this.faccept.push(`.${item}`)
@@ -401,17 +359,13 @@ export default {
}
},
// 扫描待上传文件
async beginScanFiles(e) {
beginScanFiles(e) {
var files = [...e.target.files]
var sameFiles = [], zipFiles = [], f = false
var sameFiles = []
files.forEach((file) => {
var extendName = file.name
.substring(file.name.lastIndexOf('.'))
.toLocaleLowerCase()
if (extendName === '.zip' && this.IsImageSegment) {
if (file.name.indexOf(this.$t("trials:uploadNonDicoms:checkValue:SelectionPeriod")) > -1 || file.name.indexOf("trials:uploadNonDicoms:checkValue:researchOver") > -1) f = true
zipFiles.push(file)
}
if (
this.faccept.indexOf(extendName) !== -1 &&
this.fileList.findIndex((v) => v.name === file.name) > -1
@@ -419,18 +373,6 @@ export default {
sameFiles.push(file.name)
}
})
if (zipFiles.length > 0) {
for (let i = 0; i < zipFiles.length; i++) {
let file = zipFiles[i]
let list = await this.readZipFileListRaw(file)
if (!f) f = list.some(i => i.path.indexOf(this.$t("trials:uploadNonDicoms:checkValue:SelectionPeriod")) > -1 || i.path.indexOf(this.$t("trials:uploadNonDicoms:checkValue:researchOver")) > -1)
list = null
if (f) break
}
}
if (f) return this.$confirm(this.$t("trials:uploadNonDicoms:confirm:zipNameNonCompliant"), '', {
type: "warning"
})
var scope = this
if (sameFiles.length > 0) {
const h = this.$createElement
@@ -690,8 +632,8 @@ export default {
},
(percentage, checkpoint, lastPer) => {
item.uploadFileSize += checkpoint.size * (percentage - lastPer)
if (item.uploadFileSize > file.size) {
item.uploadFileSize = file.size > 0 ? file.size : 1
if (item.uploadFileSize > file.fileSize) {
item.uploadFileSize = file.fileSize > 0 ? file.fileSize : 1
}
},
{
-1
View File
@@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1787639576282" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5836" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M511.974687 0.000434A511.992298 511.992298 0 1 1 0.00047 511.992732 511.30523 511.30523 0 0 1 511.974687 0.000434z m93.350858 188.979888l-87.366133 153.053459-295.168071 0.090404c-28.567568 0-51.728995 19.147503-51.728995 42.760949s23.161427 42.760949 51.728995 42.760948h246.331994l-93.911361 164.643213h-152.420633c-28.567568 0-51.728995 19.147503-51.728995 42.760949s23.125266 42.79711 51.728995 42.79711h103.584556l-39.416012 69.19499a34.498051 34.498051 0 1 0 59.919571 34.172597l58.852806-103.385668h395.027995c28.567568 0 51.728995-19.147503 51.728995-42.760948s-23.161427-42.760949-51.728995-42.760949H454.58642l93.983684-164.661294h252.190153c28.567568 0 51.728995-19.147503 51.728995-42.760948s-23.161427-42.760949-51.728995-42.760949l-203.372157-0.090404 67.893176-118.862781a34.485394 34.485394 0 1 0-59.901489-34.190678z" fill="#1296db" p-id="5837"></path></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

+2 -7
View File
@@ -92,13 +92,8 @@ router.beforeEach(async (to, from, next) => {
await store.dispatch('user/getUserInfo')
const accessRoutes = await store.dispatch('permission/generateRoutes')
resetRouter()
if (accessRoutes.length > 0) {
router.addRoutes(accessRoutes)
next({ ...to, replace: true })
} else {
next()
}
router.addRoutes(accessRoutes)
next({ ...to, replace: true })
} catch (error) {
console.log(error)
// 删除token并进入登录页面以重新登录
-11
View File
@@ -149,11 +149,6 @@ export const constantRoutes = [
hidden: true,
component: () => import('@/views/trials/trials-panel/reading/dicoms/none-dicoms')
},
{
path: '/ecrfList',
hidden: true,
component: () => import('@/views/trials/trials-panel/reading/dicoms/components/TableList')
},
{
path: '/readingPage',
name: 'readingPage',
@@ -228,12 +223,6 @@ export const constantRoutes = [
component: () => import('@/views/research/form'),
hidden: true
},
{
path: '/researchLog',
name: 'researchLog',
component: () => import('@/views/research/form'),
hidden: true
},
{
path: '/researchLogin_m',
name: 'researchLogin_m',
+1 -1
View File
@@ -1,7 +1,7 @@
// eslint-disable-next-line no-undef
module.exports = {
title: 'EIC lmaging Trial Management System',
title: 'HASC lmaging Trial Management System',
/**
* @type {boolean} true | false
+1 -1
View File
@@ -1,6 +1,6 @@
import defaultSettings from '@/settings'
const title = defaultSettings.title || 'EIC lmaging Trial Management System'
const title = defaultSettings.title || 'HASC lmaging Trial Management System'
export default function getPageTitle(pageTitle) {
if (pageTitle) {
-3
View File
@@ -118,9 +118,6 @@ service.interceptors.response.use(
if (res.IsSuccess) {
return Promise.resolve(res)
} else if (res.IsSuccess === false) {
if (res.Code === -4) {
return Promise.resolve(res)
}
if (res.Code !== 5) {
MessageBox.confirm(res.ErrorMessage, {
type: 'warning',
+3 -9
View File
@@ -11,10 +11,10 @@ function zipFiles(zipName, files) {
store.dispatch('trials/setUnLock', true)
files = formatFiles(files)
// 创建压缩文件输出流
let zipFileOutputStream = streamSaver.createWriteStream(zipName);
const zipFileOutputStream = streamSaver.createWriteStream(zipName);
// 创建下载文件流
const fileIterator = files.values();
let readableZipStream = new ZIP({
const readableZipStream = new ZIP({
async pull(ctrl) {
const fileInfo = fileIterator.next();
if (fileInfo.done) {//迭代终止
@@ -41,13 +41,9 @@ function zipFiles(zipName, files) {
.then(() => {
console.log("同步下载打包结束时间:" + new Date());
store.dispatch('trials/setUnLock', false)
readableZipStream = null;
zipFileOutputStream = null;
resolve(true)
}).catch(err => {
console.log(err);
readableZipStream = null;
zipFileOutputStream = null;
resolve(false)
});
} else {
@@ -65,16 +61,14 @@ async function updateFile(file, name) {
return new Promise(async resolve => {
try {
store.dispatch('trials/setUnLock', true)
let fileOutputStream = streamSaver.createWriteStream(name);
const fileOutputStream = streamSaver.createWriteStream(name);
// file = decodeUtf8(file);
let res = await fetch(file);
res.body.pipeTo(fileOutputStream).then(() => {
store.dispatch('trials/setUnLock', true)
fileOutputStream = null;
resolve(true)
}).catch(err => {
console.log(err)
fileOutputStream = null;
resolve(false)
});
} catch (err) {
+1 -1
View File
@@ -1,2 +1,2 @@
const WHITELIST = ['/', "/curriculumVitae", 'researchDetail_m', '/researchForm', '/ReviewersResearch', '/login', '/link_expired', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/researchLogin_m', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms', '/ecrfList', '/researchLog']
const WHITELIST = ['/', "/curriculumVitae", 'researchDetail_m', '/researchForm', '/ReviewersResearch', '/login', '/link_expired', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/researchLogin_m', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms']
export default WHITELIST
+1 -1
View File
@@ -2,7 +2,7 @@
<div class="dashboard">
<div class="dashboard-header">
<h1>
<a href="#" @click="handleTitleClick">GRR Real-Time IRC Information</a>
<a href="#" @click="handleTitleClick">GRR Real-Time HASC Information</a>
</h1>
<div>
+1 -1
View File
@@ -1,7 +1,7 @@
<template>
<div class="dashboard">
<div class="dashboard-header">
<h1>Extimaging Real-Time IRC Information</h1>
<!-- <h1>Extimaging Real-Time HASC Information</h1> -->
<div>
<span>{{ currentTime }}</span>
</div>
+13 -14
View File
@@ -5,28 +5,27 @@
</div>
<div class="login-body">
<div class="login-l">
<div class="login-logo">
<!-- <div class="login-logo">
<img v-if="language === 'zh'" src="@/assets/zzlogo2.png" alt="" />
<img v-else-if="NODE_ENV === 'usa'" src="@/assets/zzlogo-usa.png" alt="" class="usa-logo" />
<img v-else src="@/assets/zzlogo4.png" alt="" />
</div>
<img v-else src="@/assets/zzlogo2.png" alt="" />
</div> -->
<div :class="{
'login-image': true,
'login-image-usa': true,
}">
<svg-icon icon-class="login-bg" style="width: 90%; height: 90%" />
<!-- <img src="@/assets/login-bg.png" v-else /> -->
<!-- <svg-icon icon-class="login-bg" style="width: 90%; height: 90%" /> -->
<img src="@/assets/login-bg.png" style=" height: 80%" />
</div>
</div>
<div class="login-r">
<div class="title-container">
<!-- IRC Management System -->
<!-- HASC Management System -->
<div v-if="NODE_ENV === 'usa'">
<svg-icon icon-class="login-logo" style="width: 300px; height: 94px" />
</div>
<div class="title" v-else>
<img src="@/assets/system.png" alt=""
:style="{ width: isEN ? '180px' : '200px', height: isEN ? '60px' : '65px' }" />
<img src="@/assets/system.png" alt="" :style="{ height: isEN ? '50px' : '55px' }" />
<div :style="`font-size:${isEN ? '28px' : '35px'}`">{{ $t('login:title:system') }}</div>
</div>
</div>
@@ -111,17 +110,17 @@
</div>
</div>
<div v-if="language === 'zh'" class="login-footer">
<span>Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司
<span>Copyright © {{ new Date().getFullYear() }} 上海禾安枢信息科技有限公司
版权所有</span>
<span> | </span>
<a target="_blank" href="https://beian.miit.gov.cn/">
<!-- <a target="_blank" href="https://beian.miit.gov.cn/">
<span> 沪ICP备2021037850-2 </span>
</a>
<span> | </span>
<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31011002005859">
<img src="@/assets/filing.png" />
<span>沪公网安备 31011002005859号</span>
</a>
</a> -->
<a @click="openAbout">
<span style="color: #428bca">关于</span>
</a>
@@ -162,16 +161,16 @@
V{{ $version.IsEnv_US ? $version.Version_US : $version.Version }}
</p>
<p style="margin-bottom: 20px" v-if="language === 'zh'">
Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司
Copyright © {{ new Date().getFullYear() }} 上海禾安枢信息科技有限公司
版权所有
</p>
<p style="margin-bottom: 20px" v-else-if="NODE_ENV === 'usa'">
© {{ new Date().getFullYear() }} Elevate Imaging Inc.
</p>
<p style="margin-bottom: 20px" v-else>
<!-- <p style="margin-bottom: 20px" v-else>
Copyright © {{ new Date().getFullYear() }} Shanghai Extensive Imaging
Inc.
</p>
</p> -->
<!-- <div style="margin-bottom: 20px" v-if="NODE_ENV === 'usa'">
<img style="width: 180px" src="@/assets/zzlogo-usa.png" alt="" />
</div>
@@ -50,9 +50,6 @@
</div>
<div v-if="v.fileType.includes('zip')" class="content flex_col">
<img :title="v.FileName" crossorigin="anonymous" :src="zipImg" height="100%"/>
</div>
</div>
</div>
<div class="Anonymous" v-if="isAnonymous">
@@ -161,7 +158,6 @@ import hardcodedMetaDataProvider from '@/views/trials/trials-panel/reading/visit
import registerWebImageLoader from '@/views/trials/trials-panel/reading/visit-review/js/registerWebImageLoader'
import Note_RectangleRoiTool from '@/views/trials/trials-panel/reading/dicoms3D/components/tools/Note_RectangleRoiTool'
import { noneDicomStudyMaskImage, noneDicomStudyUndoMaskImage } from "@/api/reading"
import zipImg from '@/assets/zip.png'
const { ViewportType } = Enums
const renderingEngineId = 'myRenderingEngine'
const {
@@ -225,7 +221,7 @@ export default {
activeTool: '',
imageType: ['image/jpeg', 'image/jpg', 'image/bmp', 'image/png'],
loading: false,
isFitToWindowMode: true,
isFitToWindowMode: false,
trialId: null,
activeName: '1',
tools: [],
@@ -235,8 +231,7 @@ export default {
tip: [
this.$t('DicomViewer:anonymous:after'),
this.$t('DicomViewer:anonymous:before')
],
zipImg
]
}
},
computed: {
@@ -42,9 +42,6 @@
<el-image v-else-if="
!!~k.FileType.indexOf('mp4')
" style="width: 100%; height: 100%" :src="mp4" fit="contain" crossorigin="anonymous" />
<el-image v-else-if="
!!~k.FileType.indexOf('zip')
" style="width: 100%; height: 100%" :src="zipImg" fit="contain" crossorigin="anonymous" />
</div>
<div class="file-text" :title="k.FileName">
{{ k.FileName }}
@@ -76,7 +73,6 @@ import { getNoneDicomStudyList, setNodicomStudyState } from '@/api/trials'
import FileNameSorter from "@/utils/customSort"
import pdf from '@/assets/pdf.png'
import mp4 from '@/assets/mp4.png'
import zipImg from '@/assets/zip.jpg'
export default {
name: 'StudyList',
props: {
@@ -102,7 +98,6 @@ export default {
studyList: [],
pdf,
mp4,
zipImg,
BodyPart: {},
subjectVisitId: '',
studyId: '',
-93
View File
@@ -1,93 +0,0 @@
<template>
<div class="log-list">
<el-table v-loading="loading" :data="tableData" v-adaptive="{ bottomOffset: 40 }" height="100" style="width: 100%">
<el-table-column prop="CreateTime" :label="$t('trials:researchForm:logList:label:CreateTime')" min-width="120"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.CreateTime ? moment(scope.row.CreateTime).format('YYYY-MM-DD HH:mm:ss') : '' }}
</template>
</el-table-column>
<el-table-column prop="Name" :label="$t('trials:researchForm:logList:label:Name')" min-width="100"
show-overflow-tooltip>
</el-table-column>
<el-table-column prop="UserType" :label="$t('trials:researchForm:logList:label:UserType')" min-width="100"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.UserType && $fd('UserType', scope.row.UserType) ? $fd('UserType', scope.row.UserType) : '--' }}
</template>
</el-table-column>
<el-table-column prop="OptType" :label="$t('trials:researchForm:logList:label:OptType')" min-width="100"
show-overflow-tooltip>
<template slot-scope="scope">
{{ $fd('SiteSurveyOptTyp', scope.row.OptType) }}
</template>
</el-table-column>
<el-table-column prop="Json" :label="$t('trials:researchForm:logList:label:Json')" min-width="100"
show-overflow-tooltip>
<template slot-scope="scope">
<el-button v-if="scope.row.Json" type="text" @click="openLog(scope.row)">{{
$t('trials:researchForm:logList:label:SurveyForm') }}</el-button>
</template>
</el-table-column>
<el-table-column prop="Reason" :label="$t('trials:researchForm:logList:label:Reason')" min-width="140"
show-overflow-tooltip>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { getSiteSurveyLogList } from '@/api/research'
import moment from 'moment'
import { getToken } from '@/utils/auth'
export default {
name: 'LogList',
props: {
trialSiteSurveyId: {
type: String,
required: true
}
},
data() {
return {
loading: false,
tableData: [],
moment,
openWindow: null
}
},
mounted() {
this.getList()
},
methods: {
async getList() {
try {
this.loading = true
let res = await getSiteSurveyLogList({ trialSiteSurveyId: this.trialSiteSurveyId })
if (res.IsSuccess) {
this.tableData = res.Result
}
} catch (e) {
console.log(e)
} finally {
this.loading = false
}
},
openLog(row) {
if (this.openWindow) {
this.openWindow.close()
}
var token = getToken()
var path = `/researchLog?trialId=${this.$route.query.trialId}&trialSiteSurveyId=${this.trialSiteSurveyId}&logId=${row.Id}&TokenKey=${token}`
this.openWindow = window.open(path, '_blank')
}
}
}
</script>
<style lang="scss" scoped>
.log-list {
height: 100%;
min-height: 0;
overflow: hidden;
}
</style>
+34 -156
View File
@@ -35,10 +35,6 @@
<el-button v-if="userTypeEnumInt === 0" type="primary" size="small" @click="handleHistory">
{{ $t('trials:researchForm:button:historicalRecord') }}
</el-button>
<!-- 操作日志 -->
<el-button type="primary" size="small" v-if="!isLog" @click="viewLog">
{{ $t('trials:researchForm:button:log') }}
</el-button>
<!-- 退出 -->
<el-button v-if="userTypeEnumInt === 0" type="primary" size="small" @click="handleBack">
{{ $t('trials:researchForm:button:loginOut') }}
@@ -137,37 +133,16 @@
</div>
</div>
</span>
<div class="history-dialog-content">
<div style="height:100%;margin:0;">
<HistoricalRecord :trial-id="trialId" :site-id="siteId" :trial-site-survey-id="trialSiteSurveyId" />
</div>
</el-dialog>
<el-dialog v-if="logVisible" :visible.sync="logVisible"
:custom-class="isFullscreen ? 'full-log-dialog-container' : 'log-dialog-container'" :close-on-click-modal="false"
:fullscreen="isFullscreen" :show-close="false" width="60%" append-to-body>
<span slot="title" class="dialog-footer">
<div style="display: flex;flex-direction: row;justify-content: space-between;">
<div>
{{ $t('trials:researchForm:button:log') }}
</div>
<div>
<svg-icon :icon-class="isFullscreen ? 'exit-fullscreen' : 'fullscreen'"
style="vertical-align: baseline;cursor: pointer;font-size: 20px;" @click="toggleLogFullscreen" />
<svg-icon icon-class="dClose" style="cursor: pointer;font-size: 25px;margin-left: 10px;"
@click="logVisible = false" />
</div>
</div>
</span>
<div class="log-dialog-content">
<LogList :trial-site-survey-id="trialSiteSurveyId" />
</div>
</el-dialog>
</div>
</template>
<script>
import { getSiteSurveyInfo, trialSurveySubmit, submissionRejection, getSiteSurveyLogList } from '@/api/research'
import { getQueryString, changeURLStatic } from '@/utils/history.js'
import { getSiteSurveyInfo, trialSurveySubmit, submissionRejection } from '@/api/research'
import { getQueryString } from '@/utils/history.js'
import BaseInfo from './components/BaseInfo'
import HistoricalParticipant from './components/HistoricalParticipant'
import ParticipantList from './components/ParticipantList'
@@ -175,11 +150,9 @@ import EquipmentList from './components/EquipmentList'
import { mapMutations } from 'vuex'
import TopLang from './topLang'
import HistoricalRecord from './components/HistoricalRecord'
import LogList from './components/LogList'
import store from '@/store'
export default {
name: 'QuestionForm',
components: { BaseInfo, HistoricalParticipant, ParticipantList, EquipmentList, TopLang, HistoricalRecord, LogList },
components: { BaseInfo, HistoricalParticipant, ParticipantList, EquipmentList, TopLang, HistoricalRecord },
props: {
isPreview: {
type: Boolean,
@@ -202,10 +175,7 @@ export default {
historyVisible: false,
siteSurveyNoteInfo: {},
IsSupportUploadFile: false,
IsOnlyUploadFile: false,
logVisible: false,
isLog: false,
logId: null
IsOnlyUploadFile: false
}
},
mounted() {
@@ -221,12 +191,6 @@ export default {
this.setLanguage(lang)
this.$updateDictionary()
this.trialSiteSurveyId = getQueryString('trialSiteSurveyId')
this.logId = getQueryString('logId')
if (this.logId) this.isLog = true
if (this.$router.currentRoute.query.TokenKey) {
store.dispatch('user/setToken', this.$router.currentRoute.query.TokenKey)
changeURLStatic('TokenKey', '')
}
this.initPage()
if (zzSessionStorage.getItem('userTypeEnumInt')) {
this.userTypeEnumInt = zzSessionStorage.getItem('userTypeEnumInt') * 1
@@ -234,7 +198,7 @@ export default {
},
computed: {
isPM() {
return this.hasPermi(['role:pm', 'role:spm', 'role:cpm', 'role:apm']) && this.state !== 3 && this.IsOnlyUploadFile
return this.hasPermi(['role:pm', 'role:spm', 'role:cpm', 'role:apm']) && this.state !== 3
}
},
methods: {
@@ -242,75 +206,36 @@ export default {
// 初始化页面
initPage() {
this.loading = true
if (this.isLog) {
getSiteSurveyLogList({ trialSiteSurveyId: this.trialSiteSurveyId, Id: this.logId }).then(r => {
if (r.Result && r.Result[0].Json) {
let res = {
Result: JSON.parse(r.Result[0].Json)
}
if (res.Result) {
// this.trialSiteSurveyEquipmentType = res.Result.TrialInfo.TrialSiteSurveyEquipmentType
// this.trialSiteSurveyUserRoles = res.Result.TrialInfo.TrialSiteSurveyUserRoles
if (res.Result.SiteSurveyFiledConfig && res.Result.SiteSurveyFiledConfig.ModifyFiledList.length > 0) {
this.siteSurveyNoteInfo = res.Result.SiteSurveyFiledConfig.ModifyFiledList.find(i => i.NeedModifyFiled === 'SiteSurveyNote')
}
this.IsSupportUploadFile = res.Result.SiteSurveyFiledConfig.IsSupportUploadFile
this.IsOnlyUploadFile = res.Result.SiteSurveyFiledConfig.IsOnlyUploadFile
this.siteSurveyNoteInfo.IsCloseEquipmentSurvey = res.Result.SiteSurveyFiledConfig.IsCloseEquipmentSurvey
this.state = 3
this.siteId = res.Result.TrialSiteSurvey.TrialSiteId
this.$refs['baseResearchInfo'].initForm(res.Result.TrialInfo, res.Result.TrialSiteSurvey, res.Result.SiteSurveyFiledConfig ? res.Result.SiteSurveyFiledConfig.NotShowFieldList : null)
var historicalArr = []
var newArr = []
res.Result.TrialSiteUserSurveyList.map(i => {
if (i.IsHistoryUser) {
historicalArr.push(i)
} else {
newArr.push(i)
}
})
this.$refs['historicalParticipant'].initList(historicalArr, res.Result.TrialSiteSurvey)
this.$refs['researchParticipants'].initList(newArr, res.Result.TrialSiteSurvey)
this.$refs['researchEquipments'].initList(res.Result.TrialSiteEquipmentSurveyList, res.Result.TrialSiteSurvey, res.Result.SiteSurveyFiledConfig.EquipmentControlFieldList)
this.isExistIncorrect = res.Result.TrialSiteUserSurveyList.every(item => item.IsCorrect === false)
}
this.loading = false
getSiteSurveyInfo(this.trialId, this.trialSiteSurveyId).then(res => {
if (res.Result) {
// this.trialSiteSurveyEquipmentType = res.Result.TrialInfo.TrialSiteSurveyEquipmentType
// this.trialSiteSurveyUserRoles = res.Result.TrialInfo.TrialSiteSurveyUserRoles
if (res.Result.SiteSurveyFiledConfig && res.Result.SiteSurveyFiledConfig.ModifyFiledList.length > 0) {
this.siteSurveyNoteInfo = res.Result.SiteSurveyFiledConfig.ModifyFiledList.find(i => i.NeedModifyFiled === 'SiteSurveyNote')
}
}).catch((err) => { console.log(err); this.loading = false })
} else {
getSiteSurveyInfo(this.trialId, this.trialSiteSurveyId).then(res => {
if (res.Result) {
// this.trialSiteSurveyEquipmentType = res.Result.TrialInfo.TrialSiteSurveyEquipmentType
// this.trialSiteSurveyUserRoles = res.Result.TrialInfo.TrialSiteSurveyUserRoles
if (res.Result.SiteSurveyFiledConfig && res.Result.SiteSurveyFiledConfig.ModifyFiledList.length > 0) {
this.siteSurveyNoteInfo = res.Result.SiteSurveyFiledConfig.ModifyFiledList.find(i => i.NeedModifyFiled === 'SiteSurveyNote')
this.IsSupportUploadFile = res.Result.SiteSurveyFiledConfig.IsSupportUploadFile
this.IsOnlyUploadFile = res.Result.SiteSurveyFiledConfig.IsOnlyUploadFile
this.siteSurveyNoteInfo.IsCloseEquipmentSurvey = res.Result.SiteSurveyFiledConfig.IsCloseEquipmentSurvey
this.state = res.Result.TrialSiteSurvey.State
this.siteId = res.Result.TrialSiteSurvey.TrialSiteId
this.$refs['baseResearchInfo'].initForm(res.Result.TrialInfo, res.Result.TrialSiteSurvey, res.Result.SiteSurveyFiledConfig ? res.Result.SiteSurveyFiledConfig.NotShowFieldList : null)
var historicalArr = []
var newArr = []
res.Result.TrialSiteUserSurveyList.map(i => {
if (i.IsHistoryUser) {
historicalArr.push(i)
} else {
newArr.push(i)
}
this.IsSupportUploadFile = res.Result.SiteSurveyFiledConfig.IsSupportUploadFile
this.IsOnlyUploadFile = res.Result.SiteSurveyFiledConfig.IsOnlyUploadFile
this.siteSurveyNoteInfo.IsCloseEquipmentSurvey = res.Result.SiteSurveyFiledConfig.IsCloseEquipmentSurvey
this.state = res.Result.TrialSiteSurvey.State
this.siteId = res.Result.TrialSiteSurvey.TrialSiteId
this.$refs['baseResearchInfo'].initForm(res.Result.TrialInfo, res.Result.TrialSiteSurvey, res.Result.SiteSurveyFiledConfig ? res.Result.SiteSurveyFiledConfig.NotShowFieldList : null)
var historicalArr = []
var newArr = []
res.Result.TrialSiteUserSurveyList.map(i => {
if (i.IsHistoryUser) {
historicalArr.push(i)
} else {
newArr.push(i)
}
})
this.$refs['historicalParticipant'].initList(historicalArr, res.Result.TrialSiteSurvey)
this.$refs['researchParticipants'].initList(newArr, res.Result.TrialSiteSurvey)
this.$refs['researchEquipments'].initList(res.Result.TrialSiteEquipmentSurveyList, res.Result.TrialSiteSurvey, res.Result.SiteSurveyFiledConfig.EquipmentControlFieldList)
this.isExistIncorrect = res.Result.TrialSiteUserSurveyList.every(item => item.IsCorrect === false)
}
this.loading = false
}).catch(() => { this.loading = false })
}
})
this.$refs['historicalParticipant'].initList(historicalArr, res.Result.TrialSiteSurvey)
this.$refs['researchParticipants'].initList(newArr, res.Result.TrialSiteSurvey)
this.$refs['researchEquipments'].initList(res.Result.TrialSiteEquipmentSurveyList, res.Result.TrialSiteSurvey, res.Result.SiteSurveyFiledConfig.EquipmentControlFieldList)
this.isExistIncorrect = res.Result.TrialSiteUserSurveyList.every(item => item.IsCorrect === false)
}
this.loading = false
}).catch(() => { this.loading = false })
},
// 提交
handleSubmit(type) {
@@ -422,14 +347,7 @@ export default {
handleHistory() {
this.isFullscreen = false
this.historyVisible = true
},
toggleLogFullscreen() {
this.isFullscreen = !this.isFullscreen
},
viewLog() {
this.isFullscreen = false
this.logVisible = true
},
}
}
}
</script>
@@ -481,45 +399,5 @@ export default {
}
}
.history-dialog-content,
.log-dialog-content {
height: 100%;
margin: 0;
}
.log-dialog-content {
overflow: hidden;
}
}
</style>
<style lang="scss">
.full-log-dialog-container,
.log-dialog-container {
overflow: hidden;
}
.full-log-dialog-container {
display: flex;
flex-direction: column;
}
.full-log-dialog-container .el-dialog__body {
flex: 1;
min-height: 0;
padding: 10px;
overflow: hidden;
}
.log-dialog-container .el-dialog__body {
height: calc(100% - 80px);
padding: 10px;
overflow: hidden;
}
.full-log-dialog-container .log-dialog-content,
.log-dialog-container .log-dialog-content {
height: 100%;
overflow: hidden;
}
</style>
+1 -1
View File
@@ -1,7 +1,7 @@
<template>
<div class="share-image-container">
<div class="share-image-banner">
<h2 style="text-align:center;">IRC Management System</h2>
<h2 style="text-align:center;">HASC Management System</h2>
<el-card shadow="hover">
<h4>请输入提取码</h4>
<el-form ref="validateForm" :inline="true" :rules="rules" :model="form">
+2 -2
View File
@@ -302,13 +302,13 @@ export default {
// 发件人邮箱地址
"FromEmail": "test@extimaging.com",
// 发件人显示名称
"FromName": "Test IRC Imaging System",
"FromName": "Test HASC Imaging System",
//SMTP授权码
"AuthorizationCode": "SHzyyl2021",
//系统对外访问地址
"SiteUrl": "http://irc.test.extimaging.com/login",
//系统简称-致性核查使用
"SystemShortName": "IRC",
"SystemShortName": "HASC",
// 组织英文名称-添加用户默认值
"OrganizationName": "ExtImaging",
// 组织中文名称
+18 -18
View File
@@ -178,7 +178,7 @@ export default {
updateUser(this.user)
.then((res) => {
this.isDisabled = false
this.$message.success(this.$t("common:message:updatedSuccessfully"))
this.$message.success('Updated successfully')
})
.catch(() => {
this.isDisabled = false
@@ -190,7 +190,7 @@ export default {
this.user.Id = res.Result.Id
this.user.UserCode = res.Result.UserCode
this.$emit('getUserId', res.Result.Id)
this.$message.success(this.$t("common:message:addedSuccessfully"))
this.$message.success('Added successfully')
this.$router.push({ path: '/system/user/list' })
})
.catch(() => {
@@ -308,63 +308,63 @@ export default {
UserWorkLanguage: [
{
required: true,
message: this.$t("common:ruleMessage:select"),
message: 'Please Select',
trigger: ['blur', 'change'],
},
],
Roles: [
{
required: true,
message: this.$t("common:ruleMessage:select"),
message: 'Please Select',
trigger: ['blur', 'change'],
},
],
IsZhiZhun: [
{
required: true,
message: this.$t("common:ruleMessage:select"),
message: 'Please Select',
trigger: ['blur', 'change'],
},
],
OrganizationName: [
{ required: true, message: this.$t("common:ruleMessage:specify"), trigger: 'blur' },
{ required: true, message: 'Please specify', trigger: 'blur' },
],
LastName: [
{ required: true, message: this.$t("common:ruleMessage:specify"), trigger: 'blur' },
{ max: 50, message: this.$t("trials:researchForm:formRule:maxLength") },
{ required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' },
],
FirstName: [
{ required: true, message: this.$t("common:ruleMessage:specify"), trigger: 'blur' },
{ max: 50, message: this.$t("trials:researchForm:formRule:maxLength") },
{ required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' },
],
Phone: [
{
max: 20,
min: 7,
message: this.$t("system:userInfo:ruleMessage:length7to20"),
message: 'The length is 7 to 20',
trigger: ['blur'],
},
],
EMail: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
message: 'Please input the email address',
trigger: 'blur',
},
{
// type: 'email',
pattern: new RegExp(this.$reg().EmailRegexStr),
message: this.$t("trials:site:ruleMessage:correctEmail"),
message: 'Please input the correct email address',
trigger: ['blur'],
},
{ max: 50, message: this.$t("trials:researchForm:formRule:maxLength") },
{ max: 50, message: 'The maximum length is 50' },
],
Sex: [{ required: true, message: this.$t("common:ruleMessage:specify"), trigger: 'blur' }],
Sex: [{ required: true, message: 'Please specify', trigger: 'blur' }],
Status: [
{ required: true, message: this.$t("common:ruleMessage:specify"), trigger: 'blur' },
{ required: true, message: 'Please specify', trigger: 'blur' },
],
DepartmentName: [{ max: 50, message: this.$t("trials:researchForm:formRule:maxLength") }],
PositionName: [{ max: 50, message: this.$t("trials:researchForm:formRule:maxLength") }],
DepartmentName: [{ max: 50, message: 'The maximum length is 50' }],
PositionName: [{ max: 50, message: 'The maximum length is 50' }],
},
userTypeOptions: [],
isDisabled: false,
@@ -1,311 +0,0 @@
<template>
<BaseContainer>
<!-- 搜索框 -->
<template slot="search-container">
<el-form :inline="true">
<!-- 中心编号 -->
<el-form-item :label="$t('trials:researchStaff: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>
</el-form-item>
<!-- 中心名称 -->
<el-form-item :label="$t('trials:researchStaff:table:siteName')">
<el-input v-model="searchData.TrialSiteName" class="mr" clearable style="width:120px;" />
</el-form-item>
<!-- 状态 -->
<el-form-item :label="$t('trials:researchRecord:table:status')">
<el-select v-model="searchData.State" clearable filterable style="width: 120px">
<el-option v-for="(item, index) of $d.ResearchRecord" :key="index" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<!-- 是否废除 -->
<!-- <el-form-item :label="$t('trials:researchRecord:table:isDeleted')">
<el-select v-model="searchData.IsDeleted" clearable filterable style="width: 120px">
<el-option v-for="item of $d.YesOrNo" v-show="item.raw.ValueCN !== '无'" :key="`IsDeleted${item.value}`"
:label="item.label" :value="item.value" />
</el-select>
</el-form-item> -->
<el-form-item>
<!-- 查询 -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
</el-button>
</el-form-item>
<!-- 重置 -->
<el-form-item>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
<!-- 导出 -->
<el-form-item>
<el-button type="primary" icon="el-icon-download" :disabled="list.length === 0" @click="handleExport">
{{ $t('common:button:export') }}
</el-button>
</el-form-item>
</el-form>
</template>
<template slot="main-container">
<el-table ref="equipmentsList" v-loading="loading" v-adaptive="{ bottomOffset: 55 }" :data="list" stripe
height="100" @sort-change="handleSortByColumn">
<el-table-column type="index" width="50" />
<!-- 中心编号 -->
<el-table-column prop="TrialSiteCode" :label="$t('trials:researchStaff:table:siteId')" show-overflow-tooltip
sortable="custom" min-width="100">
</el-table-column>
<!-- 中心名称 -->
<el-table-column prop="TrialSiteName" :label="$t('trials:researchStaff:table:siteName')" show-overflow-tooltip
sortable="custom" min-width="120">
</el-table-column>
<!-- 状态 -->
<el-table-column prop="State" :label="$t('trials:researchRecord:table:status')" min-width="150"
sortable="custom" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.State === 0" type="primary">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
<el-tag v-if="scope.row.State === 1" type="info">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
<el-tag v-if="scope.row.State === 2" type="warning">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
<el-tag v-if="scope.row.State === 3" type="danger">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
</template>
</el-table-column>
<!-- 是否废除 -->
<!-- <el-table-column prop="IsDeleted" :label="$t('trials:researchRecord:table:isDeleted')" min-width="100"
sortable="custom" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
$fd('YesOrNo', scope.row.IsDeleted)
}}</el-tag>
<el-tag v-else type="primary">{{
$fd('YesOrNo', scope.row.IsDeleted)
}}</el-tag>
</template>
</el-table-column> -->
<!-- 联系人 -->
<el-table-column prop="UserName" :label="$t('trials:researchForm:form:contactor')" show-overflow-tooltip
sortable="custom" min-width="100" />
<!-- 联系电话 -->
<el-table-column prop="Phone" :label="$t('trials:researchForm:form:contactorPhone')" show-overflow-tooltip
sortable="custom" min-width="100" />
<!-- 联系邮箱 -->
<el-table-column prop="Email" :label="$t('trials:researchForm:form:contactorEmail')" show-overflow-tooltip
sortable="custom" min-width="100" />
<template v-if="equipmentControlFieldList.includes('EquipmentTypeEnum')">
<!-- 扫描设备 -->
<el-table-column prop="EquipmentTypeEnum" :label="$t('trials:equiptResearch:form:equipment')" min-width="120"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.OtherEquipmentType ? scope.row.OtherEquipmentType :
$fd('SiteSurvey_ScanEquipmentType', scope.row.EquipmentTypeEnum) }}
</template>
</el-table-column>
</template>
<template v-if="equipmentControlFieldList.includes('Parameters')">
<!-- 扫描参数 -->
<el-table-column prop="Parameters" :label="$t('trials:equiptResearch:form:param')" min-width="100"
show-overflow-tooltip />
</template>
<template v-if="equipmentControlFieldList.includes('ManufacturerType')">
<!-- 扫描仪器制造商名称 -->
<el-table-column min-width="120" prop="ManufacturerType"
:label="$t('trials:equiptResearch:form:manufacturer')" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.ManufacturerName ? scope.row.ManufacturerName : $fd('ManufacturerType',
scope.row.ManufacturerType) }}
</template>
</el-table-column>
</template>
<template v-if="equipmentControlFieldList.includes('ScannerType')">
<!-- 扫描仪型号 -->
<el-table-column min-width="120" prop="ScannerType" :label="$t('trials:equiptResearch:form:model')"
show-overflow-tooltip />
</template>
<template v-if="equipmentControlFieldList.includes('MagneticFieldStrengthType')">
<!-- 磁场强度 -->
<el-table-column min-width="120" prop="MagneticFieldStrengthType"
:label="$t('trials:equiptResearch:form:MagneticFieldStrengthType')" show-overflow-tooltip>
<template slot-scope="scope">
{{ $fd('MagneticFieldStrengthType', scope.row.MagneticFieldStrengthType) }}
</template>
</el-table-column>
</template>
<template v-if="equipmentControlFieldList.includes('BodyCoilChannelCount')">
<!-- 体部线圈通道数 -->
<el-table-column min-width="120" prop="BodyCoilChannelCount"
:label="$t('trials:equiptResearch:form:BodyCoilChannelCount')" show-overflow-tooltip>
<template slot-scope="scope">
{{ $fd('BodyCoilChannelCount', scope.row.BodyCoilChannelCount) }}
</template>
</el-table-column>
</template>
<template v-if="equipmentControlFieldList.includes('HasDedicatedPdfFatQuantificationSequence')">
<!-- 是否具备专用的PDFF脂肪定量序列CSE-MRI序列 -->
<el-table-column min-width="120" prop="HasDedicatedPdfFatQuantificationSequence"
:label="$t('trials:equiptResearch:form:HasDedicatedPdfFatQuantificationSequence')" show-overflow-tooltip>
<template slot-scope="scope">
{{ $fd('YesOrNo', scope.row.HasDedicatedPdfFatQuantificationSequence) }}
</template>
</el-table-column>
</template>
<template v-if="equipmentControlFieldList.includes('PdfFatQuantificationSequenceType')">
<!-- 专用的PDFF脂肪定量序列类型 -->
<el-table-column min-width="120" prop="PdfFatQuantificationSequenceType"
:label="$t('trials:equiptResearch:form:PdfFatQuantificationSequenceType')" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.OtherSequenceSpecification ? scope.row.OtherSequenceSpecification :
$fd('PdfFatQuantificationSequenceType', scope.row.PdfFatQuantificationSequenceType) }}
</template>
</el-table-column>
</template>
<template v-if="equipmentControlFieldList.includes('HasT2R2Correction')">
<!-- 是否包含 T2/R2 校正用于铁沉积校正 -->
<el-table-column min-width="120" prop="HasT2R2Correction"
:label="$t('trials:equiptResearch:form:HasT2R2Correction')" show-overflow-tooltip>
<template slot-scope="scope">
{{ $fd('YesOrNo', scope.row.HasT2R2Correction) }}
</template>
</el-table-column>
</template>
<template v-if="equipmentControlFieldList.includes('CanFullyExportPdfParameterMapsAndRawDicom')">
<!-- 是否可完整导出 PDFF 参数图及全部原始 DICOM 数据 -->
<el-table-column prop="CanFullyExportPdfParameterMapsAndRawDicom"
:label="$t('trials:equiptResearch:form:CanFullyExportPdfParameterMapsAndRawDicom')" min-width="120"
show-overflow-tooltip>
<template slot-scope="scope">
{{ $fd('YesOrNo', scope.row.CanFullyExportPdfParameterMapsAndRawDicom) }}
</template>
</el-table-column>
</template>
<template v-if="equipmentControlFieldList.includes('Note')">
<!-- 备注 -->
<el-table-column min-width="120" prop="Note" :label="$t('trials:equiptResearch:form:remark')"
show-overflow-tooltip />
</template>
</el-table>
<!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
</template>
</BaseContainer>
</template>
<script>
import { getTrialSiteSelect } from '@/api/trials'
import { getSiteSurveyEquipmentList } from '@/api/research'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
import { getSiteSurveyEquipmentList_Export } from '@/api/export'
const searchDataDefault = () => {
return {
SortField: '',
State: "",
Asc: true,
PageIndex: 1,
PageSize: 20,
TrialId: '',
TrialSiteId: '',
TrialSiteName: ''
}
}
export default {
name: 'Equipments',
components: { BaseContainer, Pagination },
data() {
return {
searchData: searchDataDefault(),
loading: false,
list: [],
total: 0,
trialId: '',
otherInfo: {},
siteOptions: [],
equipmentControlFieldList: []
}
},
mounted() {
this.trialId = this.$route.query.trialId
this.getList()
this.getSite()
},
methods: {
async handleExport() {
await getSiteSurveyEquipmentList_Export(this.searchData)
},
async getList() {
try {
this.loading = true
this.searchData.TrialId = this.trialId
let res = await getSiteSurveyEquipmentList(this.searchData)
if (res.IsSuccess) {
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
this.otherInfo = res.OtherInfo
const { EquipmentControlFieldList } = res.OtherInfo
this.equipmentControlFieldList = []
EquipmentControlFieldList.forEach(item => {
this.equipmentControlFieldList.push(item.FiledName)
})
this.$nextTick(() => {
this.$refs.equipmentsList.doLayout()
})
}
} catch (e) {
console.log(e)
} finally {
this.loading = false
}
},
// site
async getSite() {
try {
let res = await getTrialSiteSelect(this.trialId)
this.siteOptions = res.Result
} catch (e) {
console.log(e)
}
},
//
handleReset() {
this.searchData = searchDataDefault()
this.getList()
this.$nextTick(() => {
this.$refs.list.clearSort()
})
},
//
handleSearch() {
this.getList()
},
//
handleSortByColumn(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
} else {
this.searchData.Asc = false
}
this.searchData.SortField = column.prop
this.getList()
}
}
}
</script>
@@ -1,356 +0,0 @@
<template>
<BaseContainer>
<!-- 搜索框 -->
<template slot="search-container">
<el-form :inline="true">
<!-- 中心编号 -->
<el-form-item :label="$t('trials:researchStaff: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>
</el-form-item>
<!-- 中心名称 -->
<el-form-item :label="$t('trials:researchStaff:table:siteName')">
<el-input v-model="searchData.TrialSiteName" class="mr" clearable style="width:120px;" />
</el-form-item>
<!-- 状态 -->
<el-form-item :label="$t('trials:researchRecord:table:status')">
<el-select v-model="searchData.State" clearable filterable style="width: 120px">
<el-option v-for="(item, index) of $d.ResearchRecord" :key="index" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<!-- 是否废除 -->
<!-- <el-form-item :label="$t('trials:researchRecord:table:isDeleted')">
<el-select v-model="searchData.IsDeleted" clearable filterable style="width: 120px">
<el-option v-for="item of $d.YesOrNo" v-show="item.raw.ValueCN !== '无'" :key="`IsDeleted${item.value}`"
:label="item.label" :value="item.value" />
</el-select>
</el-form-item> -->
<el-form-item>
<!-- 查询 -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
</el-button>
</el-form-item>
<!-- 重置 -->
<el-form-item>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
<!-- 导出 -->
<el-form-item>
<el-button type="primary" icon="el-icon-download" :disabled="list.length === 0" @click="handleExport">
{{ $t('common:button:export') }}
</el-button>
</el-form-item>
</el-form>
</template>
<template slot="main-container">
<el-table ref="questionsList" v-loading="loading" v-adaptive="{ bottomOffset: 55 }" :data="list" stripe
height="100" @sort-change="handleSortByColumn">
<el-table-column type="index" width="50" />
<!-- 项目编号 -->
<!-- <el-table-column
prop="TrialCode"
:label="$t('trials:researchForm:form:trialId')"
show-overflow-tooltip
sortable="custom"
min-width="100"
/> -->
<!-- 试验方案号 -->
<!-- <el-table-column
prop="ResearchProgramNo"
:label="$t('trials:researchForm:form:researchNo')"
show-overflow-tooltip
sortable="custom"
min-width="100"
/> -->
<!-- 试验名称 -->
<!-- <el-table-column
prop="ExperimentName"
:label="$t('trials:researchForm:form:researchName')"
show-overflow-tooltip
sortable="custom"
min-width="100"
/> -->
<!-- 适应症类型 -->
<!-- <el-table-column
prop="IndicationType"
:label="$t('trials:researchForm:form:decleareType')"
show-overflow-tooltip
sortable="custom"
min-width="100"
/> -->
<!-- 适应症类型 -->
<!-- <el-table-column
prop="IndicationType"
:label="$t('trials:researchForm:form:decleareType')"
show-overflow-tooltip
sortable="custom"
min-width="100"
/> -->
<!-- 中心编号 -->
<el-table-column prop="TrialSiteCode" :label="$t('trials:researchStaff:table:siteId')" show-overflow-tooltip
sortable="custom" min-width="100" />
<!-- 中心名称 -->
<el-table-column prop="SiteName" :label="$t('trials:researchStaff:table:siteName')" show-overflow-tooltip
sortable="custom" min-width="100" />
<!-- 状态 -->
<el-table-column prop="State" :label="$t('trials:researchRecord:table:status')" min-width="150"
sortable="custom" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.State === 0" type="primary">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
<el-tag v-if="scope.row.State === 1" type="info">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
<el-tag v-if="scope.row.State === 2" type="warning">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
<el-tag v-if="scope.row.State === 3" type="danger">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
</template>
</el-table-column>
<!-- 是否废除 -->
<!-- <el-table-column prop="IsDeleted" :label="$t('trials:researchRecord:table:isDeleted')" min-width="100"
sortable="custom" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
$fd('YesOrNo', scope.row.IsDeleted)
}}</el-tag>
<el-tag v-else type="primary">{{
$fd('YesOrNo', scope.row.IsDeleted)
}}</el-tag>
</template>
</el-table-column> -->
<!-- 联系人 -->
<el-table-column prop="UserName" :label="$t('trials:researchForm:form:contactor')" show-overflow-tooltip
sortable="custom" min-width="100" />
<!-- 联系电话 -->
<el-table-column prop="Phone" :label="$t('trials:researchForm:form:contactorPhone')" show-overflow-tooltip
sortable="custom" min-width="100" />
<!-- 联系邮箱 -->
<el-table-column prop="Email" :label="$t('trials:researchForm:form:contactorEmail')" show-overflow-tooltip
sortable="custom" min-width="100" />
<el-table-column v-show="otherInfo.IsSupportUploadFile" prop="SiteSurveyFile.FileName"
:label="$t('trials:researchForm:form:SiteSurveyFile')" show-overflow-tooltip min-width="100">
<template slot-scope="scope">
<el-button v-if="scope.row.SiteSurveyFile && scope.row.SiteSurveyFile.FileName" type="text"
@click="viewFile(scope.row.SiteSurveyFile)">
{{ scope.row.SiteSurveyFile.FileName }}
</el-button>
</template>
</el-table-column>
<template v-if="!notShowFieldList.includes('AverageEngravingCycle')">
<!-- 平均刻盘周期 -->
<el-table-column prop="AverageEngravingCycle" :label="$t('trials:researchForm:form:engravingCycle')"
show-overflow-tooltip />
</template>
<template v-if="!notShowFieldList.includes('IsRoutineMRIPDEE')">
<!-- MRI-PDFF 是否为本中心该适应症的常规诊疗检查项目 -->
<el-table-column prop="IsRoutineMRIPDEE" :label="$t('trials:researchForm:form:IsRoutineMRIPDEE')"
show-overflow-tooltip>
<template slot-scope="scope">
{{ $fd('YesOrNo', scope.row.IsRoutineMRIPDEE) }}
</template>
</el-table-column>
</template>
<template
v-if="!notShowFieldList.includes('MRIPDFFScanTime') || !notShowFieldList.includes('MRIPDFFLeadTime') || !notShowFieldList.includes('MRIPDFFOther')">
<!-- MRI-PDFF 检查的检测周期含单次检查时长预约等待时长等 -->
<!-- <el-table-column :label="$t('trials:researchForm:form:IsRoutineMRIPDEE')"> -->
<!-- 单次检查时长分钟 -->
<el-table-column v-show="!notShowFieldList.includes('MRIPDFFScanTime')" prop="MRIPDFFScanTime"
:label="$t('trials:researchForm:form:MRIPDFFScanTime')" show-overflow-tooltip />
<!-- 平均预约等待时长 -->
<el-table-column v-show="!notShowFieldList.includes('MRIPDFFLeadTime')" prop="MRIPDFFLeadTime"
:label="$t('trials:researchForm:form:MRIPDFFLeadTime')" show-overflow-tooltip />
<!-- 特殊情况备注-->
<el-table-column v-show="!notShowFieldList.includes('MRIPDFFOther')" prop="MRIPDFFOther"
:label="$t('trials:researchForm:form:MRIPDFFOther')" show-overflow-tooltip />
<!-- </el-table-column> -->
</template>
<template
v-if="!notShowFieldList.includes('IsAuthorizeRadiologistsParticipate') || !notShowFieldList.includes('AssignFixedTechnologists')">
<!-- 如已选择研究者评估项目是否会授权影像科老师参与本试验如不单独授权是否可在试验中保持 1-2 名固定技师操作 -->
<el-table-column prop="IsAuthorize" :label="$t('trials:researchForm:form:IsAuthorize')" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.IsAuthorizeRadiologistsParticipate">
{{ $t('trials:researchForm:form:IsAuthorizeRadiologistsParticipate') }}
</span>
<span v-else-if="scope.row.AssignFixedTechnologists">
{{ $t('trials:researchForm:form:AssignFixedTechnologists') }}
</span>
</template>
</el-table-column>
</template>
<template v-if="!notShowFieldList.includes('IsConfirmImagingTechnologist')">
<!-- 请确认参与本项目影像采集的影像技师具备对应的资质技师证对应设备的大型设备上岗证 -->
<el-table-column prop="IsConfirmImagingTechnologist" :label="$t('trials:researchForm:form:isQualified')"
show-overflow-tooltip>
<template slot-scope="scope">
{{ $fd('YesOrNo', scope.row.IsConfirmImagingTechnologist) }}
</template>
</el-table-column>
</template>
<template v-if="!notShowFieldList.includes('NotConfirmReson')">
<!-- 原因 -->
<el-table-column prop="NotConfirmReson" :label="$t('trials:researchForm:form:notQualifiedReason')"
show-overflow-tooltip />
</template>
<template v-if="!notShowFieldList.includes('EfficacyEvaluatorType')">
<!-- 研究单位疗效评估人员类型 -->
<el-table-column prop="EfficacyEvaluatorType" :label="$t('trials:researchForm:form:staffType')"
show-overflow-tooltip>
<template slot-scope="scope">
{{ $fd('EfficacyEvaluatorType', scope.row.EfficacyEvaluatorType) }}
</template>
</el-table-column>
</template>
<template v-if="!notShowFieldList.includes('IsFollowStudyParameters')">
<!-- 是否严格按照研究单位影像手册参数完成图像采集 -->
<el-table-column prop="IsFollowStudyParameters" :label="$t('trials:researchForm:form:isFollowStudyParam')"
show-overflow-tooltip>
<template slot-scope="scope">
{{ $fd('YesOrNo', scope.row.IsFollowStudyParameters) }}
</template>
</el-table-column>
</template>
<template v-if="!notShowFieldList.includes('NotFollowReson')">
<!-- 不能严格按照研究单位影像手册参数采集图像原因 -->
<el-table-column prop="NotFollowReson" :label="$t('trials:researchForm:form:notFollowStudyParam')"
show-overflow-tooltip />
</template>
<template v-if="!notShowFieldList.includes('ISStrictManualBurnFlag')">
<!-- 是否严格按照影像手册参数完成刻盘 -->
<el-table-column prop="ISStrictManualBurnFlag" :label="$t('trials:researchForm:form:ISStrictManualBurnFlag')"
show-overflow-tooltip>
<template slot-scope="scope">
{{ $fd('YesOrNo', scope.row.ISStrictManualBurnFlag) }}
</template>
</el-table-column>
</template>
<template v-if="!notShowFieldList.includes('NotStrictManualBurnFlagReason')">
<!-- 不能严格按照影像手册参数完成刻盘原因 -->
<el-table-column prop="NotStrictManualBurnFlagReason"
:label="$t('trials:researchForm:form:NotStrictManualBurnFlagReason')" show-overflow-tooltip />
</template>
</el-table>
<!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
</template>
</BaseContainer>
</template>
<script>
import { getTrialSiteSelect } from '@/api/trials'
import { getSiteSurveyInfoList } from '@/api/research'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
import { getSiteSurveyInfoList_Export } from '@/api/export'
const searchDataDefault = () => {
return {
SortField: '',
Asc: true,
State: "",
PageIndex: 1,
PageSize: 20,
TrialId: '',
TrialSiteId: '',
TrialSiteName: ''
}
}
export default {
name: 'Equipments',
components: { BaseContainer, Pagination },
data() {
return {
searchData: searchDataDefault(),
loading: false,
list: [],
total: 0,
trialId: '',
otherInfo: {},
siteOptions: [],
notShowFieldList: []
}
},
mounted() {
this.trialId = this.$route.query.trialId
this.getList()
this.getSite()
},
methods: {
async handleExport() {
await getSiteSurveyInfoList_Export(this.searchData)
},
async getList() {
try {
this.loading = true
this.searchData.TrialId = this.trialId
let res = await getSiteSurveyInfoList(this.searchData)
if (res.IsSuccess) {
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
this.otherInfo = res.OtherInfo
this.notShowFieldList = res.OtherInfo.NotShowFieldList
this.$nextTick(() => {
this.$refs.questionsList.doLayout()
})
}
} catch (e) {
console.log(e)
} finally {
this.loading = false
}
},
// site
async getSite() {
try {
let res = await getTrialSiteSelect(this.trialId)
this.siteOptions = res.Result
} catch (e) {
console.log(e)
}
},
viewFile(siteSurveyFile) {
this.$preview({
path: siteSurveyFile.Path,
type: siteSurveyFile.FileType,
title: siteSurveyFile.FileName,
})
},
//
handleReset() {
this.searchData = searchDataDefault()
this.getList()
this.$nextTick(() => {
this.$refs.list.clearSort()
})
},
//
handleSearch() {
this.getList()
},
//
handleSortByColumn(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
} else {
this.searchData.Asc = false
}
this.searchData.SortField = column.prop
this.getList()
}
}
}
</script>
@@ -1,733 +0,0 @@
<template>
<BaseContainer>
<!-- 搜索框 -->
<template slot="search-container">
<el-form :inline="true">
<!-- 中心 -->
<el-form-item :label="$t('trials:researchRecord: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>
</el-form-item>
<!-- 联系人 -->
<el-form-item :label="$t('trials:researchRecord:table:contactor')">
<el-input v-model="searchData.UserKeyInfo" class="mr" clearable :placeholder="`${$t(
'trials:researchRecord:placeholder:contactorInfo'
)}`" style="width: 140px" />
</el-form-item>
<!-- 初审人 -->
<el-form-item :label="$t('trials:researchRecord:table:preliminaryUser')">
<el-input v-model="searchData.PreliminaryUserName" class="mr" clearable style="width: 140px" />
</el-form-item>
<!-- 审核人 -->
<el-form-item :label="$t('trials:researchRecord:table:ReviewerUser')">
<el-input v-model="searchData.ReviewerUserName" class="mr" clearable style="width: 140px" />
</el-form-item>
<!-- 状态 -->
<!-- <el-form-item :label="$t('trials:researchRecord:table:status')">
<el-select v-model="searchData.State" clearable filterable style="width: 120px">
<el-option v-for="(item, index) of $d.ResearchRecord" :key="index" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item> -->
<!-- 是否废除 -->
<el-form-item :label="$t('trials:researchRecord:table:isDeleted')">
<el-select v-model="searchData.IsDeleted" clearable filterable style="width: 120px">
<el-option v-for="item of $d.YesOrNo" v-show="item.raw.ValueCN !== '无'" :key="`IsDeleted${item.value}`"
:label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<!-- 更新时间 -->
<el-form-item :label="$t('trials:researchRecord:table:updateTime')">
<el-date-picker v-model="searchData.DateRange" type="daterange" value-format="yyyy-MM-dd" format="yyyy-MM-dd"
style="width: 250px" />
</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 v-show="searchData.State === 3"
v-hasPermi="['trials:trials-panel:attachments:site-research:summary-record']" type="primary"
icon="el-icon-info" @click="showResearchUser">
{{ $t('trials:researchRecord:button:researchData') }}
</el-button>
<!-- 调查表链接 -->
<el-button v-show="searchData.State === 0"
v-hasPermi="['trials:trials-panel:attachments:site-research:questionnaire-link']" type="primary"
icon="el-icon-link" @click="showResearchLink">
{{ $t('trials:researchRecord:button:questionLink') }}
</el-button>
</el-form>
</template>
<template slot="main-container">
<!-- 系统文件列表 -->
<el-table ref="siteResearchList" v-loading="loading" v-adaptive="{ bottomOffset: 60 }" :data="list" stripe
height="100" @sort-change="handleSortByColumn">
<el-table-column type="index" width="50" />
<!-- 中心编号 -->
<el-table-column prop="TrialSiteCode" :label="$t('trials:researchRecord:table:siteId')" min-width="100"
sortable="custom" show-overflow-tooltip />
<!-- 中心名称 -->
<el-table-column prop="SiteName" :label="$t('trials:researchRecord:table:siteName')" min-width="100"
sortable="custom" show-overflow-tooltip />
<!-- 联系人 -->
<el-table-column prop="UserName" :label="$t('trials:researchRecord:table:contactor')" min-width="100"
sortable="custom" show-overflow-tooltip />
<!-- 联系电话 -->
<el-table-column prop="Phone" :label="$t('trials:researchRecord:table:contactorPhone')" min-width="100"
show-overflow-tooltip />
<!-- 联系邮箱 -->
<el-table-column prop="Email" :label="$t('trials:researchRecord:table:contactorEmail')" min-width="150"
show-overflow-tooltip />
<!-- 初审人 -->
<el-table-column prop="preliminaryUser" :label="$t('trials:researchRecord:table:preliminaryUser')"
min-width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{
scope.row.PreliminaryUser
? scope.row.PreliminaryUser.RealName
: ''
}}
</template>
</el-table-column>
<!-- 审核人 -->
<el-table-column prop="ReviewerUser" :label="$t('trials:researchRecord:table:ReviewerUser')" min-width="150"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.ReviewerUser ? scope.row.ReviewerUser.RealName : '' }}
</template>
</el-table-column>
<!-- 状态 -->
<el-table-column prop="State" :label="$t('trials:researchRecord:table:status')" min-width="150"
sortable="custom" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.State === 0" type="primary">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
<el-tag v-if="scope.row.State === 1" type="info">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
<el-tag v-if="scope.row.State === 2" type="warning">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
<el-tag v-if="scope.row.State === 3" type="danger">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
</template>
</el-table-column>
<!-- 是否废除 -->
<el-table-column prop="IsDeleted" :label="$t('trials:researchRecord:table:isDeleted')" min-width="100"
sortable="custom" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
$fd('YesOrNo', scope.row.IsDeleted)
}}</el-tag>
<el-tag v-else type="primary">{{
$fd('YesOrNo', scope.row.IsDeleted)
}}</el-tag>
</template>
</el-table-column>
<!-- 更新时间 -->
<el-table-column prop="UpdateTime" :label="$t('trials:researchRecord:table:updateTime')" min-width="150"
show-overflow-tooltip sortable="custom" />
<el-table-column width="150">
<template slot-scope="scope">
<!-- 查看 -->
<el-button v-show="searchData.State === 3" :disabled="scope.row.State !== 3" circle
:title="$t('common:button:view')" icon="el-icon-view" @click="handleViewResearchList(scope.row)" />
<!-- 审批 -->
<el-button v-show="(searchData.State === 1 || searchData.State === 2) && isAudit"
v-hasPermi="['trials:trials-panel:attachments:site-research:auidt']"
:disabled="scope.row.State === 0 || scope.row.State === 3 || scope.row.IsDeleted" circle
:title="$t('trials:researchRecord:action:view')" icon="el-icon-s-check"
@click="handleViewResearchList(scope.row)" />
<!-- 日志 -->
<el-button circle :title="$t('trials:researchRecord:action:log')" icon="el-icon-tickets"
@click="viewLog(scope.row)" />
<!-- 废除 -->
<el-button v-show="searchData.State === 0" v-hasPermi="[
'trials:trials-panel:attachments:site-research:abolish',
]" :disabled="scope.row.State !== 0 || scope.row.IsDeleted" circle
:title="$t('trials:researchRecord:action:abolish')" icon="el-icon-delete"
@click="handleRepealResearch(scope.row)" />
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
</template>
<!-- 中心数据 trials:researchRecord:button:researchData-->
<!-- 中心人员 trials:researchRecord:dialogTitle:questionStaff-->
<el-dialog v-if="researchUserVisible" :visible.sync="researchUserVisible"
:title="$t('trials:researchRecord:button:researchData')" custom-class="base-dialog-wrapper" :fullscreen="true">
<div class="base-modal-body" style="border: 1px solid #ccc; padding: 10px">
<el-tabs v-model="activeName">
<el-tab-pane :label="$t('trials:researchRecord:dialogTitle:questionStaff')" name="first">
<Users v-if="activeName === 'first'" />
</el-tab-pane>
<el-tab-pane label="中心设备" name="second">
<Equipments v-if="activeName === 'second'" />
</el-tab-pane>
<el-tab-pane label="基本情况" name="third">
<Questions v-if="activeName === 'third'" />
</el-tab-pane>
</el-tabs>
</div>
</el-dialog>
<!-- 调查表 -->
<el-dialog v-if="researchInfoVisible" :visible.sync="researchInfoVisible" :fullscreen="true"
:close-on-click-modal="false">
<research-form v-if="researchInfoVisible" @refreshPage="getList" />
</el-dialog>
<!-- 调查表编辑 -->
<el-dialog v-if="ImageManualVisible" :visible.sync="ImageManualVisible" :fullscreen="true"
:close-on-click-modal="false" :title="$t('trials:researchRecord:dialogTitle:ImageManualEdit')">
<ImageManual v-if="ImageManualVisible" :trialSiteSurveyId="trialSiteSurveyId" @getList="getList" />
</el-dialog>
<!-- 调查表链接 -->
<base-model :config="share_model">
<template slot="dialog-body" v-loading="shareLoading">
<el-button size="small" type="primary" style="margin-bottom: 10px;" @click.stop="openImageManual">{{
$t('trials:researchRecord:label:edit')
}}</el-button>
<div style="width: 100%; display: flex">
<div class="date">
<el-form :model="shareForm" :rules="rules" ref="shareForm" label-width="100px">
<el-form-item :label="$t('trials:researchRecord:label:ExpirationDays')" prop="ExpirationDays">
<el-radio-group v-model="shareForm.ExpirationDays" @input="shareForm.OtherExpirationDays = null">
<el-radio :label="1">{{ $t('trials:researchRecord:label:day1') }}</el-radio>
<el-radio :label="7">{{ $t('trials:researchRecord:label:day7') }}</el-radio>
<el-radio :label="15">{{ $t('trials:researchRecord:label:day15') }}</el-radio>
<el-radio :label="`default`">{{ $t('trials:researchRecord:label:default') }}
<el-input placeholder="" type="number" @input="handleInput" v-model="shareForm.OtherExpirationDays"
clearable size="mini" style="width: 60px;" class="dayInput" />
<span style="margin-left: 10px;">{{ $t('trials:researchRecord:label:day') }}</span>
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('trials:researchRecord:label:LinkVerificationCode')" prop="LinkVerificationCode">
<el-radio-group v-model="shareForm.LinkVerificationCode"
@input="shareForm.OtherLinkVerificationCode = null">
<el-radio label="researchProgramNo">{{ $t('trials:researchRecord:label:researchProgramNo')
}}</el-radio>
<el-radio label="default">{{ $t('trials:researchRecord:label:default') }}
<el-input placeholder="" type="number" v-model="shareForm.OtherLinkVerificationCode" clearable
size="mini" style="width: 100px;" />
</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<el-button type="primary" round @click="setLink" style="float: right;">
{{ $t('trials:researchRecord:button:setLink') }}
</el-button>
</div>
<div class="share">
<div class="shareLink">
<h3>{{ $t('trials:researchRecord:label:link') }}</h3>
<el-input ref="shareLink" v-model="shareLink" readonly type="textarea" autosize :rows="3" />
<div class="dateBox">
<span>{{ $t('trials:researchRecord:label:linkVerificationCode') }}</span>
<span>{{ LinkVerificationCode }}</span>
</div>
<div class="dateBox">
<span>{{ $t('trials:researchRecord:label:ValidityPeriod') }}</span>
<span>{{ validityPeriod }}</span>
<span style="color: red;" v-if="isExpired">({{ $t('trials:researchRecord:label:Expired') }})</span>
</div>
<el-button type="primary" round @click="copyLink" class="shareLinkBtn"
:disabled="!validityPeriod || isExpired">
{{ $t('trials:researchRecord:button:copyLink') }}
</el-button>
</div>
<div class="shareCode">
<h3>{{ $t('trials:researchRecord:label:shareCode') }}</h3>
<div style="display: flex;align-items: center;justify-content: space-between;">
<div class="qrCodeBox">
<div id="qrcode" ref="qrcode"></div>
</div>
<div class="codeBtnBox">
<el-button @click="handleCopyImg" type="primary" round :disabled="!validityPeriod || isExpired">{{
$t('trials:researchRecord:button:copyCode')
}}</el-button>
<el-button @click="savePic" round :disabled="!validityPeriod || isExpired">{{
$t('trials:researchRecord:button:savePic')
}}</el-button>
</div>
</div>
</div>
</div>
</div>
</template>
</base-model>
<el-dialog v-if="logVisible" :visible.sync="logVisible"
:custom-class="isFullscreen ? 'full-log-dialog-container' : 'log-dialog-container'" :close-on-click-modal="false"
:fullscreen="isFullscreen" :show-close="false" width="60%" append-to-body>
<span slot="title" class="dialog-footer">
<div style="display: flex;flex-direction: row;justify-content: space-between;">
<div>
{{ $t('trials:researchForm:button:log') }}
</div>
<div>
<svg-icon :icon-class="isFullscreen ? 'exit-fullscreen' : 'fullscreen'"
style="vertical-align: baseline;cursor: pointer;font-size: 20px;" @click="toggleLogFullscreen" />
<svg-icon icon-class="dClose" style="cursor: pointer;font-size: 25px;margin-left: 10px;"
@click="logVisible = false" />
</div>
</div>
</span>
<div class="log-dialog-content">
<LogList :trial-site-survey-id="trialSiteSurveyId" />
</div>
</el-dialog>
</BaseContainer>
</template>
<script>
import {
getTrialSiteSurveyList,
getTrialSiteSelect,
abandonSiteSurvey,
setTrialLinkExpirationTime,
getTrialLinkExpirationTime,
getLinkLinkExpirationTime,
} from '@/api/trials'
import { changeURLStatic } from '@/utils/history.js'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
import Users from './users'
import Equipments from './Equipments'
import Questions from './Questions'
import ResearchForm from '@/views/research/form'
import BaseModel from '@/components/BaseModel'
import ImageManual from './ImageManual'
import QRCode from 'qrcodejs2'
import LogList from '@/views/research/components/LogList'
import { getTrialSiteSurveyList_Export } from '@/api/export'
const searchDataDefault = () => {
return {
SortField: '',
Asc: true,
PageIndex: 1,
PageSize: 20,
TrialSiteId: '',
UserKeyInfo: '',
State: null,
IsDeleted: '',
DateRange: [],
PreliminaryUserName: null,
ReviewerUserName: null,
}
}
export default {
name: 'ResearchList',
components: { BaseContainer, Pagination, Users, Equipments, Questions, ResearchForm, BaseModel, ImageManual, LogList },
props: {
isAudit: {
type: Boolean,
default: false
}
},
data() {
return {
searchData: searchDataDefault(),
loading: false,
list: [],
total: 0,
trialId: this.$route.query.trialId,
siteOptions: [],
researchUserVisible: false,
researchInfoVisible: false,
share_model: {
visible: false,
title: this.$t('trials:researchRecord:title:shark'),
width: '1000px',
},
shareLink: '',
researchState: this.$d.ResearchRecord,
qrcode: null,
validityPeriod: null,
LinkVerificationCode: null,
isExpired: false,
shareLoading: false,
shareForm: {
ExpirationDays: null,
OtherExpirationDays: null,
LinkVerificationCode: null,
OtherLinkVerificationCode: null,
},
rules: {
ExpirationDays: [
{ required: true, message: this.$t("common:ruleMessage:select"), trigger: 'blur' },
{
validator: (rule, value, callback) => {
if (value === 'default' && !this.shareForm.OtherExpirationDays) {
callback(new Error(this.$t("common:ruleMessage:specify")));
} else {
callback()
}
}, trigger: 'blur'
}
],
LinkVerificationCode: [
{ required: true, message: this.$t("common:ruleMessage:select"), trigger: 'blur' },
{
validator: (rule, value, callback) => {
if (value === 'default' && !this.shareForm.OtherLinkVerificationCode) {
callback(new Error(this.$t("common:ruleMessage:specify")));
} else {
callback()
}
}, trigger: 'blur'
}
],
},
ImageManualVisible: false,
trialSiteSurveyId: null,
activeName: 'first',
isFullscreen: false,
logVisible: false
}
},
mounted() {
// this.getList()
this.getSite()
},
methods: {
async handleExport() {
await getTrialSiteSurveyList_Export(this.searchData)
},
toggleLogFullscreen() {
this.isFullscreen = !this.isFullscreen
},
viewLog(row) {
this.trialSiteSurveyId = row.Id
this.isFullscreen = false
this.logVisible = true
},
async getLinkTimeIsExpired() {
try {
let data = {
TrialId: this.$route.query.trialId,
}
this.shareLoading = true
let res = await getLinkLinkExpirationTime(data)
this.shareLoading = false
if (res.IsSuccess) {
this.isExpired = res.Result.IsIsExpired
}
} catch (err) {
this.shareLoading = false
console.log(err)
}
},
async getLinkTime() {
try {
let data = {
TrialId: this.$route.query.trialId,
}
this.shareLoading = true
let res = await getTrialLinkExpirationTime(data)
this.shareLoading = false
if (res.IsSuccess) {
this.validityPeriod = res.Result.LinkExpirationTime
this.LinkVerificationCode = res.Result.LinkVerificationCode || res.Result.ResearchProgramNo
if (!this.validityPeriod) {
this.LinkVerificationCode = null
}
if (!this.validityPeriod) return false
this.getLinkTimeIsExpired()
this.shareLink = `${location.protocol}//${location.host}/researchLogin?trialId=${this.$route.query.trialId}`
this.$nextTick(() => {
this.creatQrCode()
})
}
} catch (err) {
this.shareLoading = false
console.log(err)
}
},
async setLink() {
try {
let validate = await this.$refs.shareForm.validate()
if (!validate) return false
let data = {
TrialId: this.$route.query.trialId,
ExpirationDays: this.shareForm.ExpirationDays,
LinkVerificationCode: this.shareForm.LinkVerificationCode
}
if (this.shareForm.LinkVerificationCode === 'researchProgramNo') {
data.LinkVerificationCode = null
}
if (this.shareForm.LinkVerificationCode === 'default') {
data.LinkVerificationCode = this.shareForm.OtherLinkVerificationCode
}
if (this.shareForm.ExpirationDays === 'default') {
data.ExpirationDays = this.shareForm.OtherExpirationDays
}
this.shareLoading = true
let res = await setTrialLinkExpirationTime(data)
this.shareLoading = false
if (res.IsSuccess) {
this.getLinkTime()
}
} catch (err) {
this.shareLoading = false
console.log(err)
}
},
handleInput(val) {
//
this.shareForm.OtherExpirationDays = val.replace(/[^\d]/g, '').replace(/^0+/, '')
},
openImageManual() {
// if (!this.trialSiteSurveyId) return false
this.ImageManualVisible = true
},
//
getList() {
this.loading = true
this.searchData.TrialId = this.trialId
if (this.searchData.DateRange && this.searchData.DateRange.length === 2) {
this.searchData.UpdateTimeBegin = this.searchData.DateRange[0]
this.searchData.updateTimeEnd = this.searchData.DateRange[1]
} else {
this.searchData.UpdateTimeBegin = ''
this.searchData.updateTimeEnd = ''
}
getTrialSiteSurveyList(this.searchData)
.then((res) => {
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
})
.catch(() => {
this.loading = false
})
},
//
handleViewResearchList(row) {
changeURLStatic('trialSiteSurveyId', row.Id)
this.researchInfoVisible = true
},
//
handleRepealResearch(row) {
//
this.$confirm(this.$t('trials:researchRecord:message:abolish'), {
type: 'warning',
distinguishCancelAndClose: true,
}).then(() => {
abandonSiteSurvey(this.trialId, row.Id).then((res) => {
if (res.IsSuccess) {
this.getList()
//
this.$message.success(
this.$t('trials:researchRecord:message:abolishSuccessfully')
)
}
})
})
},
//
showResearchUser() {
this.researchUserVisible = true
this.activeName = 'first'
},
//
copyLink() {
//
this.$copyText(
`${this.$t('trials:researchRecord:message:researchFormLink')}: ${this.shareLink
}\n${this.$t('trials:researchRecord:label:linkVerificationCode')}${this.LinkVerificationCode}\n${this.$t('trials:researchRecord:label:ValidityPeriod')}${this.validityPeriod}`
)
.then((res) => {
//
this.$message.success(
this.$t('trials:researchRecord:message:copySuccessfully')
)
})
.catch(() => {
//
this.$alert(this.$t('trials:researchRecord:message:copyFailed'))
})
},
//
creatQrCode() {
this.$refs.qrcode.innerHTML = '' //
let text = this.shareLink
this.qrcode = new QRCode(this.$refs.qrcode, {
text: text, // ,#
width: 200,
height: 200,
colorDark: '#000000',
colorLight: '#ffffff',
correctLevel: QRCode.CorrectLevel.H,
})
// qrcode.clear(); //
},
//
savePic() {
let qrCodeCanvas = document
.getElementById('qrcode')
.getElementsByTagName('canvas')
let a = document.createElement('a')
a.href = qrCodeCanvas[0].toDataURL('image/url')
a.download = `${this.$route.query.researchProgramNo}${this.$t('trials:researchRecord:title:code')}.png`
a.click()
},
//
handleCopyImg() {
let qrCodeCanvas = document
.getElementById('qrcode')
.getElementsByTagName('canvas')
qrCodeCanvas[0].toBlob(async (blob) => {
console.log(blob)
const data = [
new ClipboardItem({
[blob.type]: blob,
}),
] // https://w3c.github.io/clipboard-apis/#dom-clipboard-write
await navigator.clipboard.write(data).then(
() => {
this.$message.success(
this.$t('trials:researchRecord:message:copySuccess')
)
},
() => {
this.$message.error(
this.$t('trials:researchRecord:message:UnableWrite')
)
}
)
})
},
// site
getSite() {
getTrialSiteSelect(this.trialId).then((res) => {
this.siteOptions = res.Result
})
},
//
showResearchLink() {
this.shareForm = {
ExpirationDays: null,
OtherExpirationDays: null,
LinkVerificationCode: null,
OtherLinkVerificationCode: null,
}
this.validityPeriod = null
this.isExpired = false
this.share_model.visible = true
this.getLinkTime()
// &lang=${this.$i18n.locale}
// this.trialSiteSurveyId = this.list[0].Id
},
//
handleReset() {
const state = this.searchData.State
this.searchData = searchDataDefault()
this.searchData.DateRange = []
if (this.searchData.DateRange && this.searchData.DateRange.length === 2) {
this.searchData.UpdateTimeBegin = this.searchData.DateRange[0]
this.searchData.updateTimeEnd = this.searchData.DateRange[1]
} else {
this.searchData.UpdateTimeBegin = ''
this.searchData.updateTimeEnd = ''
}
this.searchData.State = state
this.getList()
this.$nextTick(() => {
this.$refs.siteResearchList.clearSort()
})
},
//
handleSearch() {
this.getList()
},
//
handleSortByColumn(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
} else {
this.searchData.Asc = false
}
this.searchData.SortField = column.prop
this.getList()
},
},
beforeDestroy() {
if (this.qrcode) {
this.qrcode = null
}
},
}
</script>
<style lang="scss" scoped>
.date,
.share {
width: 55%;
height: 100%;
}
.dayInput {
::v-deep .el-input__inner {
padding-left: 5px;
}
}
.date {
padding-right: 10px;
}
.share {
width: 45%;
padding-left: 5%;
border-left: 1px solid #f0f0f0;
box-sizing: border-box;
}
.shareLinkBtn {
float: right;
}
.qrCodeBox {
width: 220px;
height: 220px;
display: flex;
border: 1px solid #c0c4cc;
border-radius: 5px;
box-shadow: 1px 1px 5px #c0c4cc;
align-items: center;
justify-content: center;
}
.dateBox {
margin: 10px;
}
.codeBtnBox {
::v-deep .el-button {
display: block;
margin: 10px auto;
}
}
</style>
@@ -6,33 +6,31 @@
<!-- 中心编号 -->
<el-form-item :label="$t('trials:researchStaff: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-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:researchRecord:table:status')">
<el-select v-model="searchData.State" clearable filterable style="width: 120px">
<el-option v-for="(item, index) of $d.ResearchRecord" :key="index" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<!-- 是否废除 -->
<!-- <el-form-item :label="$t('trials:researchRecord:table:isDeleted')">
<el-select v-model="searchData.IsDeleted" clearable filterable style="width: 120px">
<el-option v-for="item of $d.YesOrNo" v-show="item.raw.ValueCN !== '无'" :key="`IsDeleted${item.value}`"
:label="item.label" :value="item.value" />
</el-select>
</el-form-item> -->
<!-- 姓名 -->
<el-form-item :label="$t('trials:researchStaff:table:Name')">
<el-input v-model="searchData.UserName" class="mr" clearable style="width:120px;" />
</el-form-item>
<!-- 角色 -->
<el-form-item :label="$t('trials:researchStaff:table:role')">
<el-select v-model="searchData.TrialRoleCode" style="width:120px;" clearable>
<el-option v-for="item of dict.type.SiteSurvey_UserRoles" :key="item.value" :label="item.label"
:value="parseInt(item.raw.Code)" />
<el-select
v-model="searchData.TrialRoleCode"
style="width:120px;"
clearable
>
<el-option
v-for="item of dict.type.SiteSurvey_UserRoles"
:key="item.value"
:label="item.label"
:value="parseInt(item.raw.Code)"
/>
</el-select>
</el-form-item>
<!-- 单位 -->
@@ -41,19 +39,42 @@
</el-form-item>
<!-- 是否生成账号 -->
<el-form-item :label="$t('trials:researchStaff:table:isGenerateAccount')">
<el-select v-model="searchData.IsGenerateAccount" style="width:120px;" clearable>
<el-option v-for="item of $d.YesOrNo" :key="`IsGenerateAccount${item.value}`" :label="item.label"
:value="item.value" />
<el-select
v-model="searchData.IsGenerateAccount"
style="width:120px;"
clearable
>
<el-option v-for="item of $d.YesOrNo" :key="`IsGenerateAccount${item.value}`" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<!-- 用户类型 -->
<el-form-item :label="$t('trials:researchStaff:table:userType')">
<el-select v-model="searchData.UserTypeId" style="width:120px;" clearable>
<el-option v-for="item of userTypeOptions" :key="item.Id" :label="item.UserTypeShortName" :value="item.Id">
<el-select
v-model="searchData.UserTypeId"
style="width:120px;"
clearable
>
<el-option
v-for="item of userTypeOptions"
: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:researchStaff:table:status')">
<el-select v-model="searchData.State" clearable filterable style="width:120px;">
<el-option
v-for="(item,index) of researchUserState"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item> -->
<el-form-item>
<!-- 查询 -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
@@ -68,15 +89,25 @@
</el-form-item>
<!-- 发邮件 -->
<el-form-item>
<el-button v-hasPermi="['trials:trials-panel:attachments:site-research:summary-record:sendEmail']"
type="primary" icon="el-icon-message" :loading="sendEmailLoading" :disabled="selectArr.length === 0"
@click="handleSendEmail">
<el-button
v-hasPermi="['trials:trials-panel:attachments:site-research:summary-record:sendEmail']"
type="primary"
icon="el-icon-message"
:loading="sendEmailLoading"
:disabled="selectArr.length === 0"
@click="handleSendEmail"
>
{{ $t('trials:researchRecord:dialogButton:sendEmail') }}
</el-button>
</el-form-item>
<!-- 导出 -->
<el-form-item>
<el-button type="primary" icon="el-icon-download" :disabled="list.length === 0" @click="handleExport">
<el-button
type="primary"
icon="el-icon-download"
:disabled="list.length === 0"
@click="handleExport"
>
{{ $t('common:button:export') }}
</el-button>
</el-form-item>
@@ -85,74 +116,96 @@
<template slot="main-container">
<!-- 系统文件列表 -->
<el-table ref="researchUsers" v-loading="loading" v-adaptive="{ bottomOffset: 55 }" :data="list" stripe
height="100" @selection-change="handleSelectChange" @sort-change="handleSortByColumn">
<el-table-column type="selection" width="50" :selectable="handleSelectTable" />
<el-table
ref="researchUsers"
v-loading="loading"
v-adaptive="{bottomOffset:70}"
:data="list"
stripe
height="100"
@selection-change="handleSelectChange"
@sort-change="handleSortByColumn"
>
<el-table-column
type="selection"
width="50"
:selectable="handleSelectTable"
/>
<el-table-column type="index" width="50" />
<!-- 中心编号 -->
<el-table-column prop="TrialSiteSurvey.TrialSiteCode" :label="$t('trials:researchStaff:table:siteId')"
show-overflow-tooltip sortable="custom" min-width="100">
<el-table-column
prop="TrialSiteSurvey.TrialSiteCode"
:label="$t('trials:researchStaff:table:siteId')"
show-overflow-tooltip
sortable="custom"
min-width="100"
>
<template slot-scope="scope">{{ `${scope.row.TrialSiteSurvey.TrialSiteCode}` }}</template>
</el-table-column>
<!-- 中心名称 -->
<el-table-column prop="TrialSiteSurvey.SiteName" :label="$t('trials:researchStaff:table:siteName')"
show-overflow-tooltip sortable="custom" min-width="120">
<el-table-column
prop="TrialSiteSurvey.SiteName"
:label="$t('trials:researchStaff:table:siteName')"
show-overflow-tooltip
sortable="custom"
min-width="120"
>
<template slot-scope="scope">{{ `${scope.row.TrialSiteSurvey.SiteName}` }}</template>
</el-table-column>
<!-- 状态 -->
<el-table-column prop="State" :label="$t('trials:researchRecord:table:status')" min-width="150"
sortable="custom" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.State === 0" type="primary">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
<el-tag v-if="scope.row.State === 1" type="info">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
<el-tag v-if="scope.row.State === 2" type="warning">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
<el-tag v-if="scope.row.State === 3" type="danger">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
</template>
</el-table-column>
<!-- 是否废除 -->
<!-- <el-table-column prop="IsDeleted" :label="$t('trials:researchRecord:table:isDeleted')" min-width="100"
sortable="custom" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
$fd('YesOrNo', scope.row.IsDeleted)
}}</el-tag>
<el-tag v-else type="primary">{{
$fd('YesOrNo', scope.row.IsDeleted)
}}</el-tag>
</template>
</el-table-column> -->
<!-- 姓名 -->
<el-table-column prop="LastName" :label="$t('trials:researchStaff:table:Name')" show-overflow-tooltip
sortable="custom" min-width="100">
<el-table-column
prop="LastName"
:label="$t('trials:researchStaff:table:Name')"
show-overflow-tooltip
sortable="custom"
min-width="100"
>
<template slot-scope="scope">{{ `${scope.row.LastName} / ${scope.row.FirstName}` }}</template>
</el-table-column>
<!-- 角色 -->
<el-table-column prop="TrialRoleCode" :label="$t('trials:researchStaff:table:role')" show-overflow-tooltip
sortable="custom" min-width="100">
<el-table-column
prop="TrialRoleCode"
:label="$t('trials:researchStaff:table:role')"
show-overflow-tooltip
sortable="custom"
min-width="100"
>
<template slot-scope="scope">
{{ $fd('SiteSurvey_UserRoles', scope.row.TrialRoleCode) }}
{{ $fd('SiteSurvey_UserRoles',scope.row.TrialRoleCode) }}
</template>
</el-table-column>
<!-- 电话号码 -->
<el-table-column prop="Phone" :label="$t('trials:researchStaff:table:phone')" show-overflow-tooltip
sortable="custom" min-width="120" />
<el-table-column
prop="Phone"
:label="$t('trials:researchStaff:table:phone')"
show-overflow-tooltip
sortable="custom"
min-width="120"
/>
<!-- 邮箱 -->
<el-table-column prop="Email" :label="$t('trials:researchStaff:table:email')" show-overflow-tooltip
sortable="custom" min-width="150" />
<el-table-column
prop="Email"
:label="$t('trials:researchStaff:table:email')"
show-overflow-tooltip
sortable="custom"
min-width="150"
/>
<!-- 单位 -->
<el-table-column prop="OrganizationName" :label="$t('trials:researchStaff:table:organization')"
show-overflow-tooltip sortable="custom" min-width="100" />
<el-table-column
prop="OrganizationName"
:label="$t('trials:researchStaff:table:organization')"
show-overflow-tooltip
sortable="custom"
min-width="100"
/>
<!-- 是否生成账号 -->
<el-table-column prop="IsGenerateAccount" :label="$t('trials:researchStaff:table:isGenerateAccount')"
show-overflow-tooltip sortable="custom" min-width="130">
<el-table-column
prop="IsGenerateAccount"
:label="$t('trials:researchStaff:table:isGenerateAccount')"
show-overflow-tooltip
sortable="custom"
min-width="130"
>
<template slot-scope="scope">
{{ $fd('YesOrNo', scope.row.IsGenerateAccount) }}
</template>
@@ -170,11 +223,21 @@
<!-- </el-table-column>-->
<!-- 用户类型 -->
<el-table-column prop="UserType" :label="$t('trials:researchStaff:table:userType')" show-overflow-tooltip
sortable="custom" min-width="100" />
<el-table-column
prop="UserType"
:label="$t('trials:researchStaff:table:userType')"
show-overflow-tooltip
sortable="custom"
min-width="100"
/>
<!-- 是否加入 -->
<el-table-column prop="IsJoin" :label="$t('trials:researchStaff:table:isJoin')" show-overflow-tooltip
sortable="custom" min-width="100">
<el-table-column
prop="IsJoin"
:label="$t('trials:researchStaff:table:isJoin')"
show-overflow-tooltip
sortable="custom"
min-width="100"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.IsJoin" type="info">{{ $fd('IsJoin', scope.row.IsJoin) }}</el-tag>
<el-tag v-else type="danger">{{ $fd('IsJoin', scope.row.IsJoin) }}</el-tag>
@@ -183,8 +246,7 @@
</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>
</BaseContainer>
</template>
@@ -234,6 +296,7 @@ export default {
}
},
mounted() {
console.log(this.dict.type.SiteSurvey_UserRoles)
this.getList()
this.getSite()
this.getUserType()
@@ -1,208 +1,670 @@
<template>
<BaseContainer>
<div class="step-wrapper">
<el-steps :active="activeStatus" align-center :space="300">
<!-- 中心填写 -->
<el-step :title="$t('trials:siteResearch:timeline:step1')" class="click_cursor"
@click.native="handleClick(0)" />
<!-- SPM审核 -->
<el-step v-if="isSPMJoin" :title="$t('trials:siteResearch:timeline:step2')" class="click_cursor"
@click.native="handleClick(1)" />
<!-- PM审核 -->
<el-step :title="$t('trials:siteResearch:timeline:step3')" class="click_cursor"
@click.native="handleClick(2)" />
<!-- 审核完毕 -->
<el-step :title="$t('trials:siteResearch:timeline:step14')" class="click_cursor"
@click.native="handleClick(3)" />
</el-steps>
<div class="step-content">
<ResearchList ref="researchList" :isAudit="isAudit" />
<!-- 搜索框 -->
<template slot="search-container">
<el-form :inline="true">
<!-- 中心 -->
<el-form-item :label="$t('trials:researchRecord: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>
</el-form-item>
<!-- 联系人 -->
<el-form-item :label="$t('trials:researchRecord:table:contactor')">
<el-input v-model="searchData.UserKeyInfo" class="mr" clearable :placeholder="`${$t(
'trials:researchRecord:placeholder:contactorInfo'
)}`" style="width: 140px" />
</el-form-item>
<!-- 初审人 -->
<el-form-item :label="$t('trials:researchRecord:table:preliminaryUser')">
<el-input v-model="searchData.PreliminaryUserName" class="mr" clearable style="width: 140px" />
</el-form-item>
<!-- 审核人 -->
<el-form-item :label="$t('trials:researchRecord:table:ReviewerUser')">
<el-input v-model="searchData.ReviewerUserName" class="mr" clearable style="width: 140px" />
</el-form-item>
<!-- 状态 -->
<el-form-item :label="$t('trials:researchRecord:table:status')">
<el-select v-model="searchData.State" clearable filterable style="width: 120px">
<el-option v-for="(item, index) of $d.ResearchRecord" :key="index" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<!-- 是否废除 -->
<el-form-item :label="$t('trials:researchRecord:table:isDeleted')">
<el-select v-model="searchData.IsDeleted" clearable filterable style="width: 120px">
<el-option v-for="item of $d.YesOrNo" v-show="item.raw.ValueCN !== '无'" :key="`IsDeleted${item.value}`"
:label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<!-- 更新时间 -->
<el-form-item :label="$t('trials:researchRecord:table:updateTime')">
<el-date-picker v-model="searchData.DateRange" type="daterange" value-format="yyyy-MM-dd" format="yyyy-MM-dd"
style="width: 250px" />
</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 v-hasPermi="[
'trials:trials-panel:attachments:site-research:summary-record',
]" type="primary" icon="el-icon-info" @click="showResearchUser">
{{ $t('trials:researchRecord:button:questionStaffs') }}
</el-button>
<!-- 调查表链接 -->
<el-button v-hasPermi="[
'trials:trials-panel:attachments:site-research:questionnaire-link',
]" type="primary" icon="el-icon-link" @click="showResearchLink">
{{ $t('trials:researchRecord:button:questionLink') }}
</el-button>
</el-form>
</template>
<template slot="main-container">
<!-- 系统文件列表 -->
<el-table ref="siteResearchList" v-loading="loading" v-adaptive="{ bottomOffset: 60 }" :data="list" stripe
height="100" @sort-change="handleSortByColumn">
<el-table-column type="index" width="50" />
<!-- 中心编号 -->
<el-table-column prop="TrialSiteCode" :label="$t('trials:researchRecord:table:siteId')" min-width="100"
sortable="custom" show-overflow-tooltip />
<!-- 中心名称 -->
<el-table-column prop="SiteName" :label="$t('trials:researchRecord:table:siteName')" min-width="100"
sortable="custom" show-overflow-tooltip />
<!-- 联系人 -->
<el-table-column prop="UserName" :label="$t('trials:researchRecord:table:contactor')" min-width="100"
sortable="custom" show-overflow-tooltip />
<!-- 联系电话 -->
<el-table-column prop="Phone" :label="$t('trials:researchRecord:table:contactorPhone')" min-width="100"
show-overflow-tooltip />
<!-- 联系邮箱 -->
<el-table-column prop="Email" :label="$t('trials:researchRecord:table:contactorEmail')" min-width="150"
show-overflow-tooltip />
<!-- 初审人 -->
<el-table-column prop="preliminaryUser" :label="$t('trials:researchRecord:table:preliminaryUser')"
min-width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{
scope.row.PreliminaryUser
? scope.row.PreliminaryUser.RealName
: ''
}}
</template>
</el-table-column>
<!-- 审核人 -->
<el-table-column prop="ReviewerUser" :label="$t('trials:researchRecord:table:ReviewerUser')" min-width="150"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.ReviewerUser ? scope.row.ReviewerUser.RealName : '' }}
</template>
</el-table-column>
<!-- 状态 -->
<el-table-column prop="State" :label="$t('trials:researchRecord:table:status')" min-width="150"
sortable="custom" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.State === 0" type="primary">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
<el-tag v-if="scope.row.State === 1" type="info">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
<el-tag v-if="scope.row.State === 2" type="warning">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
<el-tag v-if="scope.row.State === 3" type="danger">{{
$fd('ResearchRecord', scope.row.State)
}}</el-tag>
</template>
</el-table-column>
<!-- 是否废除 -->
<el-table-column prop="IsDeleted" :label="$t('trials:researchRecord:table:isDeleted')" min-width="100"
sortable="custom" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
$fd('YesOrNo', scope.row.IsDeleted)
}}</el-tag>
<el-tag v-else type="primary">{{
$fd('YesOrNo', scope.row.IsDeleted)
}}</el-tag>
</template>
</el-table-column>
<!-- 更新时间 -->
<el-table-column prop="UpdateTime" :label="$t('trials:researchRecord:table:updateTime')" min-width="150"
show-overflow-tooltip sortable="custom" />
<el-table-column width="150">
<template slot-scope="scope">
<!-- 查看 -->
<el-button :disabled="scope.row.State !== 3" circle :title="$t('common:button:view')" icon="el-icon-view"
@click="handleViewResearchList(scope.row)" />
<!-- 审批 -->
<el-button v-hasPermi="[
'trials:trials-panel:attachments:site-research:auidt',
]" :disabled="scope.row.State === 0 || scope.row.State === 3 || scope.row.IsDeleted" circle
:title="$t('trials:researchRecord:action:view')" icon="el-icon-s-check"
@click="handleViewResearchList(scope.row)" />
<!-- 废除 -->
<el-button v-hasPermi="[
'trials:trials-panel:attachments:site-research:abolish',
]" :disabled="scope.row.State !== 0 || scope.row.IsDeleted" circle
:title="$t('trials:researchRecord:action:abolish')" icon="el-icon-delete"
@click="handleRepealResearch(scope.row)" />
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
</template>
<!-- 中心人员 -->
<el-dialog v-if="researchUserVisible" :visible.sync="researchUserVisible"
:title="$t('trials:researchRecord:dialogTitle:questionStaff')" custom-class="base-dialog-wrapper"
:fullscreen="true">
<div class="base-modal-body" style="border: 1px solid #ccc; padding: 10px">
<Users v-if="researchUserVisible" />
</div>
</div>
</el-dialog>
<!-- 调查表 -->
<el-dialog v-if="researchInfoVisible" :visible.sync="researchInfoVisible" :fullscreen="true"
:close-on-click-modal="false">
<research-form v-if="researchInfoVisible" @refreshPage="getList" />
</el-dialog>
<!-- 调查表编辑 -->
<el-dialog v-if="ImageManualVisible" :visible.sync="ImageManualVisible" :fullscreen="true"
:close-on-click-modal="false" :title="$t('trials:researchRecord:dialogTitle:ImageManualEdit')">
<ImageManual v-if="ImageManualVisible" :trialSiteSurveyId="trialSiteSurveyId" @getList="getList" />
</el-dialog>
<!-- 调查表链接 -->
<base-model :config="share_model">
<template slot="dialog-body" v-loading="shareLoading">
<el-button size="small" type="primary" style="margin-bottom: 10px;" @click.stop="openImageManual">{{
$t('trials:researchRecord:label:edit')
}}</el-button>
<div style="width: 100%; display: flex">
<div class="date">
<el-form :model="shareForm" :rules="rules" ref="shareForm" label-width="100px">
<el-form-item :label="$t('trials:researchRecord:label:ExpirationDays')" prop="ExpirationDays">
<el-radio-group v-model="shareForm.ExpirationDays" @input="shareForm.OtherExpirationDays = null">
<el-radio :label="1">{{ $t('trials:researchRecord:label:day1') }}</el-radio>
<el-radio :label="7">{{ $t('trials:researchRecord:label:day7') }}</el-radio>
<el-radio :label="15">{{ $t('trials:researchRecord:label:day15') }}</el-radio>
<el-radio :label="`default`">{{ $t('trials:researchRecord:label:default') }}
<el-input placeholder="" type="number" @input="handleInput" v-model="shareForm.OtherExpirationDays"
clearable size="mini" style="width: 60px;" class="dayInput" />
<span style="margin-left: 10px;">{{ $t('trials:researchRecord:label:day') }}</span>
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('trials:researchRecord:label:LinkVerificationCode')" prop="LinkVerificationCode">
<el-radio-group v-model="shareForm.LinkVerificationCode"
@input="shareForm.OtherLinkVerificationCode = null">
<el-radio label="researchProgramNo">{{ $t('trials:researchRecord:label:researchProgramNo')
}}</el-radio>
<el-radio label="default">{{ $t('trials:researchRecord:label:default') }}
<el-input placeholder="" type="number" v-model="shareForm.OtherLinkVerificationCode" clearable
size="mini" style="width: 100px;" />
</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<el-button type="primary" round @click="setLink" style="float: right;">
{{ $t('trials:researchRecord:button:setLink') }}
</el-button>
</div>
<div class="share">
<div class="shareLink">
<h3>{{ $t('trials:researchRecord:label:link') }}</h3>
<el-input ref="shareLink" v-model="shareLink" readonly type="textarea" autosize :rows="3" />
<div class="dateBox">
<span>{{ $t('trials:researchRecord:label:linkVerificationCode') }}</span>
<span>{{ LinkVerificationCode }}</span>
</div>
<div class="dateBox">
<span>{{ $t('trials:researchRecord:label:ValidityPeriod') }}</span>
<span>{{ validityPeriod }}</span>
<span style="color: red;" v-if="isExpired">({{ $t('trials:researchRecord:label:Expired') }})</span>
</div>
<el-button type="primary" round @click="copyLink" class="shareLinkBtn"
:disabled="!validityPeriod || isExpired">
{{ $t('trials:researchRecord:button:copyLink') }}
</el-button>
</div>
<div class="shareCode">
<h3>{{ $t('trials:researchRecord:label:shareCode') }}</h3>
<div style="display: flex;align-items: center;justify-content: space-between;">
<div class="qrCodeBox">
<div id="qrcode" ref="qrcode"></div>
</div>
<div class="codeBtnBox">
<el-button @click="handleCopyImg" type="primary" round :disabled="!validityPeriod || isExpired">{{
$t('trials:researchRecord:button:copyCode')
}}</el-button>
<el-button @click="savePic" round :disabled="!validityPeriod || isExpired">{{
$t('trials:researchRecord:button:savePic')
}}</el-button>
</div>
</div>
</div>
</div>
</div>
</template>
</base-model>
</BaseContainer>
</template>
<script>
import { getTrialIsSPMJoin } from '@/api/research'
import {
getTrialSiteSurveyList,
getTrialSiteSelect,
abandonSiteSurvey,
setTrialLinkExpirationTime,
getTrialLinkExpirationTime,
getLinkLinkExpirationTime,
} from '@/api/trials'
import { changeURLStatic } from '@/utils/history.js'
import BaseContainer from '@/components/BaseContainer'
import ResearchList from './components/ResearchList'
import Pagination from '@/components/Pagination'
import Users from './components/users'
import ResearchForm from '@/views/research/form'
import BaseModel from '@/components/BaseModel'
import ImageManual from './components/ImageManual'
import QRCode from 'qrcodejs2'
const searchDataDefault = () => {
return {
SortField: '',
Asc: true,
PageIndex: 1,
PageSize: 20,
TrialSiteId: '',
UserKeyInfo: '',
State: null,
IsDeleted: '',
DateRange: [],
PreliminaryUserName: null,
ReviewerUserName: null,
}
}
export default {
name: 'SiteResearch',
components: {
BaseContainer,
ResearchList
},
name: 'SiteResearchList',
components: { BaseContainer, Pagination, Users, ResearchForm, BaseModel, ImageManual },
data() {
return {
isSPMJoin: true,
activeStatus: 0
}
},
watch: {
activeStatus: {
deep: true,
immediate: true,
handler(v) {
this.$nextTick(() => {
if (!this.isSPMJoin && v > 0) {
this.$refs['researchList'].searchData.State = v + 1
} else {
this.$refs['researchList'].searchData.State = v
searchData: searchDataDefault(),
loading: false,
list: [],
total: 0,
trialId: this.$route.query.trialId,
siteOptions: [],
researchUserVisible: false,
researchInfoVisible: false,
share_model: {
visible: false,
title: this.$t('trials:researchRecord:title:shark'),
width: '1000px',
},
shareLink: '',
researchState: this.$d.ResearchRecord,
qrcode: null,
validityPeriod: null,
LinkVerificationCode: null,
isExpired: false,
shareLoading: false,
shareForm: {
ExpirationDays: null,
OtherExpirationDays: null,
LinkVerificationCode: null,
OtherLinkVerificationCode: null,
},
rules: {
ExpirationDays: [
{ required: true, message: this.$t("common:ruleMessage:select"), trigger: 'blur' },
{
validator: (rule, value, callback) => {
if (value === 'default' && !this.shareForm.OtherExpirationDays) {
callback(new Error(this.$t("common:ruleMessage:specify")));
} else {
callback()
}
}, trigger: 'blur'
}
],
LinkVerificationCode: [
{ required: true, message: this.$t("common:ruleMessage:select"), trigger: 'blur' },
{
validator: (rule, value, callback) => {
if (value === 'default' && !this.shareForm.OtherLinkVerificationCode) {
callback(new Error(this.$t("common:ruleMessage:specify")));
} else {
callback()
}
this.$refs['researchList'].getList()
})
}
}
},
computed: {
isAudit() {
if (this.isSPMJoin) {
return (this.hasPermi(['role:spm', 'role:cpm', 'role:apm']) && this.activeStatus === 1) || (this.hasPermi(['role:pm']) && this.activeStatus === 2)
} else {
return this.hasPermi(['role:pm']) && this.activeStatus === 1
}
}, trigger: 'blur'
}
],
},
ImageManualVisible: false,
trialSiteSurveyId: null,
}
},
mounted() {
this.getTrialIsSPMJoin()
this.getList()
this.getSite()
},
methods: {
async getTrialIsSPMJoin() {
async getLinkTimeIsExpired() {
try {
let trialId = this.$route.query.trialId
if (!trialId) return
let res = await getTrialIsSPMJoin(trialId)
this.isSPMJoin = res.Result
if (this.isSPMJoin) {
if (this.hasPermi(['role:pm'])) this.activeStatus = 2
if (this.hasPermi(['role:spm', 'role:cpm', 'role:apm'])) this.activeStatus = 1
} else {
if (this.hasPermi(['role:pm'])) this.activeStatus = 1
if (this.hasPermi(['role:spm', 'role:cpm', 'role:apm'])) this.activeStatus = 0
let data = {
TrialId: this.$route.query.trialId,
}
} catch (e) {
console.log(e)
this.shareLoading = true
let res = await getLinkLinkExpirationTime(data)
this.shareLoading = false
if (res.IsSuccess) {
this.isExpired = res.Result.IsIsExpired
}
} catch (err) {
this.shareLoading = false
console.log(err)
}
},
handleClick(step) {
this.activeStatus = step
if (!this.isSPMJoin && step > 0) this.activeStatus = step - 1
async getLinkTime() {
try {
let data = {
TrialId: this.$route.query.trialId,
}
this.shareLoading = true
let res = await getTrialLinkExpirationTime(data)
this.shareLoading = false
if (res.IsSuccess) {
this.validityPeriod = res.Result.LinkExpirationTime
this.LinkVerificationCode = res.Result.LinkVerificationCode || res.Result.ResearchProgramNo
if (!this.validityPeriod) {
this.LinkVerificationCode = null
}
if (!this.validityPeriod) return false
this.getLinkTimeIsExpired()
this.shareLink = `${location.protocol}//${location.host}/researchLogin?trialId=${this.$route.query.trialId}`
this.$nextTick(() => {
this.creatQrCode()
})
}
} catch (err) {
this.shareLoading = false
console.log(err)
}
},
}
async setLink() {
try {
let validate = await this.$refs.shareForm.validate()
if (!validate) return false
let data = {
TrialId: this.$route.query.trialId,
ExpirationDays: this.shareForm.ExpirationDays,
LinkVerificationCode: this.shareForm.LinkVerificationCode
}
if (this.shareForm.LinkVerificationCode === 'researchProgramNo') {
data.LinkVerificationCode = null
}
if (this.shareForm.LinkVerificationCode === 'default') {
data.LinkVerificationCode = this.shareForm.OtherLinkVerificationCode
}
if (this.shareForm.ExpirationDays === 'default') {
data.ExpirationDays = this.shareForm.OtherExpirationDays
}
this.shareLoading = true
let res = await setTrialLinkExpirationTime(data)
this.shareLoading = false
if (res.IsSuccess) {
this.getLinkTime()
}
} catch (err) {
this.shareLoading = false
console.log(err)
}
},
handleInput(val) {
//
this.shareForm.OtherExpirationDays = val.replace(/[^\d]/g, '').replace(/^0+/, '')
},
openImageManual() {
// if (!this.trialSiteSurveyId) return false
this.ImageManualVisible = true
},
//
getList() {
this.loading = true
this.searchData.TrialId = this.trialId
if (this.searchData.DateRange && this.searchData.DateRange.length === 2) {
this.searchData.UpdateTimeBegin = this.searchData.DateRange[0]
this.searchData.updateTimeEnd = this.searchData.DateRange[1]
} else {
this.searchData.UpdateTimeBegin = ''
this.searchData.updateTimeEnd = ''
}
getTrialSiteSurveyList(this.searchData)
.then((res) => {
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
})
.catch(() => {
this.loading = false
})
},
//
handleViewResearchList(row) {
changeURLStatic('trialSiteSurveyId', row.Id)
this.researchInfoVisible = true
},
//
handleRepealResearch(row) {
//
this.$confirm(this.$t('trials:researchRecord:message:abolish'), {
type: 'warning',
distinguishCancelAndClose: true,
}).then(() => {
abandonSiteSurvey(this.trialId, row.Id).then((res) => {
if (res.IsSuccess) {
this.getList()
//
this.$message.success(
this.$t('trials:researchRecord:message:abolishSuccessfully')
)
}
})
})
},
//
showResearchUser() {
this.researchUserVisible = true
},
//
copyLink() {
//
this.$copyText(
`${this.$t('trials:researchRecord:message:researchFormLink')}: ${this.shareLink
}\n${this.$t('trials:researchRecord:label:linkVerificationCode')}${this.LinkVerificationCode}\n${this.$t('trials:researchRecord:label:ValidityPeriod')}${this.validityPeriod}`
)
.then((res) => {
//
this.$message.success(
this.$t('trials:researchRecord:message:copySuccessfully')
)
})
.catch(() => {
//
this.$alert(this.$t('trials:researchRecord:message:copyFailed'))
})
},
//
creatQrCode() {
this.$refs.qrcode.innerHTML = '' //
let text = this.shareLink
this.qrcode = new QRCode(this.$refs.qrcode, {
text: text, // ,#
width: 200,
height: 200,
colorDark: '#000000',
colorLight: '#ffffff',
correctLevel: QRCode.CorrectLevel.H,
})
// qrcode.clear(); //
},
//
savePic() {
let qrCodeCanvas = document
.getElementById('qrcode')
.getElementsByTagName('canvas')
let a = document.createElement('a')
a.href = qrCodeCanvas[0].toDataURL('image/url')
a.download = `${this.$route.query.researchProgramNo}${this.$t('trials:researchRecord:title:code')}.png`
a.click()
},
//
handleCopyImg() {
let qrCodeCanvas = document
.getElementById('qrcode')
.getElementsByTagName('canvas')
qrCodeCanvas[0].toBlob(async (blob) => {
console.log(blob)
const data = [
new ClipboardItem({
[blob.type]: blob,
}),
] // https://w3c.github.io/clipboard-apis/#dom-clipboard-write
await navigator.clipboard.write(data).then(
() => {
this.$message.success(
this.$t('trials:researchRecord:message:copySuccess')
)
},
() => {
this.$message.error(
this.$t('trials:researchRecord:message:UnableWrite')
)
}
)
})
},
// site
getSite() {
getTrialSiteSelect(this.trialId).then((res) => {
this.siteOptions = res.Result
})
},
//
showResearchLink() {
this.shareForm = {
ExpirationDays: null,
OtherExpirationDays: null,
LinkVerificationCode: null,
OtherLinkVerificationCode: null,
}
this.validityPeriod = null
this.isExpired = false
this.share_model.visible = true
this.getLinkTime()
// &lang=${this.$i18n.locale}
// this.trialSiteSurveyId = this.list[0].Id
},
//
handleReset() {
this.searchData = searchDataDefault()
this.searchData.DateRange = []
if (this.searchData.DateRange && this.searchData.DateRange.length === 2) {
this.searchData.UpdateTimeBegin = this.searchData.DateRange[0]
this.searchData.updateTimeEnd = this.searchData.DateRange[1]
} else {
this.searchData.UpdateTimeBegin = ''
this.searchData.updateTimeEnd = ''
}
this.getList()
this.$nextTick(() => {
this.$refs.siteResearchList.clearSort()
})
},
//
handleSearch() {
this.getList()
},
//
handleSortByColumn(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
} else {
this.searchData.Asc = false
}
this.searchData.SortField = column.prop
this.getList()
},
},
beforeDestroy() {
if (this.qrcode) {
this.qrcode = null
}
},
}
</script>
<style lang="scss" scoped>
.step-wrapper {
.date,
.share {
width: 55%;
height: 100%;
flex: 1;
display: flex;
flex-direction: column;
padding: 0;
margin: 0;
background-color: #fff;
}
.el-steps {
height: 80px;
.dayInput {
::v-deep .el-input__inner {
padding-left: 5px;
}
}
.date {
padding-right: 10px;
}
.share {
width: 45%;
padding-left: 5%;
border-left: 1px solid #f0f0f0;
box-sizing: border-box;
}
.shareLinkBtn {
float: right;
}
.qrCodeBox {
width: 220px;
height: 220px;
display: flex;
border: 1px solid #c0c4cc;
border-radius: 5px;
box-shadow: 1px 1px 5px #c0c4cc;
align-items: center;
justify-content: center;
}
.step-content {
flex: 1;
.dateBox {
margin: 10px;
}
.title {
height: 40px;
line-height: 40px;
padding-left: 5px;
background: #e4ebf1;
border-left: 3px solid #0fc8e0;
font-size: 13px;
.codeBtnBox {
p {
padding: 0;
margin: 0;
::v-deep .el-button {
display: block;
margin: 10px auto;
}
}
.trial-wrapper {
height: 60px;
.div-row {
display: flex;
justify-content: space-between;
margin: 10px 20px !important;
font-size: 13px;
.div-col {
flex: 1;
width: 100px;
white-space: nowrap !important;
text-overflow: ellipsis !important;
word-break: break-word !important;
overflow: hidden !important;
label {
font-weight: bold;
}
}
.div-textarea {
display: inline-block;
}
}
}
::v-deep .el-step__head.is-process {
color: #428bca;
border-color: #428bca;
}
::v-deep .el-step__title.is-process {
color: #428bca;
border-color: #428bca;
}
::v-deep .el-step__description.is-process {
color: #428bca;
border-color: #428bca;
}
::v-deep .el-step__head.is-process .el-step__line {
background-color: #428bca;
}
::v-deep .el-step__head.is-finish {
color: #303133;
border-color: #303133;
}
::v-deep .el-step__title.is-finish {
color: #303133;
border-color: #303133;
}
::v-deep .el-step__description.is-finish {
color: #303133;
border-color: #303133;
}
::v-deep .el-step__title.is-process {
text-decoration: none;
}
::v-deep .el-step__title.is-finish {
text-decoration: none;
}
::v-deep .el-step__head.is-finish .el-step__line {
background-color: #303133;
}
.click_cursor {
cursor: pointer;
}
</style>
File diff suppressed because it is too large Load Diff
@@ -218,9 +218,9 @@
<div class="text">{{ $t('trials:reading:button:screenShot') }}</div>
</div>
</el-tooltip>
<el-popover v-model="keySeriesPopoverVisible" placement="bottom" trigger="click"
popper-class="key-series-popper" @show="showKeySeriesPanel">
<el-popover v-model="keySeriesPopoverVisible" placement="bottom" trigger="click" popper-class="key-series-popper"
@show="showKeySeriesPanel">
<ul class="key-series-list">
<li v-if="keyStack && keyStack.taskBlindName" class="key-series-header">
<div class="key-series-header-top">
@@ -563,7 +563,7 @@
</el-button>
</div>
</div>
</transition>
@@ -596,7 +596,7 @@
</el-tab-pane>
<!-- 其他 -->
<el-tab-pane :label="$t('trials:reading:tab:others')" name="3">
<Others v-if="activeName === '3'" :imageToolType="1" />
<Others v-if="activeName === '3'" :imageToolType="1"/>
</el-tab-pane>
</el-tabs>
@@ -708,10 +708,10 @@
</el-dialog>
<upload-dicom-and-nonedicom v-if="uploadImageVisible" :subject-id="uploadSubjectId"
:subject-code="uploadSubjectCode" :criterion="uploadTrialCriterion" :visible.sync="uploadImageVisible"
:visit-task-id="taskId" :is-reading-task-view-in-order="isReadingTaskViewInOrder" :isReading="true" />
:visit-task-id="taskId" :is-reading-task-view-in-order="isReadingTaskViewInOrder" />
<download-dicom-and-nonedicom v-if="downloadImageVisible" :subject-id="uploadSubjectId"
:subject-code="uploadSubjectCode" :criterion="uploadTrialCriterion" :task-id="taskId"
:visible.sync="downloadImageVisible" :isReading="true" />
:visible.sync="downloadImageVisible" />
<!-- 签名框 -->
<el-dialog v-if="signVisible" :visible.sync="signVisible" :close-on-click-modal="false" width="600px"
custom-class="base-dialog-wrapper">
@@ -1129,7 +1129,7 @@ export default {
DicomEvent.$on('imageLocation', async (measuredData) => {
return new Promise(async resolve => {
if (!measuredData) return
await this.imageLocation(measuredData)
resolve()
})
@@ -1197,7 +1197,7 @@ export default {
} else if (this.CriterionType === 22) {
this.setToolActive('Probe', true, null, 'tableQuestion')
}
})
window.addEventListener('beforeunload', () => {
if (this.petctWindow) {
@@ -1451,7 +1451,7 @@ export default {
// } catch (err) {
// console.error(err)
// }
const series = this.getSeriesInfoByMark(visitTaskId, { lesionName: kf.MarkName })
const series = this.getSeriesInfoByMark(visitTaskId, {lesionName: kf.MarkName})
if (!series) return
this.loadImageStack(series)
},
@@ -2496,7 +2496,7 @@ export default {
this.readingTaskState = 2
await store.dispatch('reading/setVisitTaskReadingTaskState', { visitTaskId: this.visitTaskId, readingTaskState: 2 })
await store.dispatch('reading/setCurrentReadingTaskState', 2)
const res = await getAutoCutNextTask({ imageToolType: 1 })
const res = await getAutoCutNextTask({imageToolType: 1})
var isAutoTask = res.Result.AutoCutNextTask
if (isAutoTask) {
window.location.reload()
@@ -2609,7 +2609,7 @@ export default {
await this.$confirm(this.$t('trials:lugano:fusionDialog:message:checkSeries'), this.$t('trials:lugano:fusionDialog:warning'), {
showCancelButton: false,
type: 'warning'
}).catch(() => { })
}).catch(() => {})
return
}
if (this.ctSeriesInfo.instanceCount > 400) {
@@ -33,21 +33,17 @@
<div v-for="item in qs.Childrens" :key="item.Id">
<div v-if="item.Type === 'basicTable'" class="flex-row" style="margin:3px 0;">
<div class="title">{{ item.QuestionName }}</div>
<div v-if="item.LesionType === 104">
<div
class="add-icon" @click.prevent="downloadTpl" v-if="readingTaskState < 2">
<div v-if="item.LesionType === 104 && readingTaskState < 2">
<div class="add-icon" @click.prevent="downloadTpl">
<i class="el-icon-download" />
</div>
<div class="add-icon" style="margin: 0 5px;"
@click.prevent="uploadTpl(item.LesionType, item.QuestionName)" v-if="readingTaskState < 2">
@click.prevent="uploadTpl(item.LesionType, item.QuestionName)">
<i class="el-icon-upload2" />
</div>
<div class="add-icon" @click.prevent="handleAddOrEdit('add', item)" v-if="readingTaskState < 2">
<div class="add-icon" @click.prevent="handleAddOrEdit('add', item)">
<i class="el-icon-plus" />
</div>
<div class="add-icon" @click.prevent="handleView(item)">
<i class="el-icon-view" />
</div>
</div>
</div>
@@ -189,22 +185,11 @@
</template>
<!-- 计算值 -->
<Questions
ref="ecrf2"
:question-form-change-state="true"
:question-form-change-num="0"
:is-qulity-issues="false"
:group-classify="4"
:question-type="12"
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"
:question-type="12"
<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"
@@ -236,8 +221,7 @@
</template>
<script>
import { saveTaskQuestion, submitTableQuestion, deleteReadingRowAnswer } from '@/api/trials'
import { resetReadingTask, getIVUSTemplatesZip } from '@/api/reading'
import { getToken } from '@/utils/auth'
import { resetReadingTask, getIVUSTemplate } from '@/api/reading'
import DicomEvent from './../DicomEvent'
import store from '@/store'
import { mapGetters } from 'vuex'
@@ -300,8 +284,7 @@ export default {
sRoiEndDistanceId: '',
sRoiDistanceId: '',
rowSaveLoadingMap: {},
dialogSaveLoading: false,
childWindows: []
dialogSaveLoading: false
}
},
computed: {
@@ -341,13 +324,11 @@ export default {
DicomEvent.$on('refreshQuestions', _ => {
this.refreshQuestions()
})
window.addEventListener('beforeunload', this.closeAllChildWindows)
},
beforeDestroy() {
DicomEvent.$off('setCollapseActive')
DicomEvent.$off('getUnSaveTarget')
DicomEvent.$off('refreshQuestions')
window.removeEventListener('beforeunload', this.closeAllChildWindows)
},
methods: {
handleReadingChart(e) {
@@ -633,7 +614,7 @@ export default {
return v
}
},
async handleSave(index, options = {}) {
async handleSave(index) {
if (this.rowSaveLoadingMap[index]) return
const refName = `questions${index}`
this.$set(this.rowSaveLoadingMap, index, true)
@@ -651,13 +632,9 @@ export default {
answers: answers
}
await saveTaskQuestion(12, params)
if (!options.silentSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
this.$message.success(this.$t('common:message:savedSuccessfully'))
DicomEvent.$emit('getReportInfo', true)
if (!options.skipRefresh) {
await this.refreshQuestions()
}
this.refreshQuestions()
this.formChanged = false
} catch (e) {
console.log(e)
@@ -762,24 +739,6 @@ export default {
this.addOrEdit.visible = true
this.addOrEdit.lesionType = row.LesionType
},
handleView(item) {
localStorage.setItem('taskBlindName', this.taskBlindName)
localStorage.setItem('isReadingShowSubjectInfo', this.isReadingShowSubjectInfo)
let token = getToken()
let routeData = this.$router.resolve({ path: `/ecrfList?trialId=${this.$route.query.trialId}&visitTaskId=${this.visitTaskId}&questionId=${item.Id}&TokenKey=${token}` })
const win = window.open(routeData.href, '_blank')
if (win) {
this.childWindows.push(win)
}
},
closeAllChildWindows() {
this.childWindows.forEach(win => {
if (win && !win.closed) {
win.close()
}
})
this.childWindows = []
},
async saveFormData() {
if (this.dialogSaveLoading) return
this.dialogSaveLoading = true
@@ -867,35 +826,15 @@ export default {
const params = {
visitTaskId: this.visitTaskId
}
await getIVUSTemplatesZip(params)
await getIVUSTemplate(params)
} catch (e) {
console.log(e)
}
},
async uploadDlgClose() {
try {
await this.refreshQuestions()
const saveTasks = []
for (let index = 0; index < this.questions.length; index++) {
const qs = this.questions[index]
if (qs.GroupClassify === 6) {
saveTasks.push(() => this.handleSave(index, { silentSuccess: true, skipRefresh: true }))
}
}
saveTasks.push(() => this.$refs['ecrf2'] && this.$refs['ecrf2'].handleSave({ silentSuccess: true, skipRefresh: true }))
saveTasks.push(() => this.$refs['ecrf3'] && this.$refs['ecrf3'].handleSave({ silentSuccess: true, skipRefresh: true }))
for (const saveTask of saveTasks) {
try {
await saveTask()
} catch (e) {
console.log(e)
}
}
} catch (e) {
console.log(e)
} finally {
this.upload.visible = false
}
this.refreshQuestions()
DicomEvent.$emit('getReportInfo', true)
this.upload.visible = false
},
renderHeader(h, { column, $index }) {
const span = document.createElement('span')
@@ -30,12 +30,12 @@
<div class="image-viewer__actions__inner">
<i class="el-icon-zoom-out" @click="handleActions('zoomOut')" />
<i class="el-icon-zoom-in" @click="handleActions('zoomIn')" />
<!-- <i class="el-image-viewer__actions__divider" /> -->
<i class="el-image-viewer__actions__divider" />
<i class="el-icon-c-scale-to-original" @click="toggleMode" />
<!-- <i class="el-image-viewer__actions__divider" /> -->
<i class="el-image-viewer__actions__divider" />
<i class="el-icon-refresh-left" @click="handleActions('anticlocelise')" />
<i class="el-icon-refresh-right" @click="handleActions('clocelise')" />
<i v-if="readingTaskState < 2 && taskInfo.CriterionType !== 19 && taskInfo.CriterionType !== 20" class="el-icon-bottom-right"
<i v-if="readingTaskState < 2" class="el-icon-bottom-right"
:style="{ cursor: isToolDisabled || readingTaskState >= 2 ? 'not-allowed' : 'pointer' }"
@click="handleDrawArrow" />
@@ -44,7 +44,7 @@
:style="{cursor:isToolDisabled || readingTaskState >=2 ?'not-allowed':'pointer'}"
@click="handleDrawRectangle"
/> -->
<svg-icon v-if="readingTaskState < 2 && taskInfo.CriterionType !== 19 && taskInfo.CriterionType !== 20" icon-class="rectangle" class="svg-icon"
<svg-icon v-if="readingTaskState < 2" icon-class="rectangle" class="svg-icon"
:style="{ cursor: isToolDisabled || readingTaskState >= 2 ? 'not-allowed' : 'pointer' }"
@click="handleDrawRectangle" />
</div>
@@ -109,7 +109,6 @@ export default {
}
},
data() {
const taskInfo = JSON.parse(localStorage.getItem('taskInfo') || '{}')
return {
loading: false,
index: this.initialIndex,
@@ -138,13 +137,11 @@ export default {
currentDrawData: {},
canvasData: [],
imgZoom: 1,
isDragging: false,
isToolDisabled: false,
lesionName: '',
visitTaskId: '',
isInit: false,
imgSize: { height: '', width: '' }, //
taskInfo
imgSize: { height: '', width: '' } //
}
},
computed: {
@@ -212,10 +209,6 @@ export default {
}
this.deviceSupportInstall()
},
beforeDestroy() {
window.removeEventListener('message', this.receiveMsg)
this.stopDragging()
},
methods: {
getCanvasData() {
return new Promise(async resolve => {
@@ -344,55 +337,25 @@ export default {
//
initCanvas(img) {
this.loading = true
this.canvasSize.height = img.height
this.canvasSize.width = img.width
this.imgSize.height = img.height
this.imgSize.width = img.width
const canvasDiv = document.getElementsByClassName('image-viewer__canvas')[0]
const widthRatio = canvasDiv && canvasDiv.offsetWidth ? canvasDiv.offsetWidth / img.width : 1
const heightRatio = canvasDiv && canvasDiv.offsetHeight ? canvasDiv.offsetHeight / img.height : 1
this.imgZoom = Math.min(widthRatio, heightRatio, 1)
this.canvasSize.height = Math.round(img.height * this.imgZoom)
this.canvasSize.width = Math.round(img.width * this.imgZoom)
this.canvasPosition = {
x: canvasDiv.offsetWidth / 2 - this.canvasSize.width / 2,
y: canvasDiv.offsetHeight / 2 - this.canvasSize.height / 2 - 25
x: canvasDiv.offsetWidth / 2 - img.width / 2,
y: canvasDiv.offsetHeight / 2 - img.height / 2 - 25
} //
this.$nextTick(async () => {
ctx = document.getElementById('canvas').getContext('2d') //
await ctx.drawImage(img, 0, 0, this.canvasSize.width, this.canvasSize.height) // canvas()
await ctx.drawImage(img, 0, 0, img.width, img.height) // canvas()
this.drawToArr()
this.loading = false
})
},
scalePoint(point) {
return {
x: point.x * this.imgZoom,
y: point.y * this.imgZoom
}
},
startDragging(e) {
const { offsetX, offsetY } = this.transform
const startX = e.pageX
const startY = e.pageY
this.isDragging = true
this._dragHandler = rafThrottle((ev) => {
this.transform.offsetX = offsetX + ev.pageX - startX
this.transform.offsetY = offsetY + ev.pageY - startY
})
this._dragEndHandler = () => {
this.stopDragging()
}
on(document, 'mousemove', this._dragHandler)
on(document, 'mouseup', this._dragEndHandler)
},
stopDragging() {
off(document, 'mousemove', this._dragHandler)
off(document, 'mouseup', this._dragEndHandler)
this._dragHandler = null
this._dragEndHandler = null
this.isDragging = false
},
//
clearCanvas() {
@@ -418,11 +381,6 @@ export default {
if (e.button !== 0) {
return
}
if (!this.model) {
this.startDragging(e)
e.preventDefault()
return
}
this.isMouseDown = true //
//
this.canvasMouseStart = {
@@ -433,9 +391,6 @@ export default {
//
async handleMouseMove(e) {
if (!this.model || this.isDragging) {
return
}
// ()
this.mousePosition = {
x: e.pageX,
@@ -482,12 +437,10 @@ export default {
var headlen = 10// 线
var theta = 45// 线线
var arrowX, arrowY// 线
var start = this.scalePoint(e.data.handles.start)
var end = this.scalePoint(e.data.handles.end)
var fromX = start.x
var fromY = start.y
var toX = end.x
var toY = end.y
var fromX = e.data.handles.start.x
var fromY = e.data.handles.start.y
var toX = e.data.handles.end.x
var toY = e.data.handles.end.y
//
var angle = Math.atan2(fromY - toY, fromX - toX) * 180 / Math.PI
var angle1 = (angle + theta) * Math.PI / 180
@@ -500,8 +453,8 @@ export default {
// 线
ctx.lineWidth = this.lineWidth
ctx.beginPath()
ctx.moveTo(fromX, fromY)
ctx.lineTo(toX, toY)
ctx.moveTo(fromX * this.imgZoom, fromY * this.imgZoom)
ctx.lineTo(toX * this.imgZoom, toY * this.imgZoom)
arrowX = toX + topX
arrowY = toY + topY
@@ -520,16 +473,18 @@ export default {
ctx.lineWidth = this.lineWidth
ctx.beginPath()
ctx.strokeStyle = this.color
const start = this.scalePoint(e.data.handles.start)
const end = this.scalePoint(e.data.handles.end)
//
ctx.strokeRect(
start.x,
start.y,
end.x - start.x,
end.y - start.y
// this.canvasMouseStart.x,
// this.canvasMouseStart.y,
// e.offsetX - this.canvasMouseStart.x,
// e.offsetY - this.canvasMouseStart.y
e.data.handles.start.x,
e.data.handles.start.y,
e.data.handles.end.x - e.data.handles.start.x,
e.data.handles.end.y - e.data.handles.start.y
)
this.drawText(ctx, start, end, e.data.remark, this.color)
this.drawText(ctx, { x: e.data.handles.start.x, y: e.data.handles.start.y }, { x: e.data.handles.end.x, y: e.data.handles.end.y }, e.data.remark, this.color)
}
}
})
@@ -540,10 +495,6 @@ export default {
if (e.button !== 0) {
return //
}
if (this.isDragging) {
this.stopDragging()
return
}
//
if (this.model === 'ArrowAnnotate' || this.model === 'RectangleRoi') {
@@ -33,20 +33,17 @@
<div v-for="item in qs.Childrens" :key="item.Id">
<div v-if="item.Type === 'basicTable'" class="flex-row" style="margin:3px 0;">
<div class="title">{{ item.QuestionName }}</div>
<div v-if="(item.LesionType === 104)">
<div class="add-icon" @click.prevent="downloadTpl(item.LesionType)" v-if="readingTaskState < 2">
<div v-if="(item.LesionType === 104) && readingTaskState < 2">
<div class="add-icon" @click.prevent="downloadTpl(item.LesionType)">
<i class="el-icon-download" />
</div>
<div class="add-icon" style="margin: 0 5px;"
@click.prevent="uploadTpl(item.LesionType, item.QuestionName)" v-if="readingTaskState < 2">
@click.prevent="uploadTpl(item.LesionType, item.QuestionName)">
<i class="el-icon-upload2" />
</div>
<div class="add-icon" @click.prevent="handleAddOrEdit('add', item)" v-if="readingTaskState < 2">
<div class="add-icon" @click.prevent="handleAddOrEdit('add', item)">
<i class="el-icon-plus" />
</div>
<div class="add-icon" @click.prevent="handleView(item)">
<i class="el-icon-view" />
</div>
</div>
</div>
@@ -189,22 +186,11 @@
</template>
<!-- 计算值 -->
<Questions
ref="ecrf2"
:question-form-change-state="true"
:question-form-change-num="0"
:is-qulity-issues="false"
:group-classify="4"
:question-type="12"
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"
:question-type="12"
<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">
@@ -235,10 +221,9 @@
</template>
<script>
import { saveTaskQuestion, submitTableQuestion, deleteReadingRowAnswer } from '@/api/trials'
import { resetReadingTask, getOCTFCTTemplatesZip, getOCTLipidAngleTemplate } from '@/api/reading'
import { resetReadingTask, getOCTFCTTemplate, getOCTLipidAngleTemplate } from '@/api/reading'
import DicomEvent from './../DicomEvent'
import store from '@/store'
import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex'
import Questions from './../Questions'
import QuestionTableFormItem from './QuestionTableFormItem'
@@ -300,8 +285,7 @@ export default {
sRoiEndDistanceId: '',
sRoiDistanceId: '',
rowSaveLoadingMap: {},
dialogSaveLoading: false,
childWindows: []
dialogSaveLoading: false
}
},
computed: {
@@ -341,13 +325,11 @@ export default {
DicomEvent.$on('refreshQuestions', _ => {
this.refreshQuestions()
})
window.addEventListener('beforeunload', this.closeAllChildWindows)
},
beforeDestroy() {
DicomEvent.$off('setCollapseActive')
DicomEvent.$off('getUnSaveTarget')
DicomEvent.$off('refreshQuestions')
window.removeEventListener('beforeunload', this.closeAllChildWindows)
},
methods: {
handleReadingChart(e) {
@@ -628,7 +610,7 @@ export default {
return v
}
},
async handleSave(index, options = {}) {
async handleSave(index) {
if (this.rowSaveLoadingMap[index]) return
const refName = `questions${index}`
this.$set(this.rowSaveLoadingMap, index, true)
@@ -646,13 +628,9 @@ export default {
answers: answers
}
await saveTaskQuestion(12, params)
if (!options.silentSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
this.$message.success(this.$t('common:message:savedSuccessfully'))
DicomEvent.$emit('getReportInfo', true)
if (!options.skipRefresh) {
await this.refreshQuestions()
}
this.refreshQuestions()
this.formChanged = false
} catch (e) {
console.log(e)
@@ -777,27 +755,6 @@ export default {
this.addOrEdit.visible = true
this.addOrEdit.lesionType = row.LesionType
},
handleView(item) {
if (this.openWindow) {
this.openWindow.close()
}
localStorage.setItem('taskBlindName', this.taskBlindName)
localStorage.setItem('isReadingShowSubjectInfo', this.isReadingShowSubjectInfo)
let token = getToken()
let routeData = this.$router.resolve({ path: `/ecrfList?trialId=${this.$route.query.trialId}&visitTaskId=${this.visitTaskId}&questionId=${item.Id}&TokenKey=${token}` })
const win = window.open(routeData.href, '_blank')
if (win) {
this.childWindows.push(win)
}
},
closeAllChildWindows() {
this.childWindows.forEach(win => {
if (win && !win.closed) {
win.close()
}
})
this.childWindows = []
},
async saveFormData() {
if (this.dialogSaveLoading) return
this.dialogSaveLoading = true
@@ -890,7 +847,7 @@ export default {
visitTaskId: this.visitTaskId
}
if (lesionType === 104) {
await getOCTFCTTemplatesZip(params)
await getOCTFCTTemplate(params)
} else {
await getOCTLipidAngleTemplate(params)
}
@@ -899,29 +856,9 @@ export default {
}
},
async uploadDlgClose() {
try {
await this.refreshQuestions()
const saveTasks = []
for (let index = 0; index < this.questions.length; index++) {
const qs = this.questions[index]
if (qs.GroupClassify === 6) {
saveTasks.push(() => this.handleSave(index, { silentSuccess: true, skipRefresh: true }))
}
}
saveTasks.push(() => this.$refs['ecrf2'] && this.$refs['ecrf2'].handleSave({ silentSuccess: true, skipRefresh: true }))
saveTasks.push(() => this.$refs['ecrf3'] && this.$refs['ecrf3'].handleSave({ silentSuccess: true, skipRefresh: true }))
for (const saveTask of saveTasks) {
try {
await saveTask()
} catch (e) {
console.log(e)
}
}
} catch (e) {
console.log(e)
} finally {
this.upload.visible = false
}
this.refreshQuestions()
DicomEvent.$emit('getReportInfo', true)
this.upload.visible = false
},
renderHeader(h, { column, $index }) {
const span = document.createElement('span')
@@ -279,86 +279,84 @@ export default {
})
},
async handleSave(options = {}) {
if (this.saveLoading) return false
handleSave() {
if (this.saveLoading) return
this.saveLoading = true
const valid = await new Promise(resolve => {
this.$refs['questions'].validate(v => resolve(v))
})
if (!valid) {
this.saveLoading = false
return false
}
// lugano
if ((this.criterionType === 2 || this.criterionType === 18) && this.groupClassify === 3) {
//
var existUnSave = this.checkAnnotationStatus(this.questions)
if (existUnSave) {
await this.$alert(this.$t('trials:lugano:message:saveWarning'), this.$t('trials:lugano:fusionDialog:warning'))
this.$refs['questions'].validate(async (valid) => {
if (!valid) {
this.saveLoading = false
return false
return
}
// lugano
if ((this.criterionType === 2 || this.criterionType === 18) && this.groupClassify === 3) {
//
var existUnSave = this.checkAnnotationStatus(this.questions)
if (existUnSave) {
this.$alert(this.$t('trials:lugano:message:saveWarning'), this.$t('trials:lugano:fusionDialog:warning'))
this.saveLoading = false
return
}
var currentSpleenStatus = this.questionForm[this.spleenStatusId]
var currentSpleenLength = this.questionForm[this.spleenLengthId]
currentSpleenStatus = isNaN(parseInt(currentSpleenStatus)) ? null : parseInt(currentSpleenStatus)
var stIdx = this.measurements.findIndex(i => i.QuestionType === 60)
var slIdx = this.measurements.findIndex(i => i.QuestionType === 61)
var currentSpleenStatus = this.questionForm[this.spleenStatusId]
var currentSpleenLength = this.questionForm[this.spleenLengthId]
currentSpleenStatus = isNaN(parseInt(currentSpleenStatus)) ? null : parseInt(currentSpleenStatus)
var stIdx = this.measurements.findIndex(i => i.QuestionType === 60)
var slIdx = this.measurements.findIndex(i => i.QuestionType === 61)
if (currentSpleenLength && currentSpleenStatus === 5) {
// '!'
await this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => { }
})
this.saveLoading = false
return false
} else if (currentSpleenStatus === 5 && ((stIdx > -1 && this.measurements[stIdx].MeasureData) || (slIdx > -1 && this.measurements[slIdx].MeasureData))) {
//
await this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => { }
})
this.saveLoading = false
return false
} else if (((stIdx > -1 && this.measurements[stIdx].MeasureData) || (slIdx > -1 && this.measurements[slIdx].MeasureData)) && !currentSpleenLength) {
await this.$alert(this.$t('trials:lugano:message:validSpleen2'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => { }
})
this.saveLoading = false
return false
}
return await this.saveQuestionsList(options)
} else if ((this.criterionType === 2 || this.criterionType === 18) && this.groupClassify === 1 && this.questionForm[this.imageQualityIssuesId] && parseInt(this.questionForm[this.imageQualityIssuesId]) === 6) {
// PET-CT
let res = null
if (this.criterionType === 18) {
res = await getCanChooseNotMergeNoPet({ visitTaskId: this.visitTaskId })
if (currentSpleenLength && currentSpleenStatus === 5) {
// '!'
this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => { }
})
this.saveLoading = false
} else if (currentSpleenStatus === 5 && ((stIdx > -1 && this.measurements[stIdx].MeasureData) || (slIdx > -1 && this.measurements[slIdx].MeasureData))) {
//
this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => { }
})
this.saveLoading = false
} else if (((stIdx > -1 && this.measurements[stIdx].MeasureData) || (slIdx > -1 && this.measurements[slIdx].MeasureData)) && !currentSpleenLength) {
this.$alert(this.$t('trials:lugano:message:validSpleen2'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => { }
})
this.saveLoading = false
} else {
this.saveQuestionsList()
}
} else if ((this.criterionType === 2 || this.criterionType === 18) && this.groupClassify === 1 && this.questionForm[this.imageQualityIssuesId] && parseInt(this.questionForm[this.imageQualityIssuesId]) === 6) {
// PET-CT
let res = null
if (this.criterionType === 18) {
res = await getCanChooseNotMergeNoPet({ visitTaskId: this.visitTaskId })
} else {
res = await getCanChooseNotMerge({ visitTaskId: this.visitTaskId })
}
if (res.IsSuccess && !res.Result.IsCanChooseNotMerge) {
// this.$alert(this.$t('trials:lugano:saveQuestions:warning1'), this.$t('trials:lugano:fusionDialog:warning'), {showCancelButton: false})
this.$alert(this.$t('trials:lugano:saveQuestions:warning1'), this.$t('trials:lugano:fusionDialog:warning'), {
showCancelButton: false,
callback: action => { }
})
this.saveLoading = false
return
} else {
// PET-CTFDG-PETNE
this.$confirm(this.$t('trials:lugano:saveQuestions:warning2'), {
type: 'warning',
distinguishCancelAndClose: true
})
.then(() => {
this.saveQuestionsList()
})
}
} else {
res = await getCanChooseNotMerge({ visitTaskId: this.visitTaskId })
this.saveQuestionsList()
}
if (res.IsSuccess && !res.Result.IsCanChooseNotMerge) {
await this.$alert(this.$t('trials:lugano:saveQuestions:warning1'), this.$t('trials:lugano:fusionDialog:warning'), {
showCancelButton: false,
callback: action => { }
})
this.saveLoading = false
return false
}
// PET-CTFDG-PETNE
const confirm = await this.$confirm(this.$t('trials:lugano:saveQuestions:warning2'), {
type: 'warning',
distinguishCancelAndClose: true
}).then(() => true).catch(() => false)
if (!confirm) {
this.saveLoading = false
return false
}
return await this.saveQuestionsList(options)
} else {
return await this.saveQuestionsList(options)
}
// this.saveQuestionsList()
})
},
async saveQuestionsList(options = {}) {
async saveQuestionsList() {
this.loading = true
var answers = []
var imageQuality = null
@@ -384,22 +382,18 @@ export default {
// })
// params.questionMarkInfoList = questionMarkInfoList
// }
try {
const res = await saveTaskQuestion(this.questionType, params)
saveTaskQuestion(this.questionType, params).then(async res => {
if (this.imageQualityIssuesId) {
store.dispatch('reading/setImageQualityIssues', this.questionForm[this.imageQualityIssuesId])
if (this.questionForm[this.imageQualityIssuesId] && parseInt(this.questionForm[this.imageQualityIssuesId]) === 6) {
DicomEvent.$emit('closePetct')
}
}
if (!options.silentSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
if (!options.skipRefresh) {
var trialId = this.$route.query.trialId
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: trialId, visitTaskId: this.visitTaskId })
this.getQuestions(this.visitTaskId, true)
}
this.$message.success(this.$t('common:message:savedSuccessfully'))
var trialId = this.$route.query.trialId
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: trialId, visitTaskId: this.visitTaskId })
this.getQuestions(this.visitTaskId, true)
this.loading = false
if (this.isQulityIssues) {
DicomEvent.$emit('questionFormChange', false)
@@ -423,12 +417,10 @@ export default {
}
this.formChanged = false
this.saveLoading = false
return res
} catch (e) {
}).catch(() => {
this.loading = false
this.saveLoading = false
throw e
}
})
},
checkAnnotationStatus(obj) {
for (let i = 0; i < obj.length; i++) {
@@ -1,115 +0,0 @@
<template>
<div class="table-list-container" v-loading="loading">
<h3 v-if="isReadingShowSubjectInfo">
<span v-if="subjectCode">{{ subjectCode }} </span>
<span style="margin-left:5px;">{{ taskBlindName }}</span>
</h3>
<h3 v-if="tableQuestion && tableQuestion.GroupName">
{{ language === 'en' ? tableQuestion.GroupEnName : tableQuestion.GroupName }}
</h3>
<h4 v-if="tableQuestion && tableQuestion.QuestionName">
{{ tableQuestion.QuestionName }}
</h4>
<el-table
v-if="tableQuestion && tableQuestion.Type === 'basicTable' && tableQuestion.TableQuestions"
:ref="tableQuestion.Id"
:data="tableQuestion.TableQuestions.Answers"
height="100%"
>
<el-table-column
v-for="q of tableQuestion.TableQuestions.Questions"
:key="q.Id"
:prop="q.Id"
:label="q.QuestionName"
show-overflow-tooltip>
<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))}` }}
</span>
<span v-else-if="q.DictionaryCode">
{{`${scope.row[q.Id] instanceof Array ? scope.row[q.Id].map(item => $fd(q.DictionaryCode,
parseInt(item))).join(',') : $fd(q.DictionaryCode, parseInt(scope.row[q.Id]))}`}}
</span>
<span v-else-if="q.OptionTypeEnum === 1">
{{ `${scope.row[q.Id] instanceof Array ? scope.row[q.Id].join(',') : scope.row[q.Id]}` }}
</span>
<span v-else>
{{ `${scope.row[q.Id]}` }}
</span>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { getFilterTableQuestion } from '@/api/reading'
import store from '@/store'
import { mapGetters } from 'vuex'
import { changeURLStatic } from '@/utils/history.js'
export default {
name: 'DicomTableList',
data() {
return {
isReadingShowSubjectInfo: false,
subjectCode: null,
taskBlindName: null,
questionId: null,
tableQuestion: null,
loading: false
}
},
computed: {
...mapGetters(['language'])
},
created() {
if (this.$route.query.TokenKey) {
store.dispatch('user/setToken', this.$route.query.TokenKey)
changeURLStatic('TokenKey', '')
}
this.subjectCode = localStorage.getItem('subjectCode')
this.taskBlindName = localStorage.getItem('taskBlindName')
this.isReadingShowSubjectInfo = localStorage.getItem('isReadingShowSubjectInfo')
this.getList()
},
methods: {
async getList() {
try {
this.loading = true
let params = {
trialId: this.$route.query.trialId,
visitTaskId: this.$route.query.visitTaskId,
questionId: this.$route.query.questionId
}
let res = await getFilterTableQuestion(params)
if (res.IsSuccess) {
this.tableQuestion = res.Result
}
} catch (e) {
console.log(e)
} finally {
this.loading = false
}
},
resetList() {
}
}
}
</script>
<style lang="scss" scoped>
.table-list-container {
height: 100%;
padding: 0 10px;
box-sizing: border-box;
display: flex;
flex-direction: column;
overflow: hidden;
}
h3, h4 {
flex-shrink: 0;
margin: 10px 0 10px;
}
</style>
@@ -411,7 +411,7 @@
<WL v-if="activeName === '2'" @getWwcTpl="getWwcTpl" />
</el-tab-pane>
<el-tab-pane :label="$t('trials:reading:tab:others')" name="3">
<Others v-if="activeName === '3'" :imageToolType="1" />
<Others v-if="activeName === '3'" :imageToolType="1"/>
</el-tab-pane>
</el-tabs>
</el-dialog>
@@ -448,10 +448,10 @@
/> -->
<upload-dicom-and-nonedicom v-if="uploadImageVisible" :SubjectId="uploadSubjectId" :SubjectCode="uploadSubjectCode"
:Criterion="uploadTrialCriterion" :visible.sync="uploadImageVisible" :VisitTaskId="taskId"
:isReadingTaskViewInOrder="isReadingTaskViewInOrder" :isReading="true" />
:isReadingTaskViewInOrder="isReadingTaskViewInOrder" />
<download-dicom-and-nonedicom v-if="downloadImageVisible" :SubjectId="uploadSubjectId"
:SubjectCode="uploadSubjectCode" :Criterion="uploadTrialCriterion" :TaskId="taskId"
:visible.sync="downloadImageVisible" :isReading="true"/>
:visible.sync="downloadImageVisible" />
</div>
</template>
<script>
@@ -434,7 +434,7 @@ export default {
parseFloat(obj.val) < parseFloat(v.lt)
)
})
answer = o ? o.label : 'NE'
answer = o ? o.label : null
} else if (i.classifyType === 1) {
let o = list.find(v => {
return v.val.includes(obj.val)
@@ -234,7 +234,7 @@ export default {
parseFloat(obj.val) < parseFloat(v.lt)
)
})
answer = o ? o.label : 'NE'
answer = o ? o.label : null
} else if (i.classifyType === 1) {
let o = list.find(v => {
return v.val.includes(obj.val)
@@ -147,7 +147,7 @@
</template>
</el-table-column>
</el-table>
<div style="text-align:right;margin-top: 10px;" v-if="!IsViewStudyPart">
<div style="text-align:right;margin-top: 10px;">
<!-- 确认 -->
<el-button type="primary" @click="handleConfirmBP">{{ $t('trials:reading:button:confirm')
}}</el-button>
@@ -223,8 +223,7 @@ export default {
readingVersionEnum: null,
dialogBodyPartVisible: false,
isReadKeyFile: true,
isHaveKeyFile: false,
IsViewStudyPart: true
isHaveKeyFile: false
}
},
computed: {
@@ -620,14 +619,6 @@ export default {
}
}
::v-deep .el-dialog.cd-dialog-container {
.el-input.is-disabled .el-input__inner {
background-color: rgb(245, 247, 250);
color: #666;
border: 1px solid #dcdfe6;
}
}
}
::v-deep .dialog-container {
@@ -12,9 +12,7 @@
{ required: true, message: $t('common:ruleMessage:select'), trigger: 'blur' }
]">
<el-select v-model="fusionForm.studyId" clearable @change="handleStudyIdChange">
<el-option v-for="item in studyList" :key="item.StudyId"
:label="taskInfo.IsReadingTaskViewInOrder !== 0 ? item.StudyCode : `${item.Modalities}(${item.SeriesCount})`"
:value="item.StudyId" />
<el-option v-for="item in studyList" :key="item.StudyId" :label="item.StudyCode" :value="item.StudyId" />
</el-select>
</el-form-item>
<!-- 融合图像 -->
@@ -113,12 +111,10 @@ export default {
ctSeries: [],
petSeries: [],
petctWindow: null,
digitPlaces: 2,
taskInfo: {}
digitPlaces: 2
}
},
mounted() {
this.taskInfo = JSON.parse(sessionStorage.getItem('taskInfo'))
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
this.initForm()
@@ -187,7 +187,6 @@ export default {
originalMarkers: [],
markers: { top: '', right: '', bottom: '', left: '' },
playClipState: false,
clipFramesPerSecond: null,
wwwcIdx: 2,
presetName: '',
volumeId: null,
@@ -626,22 +625,6 @@ export default {
}
},
syncViewportStaticState() {
const renderingEngine = getRenderingEngine(this.renderingEngineId)
if (!renderingEngine) return
const viewport = renderingEngine.getViewport(this.viewportId)
if (!viewport) return
this.getOrientationMarker()
const toolGroup =
cornerstoneTools.ToolGroupManager.getToolGroupForViewport(
this.viewportId,
this.renderingEngineId
) || cornerstoneTools.ToolGroupManager.getToolGroup(this.viewportId)
if (toolGroup) {
toolGroup.setToolEnabled('ScaleOverlay')
}
},
setFullScreen(index) {
setTimeout(() => {
const renderingEngine = getRenderingEngine(this.renderingEngineId)
@@ -744,33 +727,14 @@ export default {
}
},
toggleClipPlay(isPlay, framesPerSecond) {
this.playClipState = isPlay
const renderingEngine = getRenderingEngine(this.renderingEngineId)
if (!renderingEngine) return
const viewport = renderingEngine.getViewport(this.viewportId)
if (!viewport?.element) return
const parsedFramesPerSecond = Number(framesPerSecond)
const nextFramesPerSecond = Number.isFinite(parsedFramesPerSecond)
? parsedFramesPerSecond
: (this.clipFramesPerSecond || 15)
const isSameSpeedWhilePlaying = this.playClipState &&
isPlay &&
this.clipFramesPerSecond === nextFramesPerSecond
if (isPlay) {
if (isSameSpeedWhilePlaying) return
cornerstoneTools.utilities.cine.playClip(viewport.element, {
framesPerSecond: nextFramesPerSecond,
loop: true,
waitForRendered: 1
})
this.clipFramesPerSecond = nextFramesPerSecond
this.playClipState = true
cornerstoneTools.utilities.cine.playClip(viewport.element, { framesPerSecond, loop: true })
} else {
cornerstoneTools.utilities.cine.stopClip(viewport.element)
this.clipFramesPerSecond = null
this.playClipState = false
}
},
scrollPage(type) {
@@ -1161,7 +1125,6 @@ export default {
}
viewport.render()
this.syncViewportStaticState()
if (this.currentVoiUpper > 0) {
this.voiChange(this.currentVoiUpper)
}
@@ -284,7 +284,7 @@
<svg-icon icon-class="lastframe" class="svg-icon" />
</div>
<select v-model="fps" :title="$t('trials:dicom-show:speed')" class="select-wrapper"
@change="handleClipFpsChange">
:disabled="clipPlaying">
<!-- 默认值 -->
<option :value="5">5</option>
<option :value="10">10</option>
@@ -582,11 +582,10 @@
:renderingEngineId="renderingEngineId" :visitInfo="taskInfo" /> -->
<upload-dicom-and-nonedicom v-if="uploadImageVisible" :subject-id="uploadSubjectId"
:subject-code="uploadSubjectCode" :criterion="uploadTrialCriterion" :visible.sync="uploadImageVisible"
:visit-task-id="taskId" :is-reading-task-view-in-order="isReadingTaskViewInOrder" :isReading="true" />
:visit-task-id="taskId" :is-reading-task-view-in-order="isReadingTaskViewInOrder" />
<download-dicom-and-nonedicom v-if="downloadImageVisible" :subject-id="uploadSubjectId"
:subject-code="uploadSubjectCode" :criterion="uploadTrialCriterion" :task-id="taskId"
:visible.sync="downloadImageVisible" :is-reading-task-view-in-order="isReadingTaskViewInOrder"
:isReading="true" />
:visible.sync="downloadImageVisible" :is-reading-task-view-in-order="isReadingTaskViewInOrder" />
<readingChart ref="readingChart" />
</div>
</template>
@@ -1222,7 +1221,12 @@ export default {
this.selectArr.push(item.VisitTaskId)
}
if (item.IsCurrentTask) {
this.syncMarkedSeriesIds(annotations)
this.markedSeriesIds = []
annotations.map(i => {
if (i.MeasureData && i.MeasureData.seriesId) {
this.markedSeriesIds.push(i.MeasureData.seriesId)
}
})
}
}
@@ -2048,7 +2052,7 @@ export default {
// this.$refs['ecrf'].setAnnotation({ annotation, toolName: annotation.metadata.toolName })
this.$refs[`ecrf_${this.lastViewportTaskId}`][0].setAnnotation({ annotation, toolName: annotation.metadata.toolName })
this.syncMarkedSeriesIdsFromState(series.TaskInfo.VisitTaskId)
this.markedSeriesIds.push(series.Id)
}
this.setToolsPassive()
@@ -2083,14 +2087,16 @@ export default {
throw errorMsg
}
if (annotation.visitTaskId === this.taskInfo.VisitTaskId && annotation.seriesId) {
this.syncMarkedSeriesIdsFromState(annotation.visitTaskId)
const index = this.markedSeriesIds.indexOf(annotation.seriesId)
if (index !== -1) {
this.markedSeriesIds.splice(index, 1)
}
} else {
const errorMsg = { message: 'annotation Not allowed to operate' }
throw errorMsg
}
} catch (e) {
cornerstoneTools.annotation.state.addAnnotation(annotation)
this.syncMarkedSeriesIdsFromState(annotation.visitTaskId)
const renderingEngine = getRenderingEngine(renderingEngineId)
for (let i = 0; i < this.cells.length; i++) {
const viewportId = `${this.viewportKey}-${i}`
@@ -2127,7 +2133,7 @@ export default {
annotation.sliceThickness = series.SliceThickness
annotation.numberOfFrames = isNaN(parseInt(params.frame)) ? null : parseInt(params.frame)
annotation.markTool = annotation.metadata.toolName
this.syncMarkedSeriesIdsFromState(series.TaskInfo.VisitTaskId)
this.markedSeriesIds.push(series.Id)
const operateStateEnum = this.$refs[`ecrf_${this.taskInfo.VisitTaskId}`][0].operateStateEnum
const markName = await this.customPrompt(!this.isNumber(operateStateEnum))
@@ -2269,7 +2275,10 @@ export default {
if (!res.IsSuccess) throw ''
}
}
this.syncMarkedSeriesIdsFromState(annotation.visitTaskId)
const index = this.markedSeriesIds.indexOf(annotation.seriesId)
if (index !== -1) {
this.markedSeriesIds.splice(index, 1)
}
const renderingEngine = getRenderingEngine(renderingEngineId)
for (let i = 0; i < this.cells.length; i++) {
const viewportId = `${this.viewportKey}-${i}`
@@ -2282,7 +2291,6 @@ export default {
}
} catch (e) {
cornerstoneTools.annotation.state.addAnnotation(annotation)
this.syncMarkedSeriesIdsFromState(annotation.visitTaskId)
const renderingEngine = getRenderingEngine(renderingEngineId)
for (let i = 0; i < this.cells.length; i++) {
const viewportId = `${this.viewportKey}-${i}`
@@ -2359,22 +2367,6 @@ export default {
this.$set(this.visitTaskList[taskIdx], 'Annotations', annotations)
this.$set(this.visitTaskList[taskIdx], 'AnnotationUIDs', annotationUIDs)
},
collectMarkedSeriesIds(list = []) {
return [...new Set(
list
.map(item => item?.MeasureData?.seriesId || item?.seriesId)
.filter(Boolean)
)]
},
syncMarkedSeriesIds(list = []) {
this.markedSeriesIds = this.collectMarkedSeriesIds(list)
},
syncMarkedSeriesIdsFromState(visitTaskId = this.taskInfo?.VisitTaskId) {
const annotations = cornerstoneTools.annotation.state.getAllAnnotations().filter(item => {
return item.visitTaskId === visitTaskId && item.seriesId
})
this.syncMarkedSeriesIds(annotations)
},
async resetAnnotations(visitTaskId) {
if (this.readingTaskState === 2) return
const taskIdx = this.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId)
@@ -2409,9 +2401,9 @@ export default {
if (i.MeasureData) {
const annotation = i.MeasureData
cornerstoneTools.annotation.state.addAnnotation(annotation)
this.markedSeriesIds.push(annotation.seriesId)
}
})
this.syncMarkedSeriesIds(annotations)
const renderingEngine = getRenderingEngine(renderingEngineId)
for (let i = 0; i < this.cells.length; i++) {
const viewportId = `${this.viewportKey}-${i}`
@@ -3423,15 +3415,6 @@ export default {
this.clipPlaying = !this.clipPlaying
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].toggleClipPlay(isPlay, this.fps)
},
handleClipFpsChange() {
if (!this.clipPlaying) return
const activeViewportRef = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`]
const activeViewport = activeViewportRef && activeViewportRef[0]
if (!activeViewport || typeof activeViewport.toggleClipPlay !== 'function') return
activeViewport.toggleClipPlay(true, this.fps)
},
//
async getWwcTpl() {
try {
@@ -4054,10 +4037,8 @@ export default {
}
}
}
if (!this.isActiveViewportAtMeasureLocation(obj.annotation)) {
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(series, true)
this.$refs[series.TaskInfo.VisitTaskId][0].setSeriesActive(series.StudyIndex, series.SeriesIndex)
}
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(series, true)
this.$refs[series.TaskInfo.VisitTaskId][0].setSeriesActive(series.StudyIndex, series.SeriesIndex)
setTimeout(async () => {
const divForDownloadViewport = document.querySelector(
`div[data-viewport-uid="${this.viewportKey}-${this.activeViewportIndex}"]`
@@ -4068,48 +4049,9 @@ export default {
}, 200)
}
},
getMeasureImageLocation(measureData = {}) {
const referencedImageId = measureData?.metadata?.referencedImageId
const referencedImageParams = referencedImageId ? this.getInstanceInfo(referencedImageId) : {}
return {
visitTaskId: measureData.visitTaskId,
studyId: measureData.studyId || measureData.StudyId,
seriesId: measureData.seriesId || measureData.SeriesId,
instanceId: measureData.instanceId || measureData.InstanceId || referencedImageParams.instanceId || null,
frame: measureData.numberOfFrames ?? measureData.NumberOfFrames ?? referencedImageParams.frame
}
},
getActiveViewportImageLocation() {
const viewportRef = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`]?.[0]
const currentSeries = viewportRef?.series
if (!currentSeries) return null
const renderingEngine = getRenderingEngine(renderingEngineId)
const viewport = renderingEngine?.getViewport(`${this.viewportKey}-${this.activeViewportIndex}`)
const currentImageId = viewport?.getCurrentImageId?.()
const currentImageParams = currentImageId ? this.getInstanceInfo(currentImageId) : {}
return {
visitTaskId: currentSeries.TaskInfo?.VisitTaskId,
studyId: currentSeries.StudyId,
seriesId: currentSeries.Id,
instanceId: currentImageParams.instanceId || null,
frame: currentImageParams.frame
}
},
isActiveViewportAtMeasureLocation(measureData) {
const targetLocation = this.getMeasureImageLocation(measureData)
const currentLocation = this.getActiveViewportImageLocation()
if (!currentLocation || !targetLocation.seriesId) return false
if (targetLocation.visitTaskId && currentLocation.visitTaskId !== targetLocation.visitTaskId) return false
if (targetLocation.studyId && currentLocation.studyId !== targetLocation.studyId) return false
if (currentLocation.seriesId !== targetLocation.seriesId) return false
if (targetLocation.instanceId && currentLocation.instanceId !== targetLocation.instanceId) return false
return currentLocation.frame === targetLocation.frame
},
async getScreenshots(measureData, callback) {
if (measureData) {
if (!this.isActiveViewportAtMeasureLocation(measureData.annotation)) {
await this.imageLocation(measureData)
}
await this.imageLocation(measureData)
const divForDownloadViewport = document.querySelector(
`div[data-viewport-uid="${this.viewportKey}-${this.activeViewportIndex}"]`
)
@@ -4,8 +4,7 @@
<el-form-item :label="$t('segment:form:label:studyName')" prop="taskBlindName">
<el-select v-model="form.studyId" clearable @change="(e) => handleChange(e, 'study')"
@clear="(e) => handleClear(e, 'study')">
<el-option v-for="item in studyList" :key="item.StudyId"
:label="taskInfo.IsReadingTaskViewInOrder !== 0 ? item.StudyCode : `${item.Modalities}(${item.SeriesCount})`"
<el-option v-for="item in studyList" :key="item.StudyId" :label="item.StudyCode"
:value="item.StudyId" />
</el-select>
</el-form-item>
@@ -88,13 +87,12 @@ export default {
}, trigger: ['blur', 'change']
}
]
},
taskInfo: {}
}
}
},
mounted() {
this.taskInfo = JSON.parse(sessionStorage.getItem('taskInfo'))
},
// mounted() {
// this.init()
// },
methods: {
setSeries(series) {
this.series = series
@@ -804,16 +804,12 @@ export default {
toolGroup.setToolPassive(this.activeTool)
}
this.$emit('update:activeTool', '')
} else if (this.activeTool === name) {
toolGroup.setToolPassive(this.ThresholdTools[1])
this.$emit('update:activeTool', '')
} else {
if (this.activeTool) {
if (toolName === CrosshairsTool.toolName) {
toolGroup.setToolDisabled(this.activeTool)
} else {
toolGroup.setToolPassive(this.activeTool)
toolGroup.setToolPassive(this.ThresholdTools[1])
}
}
toolGroup.setToolActive(toolName, {
@@ -150,8 +150,6 @@ export default {
originalMarkers: [],
markers: { top: '', right: '', bottom: '', left: '' },
playClipState: false,
clipFramesPerSecond: null,
toggleClipPlayTimer: null,
wwwcIdx: 2,
loading: false,
forceFitToWindow: false,
@@ -171,10 +169,6 @@ export default {
this.resizeObserver.unobserve(this.element)
this.resizeObserver.disconnect()
}
if (this.toggleClipPlayTimer) {
clearInterval(this.toggleClipPlayTimer)
this.toggleClipPlayTimer = null
}
},
methods: {
initViewport() {
@@ -216,11 +210,12 @@ export default {
this.imageInfo.imageOrientationPatient = imagePlaneModule.imageOrientationPatient
this.imageInfo.imagePositionPatient = imagePlaneModule.imagePositionPatient
this.imageInfo.location = imagePlaneModule.sliceLocation
// this.imageInfo.wwwc = `${Math.round(detail.image.windowWidth)}/${Math.round(detail.image.windowCenter)}`
this.getOrientationMarker()
const toolGroup = cornerstoneTools.ToolGroupManager.getToolGroup(this.viewportId)
if (toolGroup) {
toolGroup.setToolEnabled('ScaleOverlay')
}
this.$emit('renderAnnotations', this.series)
const toolGroupId = this.viewportId
const toolGroup = cornerstoneTools.ToolGroupManager.getToolGroup(toolGroupId)
toolGroup.setToolEnabled('ScaleOverlay')
},
imageRendered(e) {
const renderingEngine = getRenderingEngine(this.renderingEngineId)
@@ -317,61 +312,14 @@ export default {
}
},
toggleClipPlay(isPlay, framesPerSecond) {
this.playClipState = isPlay
const renderingEngine = getRenderingEngine(this.renderingEngineId)
if (!renderingEngine) return
const viewport = renderingEngine.getViewport(this.viewportId)
if (!viewport?.element) return
const parsedFramesPerSecond = Number(framesPerSecond)
const nextFramesPerSecond = Number.isFinite(parsedFramesPerSecond)
? parsedFramesPerSecond
: (this.clipFramesPerSecond || 15)
const isSameSpeedWhilePlaying = this.playClipState &&
isPlay &&
this.clipFramesPerSecond === nextFramesPerSecond
if (isPlay) {
if (isSameSpeedWhilePlaying) return
cornerstoneTools.utilities.cine.stopClip(viewport.element)
if (this.toggleClipPlayTimer) {
clearInterval(this.toggleClipPlayTimer)
this.toggleClipPlayTimer = null
}
const frameInterval = Math.max(16, Math.round(1000 / nextFramesPerSecond))
this.toggleClipPlayTimer = setInterval(() => {
const imageIds = viewport.getImageIds()
if (!imageIds?.length) return
let index = viewport.getCurrentImageIdIndex() + 1
if (index > imageIds.length - 1) {
index = 0
}
csUtils.jumpToSlice(viewport.element, {
imageIndex: index,
debounceLoading: false
})
}, frameInterval)
this.clipFramesPerSecond = nextFramesPerSecond
this.playClipState = true
cornerstoneTools.utilities.cine.playClip(viewport.element, { framesPerSecond, loop: true })
} else {
cornerstoneTools.utilities.cine.stopClip(viewport.element)
if (this.toggleClipPlayTimer) {
clearInterval(this.toggleClipPlayTimer)
this.toggleClipPlayTimer = null
}
this.clipFramesPerSecond = null
this.playClipState = false
}
},
syncViewportStaticState() {
this.getOrientationMarker()
this.$emit('renderAnnotations', this.series)
const toolGroup = cornerstoneTools.ToolGroupManager.getToolGroup(this.viewportId)
if (toolGroup) {
toolGroup.setToolEnabled('ScaleOverlay')
}
},
scrollPage(type) {
@@ -391,13 +339,7 @@ export default {
}
// viewport.setImageIdIndex(newImageIdIndex)
csUtils.jumpToSlice(viewport.element, { imageIndex: newImageIdIndex })
if (this.toggleClipPlayTimer) {
clearInterval(this.toggleClipPlayTimer)
this.toggleClipPlayTimer = null
}
cornerstoneTools.utilities.cine.stopClip(viewport.element)
this.clipFramesPerSecond = null
this.playClipState = false
},
setZoom(ratio) {
const renderingEngine = getRenderingEngine(this.renderingEngineId)
@@ -490,7 +432,6 @@ export default {
}
this.prefetchMetadataInformation(obj.ImageIds, obj.Modality)
await viewport.setStack(this.series.Stack, obj.SliceIndex)
this.syncViewportStaticState()
viewport.render()
} catch (e) {
@@ -757,7 +757,7 @@ export default {
parseFloat(obj.val) < parseFloat(v.lt)
)
})
answer = o ? o.label : 'NE'
answer = o ? o.label : null
} else if (i.classifyType === 1) {
let o = list.find(v => {
return v.val.includes(obj.val)
@@ -453,7 +453,7 @@ export default {
parseFloat(obj.val) < parseFloat(v.lt)
)
})
answer = o ? o.label : 'NE'
answer = o ? o.label : null
} else if (i.classifyType === 1) {
const o = list.find(v => {
return v.val.includes(obj.val)
@@ -1268,7 +1268,7 @@ export default {
parseFloat(val) < parseFloat(v.lt)
)
})
answer = o ? o.label : 'NE'
answer = o ? o.label : null
} else if (i.classifyType === 1) {
const o = list.find(v => {
return v.val.includes(val)
@@ -1,6 +1,6 @@
<template>
<BaseContainer class="medical-feedback-ir">
<el-tabs v-if="TrialReadingCriterionId" v-model="TrialReadingCriterionId" type="border-card">
<el-tabs v-model="TrialReadingCriterionId" type="border-card">
<el-tab-pane v-for="i of trialCriterionList" :key="i.TrialReadingCriterionId" :label="i.TrialReadingCriterionName" :name="i.TrialReadingCriterionId">
<div v-if="TrialReadingCriterionId === i.TrialReadingCriterionId">
<div slot="search-container">
@@ -148,7 +148,6 @@
</div>
<div slot="main-container">
<el-table
:ref="TrialReadingCriterionId"
v-adaptive="{bottomOffset:75}"
v-loading="loading"
:data="list"
@@ -410,7 +409,7 @@ export default {
chatForm: { visible: false, title: '' }, //
auditVisible: false,
trialCriterionList: [],
TrialReadingCriterionId: '',
TrialReadingCriterionId: '0',
otherInfo: null
}
},
@@ -442,9 +441,6 @@ export default {
this.total = res.Result.TotalCount
this.otherInfo = res.OtherInfo
this.loading = false
this.$nextTick(() => {
this.$refs[this.TrialReadingCriterionId][0].doLayout()
})
}).catch(() => { this.loading = false })
},
handleSearch() {
@@ -378,7 +378,7 @@ export default {
parseFloat(obj.val) < parseFloat(v.lt)
)
})
answer = o ? o.label : 'NE'
answer = o ? o.label : null
} else if (i.classifyType === 1) {
let o = list.find(v => {
return v.val.includes(obj.val)
@@ -1,6 +1,6 @@
<template>
<BaseContainer v-loading="loading" class="read-task">
<el-tabs v-if="TrialReadingCriterionId" v-model="TrialReadingCriterionId" type="border-card">
<el-tabs v-model="TrialReadingCriterionId" type="border-card">
<el-tab-pane v-for="item of trialCriterionList" :key="item.TrialReadingCriterionId"
:label="item.TrialReadingCriterionName" :name="item.TrialReadingCriterionId">
<div v-if="TrialReadingCriterionId === item.TrialReadingCriterionId">
@@ -54,7 +54,7 @@
</span>
</div>
<div slot="main-container">
<el-table :ref="TrialReadingCriterionId" v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100"
<el-table v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100"
@sort-change="handleSortChange">
<el-table-column type="index" width="40" align="left" />
<!-- 是否加急 -->
@@ -371,7 +371,7 @@ export default {
RequestReReadingReason: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }]
},
trialCriterionList: [],
TrialReadingCriterionId: '',
TrialReadingCriterionId: '0',
openWindow: null,
otherInfo: null
}
@@ -423,9 +423,6 @@ export default {
this.total = res.Result.TotalCount
this.otherInfo = res.OtherInfo
this.loading = false
this.$nextTick(() => {
this.$refs[this.TrialReadingCriterionId][0].doLayout()
})
}).catch(() => { this.loading = false })
},
handleSearch() {
@@ -1,127 +1,94 @@
<template>
<div>
<el-tabs type="border-card" v-model="activeName">
<template v-for="item in tabPaneList">
<el-tab-pane :label="$t(`uploadDicomAndNonedicom:label:TargetSection_${item}`)" :name="item">
<BaseContainer v-if="activeName == item">
<div slot="search-container">
<el-form :inline="true">
<!-- 受试者编号 -->
<el-form-item :label="$t('trials:pendingReadingTasks:table:subjectCode')">
<el-input v-model="searchData.SubjectCode" style="width: 130px" clearable />
</el-form-item>
<el-form-item>
<!-- 查询 -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
</el-button>
<!-- 重置 -->
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
</el-form>
</div>
<div slot="main-container">
<el-table v-adaptive="{ bottomOffset: 85 }" :data="list" stripe height="100"
@sort-change="handleSortChange" v-loading="loading">
<el-table-column type="index" width="40" align="left" />
<el-table-column prop="IsUrgent" :label="$t('trials:consistencyCheck:table:isUrgent')"
show-overflow-tooltip min-width="100">
<template slot-scope="scope">
<el-tag :type="scope.row.IsUrgent
? 'danger' : 'primary'
">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
</template>
</el-table-column>
<!-- 受试者编号 -->
<el-table-column prop="SubjectCode" min-width="100"
:label="$t('trials:pendingReadingTasks:table:subjectCode')" show-overflow-tooltip
sortable="custom" />
<!-- 访视数量 -->
<el-table-column prop="VisitCount"
:label="$t('trials:pendingReadingTasks:table:VisitCount')" show-overflow-tooltip
sortable="custom" />
<!-- dicom检查数量 -->
<!-- <el-table-column prop="DicomStudyCount" :label="$t('trials:pendingReadingTasks:table:DicomStudyCount')"
<BaseContainer>
<div slot="search-container">
<el-form :inline="true">
<!-- 受试者编号 -->
<el-form-item :label="$t('trials:pendingReadingTasks:table:subjectCode')">
<el-input v-model="searchData.SubjectCode" style="width: 130px" clearable />
</el-form-item>
<el-form-item>
<!-- 查询 -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
</el-button>
<!-- 重置 -->
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
</el-form>
</div>
<div slot="main-container">
<el-table v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100" @sort-change="handleSortChange"
v-loading="loading">
<el-table-column type="index" width="40" align="left" />
<el-table-column prop="IsUrgent" :label="$t('trials:consistencyCheck:table:isUrgent')"
show-overflow-tooltip min-width="100">
<template slot-scope="scope">
<el-tag :type="scope.row.IsUrgent
? 'danger' : 'primary'
">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
</template>
</el-table-column>
<!-- 受试者编号 -->
<el-table-column prop="SubjectCode" min-width="100"
:label="$t('trials:pendingReadingTasks:table:subjectCode')" show-overflow-tooltip
sortable="custom" />
<!-- 访视数量 -->
<el-table-column prop="VisitCount" :label="$t('trials:pendingReadingTasks:table:VisitCount')"
show-overflow-tooltip sortable="custom" />
<!-- dicom检查数量 -->
<!-- <el-table-column prop="DicomStudyCount" :label="$t('trials:pendingReadingTasks:table:DicomStudyCount')"
show-overflow-tooltip sortable="custom" /> -->
<!-- 非dicom检查数量 -->
<!-- <el-table-column prop="NoneDicomStudyCount"
<!-- 非dicom检查数量 -->
<!-- <el-table-column prop="NoneDicomStudyCount"
:label="$t('trials:pendingReadingTasks:table:NoneDicomStudyCount')" show-overflow-tooltip
sortable="custom" /> -->
<!-- 标记访视数量 -->
<el-table-column prop="MarkIVUSVisitCount"
:label="$t('trials:pendingReadingTasks:table:MarkVisitCount')" show-overflow-tooltip
sortable="custom">
<template slot-scope="scope">
<span>{{ scope.row.MarkIVUSVisitCount || 0
}}</span>
</template>
</el-table-column>
<!-- 标记访视数量 -->
<el-table-column prop="MarkOCTVisitCount"
:label="$t('trials:pendingReadingTasks:table:MarkOCTVisitCount')"
show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
<span>{{ scope.row.MarkOCTVisitCount ||
0
}}</span>
</template>
</el-table-column>
<!-- 标记dicom检查数量 -->
<!-- <el-table-column prop="MarkDicomStudyCount"
<!-- 标记访视数量 -->
<el-table-column prop="MarkVisitCount" :label="$t('trials:pendingReadingTasks:table:MarkVisitCount')"
show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ `${scope.row.MarkIVUSVisitCount || 0}/${scope.row.MarkOCTVisitCount || 0}` }}</span>
</template>
</el-table-column>
<!-- 标记dicom检查数量 -->
<!-- <el-table-column prop="MarkDicomStudyCount"
:label="$t('trials:pendingReadingTasks:table:MarkDicomStudyCount')" show-overflow-tooltip
sortable="custom" /> -->
<!-- 标记非dicom检查数量 -->
<!-- <el-table-column prop="MarkNoneDicomStudyCount"
<!-- 标记非dicom检查数量 -->
<!-- <el-table-column prop="MarkNoneDicomStudyCount"
:label="$t('trials:pendingReadingTasks:table:MarkNoneDicomStudyCount')" show-overflow-tooltip
sortable="custom" /> -->
<!-- 下载时间 -->
<el-table-column prop="LatestDownloadTime" min-width="100"
:label="$t('trials:pendingReadingTasks:table:latestDownloadTime')"
show-overflow-tooltip sortable="custom" />
<!-- 上传时间 -->
<el-table-column prop="LatestUploadTime" min-width="100"
:label="$t('trials:pendingReadingTasks:table:latestUploadTime')"
show-overflow-tooltip sortable="custom" />
<el-table-column :label="$t('common:action:action')" width="100" fixed="right">
<template slot-scope="scope">
<!-- 阅片 -->
<!-- <el-button :disabled="scope.row.ExistReadingApply" circle :title="scope.row.ExistReadingApply
<el-table-column :label="$t('common:action:action')" width="100" fixed="right">
<template slot-scope="scope">
<!-- 阅片 -->
<!-- <el-button :disabled="scope.row.ExistReadingApply" circle :title="scope.row.ExistReadingApply
? $t(
'trials:pendingReadingTasks:button:ExistReadingApply'
)
: $t('trials:pendingReadingTasks:button:review')
" icon="el-icon-edit-outline" @click="handleReadImage(scope.row)" /> -->
<!-- 上传 -->
<el-button v-hasPermi="['role:ir', 'role:pm', 'role:apm']" circle
icon="el-icon-upload2"
:title="$t('trials:pendingReadingTasks:button:upload')"
@click="openUploadImage(scope.row, 'upload')" />
<!-- 下载 -->
<el-button v-hasPermi="['role:ir', 'role:pm', 'role:apm']" circle
icon="el-icon-download"
:title="$t('trials:pendingReadingTasks:button:download')"
@click="openUploadImage(scope.row, 'download')" />
</template>
</el-table-column>
</el-table>
<pagination class="page" :total="total" :page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize" @pagination="getList" />
</div>
<upload-dicom-and-nonedicom v-if="uploadImageVisible" :SubjectId="uploadSubjectId"
:SubjectCode="uploadSubjectCode" :Criterion="uploadTrialCriterion"
:visible.sync="uploadImageVisible" :IsImageSegment="true" :forbid="forbid" />
<download-dicom-and-nonedicom v-if="downloadImageVisible" :SubjectId="uploadSubjectId"
:SubjectCode="uploadSubjectCode" :Criterion="uploadTrialCriterion"
:visible.sync="downloadImageVisible" :IsImageSegment="true" :forbid="forbid" />
</BaseContainer>
</el-tab-pane>
</template>
</el-tabs>
</div>
<!-- 上传 -->
<el-button v-hasPermi="['role:ir', 'role:pm', 'role:apm']" circle icon="el-icon-upload2"
:title="$t('trials:pendingReadingTasks:button:upload')"
@click="openUploadImage(scope.row, 'upload')" />
<!-- 下载 -->
<el-button v-hasPermi="['role:ir', 'role:pm', 'role:apm']" circle icon="el-icon-download"
:title="$t('trials:pendingReadingTasks:button:download')"
@click="openUploadImage(scope.row, 'download')" />
</template>
</el-table-column>
</el-table>
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
</div>
<upload-dicom-and-nonedicom v-if="uploadImageVisible" :SubjectId="uploadSubjectId"
:SubjectCode="uploadSubjectCode" :Criterion="uploadTrialCriterion" :visible.sync="uploadImageVisible"
:IsImageSegment="true" :forbid="forbid" />
<download-dicom-and-nonedicom v-if="downloadImageVisible" :SubjectId="uploadSubjectId"
:SubjectCode="uploadSubjectCode" :Criterion="uploadTrialCriterion" :visible.sync="downloadImageVisible"
:IsImageSegment="true" :forbid="forbid" />
</BaseContainer>
</template>
<script>
import BaseContainer from '@/components/BaseContainer'
@@ -132,7 +99,6 @@ import { getTrialSubjectVisitMarkList } from "@/api/trials"
const searchDataDefault = () => {
return {
SubjectCode: '',
State: 0,
PageIndex: 1,
PageSize: 20,
}
@@ -163,8 +129,6 @@ export default {
},
data() {
return {
activeName: '0',
tabPaneList: ['0', '1', '2'],
searchData: searchDataDefault(),
loading: false,
list: [],
@@ -189,9 +153,6 @@ export default {
if (!v) {
this.getList()
}
},
activeName() {
this.getList()
}
},
mounted() {
@@ -210,7 +171,6 @@ export default {
try {
this.searchData.TrialId = this.$route.query.trialId
this.searchData.TrialReadingCriterionId = this.TrialReadingCriterionId
this.searchData.State = this.activeName
this.loading = true
let res = await getTrialSubjectVisitMarkList(this.searchData)
this.loading = false
@@ -88,21 +88,21 @@
: $t('trials:pendingReadingTasks:button:review')
" icon="el-icon-edit-outline" @click="handleReadImage(scope.row)" />
<!-- 上传 -->
<!-- <el-button v-if="
<el-button v-if="
item.ImageUploadEnum > 0 &&
item.IsReadingTaskViewInOrder > 1 &&
!scope.row.IsSubjectJudge
" v-hasPermi="['role:ir']" circle icon="el-icon-upload2"
:title="$t('trials:pendingReadingTasks:button:upload')"
@click="openUploadImage(scope.row, item, 'upload')" /> -->
@click="openUploadImage(scope.row, item, 'upload')" />
<!-- 下载 -->
<!-- <el-button v-if="
<el-button v-if="
item.ImageDownloadEnum > 0 &&
item.IsReadingTaskViewInOrder > 1 &&
!scope.row.IsSubjectJudge
" v-hasPermi="['role:ir']" circle icon="el-icon-download"
:title="$t('trials:pendingReadingTasks:button:download')"
@click="openUploadImage(scope.row, item, 'download')" /> -->
@click="openUploadImage(scope.row, item, 'download')" />
</template>
</el-table-column>
</el-table>
@@ -1,6 +1,6 @@
<template>
<BaseContainer class="reread-task">
<el-tabs v-if="TrialReadingCriterionId" v-model="TrialReadingCriterionId" type="border-card">
<el-tabs v-model="TrialReadingCriterionId" type="border-card">
<el-tab-pane v-for="item of trialCriterionList" :key="item.TrialReadingCriterionId" :label="item.TrialReadingCriterionName" :name="item.TrialReadingCriterionId">
<div v-if="TrialReadingCriterionId === item.TrialReadingCriterionId">
<div slot="search-container">
@@ -82,7 +82,6 @@
</div>
<div slot="main-container">
<el-table
:ref="TrialReadingCriterionId"
v-adaptive="{bottomOffset:75}"
v-loading="loading"
:data="list"
@@ -333,7 +332,7 @@ export default {
},
ConfirmReReadingVisible: false,
trialCriterionList: [],
TrialReadingCriterionId: '',
TrialReadingCriterionId: '0',
otherInfo: null
}
},
@@ -380,9 +379,6 @@ export default {
this.total = res.Result.TotalCount
this.otherInfo = res.OtherInfo
this.loading = false
this.$nextTick(() => {
this.$refs[this.TrialReadingCriterionId][0].doLayout()
})
}).catch(() => { this.loading = false })
},
handleSearch() {
@@ -311,7 +311,7 @@ export default {
parseFloat(obj.val) < parseFloat(v.lt)
)
})
answer = o ? o.label : 'NE'
answer = o ? o.label : null
} else if (i.classifyType === 1) {
const o = list.find(v => {
return v.val.includes(obj.val)
@@ -251,7 +251,7 @@ export default {
return i
})
this.$set(this.visitTaskList[taskIdx], 'Annotations', annotations)
this.$refs[visitTaskId][0].initCurrentMaredFiles(annotations)
this.$refs[visitTaskId][0].initCurrentMaredFiles()
this.$refs.fileViewer.resetAnnotations({ annotations, visitTaskId })
},
setReadingTaskState(state) {
@@ -97,7 +97,6 @@ export default {
this.taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId)
this.studyList = this.decorateStudyList(this.visitTaskInfo.StudyList || [])
this.initCurrentMaredFiles(this.visitTaskInfo.Annotations)
if (this.studyList.length === 0) return
this.$nextTick(() => {
this.activeStudy(this.studyList[0].Id)
@@ -111,26 +110,8 @@ export default {
})
}
},
'visitTaskInfo.Annotations': {
handler(annotations) {
this.initCurrentMaredFiles(annotations)
},
deep: true
}
},
methods: {
buildCurrentMarkedFiles(annotations = []) {
return annotations.reduce((result, item) => {
const fileId = item?.NoneDicomFileId
if (!fileId) return result
if (!Object.hasOwn(result, fileId)) {
result[fileId] = { count: 1 }
} else {
result[fileId].count++
}
return result
}, {})
},
decorateStudyList(studyList = []) {
return studyList.map(study => ({
...study,
@@ -223,9 +204,6 @@ export default {
if (type === 'remove') {
if (Object.hasOwn(this.currentMarkedFiles, fileId)) {
this.currentMarkedFiles[fileId].count--
if (this.currentMarkedFiles[fileId].count <= 0) {
this.$delete(this.currentMarkedFiles, fileId)
}
}
} else if (type === 'add') {
if (!Object.hasOwn(this.currentMarkedFiles, fileId)) {
@@ -236,8 +214,15 @@ export default {
}
},
initCurrentMaredFiles(annotations = this.visitTaskInfo.Annotations || []) {
this.currentMarkedFiles = this.buildCurrentMarkedFiles(annotations)
initCurrentMaredFiles() {
this.currentMarkedFiles = {}
this.visitTaskInfo.Annotations.map(i => {
if (!Object.hasOwn(this.currentMarkedFiles, i.NoneDicomFileId)) {
this.$set(this.currentMarkedFiles, i.NoneDicomFileId, { count: 1 })
} else {
this.currentMarkedFiles[i.NoneDicomFileId].count++
}
})
},
}
}
@@ -1,60 +1,18 @@
<!-- eslint-disable -->
<!-- eslint-disable vue/no-unused-vars -->
<!-- eslint-disable vue/no-template-shadow -->
/* eslint-disable */
<template>
<el-form v-loading="loading" :label-width="'100px'">
<el-form v-loading="loading">
<!-- 仲裁对象 -->
<el-form-item :label="$t('trials:adRules:title:arbitrationRule')">
<el-radio-group v-model="JudgyInfo.ArbitrationRule" :disabled="isSign || !hasPermi(['trials:trials-panel:setting:reading-unit:edit'])">
<el-form-item :label="$t('trials:adRules:title:arbitrationRule')" :label-width="'180px'">
<el-radio-group v-model="JudgyInfo.ArbitrationRule" :disabled="OtherInfo.IsSign">
<el-radio v-for="item of $d.ArbitrationRule" :key="item.id"
:disabled="!JudgyInfo.IsReadingTaskViewInOrder || true" :label="item.value" @change="changeArbitrationRule">
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- 仲裁模式JudgeModeEnum 整体结果择一判定指标组合判定-->
<el-form-item :label="$t('trials:adRules:title:judgeMode')">
<el-radio-group v-model="JudgyInfo.JudgeModeEnum" :disabled="isSign || !hasPermi(['trials:trials-panel:setting:reading-unit:edit'])">
<el-radio
v-for="item of $d.JudgeMode"
:key="item.id"
:disabled="JudgyInfo.ArbitrationRule !== 1"
:label="item.value"
>
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- 裁判规则JudgeRuleEnum 访视一致规则访视差异规则-->
<el-form-item :label="$t('trials:adRules:title:judgeRule')">
<el-radio-group v-model="JudgyInfo.JudgeRuleEnum" :disabled="isSign || !hasPermi(['trials:trials-panel:setting:reading-unit:edit'])">
<el-radio
v-for="item of $d.JudgeRule"
:key="item.id"
:label="item.value"
>
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button
v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
type="primary"
size="small"
@click="saveJugeRule"
v-show="!isSign">
{{ $t('common:button:save') }}
</el-button>
</el-form-item>
<ArbitrationRulesByVisit
v-if="judgeRuleEnum === 1"
ref="visitRules"
:trial-reading-criterion-id="trialReadingCriterionId"
:isSign="isSign"
/>
<el-collapse v-else-if="judgeRuleEnum === 0" v-model="activeNames" style="border-top:none;">
<el-collapse v-model="activeNames" style="border-top:none;">
<el-collapse-item v-for="(item, index) of QuestionList" :key="item.ReadingQuestionTrialId"
style="position: relative;padding:0 10px;" :name="item.ReadingQuestionTrialId">
<div slot="title">
@@ -63,28 +21,24 @@
<div style="position: relative">
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
style="position: absolute; right: 0; top: 0; z-index: 10" size="mini" type="primary"
:disabled="isSign" @click="apply(item.ReadingQuestionTrialId, index)">{{ $t('common:button:save')
:disabled="OtherInfo.IsSign" @click="apply(item.ReadingQuestionTrialId, index)">{{ $t('common:button:save')
}}</el-button>
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
style="position: absolute; right: 60px; top: 0; z-index: 10" size="mini" type="primary"
:disabled="isSign" @click="reset(item.ReadingQuestionTrialId, index)">{{ $t('common:button:reset')
:disabled="OtherInfo.IsSign" @click="reset(item.ReadingQuestionTrialId, index)">{{ $t('common:button:reset')
}}</el-button>
<!-- 产生裁判阅片的条件 -->
<el-form-item :label-width="'280px'" :label="$t('trials:adRules:title:judgeTypeEnum')" style="width: 95%">
<el-radio-group v-model="QuestionList[index].JudgeType" @input="(val) => JudgeTypeChange(val, index)">
<template v-for="item of $d.JudgeTypeEnum">
<el-radio
style="margin-bottom: 5px"
:key="item.id"
:disabled="isSign || !hasPermi(['trials:trials-panel:setting:reading-unit:edit'])"
:label="item.value"
v-if="
(['number', 'calculation'].includes(QuestionList[index].Type)
? [1, 4, 5]
: [1, 2, 3]
).includes(item.value)
"
>
<el-radio style="margin-bottom: 5px" :key="item.id" :disabled="OtherInfo.IsSign ||
!hasPermi(['trials:trials-panel:setting:reading-unit:edit'])
" :label="item.value" v-if="
item.value < 4 ||
(item.value > 3 &&
(QuestionList[index].Type === 'number' ||
QuestionList[index].Type === 'calculation'))
">
{{ item.label }}
</el-radio>
</template>
@@ -94,7 +48,7 @@
<div v-if="QuestionList[index].JudgeType === 3" style="text-align: right; margin: 10px 0">
<!-- 添加规则 -->
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']" size="mini" type="primary"
:disabled="isSign" @click="addGroup(index, null)">{{ $t('trials:adRules:button:addRule')
:disabled="OtherInfo.IsSign" @click="addGroup(index, null)">{{ $t('trials:adRules:button:addRule')
}}</el-button>
</div>
<el-table v-if="QuestionList[index].JudgeType === 3" v-loading="loading"
@@ -133,10 +87,10 @@
<template slot-scope="scope">
<!-- 编辑 -->
<el-button icon="el-icon-edit" circle :title="$t('common:button:edit')" size="mini"
:disabled="isSign" @click="addGroup(index, scope.$index)" />
:disabled="OtherInfo.IsSign" @click="addGroup(index, scope.$index)" />
<!-- 删除 -->
<el-button icon="el-icon-delete" circle :title="$t('common:button:delete')" size="mini"
:disabled="isSign" @click="tagClose(index, scope.$index)" />
:disabled="OtherInfo.IsSign" @click="tagClose(index, scope.$index)" />
</template>
</el-table-column>
</el-table>
@@ -149,12 +103,12 @@
">
<el-checkbox-group v-if="QuestionList[index].QuestionGenre === 3" v-model="QuestionList[index].grouping">
<template v-for="item of $d[QuestionList[index].DictionaryCode]">
<el-checkbox v-if="item.value !== -1" :key="item.id" :disabled="isSign" :label="item.value">{{
<el-checkbox v-if="item.value !== -1" :key="item.id" :disabled="OtherInfo.IsSign" :label="item.value">{{
item.label }}</el-checkbox>
</template>
</el-checkbox-group>
<el-checkbox-group v-else v-model="QuestionList[index].grouping">
<el-checkbox v-for="item of item.TypeValue.split('|')" :key="item" :disabled="isSign"
<el-checkbox v-for="item of item.TypeValue.split('|')" :key="item" :disabled="OtherInfo.IsSign"
:label="item">{{
item }}</el-checkbox>
</el-checkbox-group>
@@ -181,7 +135,7 @@
.toString()
.replaceAll(',', '|')
}}</el-tag>
<el-button size="mini" type="primary" :disabled="isSign" @click="addGroup2(index)">
<el-button size="mini" type="primary" :disabled="OtherInfo.IsSign" @click="addGroup2(index)">
<!-- 添加分组 -->
{{ $t('trials:adRules:title:addGroup') }}
</el-button>
@@ -227,7 +181,7 @@
)
" prop="JudgeDifferenceType">
<el-select v-model="QuestionList[index].JudgeDifferenceType" placeholder="请选择"
:disabled="isSign">
:disabled="OtherInfo.IsSign">
<el-option v-for="item of $d.JudgeDifferenceType" :key="item.id" :label="item.label"
:value="item.value">
</el-option>
@@ -239,7 +193,7 @@
" prop="JudgeDifferenceValue">
<div style="display: flex">
<el-input v-model="QuestionList[index].JudgeDifferenceValue" clearable
:disabled="isSign"></el-input>
:disabled="OtherInfo.IsSign"></el-input>
<span style="margin-left: 10px" v-if="QuestionList[index].JudgeType !== 5 && QuestionList[index].Unit !== 0">
{{ `${QuestionList[index].Unit === 4 ? QuestionList[index].CustomUnit : $fd('ValueUnit', QuestionList[index].Unit)}`}}
</span>
@@ -249,6 +203,8 @@
</div>
</el-collapse-item>
</el-collapse>
<!-- </el-tab-pane>-->
<!-- </el-tabs>-->
<!-- 选择答案 -->
<el-dialog v-if="QuestionVisible" :title="$t('trials:adRules:title:selectAnswer')" :visible.sync="QuestionVisible"
width="800px" :close-on-click-modal="false" custom-class="base-dialog-wrapper" append-to-body>
@@ -256,50 +212,40 @@
<!-- 阅片人A -->
<el-form-item label-width="110px" :label="$t('trials:adRules:title:answerGroupA')">
<el-checkbox-group v-model="QuestionList[selectIndex].groupingA">
<template v-for="item of QuestionList[selectIndex].TypeValue.split('|') || []">
<el-checkbox
v-if="QuestionList[selectIndex].QuestionGenre !== 3"
:key="item"
:label="item"
:disabled="QuestionList[selectIndex]?.groupingB?.includes(item) ?? false"
>
{{ item }}
</el-checkbox>
<template v-for="item of QuestionList[selectIndex].TypeValue.split('|')">
<el-checkbox v-if="QuestionList[selectIndex].QuestionGenre !== 3" :key="item" :label="item" :disabled="QuestionList[selectIndex].groupingB.length
? ~QuestionList[selectIndex].groupingB.indexOf(item)
: false
">{{ item }}</el-checkbox>
</template>
<template v-for="item of $d[QuestionList[selectIndex].DictionaryCode]">
<el-checkbox
v-if="QuestionList[selectIndex].QuestionGenre === 3 && item.value !== -1"
:key="item.id"
:label="item.value"
:disabled="QuestionList[selectIndex]?.groupingB?.includes(item.value) ?? false"
>
{{ item.label }}
</el-checkbox>
<el-checkbox v-if="
QuestionList[selectIndex].QuestionGenre === 3 &&
item.value !== -1
" :key="item.id" :label="item.value" :disabled="QuestionList[selectIndex].groupingB.length
? ~QuestionList[selectIndex].groupingB.indexOf(item.value)
: false
">{{ item.label }}</el-checkbox>
</template>
</el-checkbox-group>
</el-form-item>
<!-- 阅片人B -->
<el-form-item label-width="110px" :label="$t('trials:adRules:title:answerGroupB')">
<el-checkbox-group v-model="QuestionList[selectIndex].groupingB">
<template v-for="item of QuestionList[selectIndex].TypeValue.split('|') || []">
<el-checkbox
v-if="QuestionList[selectIndex].QuestionGenre !== 3"
:key="item"
:label="item"
:disabled="QuestionList[selectIndex]?.groupingA?.includes(item) ?? false"
>
{{ item }}
</el-checkbox>
<template v-for="item of QuestionList[selectIndex].TypeValue.split('|')">
<el-checkbox v-if="QuestionList[selectIndex].QuestionGenre !== 3" :key="item" :label="item" :disabled="QuestionList[selectIndex].groupingA.length
? ~QuestionList[selectIndex].groupingA.indexOf(item)
: false
">{{ item }}</el-checkbox>
</template>
<template v-for="item of $d[QuestionList[selectIndex].DictionaryCode]">
<el-checkbox
v-if="QuestionList[selectIndex].QuestionGenre === 3 && item.value !== -1"
:key="item.id"
:label="item.value"
:disabled="QuestionList[selectIndex]?.groupingA?.includes(item.value) ?? false"
>
{{ item.label }}
</el-checkbox>
<el-checkbox v-if="
QuestionList[selectIndex].QuestionGenre === 3 &&
item.value !== -1
" :key="item.id" :label="item.value" :disabled="QuestionList[selectIndex].groupingA.length
? ~QuestionList[selectIndex].groupingA.indexOf(item.value)
: false
">{{ item.label }}</el-checkbox>
</template>
</el-checkbox-group>
</el-form-item>
@@ -309,8 +255,8 @@
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']" :disabled="btnLoading" size="small"
type="primary" @click="
QuestionVisible = false
$set(QuestionList[selectIndex], 'groupingA', [])
$set(QuestionList[selectIndex], 'groupingB', [])
$set(QuestionList[selectIndex], 'groupingA', [])
$set(QuestionList[selectIndex], 'groupingB', [])
">
{{ $t('common:button:cancel') }}
</el-button>
@@ -323,17 +269,13 @@
</el-form>
</template>
<script>
/* eslint-disable */
import {
getTrialConfirmCriterionList,
getTrialCriterionJudgeQuestionList,
setTrialCriterionJudgeQuestionAnswerGroup,
} from '@/api/trials/reading'
import { setTrialJudgyInfo, getTrialJudgyInfo, setTrialJudgeRuleInfo } from '@/api/trials/setting'
import ArbitrationRulesByVisit from './ArbitrationRulesByVisit'
import { setTrialJudgyInfo, getTrialJudgyInfo } from '@/api/trials/setting'
export default {
components: {
ArbitrationRulesByVisit,
},
props: {
trialReadingCriterionId: {
type: String,
@@ -352,7 +294,9 @@ export default {
activeNames: null,
indexA: null,
type: null,
isSign: true,
OtherInfo: {
IsSign: true,
},
JudgyInfo: {},
JudgeDifferenceValueQRules: {
JudgeDifferenceType: [
@@ -395,38 +339,47 @@ export default {
},
],
},
judgeRuleEnum: -1,
savedJudgyInfo: {
JudgeModeEnum: null,
JudgeRuleEnum: null,
},
}
},
watch: {
async trialReadingCriterionId(v) {
TrialReadingCriterionId(v) {
if (v === null) return
await this.initData()
this.loading = true
getTrialCriterionJudgeQuestionList({
TrialId: this.$route.query.trialId,
// ReadingQuestionCriterionTrialId: v,
TrialReadingCriterionId: this.trialReadingCriterionId,
})
.then((res) => {
this.loading = false
this.QuestionList = res.Result
this.OtherInfo = res.OtherInfo
this.activeNames = this.QuestionList.map(
(v) => v.ReadingQuestionTrialId
)
this.QuestionList.forEach((v) => {
this.$set(v, 'grouping', [])
this.$set(v, 'groupingA', [])
this.$set(v, 'groupingB', [])
this.$set(
v,
'AnswerGroupList',
Object.assign([], v.AnswerCombination)
)
this.$set(v, 'AnswerGroup2List', Object.assign([], v.AnswerGroup))
})
})
.catch(() => {
this.btnLoading = false
this.loading = false
})
},
},
async mounted() {
await this.initData()
mounted() {
this.getList()
this.getTrialJudgyInfo()
},
methods: {
resetJudgeTypeRelatedFields(question = {}) {
this.$set(question, 'AnswerGroup2List', [])
this.$set(question, 'AnswerGroupList', [])
this.$set(question, 'grouping', [])
this.$set(question, 'groupingA', [])
this.$set(question, 'groupingB', [])
this.$set(question, 'JudgeDifferenceValue', 0)
this.$set(question, 'JudgeDifferenceType', 0)
},
async initData() {
await this.getTrialJudgyInfo()
if (this.judgeRuleEnum !== 1) {
await this.getList(false)
}
},
//
changeArbitrationRule(value) {
if (value !== 1) {
@@ -434,16 +387,12 @@ export default {
item.JudgeDifferenceValue = 0
item.JudgeDifferenceType = 0
})
if (this.$refs.visitRules) {
this.$refs.visitRules.changeArbitrationRule(value)
}
}
},
JudgeTypeChange(value, index) {
this.resetJudgeTypeRelatedFields(this.QuestionList[index])
this.$nextTick(() => {
if (value === 4 || value === 5) {
if (this.$refs['JudgeDifferenceValue' + value + index] && this.$refs['JudgeDifferenceValue' + value + index][0]) {
if (this.$refs['JudgeDifferenceValue' + value + index][0]) {
this.$refs['JudgeDifferenceValue' + value + index][0].resetFields()
// this.QuestionList[index].JudgeDifferenceValue = 0;
}
@@ -451,26 +400,25 @@ export default {
})
},
saveAllSync() {
if (this.judgeRuleEnum === 1 && this.$refs.visitRules) {
return Promise.resolve(true)
// return this.$refs.visitRules.saveAllSync()
}
return new Promise((resolve) => {
return new Promise((resolve, reject) => {
var arr = []
this.QuestionList.forEach((v, i) => {
arr.push(this.applySync(v.ReadingQuestionTrialId, i))
})
Promise.all(arr)
.then(() => {
.then((res) => {
console.log(res)
resolve(true)
})
.catch(() => {
.catch((res) => {
console.log('进入catch')
resolve(false)
})
})
},
applySync(ReadingQuestionTrialId, index) {
return new Promise(async (resolve, reject) => {
console.log(this.QuestionList[index].JudgeType)
if (this.QuestionList[index].JudgeType === 0) {
reject(false)
return
@@ -494,7 +442,7 @@ export default {
this.QuestionList[index].JudgeType === 5
) {
try {
const validate = await this.$refs[
let validate = await this.$refs[
'JudgeDifferenceValue' +
this.QuestionList[index].JudgeType +
index
@@ -545,55 +493,19 @@ export default {
this.loading = false
})
},
async getTrialJudgyInfo() {
try {
this.loading = true
const res = await getTrialJudgyInfo({
TrialId: this.$route.query.trialId,
TrialReadingCriterionId: this.trialReadingCriterionId,
getTrialJudgyInfo() {
this.loading = true
getTrialJudgyInfo({
TrialId: this.$route.query.trialId,
TrialReadingCriterionId: this.trialReadingCriterionId,
})
.then((res) => {
this.JudgyInfo = res.Result
this.loading = false
})
.catch((v) => {
this.loading = false
})
this.JudgyInfo = res.Result
this.judgeRuleEnum = this.JudgyInfo.JudgeRuleEnum
this.isSign = res.Result.IsSigned
} catch (e) {
console.log(e)
} finally {
this.loading = false
}
},
async saveJugeRule(showMessage = true) {
try {
this.loading = true
const prevJudgeRuleEnum = this.judgeRuleEnum
const params = {
trialReadingCriterionId: this.trialReadingCriterionId,
judgeModeEnum: this.JudgyInfo.JudgeModeEnum,
judgeRuleEnum: this.JudgyInfo.JudgeRuleEnum,
}
const res = await setTrialJudgeRuleInfo(params)
if (res.IsSuccess) {
if (showMessage) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
this.judgeRuleEnum = this.JudgyInfo.JudgeRuleEnum
if (prevJudgeRuleEnum !== this.judgeRuleEnum) {
if (this.judgeRuleEnum === 1) {
await this.$nextTick()
if (this.$refs.visitRules) {
await this.$refs.visitRules.initData()
}
} else {
await this.getList(false)
}
}
}
return true
} catch (e) {
console.log(e)
return false
} finally {
this.loading = false
}
},
tagClose2(index, indexA) {
// ''
@@ -681,7 +593,7 @@ export default {
AnswerCombination: [],
JudgeType: 0,
JudgeDifferenceValue: 0,
JudgeDifferenceType: 0
JudgeDifferenceType: 0,
})
.then((res) => {
this.$set(this.QuestionList[index], 'AnswerGroup2List', [])
@@ -723,7 +635,7 @@ export default {
this.QuestionList[index].JudgeType === 5
) {
try {
const validate = await this.$refs[
let validate = await this.$refs[
'JudgeDifferenceValue' + this.QuestionList[index].JudgeType + index
][0].validate()
if (!validate) return
@@ -743,7 +655,7 @@ export default {
),
JudgeDifferenceType: Number(
this.QuestionList[index].JudgeDifferenceType
)
),
})
.then((res) => {
this.$message.success(this.$t('trials:adRules:message:msg9')) // ''
@@ -759,23 +671,18 @@ export default {
this.ReadingQuestionCriterionTrialId =
this.CriterionList[this.index].ReadingQuestionCriterionTrialId
},
async getList(needGetTrialJudgyInfo = true) {
getList() {
this.loading = true
if (needGetTrialJudgyInfo) {
await this.getTrialJudgyInfo()
}
if (this.judgeRuleEnum === 1 && this.$refs.visitRules) {
return this.$refs.visitRules.getList()
}
return getTrialCriterionJudgeQuestionList({
getTrialCriterionJudgeQuestionList({
TrialId: this.$route.query.trialId,
TrialReadingCriterionId: this.trialReadingCriterionId,
})
.then((res) => {
this.loading = false
this.QuestionList = res.Result
this.OtherInfo = res.OtherInfo
this.activeNames = this.QuestionList.map(
(item) => item.ReadingQuestionTrialId
(v) => v.ReadingQuestionTrialId
)
this.QuestionList.forEach((v) => {
this.$set(v, 'grouping', [])
@@ -1,955 +0,0 @@
<template>
<div v-loading="loading">
<el-tabs v-model="activeVisitTab" class="visit-tabs" type="border-card">
<el-tab-pane v-for="visit in visitPlanOptions" :key="visit.Id"
:label="visit.VisitName" :name="visit.Id">
<div v-show="!isSign" class="visit-tabs-actions">
<!-- 批量保存 -->
<el-button
v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
:disabled="btnLoading || questionListMap[visit.Id] && questionListMap[visit.Id].length === 0"
:loading="btnLoading"
size="small"
type="primary"
@click="handleBatchSave(visit.Id, visit.VisitNum)"
>
{{ $t('common:button:batchSave') }}
</el-button>
<!-- 复制 -->
<el-button
v-show="visitPlanOptions.length > 1"
v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
:disabled="btnLoading || questionListMap[visit.Id] && questionListMap[visit.Id].length === 0"
:loading="btnLoading"
size="small"
type="primary"
@click="handleCopy(visit.VisitNum)"
>
{{ $t('common:button:copy') }}
</el-button>
<!-- 应用到随访 -->
<el-button
v-show="visitPlanOptions.length > 1 && visit.VisitNum === 0"
v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
:disabled="btnLoading || questionListMap[visit.Id] && questionListMap[visit.Id].length === 0"
:loading="btnLoading"
size="small"
type="primary"
@click="applyToFollowup"
>
{{ $t('trials:adRules:button:applyToFollowup') }}
</el-button>
</div>
<el-collapse v-if="questionListMap[visit.Id]" v-model="visitActiveNamesMap[visit.Id]" style="border-top:none;">
<el-collapse-item v-for="(item, index) of questionListMap[visit.Id]"
:key="item.ReadingQuestionTrialId"
style="position: relative;padding:0 10px;" :name="item.ReadingQuestionTrialId">
<div slot="title">
{{ item.PageName }}Q{{ index + 1 }}{{ item.QuestionName }}
</div>
<div style="position: relative">
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
style="position: absolute; right: 0; top: 0; z-index: 10" size="mini" type="primary"
:disabled="isSign"
@click="visitApply(item.ReadingQuestionTrialId, index, visit.Id, visit.VisitNum)">{{ $t('common:button:save')
}}</el-button>
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
style="position: absolute; right: 60px; top: 0; z-index: 10" size="mini" type="primary"
:disabled="isSign"
@click="visitReset(item.ReadingQuestionTrialId, index, visit.Id, visit.VisitNum)">{{ $t('common:button:reset')
}}</el-button>
<el-form-item :label-width="'280px'" :label="$t('trials:adRules:title:judgeTypeEnum')" style="width: 95%">
<el-radio-group
v-model="questionListMap[visit.Id][index].JudgeType"
@input="(val) => visitJudgeTypeChange(val, index, visit.Id)"
>
<template v-for="judgeTypeItem of $d.JudgeTypeEnum">
<el-radio
style="margin-bottom: 5px"
:key="judgeTypeItem.id"
:disabled="isSign || !hasPermi(['trials:trials-panel:setting:reading-unit:edit'])"
:label="judgeTypeItem.value"
v-if="
(['number', 'calculation'].includes(questionListMap[visit.Id][index].Type)
? [1, 4, 5, 6]
: [1, 2, 3, 6]
).includes(judgeTypeItem.value)
"
>
{{ judgeTypeItem.label }}
</el-radio>
</template>
</el-radio-group>
</el-form-item>
</div>
<div v-if="questionListMap[visit.Id][index].JudgeType === 3" style="text-align: right; margin: 10px 0">
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']" size="mini" type="primary"
:disabled="isSign"
@click="visitAddGroup(index, null, visit.Id)">{{ $t('trials:adRules:button:addRule')
}}</el-button>
</div>
<el-table v-if="questionListMap[visit.Id][index].JudgeType === 3" v-loading="loading"
:data="questionListMap[visit.Id][index].AnswerGroupList" border stripe>
<el-table-column prop="AnswerGroupA" :label="$t('trials:adRules:title:order')" width="160">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="AnswerGroupA" :label="$t('trials:adRules:title:answerGroupA')" min-width="100">
<template slot-scope="scope">
{{
questionListMap[visit.Id][index].QuestionGenre === 3
? scope.row.AnswerGroupA.map((v) =>
$fd(questionListMap[visit.Id][index].DictionaryCode, parseInt(v))
).toString()
: scope.row.AnswerGroupA.toString()
}}
</template>
</el-table-column>
<el-table-column prop="AnswerGroupB" :label="$t('trials:adRules:title:answerGroupB')" min-width="100">
<template slot-scope="scope">
{{
questionListMap[visit.Id][index].QuestionGenre === 3
? scope.row.AnswerGroupB.map((v) =>
$fd(questionListMap[visit.Id][index].DictionaryCode, parseInt(v))
).toString()
: scope.row.AnswerGroupB.toString()
}}
</template>
</el-table-column>
<el-table-column prop="AnswerGroupB" :label="$t('common:action:action')" min-width="80">
<template slot-scope="scope">
<el-button icon="el-icon-edit" circle :title="$t('common:button:edit')" size="mini"
:disabled="isSign"
@click="visitAddGroup(index, scope.$index, visit.Id)" />
<el-button icon="el-icon-delete" circle :title="$t('common:button:delete')" size="mini"
:disabled="isSign"
@click="visitTagClose(index, scope.$index, visit.Id)" />
</template>
</el-table-column>
</el-table>
<div v-if="questionListMap[visit.Id][index].JudgeType === 2">
<div style="
background: #f6f6f6;
border-radius: 20px;
padding: 15px 20px;
margin-top: 10px;
">
<el-checkbox-group v-if="questionListMap[visit.Id][index].QuestionGenre === 3"
v-model="questionListMap[visit.Id][index].grouping"
>
<template v-for="dictItem of $d[questionListMap[visit.Id][index].DictionaryCode]">
<el-checkbox v-if="dictItem.value !== -1" :key="dictItem.id" :disabled="isSign"
:label="dictItem.value">{{ dictItem.label }}</el-checkbox>
</template>
</el-checkbox-group>
<el-checkbox-group v-else v-model="questionListMap[visit.Id][index].grouping">
<el-checkbox v-for="answerItem of item.TypeValue.split('|')" :key="answerItem"
:disabled="isSign" :label="answerItem">{{ answerItem }}</el-checkbox>
</el-checkbox-group>
<div style="margin-top: 20px">
{{ $t('trials:adRules:title:selectAnswerGroup') }}
<el-tag v-if="
questionListMap[visit.Id][index].grouping.length > 0 &&
questionListMap[visit.Id][index].QuestionGenre !== 3
">{{
questionListMap[visit.Id][index].grouping.toString().replaceAll(',', '|')
}}</el-tag>
<el-tag v-if="
questionListMap[visit.Id][index].grouping.length > 0 &&
questionListMap[visit.Id][index].QuestionGenre === 3
">{{
questionListMap[visit.Id][index].grouping
.map(
(v) =>
$d[questionListMap[visit.Id][index].DictionaryCode].find(
(v1) => v1.value === v
).label
)
.toString()
.replaceAll(',', '|')
}}</el-tag>
<el-button size="mini" type="primary" :disabled="isSign"
@click="visitAddGroup2(index, visit.Id)">
{{ $t('trials:adRules:title:addGroup') }}</el-button>
</div>
</div>
<div v-if="questionListMap[visit.Id][index].QuestionGenre !== 3" style="margin-top: 20px">
{{ $t('trials:adRules:title:group') }}
<el-tag v-for="(itemA, indexA) of questionListMap[visit.Id][index].AnswerGroup2List"
:key="visit.Id+indexA" closable
style="margin-right: 10px" @close="() => visitTagClose2(index, indexA, visit.Id)">{{ itemA }}</el-tag>
</div>
<div v-if="questionListMap[visit.Id][index].QuestionGenre === 3" style="margin-top: 20px">
{{ $t('trials:adRules:title:group') }}
<el-tag v-for="(itemA, indexA) of questionListMap[visit.Id][index].AnswerGroup2List"
:key="visit.Id+indexA" closable
style="margin-right: 10px" @close="() => visitTagClose2(index, indexA, visit.Id)">
{{
itemA
.split('|')
.map((v) =>
$fd(questionListMap[visit.Id][index].DictionaryCode, parseInt(v))
)
.join('|')
}}
</el-tag>
</div>
</div>
<div v-if="
questionListMap[visit.Id][index].JudgeType === 4 ||
questionListMap[visit.Id][index].JudgeType === 5
">
<el-form :inline="true" :model="questionListMap[visit.Id][index]" class="demo-form-inline"
:ref="`JudgeDifferenceValue${questionListMap[visit.Id][index].JudgeType}_${visit.Id}_${index}`"
:rules="JudgeDifferenceValueQRules">
<el-form-item :label="$t(
`trials:trials-panel:setting:reading-unit:JudgeDifferenceType`
)
" prop="JudgeDifferenceType">
<el-select
v-model="questionListMap[visit.Id][index].JudgeDifferenceType"
:disabled="isSign">
<el-option v-for="judgeDiffItem of $d.JudgeDifferenceType" :key="judgeDiffItem.id"
:label="judgeDiffItem.label" :value="judgeDiffItem.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t(
`trials:trials-panel:setting:reading-unit:JudgeDifferenceValue${questionListMap[visit.Id][index].JudgeType}`
)
" prop="JudgeDifferenceValue">
<div style="display: flex">
<el-input v-model="questionListMap[visit.Id][index].JudgeDifferenceValue" clearable
:disabled="isSign"></el-input>
<span style="margin-left: 10px"
v-if="questionListMap[visit.Id][index].JudgeType !== 5 && questionListMap[visit.Id][index].Unit !== 0">
{{ `${questionListMap[visit.Id][index].Unit === 4 ? questionListMap[visit.Id][index].CustomUnit : $fd('ValueUnit', questionListMap[visit.Id][index].Unit)}` }}
</span>
</div>
</el-form-item>
</el-form>
</div>
</el-collapse-item>
</el-collapse>
</el-tab-pane>
</el-tabs>
<el-dialog v-if="questionVisible" :title="$t('trials:adRules:title:selectAnswer')" :visible.sync="questionVisible"
width="800px" :close-on-click-modal="false" custom-class="base-dialog-wrapper" append-to-body>
<div class="base-dialog-body">
<el-form-item label-width="110px" :label="$t('trials:adRules:title:answerGroupA')">
<el-checkbox-group v-model="questionList[selectIndex].groupingA">
<template v-for="item of questionList[selectIndex].TypeValue.split('|') || []">
<el-checkbox
v-if="questionList[selectIndex].QuestionGenre !== 3"
:key="item"
:label="item"
:disabled="questionList[selectIndex]?.groupingB?.includes(item) ?? false"
>
{{ item }}
</el-checkbox>
</template>
<template v-for="item of $d[questionList[selectIndex].DictionaryCode]">
<el-checkbox
v-if="questionList[selectIndex].QuestionGenre === 3 && item.value !== -1"
:key="item.id"
:label="item.value"
:disabled="questionList[selectIndex]?.groupingB?.includes(item.value) ?? false"
>{{ item.label }}</el-checkbox>
</template>
</el-checkbox-group>
</el-form-item>
<el-form-item label-width="110px" :label="$t('trials:adRules:title:answerGroupB')">
<el-checkbox-group v-model="questionList[selectIndex].groupingB">
<template v-for="item of questionList[selectIndex].TypeValue.split('|') || []">
<el-checkbox
v-if="questionList[selectIndex].QuestionGenre !== 3"
:key="item"
:label="item"
:disabled="questionList[selectIndex]?.groupingA?.includes(item) ?? false"
>
{{ item }}
</el-checkbox>
</template>
<template v-for="item of $d[questionList[selectIndex].DictionaryCode]">
<el-checkbox
v-if="questionList[selectIndex].QuestionGenre === 3 && item.value !== -1"
:key="item.id"
:label="item.value"
:disabled="questionList[selectIndex]?.groupingA?.includes(item.value) ?? false"
>
{{ item.label }}
</el-checkbox>
</template>
</el-checkbox-group>
</el-form-item>
</div>
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']" :disabled="btnLoading" size="small"
type="primary" @click="
questionVisible = false
$set(questionList[selectIndex], 'groupingA', [])
$set(questionList[selectIndex], 'groupingB', [])
">
{{ $t('common:button:cancel') }}
</el-button>
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']" :disabled="btnLoading" size="small"
type="primary" @click="save">
{{ $t('common:button:save') }}
</el-button>
</div>
</el-dialog>
<el-dialog
v-if="copyVisible"
:title="$t('common:button:copy')"
:visible.sync="copyVisible"
width="500px"
:close-on-click-modal="false"
custom-class="base-dialog-wrapper"
append-to-body
>
<div class="base-dialog-body">
<el-form label-width="100px">
<el-form-item :label="$t('trials:trials-panel:setting:reading-unit:targetVisitNum')">
<el-select v-model="copySourceVisitNum" style="width: 100%" filterable>
<el-option
v-for="visit in copySourceVisitOptions"
:key="visit.Id"
:label="visit.VisitName"
:value="visit.VisitNum"
/>
</el-select>
</el-form-item>
</el-form>
</div>
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
<el-button
v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
:disabled="btnLoading"
size="small"
@click="closeCopyDialog"
>
{{ $t('common:button:cancel') }}
</el-button>
<el-button
v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
:disabled="btnLoading"
:loading="btnLoading"
size="small"
type="primary"
@click="confirmCopy"
>
{{ $t('common:button:confirm') }}
</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
/* eslint-disable */
import {
getTrialQuestionVisitJudgeRule,
setTrialQuestionVisitJudgeRule,
copyTrialQuestionVisitJudgeRule,
applyBaseLineTrialQuestionVisitJudgeRule
} from '@/api/trials/reading'
import { getTrialVisitStageSelect } from '@/api/trials'
export default {
props: {
trialReadingCriterionId: {
type: String,
default: '',
},
isSign: {
type: Boolean,
required: true
}
},
data() {
return {
btnLoading: false,
loading: false,
activeVisitTab: '',
visitActiveNamesMap: {},
questionListMap: {},
visitPlanOptions: [],
questionVisible: false,
copyVisible: false,
copyTargetVisitNum: null,
copySourceVisitNum: null,
selectIndex: 0,
indexA: null,
selectVisitKey: '',
type: null,
OtherInfo: {
IsSign: true,
},
JudgeDifferenceValueQRules: {
JudgeDifferenceType: [
{
required: true,
message: this.$t(
'trials:trials-list:setitng:JudgeDifferenceTypeRequired'
),
trigger: 'blur',
},
],
JudgeDifferenceValue: [
{
required: true,
message: this.$t(
'trials:trials-list:setitng:JudgeDifferenceValueRequired'
),
trigger: 'blur',
},
{
pattern: /^[0-9]+(.[0-9]{2})?$/,
message: this.$t('trials:trials-list:setitng:JudgeDifferenceValue'),
trigger: 'blur',
},
{
validator: (rule, value, callback) => {
if (value <= 0) {
callback(
new Error(
this.$t(
'trials:trials-list:setitng:JudgeDifferenceValueMin'
)
)
)
} else {
callback()
}
},
trigger: 'blur',
},
],
},
}
},
computed: {
questionList() {
return this.questionListMap[this.selectVisitKey]
},
copySourceVisitOptions() {
return this.visitPlanOptions.filter((visit) => visit.VisitNum !== this.copyTargetVisitNum)
}
},
watch: {
async activeVisitTab(v) {
if (!v) return
if (this.questionListMap[v]) {
return
}
await this.getList(v)
},
},
async mounted() {
await this.initData()
},
methods: {
async initData() {
this.questionListMap = {}
this.visitActiveNamesMap = {}
this.activeVisitTab = ''
await this.getVisitPlanOptions()
},
resetVisitJudgeTypeRelatedFields(question = {}) {
this.$set(question, 'AnswerGroup2List', [])
this.$set(question, 'AnswerGroupList', [])
this.$set(question, 'grouping', [])
this.$set(question, 'groupingA', [])
this.$set(question, 'groupingB', [])
this.$set(question, 'JudgeDifferenceValue', null)
this.$set(question, 'JudgeDifferenceType', 0)
},
normalizeQuestionList(questionList = []) {
return questionList.map((item) => ({
...item,
grouping: [],
groupingA: [],
groupingB: [],
AnswerGroupList: Array.isArray(item.AnswerCombination)
? item.AnswerCombination.map((group) => ({
...group,
AnswerGroupA: Array.isArray(group.AnswerGroupA)
? [...group.AnswerGroupA]
: group.AnswerGroupA,
AnswerGroupB: Array.isArray(group.AnswerGroupB)
? [...group.AnswerGroupB]
: group.AnswerGroupB
}))
: [],
AnswerGroup2List: Array.isArray(item.AnswerGroup)
? [...item.AnswerGroup]
: []
}))
},
closeCopyDialog() {
this.copyVisible = false
this.copyTargetVisitNum = null
this.copySourceVisitNum = null
},
async getVisitPlanOptions() {
try {
const trialId = this.$route.query.trialId
const res = await getTrialVisitStageSelect(trialId)
if (res.IsSuccess) {
this.visitPlanOptions = res.Result || []
if (!this.activeVisitTab && this.visitPlanOptions.length > 0) {
this.activeVisitTab = this.visitPlanOptions[0].Id
}
const outOfPlan = {
"Id": "00000000-0000-0000-0000-000000000000",
"VisitNum": -1,
"VisitName": "Out of Plan",
"IsBaseLine": false
}
const isExists = this.visitPlanOptions.some(x => x.Id === outOfPlan.Id);
if (!isExists) {
this.visitPlanOptions.push(outOfPlan);
}
}
} catch (e) {
console.log(e)
}
},
getVisitById(visitKey) {
return this.visitPlanOptions.find((visit) => visit.Id === visitKey)
},
async getList(visitKey = this.activeVisitTab) {
const visit = this.getVisitById(visitKey)
if (!visit) return
try {
this.loading = true
let params = {
trialId: this.$route.query.trialId,
trialReadingCriterionId: this.trialReadingCriterionId,
visitNum: visit.VisitNum
}
const res = await getTrialQuestionVisitJudgeRule(params)
const questionList = this.normalizeQuestionList(res.Result)
this.$set(this.questionListMap, visitKey, questionList)
this.$set(
this.visitActiveNamesMap,
visitKey,
questionList.map((item) => item.ReadingQuestionTrialId)
)
} catch (e) {
console.log(e)
} finally {
this.loading = false
}
},
changeArbitrationRule(value) {
if (value !== 1) {
Object.values(this.questionListMap).forEach((questionList) => {
questionList.forEach((item) => {
item.JudgeDifferenceValue = 0
item.JudgeDifferenceType = 0
})
})
}
},
visitJudgeTypeChange(value, index, visitKey) {
this.resetVisitJudgeTypeRelatedFields(this.questionListMap[visitKey][index])
this.$nextTick(() => {
if (value === 4 || value === 5) {
const refName = `JudgeDifferenceValue${value}_${visitKey}_${index}`
if (this.$refs[refName] && this.$refs[refName][0]) {
this.$refs[refName][0].resetFields()
}
}
})
},
// async saveAllSync(showMessage = false) {
// try {
// this.btnLoading = true
// this.loading = true
// for (let i = 0; i < this.visitPlanOptions.length; i++) {
// const visit = this.visitPlanOptions[i]
// if (!this.questionListMap[visit.Id]) {
// await this.getList(visit.Id)
// }
// const questionList = this.questionListMap[visit.Id] || []
// if (questionList.length === 0) {
// continue
// }
// for (let index = 0; index < questionList.length; index++) {
// if (questionList[index].JudgeType === 0) {
// this.activeVisitTab = visit.Id
// this.$alert(this.$t('trials:adRules:message:msg8'))
// return false
// }
// if (
// questionList[index].JudgeType === 2 &&
// questionList[index].AnswerGroup2List.length === 0
// ) {
// this.activeVisitTab = visit.Id
// this.$alert(this.$t('trials:adRules:message:msg8'))
// return false
// }
// if (
// questionList[index].JudgeType === 3 &&
// questionList[index].AnswerGroupList.length === 0
// ) {
// this.activeVisitTab = visit.Id
// this.$alert(this.$t('trials:adRules:message:msg8'))
// return false
// }
// if (
// questionList[index].JudgeType === 4 ||
// questionList[index].JudgeType === 5
// ) {
// this.activeVisitTab = visit.Id
// await this.$nextTick()
// const refName = `JudgeDifferenceValue${questionList[index].JudgeType}_${visit.Id}_${index}`
// try {
// const validate = await this.$refs[refName][0].validate()
// if (!validate) return false
// } catch (err) {
// return false
// }
// }
// }
// let params = {
// TrialReadingCriterionId: this.trialReadingCriterionId,
// VisitNum: visit.VisitNum,
// QuestionList: questionList.map((item) => {
// return {
// ReadingQuestionTrialId: item.ReadingQuestionTrialId,
// AnswerGroup: item.AnswerGroup2List,
// AnswerCombination: item.AnswerGroupList,
// JudgeType: item.JudgeType,
// JudgeDifferenceValue: item.JudgeDifferenceValue,
// JudgeDifferenceType: item.JudgeDifferenceType
// }
// })
// }
// let res = await setTrialQuestionVisitJudgeRule(params)
// if (!res.IsSuccess) {
// return false
// }
// }
// if (showMessage) {
// this.$message.success(this.$t('common:message:savedSuccessfully'))
// }
// return true
// } catch (e) {
// console.log(e)
// return false
// } finally {
// this.btnLoading = false
// this.loading = false
// }
// },
async handleBatchSave(visitKey, visitNum) {
if (!visitKey) return
const questionList = this.questionListMap[visitKey] || []
if (questionList.length === 0) return
try {
this.btnLoading = true
this.loading = true
for (let index = 0; index < questionList.length; index++) {
if (questionList[index].JudgeType === 0) {
this.$alert(this.$t('trials:adRules:message:msg8'))
return
}
if (
questionList[index].JudgeType === 2 &&
questionList[index].AnswerGroup2List.length === 0
) {
this.$alert(this.$t('trials:adRules:message:msg8'))
return
}
if (
questionList[index].JudgeType === 3 &&
questionList[index].AnswerGroupList.length === 0
) {
this.$alert(this.$t('trials:adRules:message:msg8'))
return
}
if (
questionList[index].JudgeType === 4 ||
questionList[index].JudgeType === 5
) {
await this.$nextTick()
const refName = `JudgeDifferenceValue${questionList[index].JudgeType}_${visitKey}_${index}`
try {
const validate = await this.$refs[refName][0].validate()
if (!validate) return
} catch (err) {
return
}
}
}
let params = {
TrialReadingCriterionId: this.trialReadingCriterionId,
VisitNum: visitNum,
QuestionList: questionList.map((item) => {
return {
ReadingQuestionTrialId: item.ReadingQuestionTrialId,
AnswerGroup: item.AnswerGroup2List,
AnswerCombination: item.AnswerGroupList,
JudgeType: item.JudgeType,
JudgeDifferenceValue: item.JudgeDifferenceValue,
JudgeDifferenceType: item.JudgeDifferenceType
}
})
}
let res = await setTrialQuestionVisitJudgeRule(params)
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
} catch (e) {
console.log(e)
} finally {
this.btnLoading = false
this.loading = false
}
},
save() {
const questionList = this.questionList
let index = this.selectIndex
let indexA = this.indexA
if (questionList[index].groupingA.length === 0) {
this.$alert(this.$t('trials:adRules:message:msg2'))
return
}
if (questionList[index].groupingB.length === 0) {
this.$alert(this.$t('trials:adRules:message:msg3'))
return
}
if (this.type === 'add') {
questionList[index].AnswerGroupList.push({
AnswerGroupA: questionList[index].groupingA,
AnswerGroupB: questionList[index].groupingB
})
} else {
this.$set(
questionList[index].AnswerGroupList[indexA],
'AnswerGroupA',
questionList[index].groupingA
)
this.$set(
questionList[index].AnswerGroupList[indexA],
'AnswerGroupB',
questionList[index].groupingB
)
}
this.$set(questionList[index], 'groupingA', [])
this.$set(questionList[index], 'groupingB', [])
this.$message.success(this.$t('trials:adRules:message:msg4'))
this.questionVisible = false
},
handleCopy(visitNum) {
this.copyTargetVisitNum = visitNum
this.copyVisible = true
},
async confirmCopy() {
if (!this.copySourceVisitNum) {
this.$alert(this.$t('trials:setting:reading-unit:msg1'))
return
}
try {
this.btnLoading = true
this.loading = true
const params = {
trialReadingCriterionId: this.trialReadingCriterionId,
sourceVisitNum: this.copySourceVisitNum,
targetVisitNum: this.copyTargetVisitNum
}
const res = await copyTrialQuestionVisitJudgeRule(params)
if (res.IsSuccess) {
await this.getList(this.activeVisitTab)
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.closeCopyDialog()
}
} catch (e) {
console.log(e)
} finally {
this.btnLoading = false
this.loading = false
}
},
async applyToFollowup() {
try {
await this.$confirm(
this.$t('trials:adRules:message:msg10'),
{
type: 'warning',
distinguishCancelAndClose: true,
}
)
this.btnLoading = true
this.loading = true
const res = await applyBaseLineTrialQuestionVisitJudgeRule({
trialReadingCriterionId: this.trialReadingCriterionId
})
if (res.IsSuccess) {
this.questionListMap = {}
this.visitActiveNamesMap = {}
if (this.activeVisitTab) {
await this.getList(this.activeVisitTab)
}
this.$message.success(this.$t('trials:adRules:message:msg9'))
}
} catch (e) {
if (e === 'cancel') return
console.log(e)
} finally {
this.btnLoading = false
this.loading = false
}
},
visitTagClose2(index, indexA, visitKey) {
this.$confirm(this.$t('trials:adRules:message:msg1')).then(() => {
this.questionListMap[visitKey][index].AnswerGroup2List.splice(indexA, 1)
})
},
visitTagClose(index, indexA, visitKey) {
this.$confirm(this.$t('trials:adRules:message:msg1')).then(() => {
this.questionListMap[visitKey][index].AnswerGroupList.splice(indexA, 1)
})
},
visitAddGroup2(index, visitKey) {
const questionList = this.questionListMap[visitKey]
if (questionList[index].grouping.length === 0) {
this.$alert(this.$t('trials:adRules:message:msg5'))
return
}
let grouping = questionList[index].grouping
.toString()
.replaceAll(',', '|')
questionList[index].AnswerGroup2List.push(`|${grouping}|`)
this.$set(questionList[index], 'grouping', [])
},
visitAddGroup(index, indexA, visitKey) {
const questionList = this.questionListMap[visitKey]
this.selectIndex = index
this.selectVisitKey = visitKey
this.type = 'add'
if (indexA !== null) {
this.indexA = indexA
this.type = 'edit'
this.$set(
questionList[index],
'groupingA',
questionList[index].AnswerGroupList[indexA].AnswerGroupA
)
this.$set(
questionList[index],
'groupingB',
questionList[index].AnswerGroupList[indexA].AnswerGroupB
)
}
this.questionVisible = true
},
async visitReset(ReadingQuestionTrialId, index, visitKey, visitNum) {
const questionList = this.questionListMap[visitKey]
this.btnLoading = true
this.loading = true
try {
await this.$confirm(this.$t('trials:adRules:message:msg6'))
const params = {
TrialReadingCriterionId: this.trialReadingCriterionId,
VisitNum: visitNum,
QuestionList: [
{
ReadingQuestionTrialId: ReadingQuestionTrialId,
AnswerGroup: [],
AnswerCombination: [],
JudgeType: 0,
JudgeDifferenceValue: 0,
JudgeDifferenceType: 0
}
]
}
await setTrialQuestionVisitJudgeRule(params)
this.$set(questionList[index], 'AnswerGroup2List', [])
this.$set(questionList[index], 'AnswerGroupList', [])
this.$set(questionList[index], 'JudgeType', 0)
this.$set(questionList[index], 'JudgeDifferenceValue', 0)
this.$set(questionList[index], 'JudgeDifferenceType', 0)
this.$message.success(this.$t('trials:adRules:message:msg7'))
} catch(e) {
console.log(e)
} finally {
this.btnLoading = false
this.loading = false
}
},
async visitApply(ReadingQuestionTrialId, index, visitKey, visitNum) {
try {
const questionList = this.questionListMap[visitKey]
if (questionList[index].JudgeType === 0) {
this.$alert(this.$t('trials:adRules:message:msg8'))
return
}
if (
questionList[index].JudgeType === 2 &&
questionList[index].AnswerGroup2List.length === 0
) {
this.$alert(this.$t('trials:adRules:message:msg8'))
return
}
if (
questionList[index].JudgeType === 3 &&
questionList[index].AnswerGroupList.length === 0
) {
this.$alert(this.$t('trials:adRules:message:msg8'))
return
}
if (
questionList[index].JudgeType === 4 ||
questionList[index].JudgeType === 5
) {
const refName = `JudgeDifferenceValue${questionList[index].JudgeType}_${visitKey}_${index}`
const validate = await this.$refs[refName][0].validate()
if (!validate) return
}
this.btnLoading = true
this.loading = true
let params = {
TrialReadingCriterionId: this.trialReadingCriterionId,
VisitNum: visitNum,
QuestionList: [
{
ReadingQuestionTrialId: ReadingQuestionTrialId,
AnswerGroup: questionList[index].AnswerGroup2List,
AnswerCombination: questionList[index].AnswerGroupList,
JudgeType: questionList[index].JudgeType,
JudgeDifferenceValue: questionList[index].JudgeDifferenceValue,
JudgeDifferenceType: questionList[index].JudgeDifferenceType
}
]
}
let res = await setTrialQuestionVisitJudgeRule(params)
if (res.IsSuccess) {
this.$message.success(this.$t('trials:adRules:message:msg9'))
}
} catch(e) {
console.log(e)
} finally {
this.btnLoading = false
this.loading = false
}
}
},
}
</script>
<style scoped>
.visit-tabs-actions {
display: flex;
justify-content: flex-end;
margin-bottom: 10px;
padding: 0 10px;
}
.visit-tabs ::v-deep .el-tabs__content {
min-height: 520px;
padding-top: 20px !important;
}
</style>
@@ -761,7 +761,7 @@ export default {
parseFloat(obj.val) < parseFloat(v.lt)
)
})
answer = o ? o.label : 'NE'
answer = o ? o.label : null
} else if (i.classifyType === 1) {
let o = list.find(v => {
return v.val.includes(obj.val)
@@ -197,7 +197,7 @@ export default {
parseFloat(obj.val) < parseFloat(v.lt)
)
})
answer = o ? o.label : 'NE'
answer = o ? o.label : null
} else if (i.classifyType === 1) {
let o = list.find(v => {
return v.val.includes(obj.val)
@@ -240,6 +240,7 @@ export default {
if (ReadingTool === 3) {
this.readingSegmentTools = getCustomizeStandardsSegmentDicomTools(readingSegmentTools)
}
console.log(this.readingSegmentTools, 'this.readingSegmentTools')
},
setIsClinicalReading(isClinicalReading) {
this.isClinicalReading = isClinicalReading;
@@ -299,15 +300,11 @@ export default {
this.$refs["arbitrationRules" + this.TrialReadingCriterionId]
.length
) {
const arbitrationRulesRef = this.$refs[
var arbitrationRules = await this.$refs[
"arbitrationRules" + this.TrialReadingCriterionId
][0];
var judgeRuleSaved = await arbitrationRulesRef.saveJugeRule(false);
var arbitrationRules = judgeRuleSaved
? await arbitrationRulesRef.saveAllSync()
: false;
][0].saveAllSync();
isCheckList.push({
isCheck: judgeRuleSaved && arbitrationRules,
isCheck: arbitrationRules,
msg: this.$t("trials:readingUnit:adRules"), // ''
});
}
@@ -451,6 +448,9 @@ export default {
this.$refs[
"arbitrationRules" + this.TrialReadingCriterionId
][0].getList();
this.$refs[
"arbitrationRules" + this.TrialReadingCriterionId
][0].getTrialJudgyInfo();
}
},
},
@@ -354,8 +354,8 @@ export default {
},
(percentage, checkpoint, lastPer) => {
item.uploadFileSize += checkpoint.size * (percentage - lastPer)
if (item.uploadFileSize > file.size) {
item.uploadFileSize = file.size > 0 ? file.size : 1
if (item.uploadFileSize > file.fileSize) {
item.uploadFileSize = file.fileSize > 0 ? file.fileSize : 1
}
}
)
@@ -882,8 +882,8 @@ export default {
},
(percentage, checkpoint, lastPer) => {
item.uploadFileSize += checkpoint.size * (percentage - lastPer)
if (item.uploadFileSize > file.size) {
item.uploadFileSize = file.size > 0 ? file.size : 1
if (item.uploadFileSize > file.fileSize) {
item.uploadFileSize = file.fileSize > 0 ? file.fileSize : 1
}
},
{
@@ -644,7 +644,7 @@
<el-input v-model="studyForm.Modalities" disabled />
</el-form-item>
<!-- 检查类型 -->
<el-form-item v-else :label="$t('trials:audit:table:modality')" prop="Modality" :rules="[
<el-form-item v-else :label="$t('trials:audit:table:modality')" prop="Modalities" :rules="[
{
required: true,
message: $t('common:ruleMessage:specify'),
+2 -3
View File
@@ -11,7 +11,7 @@ const webpack = require('webpack')
const defaultSettings = require('./src/settings.js')
const moment = require('moment')
var distDate = moment(new Date()).format('YYYY-MM-DD')
const name = process.env.NODE_ENV === 'usa' ? 'Imaging Trial Management System' : defaultSettings.title || 'EIC lmaging Trial Management System' // page title
const name = process.env.NODE_ENV === 'usa' ? 'Imaging Trial Management System' : defaultSettings.title || 'HASC lmaging Trial Management System' // page title
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
// eslint-disable-next-line no-undef
module.exports = defineConfig({
@@ -135,8 +135,7 @@ module.exports = defineConfig({
test: /\.wasm$/,
type: 'asset/resource'
}
],
exprContextCritical: false,
]
},
optimization: {
splitChunks: {