Merge branch 'main' into uat

# Conflicts:
#	.env.usa
#	src/views/dicom-show/dicom-study.vue
#	src/views/login/index.vue
#	src/views/trials/trials-panel/reading/dicoms/components/ReportPage.vue
#	src/views/trials/trials-panel/reading/dicoms/customize/CustomizeDicomCanvas.vue
#	vue.config.js
uat_us
wangxiaoshuang 2024-06-27 09:49:55 +08:00
commit 8f8c5d0744
174 changed files with 15302 additions and 6600 deletions

View File

@ -14,6 +14,9 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = false
# 是否开启登陆限制 true:是 false:否
VUE_APP_LOGIN_FOR_PERMISSION = false
# 是否开启长时间无操作锁定弹框MFA验证 true:是 false:否
VUE_APP_LOCK_FOR_PERMISSION_MFA = false
# 是否开启长时间无操作锁定弹框 true:是 false:否
VUE_APP_LOCK_FOR_PERMISSION = false

View File

@ -8,6 +8,9 @@ VUE_APP_BASE_PATH = '/'
# 是否开启登陆限制 true:是 false:否
VUE_APP_LOGIN_FOR_PERMISSION = true
# 是否开启长时间无操作锁定弹框MFA验证 true:是 false:否
VUE_APP_LOCK_FOR_PERMISSION_MFA = false
# 是否开启长时间无操作锁定弹框 true:是 false:否
VUE_APP_LOCK_FOR_PERMISSION = true

View File

@ -9,6 +9,9 @@ VUE_APP_IS_TEST = true
# 是否开启登陆限制 true:是 false:否
VUE_APP_LOGIN_FOR_PERMISSION = false
# 是否开启长时间无操作锁定弹框MFA验证 true:是 false:否
VUE_APP_LOCK_FOR_PERMISSION_MFA = false
# 是否开启长时间无操作锁定弹框 true:是 false:否
VUE_APP_LOCK_FOR_PERMISSION = false

View File

@ -5,6 +5,9 @@ NODE_ENV = 'prop'
# 是否开启登陆限制 true:是 false:否
VUE_APP_LOGIN_FOR_PERMISSION = true
# 是否开启长时间无操作锁定弹框MFA验证 true:是 false:否
VUE_APP_LOCK_FOR_PERMISSION_MFA = false
# 是否开启长时间无操作锁定弹框 true:是 false:否
VUE_APP_LOCK_FOR_PERMISSION = true

View File

@ -10,6 +10,9 @@ VUE_APP_BASE_PATH = '/'
# 是否开启登陆限制 true:是 false:否
VUE_APP_LOGIN_FOR_PERMISSION = true
# 是否开启长时间无操作锁定弹框MFA验证 true:是 false:否
VUE_APP_LOCK_FOR_PERMISSION_MFA = false
# 是否开启长时间无操作锁定弹框 true:是 false:否
VUE_APP_LOCK_FOR_PERMISSION = true

View File

@ -1,12 +1,15 @@
# just a flag
ENV = 'production'
NODE_ENV = 'production'
ENV = 'usa'
NODE_ENV = 'usa'
# base public path
VUE_APP_BASE_PATH = 'https://ei-code-prod.s3.amazonaws.com/2024-05-31/'
# 是否开启登陆限制 true:是 false:否
VUE_APP_LOGIN_FOR_PERMISSION = false
# 是否开启长时间无操作锁定弹框MFA验证 true:是 false:否
VUE_APP_LOCK_FOR_PERMISSION_MFA = true
# 是否开启长时间无操作锁定弹框 true:是 false:否
VUE_APP_LOCK_FOR_PERMISSION = false

View File

@ -10,7 +10,7 @@ clone:
disable: true #禁用默认克隆
server:
host: 192.168.3.68
host: 106.14.89.110
user: root
password:
from_secret: local_pwd
@ -19,7 +19,7 @@ steps:
- name: publish-test-irc-vue
commands:
- echo start publish test-irc-vue
- cd /opt/hang/vue/test-irc
- cd /opt/1panel/hang/vue/test-irc
- sh test-irc.sh v${DRONE_BUILD_NUMBER}
trigger:
@ -41,7 +41,7 @@ clone:
disable: true #禁用默认克隆
server:
host: 123.56.94.154
host: 106.14.89.110
user: root
password:
from_secret: local_pwd

View File

@ -1,169 +1,213 @@
<template>
<div id="app" style="position: relative">
<router-view />
<div v-show="show" v-adaptive @click="openI18n" style="position: fixed;bottom: 50px;left: 50px;z-index: 100000;width: 50px;height: 50px;background: #409eff88;line-height: 50px;text-align: center;color:#fff;border-radius: 50%;cursor: pointer">
<div
v-show="show"
v-adaptive
@click="openI18n"
style="
position: fixed;
bottom: 50px;
left: 50px;
z-index: 100000;
width: 50px;
height: 50px;
background: #409eff88;
line-height: 50px;
text-align: center;
color: #fff;
border-radius: 50%;
cursor: pointer;
"
>
i18n
</div>
<el-drawer
title="国际化"
:visible.sync="drawer"
direction="rtl"
size="80%">
<el-drawer title="国际化" :visible.sync="drawer" direction="rtl" size="80%">
<div style="width: 320px">
<el-form
label-width="100px"
@submit.native.prevent
size="small"
>
<el-form label-width="100px" @submit.native.prevent size="small">
<el-form-item label="关键字">
<el-input v-model="key" @input="keyChange"/>
<el-input v-model="key" @input="keyChange" />
</el-form-item>
</el-form>
</div>
<el-table
:data="tableData"
v-adaptive="{bottomOffset:50}"
v-adaptive="{ bottomOffset: 50 }"
height="100"
style="width: 100%">
<el-table-column
prop="Code"
label="标签"
width="300">
style="width: 100%"
>
<el-table-column prop="Code" label="标签" width="300">
</el-table-column>
<!-- <el-table-column-->
<!-- prop="Description"-->
<!-- label="路由"-->
<!-- show-overflow-tooltip-->
<!-- width="180">-->
<!-- <template slot-scope="scope">-->
<!-- {{scope.row.Description}}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
prop="Value"
label="英文">
<!-- <el-table-column-->
<!-- prop="Description"-->
<!-- label="路由"-->
<!-- show-overflow-tooltip-->
<!-- width="180">-->
<!-- <template slot-scope="scope">-->
<!-- {{scope.row.Description}}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="Value" label="英文">
<template slot-scope="scope">
<el-input v-model="scope.row.Value" @input="(e) => {$set(scope.row, 'Value', e)}" size="mini"></el-input>
<el-input
v-model="scope.row.Value"
@input="
(e) => {
$set(scope.row, 'Value', e);
}
"
size="mini"
></el-input>
</template>
</el-table-column>
<el-table-column
prop="ValueCN"
label="中文">
<el-table-column prop="ValueCN" label="中文">
<template slot-scope="scope">
<el-input v-model="scope.row.ValueCN" @input="(e) => {$set(scope.row, 'ValueCN', e)}" size="mini"></el-input>
<el-input
v-model="scope.row.ValueCN"
@input="
(e) => {
$set(scope.row, 'ValueCN', e);
}
"
size="mini"
></el-input>
</template>
</el-table-column>
</el-table>
<div style="text-align: right;padding-top: 10px;padding-right: 10px;">
<el-button size="mini" @click="drawer = false">取消
</el-button>
<el-button size="mini" type="primary" @click="handleSave"></el-button>
<div style="text-align: right; padding-top: 10px; padding-right: 10px">
<el-button size="mini" @click="drawer = false">取消 </el-button>
<el-button size="mini" type="primary" @click="handleSave"
>保存</el-button
>
</div>
</el-drawer>
</div>
</template>
<script>
import { batchAddOrUpdateFrontInternationalization, getFrontInternationalizationList } from '@/api/dictionary/dictionary'
import {
batchAddOrUpdateFrontInternationalization,
getFrontInternationalizationList,
} from "@/api/dictionary/dictionary";
import Vue from "vue";
import i18n from "./lang";
export default {
name: 'App',
data () {
name: "App",
data() {
return {
drawer: false,
tableData: [],
show: false,
key: null,
arr: []
}
arr: [],
};
},
mounted() {
this.show = process.env.VUE_APP_OSS_PATH === '/test/dist'
this.show = process.env.VUE_APP_OSS_PATH === "/test/dist";
},
methods: {
changeValue(target, attr, e) {
this.$set(target, attr, e)
this.$set(target, attr, e);
},
keyChange(v) {
if (this.key) {
this.tableData = Object.assign([], this.arr.filter(v => ~v.Code.indexOf(this.key) || ~v.Value.indexOf(this.key) || ~v.ValueCN.indexOf(this.key)))
this.tableData = Object.assign(
[],
this.arr.filter(
(v) =>
~v.Code.indexOf(this.key) ||
~v.Value.indexOf(this.key) ||
~v.ValueCN.indexOf(this.key)
)
);
} else {
this.tableData = Object.assign([], this.arr)
this.tableData = Object.assign([], this.arr);
}
},
handleSave() {
this.$confirm('确定修改当前页面国际化内容?').then(() => {
batchAddOrUpdateFrontInternationalization(this.tableData).then(async res => {
var zhMessages = {}, enMessages = {}
var Internationalization = await getFrontInternationalizationList()
Vue.prototype.$tl = Internationalization.Result
this.tableData.forEach(v => {
// zhMessages[v.Description + '_' + v.Code] = v.ValueCN
// enMessages[v.Description + '_' + v.Code] = v.Value
zhMessages[v.Code] = v.ValueCN
enMessages[v.Code] = v.Value
})
i18n.mergeLocaleMessage('zh', zhMessages)
i18n.mergeLocaleMessage('en', enMessages)
this.drawer = false
this.$message.success('国际化修改成功')
})
})
this.$confirm("确定修改当前页面国际化内容?").then(() => {
batchAddOrUpdateFrontInternationalization(this.tableData).then(
async (res) => {
var zhMessages = {},
enMessages = {};
var Internationalization = await getFrontInternationalizationList();
Vue.prototype.$tl = Internationalization.Result;
this.tableData.forEach((v) => {
// zhMessages[v.Description + '_' + v.Code] = v.ValueCN
// enMessages[v.Description + '_' + v.Code] = v.Value
zhMessages[v.Code] = v.ValueCN;
enMessages[v.Code] = v.Value;
});
i18n.mergeLocaleMessage("zh", zhMessages);
i18n.mergeLocaleMessage("en", enMessages);
this.drawer = false;
this.$message.success("国际化修改成功");
}
);
});
},
openI18n() {
this.tableData = []
this.key = null
this.drawer = true
let arr = []
let tableData = this.$tl.map(v => {
let a = {...v}
this.tableData = [];
this.key = null;
this.drawer = true;
let arr = [];
let tableData = this.$tl.map((v) => {
let a = { ...v };
// if (!a.Description) {
// a.Description = this.$route.path
// }
return a
})
tableData = tableData.filter(v => {
return a;
});
tableData = tableData.filter((v) => {
// return ~this.$path.indexOf(v.Description + '_' + v.Code)
return ~this.$path.indexOf(v.Code)
})
this.$path.forEach(v => {
let o = tableData.find(a => {
return a.Code === v
})
return ~this.$path.indexOf(v.Code);
});
this.$path.forEach((v) => {
let o = tableData.find((a) => {
return a.Code === v;
});
if (o) {
arr.push(o)
arr.push(o);
} else {
arr.push({
Code: v,
Description: null,
Value: null,
ValueCN: null
})
ValueCN: null,
});
}
})
this.arr = arr
});
this.arr = arr;
if (this.key) {
this.tableData = Object.assign([], this.arr.filter(v => ~v.Code.indexOf(this.key) || ~v.Value.indexOf(this.key) || ~v.ValueCN.indexOf(this.key)))
this.tableData = Object.assign(
[],
this.arr.filter(
(v) =>
~v.Code.indexOf(this.key) ||
~v.Value.indexOf(this.key) ||
~v.ValueCN.indexOf(this.key)
)
);
} else {
this.tableData = Object.assign([], this.arr)
this.tableData = Object.assign([], this.arr);
}
// console.log(JSON.stringify(this.$path))
// console.log(JSON.stringify(this.tableData))
}
}
}
},
},
};
</script>
<style lang="scss">
.el-tooltip__popper{
$light_gray: #606266;
.el-tooltip__popper {
max-width: 400px;
}
.my_multiple{
.el-input--medium .el-input__inner{
height: 36px!important;
.my_multiple {
.el-input--medium .el-input__inner {
height: 36px !important;
}
.el-select__tags{
.el-select__tags {
flex-wrap: nowrap;
overflow: hidden;
white-space: nowrap;
@ -180,21 +224,29 @@ input[type="number"] {
-moz-appearance: textfield !important;
}
.viewer-fixed.viewer-container{
.viewer-fixed.viewer-container {
z-index: 10000;
}
textarea{
textarea {
white-space: break-spaces;
word-break: normal;
}
*{
word-break: normal!important;
* {
word-break: normal !important;
}
.box-body .el-button.is-circle:not(.is-disabled) i:before{
.box-body .el-button.is-circle:not(.is-disabled) i:before {
color: #428bca;
}
.box-body .el-button.is-circle i.el-icon-question:before{
.box-body .el-button.is-circle i.el-icon-question:before {
color: #fff;
}
.system-title {
font-size: 35px;
color: $light_gray;
text-align: center;
font-weight: bold;
font-family: 'Times New Roman';
text-shadow:1px 0.5px 1.5px #666;
}
</style>

View File

@ -1006,3 +1006,11 @@ export function deleteCommonDocument(commonDocumentId) {
method: 'delete'
})
}
//getTrialSiteList
export function getTrialSiteList(params) {
return request({
url: `/site/getTrialSiteList`,
method: 'post',
data: params
})
}

View File

@ -76,3 +76,11 @@ export function fullyReplicated(param) {
})
}
// 获取所有字典key
export function getDictionaryCodeList() {
return request({
url: `/Dictionary/getAllDictionaryKey`,
method: 'post',
})
}

View File

@ -14,17 +14,19 @@ export function getHospitalList() {
})
}
export function getAllSponsorList() {
export function getAllSponsorList(params) {
return request({
url: '/sponsor/getAllSponsorList',
method: 'get'
method: 'get',
params
})
}
export function getAllCROList() {
export function getAllCROList(params) {
return request({
url: '/cro/getAllCROList',
method: 'get'
method: 'get',
params
})
}
export function getAllSiteList() {

42
src/api/load.js Normal file
View File

@ -0,0 +1,42 @@
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
})
}
// 预上传
export function preArchiveDicomStudy(data) {
return request({
url: '/DownloadAndUpload/preArchiveDicomStudy',
method: 'post',
data
})
}
// 归档
export function addOrUpdateArchiveTaskStudy(data) {
return request({
url: '/DownloadAndUpload/addOrUpdateArchiveTaskStudy',
method: 'post',
data
})
}
// 删除上传文件
export function deleteTaskStudy(params) {
return request({
url: '/DownloadAndUpload/deleteTaskStudy',
method: 'delete',
params
})
}

View File

@ -1364,9 +1364,9 @@ export function getForwardList(param) {
})
}
export function getNoneDicomStudyList(subjectVisitId, sudyId = '') {
export function getNoneDicomStudyList(subjectVisitId, sudyId = '', isFilterZip = false) {
return request({
url: `/NoneDicomStudy/getNoneDicomStudyList?subjectVisitId=${subjectVisitId}&nonedicomStudyId=${sudyId}`,
url: `/NoneDicomStudy/getNoneDicomStudyList?subjectVisitId=${subjectVisitId}&nonedicomStudyId=${sudyId}&isFilterZip=${isFilterZip}`,
method: 'get'
})
}
@ -3667,3 +3667,11 @@ export function getDicomSeriesInfo(param) {
data: param
})
}
export function getTrialSiteSelectList(params) {
return request({
url: `/trialMaintenance/getTrialSiteSelectList`,
method: 'get',
params
})
}

View File

@ -436,9 +436,9 @@ export function addSubjectCancelDoctorNote(params) {
})
}
export function getSubjectCancelDoctorHistoryList(SubjectId) {
export function getSubjectCancelDoctorHistoryList(SubjectId, TrialReadingCriterionId) {
return request({
url: `/TaskAllocationRule/getSubjectCancelDoctorHistoryList?SubjectId=${SubjectId}`,
url: `/TaskAllocationRule/getSubjectCancelDoctorHistoryList?SubjectId=${SubjectId}&&TrialReadingCriterionId=${TrialReadingCriterionId}`,
method: 'get'
})
}

View File

@ -94,4 +94,20 @@ export function getTrialJudgyInfo(params) {
data: params
})
}
// 获取检查部位列表
export function getTrialBodyPartList(params) {
return request({
url: `/TrialConfig/getTrialBodyPartList`,
method: 'get',
params
})
}
// 新增检查部位
export function addOrUpdateTrialBodyPart(data) {
return request({
url: `/TrialConfig/addOrUpdateTrialBodyPart`,
method: 'post',
data
})
}

View File

@ -7,10 +7,11 @@ export function login(data) {
data
})
}
export function loginOut() {
export function loginOut(params) {
return request({
url: `/User/loginOut`,
method: 'get'
method: 'get',
params
})
}
export function getAllDictionary() {
@ -157,3 +158,30 @@ export function getUserLogList(params) {
data: params
})
}
// 获取登录用户
export function getTrialUserList(params) {
return request({
url: `/TrialMaintenance/getTrialUserList`,
method: 'get',
params
})
}
// 验证MFA邮件
export function verifyMFACode(params) {
return request({
url: `/User/verifyMFACode`,
method: 'post',
params
})
}
// 发送MFA邮件
export function sendMFAEmail(params) {
return request({
url: `/User/sendMFAEmail`,
method: 'post',
params
})
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 26 KiB

BIN
src/assets/zip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

BIN
src/assets/zzlogo-usa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View File

@ -2,18 +2,28 @@
<template>
<div class="base-search-form">
<el-form :size="size" :inline="true" :label-width="labelWidth">
<el-form-item v-for="item in searchForm" :key="item.prop" :label="item.label">
<el-form-item
v-for="item in searchForm"
:key="item.prop"
:label="item.label"
>
<!-- 输入框 -->
<el-input v-if="item.type==='Input'" v-model="searchData[item.prop]" :placeholder="item.placeholder" size="mini" :style="{width:item.width}" :readonly="item.readonly" />
<!-- 下拉框 -->
<el-select
v-if="item.type==='Select'"
<el-input
v-if="item.type === 'Input'"
v-model="searchData[item.prop]"
:placeholder="item.placeholder"
size="mini"
:style="{width:item.width}"
@change="item.change && item.change(that,searchData[item.prop])"
:style="{ width: item.width }"
:readonly="item.readonly"
/>
<!-- 下拉框 -->
<el-select
v-if="item.type === 'Select'"
v-model="searchData[item.prop]"
:placeholder="item.placeholder"
size="mini"
:style="{ width: item.width }"
@change="item.change && item.change(that, searchData[item.prop])"
>
<el-option
v-for="op in item.options"
@ -23,49 +33,122 @@
/>
</el-select>
<el-select
v-if="item.type==='Select2'"
v-if="item.type === 'Select2'"
v-model="searchData[item.prop]"
:placeholder="item.placeholder"
size="mini"
:style="{width:item.width}"
@change="item.change && item.change(that,searchData[item.prop])"
:style="{ width: item.width }"
@change="item.change && item.change(that, searchData[item.prop])"
>
<el-option
v-for="(key,value) of item.options"
v-for="(key, value) of item.options"
:key="key"
:label="key"
:value="value"
/>
</el-select>
<!-- 单选 -->
<el-radio-group v-if="item.type==='Radio'" v-model="searchData[item.prop]" :style="{width:item.width}">
<el-radio v-for="ra in item.radios" :key="ra.value" :label="ra.value">{{ ra.label }}</el-radio>
<el-radio-group
v-if="item.type === 'Radio'"
v-model="searchData[item.prop]"
:style="{ width: item.width }"
>
<el-radio
v-for="ra in item.radios"
:key="ra.value"
:label="ra.value"
>{{ ra.label }}</el-radio
>
</el-radio-group>
<!-- 单选按钮 -->
<el-radio-group v-if="item.type==='RadioButton'" v-model="searchData[item.prop]" :style="{width:item.width}" @change="item.change && item.change(searchData[item.prop])">
<el-radio-button v-for="ra in item.radios" :key="ra.value" :label="ra.value">{{ ra.label }}</el-radio-button>
<el-radio-group
v-if="item.type === 'RadioButton'"
v-model="searchData[item.prop]"
:style="{ width: item.width }"
@change="item.change && item.change(searchData[item.prop])"
>
<el-radio-button
v-for="ra in item.radios"
:key="ra.value"
:label="ra.value"
>{{ ra.label }}</el-radio-button
>
</el-radio-group>
<!-- 复选框 -->
<el-checkbox-group v-if="item.type==='Checkbox'" v-model="searchData[item.prop]" :style="{width:item.width}">
<el-checkbox v-for="ch in item.checkboxs" :key="ch.value" :label="ch.value">{{ ch.label }}</el-checkbox>
<el-checkbox-group
v-if="item.type === 'Checkbox'"
v-model="searchData[item.prop]"
:style="{ width: item.width }"
>
<el-checkbox
v-for="ch in item.checkboxs"
:key="ch.value"
:label="ch.value"
>{{ ch.label }}</el-checkbox
>
</el-checkbox-group>
<!-- 日期 -->
<el-date-picker v-if="item.type==='Date'" v-model="searchData[item.prop]" :placeholder="item.placeholder" :style="{width:item.width}" value-format="yyyy-MM-dd" format="yyyy-MM-dd" :picker-options="item.pickerOption" />
<el-date-picker
v-if="item.type === 'Date'"
v-model="searchData[item.prop]"
:placeholder="item.placeholder"
:style="{ width: item.width }"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
:picker-options="item.pickerOption"
/>
<!-- 时间 -->
<el-time-select v-if="item.type==='Time'" v-model="searchData[item.prop]" :placeholder="item.placeholder" type="" :style="{width:item.width}" />
<el-time-select
v-if="item.type === 'Time'"
v-model="searchData[item.prop]"
:placeholder="item.placeholder"
type=""
:style="{ width: item.width }"
/>
<!-- 日期时间 -->
<el-date-picker v-if="item.type==='DateTime'" v-model="searchData[item.prop]" :placeholder="item.placeholder" type="datetime" :disabled="item.disable && item.disable(searchData[item.prop])" :style="{width:item.width}" />
<el-date-picker
v-if="item.type === 'DateTime'"
v-model="searchData[item.prop]"
:placeholder="item.placeholder"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
:disabled="item.disable && item.disable(searchData[item.prop])"
:style="{ width: item.width }"
/>
<!-- 日期时间段 -->
<el-date-picker
v-if="item.type === 'Daterange'"
v-model="searchData[item.prop]"
type="datetimerange"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
:style="{ width: item.width }"
clearable
/>
<!-- 滑块 -->
<!-- <el-slider v-if="item.type==='Slider'" v-model="searchData[item.prop]"></el-slider> -->
<!-- 开关 -->
<el-switch v-if="item.type==='Switch'" v-model="searchData[item.prop]" :style="{width:item.width}" />
<el-switch
v-if="item.type === 'Switch'"
v-model="searchData[item.prop]"
:style="{ width: item.width }"
/>
<!-- 具名slot -->
<slot v-if="item.type==='Custom'" :name="item.slot" />
<slot v-if="item.type === 'Custom'" :name="item.slot" />
</el-form-item>
<el-form-item v-for="item in searchHandle" :key="item.label">
<slot v-if="item.slot" :name="item.slot" />
<el-button v-else :type="item.type" :size="item.size || size" :icon="item.icon || ''" @click="handleClick(item.emitKey)">{{ item.label }}</el-button>
<el-button
v-else
:type="item.type"
:size="item.size || size"
:icon="item.icon || ''"
@click="handleClick(item.emitKey)"
>{{ item.label }}</el-button
>
</el-form-item>
</el-form>
</div>
@ -76,47 +159,45 @@ export default {
props: {
that: {
type: Object,
default: this
default: this,
},
isHandle: {
type: Boolean,
default: true
default: true,
},
labelWidth: {
type: String,
default: ''
default: "",
},
size: {
type: String,
default: 'mini'
default: "mini",
},
searchForm: {
type: Array,
default: () => []
default: () => [],
},
searchHandle: {
type: Array,
default: () => []
default: () => [],
},
searchData: {
type: Object,
default: () => {}
}
default: () => {},
},
},
methods: {
handleClick(emitKey) {
// emit
this.$emit(`${emitKey}`)
}
}
}
this.$emit(`${emitKey}`);
},
},
};
</script>
<style lang="scss">
.base-search-form{
.el-form-item{
margin-bottom: 0px;
}
.base-search-form {
.el-form-item {
margin-bottom: 0px;
}
}
</style>

View File

@ -1,6 +1,16 @@
<template>
<div class="base-model-wrapper">
<el-dialog v-if="config.visible" v-dialogDrag :title="config.title" :append-to-body="config.appendToBody" :visible.sync="config.visible" :close-on-click-modal="false" :show-close="config.showClose" :width="config.width" :fullscreen="config.fullscreen">
<el-dialog
v-if="config.visible"
v-dialogDrag
:title="config.title"
:append-to-body="config.appendToBody"
:visible.sync="config.visible"
:close-on-click-modal="false"
:show-close="config.showClose"
:width="config.width"
:fullscreen="config.fullscreen"
>
<div class="base-modal-body">
<slot name="dialog-body" />
</div>
@ -12,46 +22,51 @@
</template>
<script>
export default {
name: 'BaseDialog',
name: "BaseDialog",
props: {
config: {
type: Object,
default: () => {
return {
visible: false,
title: '',
title: "",
closeOnClickModal: false,
showClose: true,
appendToBody: false,
width: '100px',
fullscreen: false
}
}
}
}
}
width: "100px",
fullscreen: false,
};
},
},
},
};
</script>
<style lang="scss">
.base-model-wrapper{
.el-dialog__header{
padding: 10px;
.el-dialog__headerbtn{
top: 10px;
right: 10px;
}
}
.el-dialog__body{
padding:10px 10px 10px 10px;
.base-modal-body{
min-height: 100px;
max-height:650px;
overflow-y: auto;
padding: 10px;
border: 1px solid #e0e0e0;
}
}
.el-dialog__footer{
padding: 10px;
.base-model-wrapper {
.el-dialog__header {
padding: 10px;
.el-dialog__headerbtn {
top: 10px;
right: 10px;
}
}
.el-dialog__body {
padding: 10px 10px 10px 10px;
.base-modal-body {
min-height: 100px;
max-height: 650px;
overflow-y: auto;
padding: 10px;
border: 1px solid #e0e0e0;
}
}
.el-dialog__footer {
padding: 10px;
}
}
.notFooter {
.is-fullscreen .el-dialog__footer {
display: none;
}
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<div class="chat-wrapper">
<div class="chat-content">
<div v-for="(record,index) in recordContent" :key="index">
<div v-for="(record,index) in recordContent" :key="`${record.chatTime}${index}`">
<div v-if="!record.mineMsg" class="word">
<!-- <img :src="record.headUrl"> -->
<img src="@/assets/CRC.png">

View File

@ -8,7 +8,6 @@
style="width:100%;height:100%;position:relative;"
class="cornerstone-element"
@contextmenu.prevent="onContextmenu"
@mousemove="sliderMousemove"
@mouseup="sliderMouseup"
>
<div v-show="dicomInfo.series" class="info-series">
@ -54,7 +53,7 @@
<!-- <div v-show="dicomInfo.acc">ACC {{ dicomInfo.acc }}</div> -->
<!-- <div>{{ dicomInfo.time }}</div> -->
</div>
<div ref="sliderBox" class="my_slider_box" style="position: absolute;right: 1px;height: calc(100% - 100px);transform: translateY(-50%);top: calc(50% - 30px);width: 10px;background: #333;cursor: pointer">
<div ref="sliderBox" class="my_slider_box" style="position: absolute;right: 1px;height: calc(100% - 100px);transform: translateY(-50%);top: calc(50% - 30px);width: 10px;background: #333;cursor: pointer" @click.stop="goViewer($event)">
<div :style="{top: height + '%'}" style="z-index:10;background: #9e9e9e;height: 20px;width: 100%;position: absolute;top: 0;cursor: move" @mousedown="sliderMousedown($event)" />
</div>
<div style="position: absolute;left: 50%;top: 15px;color: #f44336;">
@ -163,7 +162,9 @@ export default {
isMove: false
},
mousePosition: { x: '', y: '', mo: '' },
markers: { top: '', right: '', bottom: '', left: '' }
markers: { top: '', right: '', bottom: '', left: '' },
orientationMarkers: [],
originalMarkers: []
}
},
@ -186,6 +187,9 @@ export default {
document.addEventListener('mouseup', () => {
this.sliderMouseup()
})
document.addEventListener('mousemove', (e) => {
this.sliderMousemove(e)
})
this.canvas.addEventListener('cornerstonetoolsstackscroll', this.stackScrollCallback)
},
@ -205,7 +209,7 @@ export default {
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
instanceId = instanceId.split('.')[0]
this.stack.instanceId = instanceId
if (this.toolState.clipPlaying) this.toggleClipPlay()
this.toolState.clipPlaying = false
const element = this.$refs.canvas
cornerstone.enable(element)
this.loading = true
@ -213,7 +217,9 @@ export default {
cornerstone.loadAndCacheImage(this.stack.imageIds[this.stack.currentImageIdIndex])
.then(image => {
this.loading = false
this.onFirstImageLoaded(image)
if (this.stack.imageIds.indexOf(image.imageId) !== -1) {
this.onFirstImageLoaded(image)
}
}).catch((error) => {
this.loading = false
if (error.error && error.error.message) {
@ -356,6 +362,12 @@ export default {
if (this.dicomInfo.thick) {
this.dicomInfo.thick = this.dicomInfo.thick.toFixed(2)
}
let newImageIdIndex = this.stack.imageIds.findIndex(i=>i===e.detail.image.imageId)
if(newImageIdIndex === -1) return
this.stack.currentImageIdIndex = newImageIdIndex
this.stack.imageIdIndex = newImageIdIndex
this.series.imageIdIndex = newImageIdIndex
this.height = (this.stack.currentImageIdIndex) * 100 / (this.stack.imageIds.length - 1)
},
stackScrollCallback(e) {
const { detail } = e
@ -403,6 +415,7 @@ export default {
this.dicomInfo.location = position
},
getOrientationMarker(element) {
console.log('getOrientationMarker')
const enabledElement = cornerstone.getEnabledElement(element)
const imagePlane = cornerstone.metaData.get(
'imagePlaneModule',
@ -426,6 +439,7 @@ export default {
if (!markers) {
return
}
this.orientationMarkers = [oppositeColumn, row, column, oppositeRow]
this.originalMarkers = [oppositeColumn, row, column, oppositeRow]
this.setMarkers()
@ -438,10 +452,10 @@ export default {
}
},
onImageLoaded(e) {
var image = e.detail.image
// var seriesIndex = -1
var seriesUid = image.data.string('x0020000e')
console.log(seriesUid)
// var image = e.detail.image
// // var seriesIndex = -1
// var seriesUid = image.data.string('x0020000e')
// console.log(seriesUid)
},
getToolForElement(toolName) {
var isExist = false
@ -521,6 +535,9 @@ export default {
this.sliderInfo.oldB = parseInt(e.srcElement.style.top) * boxHeight / 100
this.sliderInfo.oldM = e.clientY
this.sliderInfo.isMove = true
e.stopImmediatePropagation()
e.stopPropagation()
e.preventDefault()
},
sliderMousemove(e) {
if (!this.sliderInfo.isMove) return
@ -540,6 +557,13 @@ export default {
sliderMouseup(e) {
this.sliderInfo.isMove = false
},
goViewer(e) {
// console.log(this.$refs['sliderBox'].clientHeight)
var height = e.offsetY * 100 / this.$refs['sliderBox'].clientHeight
this.height = height
var index = Math.trunc(this.stack.imageIds.length * this.height / 100)
scroll(this.canvas, index)
},
onClipStopped() {
this.toolState.clipPlaying = false
},
@ -610,6 +634,7 @@ export default {
enabledElement.renderingTools.renderCanvasData = renderCanvasData
},
scrollPage(offset) {
if(this.loading) return
var index = this.stack.currentImageIdIndex + offset
if (index < 0) index = 0
else if (index >= this.stack.imageIds.length) {
@ -621,6 +646,7 @@ export default {
},
toggleClipPlay() {
if(this.loading) return
if (this.toolState.clipPlaying) {
cornerstoneTools.stopClip(this.canvas)
this.toolState.clipPlaying = false
@ -675,8 +701,11 @@ export default {
},
resetRotate() {
this.orientationMarkers = [...this.originalMarkers]
this.setMarkers()
if (this.originalMarkers.length > 0) {
this.orientationMarkers = [...this.originalMarkers]
this.setMarkers()
}
var viewport = cornerstone.getViewport(this.canvas)
viewport.hflip = false
viewport.vflip = false
@ -685,24 +714,26 @@ export default {
},
setRotate(hflip, vflip, angle, type) {
var markers = [...this.orientationMarkers]
if (type === 2) {
//
this.orientationMarkers[1] = markers[3]
if (this.orientationMarkers.length > 0) {
var markers = [...this.orientationMarkers]
if (type === 2) {
//
this.orientationMarkers[1] = markers[3]
this.orientationMarkers[3] = markers[1]
} else if (type === 3) {
//
this.orientationMarkers[0] = markers[2]
this.orientationMarkers[2] = markers[0]
} else if (type === 4) {
// 90
this.orientationMarkers = markers.slice(1, 4).concat(markers[0])
} else if (type === 5) {
// 90
this.orientationMarkers = [markers[3]].concat(markers.slice(0, 3))
this.orientationMarkers[3] = markers[1]
} else if (type === 3) {
//
this.orientationMarkers[0] = markers[2]
this.orientationMarkers[2] = markers[0]
} else if (type === 4) {
// 90
this.orientationMarkers = markers.slice(1, 4).concat(markers[0])
} else if (type === 5) {
// 90
this.orientationMarkers = [markers[3]].concat(markers.slice(0, 3))
}
this.setMarkers()
}
this.setMarkers()
var viewport = cornerstone.getViewport(this.canvas)
if (hflip) viewport.hflip = !viewport.hflip
if (vflip) viewport.vflip = !viewport.vflip

View File

@ -162,6 +162,19 @@
<button :title="$t('trials:dicom-show:lens')" class="btn-link" data-tool="Magnify" @click="setToolActive($event,'Magnify')">
<svg-icon icon-class="zoom" style="font-size:20px;" />
</button>
<button :title="$t('trials:reading:button:rotate')" class="btn-link dropdown" data-tool="Rotate">
<svg-icon icon-class="rotate" style="font-size:20px;" />
<div class="dropdown-content">
<div @click.stop="setDicomCanvasRotate(1)">{{ $t('trials:reading:button:rotateDefault') }}</div>
<div @click.stop="setDicomCanvasRotate(2)">{{ $t('trials:reading:button:rotateHorizontal') }}</div>
<div @click.stop="setDicomCanvasRotate(3)">{{ $t('trials:reading:button:rotateVertical') }}</div>
<div @click.stop="setDicomCanvasRotate(4)">{{ $t('trials:reading:button:rotateTurnLeft') }}</div>
<div @click.stop="setDicomCanvasRotate(5)">{{ $t('trials:reading:button:rotateTurnRight') }}</div>
</div>
</button>
<button :title="$t('trials:reading:button:move')" class="btn-link" data-tool="Pan" @click="setToolActive($event,'Pan')">
<svg-icon icon-class="move" style="font-size:20px;" />
</button>
<button :title="$t('trials:reading:button:fitWindow')" class="btn-link" data-tool="fitToWindow" @click="fitToType($event,'fitToWindow')">
<svg-icon icon-class="fitToWindow" style="font-size:20px;" />
</button>
@ -169,19 +182,7 @@
<svg-icon icon-class="fitToImage" style="font-size:20px;" />
</button>
<!-- <button title="旋转" class="btn-link dropdown" data-tool="Rotate" @click="setToolActive($event,'Rotate')"> -->
<button :title="$t('trials:reading:button:rotate')" class="btn-link dropdown" data-tool="Rotate">
<svg-icon icon-class="rotate" style="font-size:20px;" />
<div class="dropdown-content">
<p @click.stop="setDicomCanvasRotate(1)">{{ $t('trials:reading:button:rotateDefault') }}</p>
<p @click.stop="setDicomCanvasRotate(2)">{{ $t('trials:reading:button:rotateHorizontal') }}</p>
<p @click.stop="setDicomCanvasRotate(3)">{{ $t('trials:reading:button:rotateVertical') }}</p>
<p @click.stop="setDicomCanvasRotate(4)">{{ $t('trials:reading:button:rotateTurnLeft') }}</p>
<p @click.stop="setDicomCanvasRotate(5)">{{ $t('trials:reading:button:rotateTurnRight') }}</p>
</div>
</button>
<button :title="$t('trials:reading:button:move')" class="btn-link" data-tool="Pan" @click="setToolActive($event,'Pan')">
<svg-icon icon-class="move" style="font-size:20px;" />
</button>
</div>
</div>
<!-- 测量标注 -->
@ -247,7 +248,7 @@
<svg-icon icon-class="previousframe" style="font-size:20px;" />
</button>
<!-- 播放 -->
<button class="btn-link" :title="$t('trials:dicom-show:play')" @click="currentDicomCanvas.toggleClipPlay()">
<button class="btn-link" :title="$t('trials:dicom-show:play')" @click="clipPlay">
<svg-icon
:icon-class="currentDicomCanvas.toolState.clipPlaying ? 'stop' : 'play'"
style="font-size:20px;"
@ -261,9 +262,10 @@
<button class="btn-link" :title="$t('trials:dicom-show:lastframe')" @click="currentDicomCanvas.scrollPage(9999)">
<svg-icon icon-class="lastframe" style="font-size:20px;" />
</button>
<select class="sidetool-select" style="width:60px" @change="setDicomCanvasfps($event)">
<select v-model="fps" class="sidetool-select" style="width:60px" @change="setDicomCanvasfps($event)">
<!-- 默认值 -->
<option :value="10">{{ $t('trials:dicom-show:default') }}</option>
<option :value="5">5</option>
<option :value="10">10</option>
<option :value="15">15</option>
<option :value="20">20</option>
<option :value="30">30</option>
@ -386,20 +388,22 @@ export default {
wwwcList: [],
layout: null,
seriesList: [],
customWwc: { visible: false, title: null }
customWwc: { visible: false, title: null },
fps: 15
}
},
mounted() {
this.customWwc = { visible: false, title: this.$t('DicomViewer:data:customWwc') }
this.rotateList[0] = '1'
this.colorList[0] = ''
this.wwwcList[0] = '1'
this.wwwcList[0] = '-1'
this.colormapsList = cornerstone.colors.getColormapsList()
this.currentDicomCanvas = this.$refs['dicomCanvas0']
},
methods: {
loadImageStack(dicomSeries) {
this.currentDicomCanvas.toolState.clipPlaying = false
this.$nextTick(() => {
this.currentDicomCanvas.loadImageStack(dicomSeries)
})
@ -444,7 +448,7 @@ export default {
this.colorList[this.currentDicomCanvasIndex] = ''
}
if (!this.wwwcList[this.currentDicomCanvasIndex]) {
this.wwwcList[this.currentDicomCanvasIndex] = '1'
this.wwwcList[this.currentDicomCanvasIndex] = '-1'
}
}
},
@ -565,6 +569,10 @@ export default {
setDicomCanvasfps(event) {
this.currentDicomCanvas.setFps(event.target.value)
},
clipPlay() {
this.currentDicomCanvas.setFps(this.fps)
this.currentDicomCanvas.toggleClipPlay()
},
fitToType(e, type) {
const toolButtons = document.querySelectorAll('[data-tool]')
Array.from(toolButtons).forEach((toolBtn) => {
@ -879,13 +887,19 @@ export default {
background-color: #323232;
min-width: 80px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
border: 1px solid #4e4e4e;
padding: 5px;
}
.dicom-wrapper .dropdown:hover .dropdown-content {
display: block;
}
.dicom-wrapper .dropdown-content p{
.dicom-wrapper .dropdown-content div{
height: 25px;
line-height: 25px;
cursor:point;
}
.dicom-wrapper .dropdown-content div:hover{
background-color: #16477b90;
}
</style>

26
src/components/MFA/fun.js Normal file
View File

@ -0,0 +1,26 @@
import Vue from "vue";
import MFACOMP from "./index.vue";
const MFAConstructor = Vue.extend(MFACOMP);
const MFA = options => {
const { UserId, username, EMail, callBack, cancelBack, status = 'login' } = options;
if (!UserId) throw `UserId is requred.but ${UserId}`
const id = `MFA${new Date().getTime()}`;
const instance = new MFAConstructor();
instance.id = id;
instance.vm = instance.$mount();
if (instance.vm.visible) return;
document.body.appendChild(instance.vm.$el);
instance.vm.open({ UserId, username, EMail, status });
instance.vm.$on("success", (Id) => {
if (callBack) callBack(Id)
});
instance.vm.$on("closed", () => {
if (cancelBack) cancelBack();
document.body.removeChild(instance.vm.$el);
instance.vm.$destroy();
});
return instance.vm;
}
export default MFA;

View File

@ -0,0 +1,7 @@
import MFACOMP from "./index.vue";
import MFA from "./fun";
export default Vue => {
Vue.component(MFACOMP.name, MFACOMP);
Vue.prototype.$MFA = MFA;
};

View File

@ -0,0 +1,204 @@
<template>
<!--MFA-->
<el-dialog
v-if="visible"
:visible.sync="visible"
width="540px"
:close-on-click-modal="false"
append-to-body
center
:show-close="status === 'login'"
@close="cancel"
>
<div slot="title">
{{ status === "login" ? $t("mfa:title") : $t("mfa:lock:title") }}
</div>
<el-form
ref="mfaForm"
label-position="right"
:model="form"
:rules="rules"
label-width="100px"
>
<!-- 邮箱 -->
<p class="tip">
<i class="el-icon-warning" style="color: #409eff"></i>
<span>{{ tip }}</span>
</p>
<!-- 用户名 -->
<el-form-item :label="$t('mfa:form:username')" prop="username">
<span>{{ form.username }}</span>
</el-form-item>
<!-- 验证码 -->
<el-form-item :label="$t('mfa:form:MFACode')" prop="Code">
<el-input
:placeholder="$t('mfa:form:input:placeholder:Codes')"
v-model="form.Code"
style="width: 240px; margin-right: 10px"
/>
<el-button
type="primary"
size="small"
@click.stop="sendMFACode"
:disabled="flag || sendFlag"
>{{ flag ? `${second}s` : $t("mfa:form:sendMFACode") }}</el-button
>
</el-form-item>
</el-form>
<div slot="footer">
<!-- 取消 -->
<!-- <el-button size="small" @click="cancel" v-if="status === 'login'">
{{ $t("mfa:button:cancel") }}
</el-button> -->
<!-- 保存 -->
<el-button
type="primary"
size="small"
@click="save"
:loading="loading"
style="width: 80%"
>
{{
status === "login"
? $t("mfa:button:save")
: $t("mfa:lock:button:save")
}}
</el-button>
</div>
</el-dialog>
</template>
<script>
import { sendMFAEmail, verifyMFACode } from "@/api/user.js";
export default {
name: "MFA",
data() {
return {
status: "login", // lock
tip: null,
visible: false,
loading: false,
timer: null,
flag: false,
sendFlag: false,
second: 60,
form: {
Code: null,
UserId: null,
EMail: null,
username: null,
},
rules: {
Code: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
],
EMail: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
],
username: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
],
},
};
},
methods: {
open(data) {
let { UserId, status, username, EMail } = data;
this.form.UserId = UserId;
this.status = status ? status : "login";
this.form.username = username;
this.form.EMail = EMail;
this.visible = true;
this.tip = this.$t("mfa:tip").replace("xx", EMail);
},
cancel() {
this.visible = false;
this.$emit("closed");
},
async save() {
try {
let validate = await this.$refs.mfaForm.validate();
if (!validate) return;
this.loading = true;
let res = await verifyMFACode(this.form);
this.loading = false;
if (res.IsSuccess) {
if (this.status === "login") {
this.$message.success(this.$t("mfa:message:verifySuccess"));
}
this.$emit("success", this.form.UserId);
this.cancel();
}
} catch (err) {
console.log(err);
this.loading = false;
}
},
async sendMFACode() {
try {
if (this.flag || this.sendFlag) return;
this.sendFlag = true;
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
let data = {
UserId: this.form.UserId,
};
if (this.status === "lock") {
data.MfaType = 1;
}
let res = await sendMFAEmail(data);
this.sendFlag = false;
if (res.IsSuccess) {
this.flag = true;
this.second = 60;
this.timer = setInterval(() => {
this.second--;
if (this.second <= 0) {
clearInterval(this.timer);
this.timer = null;
}
}, 1000);
}
} catch (err) {
console.log(err);
this.flag = false;
this.sendFlag = false;
}
},
},
destroyed() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
};
</script>
<style lang="scss" scoped>
.tip {
width: 86%;
margin: auto;
margin-bottom: 20px;
text-align: left;
padding: 0 10px;
line-height: 30px;
border-radius: 5px;
background-color: #eee;
i {
margin-right: 5px;
}
}
</style>

View File

@ -0,0 +1,22 @@
import Vue from "vue";
import Preview from "./index.vue";
const PreviewConstructor = Vue.extend(Preview);
const preview = options => {
const { path, type, title } = options;
if (!path) throw `path is requred.but ${path}`
const id = `Preview_${new Date().getTime()}`;
const instance = new PreviewConstructor();
instance.id = id;
instance.vm = instance.$mount();
if (instance.vm.visible) return;
document.body.appendChild(instance.vm.$el);
instance.vm.open(path, type, title);
instance.vm.$on("closed", () => {
document.body.removeChild(instance.vm.$el);
instance.vm.$destroy();
});
return instance.vm;
}
export default preview;

View File

@ -0,0 +1,7 @@
import Preview from "./index.vue";
import preview from "./fun";
export default Vue => {
Vue.component(Preview.name, Preview);
Vue.prototype.$preview = preview;
};

View File

@ -0,0 +1,41 @@
<template>
<el-dialog
v-if="visible"
:visible.sync="visible"
:title="title"
:fullscreen="true"
append-to-body
custom-class="base-dialog-wrapper"
@close="handleClose"
>
<div class="base-modal-body" style="border: 2px solid #ccc; padding: 10px">
<PreviewFile v-if="visible" :file-path="path" :file-type="type" />
</div>
</el-dialog>
</template>
<script>
import PreviewFile from "@/components/PreviewFile";
export default {
name: "preview",
components: { PreviewFile },
data() {
return {
visible: false,
path: null,
type: null,
title: null,
};
},
methods: {
open(path, type, title) {
this.path = path;
this.type = type;
this.title = title;
this.visible = true;
},
handleClose() {
this.$emit("closed");
},
},
};
</script>

View File

@ -0,0 +1,95 @@
<template>
<base-model :config="model_cfg">
<div slot="dialog-body">
<el-table :data="modelList" style="width: 100%" height="300">
<!--检查编号-->
<el-table-column
prop="StudyCode"
:label="$t('trials:uploadImage:table:StudyCode')"
/>
<!--检查类型-->
<el-table-column
prop="ModalityForEdit"
:label="$t('trials:uploadImage:table:ModalityForEdit')"
/>
<!--检查模态-->
<el-table-column
prop="Modalities"
:label="$t('trials:uploadImage:table:Modalities')"
/>
<!--检查部位-->
<el-table-column
prop="BodyPartForEdit"
:label="$t('trials:uploadImage:table:BodyPartForEdit')"
/>
<!--序列数量-->
<el-table-column
prop="SeriesCount"
:label="$t('trials:uploadImage:table:SeriesCount')"
/>
<!--图像数量-->
<el-table-column
prop="InstanceCount"
:label="$t('trials:uploadImage:table:InstanceCount')"
/>
<!--检查时间-->
<el-table-column
prop="StudyTime"
:label="$t('trials:uploadImage:table:StudyTime')"
min-width="130"
/>
<el-table-column
:label="$t('common:action:action')"
fixed="right"
width="80"
>
<template slot-scope="scope">
<!--预览--->
<el-button
circle
icon="el-icon-view"
:title="$t('trials:uploadImage:button:download')"
@click.stop="preview(scope.row)"
/>
</template>
</el-table-column>
</el-table>
</div>
</base-model>
</template>
<script>
import baseModel from "@/components/BaseModel";
import { getToken } from "@/utils/auth";
export default {
name: "studyView",
props: {
model_cfg: {
type: Object,
default: () => {
return {};
},
},
modelList: {
type: Array,
default: () => {
return [];
},
},
},
components: {
"base-model": baseModel,
},
methods: {
//
preview(row) {
var token = getToken();
const routeData = this.$router.resolve({
path: `/showdicom?studyId=${row.Id}&TokenKey=${token}&type=Study`,
});
window.open(routeData.href, "_blank");
},
},
};
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,766 @@
<template>
<div class="uploadList">
<el-divider content-position="left">{{
$t("trials:uploadImage:button:uploadTableTitle")
}}</el-divider>
<div class="top" style="margin-bottom: 10px">
<el-button
type="primary"
size="small"
v-if="!isLoad"
style="position: relative;
}"
>
<span style="opacity: 0">{{
$t("trials:uploadImage:button:selectFolder")
}}</span>
<label for="file">
{{ $t("trials:uploadImage:button:selectFolder") }}
</label>
</el-button>
<el-button
type="primary"
size="small"
class="el-icon-upload2"
@click.stop="notUp"
v-else
>
{{ $t("trials:uploadImage:button:selectFolder") }}
</el-button>
<input
type="file"
name="file"
id="file"
ref="file"
style="display: none"
webkitdirectory
multiple
@change="beginScanFiles($event)"
/>
</div>
<!--本地影像检查-->
<el-table
:data="uploadList"
style="width: 100%"
v-adaptive="{ bottomOffset: 50 }"
>
<el-table-column type="index" width="40" />
<!--检查信息-->
<el-table-column min-width="200" show-overflow-tooltip>
<template slot="header">
<el-tooltip placement="top">
<div slot="content">
{{ $t("trials:uploadImage:table:studyDetail1") }}<br />
{{ $t("trials:uploadImage:table:studyDetail2") }}<br />
{{ $t("trials:uploadedDicoms:table:studyDate") }}
</div>
<span>{{ $t("trials:uploadImage:table:studyInfo") }}</span>
</el-tooltip>
</template>
<template slot-scope="scope">
<div style="line-height: 15px">
<div>
<div>
<span>
<span style="font-weight: 500">Acc:</span>
<span
:class="{
colorOfRed: !scope.row.dicomInfo.AccessionNumber,
}"
>{{ scope.row.dicomInfo.AccessionNumber || "N/A" }}</span
>
</span>
</div>
<div style="display: inline-block; margin-right: 2px">
<span v-if="scope.row.dicomInfo.Modalities.length > 0">
{{ scope.row.dicomInfo.Modalities.join("、") }},
</span>
<span v-else style="color: #f44336">N/A,</span>
</div>
<div style="display: inline-block; margin-right: 2px">
<span v-if="scope.row.SeriesInstanceUidList.length"
>{{ scope.row.SeriesInstanceUidList.length }} Series,
</span>
<span v-else style="color: #f44336">N/A,</span>
</div>
<div style="display: inline-block">
<span v-if="scope.row.count"
>{{ scope.row.count }} Instances
</span>
<span v-else style="color: #f44336">N/A</span>
</div>
</div>
<div>
<div style="display: inline-block; margin-right: 2px">
<span v-if="scope.row.dicomInfo.seriesBodyPartExamined">
{{ scope.row.dicomInfo.seriesBodyPartExamined }},
</span>
<span v-else style="color: #f44336">N/A, </span>
</div>
<div style="display: inline-block">
<span v-if="scope.row.dicomInfo.StudyDescription">
{{ scope.row.dicomInfo.StudyDescription }}</span
>
<span v-else style="color: #f44336">N/A</span>
</div>
</div>
<div>
{{ scope.row.dicomInfo.StudyTime }}
</div>
</div>
</template>
</el-table-column>
<!--患者信息-->
<el-table-column min-width="130" show-overflow-tooltip>
<template slot="header">
<el-tooltip placement="top">
<div slot="content">
{{ $t("trials:uploadImage:table:pId") }}<br />
{{ $t("trials:uploadImage:table:patientName") }}<br />
{{ $t("trials:uploadImage:table:pInfo") }}
</div>
<span>{{ $t("trials:uploadImage:table:patientInfo") }}</span>
</el-tooltip>
</template>
<template slot-scope="scope">
<div style="line-height: 15px">
<div>
<span v-if="scope.row.dicomInfo.PatientId"
><span style="font-weight: 500">PID: </span
>{{ scope.row.dicomInfo.PatientId }}</span
>
<span v-else style="color: #f44336">N/A</span>
</div>
<div>
<span
:class="[scope.row.dicomInfo.PatientName ? '' : 'colorOfRed']"
>
{{ scope.row.dicomInfo.PatientName || "N/A" }}
</span>
</div>
<div>
<span
:class="[scope.row.dicomInfo.PatientSex ? '' : 'colorOfRed']"
>
{{ scope.row.dicomInfo.PatientSex || "N/A" }},
</span>
<span
:class="[scope.row.dicomInfo.PatientAge ? '' : 'colorOfRed']"
>
{{ scope.row.dicomInfo.PatientAge || "N/A" }},
</span>
<span
:class="[
scope.row.dicomInfo.PatientBirthDate ? '' : 'colorOfRed',
]"
>
{{ scope.row.dicomInfo.PatientBirthDate || "N/A" }}
</span>
</div>
</div>
</template>
</el-table-column>
<!--上传进度-->
<el-table-column
prop="schedule"
:label="$t('trials:uploadImage:table:schedule')"
min-width="150"
>
<template slot-scope="scope">
<el-progress
color="#409eff"
:percentage="scope.row.schedule"
v-if="scope.row.schedule || scope.row.schedule === 0"
/>
</template>
</el-table-column>
<!--上传状态-->
<el-table-column
prop="status"
:label="$t('trials:uploadImage:table:status')"
min-width="120"
>
<template slot-scope="scope">
<el-tag
:type="
['warning', 'success', 'danger', 'primary', 'success', 'danger'][
scope.row.status
]
"
v-if="scope.row.status || scope.row.status === 0"
>{{ $fd("UploadStatus", scope.row.status) }}
</el-tag>
</template>
</el-table-column>
<!--已有/成功/失败-->
<el-table-column
prop="scheduleNum"
:label="$t('trials:uploadImage:table:scheduleNum')"
min-width="140"
>
<template slot-scope="scope">
<span v-if="scope.row.count">{{
`${scope.row.count} /${scope.row.successCount} / ${scope.row.failCount}`
}}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('common:action:action')"
fixed="right"
width="140"
>
<!-- <template slot-scope="scope">
</template> -->
</el-table-column>
</el-table>
</div>
</template>
<script>
import {
preArchiveDicomStudy,
addOrUpdateArchiveTaskStudy,
} from "@/api/load.js";
import { parseDicom, getThumbnail, dicomToOSS } from "@/utils/parseDicom.js";
export default {
name: "uploadList",
props: {
SopInstanceUidList: {
type: Array,
default: () => {
return [];
},
},
StudyInstanceUidList: {
type: Array,
default: () => {
return [];
},
},
UploadStudyList: {
type: Array,
default: () => {
return [];
},
},
visible: {
type: Boolean,
default: false,
},
},
data() {
return {
isLoad: false,
uploadList: [], //
dicomList: [], //
requestNum: 6,
hasOtherStudy: false, //
isClose: false,
};
},
watch: {
isLoad() {
if (!this.isLoad) {
this.$refs.file.value = null;
if (this.dicomList.some((item) => item.isUpload === 3)) {
this.$confirm(this.$t("trials:uploadImage:confirm:failUpload"), {
type: "warning",
distinguishCancelAndClose: true,
confirmButtonText: this.$t("common:button:confirm"),
cancelButtonText: this.$t("common:button:cancel"),
})
.then(() => {
this.againUpload();
})
.catch((err) => {
console.log(err);
});
}
}
},
},
methods: {
//
againUpload() {
for (let i = 0; i < this.uploadList.length; i++) {
let item = this.uploadList[i];
if (item.status > 2) continue;
item.status = 0;
item.failCount = 0;
item.schedule = Math.floor(
((item.successCount + item.failCount) / item.count) * 100
);
let arr = this.dicomList.filter(
(dicom) =>
dicom.StudyInstanceUid === item.StudyInstanceUid &&
dicom.isUpload === 3
);
arr.forEach((item) => (item.isUpload = 0));
this.setUploadTask(arr);
}
},
async setUploadTask(arr) {
let num = arr.length > this.requestNum ? this.requestNum : arr.length;
let funArr = [];
for (let i = 0; i < num; i++) {
funArr.push(this.handleUploadTask(arr, i));
}
if (funArr.length > 0) {
let res = await Promise.all(funArr);
}
},
//
async preArchiveDicomStudy(post, index) {
try {
let res = await preArchiveDicomStudy(post);
if (res.IsSuccess) {
let item = this.uploadList[index];
item.StudyMonitorId = res.Result;
let arr = this.dicomList.filter(
(dicom) => dicom.StudyInstanceUid === item.StudyInstanceUid
);
this.setUploadTask(arr);
} else {
return false;
}
} catch (err) {
console.log(err);
return false;
}
},
//
async beginScanFiles(e) {
let files = e.target.files;
try {
this.dicomList = [];
this.hasOtherStudy = false;
for (var i = 0; i < files.length; ++i) {
if (files[i].name.indexOf("DICOMDIR") >= 0) continue;
let dicom = await parseDicom(files[i]);
if (!dicom) continue;
let has = this.dicomList.some(
(item) => item.SopInstanceUid === dicom.SopInstanceUid
);
if (has) continue;
has = this.StudyInstanceUidList.some(
(item) => item.StudyInstanceUid === dicom.StudyInstanceUid
);
if (!has) {
this.hasOtherStudy = true;
continue;
}
if (this.SopInstanceUidList.includes(dicom.SopInstanceUid)) continue;
this.isLoad = true;
dicom.file = files[i];
dicom.isUpload = 0;
this.StudyInstanceUidList.some((item) => {
if (item.StudyInstanceUid === dicom.StudyInstanceUid) {
dicom.params = {
TrialId: this.$route.query.trialId,
SubjectId: item.SubjectId,
VisitTaskId: item.VisitTaskId,
SourceSubjectVisitId: item.SourceSubjectVisitId,
};
let uploadHas = this.uploadList.some((uploadData) => {
if (uploadData.StudyInstanceUid === dicom.StudyInstanceUid) {
if (uploadData.status > 0) {
uploadData.count = 1;
uploadData.successCount = 0;
uploadData.failCount = 0;
uploadData.schedule = 0;
uploadData.status = 0;
uploadData.FileSize = dicom.file.size;
uploadData.SeriesInstanceUidList = [
dicom.SeriesInstanceUid,
];
uploadData.dicomInfo = {
AccessionNumber: dicom.AccessionNumber,
Modalities: dicom.Modalities,
seriesBodyPartExamined: dicom.seriesBodyPartExamined,
StudyDescription: dicom.StudyDescription,
StudyTime: this.getTime(dicom.StudyDate, dicom.StudyTime),
PatientName: dicom.PatientName,
PatientId: dicom.PatientId,
PatientAge: dicom.PatientAge,
PatientSex: dicom.PatientSex,
PatientBirthDate: dicom.PatientBirthDate,
};
} else {
uploadData.FileSize += dicom.file.size;
uploadData.count++;
}
if (
!uploadData.SeriesInstanceUidList.includes(
dicom.SeriesInstanceUid
)
) {
uploadData.SeriesInstanceUidList.push(
dicom.SeriesInstanceUid
);
}
}
return uploadData.StudyInstanceUid === dicom.StudyInstanceUid;
});
if (!uploadHas) {
let uploadData = {
TrialId: this.$route.query.trialId,
SubjectId: item.SubjectId,
SourceSubjectVisitId: item.SourceSubjectVisitId,
StudyId: dicom.StudyId,
StudyInstanceUid: dicom.StudyInstanceUid,
FileSize: dicom.file.size,
count: 1,
successCount: 0,
failCount: 0,
schedule: 0,
status: 0,
SeriesInstanceUidList: [dicom.SeriesInstanceUid],
IsDicomReUpload: false,
dicomInfo: {
AccessionNumber: dicom.AccessionNumber,
Modalities: dicom.Modalities,
seriesBodyPartExamined: dicom.seriesBodyPartExamined,
StudyDescription: dicom.StudyDescription,
StudyTime: this.getTime(dicom.StudyDate, dicom.StudyTime),
PatientName: dicom.PatientName,
PatientId: dicom.PatientId,
PatientAge: dicom.PatientAge,
PatientSex: dicom.PatientSex,
PatientBirthDate: dicom.PatientBirthDate,
},
};
if (
this.UploadStudyList.some(
(d) => d.StudyInstanceUid === uploadData.StudyInstanceUid
)
) {
uploadData.IsDicomReUpload = true;
}
this.uploadList.push(uploadData);
}
}
return item.StudyInstanceUid === dicom.StudyInstanceUid;
});
this.dicomList.push(dicom);
}
if (this.dicomList.length <= 0 && this.hasOtherStudy) {
let confirm = await this.$confirm(
this.$t("trials:uploadImage:confirmMessage:failSubject"),
{
type: "warning",
distinguishCancelAndClose: true,
confirmButtonText: this.$t("common:button:confirm"),
cancelButtonText: this.$t("common:button:cancel"),
}
);
if (confirm !== "confirm") return false;
this.$refs.file.click();
return false;
}
let funArr = [];
for (let i = 0; i < this.uploadList.length; i++) {
let item = this.uploadList[i];
let data = {
TrialId: item.TrialId,
SubjectId: item.SubjectId,
SubjectVisitId: item.SourceSubjectVisitId,
FileSize: item.FileSize,
IsDicomReUpload: item.IsDicomReUpload,
FileCount: item.count,
};
funArr.push(this.preArchiveDicomStudy(data, i));
}
if (funArr && funArr.length > 0) {
let res = await Promise.all(funArr);
}
} catch (err) {
console.log(err);
this.$refs.file.value = null;
}
},
//
async handleUploadTask(arr, index) {
if (this.isClose) return false;
arr[index].isUpload = 1;
let path = `/${arr[index].params.TrialId}/TaskImage/${
arr[index].params.SubjectId
}/${arr[index].params.VisitTaskId}/${
arr[index].StudyInstanceUid
}/${this.getGuid(
arr[index].StudyInstanceUid +
arr[index].SeriesInstanceUid +
arr[index].SOPInstanceUid +
arr[index].params.TrialId +
arr[index].params.VisitTaskId
)}`;
let uploadDicom = this.uploadList.filter(
(item) => item.StudyInstanceUid === arr[index].StudyInstanceUid
)[0];
let res = await dicomToOSS(arr[index].file, path);
if (res) {
arr[index].path = res;
uploadDicom.successCount++;
arr[index].isUpload = 2;
} else {
uploadDicom.status = 2;
uploadDicom.failCount++;
arr[index].isUpload = 3;
}
uploadDicom.schedule = Math.floor(
((uploadDicom.successCount + uploadDicom.failCount) /
uploadDicom.count) *
100
);
if (uploadDicom.schedule >= 100) {
if (uploadDicom.successCount === uploadDicom.count) {
uploadDicom.status = 1;
if (!uploadDicom.Study) {
let res = await this.formatDicom(arr, arr[index].StudyInstanceUid);
if (res) {
uploadDicom.Study = res[arr[index].StudyId];
uploadDicom.status = 3;
}
}
try {
res = await addOrUpdateArchiveTaskStudy(uploadDicom);
if (res.IsSuccess) {
uploadDicom.status = 4;
this.$emit("getList");
let ind = this.uploadList.findIndex(
(item) => item.StudyInstanceUid === uploadDicom.StudyInstanceUid
);
this.uploadList.splice(ind, 1);
} else {
uploadDicom.status = 5;
}
let flag = this.dicomList.every((item) => item.isUpload > 1);
if (flag) this.isLoad = false;
} catch (err) {
uploadDicom.status = 5;
let flag = this.dicomList.every((item) => item.isUpload > 1);
if (flag) this.isLoad = false;
}
} else if (
uploadDicom.count ===
uploadDicom.successCount + uploadDicom.failCount
) {
let flag = this.dicomList.every((item) => item.isUpload > 1);
if (flag) this.isLoad = false;
}
}
let ind = arr.findIndex((item) => !item.isUpload);
if (ind >= 0) {
return this.handleUploadTask(arr, ind);
} else {
return false;
}
},
//
async formatDicom(arr, StudyInstanceUid) {
let studyObj = {};
for (let i = 0; i < arr.length; i++) {
let dicom = arr[i];
if (dicom.StudyInstanceUid !== StudyInstanceUid) continue;
let thumbnailPath = `/${dicom.params.TrialId}/TaskImage/${dicom.params.SubjectId}/${dicom.params.VisitTaskId}/${dicom.StudyInstanceUid}/${dicom.SeriesInstanceUid}.png`;
if (!studyObj[dicom.StudyId]) {
studyObj[dicom.StudyId] = {
StudyId: dicom.StudyId,
StudyInstanceUid: dicom.StudyInstanceUid,
StudyTime: this.getTime(dicom.StudyDate, dicom.StudyTime),
Modalities: dicom.Modalities,
Description: dicom.StudyDescription,
SeriesCount: 1,
InstanceCount: 1,
InstitutionName: dicom.InstitutionName,
PatientId: dicom.PatientId,
PatientName: dicom.PatientName,
PatientAge: dicom.PatientAge,
PatientSex: dicom.PatientSex,
AccessionNumber: dicom.AccessionNumber,
PatientBirthDate: dicom.PatientBirthDate,
AcquisitionTime: dicom.AcquisitionTime,
AcquisitionNumber: dicom.AcquisitionNumber,
TriggerTime: dicom.TriggerTime,
BodyPartExamined: dicom.BodyPartExamined,
SeriesList: [
{
StudyInstanceUid: dicom.StudyInstanceUid,
SeriesInstanceUid: dicom.SeriesInstanceUid,
SeriesNumber: dicom.SeriesNumber,
SeriesTime: this.getTime(dicom.SeriesDate, dicom.SeriesTime),
Modality: dicom.Modality,
Description: dicom.SeriesDescription,
InstanceCount: 1,
SliceThickness: dicom.SliceThickness,
ImagePositionPatient: dicom.ImagePosition,
ImageOrientationPatient: dicom.ImageOrientation,
BodyPartExamined: dicom.seriesBodyPartExamined,
SequenceName: dicom.SequenceName,
ProtocolName: dicom.ProtocolName,
ImagerPixelSpacing: dicom.ImagePixelSpacing,
AcquisitionTime: dicom.AcquisitionTime,
AcquisitionNumber: dicom.AcquisitionNumber,
TriggerTime: dicom.TriggerTime,
ImageResizePath: await getThumbnail(
dicom.file,
thumbnailPath,
dicom
),
InstanceList: [
{
StudyInstanceUid: dicom.StudyInstanceUid,
SeriesInstanceUid: dicom.SeriesInstanceUid,
SopInstanceUid: dicom.SopInstanceUid,
InstanceNumber: dicom.ImageOrInstanceNumber,
InstanceTime: this.getTime(
dicom.ContentDate,
dicom.ContentTime
),
ImageRows: dicom.Rows || 0,
ImageColumns: dicom.Columns || 0,
SliceLocation: dicom.SliceLocation,
SliceThickness: dicom.SliceThickness,
NumberOfFrames: dicom.NumberOfFrames || 0,
PixelSpacing: dicom.PixelSpacing,
ImagerPixelSpacing: dicom.ImagePixelSpacing,
FrameOfReferenceUID: dicom.FrameOfReferenceUID,
WindowCenter: dicom.WindowCenter,
WindowWidth: dicom.WindowWidth,
Path: dicom.path,
HtmlPath: "",
},
],
},
],
};
} else {
let seriesHas = studyObj[dicom.StudyId].SeriesList.some((item) => {
if (item.SeriesInstanceUid === dicom.SeriesInstanceUid) {
item.InstanceCount++;
let instance = {
StudyInstanceUid: dicom.StudyInstanceUid,
SeriesInstanceUid: dicom.SeriesInstanceUid,
SopInstanceUid: dicom.SopInstanceUid,
InstanceNumber: dicom.ImageOrInstanceNumber,
InstanceTime: this.getTime(
dicom.ContentDate,
dicom.ContentTime
),
ImageRows: dicom.Rows || 0,
ImageColumns: dicom.Columns || 0,
SliceLocation: dicom.SliceLocation,
SliceThickness: dicom.SliceThickness,
NumberOfFrames: dicom.NumberOfFrames || 0,
PixelSpacing: dicom.PixelSpacing,
ImagerPixelSpacing: dicom.ImagePixelSpacing,
FrameOfReferenceUID: dicom.FrameOfReferenceUID,
WindowCenter: dicom.WindowCenter,
WindowWidth: dicom.WindowWidth,
Path: dicom.path,
HtmlPath: "",
};
item.InstanceList.push(instance);
}
return item.SeriesInstanceUid === dicom.SeriesInstanceUid;
});
if (!seriesHas) {
studyObj[dicom.StudyId].SeriesCount++;
let series = {
StudyInstanceUid: dicom.StudyInstanceUid,
SeriesInstanceUid: dicom.SeriesInstanceUid,
SeriesNumber: dicom.SeriesNumber,
SeriesTime: this.getTime(dicom.SeriesDate, dicom.SeriesTime),
Modality: dicom.Modality,
Description: dicom.SeriesDescription,
InstanceCount: 1,
SliceThickness: dicom.SliceThickness,
ImagePositionPatient: dicom.ImagePosition,
ImageOrientationPatient: dicom.ImageOrientation,
BodyPartExamined: dicom.seriesBodyPartExamined,
SequenceName: dicom.SequenceName,
ProtocolName: dicom.ProtocolName,
ImagerPixelSpacing: dicom.ImagePixelSpacing,
AcquisitionTime: dicom.AcquisitionTime,
AcquisitionNumber: dicom.AcquisitionNumber,
TriggerTime: dicom.TriggerTime,
ImageResizePath: await getThumbnail(
dicom.file,
thumbnailPath,
dicom
),
InstanceList: [
{
StudyInstanceUid: dicom.StudyInstanceUid,
SeriesInstanceUid: dicom.SeriesInstanceUid,
SopInstanceUid: dicom.SopInstanceUid,
InstanceNumber: dicom.ImageOrInstanceNumber,
InstanceTime: this.getTime(
dicom.ContentDate,
dicom.ContentTime
),
ImageRows: dicom.Rows || 0,
ImageColumns: dicom.Columns || 0,
SliceLocation: dicom.SliceLocation,
SliceThickness: dicom.SliceThickness,
NumberOfFrames: dicom.NumberOfFrames || 0,
PixelSpacing: dicom.PixelSpacing,
ImagerPixelSpacing: dicom.ImagePixelSpacing,
FrameOfReferenceUID: dicom.FrameOfReferenceUID,
WindowCenter: dicom.WindowCenter,
WindowWidth: dicom.WindowWidth,
Path: dicom.path,
HtmlPath: "",
},
],
};
studyObj[dicom.StudyId].SeriesList.push(series);
}
studyObj[dicom.StudyId].InstanceCount++;
}
}
return studyObj;
},
// dicom
getTime(date, time) {
let studyTime = "";
if (date) {
date = `${date.substring(0, 4)}-${date.substring(
4,
6
)}-${date.substring(6, 8)}`;
}
if (time) {
time = `${time.substring(0, 2)}:${time.substring(
2,
4
)}:${time.substring(4, 6)}`;
}
if (date) {
studyTime = time ? `${date} ${time}` : `${date} 00:00:00`;
}
return studyTime;
},
},
beforeDestroy() {
this.isClose = true;
},
};
</script>
<style lang="scss" scoped>
.colorOfRed {
color: #f44336;
}
label {
cursor: pointer;
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
padding: 9px 15px;
}
</style>

View File

@ -0,0 +1,271 @@
<template>
<el-dialog
:visible.sync="visible"
:fullscreen="true"
:close-on-click-modal="false"
custom-class="upload-dialog"
:before-close="beforeClose"
class="uploadImage"
>
<span slot="title">{{ title }}</span>
<el-divider content-position="left">{{
$t("trials:uploadImage:button:uploadTableTitle1")
}}</el-divider>
<!--已上传影像检查-->
<el-table
:data="list"
style="width: 100%"
height="300"
v-adaptive="{ bottomOffset: 50, notAdaptive: isUpload }"
: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">
<el-button
v-if="
scope.row.OrginalStudyList &&
scope.row.OrginalStudyList.length >= 1
"
type="text"
@click="handleOpenDialog(scope.row, 'OrginalStudyList')"
>
<span>{{ scope.row.OrginalStudyList.length }}</span>
</el-button>
<span v-else>0</span>
</template>
</el-table-column>
<!--后处理检查数-->
<el-table-column
prop="UploadStudyList"
:label="$t('trials:uploadImage:table:uploadStudyListNum')"
>
<template slot-scope="scope">{{
scope.row.UploadStudyList && Array.isArray(scope.row.UploadStudyList)
? scope.row.UploadStudyList.length
: 0
}}</template>
</el-table-column>
<el-table-column
:label="$t('common:action:action')"
fixed="right"
width="140"
>
<template slot-scope="scope">
<!--下载--->
<el-button
v-if="!isUpload && Criterion.ImageDownloadEnum > 0"
circle
icon="el-icon-download"
:title="$t('trials:uploadImage:button:download')"
@click.stop="downloadImage(scope.row)"
/>
<!--删除--->
<el-button
v-if="isUpload"
circle
icon="el-icon-delete"
:title="$t('trials:uploadImage:button:delete')"
@click.stop="remove(scope.row)"
/>
</template>
</el-table-column>
</el-table>
<upload-list
v-if="Criterion.ImageUploadEnum > 0 && isUpload"
:StudyInstanceUidList="StudyInstanceUidList"
:SopInstanceUidList="SopInstanceUidList"
:UploadStudyList="UploadStudyList"
@getList="getList"
/>
<study-view
v-if="model_cfg.visible"
:model_cfg="model_cfg"
:modelList="modelList"
/>
</el-dialog>
</template>
<script>
import uploadList from "./components/upload-list.vue";
import studyView from "./components/study-view.vue";
import { getSubjectImageUploadList, deleteTaskStudy } from "@/api/load.js";
import { downloadImage } from "@/utils/uploadZip.js";
export default {
name: "uploadImage",
props: {
visible: {
type: Boolean,
default: false,
},
SubjectId: {
type: String,
default: "",
},
Criterion: {
type: Object,
default: () => {
return {};
},
},
status: {
type: String,
default: "upload",
},
},
components: {
"upload-list": uploadList,
"study-view": studyView,
},
data() {
return {
list: [],
StudyInstanceUidList: [],
SopInstanceUidList: [],
UploadStudyList: [],
//
model_cfg: {
visible: false,
showClose: true,
width: "1000px",
title: "",
appendToBody: true,
},
modelList: [],
};
},
computed: {
title() {
let str = this.$t("trials:uploadImage:title:uploadImages");
if (this.status === "download") {
str = this.$t("trials:uploadImage:title:uploadImagesDownLoad");
}
return str;
},
isUpload() {
return this.status === "upload";
},
},
created() {
this.getList();
},
methods: {
beforeClose() {
this.$emit("update:visible", false);
},
notUp() {
this.$confirm(this.$t("trials:uploadImage:confirmMessage:notUp"), {
type: "warning",
distinguishCancelAndClose: true,
confirmButtonText: this.$t("common:button:confirm"),
cancelButtonText: this.$t("common:button:cancel"),
});
},
//
async getList() {
try {
let params = {
SubjectId: this.SubjectId,
TrialReadingCriterionId: this.Criterion.TrialReadingCriterionId,
};
this.loading = true;
let res = await getSubjectImageUploadList(params);
this.loading = false;
if (res.IsSuccess) {
this.StudyInstanceUidList = [];
this.SopInstanceUidList = [];
this.UploadStudyList = [];
this.list = res.Result;
res.Result.forEach((item) => {
if (item.OrginalStudyList && Array.isArray(item.OrginalStudyList)) {
item.OrginalStudyList.forEach((data) => {
data.SubjectId = item.SubejctId;
data.VisitTaskId = item.VisitTaskId;
data.SourceSubjectVisitId = item.SourceSubjectVisitId;
this.StudyInstanceUidList.push(data);
});
}
if (item.UploadStudyList && Array.isArray(item.UploadStudyList)) {
item.UploadStudyList.forEach((data) => {
data.SopInstanceUidList &&
this.SopInstanceUidList.push(...data.SopInstanceUidList);
this.UploadStudyList.push(data);
});
}
});
}
} catch (err) {
console.log(err);
this.loading = false;
}
},
//
async remove(item) {
try {
let confirm = await this.$confirm(
this.$t("trials:uploadImage:confirm:delMessage"),
{
type: "warning",
distinguishCancelAndClose: true,
confirmButtonText: this.$t("common:button:confirm"),
cancelButtonText: this.$t("common:button:cancel"),
}
);
if (confirm !== "confirm") return;
let params = {
VisitTaskId: item.VisitTaskId,
};
let res = await deleteTaskStudy(params);
if (res.IsSuccess) {
this.getList();
this.$message.success(
this.$t("trials:uploadImage:message:delSuccess")
);
}
} catch (err) {
console.log(err);
}
},
//
handleOpenDialog(item, list) {
this.model_cfg.title = `${item.SubejctCode || ""}>${item.TaskBlindName}`;
this.modelList = item[list];
this.model_cfg.visible = true;
},
//
async downloadImage(item) {
try {
await downloadImage(
this.$route.query.trialId,
item.SourceSubjectVisitId
);
} catch (err) {
console.log(err);
}
},
},
};
</script>
<style lang="scss" scoped>
::v-deep .el-dialog {
.el-dialog__header {
padding-top: 15px;
}
}
.uploadImage {
background-color: #fff;
}
</style>

View File

@ -4,11 +4,12 @@ import {
} from 'element-ui/src/utils/resize-event'
// 设置表格高度
const doResize = async(el, binding, vnode) => {
const doResize = async (el, binding, vnode) => {
// 获取表格Dom对象
const { componentInstance: $table } = await vnode
// 获取调用传递过来的数据
const { value } = binding
if (value && value.notAdaptive) return;
// 获取距底部距离(用于展示页码等信息)
const bottomOffset = (value && value.bottomOffset) || 40
if (!$table) return
@ -24,7 +25,7 @@ export default {
// 初始化设置
bind(el, binding, vnode) {
// 设置resize监听方法
el.resizeListener = async() => {
el.resizeListener = async () => {
await doResize(el, binding, vnode)
}
// 绑定监听方法到addResizeListener

View File

@ -4,6 +4,7 @@ import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI, { MessageBox } from 'element-ui'
import { getBasicDataAllSelect, getFrontInternationalizationList } from '@/api/dictionary/dictionary'
import { sendMFAEmail } from "@/api/user.js";
import { resetReadingRestTime } from '@/api/trials/reading'
// import 'element-ui/lib/theme-chalk/index.css'
import './assets/css/theme-blue/index.css' // 浅绿色主题
@ -24,7 +25,6 @@ Vue.use(VueClipboard)
// import htmlToPdf from './utils/htmlToPdf'
// Vue.use(htmlToPdf)
import permission from './utils/permission'
import { OSSclient } from './utils/oss'
Vue.use(permission)
import Viewer from 'v-viewer'
@ -57,14 +57,18 @@ Vue.use(hasPermi)
// Vue.use(ElementUI, { locale, size: 'medium' })
import upload from '@/components/element-ui/upload'
Vue.use(upload)
import Preview from '@/components/Preview/index'
Vue.use(Preview)
import MFA from '@/components/MFA/index'
Vue.use(MFA)
import adaptive from '@/directive/adaptive/index'
// 表格自适应指令
Vue.use(adaptive)
import dialogDrag from '@/directive/dialogDrag'
// 窗口拖拽
Vue.use(dialogDrag)
if(!String.prototype.replaceAll){
String.prototype.replaceAll = function(str, newStr){
if (!String.prototype.replaceAll) {
String.prototype.replaceAll = function (str, newStr) {
// 正则表达式
if (Object.prototype.toString.call(str).toLowerCase() === '[object regexp]') {
return this.replace(str, newStr)
@ -80,6 +84,7 @@ import DictTag from '@/components/DictTag'
import DictData from '@/components/DictData'
import { getBasicDataSelect } from '@/api/dictionary/dictionary'
import { checkConfig } from '@/const/check/index'
import { getTrialBodyPartList } from "@/api/trials/setting";
// 全局方法挂载
var $q = params
Vue.prototype.checkConfig = checkConfig
@ -96,12 +101,14 @@ Vue.prototype.selectDictLabel = selectDictLabel
// Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
Vue.prototype.$getObjectName = (url) => {
// console.log(url)
var value = url
var str = value.split("//"); //https://进行分割,
var index = str[1].indexOf("/")+1; //indexOf 获取第一个斜杠的索引,
// console.log(str[1].substring(index)); //substring 截取,
return '/' + str[1].substring(index)
// console.log(url,'url')
// console.log(Vue.prototype.OSSclientConfig.viewEndpoint,'url')
var value = url;
let basePath = Vue.prototype.OSSclientConfig.viewEndpoint;
if (Vue.prototype.OSSclientConfig.ObjectStoreUse === 'AliyunOSS') {
basePath = Vue.prototype.OSSclientConfig.endPoint.split('https://').length > 1 ? Vue.prototype.OSSclientConfig.endPoint.split('https://')[1] : Vue.prototype.OSSclientConfig.endPoint;
}
return value.split(basePath)[1];
}
Vue.prototype.getGuid = (text) => {
text = md5(text)
@ -117,14 +124,14 @@ Vue.prototype.getGuid = (text) => {
t9 = text.substr(16, 4)
t10 = text.substr(20, 12)
// console.log(`${t4+t3+t2+t1}-${t6+t5}-${t8+t7}-${t9}-${t10}`)
return `${t4+t3+t2+t1}-${t6+t5}-${t8+t7}-${t9}-${t10}`
return `${t4 + t3 + t2 + t1}-${t6 + t5}-${t8 + t7}-${t9}-${t10}`
}
Vue.prototype.$validatePassword = (rule, value, callback) => {
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
/* eslint-disable */
var reg1 = eval(process.env.VUE_APP_PASSWORD_FOR_PERMISSION) ? new RegExp(`${process.env.VUE_APP_PASSWORD_FOR_REGULAR}`) : /.*/g; //密码必须是8位以上、必须含有字母、数字、特殊符号
if (!reg1.test(value)) {
callback(lang==='zh' ? new Error("密码必须包含18 32 个字符2至少1个数字3) 至少1个大写字母4至少1个小写字母5至少1个特殊字符 (~!-@#$%^&*_+?)") : new Error('Passwords must have: 1) 8 - 32 characters; 2) At least 1 number; 3) At least 1 uppercase letter; 4) At least 1 lowercase letter; 5) At least 1 special character (~!-@#$%^&*_+?) '))
callback(lang === 'zh' ? new Error("密码必须包含18 32 个字符2至少1个数字3) 至少1个大写字母4至少1个小写字母5至少1个特殊字符 (~!-@#$%^&*_+?)") : new Error('Passwords must have: 1) 8 - 32 characters; 2) At least 1 number; 3) At least 1 uppercase letter; 4) At least 1 lowercase letter; 5) At least 1 special character (~!-@#$%^&*_+?) '))
} else {
callback();
}
@ -158,7 +165,7 @@ Vue.prototype.fileToBlob = (file) => {
}
var _vm
async function VueInit () {
async function VueInit() {
var params
var res
if (~window.location.href.indexOf('/readingDicoms') || ~window.location.href.indexOf('/noneDicomReading') || ~window.location.href.indexOf('/criterionquestions') || ~window.location.href.indexOf('/petct')) {
@ -179,6 +186,24 @@ async function VueInit () {
zhMessages[v.Code] = v.ValueCN
enMessages[v.Code] = v.Value
})
// 获取检查部位
Vue.prototype.$getBodyPart = (id) => {
return new Promise(async (resolve, reject) => {
try {
let params = {
TrialId: id
}
let BodyPart = await getTrialBodyPartList(params)
if (BodyPart.IsSuccess) {
resolve(BodyPart.Result);
} else {
reject(BodyPart);
}
} catch (err) {
reject(err)
}
})
}
i18n.mergeLocaleMessage('zh', zhMessages)
i18n.mergeLocaleMessage('en', enMessages)
Vue.use(ElementUI, {
@ -187,14 +212,14 @@ async function VueInit () {
})
let d = function (code) {
var dictInfo = res.Result
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
try {
for (var code in dictInfo) {
var dictList = (dictInfo[code] && dictInfo[code].length > 0) ? dictInfo[code].map(dict => {
var dictList = (dictInfo[code] && dictInfo[code].length > 0) ? dictInfo[code].map(dict => {
return {
id: dict.Id,
label: lang==='zh' ? dict.ValueCN : dict.Value,
value: dict.DataTypeEnum === 3 ? eval(dict.Code) : dict.IsEnumInt ? parseInt(dict.Code): dict.Code,
label: lang === 'zh' ? dict.ValueCN : dict.Value,
value: dict.DataTypeEnum === 3 ? eval(dict.Code) : dict.IsEnumInt ? parseInt(dict.Code) : dict.Code,
raw: Object.assign({}, dict),
IsBaseLineUse: false,
IsFollowVisitUse: false
@ -202,35 +227,36 @@ async function VueInit () {
}) : []
dictInfo[code] = dictList
}
} catch (e){
} catch (e) {
console.error(e)
}
return dictInfo
}()
Vue.prototype.$d = d
Vue.prototype.$fd = function (code, v, type) {
Vue.prototype.$fd = function (code, v, type, arr, key = 'label') {
try {
let data = arr || d;
type = type || 'value';
// code === 'YesOrNo' ? console.log(d) : ''
type = type || 'value'
return d[code].find(i => {
return data[code].find(i => {
return i[type] === v
}) ? d[code].find(i => {
}) ? data[code].find(i => {
return i[type] === v
}).label : ''
})[key] : ''
} catch (e) {
}
}
Vue.prototype.$updateDictionary = function() {
Vue.prototype.$updateDictionary = function () {
Vue.prototype.$d = function (code) {
var dictInfo = res.Result
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
try {
for (var code in dictInfo) {
var dictList = (dictInfo[code] && dictInfo[code].length > 0) ? dictInfo[code].map(dict => {
var dictList = (dictInfo[code] && dictInfo[code].length > 0) ? dictInfo[code].map(dict => {
return {
id: dict.raw.Id,
label: lang==='zh' ? dict.raw.ValueCN : dict.raw.Value,
value: dict.raw.DataTypeEnum === 3 ? eval(dict.raw.Code) : dict.raw.IsEnumInt ? parseInt(dict.raw.Code): dict.raw.Code,
label: lang === 'zh' ? dict.raw.ValueCN : dict.raw.Value,
value: dict.raw.DataTypeEnum === 3 ? eval(dict.raw.Code) : dict.raw.IsEnumInt ? parseInt(dict.raw.Code) : dict.raw.Code,
raw: Object.assign({}, dict.raw),
IsBaseLineUse: false,
IsFollowVisitUse: false
@ -238,7 +264,7 @@ async function VueInit () {
}) : []
_vm.$set(dictInfo, code, dictList)
}
} catch (e){
} catch (e) {
console.error(e)
}
return dictInfo
@ -274,14 +300,14 @@ async function VueInit () {
let count = 0;
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
setInterval(() => {
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
if ( _vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
return
}
if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) {
window.location.href = `/login`
zzSessionStorage.removeItem('lastWorkbench')
_vm.$alert(lang === 'en'? 'The same browser only allows one user account to be logged in at a time.' : '同一浏览器只允许同时登陆一个账户', {
_vm.$alert(lang === 'en' ? 'The same browser only allows one user account to be logged in at a time.' : '同一浏览器只允许同时登陆一个账户', {
type: 'warning',
})
}
@ -295,10 +321,10 @@ async function VueInit () {
function countTime() {
count++
localStorage.setItem('count', count)
if (count == parseInt(second2) || isLock === 'true') {
if (count == parseInt(second2) || isLock === 'true') {
callback2();
}
if (count >= second) {
if (count >= second) {
callback();
count = 0;
localStorage.removeItem('count')
@ -334,23 +360,25 @@ async function VueInit () {
/* eslint-disable */
window.VUE_APP_COMPANY_NAME = process.env.VUE_APP_COMPANY_NAME;
waitOperate(eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION) ? () => {
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
if ( _vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
count = 0;
localStorage.setItem('count', '0')
return
}
_vm.$store.dispatch('user/logout').then(res => {
window.location.href = `/login`
})
_vm.$alert(lang === 'zh' ? '由于您长时间未操作,为保护您的数据安全已强制将您下线,如果需要继续操作请重新登陆!' : 'No operation for a long time non-operation, you have been forced logout to protect data security. If continue to operate, please login again!', {
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
count = 0;
localStorage.setItem('count', '0')
return
}
_vm.$store.dispatch('user/logout').then(res => {
// window.location.href = `/login`
router.push("/login")
}).then(() => {
_vm.$alert(lang === 'zh' ? '由于您长时间未操作,为保护您的数据安全已强制将您下线,如果需要继续操作请重新登陆!' : 'No operation for a long time non-operation, you have been forced logout to protect data security. If continue to operate, please login again!', {
type: 'warning',
})
} : () => {}, process.env.VUE_APP_LOGOUT_FOR_TIME,
})
} : () => { }, process.env.VUE_APP_LOGOUT_FOR_TIME,
eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => {
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
if ( _vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
count = 0;
localStorage.setItem('count', '0')
if (_vm.$route.path === '/login') {
@ -381,38 +409,59 @@ async function VueInit () {
}
var my_username = zzSessionStorage.getItem('my_username')
var my_password = zzSessionStorage.getItem('my_password')
let my_userid = zzSessionStorage.getItem('userId')
let my_EMail = zzSessionStorage.getItem('my_EMail')
if (md5(_vm.unlock.my_password) === my_password && my_username === _vm.unlock.my_username) {
resetReadingRestTime().then(() => {
})
_vm.$message.success(lang === 'zh' ? '解锁成功,请继续操作' : 'Unlocked successfully. Please continue operation.')
_vm.unlock = {
my_username: null,
my_password: null
const closeLock = (_vm) => {
_vm.$message.success(lang === 'zh' ? '解锁成功,请继续操作' : 'Unlocked successfully. Please continue operation.')
_vm.unlock = {
my_username: null,
my_password: null
}
isOpen = false
count = 0;
isLock = null
zzSessionStorage.removeItem('isLock')
localStorage.setItem('count', '0')
document.querySelector('#my_username').value = null
document.querySelector('#my_password').value = null
setTimeout(() => {
done()
}, 500)
}
isOpen = false
count = 0;
isLock = null
zzSessionStorage.removeItem('isLock')
localStorage.setItem('count', '0')
document.querySelector('#my_username').value = null
document.querySelector('#my_password').value = null
setTimeout(() => {
done()
}, 500)
if (eval(process.env.VUE_APP_LOCK_FOR_PERMISSION_MFA)) {
sendMFAEmail({ UserId: my_userid, MfaType: 1 }).then((res) => {
done();
Vue.prototype.$MFA({
status: "lock",
UserId: my_userid,
EMail: my_EMail,
username: my_username,
callBack: () => {
closeLock(_vm)
},
})
})
} else {
closeLock(_vm)
}
} else {
// console.log(111)
_vm.$message.error(lang === 'zh' ? '请输入正确用户名密码' : 'Please enter the correct password.')
}
}
},
message: h('div', {} , [
message: h('div', {}, [
h('el-form', {
props: { labelWidth: "80px" }
}, [
h('el-form-item', {
props: {label: lang === 'zh' ? '用户名' : 'Username'},
props: { label: lang === 'zh' ? '用户名' : 'Username' },
}, [
h('input',{
h('input', {
props: {
value: _vm.unlock.my_username
},
@ -432,7 +481,7 @@ async function VueInit () {
})
]),
h('el-form-item', {
props: {label: lang === 'zh' ? '密码' : 'Password'},
props: { label: lang === 'zh' ? '密码' : 'Password' },
}, [
h('input', {
props: {
@ -457,7 +506,7 @@ async function VueInit () {
])
])
})
} : () => {}, process.env.VUE_APP_LOCK_FOR_TIME)
} : () => { }, process.env.VUE_APP_LOCK_FOR_TIME)
}
VueInit()

View File

@ -34,7 +34,7 @@ router.beforeEach(async(to, from, next) => {
NProgress.done()
} else {
OSSclient()
const hasGetUserInfo = store.getters.name
const hasGetUserInfo = store.getters.userId
if (hasGetUserInfo) {
next()
} else {

View File

@ -262,7 +262,7 @@ export const constantRoutes = [
children: [{
path: 'baiscInfo',
name: 'BaiscInfo',
component: () => import('@/views/user/myInfo')
component: () => import('@/views/user/editInfo')
}
]
}

View File

@ -190,6 +190,7 @@ const actions = {
},
getMasterSeries({ state }, obj) {
return new Promise(resolve => {
console.log('getMasterSeries')
var seriesInfo = {}
var i = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
getReadingVisitStudyList(obj.trialId, obj.visitId, obj.visitTaskId).then(res => {
@ -209,14 +210,28 @@ const actions = {
var seriesList = []
study.SeriesList.forEach((series, index) => {
const imageIds = []
series.InstancePathList.forEach((path) => {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${path}`)
const instanceList = []
// series.InstancePathList.forEach((path) => {
// imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${path}`)
// })
series.InstanceInfoList.forEach(instance => {
if (instance.NumberOfFrames && instance.NumberOfFrames > 1) {
for (let i = 0; i < instance.NumberOfFrames; i++) {
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${instance.Path}?frame=${i}&instanceId=${instance.Id}&visitTaskId=${obj.visitTaskId}&idx=0|0`
imageIds.push(imageId)
}
} else {
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${obj.visitTaskId}&idx=0|0`
imageIds.push(imageId)
}
instance.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${obj.visitTaskId}&idx=0|0`
instanceList.push(instance.Id)
})
seriesList.push({
isDicom: study.IsDicom,
imageIds: imageIds,
instanceList: series.InstanceList,
instanceInfoList: series.InstanceInfoList,
instanceList: instanceList,
seriesId: series.Id,
imageIdIndex: 0,
seriesUid: series.SeriesInstanceUid,
@ -720,14 +735,13 @@ const actions = {
})
},
getStudyInfo({ state }, obj) {
console.log('getStudyInfo')
return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
if (state.visitTaskList[index].studyListInit) {
resolve()
} else {
var studyList = []
// getVisitStudyList
// getReadingVisitStudyList
getReadingVisitStudyList(obj.trialId, obj.subjectVisitId, obj.visitTaskId).then(res => {
res.Result.forEach((study, studyIndex) => {
const data = {}
@ -743,19 +757,34 @@ const actions = {
var seriesList = []
study.SeriesList.forEach((series, seriesIndex) => {
const imageIds = []
try {
// if (~window.location.href.indexOf('3c210000-3e2c-0016-4247-08dabf28e96b')) {
series.InstancePathList.forEach((path) => {
// var path = id.split('/')[id.split('/').length - 1]
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${path}`)
})
} catch (e) {
console.log(e)
}
const instanceList = []
// try {
// series.InstancePathList.forEach((path) => {
// imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${path}`)
// })
// } catch (e) {
// console.log(e)
// }
series.InstanceInfoList.forEach(instance => {
if (instance.NumberOfFrames && instance.NumberOfFrames > 1) {
for (let i = 0; i < instance.NumberOfFrames; i++) {
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${instance.Path}?frame=${i}&instanceId=${instance.Id}&visitTaskId=${obj.visitTaskId}&idx=${studyIndex}|${seriesIndex}`
imageIds.push(imageId)
}
instance.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${instance.Path}?frame=${0}&instanceId=${instance.Id}&visitTaskId=${obj.visitTaskId}&idx=${studyIndex}|${seriesIndex}`
} else {
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${obj.visitTaskId}&idx=${studyIndex}|${seriesIndex}`
imageIds.push(imageId)
instance.ImageId = imageId
}
instanceList.push(instance.Id)
})
seriesList.push({
isDicom: study.IsDicom,
imageIds: imageIds,
instanceList: series.InstanceList,
instanceInfoList: series.InstanceInfoList,
instanceList: instanceList,
seriesId: series.Id,
imageIdIndex: 0,
seriesUid: series.SeriesInstanceUid,
@ -782,7 +811,8 @@ const actions = {
isLoading: false,
isBeMark: series.IsBeMark,
ww: series.WindowWidth,
wc: series.WindowCenter
wc: series.WindowCenter,
isExistMutiFrames: series.IsExistMutiFrames
})
})
data.SeriesList = seriesList
@ -861,7 +891,12 @@ const actions = {
},
setLastCanvasTaskId({ state }, taskId) {
return new Promise(resolve => {
state.lastCanvasTaskId = taskId
var isReadingTaskViewInOrder = localStorage.getItem('isReadingTaskViewInOrder')
if (parseInt(isReadingTaskViewInOrder) === 2) {
if (!state.lastCanvasTaskId) state.lastCanvasTaskId = taskId
} else {
state.lastCanvasTaskId = taskId
}
resolve()
})
},

View File

@ -1,5 +1,5 @@
import { getToken, setToken, removeToken, setName, removeName } from '@/utils/auth'
import { login,loginOut,getUserMenuTree, getUserPermissions } from '@/api/user'
import { login, loginOut, getUserMenuTree, getUserPermissions } from '@/api/user'
import { resetRouter } from '@/router'
import md5 from 'js-md5'
@ -83,20 +83,27 @@ const actions = {
},
// user login
login({ commit }, userInfo) {
const { username, password } = userInfo
const { username, password, UserId } = userInfo
return new Promise((resolve, reject) => {
login({ UserName: username.trim(), Password: md5(password) }).then(async response => {
let data = {
UserName: username.trim(), Password: md5(password)
}
if (UserId) {
data.UserId = UserId;
}
login(data).then(async response => {
if (response.IsSuccess) {
zzSessionStorage.removeItem('lastWorkbench')
zzSessionStorage.setItem('my_username', username.trim())
zzSessionStorage.setItem('my_password', md5(password))
zzSessionStorage.setItem('my_EMail', response.Result.BasicInfo.EMail)
const data = response.Result
if (data.BasicInfo.IsFirstAdd) {
if (data.BasicInfo.IsFirstAdd || data.BasicInfo.LoginState === 1) {
try {
zzSessionStorage.setItem('userId', data.BasicInfo.Id)
commit('SET_TOKEN', data.JWTStr)
setToken(data.JWTStr)
resolve(false)
resolve(response.Result)
} catch (e) {
console.log(e)
}
@ -107,6 +114,7 @@ const actions = {
zzSessionStorage.setItem('userName', data.BasicInfo.UserName)
commit('SET_TOKEN', data.JWTStr)
commit('SET_NAME', data.BasicInfo.RealName)
zzSessionStorage.setItem('realName', data.BasicInfo.RealName)
zzSessionStorage.setItem('isTestUser', data.BasicInfo.IsTestUser)
commit('SET_ISTESTUSER', data.BasicInfo.IsTestUser)
commit('SET_USERNAME', data.BasicInfo.UserName)
@ -161,13 +169,13 @@ const actions = {
commit('SET_PERMISSIONS', JSON.parse(zzSessionStorage.getItem('permissions')))
commit('SET_ISTESTUSER', zzSessionStorage.getItem('isTestUser'))
const user = JSON.parse(userString)
commit('SET_NAME', user.realName)
commit('SET_NAME', zzSessionStorage.getItem('realName'))
commit('SET_USERID', user.id)
commit('SET_USERNAME', zzSessionStorage.getItem('userName'))
commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignSystemDocCount')))
commit('SET_NEED_SIGN_TRIALS_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignTrialDocCount')))
console.log( zzSessionStorage.getItem('TotalNeedSignSystemDocCount'))
console.log( zzSessionStorage.getItem('TotalNeedSignTrialDocCount'))
console.log(zzSessionStorage.getItem('TotalNeedSignSystemDocCount'))
console.log(zzSessionStorage.getItem('TotalNeedSignTrialDocCount'))
zzSessionStorage.setItem('userName', user.name)
zzSessionStorage.setItem('userId', user.id)
zzSessionStorage.setItem('userTypeShortName', user.userTypeShortName)
@ -179,14 +187,16 @@ const actions = {
},
// user logout
async logout({ commit, state }) {
try{
await loginOut()
try {
removeToken() // must remove token first
await loginOut({
Userd: zzSessionStorage.getItem('userId')
})
resetRouter()
removeName()
zzSessionStorage.clear()
commit('RESET_STATE')
}catch(e){
} catch (e) {
console.log(e)
}
},

View File

@ -1,6 +1,6 @@
import dicomParser from "dicom-parser";
import dcmjs from './dcmjs'
import {encoder} from "./encoder";
import { encoder } from "./encoder";
export const anonymization = function (file, config) {
return new Promise(async (resolve, reject) => {
@ -32,7 +32,7 @@ export const anonymization = function (file, config) {
if (AnonymizeNotFixed.Group + AnonymizeNotFixed.Element === '00100020') {
console.log(`${DicomStoreInfo.TrialCode}_${DicomStoreInfo.SubjectCode}`)
if (dataset.dict[AnonymizeNotFixed.Group + AnonymizeNotFixed.Element]) {
dataset.dict[AnonymizeNotFixed.Group + AnonymizeNotFixed.Element].Value[0] = `${DicomStoreInfo.TrialCode}-${DicomStoreInfo.SubjectCode}`
dataset.dict[AnonymizeNotFixed.Group + AnonymizeNotFixed.Element].Value[0] = `${DicomStoreInfo.TrialCode}-${DicomStoreInfo.SubjectCode}`
} else {
dataset.dict[AnonymizeNotFixed.Group + AnonymizeNotFixed.Element] = {
vr: AnonymizeNotFixed.ValueRepresentation,
@ -55,10 +55,15 @@ export const anonymization = function (file, config) {
}
}
// console.log(dataset)
let newDicomFile = dataset.write()
const bufferArray = new Uint8Array(newDicomFile)
const blob = new Blob([bufferArray], { type: 'application/octet-stream' })
resolve({blob, pixelDataElement})
try {
let newDicomFile = dataset.write()
const bufferArray = new Uint8Array(newDicomFile)
const blob = new Blob([bufferArray], { type: 'application/octet-stream' })
resolve({ blob, pixelDataElement })
} catch (err) {
console.log(err)
resolve(false);
}
};
reader.readAsArrayBuffer(file);
} catch (e) {

View File

@ -1,12 +1,13 @@
import Vue from 'vue'
import { encoder } from './encoder'
import { anonymization } from './anonymization'
export const dcmUpload = async function(name, file, config){
export const dcmUpload = async function (name, file, config) {
return new Promise(async resolve => {
try {
// let blob = await encoder(file, config)
// let blob = await fileToBlob(file)
let blob = await anonymization(file, config)
let blob = await fileToBlob(file)
if (config) {
blob = await anonymization(file, config)
}
let res = await Vue.prototype.OSSclient.put(name, blob.blob)
resolve({
...res,
@ -35,7 +36,7 @@ function fileToBlob(file) {
} else {
blob = e.target.result
}
resolve(blob)
resolve({ blob })
})
// FileReader 以 ArrayBuffer 格式 读取 File 对象中数据
reader.readAsArrayBuffer(file)

View File

@ -8359,6 +8359,7 @@
allowInvalidVRLength: false
};
var allowInvalidVRLength = writeOptions.allowInvalidVRLength;
allowInvalidVRLength = true
var valid = true,
valarr = Array.isArray(value) ? value : [value],
total = 0;

View File

@ -20,6 +20,7 @@ function blobToBuffer(blob, fileName) {
async function ossGenerateSTS() {
let res = await GetObjectStoreToken()
Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] }
Vue.prototype.OSSclientConfig.ObjectStoreUse = res.Result.ObjectStoreUse;
Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint
switch (res.Result.ObjectStoreUse) {
case 'AliyunOSS':
@ -40,7 +41,7 @@ async function ossGenerateSTS() {
if (res && res.url) {
resolve({
name: objectName,
url: Vue.prototype.OSSclientConfig.viewEndpoint + objectName
url: res.url
})
} else {
reject()
@ -70,14 +71,14 @@ async function ossGenerateSTS() {
reader.onload = (ex) => {
const bufferStream = new stream.PassThrough()
bufferStream.end(Buffer.from(ex.target.result))
minioClient.putObject(Vue.prototype.OSSclientConfig.bucketName, objectName, bufferStream, function(err,etag) {
minioClient.putObject(Vue.prototype.OSSclientConfig.bucketName, objectName, bufferStream, function (err, etag) {
if (err) {
console.log(err)
reject()
} else {
resolve({
name: objectName,
url: 'http://www.abc.com' + objectName
url: Vue.prototype.OSSclientConfig.viewEndpoint + decodeUtf8(objectName)
})
}
})
@ -107,14 +108,15 @@ async function ossGenerateSTS() {
reader.onload = (ex) => {
const bufferStream = new stream.PassThrough()
bufferStream.end(Buffer.from(ex.target.result))
aws.putObject(Vue.prototype.OSSclientConfig.bucketName, objectName, bufferStream, function(err,etag) {
aws.putObject(Vue.prototype.OSSclientConfig.bucketName, objectName, bufferStream, function (err, etag) {
if (err) {
console.log(err)
reject()
} else {
console.log(objectName);
resolve({
name: objectName,
url: 'http://www.abc.com' + objectName
url: Vue.prototype.OSSclientConfig.viewEndpoint + decodeUtf8(objectName)
})
}
})
@ -129,7 +131,15 @@ async function ossGenerateSTS() {
}
return
}
function decodeUtf8(bytes) {
let str = bytes.split('?');
let str2 = str[0].split('/');
let name = str2[str2.length - 1];
name = encodeURIComponent(name);
str.shift();
str2.pop();
return str2.join("/") + '/' + name;
}
export const OSSclient = ossGenerateSTS

202
src/utils/parseDicom.js Normal file
View File

@ -0,0 +1,202 @@
import * as dicomParser from "dicom-parser";
import * as cornerstone from "cornerstone-core";
import * as cornerstoneWADOImageLoader from "cornerstone-wado-image-loader";
cornerstoneWADOImageLoader.external.dicomParser = dicomParser;
cornerstoneWADOImageLoader.external.cornerstone = cornerstone;
import { convertBytes } from "@/utils/dicom-character-set";
import Vue from 'vue';
import { dcmUpload } from "@/utils/dcmUpload/dcmUpload";
let dicom = {
PatientName: "x00100010", // 患者姓名
PatientId: "x00100020", // 患者ID
PatientBirthDate: "x00100030", // 患者出生日期
PatientBirthTime: "x00100032", // 患者出生时间
PatientSex: "x00100040", // 患者性别
PatientWeight: "x00101030", // 患者体重
PregnancyStatus: "x001021c0", // 怀孕状态
PatientAge: "x00101010", // 患者年龄(做检查时刻的患者年龄,而不是此刻患者的真实年龄)
AcquisitionTime: "x00080032",
AcquisitionNumber: "x00200012",
TriggerTime: "x00181060",
AccessionNumber: "x00080050", // 检查号
StudyId: "x00200010", // 检查ID
StudyInstanceUid: "x0020000d", // 检查实例号
StudyDate: "x00080020", // 检查日期
StudyTime: "x00080030", // 检查时间
Modalities: "x00080061", // 一个检查中含有的不同检查类型
BodyPartExamined: "x00080015", // 检查的部位
StudyDescription: "x00081030", // 检查的描述
InstitutionName: "x00080080",
SeriesNumber: "x00200011", // 序列号
SeriesInstanceUid: "x0020000e", // 序列实例号
Modality: "x00080060", // 检查模态
SeriesDescription: "x0008103e", // 检查描述和说明
SeriesDate: "x00080021", // 检查日期
SeriesTime: "x00080031", // 检查时间
SequenceName: "x00180024",
ProtocolName: "x00181030",
ImagePosition: "x00200032", // 图像位置
ImageOrientation: "x00200037", // 图像方位
ImagePixelSpacing: "x00181164",
SliceThickness: "x00180050", // 层厚
SpacingBetweenSlices: "x00180088", // 层间距
SliceLocation: "x00201041", // 相对位置
MRAcquisition: "x00180023",
seriesBodyPartExamined: "x00180015", // 身体部位
ImageType: "x00080008",
SopInstanceUid: "x00080018", // SOP实例UID
ContentDate: "x00080023", // 影像拍摄日期
ContentTime: "x00080033", // 影像拍摄时间
ImageOrInstanceNumber: "x00200013", // 图像码
SamplesPerPixel: "x00280002", // 图像采样率
PhotometricInterpretation: "x00280004", // 光度计对于CT图像用两个枚举值MONOCHROME1MONOCHROME2 用来判断图像是否是彩色的MONOCHROME 1/2是灰度图RGB则是真彩色图
Rows: "x00280010", // 行数
Columns: "x00280011", // 列数
NumberOfFrames: "x00280008",
PixelSpacing: "x00280030", // 像素间距
BitsAllocated: "x00280100", // 分配的位数
BitsStored: "x00280101", // 存储的位数
HighBit: "x00280102", // 高位
PixelRepresentation: "x00280103", // 像素数据的表现类型一个枚举值分别为十六进制数0000和0001.0000H = 无符号整型0001H = 2的补码
WindowCenter: "x00281050", // 窗位
WindowWidth: "x002811051", // 窗宽
RescaleIntercept: "x00281052", // 截距
RescaleSlope: "x00281053", // 斜率
RescaleType: "x00281054", // 输出值的单位
ParsingFormat: "x00080005",
FrameOfReferenceUID: "x00200052",
};
// 需要设置默认值
let defaultKey = ['Rows', 'Columns', 'SliceLocation', 'NumberOfFrames'];
let uintKey = ['Rows', 'Columns'];
let intStringKey = ['SliceLocation', 'NumberOfFrames'];
// 需要格式解析
let pormatParseKey = ['PatientName', 'SeriesDescription', 'StudyDescription'];
// 解析dicom文件
export const parseDicom = (file, name = false) => {
return new Promise(function (resolve) {
let reader = new FileReader();
reader.onload = function (e) {
try {
let data = dicomParser.parseDicom(new Uint8Array(e.target.result));
let res = {};
if (name && Array.isArray(name)) {
name.forEach((item) => {
if (dicom[item]) {
res[item] = data.string(dicom[item]) || '';
}
});
} else if (name) {
if (dicom[name]) {
res[name] = data.string(dicom[name]) || '';
} else {
console.log("name is inexistence");
resolve(false)
}
} else {
Object.keys(dicom).forEach((key) => {
res[key] = data.string(dicom[key]) || '';
});
}
pormatParseKey.forEach(key => {
if (res[key]) {
const Element = data.elements[dicom[key]];
const Bytes = new Uint8Array(
data.byteArray.buffer,
Element ? Element.dataOffset : 0,
Element ? Element.length : 0
);
res[key] = convertBytes(
res.ParsingFormat,
Bytes
);
}
})
uintKey.forEach(key => {
res[key] = data.uint16(dicom[key])
})
intStringKey.forEach(key => {
res[key] = data.intString(dicom[key])
})
defaultKey.forEach(key => {
if (!res[key] && res.hasOwnProperty(key)) {
res[key] = 0;
}
})
resolve(res);
} catch (error) {
console.log(error)
resolve(false);
}
};
reader.onerror = function (e) {
console.log(e)
resolve(false);
};
reader.readAsArrayBuffer(file);
});
};
// 影像上传
// 影像上传
export const dicomToOSS = async (file, path) => {
try {
let res = await dcmUpload(path, file);
if (!res || !res.url) return false;
return Vue.prototype.$getObjectName(res.url);
} catch (err) {
console.log(err);
return false;
}
};
// 获取缩略图
export const getThumbnail = async (file, ossPath, dicomInfo) => {
try {
if (dicomInfo.modality !== "SR") {
let fileId = cornerstoneWADOImageLoader.wadouri.fileManager.add(file);
let blob = await dicomToPng(
fileId,
dicomInfo.Columns,
dicomInfo.Rows
);
if (!blob) return "";
let OSSclient = Vue.prototype.OSSclient;
let seriesRes = await OSSclient.put(ossPath, blob);
if (seriesRes && seriesRes.url) {
return Vue.prototype.$getObjectName(seriesRes.url);
} else {
return "";
}
} else {
return "";
}
} catch (err) {
console.log(err);
return "";
}
};
const canvasToBlob = (canvas) => {
return new Promise((resolve) => {
canvas.toBlob((blob) => {
resolve(blob);
});
});
};
const dicomToPng = (imageId, width, height) => {
return new Promise((resolve) => {
cornerstone.loadImage(imageId).then(async (image) => {
let canvas = document.createElement("canvas");
canvas.width = width;
canvas.height = height;
if (image) {
cornerstone.renderToCanvas(canvas, image);
// 将 Canvas 图像对象转换为 PNG 格式
let blob = await canvasToBlob(canvas);
resolve(blob);
} else {
resolve(false);
}
});
}).catch((reason) => {
reason();
});
};

View File

@ -20,7 +20,7 @@ service.interceptors.request.use(
path = router && router.app && router.app._route && router.app._route.path
config.headers['Content-Type'] = 'application/json;charset=UTF-8'
var language = zzSessionStorage.getItem('lang')
config.headers['Accept-Language'] = language === 'en'?'en-US,en;q=0.5':'zh-CN,zh;q=0.9'
config.headers['Accept-Language'] = language === 'en' ? 'en-US,en;q=0.5' : 'zh-CN,zh;q=0.9'
config.headers['TimeZoneId'] = moment.tz.guess()
if (store.getters.token) {
config.headers.Authorization = `Bearer ${store.getters.token}`
@ -33,7 +33,7 @@ service.interceptors.request.use(
if (store.state.user.userId !== zzSessionStorage.getItem('userId')) {
window.location.href = `/login`
zzSessionStorage.removeItem('lastWorkbench')
Alert(store.state.lang.language === 'en'? 'The same browser only allows one user account to be logged in at a time.' : '同一浏览器只允许同时登陆一个账户', {
Alert(store.state.lang.language === 'en' ? 'The same browser only allows one user account to be logged in at a time.' : '同一浏览器只允许同时登陆一个账户', {
type: 'warning',
})
}
@ -49,21 +49,21 @@ service.interceptors.request.use(
}
)
var isConfirm = true
let timer = null;
let time = 1000;
service.interceptors.response.use(
response => {
const res = response.data
if (res.IsSuccess) {
isConfirm = true
return Promise.resolve(res)
} else if (res.IsSuccess === false) {
if (res.Code !== 5) {
MessageBox.confirm(res.ErrorMessage, {
MessageBox.confirm(res.ErrorMessage, {
type: 'warning',
showCancelButton: false,
callback: action => {
if(res.Code === 6) {
if (res.Code === 6) {
window.close()
}
}
@ -87,29 +87,29 @@ service.interceptors.response.use(
})
}
switch (status) {
case 400: message = store.state.lang.language === 'en'? 'Request error' : '请求错误'; break
case 401: message = store.state.lang.language === 'en'? 'Not authorized or login timed out. Please log in again.' : '未授权或登陆超时,请重新登录'; break
case 400: message = store.state.lang.language === 'en' ? 'Request error' : '请求错误'; break
case 401: message = store.state.lang.language === 'en' ? 'Not authorized or login timed out. Please log in again.' : '未授权或登陆超时,请重新登录'; break
case 403: message = error.response.data.ErrorMessage; break
case 404: message = store.state.lang.language === 'en'? 'Request address error' : `请求地址出错`; break
case 405: message = store.state.lang.language === 'en'? 'Interface parameter error or request method inconsistency' : `接口参数传递错误,或者请求方法不一致`; break
case 408: message = store.state.lang.language === 'en'? 'Request timed out' : '请求超时'; break
case 429: message = store.state.lang.language === 'en'? 'The application service limits the traffic. Your requests are too frequent. Please try again later.' : '应用服务限流,您的请求过于频繁,请稍后再试'; break
case 500: message = store.state.lang.language === 'en'? 'Internal server error, and unable to complete the request. Software release might be in process. Please contact the administrator.' : '服务器内部错误,无法完成请求;可能正在发布中,请联系管理员处理'; break
case 501: message = store.state.lang.language === 'en'? 'Service has not been implemented.' : '服务未实现'; break
case 502: message = store.state.lang.language === 'en'? 'System is being upgraded. Please wait patiently.' : '系统正在升级,请耐心等待。'; break
case 503: message = store.state.lang.language === 'en'? 'Service is not available' : '服务不可用'; break
case 504: message = store.state.lang.language === 'en'? 'Gateway timed out' : '网关超时'; break
case 505: message = store.state.lang.language === 'en'? 'HTTP version is not supported' : 'HTTP版本不受支持'; break
case 404: message = store.state.lang.language === 'en' ? 'Request address error' : `请求地址出错`; break
case 405: message = store.state.lang.language === 'en' ? 'Interface parameter error or request method inconsistency' : `接口参数传递错误,或者请求方法不一致`; break
case 408: message = store.state.lang.language === 'en' ? 'Request timed out' : '请求超时'; break
case 429: message = store.state.lang.language === 'en' ? 'The application service limits the traffic. Your requests are too frequent. Please try again later.' : '应用服务限流,您的请求过于频繁,请稍后再试'; break
case 500: message = store.state.lang.language === 'en' ? 'Internal server error, and unable to complete the request. Software release might be in process. Please contact the administrator.' : '服务器内部错误,无法完成请求;可能正在发布中,请联系管理员处理'; break
case 501: message = store.state.lang.language === 'en' ? 'Service has not been implemented.' : '服务未实现'; break
case 502: message = store.state.lang.language === 'en' ? 'System is being upgraded. Please wait patiently.' : '系统正在升级,请耐心等待。'; break
case 503: message = store.state.lang.language === 'en' ? 'Service is not available' : '服务不可用'; break
case 504: message = store.state.lang.language === 'en' ? 'Gateway timed out' : '网关超时'; break
case 505: message = store.state.lang.language === 'en' ? 'HTTP version is not supported' : 'HTTP版本不受支持'; break
default: break
}
if (error.response.status === 401) {
if (store.getters.token) {
if(message !== ''){
Message({
if (message !== '') {
setTimer({
message: message,
type: 'warning',
showClose: true
})
}, 'message')
}
store.dispatch('user/logout').then(() => {
router.push(`/login`)
@ -118,34 +118,52 @@ service.interceptors.response.use(
this.$updateDictionary()
})
} else {
Message({
message: store.state.lang.language === 'en'? 'You are not authorized to access the interface' : '您无权访问接口',
setTimer({
message: store.state.lang.language === 'en' ? 'You are not authorized to access the interface' : '您无权访问接口',
type: 'warning',
showClose: true
})
}, 'message')
}
} else {
if(message !== '' && isConfirm){
MessageBox.confirm(message, store.state.lang.language === 'en'? 'Warning' : '警告', {
if (message !== '') {
setTimer([message, store.state.lang.language === 'en' ? 'Warning' : '警告', {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
callback: action => { }
}], 'confirm')
}
}
}
if (!window.navigator.onLine && isConfirm) {
MessageBox.confirm(store.state.lang.language === 'en'? 'Please check your networkand try again later' : '请检查网络,稍后重试!', store.state.lang.language === 'en'? 'Warning' : '警告', {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
isConfirm = false
if (!window.navigator.onLine) {
setTimer(
[store.state.lang.language === 'en' ? 'Please check your networkand try again later' : '请检查网络,稍后重试!', store.state.lang.language === 'en' ? 'Warning' : '警告', {
type: 'warning',
showCancelButton: false,
callback: action => { }
}], "confirm"
)
}
return Promise.reject(new Error(message || 'Error'))
}
)
const setTimer = (obj, type) => {
if (timer) {
clearTimeout(timer);
timer = null;
}
timer = setTimeout(() => {
if (type === 'message') {
Message(obj)
}
if (type === 'confirm') {
MessageBox.confirm(...obj)
}
clearTimeout(timer);
timer = null;
}, time)
}

144
src/utils/uploadZip.js Normal file
View File

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

View File

@ -43,28 +43,63 @@
fit="fill"
>
<div class="viewernavitextwrapper">
<div v-if="item.keySeries" style="padding: 1px;color:red">
Key Images
</div>
<div v-else style="padding: 1px;">
#{{ item.seriesNumber }}
<div style="padding: 1px 5px 1px 1px;display: flex;justify-content: space-between;">
<div v-if="item.keySeries" style="color:red">
Key Images
</div>
<div v-else>
#{{ item.seriesNumber }}
</div>
<div v-if="item.isExistMutiFrames && item.instanceCount > 1">
<el-popover
placement="right"
trigger="hover"
popper-class="instance_frame_wrapper"
>
<div
v-for="(instance, idx) in item.instanceInfoList"
:key="instance.Id"
class="frame_content"
:style="{'margin-bottom':idx<item.instanceInfoList.length-1? '5px':'0px'}"
@click="showMultiFrames(item, index, instance)"
>
<!-- <div>
<img
class="image-preview"
:src="series.previewImageUrl"
crossorigin="anonymous"
alt=""
style="width: 40px;height:40px;"
fit="fill"
>
</div> -->
<div>
<div>{{ instance.InstanceNumber }}</div>
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
</div>
</div>
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" />
</el-popover>
</div>
</div>
<div v-show="item.instanceCount" style="padding: 1px;">
{{ item.modality }}: {{ item.instanceCount }} image
</div>
<div v-show="!item.keySeries && item.sliceThickness" style="padding: 1px;">
T: {{ item.sliceThickness }}
T: {{ parseFloat(item.sliceThickness).toFixed(2) }}
</div>
<div v-show="!item.keySeries &&item.description" style="width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;padding: 1x;">
{{ item.description }}
</div>
<div v-if="!item.keySeries" style="padding: 1px;">
{{ item.prefetchInstanceCount }}/{{ item.instanceCount }}
{{ item.imageloadedArr.length }}/{{ item.instanceCount }}
</div>
</div>
</div>
<div v-if="showDelete" @click.stop="" style="display: flex;flex-direction: row;justify-content: space-between;">
<div v-if="showDelete" style="display: flex;flex-direction: row;justify-content: space-between;" @click.stop="">
<div>
<span style="font-size: 12px;margin-right: 5px">{{ $t('trials:audit:table:isReading') }}</span>
@ -83,8 +118,8 @@
/>
</div>
</div>
<div v-if="item.prefetchInstanceCount>0 && item.prefetchInstanceCount<item.instanceCount">
<el-progress :percentage="parseInt(((item.prefetchInstanceCount/item.instanceCount)*100).toFixed(2))" />
<div v-if="item.prefetchInstanceCount>0 && item.prefetchInstanceCount<item.instanceCount * 100">
<el-progress :percentage="parseInt((item.prefetchInstanceCount/item.instanceCount).toFixed(2))" />
</div>
</div>
@ -156,10 +191,12 @@ export default {
showDelete: false,
loading: false,
imageList: [],
showSeriesList: []
showSeriesList: [],
currentLoadIns: []
}
},
created: function() {
requestPoolManager.resetRequestPool()
this.type = this.$router.currentRoute.query.type ? this.$router.currentRoute.query.type : ''
this.visitNum = this.$router.currentRoute.query.visitNum ? parseInt(this.$router.currentRoute.query.visitNum) : 0
@ -180,9 +217,18 @@ export default {
} else if (this.type === 'Share') {
this.loadStudy()
}
cornerstone.events.addEventListener('cornerstoneimageloadprogress', this.cornerstoneimageloadprogress)
window.addEventListener('beforeunload', e => {
cornerstone.imageCache.purgeCache()
requestPoolManager.resetRequestPool()
})
},
beforeDestroy() {
requestPoolManager.stopTaskTimer()
window.removeEventListener('beforeunload', e => {
cornerstone.imageCache.purgeCache()
requestPoolManager.resetRequestPool()
})
},
methods: {
loadStudy() {
@ -204,16 +250,16 @@ export default {
if (data.IsSuccess) {
const { Result } = data
var seriesList = []
Result.forEach(function(item) {
Result.forEach((item, index) => {
const imageIds = []
// item.InstanceList.forEach(function(id) {
// imageIds.push(`wadouri:/api/instance/content/${id}`)
// })
// item.InstanceList.forEach((id) => {
// imageIds.push(`wadouri:http://123.56.94.154:7000/instance/content/${id}`)
// })
item.InstancePathList.forEach((path) => {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${path}`)
item.InstanceInfoList.forEach(i => {
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
for (let j = 0; j < i.NumberOfFrames; j++) {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&seriesIndex=${index}`)
}
} else {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&seriesIndex=${index}`)
}
})
var subjectVisitId = scope.$router.currentRoute.query.subjectVisitId
var studyId = scope.$router.currentRoute.query.studyId
@ -223,6 +269,7 @@ export default {
subjectVisitId,
studyId,
imageIds: imageIds,
instanceInfoList: item.InstanceInfoList,
seriesId: item.Id,
seriesUid: item.SeriesInstanceUid,
seriesNumber: item.SeriesNumber,
@ -238,7 +285,8 @@ export default {
keySeries: item.KeySeries,
tpCode: scope.tpCode,
loadStatus: false,
imageloadedArr: []
imageloadedArr: [],
isExistMutiFrames: item.IsExistMutiFrames
})
})
scope.seriesList = seriesList
@ -264,26 +312,30 @@ export default {
getInstanceList(seriesId).then(res => {
if (!res.Result || (res.Result && res.Result.length === 0)) return
var seriesInstanceUid = res.Result[0].SeriesInstanceUid
// var sliceLocation = res.Result[0].SliceLocation
var sliceThickness = res.Result[0].SliceThickness
var isReading = res.Result[0].IsReading
var isDeleted = res.Result[0].IsDeleted
var seriesList = []
var imageIds = []
let isExistMutiFrames = false
const instanceInfoList = []
res.Result.forEach(instance => {
if (instance.NumberOfFrames > 1) {
for (let i = 0; i < instance.NumberOfFrames; i++) {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=${i}`)
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=${i}&instanceId=${instance.Id}&seriesIndex=0`)
}
isExistMutiFrames = true
} else {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}`)
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&seriesIndex=0`)
}
instanceInfoList.push({ Id: instance.Id, InstanceNumber: instance.InstanceNumber, NumberOfFrames: instance.NumberOfFrames, Path: instance.Path })
})
seriesList.push({
trialId,
subjectVisitId,
studyId,
imageIds: imageIds,
instanceInfoList,
seriesId: seriesId,
seriesUid: seriesInstanceUid,
seriesNumber: seriesNumber,
@ -296,7 +348,8 @@ export default {
instanceCount: res.Result.length,
prefetchInstanceCount: 0,
loadStatus: false,
imageloadedArr: []
imageloadedArr: [],
isExistMutiFrames: isExistMutiFrames
})
this.seriesList = seriesList
if (this.seriesList.length > 0) {
@ -320,21 +373,37 @@ export default {
this.$refs.dicomViewer.loadImageStack(this.seriesList[seriesIndex])
if (!series.loadStatus) {
requestPoolManager.changePriority(series.seriesId)
// var isAddToTakPool = false
// if (this.showSeriesList.includes(`${seriesIndex}`)) {
// isAddToTakPool = true
// } else {
// this.showSeriesList.push(`${seriesIndex}`)
// }
// if (!isAddToTakPool) {
// var priority = parseInt(new Date().getTime())
// series.isLoading = true
// series.imageIds.map((imageId) => {
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
// })
// } else {
// requestPoolManager.changePriority(series.seriesId)
// }
}
},
showMultiFrames(series, seriesIndex, instanceInfo) {
this.currentSeriesIndex = seriesIndex
const imageIds = []
if (instanceInfo.NumberOfFrames && instanceInfo.NumberOfFrames > 1) {
for (let j = 0; j < instanceInfo.NumberOfFrames; j++) {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instanceInfo.Path}?frame=${j}&instanceId=${instanceInfo.Id}&seriesIndex=${seriesIndex}`)
}
} else {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instanceInfo.Path}?instanceId=${instanceInfo.Id}&seriesIndex=${seriesIndex}`)
}
const seriesInfo = {
trialId: series.trialId,
subjectVisitId: series.subjectVisitId,
studyId: series.studyId,
imageIds: imageIds,
seriesId: series.seriesId,
seriesUid: series.seriesUid,
seriesNumber: series.seriesNumber,
sliceThickness: series.sliceThickness,
modality: series.modality,
description: series.description,
isReading: series.isReading,
isDeleted: series.isDeleted,
previewImageUrl: series.previewImageUrl,
instanceCount: series.instanceCount
}
this.$refs.dicomViewer.loadImageStack(seriesInfo)
if (!series.loadStatus) {
requestPoolManager.changePriority(series.seriesId)
}
},
initStudy() {
@ -457,31 +526,44 @@ export default {
}).catch(() => {})
},
loadAllImages() {
const seriesIndex = this.seriesList.findIndex(i => i.loadStatus === false)
if (seriesIndex === -1) return
const series = this.seriesList[seriesIndex]
var priority = new Date().getTime()
this.seriesList.forEach((series, index) => {
series.imageIds.forEach(imageId => {
var p = null
if (this.firstInstanceId === imageId) {
p = priority * 100
} else {
p = priority - 1
for (let i = 0; i < series.imageIds.length; i++) {
const imageId = series.imageIds[i]
if (series.isExistMutiFrames) {
const params = this.getInstanceInfo(imageId)
if (params.frame && params.frame > 0) {
continue
}
// this.load(imageId, series.seriesId, priority)
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, seriesIndex: index, priority: p })
})
})
}
var p = null
if (this.firstInstanceId === imageId) {
p = priority * 100
} else {
p = priority - 1
}
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, seriesIndex: seriesIndex, priority: p })
}
if (this.imageList.length > 0) {
this.loopLoad()
}
},
getInstanceInfo(imageId) {
const params = {}
const searchParams = new URLSearchParams(imageId.split('?')[1])
for (const [key, value] of searchParams.entries()) {
params[key] = value
}
return params
},
loopLoad() {
if (this.imageList.length > 0) {
requestPoolManager.startTaskTimer()
console.log('loopLoad')
this.imageList.map(image => {
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority).then(res => {
this.imageLoaded(image, res.data.string('x0020000e'))
})
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority)
})
requestPoolManager.sortTaskPool()
this.imageList = []
@ -564,6 +646,45 @@ export default {
return 0
},
cornerstoneimageloadprogress(e) {
const imageId = e.detail.imageId
const percentComplete = e.detail.percentComplete
const params = {}
const searchParams = new URLSearchParams(imageId.split('?')[1])
for (const [key, value] of searchParams.entries()) {
params[key] = value
}
if (this.visitTaskId === params.visitTaskId) {
const seriesIndex = params.seriesIndex
var prefetchInstanceCount = this.seriesList[seriesIndex].prefetchInstanceCount
var instanceCount = this.seriesList[seriesIndex].instanceCount
if (this.seriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
const i = this.currentLoadIns.findIndex(i => i.imageId === imageId)
if (i > -1) {
prefetchInstanceCount = prefetchInstanceCount - this.currentLoadIns[i].percentComplete + percentComplete
this.currentLoadIns[i].percentComplete = percentComplete
if (percentComplete === 100) {
this.currentLoadIns.splice(i, 1)
}
} else {
if (percentComplete !== 100) {
this.currentLoadIns.push({ imageId, percentComplete })
}
prefetchInstanceCount = prefetchInstanceCount + percentComplete
}
this.seriesList[seriesIndex].prefetchInstanceCount = prefetchInstanceCount
if (percentComplete >= 100) {
this.seriesList[seriesIndex].imageloadedArr.push(imageId)
}
}
if (prefetchInstanceCount >= instanceCount * 100) {
this.seriesList[seriesIndex].prefetchInstanceCount = instanceCount * 100
//
this.seriesList[seriesIndex].loadStatus = true
this.loadAllImages()
}
}
},
cornerstoneImageLoaded(e) {
if (this.firstInstanceId === e.detail.image.imageId && !this.isStartLoad) {
//
@ -757,6 +878,29 @@ export default {
color: #D0D0D0;
font-size: 13px;
}
.instance_frame_wrapper{
min-width: 120px;
background-color: #2c2c2c;
border: 1px solid #2c2c2c;
padding: 5px;
}
.frame_content{
height: 50px;
padding: 5px;
display: flex;
justify-content: flex-start;
color: #ddd;
font-size: 12px;
border: 1px solid #404040;
}
.frame_content:hover {
/* font-weight: bold; */
/* box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); */
cursor: pointer;
/* color: #428bca; */
border-color: #213a54 !important;
background-color: #213a54;
}
/* .viewerRightSidePanel {
width: 300px;
height: 100%;

View File

@ -46,13 +46,6 @@
@click="showSeriesImage($event,index,i,series)"
>
<div class="viewernavigatorwrapper">
<!-- <el-image
class="image-preview"
style="height:72px;width:72px;"
:src="series.previewImageUrl"
fit="fill"
/> -->
<img
class="image-preview"
:src="series.previewImageUrl"
@ -62,8 +55,41 @@
fit="fill"
>
<div class="viewernavitextwrapper">
<div style="padding: 1px;">
#{{ series.seriesNumber }}
<div style="padding: 1px 5px 1px 1px;display: flex;justify-content: space-between;">
<div>#{{ series.seriesNumber }}</div>
<div v-if="series.isExistMutiFrames && series.instanceCount > 1">
<el-popover
placement="right"
trigger="hover"
popper-class="instance_frame_wrapper"
>
<div
v-for="(instance, idx) in series.instanceInfoList"
:key="instance.Id"
class="frame_content"
:style="{'margin-bottom':idx<series.instanceInfoList.length-1? '5px':'0px'}"
@click="showMultiFrames(index,series, i, instance)"
>
<!-- <div>
<img
class="image-preview"
:src="series.previewImageUrl"
crossorigin="anonymous"
alt=""
style="width: 40px;height:40px;"
fit="fill"
>
</div> -->
<div>
<div>{{ instance.InstanceNumber }}</div>
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
</div>
</div>
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" />
</el-popover>
</div>
</div>
<div v-show="series.InstanceCount" style="padding: 1px;">
{{ series.modality }}: {{ series.instanceCount }} image
@ -78,12 +104,12 @@
</div>
</el-tooltip>
<div style="padding: 1px;">
{{ series.prefetchInstanceCount }}/{{ series.instanceCount }}
{{ series.imageloadedArr.length }}/{{ series.instanceCount }}
</div>
<div />
</div>
</div>
<div v-if="showDelete" @click.stop="" style="display: flex;flex-direction: row;justify-content: space-between;">
<div v-if="showDelete" style="display: flex;flex-direction: row;justify-content: space-between;" @click.stop="">
<div>
<span style="font-size: 12px;">{{ $t('trials:audit:table:isReading') }}</span>
@ -105,8 +131,8 @@
<!-- <div style="position: absolute;bottom: -10px;left: 0;width: 100%;">
<el-progress v-if="series.prefetchInstanceCount>0 && series.prefetchInstanceCount<series.instanceCount" :percentage="Number(series.prefetchInstanceCount/series.instanceCount)*100" />
</div> -->
<div v-if="series.prefetchInstanceCount>0 && series.prefetchInstanceCount<series.instanceCount">
<el-progress :percentage="parseInt(((series.prefetchInstanceCount/series.instanceCount)*100).toFixed(2))" />
<div v-if="series.prefetchInstanceCount>0 && series.prefetchInstanceCount<series.instanceCount * 100">
<el-progress :percentage="parseInt((series.prefetchInstanceCount/series.instanceCount).toFixed(2))" />
</div>
</div>
@ -120,7 +146,7 @@
<el-tab-pane :label="$t('trials:dicom-show:relatedVisit')" name="relation-study" class="pane-relation-wrapper">
<div class="viewerSidethumbinner">
<el-collapse v-model="relationActiveName" @change="handelRelationActiveChange">
<el-collapse-item v-for="(study) in relationStudyList" :key="`${study.StudyId}`" :name="`${study.StudyId}`">
<el-collapse-item v-for="(study,studyIndex) in relationStudyList" :key="`${study.StudyId}`" :name="`${study.StudyId}`">
<template slot="title">
<div class="text-desc">
@ -163,13 +189,46 @@
>
<div class="viewernavitextwrapper">
<div v-if="seriesItem.keySeries" style="padding: 1px;color:red">
Key Images
<div style="padding: 1px 5px 1px 1px;display: flex;justify-content: space-between;">
<div v-if="seriesItem.keySeries" style="color:red">
Key Images
</div>
<div v-else>#{{ seriesItem.seriesNumber }}</div>
<div v-if="seriesItem.isExistMutiFrames && seriesItem.instanceCount > 1">
<el-popover
placement="right"
trigger="hover"
popper-class="instance_frame_wrapper"
>
<div
v-for="(instance, idx) in seriesItem.instanceInfoList"
:key="instance.Id"
class="frame_content"
:style="{'margin-bottom':idx<seriesItem.instanceInfoList.length-1? '5px':'0px'}"
@click="showMultiFrames(studyIndex,seriesItem, index, instance)"
>
<!-- <div>
<img
class="image-preview"
:src="series.previewImageUrl"
crossorigin="anonymous"
alt=""
style="width: 40px;height:40px;"
fit="fill"
>
</div> -->
<div>
<div>{{ instance.InstanceNumber }}</div>
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
</div>
</div>
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" />
</el-popover>
</div>
</div>
<div v-else style="padding: 1px;">
#{{ seriesItem.seriesNumber }}
</div>
<div v-show=" seriesItem.instanceCount" style="padding: 1px;">
<div v-show="seriesItem.instanceCount" style="padding: 1px;">
{{ seriesItem.modality }}: {{ seriesItem.instanceCount }} image
</div>
<div v-show="seriesItem.sliceThickness" style="padding: 1px;">
@ -180,7 +239,6 @@
{{ seriesItem.description }}
</div>
</el-tooltip>
</div>
<!-- <div style="position: absolute;bottom: -10px;left: 0;width: 100%;">
<el-progress v-if="seriesItem.prefetchInstanceCount>0 && seriesItem.prefetchInstanceCount<seriesItem.instanceCount" :percentage="Number(seriesItem.prefetchInstanceCount/seriesItem.instanceCount)*100" />
@ -237,10 +295,13 @@ export default {
imageList: [],
activeNames: [],
relationActiveName: [],
showSeriesList: []
showSeriesList: [],
currentLoadIns: []
}
},
mounted() {
requestPoolManager.resetRequestPool()
document.documentElement.style.userSelect = 'none'
if (this.$router.currentRoute.query.TokenKey) {
store.dispatch('user/setToken', this.$router.currentRoute.query.TokenKey)
changeURLStatic('TokenKey', '')
@ -253,16 +314,25 @@ export default {
this.showDelete = parseInt(this.$router.currentRoute.query.showDelete)
// cornerstone.events.addEventListener('cornerstoneimageloaded', this.cornerstoneImageLoaded)
this.getStudiesInfo()
cornerstone.events.addEventListener('cornerstoneimageloadprogress', this.cornerstoneimageloadprogress)
window.addEventListener('beforeunload', e => {
cornerstone.imageCache.purgeCache()
requestPoolManager.resetRequestPool()
})
},
beforeDestroy() {
requestPoolManager.stopTaskTimer()
window.removeEventListener('beforeunload', e => {
cornerstone.imageCache.purgeCache()
requestPoolManager.resetRequestPool()
})
},
methods: {
// 访
getStudiesInfo() {
this.studyList = []
getVisitStudyList(this.trialId, this.subjectVisitId, this.isReading).then(res => {
res.Result.forEach((study) => {
res.Result.forEach((study,studyIndex) => {
const data = {}
data.StudyId = study.StudyId
data.StudyCode = study.StudyCode
@ -272,23 +342,23 @@ export default {
data.InstanceCount = study.InstanceCount
data.PreviewImageCount = 0
var seriesList = []
study.SeriesList.forEach((series) => {
study.SeriesList.forEach((series,seriesIndex) => {
const imageIds = []
// series.InstanceList.forEach((id) => {
// imageIds.push(`wadouri:/api/instance/content/${id}`)
// })
// series.InstanceList.forEach((id) => {
// imageIds.push(`wadouri:http://123.56.94.154:7000/instance/content/${id}`)
// })
series.InstancePathList.forEach((path) => {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${path}`)
series.InstanceInfoList.forEach(i => {
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
for (let j = 0; j < i.NumberOfFrames; j++) {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`)
}
} else {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`)
}
})
seriesList.push({
trialId: this.trialId,
subjectVisitId: this.subjectVisitId,
studyId: study.StudyId,
imageIds: imageIds,
instanceInfoList: series.InstanceInfoList,
seriesId: series.Id,
seriesUid: series.SeriesInstanceUid,
seriesNumber: series.SeriesNumber,
@ -301,7 +371,8 @@ export default {
instanceCount: series.InstanceCount,
prefetchInstanceCount: 0,
loadStatus: false,
imageloadedArr: []
imageloadedArr: [],
isExistMutiFrames: series.IsExistMutiFrames
})
})
data.SeriesList = seriesList
@ -329,21 +400,37 @@ export default {
this.$refs.dicomViewer.loadImageStack(this.studyList[studyIndex].SeriesList[seriesIndex])
if (!series.loadStatus) {
requestPoolManager.changePriority(series.seriesId)
// var isAddToTakPool = false
// if (this.showSeriesList.includes(`${studyIndex}_${seriesIndex}`)) {
// isAddToTakPool = true
// } else {
// this.showSeriesList.push(`${studyIndex}_${seriesIndex}`)
// }
// if (!isAddToTakPool) {
// var priority = parseInt(new Date().getTime())
// series.isLoading = true
// series.imageIds.map((imageId, i) => {
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
// })
// } else {
// requestPoolManager.changePriority(series.seriesId)
// }
}
},
showMultiFrames(studyIndex,series, seriesIndex, instanceInfo) {
this.currentSeriesIndex = seriesIndex
const imageIds = []
if (instanceInfo.NumberOfFrames && instanceInfo.NumberOfFrames > 1) {
for (let j = 0; j < instanceInfo.NumberOfFrames; j++) {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instanceInfo.Path}?frame=${j}&instanceId=${instanceInfo.Id}&idx=${studyIndex}|${seriesIndex}`)
}
} else {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instanceInfo.Path}?instanceId=${instanceInfo.Id}&idx=${studyIndex}|${seriesIndex}`)
}
const seriesInfo = {
trialId: series.trialId,
subjectVisitId: series.subjectVisitId,
studyId: series.studyId,
imageIds: imageIds,
seriesId: series.seriesId,
seriesUid: series.seriesUid,
seriesNumber: series.seriesNumber,
sliceThickness: series.sliceThickness,
modality: series.modality,
description: series.description,
isReading: series.isReading,
isDeleted: series.isDeleted,
previewImageUrl: series.previewImageUrl,
instanceCount: series.instanceCount
}
this.$refs.dicomViewer.loadImageStack(seriesInfo)
if (!series.loadStatus) {
requestPoolManager.changePriority(series.seriesId)
}
},
changeReadingStatus(callback, data) {
@ -448,19 +535,20 @@ export default {
if (data.Result != null && data.Result.length > 0) {
var seriesList = []
const res = data.Result
res.forEach(function(item) {
res.forEach((item,seriesIndex)=> {
const imageIds = []
// item.InstanceList.forEach(function(id) {
// imageIds.push(`wadouri:/api/instance/content/${id}`)
// })
// item.InstanceList.forEach((id) => {
// imageIds.push(`wadouri:http://123.56.94.154:7000/instance/content/${id}`)
// })
item.InstancePathList.forEach((path) => {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${path}`)
item.InstanceInfoList.forEach(i => {
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
for (let j = 0; j < i.NumberOfFrames; j++) {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${index}|${seriesIndex}`)
}
} else {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${index}|${seriesIndex}`)
}
})
seriesList.push({
imageIds: imageIds,
instanceInfoList: item.InstanceInfoList,
seriesId: item.Id,
seriesUid: item.SeriesInstanceUid,
seriesNumber: item.SeriesNumber,
@ -473,7 +561,8 @@ export default {
hasLabel: item.HasLabel,
keySeries: item.KeySeries,
loadStatus: false,
imageloadedArr: []
imageloadedArr: [],
isExistMutiFrames: item.IsExistMutiFrames
})
})
scope.relationStudyList[index].seriesCount = seriesList.length
@ -502,54 +591,50 @@ export default {
}
},
loadAllImages() {
var seriesList = this.studyList.map(s => s.SeriesList).flat()
const seriesIndex = seriesList.findIndex(i => i.loadStatus === false)
if (seriesIndex === -1) return
const series = seriesList[seriesIndex]
var priority = parseInt(new Date().getTime())
this.studyList.map((study, studyIndex) => {
study.SeriesList.map((series, seriesIndex) => {
series.imageIds.map(imageId => {
var p = null
if (this.firstInstanceId === imageId) {
p = priority * 100
} else {
p = priority - 1
}
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex, seriesIndex, priority: p })
})
// if (!series.loadStatus && series.seriesId !== this.firstSeriesId) {
// series.imageIds.map(imageId => {
// // imageIds.push({ imageId: image, seriesId: series.seriesId, priority })
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex, seriesIndex, priority })
// })
// }
})
})
for (let i = 0; i < series.imageIds.length; i++) {
const imageId = series.imageIds[i]
if (series.isExistMutiFrames) {
const params = this.getInstanceInfo(imageId)
if (params.frame && params.frame > 0) {
continue
}
}
var p = null
if (this.firstInstanceId === imageId) {
p = priority * 100
} else {
p = priority - 1
}
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, seriesIndex: seriesIndex, priority: p })
}
if (this.imageList.length > 0) {
this.loopLoad()
}
// requestPoolManager.setPendingList(imageIds)
},
getInstanceInfo(imageId) {
const params = {}
const searchParams = new URLSearchParams(imageId.split('?')[1])
for (const [key, value] of searchParams.entries()) {
params[key] = value
}
return params
},
loopLoad() {
if (this.imageList.length > 0) {
requestPoolManager.startTaskTimer()
this.imageList.map(image => {
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority).then(res => {
this.imageLoaded(image, res.data.string('x0020000e'))
})
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority)
})
requestPoolManager.sortTaskPool()
this.imageList = []
}
},
load(imageId, seriesId, priority = 999) {
return new Promise((resolve, reject) => {
requestPoolManager.loadAndCacheImagePlus(imageId, seriesId, priority).then(res => {
if (!res) return
this.imageLoaded(imageId, res.data.string('x0020000e'))
resolve(res)
}).catch(e => {
reject(e)
})
})
},
// load(imageId, priority = 999) {
// return new Promise((resolve, reject) => {
// const imageTask = this.buildImageRequestTask(imageId, { priority })
@ -592,47 +677,43 @@ export default {
}
}
},
// instance
cornerstoneImageLoaded(e) {
if (e.detail.image.imageId.includes(this.firstInstanceId) && !this.isStartLoad) {
//
this.loadAllImages()
this.isStartLoad = true
// requestPoolManager.executeTask()
cornerstoneimageloadprogress(e){
const imageId = e.detail.imageId
const percentComplete = e.detail.percentComplete
const params = {}
const searchParams = new URLSearchParams(imageId.split('?')[1])
for (const [key, value] of searchParams.entries()) {
params[key] = value
}
const uri = e.detail.image.sharedCacheKey
const index = this.cachedImages.findIndex(item => item.uri === uri)
if (index === -1) {
this.cachedImages.push({ uri: uri, timestamp: new Date().getTime() })
} else {
this.cachedImages[index].timestamp = new Date().getTime()
}
var imageId = e.detail.image.imageId
var seriesUid = e.detail.image.data.string('x0020000e')
var studyIndex = -1
var seriesIndex = -1
for (let i = 0; i < this.studyList.length; ++i) {
for (let j = 0; j < this.studyList[i].SeriesList.length; ++j) {
if (this.studyList[i].SeriesList[j].seriesUid === seriesUid) {
studyIndex = i
seriesIndex = j
break
if (this.visitTaskId === params.visitTaskId) {
const studyIndex = params.idx.split('|')[0]
const seriesIndex = params.idx.split('|')[1]
var prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount
var instanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
const i = this.currentLoadIns.findIndex(i => i.imageId === imageId)
if (i > -1) {
prefetchInstanceCount = prefetchInstanceCount - this.currentLoadIns[i].percentComplete + percentComplete
this.currentLoadIns[i].percentComplete = percentComplete
if (percentComplete === 100) {
this.currentLoadIns.splice(i, 1)
}
} else {
if (percentComplete !== 100) {
this.currentLoadIns.push({ imageId, percentComplete })
}
prefetchInstanceCount = prefetchInstanceCount + percentComplete
}
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = prefetchInstanceCount
if (percentComplete >= 100) {
this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.push(imageId)
}
}
if (studyIndex > 0) break
}
if (seriesIndex < 0) return
const imageIdIndex = this.studyList[studyIndex].SeriesList[seriesIndex].imageIds.indexOf(imageId)
if (imageIdIndex < 0) return
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
++this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount
this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.push(imageId)
if (this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount >= this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount) {
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount
if (prefetchInstanceCount >= instanceCount * 100) {
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = instanceCount * 100
//
this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
this.loadAllImages()
}
}
}
@ -694,9 +775,9 @@ export default {
padding: 5px;
/* height: 95%; */
height: 99%;
overflow: hidden;
text-overflow: clip;
white-space: nowrap;
/* overflow: hidden;
text-overflow: clip; */
/* white-space: nowrap; */
}
.viewerContainer .viewerContentWrapper>div {
display: inline-block;
@ -813,6 +894,29 @@ export default {
height: 40px;
line-height: 20px;
}
.instance_frame_wrapper{
min-width: 120px;
background-color: #2c2c2c;
border: 1px solid #2c2c2c;
padding: 5px;
}
.frame_content{
height: 50px;
padding: 5px;
display: flex;
justify-content: flex-start;
color: #ddd;
font-size: 12px;
border: 1px solid #404040;
}
.frame_content:hover {
/* font-weight: bold; */
/* box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); */
cursor: pointer;
/* color: #428bca; */
border-color: #213a54 !important;
background-color: #213a54;
}
/* .viewerRightSidePanel {
width: 300px;

View File

@ -513,12 +513,27 @@
</el-col>
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.EnumType === 'Dictionary'" :span="12">
<el-form-item label="字典表名">
<el-input v-model="form.DictionaryCode" placeholder="请输入字典表名" />
<!-- <el-input v-model="form.DictionaryCode" placeholder="请输入字典表名" /> -->
<el-autocomplete
clearable
class="inline-input"
v-model="form.DictionaryCode"
:fetch-suggestions="querySearch"
placeholder="请输入字典表名"
></el-autocomplete>
</el-form-item>
</el-col>
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.EnumType === 'Dictionary'" :span="12">
<el-form-item label="翻译字段">
<el-input v-model="form.DictionaryType" placeholder="请输入翻译字段" />
<!-- <el-input v-model="form.DictionaryType" placeholder="请输入翻译字段" /> -->
<el-select v-model="form.DictionaryType" clearable placeholder="请选择翻译字段">
<el-option
v-for="item in $d.DictionaryType"
:key="item.id"
:label="item.label"
:value="item.label">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.EnumType === 'Date'" :span="24">
@ -696,7 +711,7 @@
</template>
<script>
import { fullyReplicated, changeFrontAuditSort, copyFrontAuditConfigItem, getFrontAuditConfigList, addOrUpdateFrontAuditConfig, deleteFrontAuditConfig, copyOtherToThisItem, getAuditConfigChildList, setDictionaryValue } from '@/api/dictionary/checkConfig'
import { fullyReplicated, changeFrontAuditSort, copyFrontAuditConfigItem, getFrontAuditConfigList, addOrUpdateFrontAuditConfig, deleteFrontAuditConfig, copyOtherToThisItem, getAuditConfigChildList, getDictionaryCodeList } from '@/api/dictionary/checkConfig'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import Sortable from 'sortablejs'
@ -749,13 +764,41 @@ export default {
},
ChildGroup: null,
tableShow: false,
rowDrop2TableIsShow: true
rowDrop2TableIsShow: true,
DictionaryCodeList:[]
}
},
created() {
this.getList()
this.getList();
this.getDictionaryCodeList();
},
methods: {
querySearch(queryString, cb) {
var DictionaryCodeList = this.DictionaryCodeList;
var results = queryString ? DictionaryCodeList.filter(this.createFilter(queryString)) : DictionaryCodeList;
// callback
cb(results);
},
createFilter(queryString) {
return (DictionaryCodeList) => {
return (DictionaryCodeList.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
};
},
//
async getDictionaryCodeList(){
try{
let res = await getDictionaryCodeList();
if(res.IsSuccess){
this.DictionaryCodeList = res.Result.map(item=>{
return {
value:item
}
});
}
}catch(err){
console.log(err);
}
},
addParameter() {
this.form.UrlConfig.ParameterList.push({
UrlParameterName: null,

View File

@ -3,26 +3,34 @@
<div class="search">
<el-form :inline="true" size="small" class="base-search-form">
<el-form-item label="CRO Name:">
<el-input v-model="searchData.CROName" style="width:100px;" />
<el-input v-model="searchData.CROName" style="width: 100px" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleSearch">Search</el-button>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">Reset</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleSearch"
>Search</el-button
>
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>Reset</el-button
>
</el-form-item>
</el-form>
<span style="margin-left:auto;">
<span style="margin-left: auto">
<el-button
size="small"
type="primary"
style="margin-left:auto;"
style="margin-left: auto"
icon="el-icon-plus"
@click="handleAddCro"
>New</el-button>
>New</el-button
>
</span>
</div>
<el-table
v-loading="loading"
v-adaptive="{bottomOffset:60}"
v-adaptive="{ bottomOffset: 60 }"
:data="list"
stripe
height="100"
@ -50,6 +58,16 @@
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="IsTrialLevel"
label="Level"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
<span>{{ $fd("IsTrialLevel", String(scope.row.IsTrialLevel)) }}</span>
</template>
</el-table-column>
<el-table-column label="Action" min-width="200">
<template slot-scope="scope">
<el-button
@ -68,7 +86,13 @@
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<el-dialog
v-if="editVisible"
@ -78,26 +102,32 @@
width="600px"
custom-class="base-dialog-wrapper"
>
<CroForm v-if="editVisible" :data="rowData" @close="close" @getList="getList" />
<CroForm
v-if="editVisible"
:data="rowData"
:IsTrialLevel="rowData.IsTrialLevel"
@close="close"
@getList="getList"
/>
</el-dialog>
</box-content>
</template>
<script>
import { getCROPageList, deleteCROCompany } from '@/api/dictionary'
import BoxContent from '@/components/BoxContent'
import Pagination from '@/components/Pagination'
import CroForm from './CroForm'
import { getCROPageList, deleteCROCompany } from "@/api/dictionary";
import BoxContent from "@/components/BoxContent";
import Pagination from "@/components/Pagination";
import CroForm from "./CroForm";
const searchDataDefault = () => {
return {
CROName: '',
CROName: "",
PageIndex: 1,
PageSize: 20,
Asc: true,
SortField: ''
}
}
SortField: "",
};
};
export default {
name: 'Cros',
name: "Cros",
components: { BoxContent, Pagination, CroForm },
data() {
return {
@ -107,87 +137,93 @@ export default {
loading: false,
rowData: {},
editVisible: false,
title: ''
}
title: "",
};
},
mounted() {
this.getList()
this.getList();
},
methods: {
// CRO
getList() {
this.loading = true
getCROPageList(this.searchData).then(res => {
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
}).catch(() => {
this.loading = false
})
this.loading = true;
getCROPageList(this.searchData)
.then((res) => {
this.loading = false;
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
})
.catch(() => {
this.loading = false;
});
},
// CRO
handleAddCro() {
this.rowData = {}
this.title = 'Add'
this.editVisible = true
this.rowData = {};
this.title = "Add";
this.editVisible = true;
},
// CRO
handleEdit(row) {
this.rowData = row
this.title = 'Edit'
this.editVisible = true
this.rowData = row;
this.title = "Edit";
this.editVisible = true;
},
// CRO
handleDelete(row) {
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning',
this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
type: "warning",
distinguishCancelAndClose: true,
})
.then(() => {
this.loading = true
deleteCROCompany(row.Id)
.then(res => {
this.loading = false
if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success(this.$t('common:message:deletedSuccessfully'))
}
}).catch(() => {
this.loading = false
})
})
}).then(() => {
this.loading = true;
deleteCROCompany(row.Id)
.then((res) => {
this.loading = false;
if (res.IsSuccess) {
this.list.splice(
this.list.findIndex((item) => item.Id === row.Id),
1
);
this.$message.success(
this.$t("common:message:deletedSuccessfully")
);
}
})
.catch(() => {
this.loading = false;
});
});
},
//
handleReset() {
this.searchData = searchDataDefault()
this.getList()
this.searchData = searchDataDefault();
this.getList();
},
//
handleSearch() {
this.searchData.PageIndex = 1
this.getList()
this.searchData.PageIndex = 1;
this.getList();
},
//
handleSortByColumn(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
if (column.order === "ascending") {
this.searchData.Asc = true;
} else {
this.searchData.Asc = false
this.searchData.Asc = false;
}
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
this.searchData.SortField = column.prop;
this.searchData.PageIndex = 1;
this.getList();
},
//
close() {
this.editVisible = false
}
}
}
this.editVisible = false;
},
},
};
</script>
<style lang="scss" scoped>
.cros{
.cros {
height: 100%;
}
</style>

View File

@ -17,70 +17,98 @@
<el-form-item label="CRO Code: " prop="CROCode">
<el-input v-model="form.CROCode" />
</el-form-item>
<el-form-item label="Level: ">
<el-switch
:disabled="!IsTrialLevel"
v-model="form.IsTrialLevel"
:active-text="$fd('IsTrialLevel', 'true')"
:inactive-text="$fd('IsTrialLevel', 'false')"
>
</el-switch>
</el-form-item>
</div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
<el-form-item>
<el-button :disabled="btnLoading" type="primary" @click="handleCancel">Cancel</el-button>
<el-button type="primary" :loading="btnLoading" @click="handleSave">Save</el-button>
<el-button :disabled="btnLoading" type="primary" @click="handleCancel"
>Cancel</el-button
>
<el-button type="primary" :loading="btnLoading" @click="handleSave"
>Save</el-button
>
</el-form-item>
</div>
</el-form>
</template>
<script>
import { addOrUpdateCro } from '@/api/dictionary'
import { addOrUpdateCro } from "@/api/dictionary";
export default {
name: 'CroForm',
name: "CroForm",
props: {
data: {
type: Object,
default() {
return {}
}
}
return {};
},
},
IsTrialLevel: {
type: Boolean,
default: true,
},
},
data() {
return {
btnLoading: false,
form: {
Id: '',
CROName: '',
CRONameCN: '',
CROCode: ''
Id: "",
CROName: "",
CRONameCN: "",
CROCode: "",
IsTrialLevel: true,
},
rules: {
CROName: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
CRONameCN: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
CROCode: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }]
}
}
CROName: [
{ required: true, message: "Please specify", trigger: "blur" },
{ max: 500, message: "The maximum length is 500" },
],
CRONameCN: [
{ required: true, message: "Please specify", trigger: "blur" },
{ max: 500, message: "The maximum length is 500" },
],
CROCode: [
{ required: true, message: "Please specify", trigger: "blur" },
{ max: 50, message: "The maximum length is 50" },
],
},
};
},
mounted() {
if (Object.keys(this.data).length && this.data.Id) {
this.form = { ...this.data }
this.form = { ...this.data };
}
},
methods: {
handleSave() {
this.$refs.CROForm.validate(valid => {
if (!valid) return
this.btnLoading = true
addOrUpdateCro(this.form).then(res => {
this.btnLoading = false
if (res.IsSuccess) {
this.$message.success('Saved successfully')
this.$refs['CROForm'].resetFields()
this.$emit('getList')
this.$emit('close')
}
}).catch(() => {
this.btnLoading = false
})
})
this.$refs.CROForm.validate((valid) => {
if (!valid) return;
this.btnLoading = true;
addOrUpdateCro(this.form)
.then((res) => {
this.btnLoading = false;
if (res.IsSuccess) {
this.$message.success("Saved successfully");
this.$refs["CROForm"].resetFields();
this.$emit("getList");
this.$emit("close");
}
})
.catch(() => {
this.btnLoading = false;
});
});
},
handleCancel() {
this.$emit('close')
}
}
}
this.$emit("close");
},
},
};
</script>

View File

@ -3,33 +3,50 @@
<div class="search">
<el-form :inline="true" size="small" class="base-search-form">
<el-form-item label="Site Name:">
<el-input v-model="searchData.SiteName" style="width:120px;" />
<el-input v-model="searchData.SiteName" style="width: 120px" />
</el-form-item>
<el-form-item label="Alias Name:">
<el-input v-model="searchData.AliasName" style="width:120px;" />
<el-input v-model="searchData.AliasName" style="width: 120px" />
</el-form-item>
<el-form-item label="Country:">
<el-input v-model="searchData.Country" style="width:120px;" />
<el-input v-model="searchData.Country" style="width: 120px" />
</el-form-item>
<el-form-item label="City:">
<el-input v-model="searchData.City" style="width:120px;" />
<el-input v-model="searchData.City" style="width: 120px" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleSearch">Search</el-button>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">Reset</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleSearch"
>Search</el-button
>
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>Reset</el-button
>
</el-form-item>
</el-form>
<el-button
type="primary"
size="small"
style="margin-left:auto;"
icon="el-icon-plus"
@click="handleAddSite"
>New</el-button>
<div style="margin-left: auto">
<el-button
type="primary"
size="small"
icon="el-icon-plus"
@click="handleAddSystemSite"
>{{ $t("trial:dictionary:institutions:site:addSystemSite") }}
</el-button>
<el-button
type="primary"
size="small"
style="margin-left: 10px"
icon="el-icon-plus"
@click="handleAddSite"
>New
</el-button>
</div>
</div>
<el-table
v-loading="loading"
v-adaptive="{bottomOffset:60}"
v-adaptive="{ bottomOffset: 60 }"
:data="list"
stripe
height="100"
@ -120,6 +137,13 @@
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="CreateTime"
label="CreateTime"
min-width="160"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column label="Action" fixed="right" width="150">
<template slot-scope="scope">
<el-button
@ -138,131 +162,362 @@
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<el-dialog
v-if="editVisible"
:visible.sync="editVisible"
:close-on-click-modal="false"
:title="title"
width="600px"
width="800px"
custom-class="base-dialog-wrapper"
>
<site-form v-if="editVisible" :data="rowData" @close="close" @getList="getList" />
<site-form
v-if="editVisible"
:data="rowData"
@close="close"
@getList="getList"
/>
</el-dialog>
<base-model
v-if="addSystemSite_model.visible"
:config="addSystemSite_model"
>
<template slot="dialog-body">
<div class="search">
<el-form :inline="true" size="small" class="base-search-form">
<el-form-item
:label="
$t(
'trial:dictionary:institutions:site:table:addSystemSite:TrialCode'
)
"
>
<el-input
v-model="addSystemSiteSearchData.TrialCode"
style="width: 100px"
/>
</el-form-item>
<el-form-item
:label="
$t(
'trial:dictionary:institutions:site:table:addSystemSite:TrialSiteName'
)
"
>
<el-input
v-model="addSystemSiteSearchData.TrialSiteName"
style="width: 100px"
/>
</el-form-item>
<el-form-item
:label="
$t(
'trial:dictionary:institutions:site:table:addSystemSite:TrialSiteAliasName'
)
"
>
<el-input
v-model="addSystemSiteSearchData.TrialSiteAliasName"
style="width: 100px"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
@click="getTrialSiteList"
>{{ $t("trial:dictionary:institutions:site:button:sreach") }}
</el-button>
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleResetAddSite"
>{{ $t("trial:dictionary:institutions:site:button:reset") }}
</el-button>
</el-form-item>
</el-form>
</div>
<el-table
v-loading="addSystemSiteLoading"
:data="addSystemSiteList"
stripe
height="300"
@sort-change="handleSortByColumnAddSite"
>
<el-table-column type="index" width="40" />
<el-table-column
prop="TrialCode"
:label="
$t(
'trial:dictionary:institutions:site:table:addSystemSite:TrialCode'
)
"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="TrialSiteName"
:label="
$t(
'trial:dictionary:institutions:site:table:addSystemSite:TrialSiteName'
)
"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="TrialSiteAliasName"
:label="
$t(
'trial:dictionary:institutions:site:table:addSystemSite:TrialSiteAliasName'
)
"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
:label="
$t(
'trial:dictionary:institutions:site:table:addSystemSite:Action'
)
"
fixed="right"
width="80"
>
<template slot-scope="scope">
<el-button
circle
type="text"
:title="$t('trial:dictionary:institutions:site:button:add')"
@click="addSystemSite(scope.row)"
>{{
$t("trial:dictionary:institutions:site:button:add")
}}</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
class="page"
style="float: right"
:total="addSystemSiteSearchDataTotal"
:page.sync="addSystemSiteSearchData.PageIndex"
:limit.sync="addSystemSiteSearchData.PageSize"
@pagination="getTrialSiteList"
/>
</template>
</base-model>
</box-content>
</template>
<script>
import { getSiteList, deleteSite } from '@/api/dictionary'
import BoxContent from '@/components/BoxContent'
import Pagination from '@/components/Pagination'
import SiteForm from './SiteForm'
import {
getSiteList,
deleteSite,
addOrUpdateSite,
getTrialSiteList,
} from "@/api/dictionary";
import BaseModel from "@/components/BaseModel";
import BoxContent from "@/components/BoxContent";
import Pagination from "@/components/Pagination";
import SiteForm from "./SiteForm";
const searchDataDefault = () => {
return {
SiteName: '',
SiteName: "",
PageIndex: 1,
PageSize: 20,
Asc: false,
SortField: "CreateTime",
AliasName: "",
Country: null,
City: null,
};
};
const searchSiteDataDefault = () => {
return {
// SiteName: "",
PageIndex: 1,
PageSize: 20,
Asc: true,
SortField: '',
AliasName: '',
Country: null,
City: null
}
}
SortField: "",
TrialCode: null,
TrialSiteName: null,
TrialSiteAliasName: null,
};
};
export default {
name: 'Sites',
components: { BoxContent, Pagination, SiteForm },
name: "Sites",
components: { BoxContent, Pagination, SiteForm, BaseModel },
data() {
return {
editVisible: false,
title: 'Add',
title: "Add",
searchData: searchDataDefault(),
list: [],
total: 0,
loading: false,
rowData: {}
}
rowData: {},
addSystemSite_model: {
visible: false,
title: this.$t("trial:dictionary:institutions:site:addSystemSite"),
width: "800px",
appendToBody: true,
},
addSystemSiteLoading: false,
addSystemSiteList: [],
addSystemSiteSearchData: searchSiteDataDefault(),
addSystemSiteSearchDataTotal: 0,
};
},
mounted() {
this.getList()
this.getList();
this.getTrialSiteList();
},
methods: {
//
async getTrialSiteList() {
try {
this.addSystemSiteLoading = true;
let res = await getTrialSiteList(this.addSystemSiteSearchData);
if (res.IsSuccess) {
this.addSystemSiteLoading = false;
this.addSystemSiteList = res.Result.CurrentPageData;
this.addSystemSiteSearchDataTotal = res.Result.TotalCount;
}
} catch (err) {
this.addSystemSiteLoading = false;
console.log(err);
}
},
//
async addSystemSite(item) {
try {
let data = {
SiteName: item.TrialSiteName,
SiteNameCN: item.TrialSiteName,
AliasName: item.TrialSiteAliasName,
SiteCode: item.TrialCode,
TrialSiteId: item.TrialSiteId,
};
this.addSystemSiteLoading = true;
let res = await addOrUpdateSite(data);
if (res.IsSuccess) {
this.getTrialSiteList();
this.getList();
}
} catch (err) {
this.addSystemSiteLoading = false;
console.log(err);
}
},
handleAddSystemSite() {
this.addSystemSite_model.visible = true;
this.addSystemSiteSearchData = searchSiteDataDefault();
this.addSystemSiteList = [];
this.addSystemSiteSearchDataTotal = 0;
this.getTrialSiteList();
},
// Site
getList() {
this.loading = true
getSiteList(this.searchData).then(res => {
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
}).catch(() => {
this.loading = false
})
this.loading = true;
getSiteList(this.searchData)
.then((res) => {
this.loading = false;
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
})
.catch(() => {
this.loading = false;
});
},
// Site
handleAddSite() {
this.rowData = {}
this.title = 'Add'
this.editVisible = true
this.rowData = {};
this.title = "Add";
this.editVisible = true;
},
// Site
handleEdit(row) {
this.rowData = row
this.title = 'Edit'
this.editVisible = true
this.rowData = row;
this.title = "Edit";
this.editVisible = true;
},
// Site
handleDelete(row) {
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning',
this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
type: "warning",
distinguishCancelAndClose: true,
})
.then(() => {
this.loading = true
deleteSite(row.Id)
.then(res => {
this.loading = false
if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$store.dispatch('global/setSite', {})
this.$message.success(this.$t('common:message:deletedSuccessfully'))
}
}).catch(() => {
this.loading = false
})
})
}).then(() => {
this.loading = true;
deleteSite(row.Id)
.then((res) => {
this.loading = false;
if (res.IsSuccess) {
this.list.splice(
this.list.findIndex((item) => item.Id === row.Id),
1
);
this.$store.dispatch("global/setSite", {});
this.$message.success(
this.$t("common:message:deletedSuccessfully")
);
}
})
.catch(() => {
this.loading = false;
});
});
},
//
handleReset() {
this.searchData = searchDataDefault()
this.getList()
this.searchData = searchDataDefault();
this.getList();
},
handleResetAddSite() {
this.addSystemSiteSearchData = searchSiteDataDefault();
this.getTrialSiteList();
},
//
handleSearch() {
this.searchData.PageIndex = 1
this.getList()
this.searchData.PageIndex = 1;
this.getList();
},
//
handleSortByColumn(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
if (column.order === "ascending") {
this.searchData.Asc = true;
} else {
this.searchData.Asc = false
this.searchData.Asc = false;
}
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
this.searchData.SortField = column.prop;
this.searchData.PageIndex = 1;
this.getList();
},
handleSortByColumnAddSite(column) {
if (column.order === "ascending") {
this.addSystemSiteSearchData.Asc = true;
} else {
this.addSystemSiteSearchData.Asc = false;
}
this.addSystemSiteSearchData.SortField = column.prop;
this.addSystemSiteSearchData.PageIndex = 1;
this.getTrialSiteList();
},
//
close() {
this.editVisible = false
}
}
}
this.editVisible = false;
},
},
};
</script>
<style lang="scss" scoped>
.Sites{
.Sites {
height: 100%;
}
</style>

View File

@ -1,5 +1,4 @@
<template>
<el-form
ref="sponsorForm"
:model="form"
@ -15,73 +14,109 @@
<el-form-item label="Sponsor NameCN: " prop="SponsorName">
<el-input v-model="form.SponsorNameCN" />
</el-form-item>
<el-form-item label="Sponsor Code: " prop="SponsorName">
<el-form-item label="Sponsor Code: " prop="SponsorCode">
<el-input v-model="form.SponsorCode" />
</el-form-item>
<el-form-item label="Level: ">
<el-switch
:disabled="!IsTrialLevel"
v-model="form.IsTrialLevel"
:active-text="$fd('IsTrialLevel', 'true')"
:inactive-text="$fd('IsTrialLevel', 'false')"
>
</el-switch>
</el-form-item>
</div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
<el-form-item>
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancel">Cancel</el-button>
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">Save</el-button>
<el-button
:disabled="btnLoading"
size="small"
type="primary"
@click="handleCancel"
>Cancel</el-button
>
<el-button
size="small"
type="primary"
:loading="btnLoading"
@click="handleSave"
>Save</el-button
>
</el-form-item>
</div>
</el-form>
</template>
<script>
import { addOrUpdateSponsor } from '@/api/dictionary'
import { addOrUpdateSponsor } from "@/api/dictionary";
export default {
name: 'SponsorForm',
name: "SponsorForm",
props: {
data: {
type: Object,
default() {
return {}
}
}
return {};
},
},
IsTrialLevel: {
type: Boolean,
default: true,
},
},
data() {
return {
btnLoading: false,
form: {
Id: '',
SponsorName: '',
SponsorNameCN: '',
SponsorCode: '',
Id: "",
SponsorName: "",
SponsorNameCN: "",
SponsorCode: "",
IsTrialLevel: true,
},
rules: {
SponsorName: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
SponsorNameCN: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
SponsorCode: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }]
}
}
SponsorName: [
{ required: true, message: "Please specify", trigger: "blur" },
{ max: 500, message: "The maximum length is 500" },
],
SponsorNameCN: [
{ required: true, message: "Please specify", trigger: "blur" },
{ max: 500, message: "The maximum length is 500" },
],
SponsorCode: [
{ required: true, message: "Please specify", trigger: "blur" },
{ max: 50, message: "The maximum length is 50" },
],
},
};
},
mounted() {
if (Object.keys(this.data).length && this.data.Id) {
this.form = { ...this.data }
this.form = { ...this.data };
}
},
methods: {
handleSave() {
this.$refs.sponsorForm.validate(valid => {
if (!valid) return
this.btnLoading = true
addOrUpdateSponsor(this.form).then(res => {
this.btnLoading = false
if (res.IsSuccess) {
this.$message.success('Saved successfully')
this.$refs['sponsorForm'].resetFields()
this.$emit('getList')
this.$emit('close')
}
}).catch(() => {
this.btnLoading = false
})
})
this.$refs.sponsorForm.validate((valid) => {
if (!valid) return;
this.btnLoading = true;
addOrUpdateSponsor(this.form)
.then((res) => {
this.btnLoading = false;
if (res.IsSuccess) {
this.$message.success("Saved successfully");
this.$refs["sponsorForm"].resetFields();
this.$emit("getList");
this.$emit("close");
}
})
.catch(() => {
this.btnLoading = false;
});
});
},
handleCancel() {
this.$emit('close')
}
}
}
this.$emit("close");
},
},
};
</script>

View File

@ -3,26 +3,34 @@
<div class="search">
<el-form :inline="true" size="small" class="base-search-form">
<el-form-item label="Sponsor Name:">
<el-input v-model="searchData.SponsorName" style="width:100px;" />
<el-input v-model="searchData.SponsorName" style="width: 100px" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleSearch">Search</el-button>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">Reset</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleSearch"
>Search</el-button
>
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>Reset</el-button
>
</el-form-item>
</el-form>
<span style="margin-left:auto;">
<span style="margin-left: auto">
<el-button
size="small"
type="primary"
style="margin-left:auto;"
style="margin-left: auto"
icon="el-icon-plus"
@click="handleAddSponsor"
>New</el-button>
>New</el-button
>
</span>
</div>
<el-table
v-loading="loading"
v-adaptive="{bottomOffset:60}"
v-adaptive="{ bottomOffset: 60 }"
:data="list"
stripe
height="100"
@ -50,6 +58,16 @@
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="IsTrialLevel"
label="Level"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
<span>{{ $fd("IsTrialLevel", String(scope.row.IsTrialLevel)) }}</span>
</template>
</el-table-column>
<el-table-column label="Action" min-width="150">
<template slot-scope="scope">
<el-button
@ -68,7 +86,13 @@
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<el-dialog
v-if="editVisible"
@ -78,26 +102,32 @@
width="600px"
custom-class="base-dialog-wrapper"
>
<sponsor-form v-if="editVisible" :data="rowData" @close="close" @getList="getList" />
<sponsor-form
v-if="editVisible"
:IsTrialLevel="rowData.IsTrialLevel"
:data="rowData"
@close="close"
@getList="getList"
/>
</el-dialog>
</box-content>
</template>
<script>
import { getSponsorPageList, deleteSponsor } from '@/api/dictionary'
import BoxContent from '@/components/BoxContent'
import Pagination from '@/components/Pagination'
import SponsorForm from './SponsorForm'
import { getSponsorPageList, deleteSponsor } from "@/api/dictionary";
import BoxContent from "@/components/BoxContent";
import Pagination from "@/components/Pagination";
import SponsorForm from "./SponsorForm";
const searchDataDefault = () => {
return {
SponsorName: '',
SponsorName: "",
PageIndex: 1,
PageSize: 20,
Asc: true,
SortField: ''
}
}
SortField: "",
};
};
export default {
name: 'Sponsors',
name: "Sponsors",
components: { BoxContent, Pagination, SponsorForm },
data() {
return {
@ -107,87 +137,93 @@ export default {
loading: false,
rowData: {},
editVisible: false,
title: ''
}
title: "",
};
},
mounted() {
this.getList()
this.getList();
},
methods: {
// Sponsors
getList() {
this.loading = true
getSponsorPageList(this.searchData).then(res => {
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
}).catch(() => {
this.loading = false
})
this.loading = true;
getSponsorPageList(this.searchData)
.then((res) => {
this.loading = false;
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
})
.catch(() => {
this.loading = false;
});
},
// Sponsor
handleAddSponsor() {
this.rowData = {}
this.title = 'Add'
this.editVisible = true
this.rowData = {};
this.title = "Add";
this.editVisible = true;
},
// Sponsor
handleEdit(row) {
this.rowData = row
this.title = 'Edit'
this.editVisible = true
this.rowData = row;
this.title = "Edit";
this.editVisible = true;
},
// Sponsor
handleDelete(row) {
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning',
this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
type: "warning",
distinguishCancelAndClose: true,
})
.then(() => {
this.loading = true
deleteSponsor(row.Id)
.then(res => {
this.loading = false
if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success(this.$t('common:message:deletedSuccessfully'))
}
}).catch(() => {
this.loading = false
})
})
}).then(() => {
this.loading = true;
deleteSponsor(row.Id)
.then((res) => {
this.loading = false;
if (res.IsSuccess) {
this.list.splice(
this.list.findIndex((item) => item.Id === row.Id),
1
);
this.$message.success(
this.$t("common:message:deletedSuccessfully")
);
}
})
.catch(() => {
this.loading = false;
});
});
},
//
handleReset() {
this.searchData = searchDataDefault()
this.getList()
this.searchData = searchDataDefault();
this.getList();
},
//
handleSearch() {
this.searchData.PageIndex = 1
this.getList()
this.searchData.PageIndex = 1;
this.getList();
},
//
handleSortByColumn(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
if (column.order === "ascending") {
this.searchData.Asc = true;
} else {
this.searchData.Asc = false
this.searchData.Asc = false;
}
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
this.searchData.SortField = column.prop;
this.searchData.PageIndex = 1;
this.getList();
},
//
close() {
this.editVisible = false
}
}
}
this.editVisible = false;
},
},
};
</script>
<style lang="scss" scoped>
.sponsors{
.sponsors {
height: 100%;
}
</style>

View File

@ -1,59 +1,86 @@
<template>
<div class="reset-wrapper">
<!-- Reset Password -->
<el-page-header :content="$t('passwordReset:title:reset')" @back="goBack" />
<div class="box-wrapper">
<el-steps :active="active" align-center style="margin-top: 30px">
<el-step :title="$t('resetPassword:step:VerifyIdentity')"></el-step>
<el-step :title="$t('resetPassword:step:ResetPassword')"></el-step>
<el-step :title="$t('resetPassword:step:ResetSuccess')"></el-step>
</el-steps>
<!-- Reset Password -->
<div class="box-wrapper" v-if="active === 0">
<el-form
ref="resetForm"
v-loading="formLoading"
:model="form"
label-width="200px"
label-width="130px"
:rules="rules"
class="demo-ruleForm"
size="small"
>
<!-- 邮箱 -->
<el-form-item :label="$t('passwordReset:form:email')" prop="EmailOrPhone">
<el-form-item
:label="$t('passwordReset:form:email')"
prop="EmailOrPhone"
>
<el-col :span="18">
<el-input v-model="form.EmailOrPhone" autocomplete="off" @change="handleEmailChange" />
</el-col>
<el-col :span="6" style="text-align:right;">
<el-button
size="small"
type="primary"
style="width:80%;"
:disabled="sendDisabled"
@click="handleSendCode"
>{{ sendTitle }}</el-button>
<el-input
v-model="form.EmailOrPhone"
autocomplete="off"
@change="handleEmailChange"
/>
</el-col>
</el-form-item>
<!-- 验证码 -->
<el-form-item :label="$t('trials:researchForm:form:verifyCode')" required>
<el-form-item
:label="$t('trials:researchForm:form:verifyCode')"
required
>
<el-col :span="18">
<el-form-item prop="VerificationCode">
<el-input v-model="form.VerificationCode" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="6" style="text-align:right;">
<!-- 校验 -->
<el-col :span="6" style="text-align: right">
<el-button
size="small"
type="primary"
style="width:80%;"
:disabled="form.VerificationCode === '' || form.EmailOrPhone === ''"
@click="verifyCode"
style="width: 80%"
:disabled="sendDisabled"
@click="handleSendCode"
>{{ sendTitle }}</el-button
>
{{ $t('passwordReset:button:verify') }}
</el-button>
</el-col>
</el-form-item>
</el-form>
<!-- 校验 -->
<el-button
size="small"
type="primary"
style="width: 50%; margin: auto; display: block"
:disabled="form.VerificationCode === '' || form.EmailOrPhone === ''"
@click="verifyCode"
>
{{ $t("passwordReset:button:verify") }}
</el-button>
</div>
<div class="box-wrapper" v-if="active === 1">
<el-form
ref="resetForm"
v-loading="formLoading"
:model="form"
label-width="100px"
:rules="rules"
class="demo-ruleForm"
size="small"
>
<!-- 用户名 -->
<el-form-item :label="$t('passwordReset:form:userName')" prop="UserId">
<el-select
v-model="form.UserId"
clearable
filterable
style="width:100%"
style="width: 100%"
@change="handleUserChange"
>
<el-option
@ -63,65 +90,102 @@
:value="item.UserId"
>
<span style="float: left">{{ item.UserName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.UserType }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.UserType
}}</span>
</el-option>
</el-select>
</el-form-item>
<!-- 用户类型 -->
<el-form-item v-if="form.UserId" :label="$t('passwordReset:form:userType')">
<el-form-item
v-if="form.UserId"
:label="$t('passwordReset:form:userType')"
>
<el-input v-model="form.UserType" disabled />
</el-form-item>
<!-- 新密码 -->
<el-form-item class="my_new_pwd" :label="$t('passwordReset:form:password')" prop="NewPwd" style="position: relative">
<el-form-item
class="my_new_pwd"
:label="$t('passwordReset:form:password')"
prop="NewPwd"
style="position: relative"
>
<el-input v-model="form.NewPwd" show-password autocomplete="off" />
<span style="position: absolute;right: -30px">
<el-tooltip :content="$t('passwordReset:form:passwordCentent')" placement="top">
<span style="position: absolute; right: -30px">
<el-tooltip
:content="$t('passwordReset:form:passwordCentent')"
placement="top"
>
<i class="el-icon-question" />
</el-tooltip>
</span>
</el-form-item>
<!-- 确认密码 -->
<el-form-item :label="$t('passwordReset:form:confirmPassword')" prop="CheckPass">
<el-form-item
:label="$t('passwordReset:form:confirmPassword')"
prop="CheckPass"
>
<el-input v-model="form.CheckPass" show-password autocomplete="off" />
</el-form-item>
<el-form-item style="text-align:right;">
<!-- 取消 -->
<el-button size="small" @click="onCancel">
{{ $t('passwordReset:button:cancel') }}
</el-button>
<!-- 提交 -->
<el-button size="small" type="primary" @click="onSubmit">
{{ $t('passwordReset:button:submit') }}
</el-button>
</el-form-item>
</el-form>
<div style="width: 50%; margin: auto; display: flex">
<!-- 取消 -->
<el-button size="small" @click="onCancel" style="width: 46%">
{{ $t("passwordReset:button:cancel") }}
</el-button>
<!-- 提交 -->
<el-button
size="small"
type="primary"
@click="onSubmit"
style="width: 46%"
>
{{ $t("passwordReset:button:submit") }}
</el-button>
</div>
</div>
<div class="box-wrapper flexBox" v-if="active === 3">
<svg-icon icon-class="resetSuccess" style="width: 300px; height: 300px" />
<p style="width: 100%; text-align: center">
{{ $t("resetPassword:successTip") }}
</p>
<el-button size="small" type="primary" @click="goBack">
{{ $t("passwordReset:button:back") }}
</el-button>
</div>
</div>
</template>
<script>
import { anonymousSendVerificationCode, verifyAnonymousVerifyCode, anonymousSetPassword } from '@/api/user'
import md5 from 'js-md5'
var timer = ''
var countdown = 60
import {
anonymousSendVerificationCode,
verifyAnonymousVerifyCode,
anonymousSetPassword,
} from "@/api/user";
import md5 from "js-md5";
import Img from "@/assets/icons/svg/resetSuccess.svg";
var timer = "";
var countdown = 60;
export default {
data() {
var validateEmail = (rule, value, callback) => {
if (value === '') {
if (value === "") {
//
callback(new Error(this.$t('passwordReset:formRule:email')))
callback(new Error(this.$t("passwordReset:formRule:email")));
} else {
var reg = /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
var reg =
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/;
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
this.sendDisabled = false
callback()
this.sendDisabled = false;
callback();
} else {
//
callback(new Error(this.$t('passwordReset:formRule:passwordinvalid')))
this.sendDisabled = true
callback(
new Error(this.$t("passwordReset:formRule:passwordinvalid"))
);
this.sendDisabled = true;
}
}
}
};
// var validatePass = (rule, value, callback) => {
// if (value === '') {
// //
@ -134,119 +198,181 @@ export default {
// }
// }
var validatePass2 = (rule, value, callback) => {
if (value === '' || value === undefined) {
if (value === "" || value === undefined) {
//
callback(new Error(this.$t('passwordReset:formRule:confirmPassword')))
callback(new Error(this.$t("passwordReset:formRule:confirmPassword")));
} else if (value !== undefined && value !== this.form.NewPwd) {
//
callback(new Error(this.$t('passwordReset:formRule:passwordsDiffer')))
callback(new Error(this.$t("passwordReset:formRule:passwordsDiffer")));
} else {
callback()
callback();
}
}
};
return {
active: 0,
Img,
form: {
EmailOrPhone: '',
VerificationCode: '',
NewPwd: '',
UserId: '',
UserType: ''
EmailOrPhone: "",
VerificationCode: "",
NewPwd: "",
UserId: "",
UserType: "",
},
users: [],
CheckPass: '',
CheckPass: "",
rules: {
EmailOrPhone: [
{ required: true, validator: validateEmail, trigger: ['blur', 'change'] }
{
required: true,
validator: validateEmail,
trigger: ["blur", "change"],
},
],
VerificationCode: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: ["blur", "change"],
},
],
NewPwd: [
{
required: true,
validator: this.$validatePassword,
trigger: ["blur", "change"],
},
],
CheckPass: [
{
required: true,
validator: validatePass2,
trigger: ["blur", "change"],
},
],
UserId: [
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
VerificationCode: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change'] }],
NewPwd: [{ required: true, validator: this.$validatePassword, trigger: ['blur', 'change'] }],
CheckPass: [{ required: true, validator: validatePass2, trigger: ['blur', 'change'] }],
UserId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }]
},
sendDisabled: true,
sendTitle: this.$t('passwordReset:button:send'),
formLoading: false
}
sendTitle: this.$t("passwordReset:button:send"),
formLoading: false,
};
},
methods: {
onSubmit() {
this.$refs['resetForm'].validate(valid => {
this.$refs["resetForm"].validate((valid) => {
if (valid) {
this.formLoading = true
anonymousSetPassword(this.form.UserId, md5(this.form.NewPwd)).then(res => {
if (res.IsSuccess) {
//
this.$message.success(this.$t('passwordReset:message:updatedSuccessfully'))
this.formLoading = false
this.goBack()
} else {
this.$alert(res.ErrorMessage)
}
}).catch(() => { this.formLoading = false })
this.formLoading = true;
anonymousSetPassword(this.form.UserId, md5(this.form.NewPwd))
.then((res) => {
if (res.IsSuccess) {
//
this.$message.success(
this.$t("passwordReset:message:updatedSuccessfully")
);
this.formLoading = false;
this.active = 3;
// this.goBack();
} else {
this.$alert(res.ErrorMessage);
}
})
.catch(() => {
this.formLoading = false;
});
}
})
});
},
handleSendCode() {
const that = this
this.sendDisabled = true
const that = this;
this.sendDisabled = true;
// var isReviewer = JSON.parse(zzSessionStorage.getItem('IsReviewer'))
anonymousSendVerificationCode(this.form.EmailOrPhone).then(res => {
if (res.IsSuccess) {
that.settime(that)
} else {
that.$alert(res.ErrorMessage)
}
}).catch(() => {
this.sendDisabled = false
})
anonymousSendVerificationCode(this.form.EmailOrPhone)
.then((res) => {
if (res.IsSuccess) {
let msg = this.$t('passwordReset:message:tip:sendCode').replace("xxx", this.form.EmailOrPhone)
this.$message.success(msg)
that.settime(that);
} else {
that.$alert(res.ErrorMessage);
}
})
.catch(() => {
this.sendDisabled = false;
});
},
verifyCode() {
this.formLoading = true
verifyAnonymousVerifyCode(this.form.EmailOrPhone, this.form.VerificationCode).then(res => {
this.formLoading = false
this.users = res.Result
//
this.$message.success(this.$t('passwordReset:message:verifiedSuccessfully'))
}).catch(() => { this.formLoading = false })
this.formLoading = true;
verifyAnonymousVerifyCode(
this.form.EmailOrPhone,
this.form.VerificationCode
)
.then((res) => {
this.formLoading = false;
this.users = res.Result;
if (this.users.length === 1) {
this.form.UserId = this.users[0].UserId;
this.form.UserType = this.users[0].UserType;
}
//
this.$message.success(
this.$t("passwordReset:message:verifiedSuccessfully")
);
this.active = 1;
})
.catch(() => {
this.formLoading = false;
});
},
handleEmailChange() {
var reg = /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
var reg =
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/;
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
this.sendDisabled = false
this.sendDisabled = false;
}
},
handleUserChange(val) {
const seleted = this.users.findIndex(user => user.UserId === val)
const seleted = this.users.findIndex((user) => user.UserId === val);
if (seleted > -1) {
this.form.UserType = this.users[seleted].UserType
this.form.UserType = this.users[seleted].UserType;
}
},
settime(obj) {
if (countdown === 0) {
obj.sendDisabled = false
obj.sendTitle = this.$t('passwordReset:button:send')
countdown = 60
clearTimeout(timer)
return
obj.sendDisabled = false;
obj.sendTitle = this.$t("passwordReset:button:send");
countdown = 60;
clearTimeout(timer);
return;
} else {
obj.sendDisabled = true
obj.sendTitle = `${this.$t('passwordReset:button:wait')}(${countdown}s)`
countdown--
obj.sendDisabled = true;
obj.sendTitle = `${this.$t(
"passwordReset:button:wait"
)}(${countdown}s)`;
countdown--;
// eslint-disable-next-line no-self-assign
countdown = countdown
timer = setTimeout(function() {
obj.settime(obj)
}, 1000)
countdown = countdown;
timer = setTimeout(function () {
obj.settime(obj);
}, 1000);
}
},
onCancel() {
this.$refs['resetForm'].resetFields()
this.$refs["resetForm"].resetFields();
Object.keys(this.form).forEach((key) => {
this.form[key] = "";
});
this.active = 0;
},
goBack() {
this.$router.push('/login')
}
}
}
this.$router.push("/login");
},
},
};
</script>
<style>
.reset-wrapper {
@ -270,7 +396,12 @@ export default {
/*/deep/ .is-error{*/
/* margin-bottom: 40px;*/
/*}*/
.is-error.my_new_pwd{
.is-error.my_new_pwd {
margin-bottom: 40px;
}
.flexBox {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
</style>

View File

@ -6,17 +6,19 @@
<div class="login-body">
<div class="login-l">
<div class="login-logo">
<img v-if="language === 'zh'" src="@/assets/zzlogo2.png" alt="">
<img v-else src="@/assets/zzlogo4.png" alt="">
<img v-if="language === 'zh'" src="@/assets/zzlogo2.png" alt="" />
<img v-else-if="NODE_ENV === 'usa'" src="@/assets/zzlogo-usa.png" alt="" />
<img v-else src="@/assets/zzlogo4.png" alt="" />
</div>
<div class="login-image">
<img src="@/assets/login-bg.png">
<img src="@/assets/login-bg.png" />
</div>
</div>
<div class="login-r">
<div class="title-container">
<!-- IRC Management System -->
<div class="title">{{ $t('login:title:system') }}</div>
<div class="system-title" v-if="NODE_ENV==='usa'">{{ $t("login:title:system_title") }}</div>
<div class="title" v-else>{{ $t("login:title:system") }}</div>
</div>
<el-form
ref="loginForm"
@ -29,7 +31,11 @@
<el-form-item
prop="username"
:rules="[
{ required: true, message: this.$t('login:formRule:userName'), trigger: 'blur' }
{
required: true,
message: this.$t('login:formRule:userName'),
trigger: 'blur',
},
]"
>
<span class="svg-container">
@ -50,7 +56,11 @@
<el-form-item
prop="password"
:rules="[
{ required: true, message: this.$t('login:formRule:password'), trigger: 'blur' }
{
required: true,
message: this.$t('login:formRule:password'),
trigger: 'blur',
},
]"
>
<span class="svg-container">
@ -69,101 +79,132 @@
@keyup.enter.native="handleLogin"
/>
<span class="show-pwd" @click="showPwd">
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
<svg-icon
:icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"
/>
</span>
</el-form-item>
<!-- Login -->
<el-button
:loading="loading"
type="primary"
style="width:100%;margin-bottom:10px;"
style="width: 100%; margin-bottom: 10px"
size="medium"
@click.native.prevent="handleLogin"
>
{{ $t('login:button:login') }}
{{ $t("login:button:login") }}
</el-button>
<div style="text-align: right;">
<div style="text-align: right">
<TopLang v-if="VUE_APP_OSS_CONFIG_REGION !== 'oss-us-west-1'" />
<!-- Forget password? -->
<el-button type="text" size="medium" @click.native.prevent="handleResetPwd">
{{ $t('login:button:forgetPassword') }}
<el-button
type="text"
size="medium"
@click.native.prevent="handleResetPwd"
>
{{ $t("login:button:forgetPassword") }}
</el-button>
</div>
</el-form>
</div>
</div>
<div v-if="language === 'zh'" class="login-footer">
<span>Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司 版权所有</span>
<span
>Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司
版权所有</span
>
<span> | </span>
<a target="_blank" href="https://beian.miit.gov.cn/">
<span>
沪ICP备2021037850-2
</span>
<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">
<a
target="_blank"
href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31011002005859"
>
<img src="@/assets/filing.png" />
<span>沪公网安备 31011002005859</span>
</a>
<a @click="openAbout">
<span style="color:#428bca">关于</span>
<a @click="openAbout">
<span style="color: #428bca">关于</span>
</a>
</div>
<Vcode :show="isShow" :fail-text="$t('login:button:failText')" :success-text="$t('login:button:successText')" :slider-text="$t('login:button:sliderText')" :imgs="[Img1]" @success="onSuccess" />
<Vcode
:show="isShow"
:fail-text="$t('login:button:failText')"
:success-text="$t('login:button:successText')"
:slider-text="$t('login:button:sliderText')"
:imgs="[Img1]"
@success="onSuccess"
/>
<el-dialog
v-if="aboutVisible"
:visible.sync="aboutVisible"
width="680px"
style="margin-top: 0;"
style="margin-top: 0"
:close-on-click-modal="false"
size="small"
>
<div style="margin: 0 auto;width: 600px;line-height: 28px;text-align: center" >
<h1 style="text-align: center;margin-bottom: 20px">关于</h1>
<p style="margin-bottom: 20px">
IRC Imaging System
</p>
<p style="margin-bottom: 20px">
V1.3.2.001
</p>
<div
style="
margin: 0 auto;
width: 600px;
line-height: 28px;
text-align: center;
"
>
<h1 style="text-align: center; margin-bottom: 20px">关于</h1>
<p style="margin-bottom: 20px" v-if="NODE_ENV==='usa'">{{ $t("login:title:system_title") }}</p>
<p style="margin-bottom: 20px" v-else>{{ $t("login:title:system") }}</p>
<p style="margin-bottom: 20px">V1.5.1.001</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>
Copyright © {{ new Date().getFullYear() }} Shanghai Extensive Imaging Inc.
Copyright © {{ new Date().getFullYear() }} Shanghai Extensive Imaging
Inc.
</p>
<div style="margin-bottom: 20px">
<img style="width: 180px" src="@/assets/zzlogo2.png" alt="">
<img style="width: 180px" src="@/assets/zzlogo2.png" alt="" />
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="mini" @click="aboutVisible = false">关闭</el-button>
<el-button type="primary" size="mini" @click="aboutVisible = false"
>关闭</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import { mapGetters, mapMutations } from 'vuex'
import TopLang from './topLang'
import { mapGetters, mapMutations } from "vuex";
import TopLang from "./topLang";
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
import Vcode from 'vue-puzzle-vcode'
import Img1 from '@/assets/pic-2.png'
import Vcode from "vue-puzzle-vcode";
import Img1 from "@/assets/pic-2.png";
export default {
name: 'Login',
name: "Login",
components: { TopLang, Vcode },
data() {
return {
NODE_ENV: process.env.NODE_ENV,
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
aboutVisible: false,
loginForm: {
username: '',
password: ''
username: "",
password: "",
UserId: null,
},
loginRules: {
username: [
{ required: true, message: this.$t('login:formRule:userName'), trigger: 'blur' },
{ max: 20, message: `${this.$t('common:ruleMessage:maxLength')} 20` }
{
required: true,
message: this.$t("login:formRule:userName"),
trigger: "blur",
},
{ max: 20, message: `${this.$t("common:ruleMessage:maxLength")} 20` },
],
password: [
// {
@ -171,40 +212,40 @@ export default {
// trigger: "blur",
// validator: this.$validatePassword
// },
{ required: true, message: this.$t('login:formRule:password'), trigger: 'blur' },
{ max: 20, message: `${this.$t('common:ruleMessage:maxLength')} 20` }
]
{
required: true,
message: this.$t("login:formRule:password"),
trigger: "blur",
},
{ max: 20, message: `${this.$t("common:ruleMessage:maxLength")} 20` },
],
},
loading: false,
passwordType: 'password',
passwordType: "password",
loginType: null,
location: null,
isShow: false,
showCode: false,
Img1
}
Img1,
};
},
computed: {
...mapGetters([
'asyncRoutes',
'routes',
'language'
])
...mapGetters(["asyncRoutes", "routes", "language"]),
},
mounted() {
this.loginType = this.$route.query.loginType
this.location = this.$route.query.location
zzSessionStorage.setItem('loginType', this.loginType)
localStorage.setItem('location', this.location)
if (process.env.VUE_APP_OSS_CONFIG_REGION === 'oss-us-west-1') {
this.$i18n.locale = 'en'
this.setLanguage('en')
this.$updateDictionary()
this.loginType = this.$route.query.loginType;
this.location = this.$route.query.location;
zzSessionStorage.setItem("loginType", this.loginType);
localStorage.setItem("location", this.location);
if (process.env.VUE_APP_OSS_CONFIG_REGION === "oss-us-west-1") {
this.$i18n.locale = "en";
this.setLanguage("en");
this.$updateDictionary();
} else {
if (this.location === 'USA') {
this.$i18n.locale = 'en'
this.setLanguage('en')
this.$updateDictionary()
if (this.location === "USA") {
this.$i18n.locale = "en";
this.setLanguage("en");
this.$updateDictionary();
} else {
// this.$i18n.locale = 'zh'
// this.setLanguage('zh')
@ -213,85 +254,122 @@ export default {
}
},
methods: {
...mapMutations({ setLanguage: 'lang/setLanguage' }),
...mapMutations({ setLanguage: "lang/setLanguage" }),
openAbout() {
this.aboutVisible = true
this.aboutVisible = true;
},
showPwd() {
if (this.passwordType === 'password') {
this.passwordType = ''
if (this.passwordType === "password") {
this.passwordType = "";
} else {
this.passwordType = 'password'
this.passwordType = "password";
}
this.$nextTick(() => {
this.$refs.password.focus()
})
this.$refs.password.focus();
});
},
handleLogin() {
this.loginType = this.$route.query.loginType
this.$refs.loginForm.validate(valid => {
this.loginType = this.$route.query.loginType;
this.$refs.loginForm.validate((valid) => {
if (valid) {
if (this.showCode) {
this.isShow = true
this.isShow = true;
} else {
this.onSuccess()
this.onSuccess();
}
} else {
// console.log('error submit!!')
return false
return false;
}
})
});
},
loginIn() {
this.loading = true
this.showCode = false
this.$store.dispatch('user/login', this.loginForm).then((res) => {
if (!res) {
// ,
this.$message.success(this.$t('login:message:login1'))
setTimeout(() => {
this.$router.push({ path: `/recompose?userName=${this.loginForm.username}` })
}, 500)
return
}
this.$store.dispatch('permission/generateRoutes').then(res => {
this.loading = false
if (res && res.length > 0) {
this.$store.dispatch('global/getNoticeList')
this.$router.addRoutes(res)
if (this.loginType === 'DevOps') {
this.$router.replace({ path: res[0].path })
return
}
if (this.hasPermi(['role:radmin'])) {
this.$router.replace({ path: res[0].path })
return
}
if (this.hasPermi(['role:air', 'role:rpm', 'role:rcrc', 'role:rir'])) {
this.$router.replace({ path: '/trials/trials-list' })
} else {
this.$router.replace({ path: '/trials' })
}
} else {
//
this.$message.warning(this.$t('login:message:login2'))
loginIn(Id) {
this.loading = true;
this.showCode = false;
if (Id) this.loginForm.UserId = Id;
this.$store
.dispatch("user/login", this.loginForm)
.then((res) => {
if (res.BasicInfo.IsFirstAdd) {
// ,
this.$message.success(this.$t("login:message:login1"));
setTimeout(() => {
this.$router.push({
path: `/recompose?userName=${this.loginForm.username}`,
});
}, 500);
return;
} else if (res.BasicInfo.LoginState === 1) {
//
this.$alert(
this.$t("login:message:login3"),
this.$t("common:title:warning"),
{
callback: (action) => {
this.$router.push({
path: `/recompose?userName=${this.loginForm.username}`,
});
return;
},
}
);
return;
} else if (res.IsMFA) {
this.$MFA({
UserId: res.BasicInfo.Id,
EMail: res.BasicInfo.EMail,
username: this.loginForm.username,
callBack: this.loginIn,
cancelBack: () => {
this.loading = false;
},
});
return;
} else if (res.BasicInfo.LoginState === 2) {
// IP'
// this.$alert(this.$t('login:message:login4'), this.$t('common:title:warning'))
this.$message.warning(this.$t("login:message:login4"));
}
this.$store.dispatch("permission/generateRoutes").then((res) => {
this.loading = false;
if (res && res.length > 0) {
this.$store.dispatch("global/getNoticeList");
this.$router.addRoutes(res);
if (this.loginType === "DevOps") {
this.$router.replace({ path: res[0].path });
return;
}
if (this.hasPermi(["role:radmin"])) {
this.$router.replace({ path: res[0].path });
return;
}
if (
this.hasPermi(["role:air", "role:rpm", "role:rcrc", "role:rir"])
) {
this.$router.replace({ path: "/trials/trials-list" });
} else {
this.$router.replace({ path: "/trials" });
}
} else {
//
this.$message.warning(this.$t("login:message:login2"));
}
});
})
})
.catch(() => {
this.showCode = true
this.loading = false
})
this.showCode = true;
this.loading = false;
});
},
onSuccess() {
this.isShow = false
this.loginIn()
this.isShow = false;
this.loginIn();
},
handleResetPwd() {
this.$router.push({ name: 'Resetpassword' })
}
}
}
this.$router.push({ name: "Resetpassword" });
},
},
};
</script>
<style lang="scss">
@ -309,7 +387,7 @@ $cursor: #fff;
/* reset element-ui css */
.login-container {
.el-input {
.login-r .el-input {
display: inline-block;
height: 47px;
width: 85%;
@ -330,20 +408,21 @@ $cursor: #fff;
// }
}
}
.el-form-item {
border: 1px solid rgba(255, 255, 255, 0.1);
background: #f4f4f5;
border-radius: 5px;
color: #454545;
.login-r {
.el-form-item {
border: 1px solid rgba(255, 255, 255, 0.1);
background: #f4f4f5;
border-radius: 5px;
color: #454545;
}
}
}
</style>
<style lang="scss" scoped>
$bg:#2d3a4b;
$dark_gray:#889aa4;
$light_gray:#606266;
$bg: #2d3a4b;
$dark_gray: #889aa4;
$light_gray: #606266;
.login-container {
position: relative;
width: 100%;
@ -362,7 +441,7 @@ $light_gray:#606266;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
transform: translate(-50%, -50%);
// margin-top: -230px;
// margin-left: -400px;
width: 1200px;
@ -376,25 +455,24 @@ $light_gray:#606266;
float: left;
width: 50%;
height: 100%;
.login-logo{
.login-logo {
position: absolute;
top:35px;
top: 35px;
left: 50px;
img{
img {
height: 40px;
}
}
.login-image{
.login-image {
position: absolute;
top:10px;
top: 10px;
left: 0px;
// transform: translateY(-50%);
height: 100%;
img {
height: 100%;
height: 100%;
}
}
}
}
.login-r {
position: relative;
@ -407,12 +485,11 @@ $light_gray:#606266;
top: 50%;
// transform: translateY(-50%);
left: 50%;
transform:translate(-50%,-50%);
transform: translate(-50%, -50%);
width: 80%;
padding: 10px;
margin: 0 auto;
overflow: hidden;
}
.title-container {
// margin-bottom: 50px;
@ -456,7 +533,7 @@ $light_gray:#606266;
}
}
}
.login-footer{
.login-footer {
position: absolute;
bottom: 50px;
left: 0px;
@ -469,21 +546,20 @@ $light_gray:#606266;
align-items: center;
// color: rgb(180, 190, 199);
color: #909399;
a{
display:inline-block;
text-decoration:none;
height:20px;
line-height:20px;
a {
display: inline-block;
text-decoration: none;
height: 20px;
line-height: 20px;
display: flex;
justify-content: center;
}
span{
span {
margin: 0 2px;
}
img{
height:20px;
line-height:20px;
img {
height: 20px;
line-height: 20px;
}
// p{
// display: inline-block;
@ -494,5 +570,4 @@ $light_gray:#606266;
// }
}
}
</style>

View File

@ -50,7 +50,7 @@
:ref="`img${i}`"
:key="item.Id"
crossorigin="anonymous"
:src="`${OSSclientConfig.basePath}${item.Path}`"
:src="item.FileType&&item.FileType.indexOf('zip')>=0?zipImg:`${OSSclientConfig.basePath}${item.Path}`"
:style="imgStyle"
style="max-width:100%;max-height: 100%;"
@load="handleImgLoad"
@ -68,7 +68,7 @@
<script>
import { on, off } from 'element-ui/src/utils/dom'
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util'
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util';
const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel'
@ -102,6 +102,10 @@ export default {
initialIndex: {
type: Number,
default: 0
},
zipImg:{
required:true,
default:''
}
},
@ -117,7 +121,7 @@ export default {
offsetX: 0,
offsetY: 0,
enableTransition: false
}
},
}
},
computed: {

View File

@ -15,6 +15,7 @@
:study-code="previewImage.studyCode"
:body-part="previewImage.bodyPart"
:modality="previewImage.modality"
:zip-img='zipImg'
/>
</div>
<div class="thumbnail-wrapper" style="z-index:999;background-color:#fff;">
@ -42,7 +43,7 @@
}"
@click="selected(index)"
>
<img :title="item.FileName" crossorigin="anonymous" :src="`${OSSclientConfig.basePath + item.Path}`">
<img :title="item.FileName" crossorigin="anonymous" :src="item.FileType&&item.FileType.indexOf('zip')>=0?zipImg:`${OSSclientConfig.basePath}${item.Path}`">
<p v-if="item.FileName" class="item-date">
{{ `${index+1}` }}
</p>
@ -62,7 +63,8 @@
</div>
</template>
<script>
import ImageViewer from './image-viewer'
import ImageViewer from './image-viewer';
import zipImg from "@/assets/zip.png";
export default {
name: 'Preview',
components: {
@ -104,7 +106,8 @@ export default {
previewVisible: true,
translateX: 0,
pageSize: 0, //
urlList: []
urlList: [],
zipImg
}
},
computed: {

View File

@ -82,10 +82,14 @@ export default {
studyList: [],
subjectVisitId: '',
sudyId: '',
loading: false
loading: false,
bp:[]
}
},
mounted() {
async created(){
this.bp = await this.$getBodyPart(this.$route.query.trialId);
},
async mounted() {
if (this.$router.currentRoute.query.TokenKey) {
store.dispatch('user/setToken', this.$router.currentRoute.query.TokenKey)
changeURLStatic('TokenKey', '')
@ -97,6 +101,7 @@ export default {
},
methods: {
getBodyPart(bodyPart) {
console.log(bodyPart)
if (!bodyPart) return ''
var separator = ','
if (bodyPart.indexOf('|') > -1) {
@ -108,14 +113,15 @@ export default {
}
var arr = bodyPart.split(separator)
var newArr = arr.map(i => {
return this.$fd('Bodypart', i.trim())
return this.$fd('Bodypart', i.trim(),'Code',{Bodypart:this.bp},'Name')
})
console.log(newArr,this.bp)
return newArr.join(' | ')
},
// Dicom
getNoneDicomList() {
this.loading = true
getNoneDicomStudyList(this.subjectVisitId, this.studyId).then(res => {
getNoneDicomStudyList(this.subjectVisitId, this.studyId, true).then(res => {
this.studyList = res.Result
this.loading = false
const studyIndex = this.studyList.findIndex(item => {

View File

@ -62,7 +62,7 @@ export default {
// Dicom
getNoneDicomList() {
this.loading = true
getNoneDicomStudyList(this.subjectVisitId).then(res => {
getNoneDicomStudyList(this.subjectVisitId, '', true).then(res => {
this.noneDicomStudyList = res.Result
this.loading = false
const study = this.noneDicomStudyList.find((item, index) => {

View File

@ -146,7 +146,7 @@ export default {
}
</style>
<style scoped>
/deep/ .is-error{
::v-deep .is-error{
margin-bottom: 40px;
}
input:-webkit-autofill {

View File

@ -17,9 +17,9 @@
<el-input v-model="form.IndicationType" disabled />
</el-form-item>
<!-- 中心名称 -->
<el-form-item :label="$t('trials:researchForm:form:siteName')" prop="SiteId">
<el-form-item :label="$t('trials:researchForm:form:siteName')" prop="TrialSiteId">
<el-select
v-model="form.SiteId"
v-model="form.TrialSiteId"
filterable
style="width:100%;"
:disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory"
@ -29,12 +29,12 @@
v-for="(item,index) of siteOptions"
:key="index"
:label="item.TrialSiteAliasName"
:value="item.SiteId"
:value="item.TrialSiteId"
/>
</el-select>
</el-form-item>
<!-- 中心编号 -->
<el-form-item v-if="form.SiteId" :label="$t('trials:researchForm:form:siteId')">
<el-form-item v-if="form.TrialSiteId" :label="$t('trials:researchForm:form:siteId')">
<el-input v-model="form.TrialSiteCode" disabled />
</el-form-item>
<!-- 联系人 -->
@ -59,7 +59,7 @@
<el-input-number v-model="form.AverageEngravingCycle" :disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory" controls-position="right" :min="0" />
</el-form-item>
<!-- 请确认参与本项目影像采集的影像技师具备对应的资质技师证对应设备的大型设备上岗证 -->
<el-form-item :label="$t('trials:researchForm:form:isQualified')">
<el-form-item v-if="!notShowFieldList.includes('IsConfirmImagingTechnologist')" :label="$t('trials:researchForm:form:isQualified')">
<el-radio-group v-model="form.IsConfirmImagingTechnologist" :disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory">
<el-radio
v-for="item of $d.YesOrNo"
@ -70,7 +70,7 @@
</el-form-item>
<!-- 原因 -->
<el-form-item
v-if="form.IsConfirmImagingTechnologist === false"
v-if="!notShowFieldList.includes('NotConfirmReson') && form.IsConfirmImagingTechnologist === false"
:label="$t('trials:researchForm:form:notQualifiedReason')"
>
<el-input
@ -81,13 +81,13 @@
/>
</el-form-item>
<!-- 研究单位疗效评估人员类型 -->
<el-form-item :label="$t('trials:researchForm:form:staffType')">
<el-form-item v-if="!notShowFieldList.includes('EfficacyEvaluatorType')" :label="$t('trials:researchForm:form:staffType')">
<el-radio-group v-model="form.EfficacyEvaluatorType" :disabled="!(state === 0 && userTypeEnumInt === 0)|| isHistory">
<el-radio v-for="item of $d.EfficacyEvaluatorType" :key="`EfficacyEvaluatorType${item.value}`" :label="item.value">{{ item.label }}</el-radio>
</el-radio-group>
</el-form-item>
<!-- 是否严格按照研究单位影像手册参数完成图像采集 -->
<el-form-item>
<el-form-item v-if="!notShowFieldList.includes('IsFollowStudyParameters')">
<span slot="label" v-html="$t('trials:researchForm:form:isFollowStudyParam')" />
<el-radio-group v-model="form.IsFollowStudyParameters" :disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory">
<el-radio v-for="item of $d.YesOrNo" :key="`IsFollowStudyParameters${item.value}`" :label="item.value">{{ item.label }}</el-radio>
@ -95,7 +95,7 @@
</el-form-item>
<!-- 不能严格按照研究单位影像手册参数采集图像原因 -->
<el-form-item
v-if="!form.IsFollowStudyParameters"
v-if="!notShowFieldList.includes('NotFollowReson') && !form.IsFollowStudyParameters"
>
<span slot="label" v-html="$t('trials:researchForm:form:notFollowStudyParam')" />
<el-input
@ -162,7 +162,7 @@ export default {
TrialSiteCode: '',
TrialSiteAliasName: '',
IndicationType: '', //
SiteId: '', //
TrialSiteId: '', //
UserName: '', //
Phone: '', //
Email: '', //
@ -174,11 +174,11 @@ export default {
NotFollowReson: ''
},
rules: {
SiteId: [
TrialSiteId: [
{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: 'blur' }
],
UserName: [
{ required: true, validator: (rule, value, callback) => {!value ? callback(new Error(this.$t('trials:researchForm:formRule:specify'))) : callback()}, trigger: 'blur' },
{ required: true, validator: (rule, value, callback) => { !value ? callback(new Error(this.$t('trials:researchForm:formRule:specify'))) : callback() }, trigger: 'blur' },
{ min: 0, max: 50, message: this.$t('trials:researchForm:formRule:maxLength'), trigger: ['blur', 'change'] }
],
Phone: [
@ -189,7 +189,8 @@ export default {
btnLoading: false,
state: null,
userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1,
isShow: false
isShow: false,
notShowFieldList: []
}
},
methods: {
@ -202,7 +203,7 @@ export default {
const param = {
id: this.form.Id,
trialId: this.$route.query.trialId,
siteId: this.form.SiteId,
trialSiteId: this.form.TrialSiteId,
userName: this.form.UserName,
phone: this.form.Phone,
email: this.form.Email,
@ -234,7 +235,7 @@ export default {
},
//
async initForm(trialInfo, trialSiteSurvey) {
async initForm(trialInfo, trialSiteSurvey, notShowFieldList) {
// site
const { Result } = await getTrialSiteSelect(this.$route.query.trialId)
this.siteOptions = Result
@ -246,7 +247,7 @@ export default {
this.form.TrialSiteCode = trialSiteSurvey.TrialSiteCode
this.form.TrialSiteAliasName = trialSiteSurvey.TrialSiteAliasName //
this.form.IndicationType = trialInfo.IndicationType //
this.form.SiteId = trialSiteSurvey.SiteId
this.form.TrialSiteId = trialSiteSurvey.TrialSiteId
this.form.UserName = trialSiteSurvey.UserName //
this.form.Phone = trialSiteSurvey.Phone //
this.form.Email = trialSiteSurvey.Email //
@ -258,9 +259,11 @@ export default {
this.form.NotFollowReson = trialSiteSurvey.NotFollowReson
this.state = trialSiteSurvey.State
this.isShow = true
if (!notShowFieldList) return
this.notShowFieldList = notShowFieldList
},
handleSiteChange(val) {
var selected = this.siteOptions.find(item => item.SiteId === val)
var selected = this.siteOptions.find(item => item.TrialSiteId === val)
if (selected) {
this.form.TrialSiteCode = selected.TrialSiteCode
}

View File

@ -14,7 +14,7 @@
:value="item.Id"
/> -->
<el-option
v-for="item of $d.Modality"
v-for="item of $d.SiteSurvey_ScanEquipmentType"
:key="item.id"
:label="item.label"
:value="item.id"
@ -22,7 +22,7 @@
</el-select>
</el-form-item>
<!-- 扫描参数 -->
<el-form-item :label="$t('trials:equiptResearch:form:param')">
<el-form-item v-if="isShowParameters" :label="$t('trials:equiptResearch:form:param')">
<el-input v-model="form.Parameters" />
</el-form-item>
<!-- 扫描仪器制造商名称 -->
@ -68,6 +68,10 @@ export default {
trialSiteSurveyEquipmentType: {
type: String,
default: ''
},
isShowParameters: {
type: Boolean,
default: false
}
},
data() {

View File

@ -21,28 +21,37 @@
<el-table-column
prop="EquipmentType"
:label="$t('trials:equiptResearch:form:equipment')"
width="180"
min-width="120"
show-overflow-tooltip
/>
<!-- 扫描参数 -->
<el-table-column
v-if="isShowParameters"
prop="Parameters"
:label="$t('trials:equiptResearch:form:param')"
width="180"
min-width="100"
show-overflow-tooltip
/>
<!-- 扫描仪器制造商名称 -->
<el-table-column
min-width="120"
prop="ManufacturerName"
:label="$t('trials:equiptResearch:form:manufacturer')"
show-overflow-tooltip
/>
<!-- 扫描仪型号 -->
<el-table-column
min-width="120"
prop="ScannerType"
:label="$t('trials:equiptResearch:form:model')"
show-overflow-tooltip
/>
<!-- 备注 -->
<el-table-column
min-width="120"
prop="Note"
:label="$t('trials:equiptResearch:form:precautions')"
show-overflow-tooltip
/>
<el-table-column
v-if="state === 0 && userTypeEnumInt === 0 && !isHistory"
@ -73,7 +82,7 @@
custom-class="base-dialog-wrapper"
:append-to-body="userTypeEnumInt !== 0"
>
<EquipmentForm :data="rowData" :trial-site-survey-equipment-type="trialSiteSurveyEquipmentType" @getList="getList" @close="closeDialog" />
<EquipmentForm :data="rowData" :trial-site-survey-equipment-type="trialSiteSurveyEquipmentType" :is-show-parameters="isShowParameters" @getList="getList" @close="closeDialog" />
</el-dialog>
</div>
@ -105,7 +114,8 @@ export default {
userTypeEnumInt: 0,
state: null,
trialSiteSurveyId: '',
trialId: ''
trialId: '',
isShowParameters: false
}
},
mounted() {
@ -152,7 +162,8 @@ export default {
}).catch(() => { this.loading = false })
}).catch(() => {})
},
initList(TrialSiteEquipmentSurveyList, trialSiteSurvey) {
initList(TrialSiteEquipmentSurveyList, trialSiteSurvey, isShowParameters) {
this.isShowParameters = isShowParameters
this.list = TrialSiteEquipmentSurveyList
this.state = trialSiteSurvey.State
this.$forceUpdate()

View File

@ -49,7 +49,7 @@ export default {
this.loading = true
var param = {
trialId: this.trialId,
siteId: this.siteId,
trialSiteId: this.siteId,
trialSiteSurveyId: this.trialSiteSurveyId
}
getTrialSiteSurveySelectList(param).then(res => {

View File

@ -175,7 +175,7 @@ export default {
}
})
this.state = res.Result.TrialSiteSurvey.State
this.siteId = res.Result.TrialSiteSurvey.SiteId
this.siteId = res.Result.TrialSiteSurvey.TrialSiteId
this.$refs['baseResearchInfo'].initForm(res.Result.TrialInfo, res.Result.TrialSiteSurvey)
this.$refs['historicalParticipant'].initList(historicalArr, res.Result.TrialSiteSurvey)
this.$refs['researchParticipants'].initList(newArr, res.Result.TrialSiteSurvey)

View File

@ -93,7 +93,11 @@
<el-card shadow="hover" class="mt10">
<!-- 注意事项 -->
<h4>{{ $t('trials:equiptResearch:form:precautions') }}</h4>
<ol>
<ol v-if="siteSurveyNoteInfo">
<div v-if="$i18n.locale === 'zh'" v-html="siteSurveyNoteInfo.ReplaceContentCN" />
<div v-else v-html="siteSurveyNoteInfo.ReplaceContent" />
</ol>
<ol v-else>
<!-- 只要有可能请确保受试者使用上述指定的扫描仪器采集影像 -->
<li>{{ $t('trials:equiptResearch:form:item1') }}</li>
<!-- 请确保对每位受试者的扫描参数在整个研究过程中保持一致 -->
@ -203,7 +207,8 @@ export default {
rejectForm: { reason: '' },
btnLoading: false,
isFullscreen: false,
historyVisible: false
historyVisible: false,
siteSurveyNoteInfo: null
}
},
mounted() {
@ -221,9 +226,12 @@ export default {
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.state = res.Result.TrialSiteSurvey.State
this.siteId = res.Result.TrialSiteSurvey.SiteId
this.$refs['baseResearchInfo'].initForm(res.Result.TrialInfo, res.Result.TrialSiteSurvey)
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 => {
@ -236,7 +244,7 @@ export default {
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)
this.$refs['researchEquipments'].initList(res.Result.TrialSiteEquipmentSurveyList, res.Result.TrialSiteSurvey, !(res.Result.SiteSurveyFiledConfig && res.Result.SiteSurveyFiledConfig.ModifyFiledList.length > 0))
this.isExistIncorrect = res.Result.TrialSiteUserSurveyList.every(item => item.IsCorrect === false)
}
this.loading = false
@ -256,7 +264,7 @@ export default {
this.submit(type)
}
},
submit() {
submit(type) {
//
this.$confirm(this.userTypeEnumInt === 0 ? this.$t('trials:researchForm:message:submitWarning') : this.$t('trials:researchForm:message:submitWarning2'), {
type: 'warning',
@ -275,9 +283,9 @@ export default {
this.$emit('refreshPage')
}
// this.$message.success(this.$t('common:message:savedSuccessfully'))
if(type === 'approve'){
if (type === 'approve') {
this.$message.success(this.$t('common:message:approvedSuccessfully'))
}else{
} else {
this.$message.success(this.$t('trials:researchForm:message:savedSuccessfully'))
}
}

View File

@ -35,20 +35,20 @@
</el-form-item>
<!-- 中心名称 -->
<el-form-item :label="$t('trials:researchForm:form:siteName')" prop="SiteId">
<el-select v-model="form.SiteId" filterable style="width:100%;" @change="handleSiteChange">
<el-select v-model="form.TrialSiteId" filterable style="width:100%;" @change="handleSiteChange">
<el-option
v-for="(item,index) of siteOptions"
:key="index"
:label="item.TrialSiteAliasName"
:value="item.SiteId"
:value="item.TrialSiteId"
/>
</el-select>
</el-form-item>
<!-- 中心编号 -->
<el-form-item v-if="form.SiteId" :label="$t('trials:researchForm:form:siteId')">
<el-form-item v-if="form.TrialSiteId" :label="$t('trials:researchForm:form:siteId')">
<el-input v-model="form.TrialSiteCode" disabled />
</el-form-item>
<el-form-item v-if="form.SiteId && isHaveSiteSurveyRecord" label="" style="text-align:right;">
<el-form-item v-if="form.TrialSiteId && isHaveSiteSurveyRecord" label="" style="text-align:right;">
<!-- 更新调研表 -->
<el-link v-if="!form.IsUpdate" type="primary" @click="form.IsUpdate = true">
{{ $t('trials:researchForm:button:updateQsForm') }}
@ -160,7 +160,7 @@ export default {
TrialCode: null, //
IndicationType: null, //
ExperimentName: '',
SiteId: null, //
TrialSiteId: null, //
UserName: null, //
Phone: '', //
EmailOrPhone: '',
@ -170,7 +170,7 @@ export default {
VerificationCode: ''
},
rules: {
SiteId: [
TrialSiteId: [
{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: ['blur'] }
],
UserName: [
@ -243,7 +243,7 @@ export default {
this.form.ReplaceUserEmailOrPhone = ''
}
const param = {
siteId: this.form.SiteId,
trialSiteId: this.form.TrialSiteId,
userName: this.form.UserName,
phone: this.form.Phone,
verificationType: 0,
@ -276,7 +276,7 @@ export default {
},
handleSiteChange(val) {
this.isHaveSiteSurveyRecord = false
var selected = this.siteOptions.find(item => item.SiteId === val)
var selected = this.siteOptions.find(item => item.TrialSiteId === val)
if (selected) {
this.form.TrialSiteCode = selected.TrialSiteCode
this.isHaveSiteSurveyRecord = selected.IsHaveSiteSurveyRecord
@ -294,6 +294,8 @@ export default {
if (res.IsSuccess) {
this.getCode()
this.loading = false
const msg = this.$t('trials:researchForm:tip:sendCode').replace('xxx', this.form.EmailOrPhone)
this.$message.success(msg)
} else {
this.$alert(res.ErrorMessage)
}

View File

@ -106,6 +106,7 @@
<el-date-picker
v-model="clinicalTrialForm.StartTime"
type="year"
value-format="yyyy"
>
</el-date-picker>
</el-form-item>
@ -113,6 +114,7 @@
<el-date-picker
v-model="clinicalTrialForm.EndTime"
type="year"
value-format="yyyy"
>
</el-date-picker>
</el-form-item>
@ -134,6 +136,7 @@
import { getTrialExperience, addOrUpdateTrialExperience, deleteTrialExperience, updateOtherExperience } from '@/api/reviewers'
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
import GcpCertificate from './GcpCertificate.vue'
import moment from 'moment'
const getClinicalTrialDefault = () => {
return {
PhaseId: '',
@ -234,11 +237,11 @@ export default {
var dateTime
if (this.clinicalTrialForm.StartTime) {
dateTime = new Date(this.clinicalTrialForm.StartTime)
this.clinicalTrialForm.StartTime = new Date(dateTime.setDate(dateTime.getDate()+1))
this.clinicalTrialForm.StartTime = moment(new Date(dateTime.setDate(dateTime.getDate()+1))).format('YYYY') + "-01"
}
if (this.clinicalTrialForm.EndTime) {
dateTime = new Date(this.clinicalTrialForm.EndTime)
this.clinicalTrialForm.EndTime = new Date(dateTime.setDate(dateTime.getDate()+1))
this.clinicalTrialForm.EndTime = moment(new Date(dateTime.setDate(dateTime.getDate()+1))).format("YYYY") + "-01"
}
addOrUpdateTrialExperience(this.clinicalTrialForm).then(res => {
this.isDisabled = false

View File

@ -26,6 +26,7 @@
<el-date-picker
v-model="form.PublishTime"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
/>
</el-form-item>
</el-form>

View File

@ -48,6 +48,7 @@
:data="list"
class="table"
@sort-change="handleSortByColumn"
:default-sort="{prop:'PublishTime',order:'descending'}"
>
<el-table-column
type="index"
@ -130,8 +131,8 @@ const searchDataDefault = () => {
return {
Version: null,
UpdateContent: null,
Asc: true,
SortField: '',
Asc: false,
SortField: 'PublishTime',
PageIndex: 1,
PageSize: 20
}

View File

@ -6,7 +6,11 @@
:label="$t('system:loginLog:label:OptType')"
prop="OptType"
>
<el-select v-model="searchData.OptType" clearable style="width:120px;">
<el-select
v-model="searchData.OptType"
clearable
style="width: 120px"
>
<el-option
v-for="item of $d.UserOptType"
:key="'UserOptType' + item.label"
@ -15,15 +19,12 @@
/>
</el-select>
</el-form-item>
<el-form-item
label="IP"
prop="IP"
>
<el-form-item label="IP" prop="IP">
<el-input
v-model="searchData.IP"
size="small"
clearable
style="width:120px;"
style="width: 120px"
/>
</el-form-item>
<el-form-item
@ -34,12 +35,10 @@
v-model="searchData.LoginFaildName"
size="small"
clearable
style="width:120px;"
style="width: 120px"
/>
</el-form-item>
<el-form-item
:label="$t('system:loginLog:label:CreateTime')"
>
<el-form-item :label="$t('system:loginLog:label:CreateTime')">
<el-date-picker
v-model="datetimerange"
type="datetimerange"
@ -55,22 +54,19 @@
size="mini"
@click="getList"
>
{{ $t('common:button:search') }}
{{ $t("common:button:search") }}
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
v-adaptive="{bottomOffset:45}"
v-adaptive="{ bottomOffset: 45 }"
height="100"
:data="list"
class="table"
@sort-change="handleSortByColumn"
>
<el-table-column
type="index"
width="50"
/>
<el-table-column type="index" width="50" />
<el-table-column
:label="$t('system:loginLog:table:OptType')"
prop="OptType"
@ -79,7 +75,7 @@
sortable="custom"
>
<template slot-scope="scope">
{{ $fd('UserOptType',scope.row.OptType) }}
{{ $fd("UserOptType", scope.row.OptType) }}
</template>
</el-table-column>
<el-table-column
@ -89,6 +85,13 @@
sortable="custom"
show-overflow-tooltip
/>
<el-table-column
:label="$t('trials:loginLog:table:IPRegion')"
prop="IPRegion"
min-width="120"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
:label="$t('system:loginLog:table:LoginFaildName')"
prop="LoginFaildName"
@ -111,7 +114,7 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{ $fd('UserType',scope.row.LoginUserTypeEnum) }}
{{ $fd("UserType", scope.row.LoginUserTypeEnum) }}
</template>
</el-table-column>
<el-table-column
@ -129,7 +132,7 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{ $fd('UserType',scope.row.OptUserTypeEnum) }}
{{ $fd("UserType", scope.row.OptUserTypeEnum) }}
</template>
</el-table-column>
<el-table-column
@ -140,7 +143,7 @@
show-overflow-tooltip
/>
</el-table>
<div class="pagination" style="text-align: right;margin-top:5px;">
<div class="pagination" style="text-align: right; margin-top: 5px">
<pagination
:total="total"
:page.sync="searchData.PageIndex"
@ -148,27 +151,26 @@
@pagination="getList"
/>
</div>
</div>
</div>
</template>
<script>
import { getUserLogList } from '@/api/user'
import Pagination from '@/components/Pagination'
import moment from 'moment'
import { getUserLogList } from "@/api/user";
import Pagination from "@/components/Pagination";
import moment from "moment";
const searchDataDefault = () => {
return {
OptType: null,
Ip: '',
LoginFaildName: '',
BeginDate: '',
EndDate: '',
Ip: "",
LoginFaildName: "",
BeginDate: "",
EndDate: "",
Asc: false,
SortField: 'CreateTime',
SortField: "CreateTime",
PageIndex: 1,
PageSize: 20
}
}
PageSize: 20,
};
};
export default {
components: { Pagination },
data() {
@ -178,76 +180,78 @@ export default {
list: [],
total: 0,
loading: false,
datetimerange: []
}
datetimerange: [],
};
},
mounted() {
this.getList()
this.getList();
},
methods: {
getList() {
this.loading = true
getUserLogList(this.searchData).then((res) => {
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
}).catch(() => {
this.loading = false
})
this.loading = true;
getUserLogList(this.searchData)
.then((res) => {
this.loading = false;
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
})
.catch(() => {
this.loading = false;
});
},
handleDatetimeChange(val) {
if (val) {
this.searchData.BeginDate = val[0]
this.searchData.EndDate = val[1]
this.searchData.BeginDate = val[0];
this.searchData.EndDate = val[1];
} else {
this.searchData.BeginDate = ''
this.searchData.EndDate = ''
this.searchData.BeginDate = "";
this.searchData.EndDate = "";
}
},
//
handleReset() {
this.searchData = searchDataDefault()
this.getList()
this.searchData = searchDataDefault();
this.getList();
},
//
handleSortByColumn(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
if (column.order === "ascending") {
this.searchData.Asc = true;
} else {
this.searchData.Asc = false
this.searchData.Asc = false;
}
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
this.searchData.SortField = column.prop;
this.searchData.PageIndex = 1;
this.getList();
},
},
};
</script>
<style lang="scss">
.log {
height: 100%;
box-sizing: border-box;
display: flex;
padding: 10px;
border-radius: 5px;
.left {
display: flex;
flex-direction: column;
width: 0;
flex-grow: 4;
// border-right: 1px solid #ccc;
.filter-container {
display: flex;
align-items: center;
margin: 5px;
}
.data-table {
flex: 1;
padding: 5px 0px;
}
.pagination-container {
text-align: right;
}
}
}
</script>
<style lang="scss">
.log {
height: 100%;
box-sizing: border-box;
display: flex;
padding: 10px;
border-radius: 5px;
.left {
display: flex;
flex-direction: column;
width: 0;
flex-grow: 4;
// border-right: 1px solid #ccc;
.filter-container {
display: flex;
align-items: center;
margin: 5px;
}
.data-table {
flex: 1;
padding: 5px 0px;
}
.pagination-container {
text-align: right;
}
}
}
</style>

View File

@ -11,12 +11,6 @@
@reset="handleReset"
@new="handleAddUser"
/>
<!-- <el-button-->
<!-- type="primary"-->
<!-- size="mini"-->
<!-- style="margin-left:auto;height: 28px;position: absolute;bottom: 0;right: 10px"-->
<!-- @click="handleAddUser"-->
<!-- >{{$t('common:button:new')}}</el-button>-->
</div>
<base-table
v-loading="loading"
@ -68,9 +62,12 @@ const searchDataDefault = () => {
UserType: null,
PageIndex: 1,
PageSize: 20,
Asc: true,
Asc: false,
RealName: '',
SortField: ''
BeginCreateTime: '',
EndCreateTime: '',
CreateTimeArr: [],
SortField: 'CreateTime'
}
}
export default {
@ -163,6 +160,13 @@ export default {
minWidth: 100,
sortable: 'custom',
showOverflowTooltip: true },
{
prop: "CreateTime",
label: this.$t("system:userlist:table:createTime"),
minWidth: 200,
sortable: "custom",
showOverflowTooltip: true,
},
{ type: 'operate',
label: this.$t('common:action:action'),
minWidth: 200,
@ -193,6 +197,13 @@ export default {
width: '120px',
placeholder: ''
},
{
type: "Input",
label: this.$t("system:userlist:label:EMail"),
prop: "EMail",
width: "120px",
placeholder: "",
},
{
type: 'Input',
label: this.$t('system:userlist:label:Organization'),
@ -247,7 +258,14 @@ export default {
options: [], //
props: { label: 'UserType', value: 'Id' }, //
placeholder: ''
}
},
{
type: "Daterange",
label: this.$t("system:userlist:label:CreateTime"),
prop: "CreateTimeArr",
width: "400px",
placeholder: "",
},
],
searchHandle: [
{ label: this.$t('common:button:reset'), type: 'primary', emitKey: 'reset' },
@ -314,7 +332,14 @@ export default {
handleReset() {
this.searchData = searchDataDefault()
this.getList()
}
},
handleSearch() {
if (this.searchData.CreateTimeArr.length > 0) {
this.searchData.BeginCreateTime = this.searchData.CreateTimeArr[0]
this.searchData.EndCreateTime = this.searchData.CreateTimeArr[1]
}
this.getList()
},
}
}
</script>

View File

@ -2,8 +2,13 @@
<div class="trials-navbar" style="position: relative">
<div class="leftMenu">
<img v-if="language === 'zh'" src="@/assets/zzlogo2.png" alt="">
<img v-else-if="NODE_ENV === 'usa'" src="@/assets/zzlogo-usa.png" alt="" />
<img v-else src="@/assets/zzlogo4.png" alt="">
<span style="white-space:nowrap;">
<span style="white-space:nowrap;" class="system-title" v-if="NODE_ENV==='usa'">
<!-- 中心影像系统EICS -->
{{ $t('trials:trials:title:eics_title') }}
</span>
<span style="white-space:nowrap;" v-else>
<!-- 中心影像系统EICS -->
{{ $t('trials:trials:title:eics') }}
</span>
@ -46,6 +51,12 @@
</span>
<!-- 账户信息 -->
<el-menu-item v-if="!hasPermi(['role:air'])" index="4-2">{{ $t('trials:trials-myinfo:title:accountInfo') }}</el-menu-item>
<!-- 管理后台 -->
<el-menu-item
v-if="hasPermi(['role:dev', 'role:oa', 'role:admin'])"
index="4-4"
>{{ $t("trials:trials-myinfo:title:system") }}</el-menu-item
>
<!-- 退出 -->
<el-menu-item index="4-3">{{ $t('trials:trials-myinfo:button:loginout') }}</el-menu-item>
</el-submenu>
@ -68,7 +79,8 @@ export default {
isReviewer: false,
userTypeShortName: zzSessionStorage.getItem('userTypeShortName'),
notice: '',
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
NODE_ENV: process.env.NODE_ENV,
}
},
computed: {
@ -108,6 +120,9 @@ export default {
case '4-3':
this.logout()
break
case "4-4":
this.go("/system");
break;
case '1':
this.go('/trials/trials-workbench')
break

View File

@ -12,29 +12,61 @@
>
<el-row>
<!-- 项目编号 -->
<el-form-item v-if="trialForm.Id!== ''" :label="$t('trials:trials-list:form:trialId')">
<el-input v-model="trialForm.TrialCode" disabled />
<el-form-item
v-if="trialForm.Id !== ''"
:label="$t('trials:trials-list:form:trialId')"
prop="TrialCode"
>
<el-input
v-model="trialForm.TrialCode"
@keyup.native="trialCodekeyUp"
/>
</el-form-item>
<!-- 项目类型 -->
<el-form-item :label="$t('trials:trials-list:form:trialType')" prop="TrialType">
<el-radio-group v-model="trialForm.TrialType " :disabled="trialForm.Id!== ''">
<el-radio v-for="item of $d.TrialType" :disabled="isTestUser && (item.value === 1 || item.value === 2)" :key="item.id" :label="item.value">{{ item.label }}</el-radio>
<el-form-item
:label="$t('trials:trials-list:form:trialType')"
prop="TrialType"
>
<el-radio-group
v-model="trialForm.TrialType"
:disabled="trialForm.Id !== ''"
>
<el-radio
v-for="item of $d.TrialType"
:disabled="isTestUser && (item.value === 1 || item.value === 2)"
:key="item.id"
:label="item.value"
>{{ item.label }}</el-radio
>
</el-radio-group>
</el-form-item>
</el-row>
<el-row>
<!-- 试验名称 -->
<el-form-item :label="$t('trials:trials-list:form:experimentName')" prop="ExperimentName">
<el-input v-model="trialForm.ExperimentName" type="textarea" :autosize="{ minRows: 1, maxRows: 4}" />
<el-form-item
:label="$t('trials:trials-list:form:experimentName')"
prop="ExperimentName"
>
<el-input
v-model="trialForm.ExperimentName"
type="textarea"
:autosize="{ minRows: 1, maxRows: 4 }"
/>
</el-form-item>
<!-- 研究方案号 -->
<el-form-item :label="$t('trials:trials-list:form:researchNumber')" prop="ResearchProgramNo">
<el-form-item
:label="$t('trials:trials-list:form:researchNumber')"
prop="ResearchProgramNo"
>
<el-input v-model="trialForm.ResearchProgramNo" />
</el-form-item>
</el-row>
<el-row>
<!-- 主研单位 -->
<el-form-item :label="$t('trials:trials-list:form:researchUnit')" prop="MainResearchUnit">
<el-form-item
:label="$t('trials:trials-list:form:researchUnit')"
prop="MainResearchUnit"
>
<el-input v-model="trialForm.MainResearchUnit" />
</el-form-item>
<!-- 负责人PI -->
@ -45,9 +77,18 @@
<el-row>
<!-- 申办方 -->
<el-form-item :label="$t('trials:trials-list:form:sponsor')">
<el-select v-model="trialForm.SponsorId">
<el-select
v-model="trialForm.SponsorId"
filterable
allow-create
default-first-option
@change="(value) => handleSelectChange(value, 'sponsor')"
@visible-change="
(flag) => handleSelectVisibbleChange(flag, 'sponsor')
"
>
<el-option
v-for="(item) in sponsorList"
v-for="item in sponsorList"
:key="item.Id"
:label="item.SponsorName"
:value="item.Id"
@ -56,9 +97,16 @@
</el-form-item>
<!-- CRO -->
<el-form-item :label="$t('trials:trials-list:form:cro')">
<el-select v-model="trialForm.CROId">
<el-select
v-model="trialForm.CROId"
filterable
allow-create
default-first-option
@change="(value) => handleSelectChange(value, 'cro')"
@visible-change="(flag) => handleSelectVisibbleChange(flag, 'cro')"
>
<el-option
v-for="(item) of croList"
v-for="item of croList"
:key="item.Id"
:label="item.CROName"
:value="item.Id"
@ -68,7 +116,10 @@
</el-row>
<el-row>
<!-- DeclarationType -->
<el-form-item :label="$t('trials:trials-list:form:declarationType')" prop="DeclarationTypeEnumList">
<el-form-item
:label="$t('trials:trials-list:form:declarationType')"
prop="DeclarationTypeEnumList"
>
<el-select
v-model="trialForm.DeclarationTypeEnumList"
size="small"
@ -77,7 +128,12 @@
@change="handleDeclarationTypeChange"
style="width: 100%"
>
<el-option v-for="item of $d.DeclarationType" :key="item.value" :value="item.value" :label="item.label" />
<el-option
v-for="item of $d.DeclarationType"
:key="item.value"
:value="item.value"
:label="item.label"
/>
</el-select>
</el-form-item>
<!-- Phase -->
@ -100,8 +156,14 @@
</el-row>
<el-row>
<!-- 适应症类型 IndicationType -->
<el-form-item :label="$t('trials:trials-list:form:indicationType')" prop="IndicationTypeId">
<el-select v-model="trialForm.IndicationTypeId" @change="handleIndicationTypeChange">
<el-form-item
:label="$t('trials:trials-list:form:indicationType')"
prop="IndicationTypeId"
>
<el-select
v-model="trialForm.IndicationTypeId"
@change="handleIndicationTypeChange"
>
<!-- <el-option
v-for="item of dictionaryList.IndicationType"
:key="item.Id"
@ -117,9 +179,16 @@
</el-select>
</el-form-item>
<!-- Indication -->
<el-form-item :label="$t('trials:trials-list:form:indication')" prop="IndicationEnum">
<el-form-item
:label="$t('trials:trials-list:form:indication')"
prop="IndicationEnum"
>
<!-- <el-input v-model="trialForm.Indication" />-->
<el-select :disabled="!trialForm.IndicationTypeId" v-if="![37, 38, 39].includes(trialForm.IndicationEnum)" v-model="trialForm.IndicationEnum">
<el-select
:disabled="!trialForm.IndicationTypeId"
v-if="![37, 38, 39].includes(trialForm.IndicationEnum)"
v-model="trialForm.IndicationEnum"
>
<el-option
v-for="item of $d.Indication"
v-show="indicationGrouping === item.raw.ChildGroup"
@ -130,7 +199,11 @@
</el-select>
<el-row v-if="[37, 38, 39].includes(trialForm.IndicationEnum)">
<el-col :span="12">
<el-select :disabled="!trialForm.IndicationTypeId" v-model="trialForm.IndicationEnum" style="width: 100%;margin-right: 10px;">
<el-select
:disabled="!trialForm.IndicationTypeId"
v-model="trialForm.IndicationEnum"
style="width: 100%; margin-right: 10px"
>
<el-option
v-for="item of $d.Indication"
v-show="indicationGrouping === item.raw.ChildGroup"
@ -141,7 +214,10 @@
</el-select>
</el-col>
<el-col :span="12">
<el-input :disabled="!trialForm.IndicationTypeId" v-model="trialForm.Indication" />
<el-input
:disabled="!trialForm.IndicationTypeId"
v-model="trialForm.Indication"
/>
</el-col>
</el-row>
</el-form-item>
@ -166,9 +242,12 @@
</el-form-item>
<!-- Sites -->
<el-form-item :label="$t('trials:trials-list:form:siteCount')">
<el-input-number v-model="trialForm.PlanSiteCount" controls-position="right" :min="0" />
<el-input-number
v-model="trialForm.PlanSiteCount"
controls-position="right"
:min="0"
/>
</el-form-item>
</el-row>
<el-row>
<!-- Expected Patients Num -->
@ -193,14 +272,19 @@
<el-row>
<!-- Visits -->
<el-form-item :label="$t('trials:trials-list:form:visitCount')">
<el-input-number v-model="trialForm.PlanVisitCount" controls-position="right" :min="0" />
<el-input-number
v-model="trialForm.PlanVisitCount"
controls-position="right"
:min="0"
/>
</el-form-item>
</el-row>
<el-row>
<!-- Expedited -->
<el-form-item :label="$t('trials:trials-list:form:expedited')" prop="Expedited">
<el-form-item
:label="$t('trials:trials-list:form:expedited')"
prop="Expedited"
>
<el-select v-model="trialForm.Expedited">
<el-option
v-for="item in expeditedOption"
@ -211,15 +295,21 @@
</el-select>
</el-form-item>
<!-- Turnaround Time -->
<el-form-item :label="$t('trials:trials-list:form:projectCycle')" prop="ProjectCycle">
<el-form-item
:label="$t('trials:trials-list:form:projectCycle')"
prop="ProjectCycle"
>
<el-input v-model="trialForm.ProjectCycle" />
</el-form-item>
</el-row>
<el-row>
<!-- Total Reviewers -->
<el-form-item :label="$t('trials:trials-list:form:totalReviewers')">
<el-input-number v-model="trialForm.TotalReviewers" controls-position="right" :min="0" />
<el-input-number
v-model="trialForm.TotalReviewers"
controls-position="right"
:min="0"
/>
</el-form-item>
<!-- Type of Reviewers -->
<el-form-item :label="$t('trials:trials-list:form:typeofReviewers')">
@ -229,106 +319,95 @@
multiple
clearable
>
<el-option v-for="item of $d.AttendedReviewerType" :key="item.value" :value="item.value" :label="item.label" />
<el-option
v-for="item of $d.AttendedReviewerType"
:key="item.value"
:value="item.value"
:label="item.label"
/>
</el-select>
<!-- <el-row v-if="trialForm.AttendedReviewerTypeEnumList.includes(2)">-->
<!-- <el-col :span="12">-->
<!-- <el-select-->
<!-- v-model="trialForm.AttendedReviewerTypeEnumList"-->
<!-- size="small"-->
<!-- multiple-->
<!-- clearable-->
<!-- style="width: 100%"-->
<!-- >-->
<!-- <el-option v-for="item of $d.AttendedReviewerType" :key="item.value" :value="item.value" :label="item.label" />-->
<!-- </el-select>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-input size="small" v-model="trialForm.AttendedReviewerTypeOther"/>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row v-if="trialForm.AttendedReviewerTypeEnumList.includes(2)">-->
<!-- <el-col :span="12">-->
<!-- <el-select-->
<!-- v-model="trialForm.AttendedReviewerTypeEnumList"-->
<!-- size="small"-->
<!-- multiple-->
<!-- clearable-->
<!-- style="width: 100%"-->
<!-- >-->
<!-- <el-option v-for="item of $d.AttendedReviewerType" :key="item.value" :value="item.value" :label="item.label" />-->
<!-- </el-select>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-input size="small" v-model="trialForm.AttendedReviewerTypeOther"/>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-form-item>
</el-row>
<el-row style="margin-left:190px">
<el-row style="margin-left: 190px">
<el-form-item label="">
<el-button type="primary" :disabled="btnLoading" @click="handleCancel">
{{ $t('trials:trials-list:form:cancel') }}
{{ $t("trials:trials-list:form:cancel") }}
</el-button>
<el-button type="primary" :loading="btnLoading" @click="handleSave">
{{ $t('trials:trials-list:form:save') }}
{{ $t("trials:trials-list:form:save") }}
</el-button>
</el-form-item>
</el-row>
</el-form>
</template>
<script>
import store from '@/store'
import { mapGetters, mapState } from 'vuex'
import { getTrialInfo, addOrUpdateTrial } from '@/api/trials'
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
import { mapState } from "vuex";
import { getTrialInfo, addOrUpdateTrial } from "@/api/trials";
import { getBasicDataSelects } from "@/api/dictionary/dictionary";
import { addOrUpdateSponsor, addOrUpdateCro } from "@/api/dictionary";
import { getAllSponsorList, getAllCROList } from "@/api/global";
export default {
name: 'TrialForm',
name: "TrialForm",
props: {
trialId: {
type: String,
default: ''
}
default: "",
},
},
data() {
const comfirmIndication = (rule, value, callback) => {
if ([37, 38, 39].includes(value)) {
if (!this.trialForm.Indication) {
return callback(new Error(this.$t('common:ruleMessage:specify')))
return callback(new Error(this.$t("common:ruleMessage:specify")));
}
}
callback()
}
// const comfirmDeclarationType = (rule, value, callback) => {
// console.log(value)
// if (value.includes(-1)) {
// if (!this.trialForm.DeclarationTypeOther) {
// return callback(new Error(this.$t('common:ruleMessage:specify')))
// }
// }
// callback()
// }
// const comfirmAttendedReviewerType = (rule, value, callback) => {
// if (value.includes(2)) {
// if (!this.trialForm.AttendedReviewerTypeOther) {
// return callback(new Error(this.$t('common:ruleMessage:specify')))
// }
// }
// callback()
// }
callback();
};
return {
trialForm: {
Id: '',
TrialCode: '',
Id: "",
TrialCode: "",
TrialType: null,
SponsorId: '',
SponsorId: "",
// CriterionIds: [],
CROId: '',
ReviewModeId: '',
CROId: "",
ReviewModeId: "",
ReviewTypeIds: [],
// 0
Expedited: '',
Expedited: "",
ModalityIds: [],
Note: '',
ExpectedPatients: '',
TimePointsPerPatient: '',
ProjectCycle: '',
TotalReviewers: '',
DeclarationTypeId: '',
IndicationTypeId: '',
PhaseId: '',
AttendedReviewerType: '',
Note: "",
ExpectedPatients: "",
TimePointsPerPatient: "",
ProjectCycle: "",
TotalReviewers: "",
DeclarationTypeId: "",
IndicationTypeId: "",
PhaseId: "",
AttendedReviewerType: "",
IsLocked: false,
ResearchProgramNo: '',
ExperimentName: '',
MainResearchUnit: '',
HeadPI: '',
ResearchProgramNo: "",
ExperimentName: "",
MainResearchUnit: "",
HeadPI: "",
PlanSiteCount: null,
PlanVisitCount: null,
IndicationEnum: null,
@ -336,48 +415,113 @@ export default {
AttendedReviewerTypeEnumList: [],
DeclarationTypeEnumList: [],
DeclarationTypeOther: null,
AttendedReviewerTypeOther: null
AttendedReviewerTypeOther: null,
},
indicationGrouping: null,
trialFormRules: {
Code: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
TrialCode: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
{ max: 10, message: `${this.$t("common:ruleMessage:maxLength")} 10` },
],
TrialType: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
],
ResearchProgramNo: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{ max: 100, message: `${this.$t('common:ruleMessage:maxLength')} 100` }
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
{
max: 100,
message: `${this.$t("common:ruleMessage:maxLength")} 100`,
},
],
ExperimentName: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{ max: 100, message: `${this.$t('common:ruleMessage:maxLength')} 100` }
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
{
max: 500,
message: `${this.$t("common:ruleMessage:maxLength")} 500`,
},
],
IndicationEnum: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{ validator: comfirmIndication, trigger: 'blur' }
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
{ validator: comfirmIndication, trigger: "blur" },
],
ProjectCycle: [
{ max: 50, message: `${this.$t("common:ruleMessage:maxLength")} 50` },
],
ProjectCycle: [{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }],
ReviewModeId: [
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
Expedited: [
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
Note: [
{
max: 500,
message: `${this.$t("common:ruleMessage:maxLength")} 500`,
},
],
Note: [{ max: 500, message: `${this.$t('common:ruleMessage:maxLength')} 500` }],
ModalityIds: [
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
PhaseId: [
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
IndicationTypeId: [
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
PhaseId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
IndicationTypeId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
DeclarationTypeEnumList: [
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
ReviewTypeIds: [
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }
]
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
},
btnLoading: false,
isLock: false,
@ -386,132 +530,255 @@ export default {
declarationNum: null,
indicationNum: null,
phaseNum: null,
dictionaryList: {}
}
dictionaryList: {},
sponsorList: [],
croList: [],
};
},
computed: {
...mapGetters(['sponsorList', 'croList']),
...mapState('user', ['isTestUser'])
...mapState("user", ["isTestUser"]),
},
mounted() {
this.initPage()
console.log(this.isTestUser, 'isTestUser')
this.initPage();
console.log(this.isTestUser, "isTestUser");
},
methods: {
initForm() {
this.loading = true
getTrialInfo(this.trialId).then(res => {
this.loading = false
if (res.IsSuccess) {
for (var item in this.trialForm) {
res.Result[item] === '00000000-0000-0000-0000-000000000000' ? '' : this.$set(this.trialForm, item, res.Result[item])
if (item === 'IndicationTypeId') {
this.indicationGrouping = this.$d.IndicationType.filter(v => v.id === res.Result[item])[0].raw.ChildGroup
}
// CRO
handleSelectVisibbleChange(flag, key) {
if (flag) {
if (key === "sponsor") {
this.getAllSponsorList();
}
if (key === "cro") {
this.getAllCROList();
}
}
},
// CRO
async handleSelectChange(value, key) {
let arr = key == "sponsor" ? this.sponsorList : this.croList;
let has = arr.some((item) => item.Id === value);
if (!has) {
let res = null;
try {
if (key === "sponsor") {
let data = {
SponsorName: value,
SponsorNameCN: value,
IsTrialLevel: true,
TrialId: this.trialId,
};
res = await addOrUpdateSponsor(data);
}
if (key === "cro") {
let data = {
CroName: value,
CroNameCN: value,
IsTrialLevel: true,
TrialId: this.trialId,
};
res = await addOrUpdateCro(data);
}
if (res.IsSuccess) {
let obj = {
Id: res.Result,
CROName: value,
SponsorName: value,
};
arr.unshift(obj);
this.$nextTick(() => {
if (key === "sponsor") {
this.trialForm.SponsorId = res.Result;
}
if (key === "cro") {
this.trialForm.CROId = res.Result;
}
});
}
} catch (err) {
console.log(err);
if (key === "sponsor") {
this.trialForm.SponsorId = null;
}
if (key === "cro") {
this.trialForm.CROId = null;
}
}
}).catch(() => { this.loading = false })
}
},
async getAllSponsorList() {
try {
let params = {
TrialId: this.trialId,
};
let res = await getAllSponsorList(params);
if (res.IsSuccess) {
this.sponsorList = res.Result;
}
} catch (err) {
console.log(err);
}
},
async getAllCROList() {
try {
let params = {
TrialId: this.trialId,
};
let res = await getAllCROList(params);
if (res.IsSuccess) {
this.croList = res.Result;
}
} catch (err) {
console.log(err);
}
},
initForm() {
this.loading = true;
getTrialInfo(this.trialId)
.then((res) => {
this.loading = false;
if (res.IsSuccess) {
for (var item in this.trialForm) {
res.Result[item] === "00000000-0000-0000-0000-000000000000"
? ""
: this.$set(this.trialForm, item, res.Result[item]);
if (item === "IndicationTypeId") {
this.indicationGrouping = this.$d.IndicationType.filter(
(v) => v.id === res.Result[item]
)[0].raw.ChildGroup;
}
}
}
})
.catch(() => {
this.loading = false;
});
},
handleSave() {
this.$refs.trialForm.validate(valid => {
this.$refs.trialForm.validate((valid) => {
if (valid) {
this.btnLoading = true
this.btnLoading = true;
if (!this.trialForm.Id) {
this.trialForm.TrialCode = `${this.declarationNum}${this.indicationNum}${this.phaseNum}`
console.log(this.trialForm.TrialCode)
this.trialForm.TrialCode = `${this.declarationNum}${this.indicationNum}${this.phaseNum}`;
console.log(this.trialForm.TrialCode);
}
var params = JSON.parse(JSON.stringify(this.trialForm))
console.log(params)
addOrUpdateTrial(params).then(res => {
this.btnLoading = false
if (!this.trialForm.Id) {
this.trialForm.Id = res.Result
this.$message.success(this.$t('trials:trials-list:message:addedSuccessfully'))
} else {
this.$message.success(this.$t('trials:trials-list:message:updatedSuccessfully'))
}
var params = JSON.parse(JSON.stringify(this.trialForm));
console.log(params);
addOrUpdateTrial(params)
.then((res) => {
this.btnLoading = false;
if (!this.trialForm.Id) {
this.trialForm.Id = res.Result;
this.$message.success(
this.$t("trials:trials-list:message:addedSuccessfully")
);
} else {
this.$message.success(
this.$t("trials:trials-list:message:updatedSuccessfully")
);
}
this.$emit('getList')
this.$emit('closeDialog')
}).catch(() => {
this.btnLoading = false
})
this.$emit("getList");
this.$emit("closeDialog");
})
.catch(() => {
this.btnLoading = false;
});
}
})
});
},
handleCancel() {
this.$emit('closeDialog')
this.$emit("closeDialog");
// this.$refs['trialForm'].resetFields()
},
handleDeclarationTypeChange(val) {
console.log(val)
console.log(val);
if (val.length === 1) {
// this.declarationNum = this.dictionaryList.DeclarationType.filter(item => item.Idd === val)[0].ShowOrder
this.declarationNum = this.$d.DeclarationType.filter(item => item.value === val[0])[0].raw.ShowOrder
this.declarationNum = this.$d.DeclarationType.filter(
(item) => item.value === val[0]
)[0].raw.ShowOrder;
if (this.trialForm.Id) {
const ids = [...this.trialForm.TrialCode]
ids[2] = this.declarationNum
this.trialForm.TrialCode = ids.join('')
const ids = [...this.trialForm.TrialCode];
ids[2] = this.declarationNum;
this.trialForm.TrialCode = ids.join("");
}
} else {
this.declarationNum = 'X'
this.declarationNum = "X";
if (this.trialForm.Id) {
const ids = [...this.trialForm.TrialCode]
ids[2] = this.declarationNum
this.trialForm.TrialCode = ids.join('')
const ids = [...this.trialForm.TrialCode];
ids[2] = this.declarationNum;
this.trialForm.TrialCode = ids.join("");
}
}
},
handleIndicationTypeChange(val) {
this.indicationGrouping = null
this.indicationGrouping = null;
if (val) {
// this.indicationNum = this.dictionaryList.IndicationType.filter(item => item.Id === val)[0].ShowOrder
this.indicationNum = this.$d.IndicationType.filter(item => item.id === val)[0].raw.ShowOrder
this.indicationNum = this.$d.IndicationType.filter(
(item) => item.id === val
)[0].raw.ShowOrder;
if (this.trialForm.Id) {
const ids = [...this.trialForm.TrialCode]
ids[3] = this.indicationNum
this.trialForm.TrialCode = ids.join('')
const ids = [...this.trialForm.TrialCode];
ids[3] = this.indicationNum;
this.trialForm.TrialCode = ids.join("");
}
this.indicationGrouping = this.$d.IndicationType.filter(item => item.id === val)[0].raw.ChildGroup
this.indicationGrouping = this.$d.IndicationType.filter(
(item) => item.id === val
)[0].raw.ChildGroup;
}
this.trialForm.Indication = null
this.trialForm.Indication = null;
},
handlePhaseChange(val) {
if (val) {
// const phase = this.dictionaryList['Trial_Phase']
// this.phaseNum = phase.filter(item => item.Id === val)[0].ShowOrder
this.phaseNum = this.$d.Trial_Phase.filter(item => item.id === val)[0].raw.ShowOrder
this.phaseNum = this.$d.Trial_Phase.filter(
(item) => item.id === val
)[0].raw.ShowOrder;
if (this.trialForm.Id) {
const ids = [...this.trialForm.TrialCode]
ids[4] = this.phaseNum
this.trialForm.TrialCode = ids.join('')
const ids = [...this.trialForm.TrialCode];
ids[4] = this.phaseNum;
this.trialForm.TrialCode = ids.join("");
}
}
},
handleExpectedPatientsChange(val) {
this.trialForm.PlanVisitCount = val * this.trialForm.TimePointsPerPatient
this.trialForm.PlanVisitCount = val * this.trialForm.TimePointsPerPatient;
},
handleTpPerPatientChange(val) {
this.trialForm.PlanVisitCount = val * this.trialForm.ExpectedPatients
this.trialForm.PlanVisitCount = val * this.trialForm.ExpectedPatients;
},
trialCodekeyUp(e) {
e.target.value = e.target.value.replace(/[%]/g, "");
},
async initPage() {
this.loading = true
await this.getDicData()
await store.dispatch('global/getSponsorList')
await store.dispatch('global/getCROList')
this.loading = true;
await this.getDicData();
await this.getAllSponsorList();
await this.getAllCROList();
if (this.trialId) {
this.trialForm.Id = this.trialId
this.initForm()
this.trialForm.Id = this.trialId;
this.initForm();
}
this.loading = false
this.loading = false;
},
getDicData() {
getBasicDataSelects(['DeclarationType', 'IndicationType', 'Modality', 'ReviewMode', 'ReviewType', 'Trial_Phase']).then(res => {
this.dictionaryList = { ...res.Result }
})
}
}
}
getBasicDataSelects([
"DeclarationType",
"IndicationType",
"Modality",
"ReviewMode",
"ReviewType",
"Trial_Phase",
]).then((res) => {
this.dictionaryList = { ...res.Result };
});
},
},
};
</script>
<style>
.trial-Form .el-input,
@ -521,7 +788,7 @@ export default {
.trial-Form .el-textarea {
width: 340px;
}
.trial-Form .el-col .el-input{
.trial-Form .el-col .el-input {
width: 165px;
margin-right: 10px;
}

View File

@ -0,0 +1,245 @@
<template>
<div class="trial-myinfo-right">
<div class="trial-myinfo-right-box">
<div class="trial-myinfo-head">
<!-- 账号信息 -->
{{ $t("trials:trials-myinfo:title:accountInfo") }}
</div>
<el-form label-position="right" label-width="100px">
<!-- 用户名 -->
<el-form-item
:label="$t('trials:trials-myinfo:form:userName')"
style="margin-bottom: 5px"
prop="UserName"
>
<span>{{ user.UserName }}</span>
</el-form-item>
<el-form-item label="" style="position: relative" prop="UserName">
<el-input
v-model="userForm.UserName"
:placeholder="$t('trials:trials-myinfo:form:userName')"
/>
<!-- 修改 -->
<el-button
:disabled="!userForm.UserName"
class="saveBtn"
type="primary"
size="small"
@click="setNewUserName"
>
{{ $t("trials:trials-myinfo:button:update") }}
</el-button>
</el-form-item>
<!-- 电话 -->
<el-form-item
:label="$t('trials:trials-myinfo:form:phone')"
style="margin-bottom: 5px"
prop="UserName"
>
<span>{{ user.Phone }}</span>
</el-form-item>
<el-form-item label="" style="position: relative" prop="UserName">
<el-input
v-model="userForm.Phone"
:placeholder="$t('trials:trials-myinfo:form:phone')"
/>
<!-- 修改 -->
<el-button
:disabled="!userForm.Phone"
class="saveBtn"
type="primary"
size="small"
@click="setNewPhone"
>
{{ $t("trials:trials-myinfo:button:update") }}
</el-button>
</el-form-item>
<!-- 邮箱 -->
<el-form-item
:label="$t('trials:trials-myinfo:form:email')"
style="margin-bottom: 5px"
prop="UserName"
>
<span>{{ user.EMail }}</span>
</el-form-item>
<el-form-item
label=""
style="margin-bottom: 10px; position: relative"
prop="EMail"
v-if="IsCanConnectInternet"
>
<el-input
v-model="userForm.EMail"
@input="handleEmailChange"
:placeholder="$t('trials:trials-myinfo:form:email')"
/>
<el-button
class="sendCode"
:disabled="sendDisabled"
type="primary"
size="mini"
@click="sendVerificationCode"
>{{ sendTitle }}</el-button
>
</el-form-item>
<el-form-item
label=""
style="position: relative"
prop="VerificationCode"
v-if="IsCanConnectInternet"
>
<el-input
v-model="userForm.VerificationCode"
:placeholder="$t('trials:researchForm:form:verifyCode')"
/>
<!-- 修改 -->
<el-button
:disabled="!userForm.EMail || !userForm.VerificationCode"
class="saveBtn"
type="primary"
size="small"
@click="setNewEmail"
>
{{ $t("trials:trials-myinfo:button:update") }}
</el-button>
</el-form-item>
</el-form>
</div>
<password />
</div>
</template>
<script>
import {
sendVerificationCode,
setNewEmail,
setNewPhone,
setNewUserName,
} from "@/api/system/user.js";
import { removeToken } from "@/utils/auth";
import password from "./password.vue";
var timer = "";
var countdown = 60;
export default {
name: "account",
components: { password },
props: {
user: {
required: true,
default: () => {
return {};
},
},
IsCanConnectInternet: {
required: true,
default: true,
},
},
data() {
return {
userForm: {},
sendDisabled: true,
sendTitle: this.$t("trials:trials-myinfo:button:getVCode"),
};
},
methods: {
setNewEmail() {
setNewEmail(this.userForm.EMail, this.userForm.VerificationCode).then(
() => {
this.userForm.EMail = "";
this.userForm.VerificationCode = "";
this.$message.success(
this.$t("trials:trials-myinfo:message:updateSuccessfully")
);
this.$emit("getUserInfo");
}
);
},
async setNewUserName() {
try {
let confirm = await this.$confirm(
this.$t("trials:trials-myInfo:confirmMessage:updateUserName"),
{
type: "warning",
distinguishCancelAndClose: true,
confirmButtonText: this.$t("common:button:confirm"),
cancelButtonText: this.$t("common:button:cancel"),
}
);
if (confirm !== "confirm") return;
let res = await setNewUserName(this.userForm.UserName);
if (res.IsSuccess) {
this.userForm.UserName = "";
this.$message.success(
this.$t("trials:trials-myinfo:message:updateSuccessfully")
);
this.$emit("getUserInfo");
removeToken();
this.logout();
}
} catch (err) {
console.log(err);
}
},
setNewPhone() {
setNewPhone(this.userForm.Phone).then(() => {
this.userForm.Phone = "";
this.$message.success(
this.$t("trials:trials-myinfo:message:updateSuccessfully")
);
this.$emit("getUserInfo");
});
},
handleEmailChange() {
var reg =
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/;
if (this.userForm.EMail && reg.test(this.userForm.EMail)) {
this.sendDisabled = false;
} else {
this.sendDisabled = true;
}
},
sendVerificationCode() {
sendVerificationCode(this.userForm.EMail).then(() => {
this.settime(this);
//
this.$message.success(
this.$t("trials:trials-myinfo:message:sendSuccessfully")
);
});
},
settime(obj) {
if (countdown === 0) {
obj.sendDisabled = false;
obj.sendTitle = this.$t("trials:trials-myinfo:button:getVCode"); // ''
countdown = 60;
clearTimeout(timer);
return;
} else {
obj.sendDisabled = true;
obj.sendTitle = `${this.$t(
"trials:trials-myinfo:button:wait"
)}(${countdown}s)`;
countdown--;
// eslint-disable-next-line no-self-assign
countdown = countdown;
timer = setTimeout(function () {
obj.settime(obj);
}, 1000);
}
},
async logout() {
/* eslint-disable */
var loginType = zzSessionStorage.getItem("loginType");
await this.$store.dispatch("user/logout");
if (loginType) {
this.$router.push(`/login?loginType=${loginType}`);
} else {
this.$router.push(`/login`);
}
this.$i18n.locale = "zh";
this.setLanguage("zh");
this.$updateDictionary();
},
},
};
</script>

View File

@ -1,390 +1,187 @@
<template>
<div class="trial-myinfo">
<div class="trial-myinfo-left">
<div class="trial-myinfo-left-top">
<div class="trial-myinfo-head">
<!-- 个人头像 -->
{{ $t('trials:trials-myinfo:title:avater') }}
</div>
<div class="trial-myinfo-body">
<div>
{{ user.LastName }}
</div>
</div>
</div>
<div class="trial-myinfo-left-bottom">
<div class="trial-myinfo-head">
<!-- 用户基本信息 -->
{{ $t('trials:trials-myinfo:title:basicInfo') }}
</div>
<el-form ref="userForm" label-position="right" :model="user" :rules="userFormRules" label-width="120px">
<el-form-item v-if="user.Code" label="ID: " prop="Code">
<el-input v-model="user.Code" disabled />
</el-form-item>
<!-- -->
<el-form-item :disabled="user.UserTypeEnum === 8" :label="$t('trials:trials-myinfo:form:surname')" prop="LastName">
<el-input v-model="user.LastName" :placeholder="$t('trials:trials-myinfo:form:surname')"/>
</el-form-item>
<!-- -->
<el-form-item :disabled="user.UserTypeEnum === 8" :label="$t('trials:trials-myinfo:form:givenname')" prop="FirstName">
<el-input v-model="user.FirstName" :placeholder="$t('trials:trials-myinfo:form:givenname')"/>
</el-form-item>
<!-- 性别 -->
<el-form-item :label="$t('trials:trials-myinfo:form:gender')" prop="Sex" style="margin-right:40px;">
<el-radio-group v-model="user.Sex">
<el-radio :label="1">Male</el-radio>
<el-radio :label="0">Female</el-radio>
</el-radio-group>
</el-form-item>
<!-- 单位 -->
<el-form-item :label="$t('trials:trials-myinfo:form:organization')" prop="OrganizationName">
<el-input v-model="user.OrganizationName" :placeholder="$t('trials:trials-myinfo:form:organization')"/>
</el-form-item>
<!-- 部门 -->
<el-form-item :label="$t('trials:trials-myinfo:form:department')" prop="DepartmentName">
<el-input v-model="user.DepartmentName" :placeholder="$t('trials:trials-myinfo:form:organization')"/>
</el-form-item>
<!-- 职位 -->
<el-form-item :label="$t('trials:trials-myinfo:form:position')" prop="PositionName">
<el-input v-model="user.PositionName" :placeholder="$t('trials:trials-myinfo:form:position')"/>
</el-form-item>
</el-form>
<!-- 保存 -->
<el-button
class="trial-info-btn"
type="primary"
size="small"
@click="handleSave"
>
{{ $t('trials:trials-myinfo:button:save') }}
</el-button>
</div>
</div>
<div class="trial-myinfo-right">
<div class="trial-myinfo-right-box">
<div class="trial-myinfo-head">
<!-- 账号信息 -->
{{ $t('trials:trials-myinfo:title:accountInfo') }}
</div>
<el-form label-position="right" label-width="180px">
<!-- 用户名 -->
<el-form-item :label="$t('trials:trials-myinfo:form:userName')" style="margin-bottom: 5px;" prop="UserName">
<span>{{ user.UserName }}</span>
</el-form-item>
<el-form-item label="" style="position: relative" prop="UserName">
<el-input v-model="userForm.UserName" :placeholder="$t('trials:trials-myinfo:form:userName')"/>
<!-- 修改 -->
<el-button :disabled="!userForm.UserName" class="saveBtn" type="primary" size="small" @click="setNewUserName">
{{ $t('trials:trials-myinfo:button:update') }}
</el-button>
</el-form-item>
<!-- 电话 -->
<el-form-item :label="$t('trials:trials-myinfo:form:phone')" style="margin-bottom: 5px;" prop="UserName">
<span>{{ user.Phone }}</span>
</el-form-item>
<el-form-item label="" style="position: relative" prop="UserName">
<el-input v-model="userForm.Phone" :placeholder="$t('trials:trials-myinfo:form:phone')"/>
<!-- 修改 -->
<el-button :disabled="!userForm.Phone" class="saveBtn" type="primary" size="small" @click="setNewPhone">
{{ $t('trials:trials-myinfo:button:update') }}
</el-button>
</el-form-item>
<!-- 邮箱 -->
<el-form-item :label="$t('trials:trials-myinfo:form:email')" style="margin-bottom: 5px;" prop="UserName">
<span>{{ user.EMail }}</span>
</el-form-item>
<el-form-item label="" style="margin-bottom: 10px;position: relative" prop="EMail">
<el-input v-model="userForm.EMail" @input="handleEmailChange" :placeholder="$t('trials:trials-myinfo:form:email')"/>
<el-button class="sendCode" :disabled="sendDisabled" type="primary" size="mini" @click="sendVerificationCode">{{ sendTitle }}</el-button>
</el-form-item>
<el-form-item label="" style="position: relative" prop="VerificationCode">
<el-input v-model="userForm.VerificationCode" :placeholder="$t('trials:researchForm:form:verifyCode')"/>
<!-- 修改 -->
<el-button :disabled="!userForm.EMail || !userForm.VerificationCode" class="saveBtn" type="primary" size="small" @click="setNewEmail">
{{ $t('trials:trials-myinfo:button:update') }}
</el-button>
</el-form-item>
</el-form>
</div>
<div class="trial-myinfo-right-box">
<div class="trial-myinfo-head">
<!-- 修改密码 -->
{{ $t('trials:trials-myinfo:title:updatePaasord') }}
</div>
<el-form ref="passwordForm" label-position="right" :model="password" :rules="passwordFormRules" label-width="180px">
<!-- 旧密码 -->
<el-form-item :label="$t('recompose:form:oldPassword')" prop="OldPassWord">
<el-input v-model="password.OldPassWord" type="password" show-password auto-complete="new-password" :placeholder="$t('recompose:form:oldPassword')"/>
</el-form-item>
<!-- 新密码 -->
<el-form-item class="my_new_pwd" :label="$t('recompose:form:newPassword')" prop="NewPassWord">
<el-input v-model="password.NewPassWord" type="password" show-password auto-complete="new-password" :placeholder="$t('recompose:form:newPassword')"/>
</el-form-item>
<!-- 确认密码 -->
<el-form-item :label="$t('recompose:form:confirmPassword')" prop="ConfirmPassWord">
<el-input v-model="password.ConfirmPassWord" type="password" show-password auto-complete="new-password" :placeholder="$t('recompose:form:confirmPassword')"/>
</el-form-item>
</el-form>
<el-button
type="primary"
size="small"
class="trial-info-btn"
@click="save"
>
{{ $t('trials:trials-myinfo:button:save') }}
</el-button>
</div>
<el-menu
:default-active="activeIndex"
@select="handleSelect"
class="el-menu-demo"
style="width: 200px"
>
<el-menu-item index="1">{{
$t("trials:trials-myinfo:menuTitle:mine")
}}</el-menu-item>
<el-menu-item index="2">{{
$t("trials:trials-myinfo:menuTitle:account")
}}</el-menu-item>
<el-menu-item index="3">{{
$t("trials:trials-myinfo:menuTitle:loginLog")
}}</el-menu-item>
</el-menu>
<div class="contentBox">
<mine
:user="user"
:userTypeOptions="userTypeOptions"
v-if="activeIndex === '1'"
@getUserInfo="getUserInfo"
/>
<account
:user="user"
@getUserInfo="getUserInfo"
:IsCanConnectInternet="IsCanConnectInternet"
v-if="activeIndex === '2'"
/>
<login-log v-if="activeIndex === '3'" :id="userId" :isMine="true" />
</div>
</div>
</template>
<script>
import { getUserTypeList, getUser, updateUser, modifyPassword } from '@/api/admin.js'
import { sendVerificationCode, setNewEmail, setNewPhone, setNewUserName } from '@/api/system/user.js'
import md5 from 'js-md5'
var timer = ''
var countdown = 60
import store from '@/store'
import {mapGetters, mapMutations} from 'vuex'
import mine from "./mine.vue";
import account from "./account.vue";
import loginLog from "@/views/trials/trials-panel/trial-summary/login-log";
import { getUserTypeList, getUser } from "@/api/admin.js";
import store from "@/store";
import { mapGetters } from "vuex";
export default {
name: 'TrialsMyinfo',
name: "TrialsMyinfo",
components: { mine, account, "login-log": loginLog },
data() {
return {
activeIndex: "1",
userTypeOptions: [],
user: {},
password: {},
userForm: {},
sendDisabled: true,
sendTitle: this.$t('trials:trials-myinfo:button:getVCode'),
userFormRules: {
UserName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
UserTypeId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
IsZhiZhun: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
OrganizationName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
LastName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }, { max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }],
FirstName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }, { max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }],
Sex: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
Status: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }]
},
passwordFormRules: {
OldPassWord: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
NewPassWord: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{
required: true,
trigger: 'blur',
validator: this.$validatePassword
},
],
ConfirmPassWord: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{
required: true,
trigger: 'blur',
validator: this.$validatePassword
},
]
}
}
IsCanConnectInternet: true, //
};
},
computed: {
...mapGetters(['userId', 'name'])
...mapGetters(["userId", "userName"]),
},
mounted() {
this.getUserInfo()
this.getUserTypeList()
this.getUserInfo();
this.getUserTypeList();
},
methods: {
...mapMutations({ setLanguage: 'lang/setLanguage' }),
handleSave() {
this.$refs.userForm.validate(valid => {
console.log(valid)
if (valid) {
this.isDisabled = true
const selectedUserType = this.userTypeOptions.filter((item) => {
return item.Id === this.user.UserTypeId
})
if (selectedUserType.length > 0) {
this.user.userTypeEnum = selectedUserType[0].UserTypeEnum
}
// if (this.user.IsZhiZhun === true) {
// this.user.OrganizationName = 'ZhiZhun'
// }
if (this.user.Id) {
updateUser(this.user).then(res => {
this.isDisabled = false
this.$message.success(this.$t('trials:trials-myinfo:message:updateSuccessfully'))
this.getUserInfo()
}).catch(() => { this.isDisabled = false })
}
}
})
},
handleEmailChange() {
var reg = /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
if (this.userForm.EMail && reg.test(this.userForm.EMail)) {
this.sendDisabled = false
} else {
this.sendDisabled = true
}
},
sendVerificationCode() {
sendVerificationCode(this.userForm.EMail).then(() => {
this.settime(this)
//
this.$message.success(this.$t('trials:trials-myinfo:message:sendSuccessfully'))
})
},
save() {
this.$refs.passwordForm.validate(valid => {
if (valid) {
if (this.password.NewPassWord !== this.password.ConfirmPassWord) {
this.$alert(this.$t('passwordReset:formRule:passwordsDiffer'))
return
}
const param = {
UserId: this.userId,
NewPassWord: md5(this.password.NewPassWord),
OldPassWord: md5(this.password.OldPassWord)
}
modifyPassword(param).then(res => {
if (res.IsSuccess) {
// ,
this.$message.success(this.$t('trials:trials-myinfo:message:modifyPWSuccessfully'))
setTimeout(() => {
this.logout()
}, 1000)
}
})
}
})
},
setNewEmail() {
setNewEmail(this.userForm.EMail, this.userForm.VerificationCode).then(() => {
this.userForm.EMail = ''
this.userForm.VerificationCode = ''
this.$message.success(this.$t('trials:trials-myinfo:message:updateSuccessfully'))
this.getUserInfo()
})
},
setNewUserName() {
setNewUserName(this.userForm.UserName).then(() => {
this.$store.dispatch('user/changeUserName', this.userForm.UserName).then((res) => {
this.user.UserName = this.userForm.UserName
this.userForm.UserName = ''
this.$message.success(this.$t('trials:trials-myinfo:message:modifyPWSuccessfully'))
this.logout()
})
})
},
setNewPhone() {
setNewPhone(this.userForm.Phone).then(() => {
this.userForm.Phone = ''
this.$message.success(this.$t('trials:trials-myinfo:message:updateSuccessfully'))
this.getUserInfo()
})
handleSelect(index) {
this.activeIndex = index;
},
getUserInfo() {
const loading = this.$loading({
fullscreen: false,
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.07)'
})
getUser(this.userId).then(async res => {
this.user = res.Result
/* eslint-disable */
zzSessionStorage.setItem('realName', this.user.RealName)
await store.dispatch('user/updateInfo')
loading.close()
}).catch(() => { loading.close() })
},
settime(obj) {
if (countdown === 0) {
obj.sendDisabled = false
obj.sendTitle = this.$t('trials:trials-myinfo:button:getVCode')// ''
countdown = 60
clearTimeout(timer)
return
} else {
obj.sendDisabled = true
obj.sendTitle = `${this.$t('trials:trials-myinfo:button:wait')}(${countdown}s)`
countdown--
// eslint-disable-next-line no-self-assign
countdown = countdown
timer = setTimeout(function() {
obj.settime(obj)
}, 1000)
}
text: "Loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.07)",
});
getUser(this.userId)
.then(async (res) => {
this.user = res.Result;
/* eslint-disable */
zzSessionStorage.setItem("realName", this.user.RealName);
await store.dispatch("user/updateInfo");
loading.close();
})
.catch(() => {
loading.close();
});
},
getUserTypeList() {
getUserTypeList().then(res => {
getUserTypeList().then((res) => {
if (res.IsSuccess) {
this.userTypeOptions = res.Result
this.userTypeOptions = res.Result;
}
})
});
},
async logout() {
/* eslint-disable */
var loginType = zzSessionStorage.getItem('loginType')
await this.$store.dispatch('user/logout')
if (loginType) {
this.$router.push(`/login?loginType=${loginType}`)
} else {
this.$router.push(`/login`)
}
this.$i18n.locale = 'zh'
this.setLanguage('zh')
this.$updateDictionary()
}
}
}
},
};
</script>
<style lang="scss">
.trial-myinfo{
flex: 1;overflow: auto;display: flex;flex-direction: row;justify-content: space-around;
.trial-myinfo-head{
position: absolute;top: 40px;left: -10%;font-size: 14px;
}
.trial-myinfo-left{
overflow: auto;
background: #fff;width: calc(50% - 9px);margin: 6px 0;
padding-bottom: 50px;
.trial-myinfo-left-top{
width: 70%;padding-top: 100px;position: relative;margin: 0 auto;margin-bottom: 10px;
}
}
.trial-myinfo-body{
width:160px;height:160px;border-radius: 50%;background: #428bca;display: flex;justify-content: center;align-items: center;
div{
color:#fff;font-size: 30px;
}
}
.saveBtn{
position: absolute;right: -10px;top:2px;transform: translateX(100%)
}
.trial-info-btn{
position: absolute;bottom: -60px;left: calc(100% + 10px);min-width: 97px;
}
.trial-myinfo-left-bottom{
width: 70%;padding-top: 100px;position: relative;margin: 0 auto;
}
.trial-myinfo-right{
overflow: auto;
background: #fff;width: calc(50% - 9px);margin: 6px 0;
padding-bottom: 50px;
.sendCode {
position: absolute;right: -10px;top: 50%;transform: translate(100%, -50%);
}
.trial-myinfo-right-box{
width: 70%;padding-top: 100px;position: relative;margin: 0 auto;
.trial-myinfo {
flex: 1;
overflow: auto;
display: flex;
flex-direction: row;
justify-content: space-around;
.contentBox {
width: calc(100% - 220px);
background-color: #fff;
padding: 0 20px;
height: 100%;
overflow: auto;
// padding-bottom: 50px;
}
.trial-myinfo-head {
position: absolute;
top: 40px;
left: 20px;
font-size: 14px;
}
.trial-myinfo-left {
overflow: auto;
background: #fff;
// width: calc(50% - 9px);
// margin: 6px 0;
height: 100%;
// padding-bottom: 50px;
.trial-myinfo-left-top {
width: 70%;
padding-top: 100px;
position: relative;
// margin: 0 auto;
margin-bottom: 10px;
.trial-myinfo-body {
width: 160px;
height: 160px;
border-radius: 50%;
background: #428bca;
display: flex;
justify-content: center;
align-items: center;
margin-left: 30px;
div {
color: #fff;
font-size: 30px;
}
}
}
}
</style>
<style scoped>
.saveBtn {
position: absolute;
right: -10px;
top: 2px;
transform: translateX(100%);
}
.trial-info-btn {
position: absolute;
bottom: -60px;
left: 10px;
min-width: 97px;
}
.trial-myinfo-left-bottom {
width: 40%;
padding-top: 100px;
position: relative;
// margin: 0 auto;
}
.trial-myinfo-right {
overflow: auto;
background: #fff;
// width: calc(50% - 9px);
// margin: 6px 0;
height: 100%;
.sendCode {
position: absolute;
right: -10px;
top: 50%;
transform: translate(100%, -50%);
}
.trial-myinfo-right-box {
width: 40%;
padding-top: 100px;
position: relative;
// margin: 0 auto;
}
}
}
</style>

View File

@ -0,0 +1,199 @@
<template>
<div class="trial-myinfo-left">
<div class="trial-myinfo-left-bottom">
<div class="trial-myinfo-head">
<!-- 用户基本信息 -->
{{ $t("trials:trials-myinfo:title:basicInfo") }}
</div>
<el-form
ref="userForm"
label-position="right"
:model="user"
:rules="userFormRules"
label-width="120px"
>
<el-form-item v-if="user.Code" label="ID: " prop="Code">
<el-input v-model="user.Code" disabled />
</el-form-item>
<!-- -->
<el-form-item
:disabled="user.UserTypeEnum === 8"
:label="$t('trials:trials-myinfo:form:surname')"
prop="LastName"
>
<el-input
v-model="user.LastName"
:placeholder="$t('trials:trials-myinfo:form:surname')"
/>
</el-form-item>
<!-- -->
<el-form-item
:disabled="user.UserTypeEnum === 8"
:label="$t('trials:trials-myinfo:form:givenname')"
prop="FirstName"
>
<el-input
v-model="user.FirstName"
:placeholder="$t('trials:trials-myinfo:form:givenname')"
/>
</el-form-item>
<!-- 单位 -->
<el-form-item
:label="$t('trials:trials-myinfo:form:organization')"
prop="OrganizationName"
>
<el-input
:disabled="user.IsZhiZhun"
v-model="user.OrganizationName"
:placeholder="$t('trials:trials-myinfo:form:organization')"
/>
</el-form-item>
<!-- 部门 -->
<el-form-item
:label="$t('trials:trials-myinfo:form:department')"
prop="DepartmentName"
>
<el-input
v-model="user.DepartmentName"
:placeholder="$t('trials:trials-myinfo:form:organization')"
/>
</el-form-item>
<!-- 职位 -->
<el-form-item
:label="$t('trials:trials-myinfo:form:position')"
prop="PositionName"
>
<el-input
v-model="user.PositionName"
:placeholder="$t('trials:trials-myinfo:form:position')"
/>
</el-form-item>
</el-form>
<!-- 保存 -->
<el-button
class="trial-info-btn"
type="primary"
size="small"
@click="handleSave"
>
{{ $t("trials:trials-myinfo:button:save") }}
</el-button>
</div>
</div>
</template>
<script>
import { updateUser } from "@/api/admin.js";
export default {
name: "mine",
props: {
user: {
required: true,
default: () => {
return {};
},
},
userTypeOptions: {
required: true,
default: () => {
return [];
},
},
},
data() {
return {
userFormRules: {
UserName: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
],
UserTypeId: [
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
IsZhiZhun: [
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
OrganizationName: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
],
LastName: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
{ max: 50, message: `${this.$t("common:ruleMessage:maxLength")} 50` },
],
FirstName: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
{ max: 50, message: `${this.$t("common:ruleMessage:maxLength")} 50` },
],
Sex: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
],
Status: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
],
},
};
},
methods: {
handleSave() {
this.$refs.userForm.validate((valid) => {
console.log(valid);
if (valid) {
this.isDisabled = true;
const selectedUserType = this.userTypeOptions.filter((item) => {
return item.Id === this.user.UserTypeId;
});
if (selectedUserType.length > 0) {
this.user.userTypeEnum = selectedUserType[0].UserTypeEnum;
}
// if (this.user.IsZhiZhun === true) {
// this.user.OrganizationName = 'ZhiZhun'
// }
if (this.user.Id) {
updateUser(this.user)
.then((res) => {
this.isDisabled = false;
this.$message.success(
this.$t("trials:trials-myinfo:message:updateSuccessfully")
);
this.$emit("getUserInfo");
})
.catch(() => {
this.isDisabled = false;
});
}
}
});
},
},
};
</script>

View File

@ -0,0 +1,160 @@
<template>
<div class="trial-myinfo-right-box">
<div class="trial-myinfo-head">
<!-- 修改密码 -->
{{ $t("trials:trials-myinfo:title:updatePaasord") }}
</div>
<el-form
ref="passwordForm"
label-position="right"
:model="password"
:rules="passwordFormRules"
label-width="180px"
>
<!-- 旧密码 -->
<el-form-item
:label="$t('recompose:form:oldPassword')"
prop="OldPassWord"
>
<el-input
v-model="password.OldPassWord"
type="password"
show-password
auto-complete="new-password"
:placeholder="$t('recompose:form:oldPassword')"
/>
</el-form-item>
<!-- 新密码 -->
<el-form-item
:label="$t('recompose:form:newPassword')"
prop="NewPassWord"
>
<el-input
v-model="password.NewPassWord"
type="password"
show-password
auto-complete="new-password"
:placeholder="$t('recompose:form:newPassword')"
/>
</el-form-item>
<!-- 确认密码 -->
<el-form-item
:label="$t('recompose:form:confirmPassword')"
prop="ConfirmPassWord"
>
<el-input
v-model="password.ConfirmPassWord"
type="password"
show-password
auto-complete="new-password"
:placeholder="$t('recompose:form:confirmPassword')"
/>
</el-form-item>
</el-form>
<el-button type="primary" size="small" class="trial-info-btn" @click="save">
{{ $t("trials:trials-myinfo:button:save") }}
</el-button>
</div>
</template>
<script>
import md5 from "js-md5";
import { mapGetters, mapMutations } from "vuex";
import { modifyPassword } from "@/api/admin.js";
import { removeToken } from "@/utils/auth";
export default {
name: "password",
data() {
return {
password: {},
passwordFormRules: {
OldPassWord: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
],
NewPassWord: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
{
required: true,
trigger: "blur",
validator: this.$validatePassword,
},
],
ConfirmPassWord: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
{
required: true,
trigger: "blur",
validator: this.$validatePassword,
},
],
},
};
},
computed: {
...mapGetters(["userId"]),
},
methods: {
...mapMutations({ setLanguage: "lang/setLanguage" }),
async save() {
try {
let validate = await this.$refs.passwordForm.validate();
if (!validate) return;
if (this.password.NewPassWord !== this.password.ConfirmPassWord) {
this.$alert(this.$t("passwordReset:formRule:passwordsDiffer"));
return;
}
let confirm = await this.$confirm(
this.$t("trials:trials-myInfo:confirmMessage:updatePassWord"),
{
type: "warning",
distinguishCancelAndClose: true,
confirmButtonText: this.$t("common:button:confirm"),
cancelButtonText: this.$t("common:button:cancel"),
}
);
if (confirm !== "confirm") return;
const param = {
UserId: this.userId,
NewPassWord: md5(this.password.NewPassWord),
OldPassWord: md5(this.password.OldPassWord),
};
let res = await modifyPassword(param);
if (res.IsSuccess) {
// ,
this.$message.success(
this.$t("trials:trials-myinfo:message:modifyPWSuccessfully")
);
removeToken();
this.logout();
}
} catch (err) {
console.log(err);
}
},
async logout() {
/* eslint-disable */
var loginType = zzSessionStorage.getItem("loginType");
await this.$store.dispatch("user/logout");
if (loginType) {
this.$router.push(`/login?loginType=${loginType}`);
} else {
this.$router.push(`/login`);
}
this.$i18n.locale = "zh";
this.setLanguage("zh");
this.$updateDictionary();
},
},
};
</script>

View File

@ -47,6 +47,7 @@
>
<el-option
v-for="item of userTypeOptions"
v-show="item.UserTypeEnum !== 26 && item.UserTypeEnum !== 27"
:key="item.Id"
:label="item.UserTypeShortName"
:value="item.Id"

View File

@ -2,6 +2,15 @@
<BaseContainer>
<template slot="search-container">
<el-form :inline="true">
<!-- Name -->
<el-form-item :label="$t('trials:seletctedReviews:table:name')">
<el-input
v-model="listQuery.Name"
size="small"
clearable
style="width: 120px"
/>
</el-form-item>
<!-- Modality -->
<el-form-item :label="$t('trials:seletctedReviews:form:modality')">
<el-select
@ -144,14 +153,14 @@
sortable="custom"
width="120"
/>
<!-- ID -->
<!-- <el-table-column-->
<!-- prop="ReviewerCode"-->
<!-- :label="$t('trials:seletctedReviews:table:id')"-->
<!-- show-overflow-tooltip-->
<!-- sortable="custom"-->
<!-- width="120"-->
<!-- />-->
<el-table-column
prop="DoctorUserName"
:label="$t('trials:seletctedReviews:table:doctorUserName')"
show-overflow-tooltip
sortable="custom"
width="120"
/>
<!-- Status -->
<el-table-column
prop="DoctorTrialState"
@ -266,6 +275,7 @@ import { getSelectionReviewerList, selectReviewers } from '@/api/trials'
const getListQueryDefault = () => {
return {
TrialId: '',
Name:'',
ReadingTypeIds: [],
SubspecialityIds: [],
PageIndex: 1,

View File

@ -192,7 +192,11 @@ export default {
this.getList()
//
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$emit('nextStep', 'approval')
if(res.Result.IsHaveSPMOrCPM){
this.$emit('nextStep', 'approval')
}else{
this.$emit('nextStep', 'confirmation')
}
}
}).catch(() => {
this.loading = false

View File

@ -11,28 +11,37 @@
<label class="el-label">{{ $t('trials:trials-list:form:indication:') }}</label>
<span>{{$fd('Indication', trialInfo.IndicationEnum)}}{{trialInfo.Indication ? '-' + trialInfo.Indication : '' }}</span>
</div>
<div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:criterion:') }}</label>
<span>{{ (trialInfo.CriterionList && trialInfo.CriterionList.length>0)? trialInfo.CriterionList.join(', '): '' }}</span>
</div>
<div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:modality:') }}</label>
<label class="el-label">{{ $t('trials:trials-list:form:declarationType:') }}</label>
<el-tooltip
class="item"
:content="trialInfo.Modalitys"
:content="trialInfo.DeclarationTypeEnumList.map(v => $fd('DeclarationType', v)).join(', ')"
placement="top"
>
<span>{{ trialInfo.Modalitys }}</span>
<span>{{ trialInfo.DeclarationTypeEnumList.map(v => $fd('DeclarationType', v)).join(', ') }}</span>
</el-tooltip>
</div>
<div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:criterion:') }}</label>
<el-tooltip
class="item"
:content="(trialInfo.CriterionList && trialInfo.CriterionList.length>0)? trialInfo.CriterionList.join(', '): ''"
placement="top"
>
<span>{{ (trialInfo.CriterionList && trialInfo.CriterionList.length>0)? trialInfo.CriterionList.join(', '): '' }}</span>
</el-tooltip>
</div>
<div class="div-col">
</div>
</div>
<div class="div-row">
<!-- <div class="div-col">-->
<!-- <label class="el-label">{{ $t('trials:trials-list:form:reviewMode') }}:</label>-->
<!-- &lt;!&ndash; <span>{{ trialInfo.ReadingType }}</span> &ndash;&gt;-->
<!-- <span>{{ $fd('ReadingMethod', trialInfo.ReadingType) }}</span>-->
<!-- </div>-->
<div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:expedited:') }}</label>
<span>{{$fd('YesOrNoForInt', trialInfo.Expedited)}}</span>
</div>
<div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:totalReviewers:') }}</label>
<span>{{ trialInfo.TotalReviewers }}</span>
@ -40,7 +49,6 @@
<div class="div-col">
<label class="el-label">{{ $t('trials:trials-list:form:typeofReviewers:') }}</label>
<span>{{ trialInfo.AttendedReviewerTypeEnumList.map(v => $fd('AttendedReviewerType', v)).join(', ') }}</span>
<!-- <span>{{ $fd('AttendedReviewerType', trialInfo.AttendedReviewerType) }}</span>-->
</div>
<div class="div-col">
</div>
@ -139,7 +147,10 @@ export default {
this.activeStatus = step
},
nextStep(stepName) {
this.activeStatus = this.activeStatus === 3 ? 3 : this.activeStatus + 1
this.activeStatus = this.activeStatus === 3 ? 3 : this.activeStatus + 1;
if(stepName==='confirmation'){
this.activeStatus = 3;
}
this.TrialMaxState = this.activeStatus
this.$nextTick(
function() {

View File

@ -5,12 +5,12 @@
<el-form :inline="true">
<!-- 中心编号 -->
<el-form-item :label="$t('trials:researchStaff:table:siteId')">
<el-select v-model="searchData.SiteId" clearable filterable style="width:120px;">
<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.SiteId"
:value="item.TrialSiteId"
/>
</el-select>
</el-form-item>
@ -260,7 +260,7 @@ const searchDataDefault = () => {
Asc: true,
PageIndex: 1,
PageSize: 20,
SiteId: '',
TrialSiteId: '',
UserTypeId: '',
IsGenerateAccount: null,
TrialRoleCode: '',

View File

@ -5,12 +5,12 @@
<el-form :inline="true">
<!-- 中心 -->
<el-form-item :label="$t('trials:researchRecord:table:siteId')">
<el-select v-model="searchData.SiteId" clearable filterable style="width:120px;">
<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.SiteId"
:value="item.TrialSiteId"
/>
</el-select>
</el-form-item>
@ -301,7 +301,7 @@ const searchDataDefault = () => {
Asc: true,
PageIndex: 1,
PageSize: 20,
SiteId: '',
TrialSiteId: '',
UserKeyInfo: '',
State: null,
IsDeleted: '',

View File

@ -2,7 +2,7 @@
<div v-loading="loading" class="preview-wrapper">
<div class="left-wrapper">
<div class="basic-info">
<span v-if="otherInfo.SubjectCode">{{ `${otherInfo.SubjectCode}` }}</span>
<span v-if="otherInfo.SubjectCode && isReadingShowSubjectInfo">{{ `${otherInfo.SubjectCode}` }}</span>
<span v-if="otherInfo.ReadingNameOrTaskBlindName">({{ `${otherInfo.ReadingNameOrTaskBlindName}` }})</span>
</div>
<div v-if="cdList.length>0" class="basic-content">
@ -196,6 +196,10 @@ export default {
visitTaskId: {
type: String,
required: true
},
isReadingShowSubjectInfo: {
type: Boolean,
required: true
}
},
data() {

View File

@ -1,8 +1,14 @@
/* eslint-disable */
<template>
<BaseContainer>
<BaseContainer class="consistency-analysis-wrapper">
<template slot="search-container">
<el-form :inline="true">
<!-- 是否加急 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:isUrgent')">
<el-select v-model="searchData.IsUrgent" clearable style="width:120px;">
<el-option v-for="item of $d.YesOrNo" :key="'IsUrgent' + item.label" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<el-form-item :label="$t('trials:consistencyCheck:table:siteId')">
<!-- 中心编号 -->
<el-select v-model="searchData.TrialSiteCode" clearable filterable style="width:120px;">
@ -26,10 +32,10 @@
clearable
/>
</el-form-item>
<!-- 角色 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:role')">
<el-select v-model="searchData.ArmEnum" clearable style="width:120px;">
<el-option v-for="item of $d.ArmEnum" :key="'ArmEnum' + item.label" :value="item.value" :label="item.label" />
<!-- 任务类型 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:taskType')">
<el-select v-model="searchData.ReadingCategory" clearable style="width:120px;">
<el-option v-for="item of $d.ReadingCategory" :key="'ReadingCategory' + item.label" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<!-- 阅片人 -->
@ -38,16 +44,29 @@
<el-option v-for="item of DoctorUserList" :key="'DoctorUserId' + item.DoctorUserId" :value="item.DoctorUserId" :label="`${item.UserName}(${item.FullName})`" />
</el-select>
</el-form-item>
<!-- 角色 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:role')">
<el-select v-model="searchData.ArmEnum" clearable style="width:120px;">
<el-option v-for="item of $d.ArmEnum" :key="'ArmEnum' + item.label" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<!-- 阅片标准 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:criterionName')">
<el-select v-model="searchData.TrialReadingCriterionId" clearable style="width:120px;">
<el-option v-for="item of trialCriterionList" :key="'TrialReadingCriterionId' + item.TrialReadingCriterionId" :value="item.TrialReadingCriterionId" :label="item.TrialReadingCriterionName" />
</el-select>
</el-form-item>
<!-- 是否加急 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:isUrgent')">
<el-select v-model="searchData.IsUrgent" clearable style="width:120px;">
<el-option v-for="item of $d.YesOrNo" :key="'IsUrgent' + item.label" :value="item.value" :label="item.label" />
<!-- 一致性分析类别 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:category')">
<el-select v-model="searchData.IsSelfAnalysis" clearable style="width:120px;">
<el-option v-for="item of $d.IsSelfAnalysis" :key="'IsSelfAnalysis' + item.label" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<!-- 阅片状态 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:reviewStatus')">
<el-select v-model="searchData.ReadingTaskState" clearable style="width:120px;">
<el-option v-for="item of $d.ReadingTaskState" :key="'ReadingTaskState' + item.label" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<!-- 任务状态 -->
@ -56,18 +75,8 @@
<el-option v-for="item of $d.TaskState" :key="'TaskState' + item.label" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<!-- 任务类型 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:taskType')">
<el-select v-model="searchData.ReadingCategory" clearable style="width:120px;">
<el-option v-for="item of $d.ReadingCategory" :key="'ReadingCategory' + item.label" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<!-- 一致性分析类别 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:category')">
<el-select v-model="searchData.IsSelfAnalysis" clearable style="width:120px;">
<el-option v-for="item of $d.IsSelfAnalysis" :key="'IsSelfAnalysis' + item.label" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<!-- 分配状态 -->
<!-- <el-form-item style="margin-bottom:10px" label="分配状态">
<el-select v-model="searchData.TaskAllocationState" clearable style="width:120px;">
@ -84,6 +93,16 @@
@change="changeTimeList"
/>
</el-form-item>
<!-- 完成时间 -->
<el-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:signTime')">
<el-date-picker
v-model="timeList2"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
:default-time="['00:00:00', '23:59:59']"
@change="changeTimeList2"
/>
</el-form-item>
<el-form-item style="margin-bottom:10px">
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
@ -138,14 +157,6 @@
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
</template>
</el-table-column>
<!-- 任务编号 -->
<el-table-column
prop="TaskCode"
:label="$t('trials:consistencyAnalysis:table:taskCode')"
width="120"
sortable="custom"
show-overflow-tooltip
/>
<!-- 中心编号 -->
<el-table-column
prop="TrialSiteCode"
@ -163,13 +174,24 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{scope.row.SubjectCode}}
<span v-if="scope.row.BlindSubjectCode && scope.row.BlindSubjectCode !== scope.row.SubjectCode">
{{ `${scope.row.SubjectCode}/${scope.row.BlindSubjectCode}` }}
</span>
<span v-else>{{scope.row.SubjectCode}}</span>
<span v-if="scope.row.IsReReadingOrBackInfluenceAnalysis" class="status-primary-circle">
<!-- -->
{{$t('trials:consistencyAnalysis:table:impact')}}
</span>
</template>
</el-table-column>
<!-- 任务编号 -->
<!-- <el-table-column
prop="TaskCode"
:label="$t('trials:consistencyAnalysis:table:taskCode')"
width="120"
sortable="custom"
show-overflow-tooltip
/> -->
<!-- 任务名称 -->
<el-table-column
prop="VisitTaskNum"
@ -179,17 +201,20 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{scope.row.TaskName}}
<span v-if="scope.row.TaskBlindName && scope.row.TaskName !== scope.row.TaskBlindName">
{{ `${scope.row.TaskName}/${scope.row.TaskBlindName}` }}
</span>
<span v-else>{{scope.row.TaskName}}</span>
</template>
</el-table-column>
<!-- 盲态任务标识 -->
<el-table-column
<!-- <el-table-column
prop="TaskBlindName"
:label="$t('trials:consistencyAnalysis:table:taskBlindName')"
width="160"
sortable="custom"
show-overflow-tooltip
/>
/> -->
<!-- 任务类型 -->
<el-table-column
prop="ReadingCategory"
@ -205,17 +230,16 @@
<el-tag v-if="scope.row.ReadingCategory === 5" type="warning">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
</template>
</el-table-column>
<!-- 一致性分析类别 -->
<!-- 阅片人 -->
<el-table-column
prop="IsSelfAnalysis"
:label="$t('trials:consistencyAnalysis:table:category')"
width="160"
prop="UserName"
:label="$t('trials:consistencyAnalysis:table:reader')"
width="120"
sortable="custom"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag v-if="scope.row.IsSelfAnalysis" type="primary">{{ $fd('IsSelfAnalysis', scope.row.IsSelfAnalysis) }}</el-tag>
<el-tag v-else type="warning">{{ $fd('IsSelfAnalysis', scope.row.IsSelfAnalysis) }}</el-tag>
{{scope.row.UserName}}({{scope.row.FullName}})
</template>
</el-table-column>
<!-- 角色 -->
@ -235,18 +259,6 @@
<el-tag v-if="scope.row.ArmEnum === 8" style="border-color: #4c2791;color:#4c2791;">{{$fd('ArmEnum', scope.row.ArmEnum)}}</el-tag>
</template>
</el-table-column>
<!-- 阅片人 -->
<el-table-column
prop="UserName"
:label="$t('trials:consistencyAnalysis:table:reader')"
width="120"
sortable="custom"
show-overflow-tooltip
>
<template slot-scope="scope">
{{scope.row.UserName}}({{scope.row.FullName}})
</template>
</el-table-column>
<!-- 阅片标准 -->
<el-table-column
prop="TrialReadingCriterionName"
@ -255,6 +267,59 @@
sortable="custom"
show-overflow-tooltip
/>
<!-- 一致性分析类别 -->
<el-table-column
prop="IsSelfAnalysis"
:label="$t('trials:consistencyAnalysis:table:category')"
width="170"
sortable="custom"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag v-if="scope.row.IsSelfAnalysis" type="primary">{{ $fd('IsSelfAnalysis', scope.row.IsSelfAnalysis) }}</el-tag>
<el-tag v-else type="warning">{{ $fd('IsSelfAnalysis', scope.row.IsSelfAnalysis) }}</el-tag>
</template>
</el-table-column>
<!-- 阅片状态 -->
<el-table-column
prop="ReadingTaskState"
:label="$t('trials:consistencyAnalysis:table:reviewStatus')"
width="140"
sortable="custom"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag v-if="scope.row.ReadingTaskState === 2" type="primary">{{ $fd('ReadingTaskState', scope.row.ReadingTaskState) }}</el-tag>
<el-tag v-else type="danger">{{ $fd('ReadingTaskState', scope.row.ReadingTaskState) }}</el-tag>
</template>
</el-table-column>
<!-- 分配时间 -->
<el-table-column
prop="AllocateTime"
:label="$t('trials:consistencyAnalysis:table:auditTime')"
width="160"
sortable="custom"
show-overflow-tooltip
>
</el-table-column>
<!-- 建议完成时间 -->
<!-- <el-table-column
prop="SuggesteFinishedTime"
:label="$t('trials:consistencyAnalysis:table:suggesteFinishedTime')"
width="140"
sortable="custom"
show-overflow-tooltip
/>
-->
<!-- 阅片完成时间 -->
<el-table-column
prop="SignTime"
:label="$t('trials:consistencyAnalysis:table:signTime')"
width="160"
sortable="custom"
show-overflow-tooltip
/>
<!-- 任务状态 -->
<el-table-column
prop="TaskState"
@ -271,46 +336,8 @@
<el-tag v-if="scope.row.TaskState === 5" type="danger">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
</template>
</el-table-column>
<!-- 分配时间 -->
<el-table-column
prop="AllocateTime"
:label="$t('trials:consistencyAnalysis:table:auditTime')"
width="160"
sortable="custom"
show-overflow-tooltip
>
</el-table-column>
<!-- 建议完成时间 -->
<el-table-column
prop="SuggesteFinishedTime"
:label="$t('trials:consistencyAnalysis:table:suggesteFinishedTime')"
width="140"
sortable="custom"
show-overflow-tooltip
/>
<!-- 阅片状态 -->
<el-table-column
prop="ReadingTaskState"
:label="$t('trials:consistencyAnalysis:table:reviewStatus')"
width="140"
sortable="custom"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag v-if="scope.row.ReadingTaskState === 2" type="primary">{{ $fd('ReadingTaskState', scope.row.ReadingTaskState) }}</el-tag>
<el-tag v-else type="danger">{{ $fd('ReadingTaskState', scope.row.ReadingTaskState) }}</el-tag>
</template>
</el-table-column>
<!-- 阅片完成时间 -->
<el-table-column
prop="SignTime"
:label="$t('trials:consistencyAnalysis:table:signTime')"
width="140"
sortable="custom"
show-overflow-tooltip
/>
<!-- 申请状态 -->
<el-table-column
<!-- <el-table-column
prop="ReReadingApplyState"
:label="$t('trials:consistencyAnalysis:table:applyStatus')"
width="180"
@ -322,9 +349,9 @@
<el-tag v-if="scope.row.ReReadingApplyState === 2" type="primary">{{ $fd('ReReadingApplyState', scope.row.ReReadingApplyState) }}</el-tag>
<el-tag v-if="scope.row.ReReadingApplyState === 3" type="warning">{{ $fd('ReReadingApplyState', scope.row.ReReadingApplyState) }}</el-tag>
</template>
</el-table-column>
</el-table-column> -->
<!-- 是否受到退回影响 -->
<el-table-column
<!-- <el-table-column
prop="IsReReadingOrBackInfluenceAnalysis"
:label="$t('trials:consistencyAnalysis:table:impactInfluence')"
width="160"
@ -334,7 +361,7 @@
<el-tag v-if="!scope.row.IsReReadingOrBackInfluenceAnalysis" type="danger">{{ $fd('YesOrNo', scope.row.IsReReadingOrBackInfluenceAnalysis) }}</el-tag>
<el-tag v-if="scope.row.IsReReadingOrBackInfluenceAnalysis" type="primary">{{ $fd('YesOrNo', scope.row.IsReReadingOrBackInfluenceAnalysis) }}</el-tag>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column
fixed="right"
:label="$t('common:action:action')"
@ -385,7 +412,7 @@
{{$t('trials:consistencyAnalysis:table:impact')}}
</span>
<!-- 受到退回影响 -->
<span> {{$t('trials:consistencyAnalysis:title:impactInfluence')}}</span>
<span>: {{$t('trials:consistencyAnalysis:title:impactInfluence')}}</span>
</div>
<!-- 自身一致性分析 -->
<el-dialog
@ -662,7 +689,7 @@ const searchDataDefault = () => {
Asc: true,
SortField: '',
TrialId: null,
SiteId: null,
TrialSiteId: null,
SubjectId: null,
SubjectCode: null,
TrialSiteCode: null,
@ -674,7 +701,9 @@ const searchDataDefault = () => {
TaskAllocationState: null,
BeginAllocateDate: null,
EndAllocateDate: null,
TrialReadingCriterionId: null
TrialReadingCriterionId: null,
BeginSignTime: null,
EndSignTime: null
}
}
export default {
@ -707,6 +736,7 @@ export default {
ReaderRulesFormVisible: false,
IsSelfAnalysis: true,
timeList: [],
timeList2: [],
ApplyforReasonVisible: false,
ApplyforReasonForm: {
Type: null,
@ -790,9 +820,18 @@ export default {
this.searchData.EndAllocateDate = null
}
},
changeTimeList2() {
if (this.timeList2) {
this.searchData.BeginSignTime = this.timeList2[0]
this.searchData.EndSignTime = this.timeList2[1]
} else {
this.searchData.BeginSignTime = null
this.searchData.EndSignTime = null
}
},
//
reReadingHistory(row) {
this.$router.push({ path: `/trials/trials-panel/reading/reReadingTracking?trialId=${this.$route.query.trialId}&trialCode=${this.$route.query.trialCode}&researchProgramNo=${this.$route.query.researchProgramNo}&SiteId=${row.SiteId}&SubjectCode=${row.SubjectCode}&TaskName=${row.TaskName}&DoctorUserId=${row.DoctorUserId}` })
this.$router.push({ path: `/trials/trials-panel/reading/reReadingTracking?trialId=${this.$route.query.trialId}&trialCode=${this.$route.query.trialCode}&researchProgramNo=${this.$route.query.researchProgramNo}&TrialSiteId=${row.TrialSiteId}&SubjectCode=${row.SubjectCode}&TaskName=${row.TaskName}&DoctorUserId=${row.DoctorUserId}` })
},
//
applyReReading() {
@ -981,6 +1020,7 @@ export default {
},
handleReset() {
this.timeList = null
this.timeList2 = null
this.searchData = searchDataDefault()
this.getList()
},
@ -1004,12 +1044,17 @@ export default {
}
</script>
<style lang="scss" scoped>
.remark{
position: absolute;
left: 5px;
bottom: 7px;
font-size: 12px;
.consistency-analysis-wrapper{
height: 100%;
position: relative;
.remark{
position: absolute;
left: 5px;
bottom: 7px;
font-size: 12px;
}
}
.status-primary-circle{
display: inline-block;
width:20px;

View File

@ -19,7 +19,7 @@
</div>
<!-- 切换访视 -->
<div
v-if="stack.imageRendered && isReadingTaskViewInOrder"
v-if="stack.imageRendered && isReadingTaskViewInOrder === 1"
class="info-visit"
@dblclick.stop="preventDefault($event)"
>
@ -181,7 +181,7 @@ export default {
required: true
},
isReadingTaskViewInOrder: {
type: Boolean,
type: Number,
required: true
},
customWwcTpl: {
@ -333,7 +333,8 @@ export default {
mounted() {
console.log(cornerstoneTools)
this.subjectCode = this.$router.currentRoute.query.subjectCode
// this.subjectCode = this.$router.currentRoute.query.subjectCode
this.subjectCode = localStorage.getItem('subjectCode')
document.addEventListener('mouseup', () => {
this.sliderMouseup()
})
@ -477,7 +478,7 @@ export default {
},
methods: {
goViewer(e) {
console.log(this.$refs['sliderBox'].clientHeight)
// console.log(this.$refs['sliderBox'].clientHeight)
var height = e.offsetY * 100 / this.$refs['sliderBox'].clientHeight
this.height = height
var index = Math.trunc(this.stack.imageIds.length * this.height / 100)
@ -546,7 +547,7 @@ export default {
},
mouseUp(e) {
console.log('mouseUp')
// console.log('mouseUp')
if (this.readingTaskState >= 2) return
this.image = e.detail.image
this.getToolStateInfo(e)
@ -672,7 +673,7 @@ export default {
this.sliderInfo.isMove = false
},
getMeasureData() {
console.log('getMeasureData')
// console.log('getMeasureData')
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.stack.visitTaskId)
this.measureData = this.visitTaskList[idx].MeasureData
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
@ -754,14 +755,10 @@ export default {
getToolStateInfo(e) {
const { element, currentPoints, image, viewport } = e.detail
var imageId = image.imageId
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
var frame = null
if (instanceId.includes('?frame=')) {
frame = instanceId.split('?frame=')[1]
instanceId = instanceId.split('?frame=')[0]
}
const imageInfo = this.getInstanceInfo(imageId)
var instanceId = imageInfo.instanceId
var frame = imageInfo.frame
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
instanceId = instanceId.split('.')[0]
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
for (var m = 0; m < this.measuredTools.length; m++) {
var toolType = this.measuredTools[m]
@ -818,7 +815,7 @@ export default {
}
},
stackScrollCallback(e) {
console.log('stackScrollCallback')
// console.log('stackScrollCallback')
const { detail } = e
if (this.isScrollSync && this.currentDicomCanvasIndex === this.canvasIndex) {
this.scrollSyncInfo.canvasIndex = this.canvasIndex
@ -924,11 +921,8 @@ export default {
if (this.readingTaskState >= 2) return
var element = cornerstone.getEnabledElement(this.canvas)
var { imageId } = element.image
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
if (instanceId.includes('?frame=')) {
instanceId = instanceId.split('?frame=')[0]
}
instanceId = instanceId.split('.')[0]
const imageInfo = this.getInstanceInfo(imageId)
var instanceId = imageInfo.instanceId
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.stack.visitTaskId && i.IsCurrentTask && i.ReadingTaskState < 2)
if (idx === -1) return
this.measureData = this.visitTaskList[idx].MeasureData
@ -991,15 +985,10 @@ export default {
mouseClick(e) {
const { element, currentPoints, image, viewport } = e.detail
var imageId = image.imageId
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
var frame = null
if (instanceId.includes('?frame=')) {
frame = instanceId.split('?frame=')[1]
instanceId = instanceId.split('?frame=')[0]
}
const imageInfo = this.getInstanceInfo(imageId)
var instanceId = imageInfo.instanceId
var frame = imageInfo.frame
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
instanceId = instanceId.split('.')[0]
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
for (let t = 0; t < this.measuredTools.length; t++) {
var toolType = this.measuredTools[t]
@ -1010,7 +999,7 @@ export default {
if (i > -1) {
var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === toolState.data[i].uuid)
if (idx > -1) {
console.log('mouseClick')
// console.log('mouseClick')
DicomEvent.$emit('setCollapseActive', this.measureData[idx])
if (this.readingTaskState < 2) {
const measureData = {}
@ -1095,18 +1084,14 @@ export default {
this.minVistNum = this.visitTaskList[0].VisitTaskNum
this.measureData = this.visitTaskList[idx].MeasureData
const imageId = this.stack.imageIds[this.stack.currentImageIdIndex]
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
var frame = null
if (instanceId.includes('?frame=')) {
frame = instanceId.split('?frame=')[1]
instanceId = instanceId.split('?frame=')[0]
}
const imageInfo = this.getInstanceInfo(imageId)
var instanceId = imageInfo.instanceId
var frame = imageInfo.frame
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
instanceId = instanceId.split('.')[0]
this.stack.instanceId = instanceId
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
ToolStateManager.clearImageIdToolState(dicomSeries.imageIds)
if (this.toolState.clipPlaying) this.toggleClipPlay()
this.toggleClipPlay(false)
this.toolState.viewportInvert = false
this.toolState.dicomInfoVisible = false
@ -1126,21 +1111,26 @@ export default {
// }
// resolve()
// })
this.loading = true
cornerstone.loadAndCacheImage(this.stack.imageIds[this.stack.currentImageIdIndex])
.then(async image => {
await scope.onFirstImageLoaded(image)
if (this.stack.imageIds.indexOf(image.imageId) !== -1) {
await scope.onFirstImageLoaded(image)
}
scope.loading = false
resolve()
})
.catch((error) => {
if (error.error && error.error.message) {
this.$alert(error.error.message)
}
scope.loading = false
resolve()
})
})
},
onFirstImageLoaded(image) {
console.log('onFirstImageLoaded')
// console.log('onFirstImageLoaded')
return new Promise(async resolve => {
const element = this.$refs.canvas
var viewport = cornerstone.getDefaultViewportForImage(this.canvas, image)
@ -1208,14 +1198,10 @@ export default {
this.stack.firstImageLoading = false
this.toolState.dicomInfoVisible = true
var instanceId = image.imageId.split('/')[image.imageId.split('/').length - 1]
var frame = null
if (instanceId.includes('?frame=')) {
frame = instanceId.split('?frame=')[1]
instanceId = instanceId.split('?frame=')[0]
}
const imageInfo = this.getInstanceInfo(image.imageId)
var instanceId = imageInfo.instanceId
var frame = imageInfo.frame
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
instanceId = instanceId.split('.')[0]
this.stack.instanceId = instanceId
this.height = (this.stack.currentImageIdIndex) * 100 / (this.stack.imageIds.length - 1)
this.resetWwwc()
@ -1223,7 +1209,7 @@ export default {
})
},
onNewImage(e) {
console.log('cornerstonenewimage')
// console.log('cornerstonenewimage')
if (this.isCurrentTask && this.readingTaskState < 2) {
this.resetHideMeasureArr()
}
@ -1260,6 +1246,12 @@ export default {
if (this.dicomInfo.thick) {
this.dicomInfo.thick = this.dicomInfo.thick.toFixed(2)
}
const newImageIdIndex = this.stack.imageIds.findIndex(i => i === imageId)
if (newImageIdIndex === -1) return
this.stack.currentImageIdIndex = newImageIdIndex
this.stack.imageIdIndex = newImageIdIndex
this.series.imageIdIndex = newImageIdIndex
this.height = (this.stack.currentImageIdIndex) * 100 / (this.stack.imageIds.length - 1)
},
getScreenshots() {
const canvas = this.canvas.querySelector('canvas')
@ -1281,14 +1273,10 @@ export default {
this.stack.imageRendered = true
// const { element } = e.detail
var imageId = e.detail.image.imageId
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
var frame = null
if (instanceId.includes('?frame=')) {
frame = instanceId.split('?frame=')[1]
instanceId = instanceId.split('?frame=')[0]
}
const imageInfo = this.getInstanceInfo(imageId)
var instanceId = imageInfo.instanceId
var frame = imageInfo.frame
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
instanceId = instanceId.split('.')[0]
if (this.imageId !== instanceId) {
this.getOrientationMarker(e.detail.element)
//
@ -1340,18 +1328,14 @@ export default {
var element = cornerstone.getEnabledElement(this.canvas)
var viewport = element.viewport
//
console.log('completed')
// console.log('completed')
this.activeTool = 1
this.activeToolName = ''
var { imageId } = element.image
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
var frame = null
if (instanceId.includes('?frame=')) {
frame = instanceId.split('?frame=')[1]
instanceId = instanceId.split('?frame=')[0]
}
const imageInfo = this.getInstanceInfo(imageId)
var instanceId = imageInfo.instanceId
var frame = imageInfo.frame
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
instanceId = instanceId.split('.')[0]
if (e.detail.toolName === 'Length' || e.detail.toolName === 'ArrowAnnotate' || e.detail.toolName === 'RectangleRoi') {
const measureData = {}
measureData.studyId = this.stack.studyId
@ -1462,20 +1446,16 @@ export default {
},
onMeasurementmodified(e) {
//
console.log('modified')
// console.log('modified')
if (this.readingTaskState >= 2) return
const { measurementData, toolType } = e.detail
var element = cornerstone.getEnabledElement(this.canvas)
var viewport = element.viewport
var { imageId } = element.image
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
var frame = null
if (instanceId.includes('?frame=')) {
frame = instanceId.split('?frame=')[1]
instanceId = instanceId.split('?frame=')[0]
}
const imageInfo = this.getInstanceInfo(imageId)
var instanceId = imageInfo.instanceId
var frame = imageInfo.frame
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
instanceId = instanceId.split('.')[0]
var uuid = measurementData.uuid
var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === uuid)
@ -1533,11 +1513,8 @@ export default {
//
var element = cornerstone.getEnabledElement(this.canvas)
var { imageId } = element.image
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
if (instanceId.includes('?frame=')) {
instanceId = instanceId.split('?frame=')[0]
}
instanceId = instanceId.split('.')[0]
const imageInfo = this.getInstanceInfo(imageId)
var instanceId = imageInfo.instanceId
var idx = this.measureData.findIndex(item => item.InstanceId === instanceId)
var measureData = null
if (idx > -1) {
@ -1595,8 +1572,10 @@ export default {
resetViewport() {
this.toolState.viewportInvert = false
this.orientationMarkers = [...this.originalMarkers]
this.setMarkers()
if (this.originalMarkers.length > 0) {
this.orientationMarkers = [...this.originalMarkers]
this.setMarkers()
}
var image = cornerstone.getImage(this.canvas)
cornerstone.setViewport(
this.canvas,
@ -1655,18 +1634,19 @@ export default {
}
},
toggleClipPlay() {
if (this.toolState.clipPlaying) {
toggleClipPlay(isPlay) {
if (isPlay) {
this.toolState.clipPlaying = true
cornerstoneTools.playClip(this.canvas, this.dicomInfo.fps)
cornerstoneTools.getToolState(
this.canvas,
'playClip'
).data[0].loop = false
} else {
cornerstoneTools.stopClip(this.canvas)
this.toolState.clipPlaying = false
return
}
this.toolState.clipPlaying = true
cornerstoneTools.playClip(this.canvas, this.dicomInfo.fps)
cornerstoneTools.getToolState(
this.canvas,
'playClip'
).data[0].loop = false
},
setFps(fps) {
this.dicomInfo.fps = fps
@ -1711,8 +1691,10 @@ export default {
},
resetRotate() {
this.orientationMarkers = [...this.originalMarkers]
this.setMarkers()
if (this.originalMarkers.length > 0) {
this.orientationMarkers = [...this.originalMarkers]
this.setMarkers()
}
var viewport = cornerstone.getViewport(this.canvas)
viewport.hflip = false
viewport.vflip = false
@ -1727,23 +1709,25 @@ export default {
}
},
setRotate(hflip, vflip, angle, type) {
var markers = [...this.orientationMarkers]
if (type === 2) {
//
this.orientationMarkers[0] = markers[2]
this.orientationMarkers[2] = markers[0]
} else if (type === 3) {
//
this.orientationMarkers[1] = markers[3]
this.orientationMarkers[3] = markers[1]
} else if (type === 4) {
// 90
this.orientationMarkers = markers.slice(1, 4).concat(markers[0])
} else if (type === 5) {
// 90
this.orientationMarkers = [markers[3]].concat(markers.slice(0, 3))
if (this.orientationMarkers.length > 0) {
var markers = [...this.orientationMarkers]
if (type === 2) {
//
this.orientationMarkers[0] = markers[2]
this.orientationMarkers[2] = markers[0]
} else if (type === 3) {
//
this.orientationMarkers[1] = markers[3]
this.orientationMarkers[3] = markers[1]
} else if (type === 4) {
// 90
this.orientationMarkers = markers.slice(1, 4).concat(markers[0])
} else if (type === 5) {
// 90
this.orientationMarkers = [markers[3]].concat(markers.slice(0, 3))
}
this.setMarkers()
}
this.setMarkers()
var viewport = cornerstone.getViewport(this.canvas)
if (hflip) viewport.hflip = !viewport.hflip
if (vflip) viewport.vflip = !viewport.vflip
@ -1952,6 +1936,14 @@ export default {
}
}
},
getInstanceInfo(imageId) {
const params = {}
const searchParams = new URLSearchParams(imageId.split('?')[1])
for (const [key, value] of searchParams.entries()) {
params[key] = value
}
return params
},
preventDefault(e) {
e.stopImmediatePropagation()
e.stopPropagation()

View File

@ -26,7 +26,7 @@
A
</div>
</li>
<li v-if="isReadingTaskViewInOrder" class="flex_row" @click.stop="changeLayout('A|B')">
<li v-if="isReadingTaskViewInOrder === 1" class="flex_row" @click.stop="changeLayout('A|B')">
<div class="layout_box_1_1">
A
</div>
@ -292,6 +292,54 @@
<div class="text">{{ $t('trials:lugano:button:fusion') }}</div>
</div>
</el-tooltip>
<div class="tool-frame">
<!-- 第一帧 -->
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:firstframe')" placement="bottom">
<div class="icon" @click.prevent="scrollPage(-99999)">
<svg-icon icon-class="firstframe" class="svg-icon" />
</div>
</el-tooltip>
<!-- 上一帧 -->
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:previousframe')" placement="bottom">
<div class="icon" @click.prevent="scrollPage(-1)">
<svg-icon icon-class="previousframe" class="svg-icon" />
</div>
</el-tooltip>
<!-- 播放/暂停 -->
<el-tooltip class="item" effect="dark" :content="clipPlaying?$t('trials:dicom-show:stop'):$t('trials:dicom-show:play')" placement="bottom">
<div v-if="clipPlaying" class="icon" @click.prevent="toggleClipPlay(false)">
<svg-icon icon-class="stop" class="svg-icon" />
</div>
<div v-else class="icon" @click.prevent="toggleClipPlay(true)">
<svg-icon icon-class="play" class="svg-icon" />
</div>
</el-tooltip>
<!-- 下一帧 -->
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:nextframe')" placement="bottom">
<div class="icon" @click.prevent="scrollPage(1)">
<svg-icon icon-class="nextframe" class="svg-icon" />
</div>
</el-tooltip>
<!-- 最后一帧 -->
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:lastframe')" placement="bottom">
<div class="icon" @click.prevent="scrollPage(99999)">
<svg-icon icon-class="lastframe" class="svg-icon" />
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:speed')" placement="bottom">
<select v-model="fps" class="select-wrapper" :disabled="clipPlaying" @change="setDicomCanvasfps($event)">
<!-- 默认值 -->
<!-- <option :value="5">{{ $t('trials:dicom-show:default') }}</option> -->
<option :value="5">5</option>
<option :value="10">10</option>
<option :value="15">15</option>
<option :value="20">20</option>
<option :value="25">25</option>
<option :value="30">30</option>
</select>
</el-tooltip>
</div>
<el-tooltip class="item" effect="dark" :content="$t('trials:reading:button:reset')" placement="bottom">
<div class="tool-wrapper">
@ -669,7 +717,7 @@ export default {
required: true
},
isReadingTaskViewInOrder: {
type: Boolean,
type: Number,
required: true
},
isExistsManual: {
@ -789,7 +837,9 @@ export default {
digitPlaces: 2,
activeCanvasWW: null,
activeCanvasWC: null,
activeTaskInfo: {}
activeTaskInfo: {},
clipPlaying: false,
fps: 15
}
},
@ -828,6 +878,7 @@ export default {
activeSeries: {
immediate: true,
handler(v) {
console.log('activeSeries', v)
if (v && v.isCurrentTask && this.studyList.length === 0) {
this.activeTaskInfo.taskName = v.taskBlindName
this.activeTaskInfo.visitTaskId = v.visitTaskId
@ -844,6 +895,17 @@ export default {
imageQualityIssues: {
immediate: true,
handler(v) {}
},
currentDicomCanvasIndex: {
immediate: true,
handler(v) {
if (this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`] && this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0]) {
this.clipPlaying = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].toolState.clipPlaying
} else {
this.clipPlaying = false
this.fps = 15
}
}
}
},
@ -989,7 +1051,11 @@ export default {
if (this.petctWindow) {
this.petctWindow.close()
}
window.removeEventListener('beforeunload')
window.removeEventListener('beforeunload', () => {
if (this.petctWindow) {
this.petctWindow.close()
}
})
},
methods: {
getWwcTpl() {
@ -1193,6 +1259,8 @@ export default {
})
},
loadImageStack(dicomSeries) {
this.clipPlaying = false
this.fps = 15
this.canvasObj[this.currentDicomCanvasIndex] = dicomSeries
this.$nextTick(() => {
this.activeSeries = dicomSeries
@ -1364,7 +1432,7 @@ export default {
var firstAddSeries = null
var currentAddSeries = null
if (this.isReadingTaskViewInOrder) {
if (this.isReadingTaskViewInOrder === 1) {
//
// 访
var firstAddVisitTaskId = null
@ -1870,6 +1938,31 @@ export default {
}
this.activeTool = toolName
},
//
scrollPage(i) {
//
const isLoaded = this.getSeriesLoadStatus()
if (!isLoaded) return
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].scrollPage(i)
},
// /
toggleClipPlay(isPlay) {
//
const isLoaded = this.getSeriesLoadStatus()
if (!isLoaded) return
this.clipPlaying = isPlay
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].setFps(this.fps)
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].toggleClipPlay(isPlay)
},
getSeriesLoadStatus() {
const index = this.visitTaskList.findIndex(i => i.VisitTaskId === this.activeSeries.visitTaskId)
if (index === -1) return false
const loadStatus = this.visitTaskList[index].StudyList[this.activeSeries.studyIndex].SeriesList[this.activeSeries.seriesIndex].loadStatus
return loadStatus
},
setDicomCanvasfps(event) {
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].setFps(event.target.value)
},
//
setMeasureData(data) {
this.$refs['measurementList'].setMeasuredData(data)
@ -2129,7 +2222,7 @@ export default {
flex-direction: column;
justify-content: center;
align-items: center;
margin-right: 30px;
margin-right: 20px;
.icon{
padding: 5px;
border: 1px solid #404040;
@ -2148,6 +2241,39 @@ export default {
display: none;
}
}
.tool-frame{
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
margin-right: 20px;
border: 1px solid #404040;
.icon{
padding: 5px;
border-right: 1px solid #404040;
cursor: pointer;
text-align: center;
.svg-icon{
font-size:20px;
color:#ddd;
}
}
.select-wrapper{
width: 60px;
background-color: black;
color: #ddd;
border: none;
font-size: 13px;
outline: none;
}
.text{
position: relative;
font-size: 12px;
margin-top: 5px;
color: #d0d0d0;
display: none;
}
}
.tool_active{
background-color: #607d8b;
}

View File

@ -795,11 +795,23 @@ export default {
return new Promise(resolve => {
getDicomSeriesInfo({ seriesId }).then(res => {
var series = res.Result
var imageIds = series.InstancePathList.map(path => `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${path}`
)
var imageIds = []
var instanceList = []
series.InstanceInfoList.forEach(instance => {
if (instance.NumberOfFrames && instance.NumberOfFrames > 1) {
for (let i = 0; i < instance.NumberOfFrames; i++) {
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=${i}`
imageIds.push(imageId)
}
} else {
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}`
imageIds.push(imageId)
}
instanceList.push(instance.Id)
})
resolve({
imageIds: imageIds,
instanceList: series.InstanceList,
instanceList: instanceList,
seriesId: series.Id,
imageIdIndex: 0,
seriesUid: series.SeriesInstanceUid,

View File

@ -7,7 +7,7 @@ cornerstone.init({
gpuTier: intel,
rendering: {
// useCPURendering: false,
useNorm16Texture: true
useNorm16Texture: false
}
})
cornerstone.Settings.getRuntimeSettings().set('useCursors', false)

View File

@ -237,7 +237,8 @@ export default {
}
},
mounted() {
this.subjectCode = this.$router.currentRoute.query.subjectCode
// this.subjectCode = this.$router.currentRoute.query.subjectCode
this.subjectCode = localStorage.getItem('subjectCode')
window.addEventListener('message', this.receiveMsg)
this.criterionType = parseInt(localStorage.getItem('CriterionType'))
DicomEvent.$on('setCollapseActive', measureData => {

View File

@ -302,7 +302,8 @@ export default {
}
},
mounted() {
this.subjectCode = this.$router.currentRoute.query.subjectCode
// this.subjectCode = this.$router.currentRoute.query.subjectCode
this.subjectCode = localStorage.getItem('subjectCode')
window.addEventListener('message', this.receiveMsg)
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
DicomEvent.$on('setCollapseActive', measureData => {

View File

@ -76,6 +76,7 @@
</div>
</template>
<script>
import { getTableAnswerRowInfoList } from '@/api/trials'
import { on, off } from 'element-ui/src/utils/dom'
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util'
import store from '@/store'
@ -223,15 +224,26 @@ export default {
return new Promise(async resolve => {
this.visitTaskId = this.$router.currentRoute.query.visitTaskId
this.canvasData = []
await store.dispatch('reading/getMeasuredData', this.visitTaskId)
await store.dispatch('reading/getNoneDicomMeasuredData', this.visitTaskId).then(res => {
res.forEach(item => {
if (item && item.MeasureData) {
this.canvasData.push(item.MeasureData)
let res = await getTableAnswerRowInfoList(this.visitTaskId)
res.Result.forEach(el => {
if (!el.IsDicomReading){
if (el.MeasureData) {
el.MeasureData = JSON.parse(el.MeasureData)
el.MeasureData.data.remark = el.OrderMarkName
this.canvasData.push(el.MeasureData)
}
})
sessionStorage.setItem('measureData', this.canvasData)
}
})
sessionStorage.setItem('measureData', this.canvasData)
// await store.dispatch('reading/getMeasuredData', this.visitTaskId)
// await store.dispatch('reading/getNoneDicomMeasuredData', this.visitTaskId).then(res => {
// res.forEach(item => {
// if (item && item.MeasureData) {
// this.canvasData.push(item.MeasureData)
// }
// })
// sessionStorage.setItem('measureData', this.canvasData)
// })
resolve()
})
},

View File

@ -184,7 +184,8 @@ export default {
}
},
mounted() {
this.subjectCode = this.$router.currentRoute.query.subjectCode
// this.subjectCode = this.$router.currentRoute.query.subjectCode
this.subjectCode = localStorage.getItem('subjectCode')
window.addEventListener('message', this.receiveMsg)
this.criterionType = parseInt(localStorage.getItem('CriterionType'))
DicomEvent.$on('setCollapseActive', measureData => {

View File

@ -112,7 +112,7 @@ export default {
required: true
},
isReadingTaskViewInOrder: {
type: Boolean,
type: Number,
required: true
},
isExistsManual: {

View File

@ -201,7 +201,8 @@ export default {
}
},
mounted() {
this.subjectCode = this.$router.currentRoute.query.subjectCode
// this.subjectCode = this.$router.currentRoute.query.subjectCode
this.subjectCode = localStorage.getItem('subjectCode')
window.addEventListener('message', this.receiveMsg)
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
DicomEvent.$on('setCollapseActive', measureData => {

View File

@ -197,7 +197,8 @@ export default {
}
},
mounted() {
this.subjectCode = this.$router.currentRoute.query.subjectCode
// this.subjectCode = this.$router.currentRoute.query.subjectCode
this.subjectCode = localStorage.getItem('subjectCode')
window.addEventListener('message', this.receiveMsg)
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
DicomEvent.$on('setCollapseActive', measureData => {

View File

@ -172,9 +172,10 @@
@change="evaluateReasonChange"
/>
<!-- 系统评估结果为xxx,与当前调整的结果不一致请填写调整原因 -->
<p v-if="currentEvaluateResult !== tumorEvaluate" style="width: 140px;padding:0 2px;white-space: normal;word-break: break-all;word-wrap: break-word;" v-html="getWarningText()">
<p v-if="currentEvaluateResult !== tumorEvaluate" style="width: 140px;padding:0 2px;white-space: normal;word-break: break-all;word-wrap: break-word;" v-html="getWarningText()">
</p>
<p v-else-if="currentExistDisease !== isExistDisease" style="width: 140px;padding:0 2px;white-space: normal;word-break: break-all;word-wrap: break-word;">{{ $t('trials:readingReport:title:sysEvaluationRes') }}<span style="color:red">{{ $fd('ExistDisease',isExistDisease) }}</span>{{ $t('trials:readingReport:message:msg1') }}
</p>
<p v-else-if="currentExistDisease !== isExistDisease" style="width: 140px;padding:0 2px;white-space: normal;word-break: break-all;word-wrap: break-word;">{{ $t('trials:readingReport:title:sysEvaluationRes') }}<span style="color:red">{{ $fd('ExistDisease',isExistDisease) }}</span>{{ $t('trials:readingReport:message:msg1') }}</p>
</template>
<!-- <template v-else>
<span>{{ currentTaskReason }}</span>
@ -733,7 +734,8 @@ export default {
}
var token = getToken()
var trialReadingCriterionId = this.$router.currentRoute.query.TrialReadingCriterionId
var subjectCode = this.$router.currentRoute.query.subjectCode
// var subjectCode = this.$router.currentRoute.query.subjectCode
var subjectCode = localStorage.getItem('subjectCode')
var subjectId = this.$router.currentRoute.query.subjectId
var trialId = this.$router.currentRoute.query.trialId
var isReadingTaskViewInOrder = this.$router.currentRoute.query.isReadingTaskViewInOrder

View File

@ -49,20 +49,50 @@
/>
<div class="image-desc">
<div class="flex-div">
<div v-if="!study.IsCriticalSequence">#{{ series.seriesNumber }} </div>
<div v-if="series.isDicom && series.prefetchInstanceCount<series.instanceCount && series.modality!== 'SR'">
<!-- 下载 -->
<el-tooltip v-if="!series.isLoading" class="item" effect="dark" :content="$t('trials:reading:button:download')" placement="bottom">
<div style="width: 40px;display: flex;flex-direction: row;justify-content: space-between;">
<div v-if="!study.IsCriticalSequence">#{{ series.seriesNumber }}</div>
<div v-if="series.isDicom && series.prefetchInstanceCount<series.instanceCount && series.modality!== 'SR'">
<!-- 下载 -->
<el-tooltip v-if="!series.isLoading" class="item" effect="dark" :content="$t('trials:reading:button:download')" placement="bottom">
<i class="el-icon-video-play" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="loadSeries(series,index,i)" />
</el-tooltip>
</div>
<el-tooltip v-else-if="series.isDicom && series.prefetchInstanceCount === 0 &&series.modality!== 'SR'" class="item" effect="dark" :content="$t('trials:reading:button:download')" placement="bottom">
<i class="el-icon-video-play" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="loadSeries(series,index,i)" />
</el-tooltip>
<!-- 暂停 -->
<!-- <el-tooltip v-else class="item" effect="dark" :content="$t('trials:reading:button:pause')" placement="bottom">
<i class="el-icon-video-pause" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="stopLoadSeries(series,index,i)" />
</el-tooltip> -->
</div>
<el-tooltip v-else-if="series.isDicom && series.prefetchInstanceCount === 0 &&series.modality!== 'SR'" class="item" effect="dark" :content="$t('trials:reading:button:download')" placement="bottom">
<i class="el-icon-video-play" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="loadSeries(series,index,i)" />
</el-tooltip>
<div v-if="series.isExistMutiFrames && series.instanceCount > 1">
<el-popover
placement="right"
trigger="hover"
popper-class="instance_frame_wrapper"
>
<div
v-for="(instance, idx) in series.instanceInfoList"
:key="instance.Id"
class="frame_content"
:style="{'margin-bottom':idx<series.instanceInfoList.length-1? '5px':'0px'}"
@click.stop="showMultiFrames(index,series, i, instance)"
>
<!-- <div>
<img
class="image-preview"
:src="series.previewImageUrl"
crossorigin="anonymous"
alt=""
style="width: 40px;height:40px;"
fit="fill"
>
</div> -->
<div>
<div>{{ instance.InstanceNumber }}</div>
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
</div>
</div>
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;color: #ffeb3b;" />
</el-popover>
</div>
</div>
<p v-show="series.description">
<el-tooltip class="item" effect="dark" :content="series.description" placement="right">
@ -73,7 +103,10 @@
<p v-show="series.sliceThickness && !study.IsCriticalSequence">
T: {{ parseFloat(series.sliceThickness).toFixed(digitPlaces) }}
</p>
<p v-show="series.instanceCount">
<p v-show="series.instanceCount && series.imageloadedArr.length < series.instanceCount">
{{ series.modality }}: {{ series.imageloadedArr.length }}/{{ series.instanceCount }} image
</p>
<p v-show="series.instanceCount && series.imageloadedArr.length >= series.instanceCount">
{{ series.modality }}: {{ series.instanceCount }} image
</p>
@ -88,9 +121,9 @@
</div>
</div>
</div>
<div v-if="series.isDicom && series.prefetchInstanceCount>0 && series.prefetchInstanceCount<series.instanceCount" style="width: 100%;">
<div v-if="series.isDicom && series.prefetchInstanceCount>0 && series.prefetchInstanceCount<series.instanceCount * 100" style="width: 100%;">
<el-progress
:percentage="parseInt(((series.prefetchInstanceCount/series.instanceCount)*100).toFixed(2))"
:percentage="parseInt((series.prefetchInstanceCount / series.instanceCount).toFixed(2))"
/>
</div>
@ -185,7 +218,8 @@ export default {
srDialogVisible: false,
srInfo: {},
digitPlaces: 2,
visitTaskIdx: -1
visitTaskIdx: -1,
currentLoadIns: []
}
},
@ -219,7 +253,8 @@ export default {
// }
},
mounted() {
this.subjectCode = this.$router.currentRoute.query.subjectCode
// this.subjectCode = this.$router.currentRoute.query.subjectCode
this.subjectCode = localStorage.getItem('subjectCode')
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
DicomEvent.$on('refreshStudyListMeasureData', () => {
@ -233,6 +268,8 @@ export default {
// this.studyList = this.visitTaskList[idx].StudyList
// }
// })
// const debouncedInputHandler = this.debounce(this.cornerstoneimageloadprogress, 100)
cornerstone.events.addEventListener('cornerstoneimageloadprogress', this.cornerstoneimageloadprogress)
cornerstone.events.addEventListener('cornerstoneimageloaded', this.cornerstoneImageLoaded)
// cornerstone.events.addEventListener('cornerstoneimagecachefull', this.cornerstoneimagecachefull)
// cornerstone.events.addEventListener('cornerstoneimagecachechanged', this.cornerstoneimagecachechanged)
@ -246,13 +283,27 @@ export default {
window.removeEventListener('beforeunload', e => { cornerstone.imageCache.purgeCache() })
},
methods: {
debounce(fn, delay) {
let timer = null
return function() {
const context = this
const args = arguments
clearTimeout(timer)
timer = setTimeout(() => {
fn.apply(context, args)
}, delay)
}
},
initStudyInfo() {
const loading = this.$loading({ fullscreen: true })
//
this.getInitSeries().then((res) => {
requestPoolManager.startTaskTimer()
res.map((item) => {
this.loadInitialImage(item)
// this.loadInitialImage(item)
const imageId = item.imageIds[item.imageIdIndex]
const p = parseInt(new Date().getTime())
requestPoolManager.loadAndCacheImagePlus(imageId, item.seriesId, p * 100)
})
var i = res.findIndex(s => s.isCurrentTask)
if (i > -1) {
@ -261,71 +312,18 @@ export default {
this.measureData = this.visitTaskList[idx].MeasureData
this.studyList = this.visitTaskList[idx].StudyList
var priority = parseInt(new Date().getTime())
res[i].imageIds.map(image => {
priority--
this.imageList.push({ imageId: image, seriesId: res[i].seriesId, studyIndex: res[i].studyIndex, seriesIndex: res[i].seriesIndex, visitTaskId: res[i].visitTaskId, priority })
})
// this.studyList.map((study, studyIndex) => {
// study.SeriesList.map((series, seriesIndex) => {
// if (series.modality !== 'SR') {
// series.imageIds.map(image => {
// var p = priority - seriesIndex
// if (series.seriesId === res[i].seriesId) {
// p = priority
// } else {
// --p
// }
// this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority: p })
// })
// }
// })
// })
this.loopLoad()
}
}
DicomEvent.$emit('loadImageStacks', res)
loading.close()
this.isRender = true
}).catch(() => {
loading.close()
})
},
initStudyInfo2() {
console.log('initStudyInfo')
const loading = this.$loading({ fullscreen: true })
//
this.getInitSeries().then((res) => {
requestPoolManager.startTaskTimer()
res.map((item) => {
this.loadInitialImage(item)
})
var i = res.findIndex(s => s.isCurrentTask)
if (i > -1) {
var p = parseInt(new Date().getTime())
// var p = this.visitTaskId === this.currentTaskId ? parseInt(new Date().getTime()) : 999 //
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
if (idx > -1) {
this.measureData = this.visitTaskList[idx].MeasureData
this.studyList = this.visitTaskList[idx].StudyList
this.studyList.map((study, studyIndex) => {
study.SeriesList.map((series, seriesIndex) => {
if (series.modality !== 'SR') {
// var sliceThickness = isNaN(parseInt(series.sliceThickness)) ? null : parseInt(series.sliceThickness)
// if (sliceThickness === 5 || series.instanceCount <= 100) {
series.imageIds.map(image => {
let priority = 0
if (series.seriesId === res[i].seriesId) {
priority = parseInt(new Date().getTime()) * 10
} else {
priority = --p
}
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
}
if (res[i].isExistMutiFrames) {
res[i].instanceInfoList.map(image => {
priority--
this.imageList.push({ imageId: image.ImageId, seriesId: res[i].seriesId, studyIndex: res[i].studyIndex, seriesIndex: res[i].seriesIndex, visitTaskId: res[i].visitTaskId, priority })
})
})
} else {
res[i].imageIds.map(image => {
priority--
this.imageList.push({ imageId: image, seriesId: res[i].seriesId, studyIndex: res[i].studyIndex, seriesIndex: res[i].seriesIndex, visitTaskId: res[i].visitTaskId, priority })
})
}
this.loopLoad()
}
}
@ -341,9 +339,9 @@ export default {
var p = parseInt(new Date().getTime())
var imageId = seriesInfo.imageIds[seriesInfo.imageIdIndex]
requestPoolManager.loadAndCacheImagePlus(imageId, seriesInfo.seriesId, p * 100).then(res => {
if (seriesInfo.isCurrentTask) {
this.imageLoaded({ studyIndex: seriesInfo.studyIndex, seriesIndex: seriesInfo.seriesIndex, imageId: res.imageId }, res.data.string('x0020000e'))
}
// if (seriesInfo.isCurrentTask) {
// this.imageLoaded({ studyIndex: seriesInfo.studyIndex, seriesIndex: seriesInfo.seriesIndex, imageId: res.imageId }, res.data.string('x0020000e'))
// }
})
},
getStudyList() {
@ -367,11 +365,12 @@ export default {
},
async getInitSeries() {
console.log('getInitSeries')
var seriesList = []
var isReadingTaskViewInOrder = JSON.parse(this.$router.currentRoute.query.isReadingTaskViewInOrder)
var isReadingTaskViewInOrder = parseInt(this.$router.currentRoute.query.isReadingTaskViewInOrder)
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
this.studyList = this.visitTaskList[idx].StudyList
if (this.visitTaskList[idx].IsBaseLineTask || !isReadingTaskViewInOrder) {
if (this.visitTaskList[idx].IsBaseLineTask || isReadingTaskViewInOrder !== 1) {
// 线
const obj = this.getFirstMarkedSeries(this.visitTaskList[idx].MeasureData, [...this.visitTaskList[idx].StudyList])
if (Object.keys(obj).length !== 0) {
@ -626,9 +625,15 @@ export default {
}
if (!isAddToTakPool) {
var priority = parseInt(new Date().getTime())
series.imageIds.map((imageId) => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => {
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
} else {
series.imageIds.map(imageId => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
}
if (this.imageList.length > 0) {
this.loopLoadStatus = 0
this.loopLoad()
@ -647,6 +652,53 @@ export default {
store.dispatch('reading/setActiveSeries', series)
},
showMultiFrames(studyIndex, series, seriesIndex, instanceInfo) {
this.currentSeriesIndex = seriesIndex
const imageIds = []
if (instanceInfo.NumberOfFrames && instanceInfo.NumberOfFrames > 1) {
for (let j = 0; j < instanceInfo.NumberOfFrames; j++) {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instanceInfo.Path}?frame=${j}&instanceId=${instanceInfo.Id}&visitTaskId=${this.visitTaskId}&idx=${studyIndex}|${seriesIndex}`)
}
} else {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instanceInfo.Path}?instanceId=${instanceInfo.Id}&visitTaskId=${this.visitTaskId}&idx=${studyIndex}|${seriesIndex}`)
}
this.studyIndex = studyIndex
this.seriesIndex = seriesIndex
this.studyList[studyIndex].SeriesList[seriesIndex].measureData = this.measureData
var dicomStatck = this.studyList[studyIndex].SeriesList[seriesIndex]
dicomStatck.imageIds = imageIds
dicomStatck.imageIdIndex = 0
this.$emit('loadImageStack', dicomStatck)
this.loopLoadStatus = -1
series.isLoading = true
var isAddToTakPool = false
if (this.showSeriesList.includes(`${studyIndex}_${seriesIndex}`)) {
isAddToTakPool = true
} else {
this.showSeriesList.push(`${studyIndex}_${seriesIndex}`)
}
if (!isAddToTakPool) {
var priority = parseInt(new Date().getTime())
if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => {
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
} else {
series.imageIds.map((imageId) => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
}
if (this.imageList.length > 0) {
this.loopLoadStatus = 0
this.loopLoad()
}
} else {
requestPoolManager.changePriority(series.seriesId)
}
DicomEvent.$emit('loadMeasurementList', { visitTaskId: this.visitTaskId, taskBlindName: this.taskBlindName })
},
setSeriesActive(obj) {
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
if (idx === -1) return
@ -705,10 +757,17 @@ export default {
// }
//
if (!isCurrentTask && study.IsCriticalSequence) {
series.imageIds.map(image => {
priority = priority - 1
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => {
priority = priority - 1
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
} else {
series.imageIds.map(imageId => {
priority = priority - 1
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
})
}
}
}
})
@ -720,11 +779,7 @@ export default {
if (this.imageList.length > 0) {
// requestPoolManager.startTaskTimer()
this.imageList.map(image => {
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority).then(res => {
if (res) {
this.imageLoaded(image, res.data.string('x0020000e'))
}
})
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority)
})
requestPoolManager.sortTaskPool()
@ -744,12 +799,22 @@ export default {
}
if (!isAddToTakPool) {
const priority = parseInt(new Date().getTime())
series.imageIds.map(image => {
const index = this.cachedImages.findIndex(item => item.uri === image)
if (index === -1) {
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
}
})
if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => {
const index = this.cachedImages.findIndex(item => item.uri === image)
if (index === -1) {
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
}
})
} else {
series.imageIds.map(image => {
const index = this.cachedImages.findIndex(item => item.uri === image)
if (index === -1) {
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
}
})
}
if (this.imageList.length > 0) {
this.loopLoadStatus = 0
this.loopLoad()
@ -834,6 +899,47 @@ export default {
// }
// }
},
cornerstoneimageloadprogress(e) {
const imageId = e.detail.imageId
const params = {}
const searchParams = new URLSearchParams(imageId.split('?')[1])
for (const [key, value] of searchParams.entries()) {
params[key] = value
}
if (this.visitTaskId !== params.visitTaskId) return
const percentComplete = e.detail.percentComplete
const studyIndex = parseInt(params.idx.split('|')[0])
const seriesIndex = parseInt(params.idx.split('|')[1])
var prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount
var instanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
const i = this.currentLoadIns.findIndex(i => i.imageId === imageId)
if (i > -1) {
prefetchInstanceCount = prefetchInstanceCount + percentComplete - this.currentLoadIns[i].percentComplete
this.currentLoadIns[i].percentComplete = percentComplete
if (percentComplete >= 100) {
this.currentLoadIns.splice(i, 1)
}
} else {
if (percentComplete !== 100) {
this.currentLoadIns.push({ imageId, percentComplete })
}
prefetchInstanceCount = prefetchInstanceCount + percentComplete
}
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = prefetchInstanceCount
if (percentComplete >= 100) {
this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.push(imageId)
}
}
if (prefetchInstanceCount >= instanceCount * 100) {
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = instanceCount * 100
//
this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
// this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.push(imageId)
}
},
cornerstoneimagecachechanged(e) {
const cacheInfo = cornerstone.imageCache.getCacheInfo()
console.log(cacheInfo)
@ -936,6 +1042,7 @@ export default {
padding: 1px;
margin: 0px;
}
}
}
/deep/.el-collapse{
@ -986,5 +1093,29 @@ export default {
}
}
}
</style>
<style>
.instance_frame_wrapper{
min-width: 120px;
background-color: #2c2c2c;
border: 1px solid #2c2c2c;
padding: 5px;
}
.frame_content{
height: 50px;
padding: 5px;
display: flex;
justify-content: flex-start;
color: #ddd;
font-size: 12px;
border: 1px solid #404040;
}
.frame_content:hover {
/* font-weight: bold; */
/* box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); */
cursor: pointer;
/* color: #428bca; */
border-color: #213a54 !important;
background-color: #213a54;
}
</style>

Some files were not shown because too many files have changed in this diff Show More