上传、下载影像
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
456ff203bb
commit
e7ccb10ba3
|
@ -0,0 +1,17 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
// 下载打包影像
|
||||||
|
export function requestPackageAndAnonymizImage(params) {
|
||||||
|
return request({
|
||||||
|
url: '/DownloadAndUpload/requestPackageAndAnonymizImage',
|
||||||
|
method: 'post',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取影像上传列表
|
||||||
|
export function getSubjectImageUploadList(params) {
|
||||||
|
return request({
|
||||||
|
url: '/DownloadAndUpload/getSubjectImageUploadList',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
|
@ -0,0 +1,182 @@
|
||||||
|
<template>
|
||||||
|
<base-model :config="model_cfg">
|
||||||
|
<div slot="dialog-body">
|
||||||
|
<div class="top">
|
||||||
|
<el-button type="primary" size="small" class="el-icon-upload2">
|
||||||
|
<label for="file">
|
||||||
|
{{ $t("trials:uploadImage:button:selectFolder") }}
|
||||||
|
</label>
|
||||||
|
</el-button>
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
name="file"
|
||||||
|
id="file"
|
||||||
|
ref="file"
|
||||||
|
style="display: none"
|
||||||
|
webkitdirectory
|
||||||
|
multiple
|
||||||
|
@change="beginScanFiles($event)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
:data="list"
|
||||||
|
border
|
||||||
|
style="width: 100%"
|
||||||
|
height="300"
|
||||||
|
:loading="loading"
|
||||||
|
>
|
||||||
|
<!--受试者-->
|
||||||
|
<el-table-column
|
||||||
|
prop="subjectCode"
|
||||||
|
:label="$t('trials:uploadImage:table:subjectCode')"
|
||||||
|
/>
|
||||||
|
<!--任务名称-->
|
||||||
|
<el-table-column
|
||||||
|
prop="taskBlindName"
|
||||||
|
:label="$t('trials:uploadImage:table:taskBlindName')"
|
||||||
|
/>
|
||||||
|
<!--原始检查数-->
|
||||||
|
<el-table-column
|
||||||
|
prop="orginalStudyList"
|
||||||
|
:label="$t('trials:uploadImage:table:orginalStudyListNum')"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.orginalStudyList.length
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!--后处理检查数-->
|
||||||
|
<el-table-column
|
||||||
|
prop="uploadStudyList"
|
||||||
|
:label="$t('trials:uploadImage:table:uploadStudyListNum')"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.orginalStudyList.length
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!--上传进度-->
|
||||||
|
<el-table-column
|
||||||
|
prop="schedule"
|
||||||
|
:label="$t('trials:uploadImage:table:schedule')"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.orginalStudyList.length
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!--上传状态-->
|
||||||
|
<el-table-column
|
||||||
|
prop="status"
|
||||||
|
:label="$t('trials:uploadImage:table:status')"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.orginalStudyList.length
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!--已有/成功/失败-->
|
||||||
|
<el-table-column
|
||||||
|
prop="scheduleNum"
|
||||||
|
:label="$t('trials:uploadImage:table:scheduleNum')"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.orginalStudyList.length
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="$t('common:action:action')"
|
||||||
|
width="250"
|
||||||
|
fixed="right"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
circle
|
||||||
|
icon="el-icon-delete"
|
||||||
|
:title="$t('trials:uploadImage:button:delete')"
|
||||||
|
@click.stop="remove(scope.row, item)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</base-model>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import baseModel from "@/components/BaseModel";
|
||||||
|
import { getSubjectImageUploadList } from "@/api/load.js";
|
||||||
|
export default {
|
||||||
|
name: "uploadImage",
|
||||||
|
props: {
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
SubjectId: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
Criterion: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
"base-model": baseModel,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
model_cfg: {
|
||||||
|
visible: false,
|
||||||
|
showClose: true,
|
||||||
|
width: "1000px",
|
||||||
|
title: this.$t("trials:uploadImage:title:uploadImages"),
|
||||||
|
appendToBody: true,
|
||||||
|
},
|
||||||
|
list: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
visible: {
|
||||||
|
handler() {
|
||||||
|
this.model_cfg.visible = this.visible;
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
|
"model_cfg.visible": {
|
||||||
|
handler() {
|
||||||
|
this.$emit("update:visible", this.model_cfg.visible);
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取列表
|
||||||
|
async getList() {
|
||||||
|
try {
|
||||||
|
let params = {
|
||||||
|
SubjectId: this.SubjectId,
|
||||||
|
};
|
||||||
|
this.loading = true;
|
||||||
|
let res = await getSubjectImageUploadList(params);
|
||||||
|
this.loading = false;
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.list = res.Result;
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
remove(item) {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
label {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,144 @@
|
||||||
|
import JSZip from "jszip";
|
||||||
|
import axios from "axios";
|
||||||
|
import { saveAs } from "file-saver";
|
||||||
|
import Vue from 'vue';
|
||||||
|
import {
|
||||||
|
requestPackageAndAnonymizImage,
|
||||||
|
} from "@/api/load.js";
|
||||||
|
let flag = {};
|
||||||
|
export const downloadImage = async (id, id2) => {
|
||||||
|
if (flag[id2]) return
|
||||||
|
flag[id2] = true
|
||||||
|
try {
|
||||||
|
let params = {
|
||||||
|
TrialId: id,
|
||||||
|
SubjectVisitId: id2
|
||||||
|
}
|
||||||
|
let res = await requestPackageAndAnonymizImage(params);
|
||||||
|
flag[id2] = false;
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
if (!res.Result) {
|
||||||
|
Vue.prototype.$message.warning(Vue.prototype.$t("trials:upload:message:not"))
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
let a = document.createElement("a");
|
||||||
|
let href = Vue.prototype.OSSclientConfig.basePath + res.Result;
|
||||||
|
let fileName =
|
||||||
|
res.Result.split("/")[res.Result.split("/").length - 1];
|
||||||
|
a.download = fileName;
|
||||||
|
a.href = href;
|
||||||
|
a.click();
|
||||||
|
URL.revokeObjectURL(href);
|
||||||
|
let timer = setTimeout(() => {
|
||||||
|
a = null;
|
||||||
|
href = null;
|
||||||
|
timer = null;
|
||||||
|
}, 500)
|
||||||
|
return 2;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
flag[id2] = false;
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const setfolder = async (item) => {
|
||||||
|
const zip = new JSZip(); // 创建实例对象
|
||||||
|
let patientIds = item.PatientList.map(i => i.PatientIdStr);
|
||||||
|
let zipName = `${item.SubjectCode}_${patientIds.join(',')}`;
|
||||||
|
let zipObj = {};
|
||||||
|
const promises = [];
|
||||||
|
for (let visit of item.VisitList) {
|
||||||
|
if (!zipObj[`${visit.VisitName}`]) {
|
||||||
|
zipObj[`${visit.VisitName}`] = zip.folder(visit.VisitName);
|
||||||
|
}
|
||||||
|
for (let study of visit.StudyList) {
|
||||||
|
let date = study.StudyTime.split(" ")[0];
|
||||||
|
for (let series of study.SeriesList) {
|
||||||
|
if (
|
||||||
|
!zipObj[
|
||||||
|
`${visit.VisitName}${series.Modality}`
|
||||||
|
]
|
||||||
|
) {
|
||||||
|
zipObj[
|
||||||
|
`${visit.VisitName}${series.Modality}`
|
||||||
|
] = zipObj[`${visit.VisitName}`].folder(
|
||||||
|
`${date}_${series.Modality}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
for (let instance of series.InstancePathList) {
|
||||||
|
let obj = {
|
||||||
|
subjectCode: item.SubjectCode,
|
||||||
|
visitName: visit.VisitName,
|
||||||
|
date: study.StudyTime.split(" ")[0],
|
||||||
|
modality: series.Modality,
|
||||||
|
instancePath: instance.Path,
|
||||||
|
dicomName: instance.Path.split("/Dicom/")[1],
|
||||||
|
};
|
||||||
|
const promise = handleBatchDown(
|
||||||
|
obj,
|
||||||
|
zipObj[
|
||||||
|
`${visit.VisitName}${series.Modality}`
|
||||||
|
],
|
||||||
|
);
|
||||||
|
promises.push(promise);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 生成 zip 文件
|
||||||
|
Promise.all(promises)
|
||||||
|
.then(() => {
|
||||||
|
// 生成zip 文件
|
||||||
|
zip
|
||||||
|
.generateAsync({
|
||||||
|
type: "blob",
|
||||||
|
compression: "DEFLATE", // STORE: 默认不压缩, DEFLATE:需要压缩
|
||||||
|
compressionOptions: {
|
||||||
|
level: 9, // 压缩等级 1~9 1 压缩速度最快, 9 最优压缩方式
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
saveAs(res, zipName + ".zip"); // 使用FileSaver.saveAs保存文件,文件名可自定义
|
||||||
|
flag[id2] = false;
|
||||||
|
zipObj = null;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch((reason) => { flag[id2] = false; });
|
||||||
|
};
|
||||||
|
const handleBatchDown = async (item, zip) => {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
getFileData(
|
||||||
|
Vue.prototype.OSSclientConfig.basePath + item.instancePath
|
||||||
|
).then((res) => {
|
||||||
|
const fileName = item.dicomName + ".dcm";
|
||||||
|
zip.file(fileName, res.data, { binary: true });
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const getFileData = (fileUrl) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
axios(fileUrl, {
|
||||||
|
method: "GET",
|
||||||
|
responseType: "blob", // 返回的数据会被强制转为blob类型 ,转换成arraybuffer 也行
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
resolve(res);
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
reject(error);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const fileDownload = (content, filename) => {
|
||||||
|
const eleLink = document.createElement("a");
|
||||||
|
eleLink.download = filename;
|
||||||
|
eleLink.style.display = "none";
|
||||||
|
const blob = new Blob([content]);
|
||||||
|
eleLink.href = URL.createObjectURL(blob);
|
||||||
|
document.body.appendChild(eleLink);
|
||||||
|
eleLink.click();
|
||||||
|
document.body.removeChild(eleLink);
|
||||||
|
};
|
|
@ -1,34 +1,61 @@
|
||||||
<template>
|
<template>
|
||||||
<BaseContainer v-loading="loading" style="height:100%;background-color: #fff;">
|
<BaseContainer
|
||||||
<el-tabs v-if="TrialReadingCriterionId" v-model="TrialReadingCriterionId" type="border-card">
|
v-loading="loading"
|
||||||
<el-tab-pane v-for="item of trialCriterionList" :key="item.TrialReadingCriterionId" :label="item.TrialReadingCriterionName" :name="item.TrialReadingCriterionId">
|
style="height: 100%; background-color: #fff"
|
||||||
<div v-if="isReadingTaskViewInOrder && TrialReadingCriterionId === item.TrialReadingCriterionId">
|
>
|
||||||
|
<el-tabs
|
||||||
|
v-if="TrialReadingCriterionId"
|
||||||
|
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="
|
||||||
|
isReadingTaskViewInOrder &&
|
||||||
|
TrialReadingCriterionId === item.TrialReadingCriterionId
|
||||||
|
"
|
||||||
|
>
|
||||||
<div slot="search-container">
|
<div slot="search-container">
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
<!-- 受试者编号 -->
|
<!-- 受试者编号 -->
|
||||||
<el-form-item :label="$t('trials:pendingReadingTasks:table:subjectCode')">
|
<el-form-item
|
||||||
|
:label="$t('trials:pendingReadingTasks:table:subjectCode')"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchData.SubjectCode"
|
v-model="searchData.SubjectCode"
|
||||||
style="width:130px;"
|
style="width: 130px"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<!-- 查询 -->
|
<!-- 查询 -->
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
<el-button
|
||||||
{{ $t('common:button:search') }}
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleSearch"
|
||||||
|
>
|
||||||
|
{{ $t("common:button:search") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 重置 -->
|
<!-- 重置 -->
|
||||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
<el-button
|
||||||
{{ $t('common:button:reset') }}
|
type="primary"
|
||||||
|
icon="el-icon-refresh-left"
|
||||||
|
@click="handleReset"
|
||||||
|
>
|
||||||
|
{{ $t("common:button:reset") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div slot="main-container">
|
<div slot="main-container">
|
||||||
<el-table
|
<el-table
|
||||||
v-adaptive="{bottomOffset:75}"
|
v-adaptive="{ bottomOffset: 75 }"
|
||||||
:data="list"
|
:data="list"
|
||||||
stripe
|
stripe
|
||||||
height="100"
|
height="100"
|
||||||
|
@ -42,7 +69,16 @@
|
||||||
min-width="100"
|
min-width="100"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag :type="scope.row.UrgentColor === 1 ? 'danger' : scope.row.UrgentColor === 2 ? 'warning' : 'primary'">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
|
<el-tag
|
||||||
|
:type="
|
||||||
|
scope.row.UrgentColor === 1
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.UrgentColor === 2
|
||||||
|
? 'warning'
|
||||||
|
: 'primary'
|
||||||
|
"
|
||||||
|
>{{ $fd("YesOrNo", scope.row.IsUrgent) }}</el-tag
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 受试者编号 -->
|
<!-- 受试者编号 -->
|
||||||
|
@ -57,7 +93,9 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="UnReadCanReadTaskCount"
|
prop="UnReadCanReadTaskCount"
|
||||||
min-width="100"
|
min-width="100"
|
||||||
:label="$t('trials:pendingReadingTasks:table:remainingReadingVolume')"
|
:label="
|
||||||
|
$t('trials:pendingReadingTasks:table:remainingReadingVolume')
|
||||||
|
"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
|
@ -69,7 +107,17 @@
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span :style="{color: scope.row.UrgentColor === 1 ? '#F56C6C' : scope.row.UrgentColor === 2 ? '#E6A23C' : '#409EFF'}">{{ scope.row.UrgentCount }}</span>
|
<span
|
||||||
|
:style="{
|
||||||
|
color:
|
||||||
|
scope.row.UrgentColor === 1
|
||||||
|
? '#F56C6C'
|
||||||
|
: scope.row.UrgentColor === 2
|
||||||
|
? '#E6A23C'
|
||||||
|
: '#409EFF',
|
||||||
|
}"
|
||||||
|
>{{ scope.row.UrgentCount }}</span
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <!– 未读任务数量 –>-->
|
<!-- <!– 未读任务数量 –>-->
|
||||||
|
@ -97,12 +145,14 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="SuggesteFinishedTime"
|
prop="SuggesteFinishedTime"
|
||||||
min-width="100"
|
min-width="100"
|
||||||
:label="$t('trials:pendingReadingTasks:table:suggestedCompletionTime')"
|
:label="
|
||||||
|
$t('trials:pendingReadingTasks:table:suggestedCompletionTime')
|
||||||
|
"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.SuggesteFinishedTime.split(':')[0] + ':00:00' }}
|
{{ scope.row.SuggesteFinishedTime.split(":")[0] + ":00:00" }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -115,43 +165,98 @@
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="scope.row.ExistReadingApply"
|
:disabled="scope.row.ExistReadingApply"
|
||||||
circle
|
circle
|
||||||
:title="scope.row.ExistReadingApply ? $t('trials:pendingReadingTasks:button:ExistReadingApply') : $t('trials:pendingReadingTasks:button:review')"
|
:title="
|
||||||
|
scope.row.ExistReadingApply
|
||||||
|
? $t(
|
||||||
|
'trials:pendingReadingTasks:button:ExistReadingApply'
|
||||||
|
)
|
||||||
|
: $t('trials:pendingReadingTasks:button:review')
|
||||||
|
"
|
||||||
icon="el-icon-edit-outline"
|
icon="el-icon-edit-outline"
|
||||||
@click="handleReadImage(scope.row)"
|
@click="handleReadImage(scope.row)"
|
||||||
/>
|
/>
|
||||||
|
<!-- 上传 -->
|
||||||
|
<!-- <el-button
|
||||||
|
v-hasPermi="['role:ir']"
|
||||||
|
circle
|
||||||
|
icon="el-icon-upload2"
|
||||||
|
:title="$t('trials:pendingReadingTasks:button:upload')"
|
||||||
|
@click="upload(scope.row, item)"
|
||||||
|
/> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</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"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="isReadingTaskViewInOrder === false && TrialReadingCriterionId === item.TrialReadingCriterionId">
|
<div
|
||||||
<el-descriptions :column="2" border style="width:800px">
|
v-else-if="
|
||||||
|
isReadingTaskViewInOrder === false &&
|
||||||
|
TrialReadingCriterionId === item.TrialReadingCriterionId
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-descriptions :column="2" border style="width: 800px">
|
||||||
<!-- 剩余任务量 -->
|
<!-- 剩余任务量 -->
|
||||||
<el-descriptions-item :label="$t('trials:pendingReadingTasks:table:remainingTaskVolume')" :label-style="{'width':'200px'}">
|
<el-descriptions-item
|
||||||
<el-tag size="small" type="danger">{{ randomReadInfo.UnReadTaskCount }}</el-tag>
|
:label="
|
||||||
|
$t('trials:pendingReadingTasks:table:remainingTaskVolume')
|
||||||
|
"
|
||||||
|
:label-style="{ width: '200px' }"
|
||||||
|
>
|
||||||
|
<el-tag size="small" type="danger">{{
|
||||||
|
randomReadInfo.UnReadTaskCount
|
||||||
|
}}</el-tag>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<!-- 剩余裁判量 -->
|
<!-- 剩余裁判量 -->
|
||||||
<el-descriptions-item :label="$t('trials:pendingReadingTasks:table:amountOfJudgesRemaining')" :label-style="{'width':'200px'}">
|
<el-descriptions-item
|
||||||
<el-tag size="small" type="danger">{{ randomReadInfo.UnReadJudgeTaskCount }}</el-tag>
|
:label="
|
||||||
|
$t('trials:pendingReadingTasks:table:amountOfJudgesRemaining')
|
||||||
|
"
|
||||||
|
:label-style="{ width: '200px' }"
|
||||||
|
>
|
||||||
|
<el-tag size="small" type="danger">{{
|
||||||
|
randomReadInfo.UnReadJudgeTaskCount
|
||||||
|
}}</el-tag>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<!-- 已完成任务量 -->
|
<!-- 已完成任务量 -->
|
||||||
<el-descriptions-item :label="$t('trials:pendingReadingTasks:table:amountOfCompletedTasks')" :label-style="{'width':'200px'}">
|
<el-descriptions-item
|
||||||
|
:label="
|
||||||
|
$t('trials:pendingReadingTasks:table:amountOfCompletedTasks')
|
||||||
|
"
|
||||||
|
:label-style="{ width: '200px' }"
|
||||||
|
>
|
||||||
<el-tag size="small">{{ randomReadInfo.FinishTaskCount }}</el-tag>
|
<el-tag size="small">{{ randomReadInfo.FinishTaskCount }}</el-tag>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<!-- 已完成裁判量 -->
|
<!-- 已完成裁判量 -->
|
||||||
<el-descriptions-item :label="$t('trials:pendingReadingTasks:table:numberOfJudgesCompleted')" :label-style="{'width':'200px'}">
|
<el-descriptions-item
|
||||||
<el-tag size="small">{{ randomReadInfo.FinishJudgeTaskCount }}</el-tag>
|
:label="
|
||||||
|
$t('trials:pendingReadingTasks:table:numberOfJudgesCompleted')
|
||||||
|
"
|
||||||
|
:label-style="{ width: '200px' }"
|
||||||
|
>
|
||||||
|
<el-tag size="small">{{
|
||||||
|
randomReadInfo.FinishJudgeTaskCount
|
||||||
|
}}</el-tag>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<!-- 开始随机阅片 -->
|
<!-- 开始随机阅片 -->
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
:disabled="randomReadInfo.UnReadTaskCount+randomReadInfo.UnReadJudgeTaskCount ===0"
|
:disabled="
|
||||||
|
randomReadInfo.UnReadTaskCount +
|
||||||
|
randomReadInfo.UnReadJudgeTaskCount ===
|
||||||
|
0
|
||||||
|
"
|
||||||
@click="handleOutOfOrderReading"
|
@click="handleOutOfOrderReading"
|
||||||
>
|
>
|
||||||
{{ $t('trials:pendingReadingTasks:button:beginRandomReview') }}
|
{{ $t("trials:pendingReadingTasks:button:beginRandomReview") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
@ -188,153 +293,195 @@
|
||||||
</template> -->
|
</template> -->
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
<upload-image
|
||||||
|
v-if="uploadImageVisible"
|
||||||
|
:visible.sync="uploadImageVisible"
|
||||||
|
:SubjectId="uploadSubjectId"
|
||||||
|
:Criterion="uploadTrialCriterion"
|
||||||
|
@getList="getList"
|
||||||
|
/>
|
||||||
</BaseContainer>
|
</BaseContainer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getIRUnReadSubjectTaskList, verifyReadingRestTime } from '@/api/trials'
|
import {
|
||||||
import { getTrialCriterionList } from '@/api/trials/reading'
|
getIRUnReadSubjectTaskList,
|
||||||
import BaseContainer from '@/components/BaseContainer'
|
verifyReadingRestTime,
|
||||||
import Pagination from '@/components/Pagination'
|
} from "@/api/trials";
|
||||||
import { getToken } from '@/utils/auth'
|
import { getTrialCriterionList } from "@/api/trials/reading";
|
||||||
|
import BaseContainer from "@/components/BaseContainer";
|
||||||
|
import uploadImage from "@/components/uploadImage";
|
||||||
|
import Pagination from "@/components/Pagination";
|
||||||
|
import { getToken } from "@/utils/auth";
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
SubjectCode: '',
|
SubjectCode: "",
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20
|
PageSize: 20,
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
export default {
|
export default {
|
||||||
name: 'ReadingTaskList',
|
name: "ReadingTaskList",
|
||||||
components: { BaseContainer, Pagination },
|
components: { BaseContainer, Pagination, "upload-image": uploadImage },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
searchData: searchDataDefault(),
|
searchData: searchDataDefault(),
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
loading: false,
|
loading: false,
|
||||||
trialId: '',
|
trialId: "",
|
||||||
isReadingTaskViewInOrder: null,
|
isReadingTaskViewInOrder: null,
|
||||||
randomReadInfo: {},
|
randomReadInfo: {},
|
||||||
isRender: false,
|
isRender: false,
|
||||||
trialCriterionList: [],
|
trialCriterionList: [],
|
||||||
TrialReadingCriterionId: '',
|
TrialReadingCriterionId: "",
|
||||||
isTableShow: true,
|
isTableShow: true,
|
||||||
readingTool: null,
|
readingTool: null,
|
||||||
criterionType: null,
|
criterionType: null,
|
||||||
openWindow: null
|
openWindow: null,
|
||||||
}
|
|
||||||
|
// 上传
|
||||||
|
uploadImageVisible: false,
|
||||||
|
uploadSubjectId: null,
|
||||||
|
uploadTrialCriterion: {},
|
||||||
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
TrialReadingCriterionId(v) {
|
TrialReadingCriterionId(v) {
|
||||||
if (v) {
|
if (v) {
|
||||||
this.getList()
|
this.getList();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
window.addEventListener('message', this.receiveMsg)
|
window.addEventListener("message", this.receiveMsg);
|
||||||
this.trialId = this.$route.query.trialId
|
this.trialId = this.$route.query.trialId;
|
||||||
this.getTrialCriterionList()
|
this.getTrialCriterionList();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
window.removeEventListener('message', this.receiveMsg)
|
window.removeEventListener("message", this.receiveMsg);
|
||||||
if (this.openWindow) {
|
if (this.openWindow) {
|
||||||
this.openWindow.close()
|
this.openWindow.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 上传
|
||||||
|
upload(item, trialCriterion) {
|
||||||
|
this.uploadSubjectId = item.SubjectId;
|
||||||
|
this.uploadTrialCriterion = trialCriterion;
|
||||||
|
this.uploadImageVisible = true;
|
||||||
|
},
|
||||||
getTrialCriterionList() {
|
getTrialCriterionList() {
|
||||||
getTrialCriterionList(this.trialId).then(res => {
|
getTrialCriterionList(this.trialId)
|
||||||
this.trialCriterionList = res.Result
|
.then((res) => {
|
||||||
this.TrialReadingCriterionId = this.trialCriterionList[0].TrialReadingCriterionId
|
this.trialCriterionList = res.Result;
|
||||||
}).catch(() => {})
|
this.TrialReadingCriterionId =
|
||||||
|
this.trialCriterionList[0].TrialReadingCriterionId;
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
this.searchData.TrialId = this.trialId
|
this.searchData.TrialId = this.trialId;
|
||||||
this.searchData.TrialReadingCriterionId = this.TrialReadingCriterionId
|
this.searchData.TrialReadingCriterionId = this.TrialReadingCriterionId;
|
||||||
this.isRender = false
|
this.isRender = false;
|
||||||
getIRUnReadSubjectTaskList(this.searchData).then(res => {
|
getIRUnReadSubjectTaskList(this.searchData)
|
||||||
this.isReadingTaskViewInOrder = res.OtherInfo.IsReadingTaskViewInOrder
|
.then((res) => {
|
||||||
this.readingTool = res.OtherInfo.ReadingTool
|
this.isReadingTaskViewInOrder =
|
||||||
this.criterionType = res.OtherInfo.CriterionType
|
res.OtherInfo.IsReadingTaskViewInOrder;
|
||||||
if (res.OtherInfo.IsReadingTaskViewInOrder) {
|
this.readingTool = res.OtherInfo.ReadingTool;
|
||||||
this.list = res.Result.CurrentPageData
|
this.criterionType = res.OtherInfo.CriterionType;
|
||||||
this.total = res.Result.TotalCount
|
if (res.OtherInfo.IsReadingTaskViewInOrder) {
|
||||||
} else {
|
this.list = res.Result.CurrentPageData;
|
||||||
this.randomReadInfo = res.OtherInfo.RandomReadInfo
|
this.total = res.Result.TotalCount;
|
||||||
}
|
} else {
|
||||||
this.isRender = true
|
this.randomReadInfo = res.OtherInfo.RandomReadInfo;
|
||||||
this.loading = false
|
}
|
||||||
}).catch(() => {
|
this.isRender = true;
|
||||||
this.isRender = true
|
this.loading = false;
|
||||||
this.loading = false
|
})
|
||||||
})
|
.catch(() => {
|
||||||
|
this.isRender = true;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1;
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.searchData = searchDataDefault()
|
this.searchData = searchDataDefault();
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
handleReadImage(row) {
|
handleReadImage(row) {
|
||||||
if (this.openWindow) {
|
if (this.openWindow) {
|
||||||
this.openWindow.close()
|
this.openWindow.close();
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
verifyReadingRestTime().then(_ => {
|
verifyReadingRestTime()
|
||||||
this.loading = false
|
.then((_) => {
|
||||||
|
this.loading = false;
|
||||||
|
|
||||||
window.localStorage.setItem('TrialReadingCriterionId', this.TrialReadingCriterionId)
|
window.localStorage.setItem(
|
||||||
var token = getToken()
|
"TrialReadingCriterionId",
|
||||||
var path = ''
|
this.TrialReadingCriterionId
|
||||||
if (this.readingTool === 0) {
|
);
|
||||||
path = `/readingDicoms?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&subjectCode=${row.SubjectCode}&subjectId=${row.SubjectId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}`
|
var token = getToken();
|
||||||
} else {
|
var path = "";
|
||||||
path = `/noneDicomReading?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&subjectCode=${row.SubjectCode}&subjectId=${row.SubjectId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}`
|
if (this.readingTool === 0) {
|
||||||
}
|
path = `/readingDicoms?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&subjectCode=${row.SubjectCode}&subjectId=${row.SubjectId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}`;
|
||||||
var routeData = this.$router.resolve({ path })
|
} else {
|
||||||
|
path = `/noneDicomReading?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&subjectCode=${row.SubjectCode}&subjectId=${row.SubjectId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}`;
|
||||||
|
}
|
||||||
|
var routeData = this.$router.resolve({ path });
|
||||||
|
|
||||||
this.openWindow = window.open(routeData.href, '_blank')
|
this.openWindow = window.open(routeData.href, "_blank");
|
||||||
}).catch(() => { this.loading = false })
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleOutOfOrderReading() {
|
handleOutOfOrderReading() {
|
||||||
if (this.openWindow) {
|
if (this.openWindow) {
|
||||||
this.openWindow.close()
|
this.openWindow.close();
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
verifyReadingRestTime().then(_ => {
|
verifyReadingRestTime()
|
||||||
this.loading = false
|
.then((_) => {
|
||||||
window.localStorage.setItem('TrialReadingCriterionId', this.TrialReadingCriterionId)
|
this.loading = false;
|
||||||
var token = getToken()
|
window.localStorage.setItem(
|
||||||
var path = ''
|
"TrialReadingCriterionId",
|
||||||
if (this.readingTool === 0) {
|
this.TrialReadingCriterionId
|
||||||
path = `/readingDicoms?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}`
|
);
|
||||||
} else {
|
var token = getToken();
|
||||||
path = `/noneDicomReading?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}`
|
var path = "";
|
||||||
}
|
if (this.readingTool === 0) {
|
||||||
var routeData = this.$router.resolve({ path })
|
path = `/readingDicoms?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}`;
|
||||||
this.openWindow = window.open(routeData.href, '_blank')
|
} else {
|
||||||
}).catch(() => { this.loading = false })
|
path = `/noneDicomReading?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}`;
|
||||||
|
}
|
||||||
|
var routeData = this.$router.resolve({ path });
|
||||||
|
this.openWindow = window.open(routeData.href, "_blank");
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
receiveMsg(event) {
|
receiveMsg(event) {
|
||||||
if (event.data === 'refreshTaskList') {
|
if (event.data === "refreshTaskList") {
|
||||||
this.getList()
|
this.getList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 排序
|
// 排序
|
||||||
handleSortChange(column) {
|
handleSortChange(column) {
|
||||||
if (column.order === 'ascending') {
|
if (column.order === "ascending") {
|
||||||
this.searchData.Asc = true
|
this.searchData.Asc = true;
|
||||||
} else {
|
} else {
|
||||||
this.searchData.Asc = false
|
this.searchData.Asc = false;
|
||||||
}
|
}
|
||||||
this.searchData.SortField = column.prop
|
this.searchData.SortField = column.prop;
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1;
|
||||||
this.getList()
|
this.getList();
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -788,7 +788,9 @@ export default {
|
||||||
this.form[k] = res.Result[k];
|
this.form[k] = res.Result[k];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.CriterionModalitys = this.form.CriterionModalitys.split("|");
|
this.CriterionModalitys = this.form.CriterionModalitys
|
||||||
|
? this.form.CriterionModalitys.split("|")
|
||||||
|
: [];
|
||||||
this.form.TrialCriterionAdditionalAssessmentTypeList.forEach((v) => {
|
this.form.TrialCriterionAdditionalAssessmentTypeList.forEach((v) => {
|
||||||
this.$set(v, "IsSelected", v.IsSelected || false);
|
this.$set(v, "IsSelected", v.IsSelected || false);
|
||||||
this.$set(
|
this.$set(
|
||||||
|
|
Loading…
Reference in New Issue