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.jsuat_us
commit
8f8c5d0744
|
|
@ -14,6 +14,9 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = false
|
||||||
# 是否开启登陆限制 true:是 false:否
|
# 是否开启登陆限制 true:是 false:否
|
||||||
VUE_APP_LOGIN_FOR_PERMISSION = false
|
VUE_APP_LOGIN_FOR_PERMISSION = false
|
||||||
|
|
||||||
|
# 是否开启长时间无操作锁定弹框MFA验证 true:是 false:否
|
||||||
|
VUE_APP_LOCK_FOR_PERMISSION_MFA = false
|
||||||
|
|
||||||
# 是否开启长时间无操作锁定弹框 true:是 false:否
|
# 是否开启长时间无操作锁定弹框 true:是 false:否
|
||||||
VUE_APP_LOCK_FOR_PERMISSION = false
|
VUE_APP_LOCK_FOR_PERMISSION = false
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,9 @@ VUE_APP_BASE_PATH = '/'
|
||||||
# 是否开启登陆限制 true:是 false:否
|
# 是否开启登陆限制 true:是 false:否
|
||||||
VUE_APP_LOGIN_FOR_PERMISSION = true
|
VUE_APP_LOGIN_FOR_PERMISSION = true
|
||||||
|
|
||||||
|
# 是否开启长时间无操作锁定弹框MFA验证 true:是 false:否
|
||||||
|
VUE_APP_LOCK_FOR_PERMISSION_MFA = false
|
||||||
|
|
||||||
# 是否开启长时间无操作锁定弹框 true:是 false:否
|
# 是否开启长时间无操作锁定弹框 true:是 false:否
|
||||||
VUE_APP_LOCK_FOR_PERMISSION = true
|
VUE_APP_LOCK_FOR_PERMISSION = true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,9 @@ VUE_APP_IS_TEST = true
|
||||||
# 是否开启登陆限制 true:是 false:否
|
# 是否开启登陆限制 true:是 false:否
|
||||||
VUE_APP_LOGIN_FOR_PERMISSION = false
|
VUE_APP_LOGIN_FOR_PERMISSION = false
|
||||||
|
|
||||||
|
# 是否开启长时间无操作锁定弹框MFA验证 true:是 false:否
|
||||||
|
VUE_APP_LOCK_FOR_PERMISSION_MFA = false
|
||||||
|
|
||||||
# 是否开启长时间无操作锁定弹框 true:是 false:否
|
# 是否开启长时间无操作锁定弹框 true:是 false:否
|
||||||
VUE_APP_LOCK_FOR_PERMISSION = false
|
VUE_APP_LOCK_FOR_PERMISSION = false
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@ NODE_ENV = 'prop'
|
||||||
# 是否开启登陆限制 true:是 false:否
|
# 是否开启登陆限制 true:是 false:否
|
||||||
VUE_APP_LOGIN_FOR_PERMISSION = true
|
VUE_APP_LOGIN_FOR_PERMISSION = true
|
||||||
|
|
||||||
|
# 是否开启长时间无操作锁定弹框MFA验证 true:是 false:否
|
||||||
|
VUE_APP_LOCK_FOR_PERMISSION_MFA = false
|
||||||
|
|
||||||
# 是否开启长时间无操作锁定弹框 true:是 false:否
|
# 是否开启长时间无操作锁定弹框 true:是 false:否
|
||||||
VUE_APP_LOCK_FOR_PERMISSION = true
|
VUE_APP_LOCK_FOR_PERMISSION = true
|
||||||
|
|
||||||
|
|
|
||||||
3
.env.uat
3
.env.uat
|
|
@ -10,6 +10,9 @@ VUE_APP_BASE_PATH = '/'
|
||||||
# 是否开启登陆限制 true:是 false:否
|
# 是否开启登陆限制 true:是 false:否
|
||||||
VUE_APP_LOGIN_FOR_PERMISSION = true
|
VUE_APP_LOGIN_FOR_PERMISSION = true
|
||||||
|
|
||||||
|
# 是否开启长时间无操作锁定弹框MFA验证 true:是 false:否
|
||||||
|
VUE_APP_LOCK_FOR_PERMISSION_MFA = false
|
||||||
|
|
||||||
# 是否开启长时间无操作锁定弹框 true:是 false:否
|
# 是否开启长时间无操作锁定弹框 true:是 false:否
|
||||||
VUE_APP_LOCK_FOR_PERMISSION = true
|
VUE_APP_LOCK_FOR_PERMISSION = true
|
||||||
|
|
||||||
|
|
|
||||||
7
.env.usa
7
.env.usa
|
|
@ -1,12 +1,15 @@
|
||||||
# just a flag
|
# just a flag
|
||||||
ENV = 'production'
|
ENV = 'usa'
|
||||||
NODE_ENV = 'production'
|
NODE_ENV = 'usa'
|
||||||
# base public path
|
# base public path
|
||||||
VUE_APP_BASE_PATH = 'https://ei-code-prod.s3.amazonaws.com/2024-05-31/'
|
VUE_APP_BASE_PATH = 'https://ei-code-prod.s3.amazonaws.com/2024-05-31/'
|
||||||
|
|
||||||
# 是否开启登陆限制 true:是 false:否
|
# 是否开启登陆限制 true:是 false:否
|
||||||
VUE_APP_LOGIN_FOR_PERMISSION = false
|
VUE_APP_LOGIN_FOR_PERMISSION = false
|
||||||
|
|
||||||
|
# 是否开启长时间无操作锁定弹框MFA验证 true:是 false:否
|
||||||
|
VUE_APP_LOCK_FOR_PERMISSION_MFA = true
|
||||||
|
|
||||||
# 是否开启长时间无操作锁定弹框 true:是 false:否
|
# 是否开启长时间无操作锁定弹框 true:是 false:否
|
||||||
VUE_APP_LOCK_FOR_PERMISSION = false
|
VUE_APP_LOCK_FOR_PERMISSION = false
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ clone:
|
||||||
disable: true #禁用默认克隆
|
disable: true #禁用默认克隆
|
||||||
|
|
||||||
server:
|
server:
|
||||||
host: 192.168.3.68
|
host: 106.14.89.110
|
||||||
user: root
|
user: root
|
||||||
password:
|
password:
|
||||||
from_secret: local_pwd
|
from_secret: local_pwd
|
||||||
|
|
@ -19,7 +19,7 @@ steps:
|
||||||
- name: publish-test-irc-vue
|
- name: publish-test-irc-vue
|
||||||
commands:
|
commands:
|
||||||
- echo start publish test-irc-vue
|
- 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}
|
- sh test-irc.sh v${DRONE_BUILD_NUMBER}
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
|
|
@ -41,7 +41,7 @@ clone:
|
||||||
disable: true #禁用默认克隆
|
disable: true #禁用默认克隆
|
||||||
|
|
||||||
server:
|
server:
|
||||||
host: 123.56.94.154
|
host: 106.14.89.110
|
||||||
user: root
|
user: root
|
||||||
password:
|
password:
|
||||||
from_secret: local_pwd
|
from_secret: local_pwd
|
||||||
|
|
|
||||||
250
src/App.vue
250
src/App.vue
|
|
@ -1,169 +1,213 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="app" style="position: relative">
|
<div id="app" style="position: relative">
|
||||||
<router-view />
|
<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
|
i18n
|
||||||
</div>
|
</div>
|
||||||
<el-drawer
|
<el-drawer title="国际化" :visible.sync="drawer" direction="rtl" size="80%">
|
||||||
title="国际化"
|
|
||||||
:visible.sync="drawer"
|
|
||||||
direction="rtl"
|
|
||||||
size="80%">
|
|
||||||
<div style="width: 320px">
|
<div style="width: 320px">
|
||||||
<el-form
|
<el-form label-width="100px" @submit.native.prevent size="small">
|
||||||
label-width="100px"
|
|
||||||
@submit.native.prevent
|
|
||||||
size="small"
|
|
||||||
>
|
|
||||||
<el-form-item label="关键字">
|
<el-form-item label="关键字">
|
||||||
<el-input v-model="key" @input="keyChange"/>
|
<el-input v-model="key" @input="keyChange" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
v-adaptive="{bottomOffset:50}"
|
v-adaptive="{ bottomOffset: 50 }"
|
||||||
height="100"
|
height="100"
|
||||||
style="width: 100%">
|
style="width: 100%"
|
||||||
<el-table-column
|
>
|
||||||
prop="Code"
|
<el-table-column prop="Code" label="标签" width="300">
|
||||||
label="标签"
|
|
||||||
width="300">
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column-->
|
<!-- <el-table-column-->
|
||||||
<!-- prop="Description"-->
|
<!-- prop="Description"-->
|
||||||
<!-- label="路由"-->
|
<!-- label="路由"-->
|
||||||
<!-- show-overflow-tooltip-->
|
<!-- show-overflow-tooltip-->
|
||||||
<!-- width="180">-->
|
<!-- width="180">-->
|
||||||
<!-- <template slot-scope="scope">-->
|
<!-- <template slot-scope="scope">-->
|
||||||
<!-- {{scope.row.Description}}-->
|
<!-- {{scope.row.Description}}-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<el-table-column
|
<el-table-column prop="Value" label="英文">
|
||||||
prop="Value"
|
|
||||||
label="英文">
|
|
||||||
<template slot-scope="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="ValueCN" label="中文">
|
||||||
prop="ValueCN"
|
|
||||||
label="中文">
|
|
||||||
<template slot-scope="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div style="text-align: right;padding-top: 10px;padding-right: 10px;">
|
<div style="text-align: right; padding-top: 10px; padding-right: 10px">
|
||||||
<el-button size="mini" @click="drawer = false">取消
|
<el-button size="mini" @click="drawer = false">取消 </el-button>
|
||||||
</el-button>
|
<el-button size="mini" type="primary" @click="handleSave"
|
||||||
<el-button size="mini" type="primary" @click="handleSave">保存</el-button>
|
>保存</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { batchAddOrUpdateFrontInternationalization, getFrontInternationalizationList } from '@/api/dictionary/dictionary'
|
import {
|
||||||
|
batchAddOrUpdateFrontInternationalization,
|
||||||
|
getFrontInternationalizationList,
|
||||||
|
} from "@/api/dictionary/dictionary";
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
import i18n from "./lang";
|
import i18n from "./lang";
|
||||||
export default {
|
export default {
|
||||||
name: 'App',
|
name: "App",
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
drawer: false,
|
drawer: false,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
show: false,
|
show: false,
|
||||||
key: null,
|
key: null,
|
||||||
arr: []
|
arr: [],
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.show = process.env.VUE_APP_OSS_PATH === '/test/dist'
|
this.show = process.env.VUE_APP_OSS_PATH === "/test/dist";
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeValue(target, attr, e) {
|
changeValue(target, attr, e) {
|
||||||
this.$set(target, attr, e)
|
this.$set(target, attr, e);
|
||||||
},
|
},
|
||||||
keyChange(v) {
|
keyChange(v) {
|
||||||
if (this.key) {
|
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 {
|
} else {
|
||||||
this.tableData = Object.assign([], this.arr)
|
this.tableData = Object.assign([], this.arr);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$confirm('确定修改当前页面国际化内容?').then(() => {
|
this.$confirm("确定修改当前页面国际化内容?").then(() => {
|
||||||
batchAddOrUpdateFrontInternationalization(this.tableData).then(async res => {
|
batchAddOrUpdateFrontInternationalization(this.tableData).then(
|
||||||
var zhMessages = {}, enMessages = {}
|
async (res) => {
|
||||||
var Internationalization = await getFrontInternationalizationList()
|
var zhMessages = {},
|
||||||
Vue.prototype.$tl = Internationalization.Result
|
enMessages = {};
|
||||||
this.tableData.forEach(v => {
|
var Internationalization = await getFrontInternationalizationList();
|
||||||
|
Vue.prototype.$tl = Internationalization.Result;
|
||||||
|
this.tableData.forEach((v) => {
|
||||||
// zhMessages[v.Description + '_' + v.Code] = v.ValueCN
|
// zhMessages[v.Description + '_' + v.Code] = v.ValueCN
|
||||||
// enMessages[v.Description + '_' + v.Code] = v.Value
|
// enMessages[v.Description + '_' + v.Code] = v.Value
|
||||||
zhMessages[v.Code] = v.ValueCN
|
zhMessages[v.Code] = v.ValueCN;
|
||||||
enMessages[v.Code] = v.Value
|
enMessages[v.Code] = v.Value;
|
||||||
})
|
});
|
||||||
i18n.mergeLocaleMessage('zh', zhMessages)
|
i18n.mergeLocaleMessage("zh", zhMessages);
|
||||||
i18n.mergeLocaleMessage('en', enMessages)
|
i18n.mergeLocaleMessage("en", enMessages);
|
||||||
this.drawer = false
|
this.drawer = false;
|
||||||
this.$message.success('国际化修改成功')
|
this.$message.success("国际化修改成功");
|
||||||
})
|
}
|
||||||
})
|
);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
openI18n() {
|
openI18n() {
|
||||||
this.tableData = []
|
this.tableData = [];
|
||||||
this.key = null
|
this.key = null;
|
||||||
this.drawer = true
|
this.drawer = true;
|
||||||
let arr = []
|
let arr = [];
|
||||||
let tableData = this.$tl.map(v => {
|
let tableData = this.$tl.map((v) => {
|
||||||
let a = {...v}
|
let a = { ...v };
|
||||||
// if (!a.Description) {
|
// if (!a.Description) {
|
||||||
// a.Description = this.$route.path
|
// a.Description = this.$route.path
|
||||||
// }
|
// }
|
||||||
return a
|
return a;
|
||||||
})
|
});
|
||||||
tableData = tableData.filter(v => {
|
tableData = tableData.filter((v) => {
|
||||||
// return ~this.$path.indexOf(v.Description + '_' + v.Code)
|
// return ~this.$path.indexOf(v.Description + '_' + v.Code)
|
||||||
return ~this.$path.indexOf(v.Code)
|
return ~this.$path.indexOf(v.Code);
|
||||||
})
|
});
|
||||||
this.$path.forEach(v => {
|
this.$path.forEach((v) => {
|
||||||
let o = tableData.find(a => {
|
let o = tableData.find((a) => {
|
||||||
return a.Code === v
|
return a.Code === v;
|
||||||
})
|
});
|
||||||
if (o) {
|
if (o) {
|
||||||
arr.push(o)
|
arr.push(o);
|
||||||
} else {
|
} else {
|
||||||
arr.push({
|
arr.push({
|
||||||
Code: v,
|
Code: v,
|
||||||
Description: null,
|
Description: null,
|
||||||
Value: null,
|
Value: null,
|
||||||
ValueCN: null
|
ValueCN: null,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.arr = arr
|
this.arr = arr;
|
||||||
if (this.key) {
|
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 {
|
} else {
|
||||||
this.tableData = Object.assign([], this.arr)
|
this.tableData = Object.assign([], this.arr);
|
||||||
}
|
}
|
||||||
// console.log(JSON.stringify(this.$path))
|
// console.log(JSON.stringify(this.$path))
|
||||||
// console.log(JSON.stringify(this.tableData))
|
// console.log(JSON.stringify(this.tableData))
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.el-tooltip__popper{
|
$light_gray: #606266;
|
||||||
|
.el-tooltip__popper {
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
}
|
}
|
||||||
.my_multiple{
|
.my_multiple {
|
||||||
.el-input--medium .el-input__inner{
|
.el-input--medium .el-input__inner {
|
||||||
height: 36px!important;
|
height: 36px !important;
|
||||||
}
|
}
|
||||||
.el-select__tags{
|
.el-select__tags {
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
@ -180,21 +224,29 @@ input[type="number"] {
|
||||||
-moz-appearance: textfield !important;
|
-moz-appearance: textfield !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.viewer-fixed.viewer-container{
|
.viewer-fixed.viewer-container {
|
||||||
z-index: 10000;
|
z-index: 10000;
|
||||||
}
|
}
|
||||||
textarea{
|
textarea {
|
||||||
white-space: break-spaces;
|
white-space: break-spaces;
|
||||||
word-break: normal;
|
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;
|
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;
|
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>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1006,3 +1006,11 @@ export function deleteCommonDocument(commonDocumentId) {
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//getTrialSiteList
|
||||||
|
export function getTrialSiteList(params) {
|
||||||
|
return request({
|
||||||
|
url: `/site/getTrialSiteList`,
|
||||||
|
method: 'post',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -76,3 +76,11 @@ export function fullyReplicated(param) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取所有字典key
|
||||||
|
export function getDictionaryCodeList() {
|
||||||
|
return request({
|
||||||
|
url: `/Dictionary/getAllDictionaryKey`,
|
||||||
|
method: 'post',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,17 +14,19 @@ export function getHospitalList() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getAllSponsorList() {
|
export function getAllSponsorList(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/sponsor/getAllSponsorList',
|
url: '/sponsor/getAllSponsorList',
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getAllCROList() {
|
export function getAllCROList(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/cro/getAllCROList',
|
url: '/cro/getAllCROList',
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function getAllSiteList() {
|
export function getAllSiteList() {
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -1364,9 +1364,9 @@ export function getForwardList(param) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getNoneDicomStudyList(subjectVisitId, sudyId = '') {
|
export function getNoneDicomStudyList(subjectVisitId, sudyId = '', isFilterZip = false) {
|
||||||
return request({
|
return request({
|
||||||
url: `/NoneDicomStudy/getNoneDicomStudyList?subjectVisitId=${subjectVisitId}&nonedicomStudyId=${sudyId}`,
|
url: `/NoneDicomStudy/getNoneDicomStudyList?subjectVisitId=${subjectVisitId}&nonedicomStudyId=${sudyId}&isFilterZip=${isFilterZip}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -3667,3 +3667,11 @@ export function getDicomSeriesInfo(param) {
|
||||||
data: param
|
data: param
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getTrialSiteSelectList(params) {
|
||||||
|
return request({
|
||||||
|
url: `/trialMaintenance/getTrialSiteSelectList`,
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -436,9 +436,9 @@ export function addSubjectCancelDoctorNote(params) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getSubjectCancelDoctorHistoryList(SubjectId) {
|
export function getSubjectCancelDoctorHistoryList(SubjectId, TrialReadingCriterionId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/TaskAllocationRule/getSubjectCancelDoctorHistoryList?SubjectId=${SubjectId}`,
|
url: `/TaskAllocationRule/getSubjectCancelDoctorHistoryList?SubjectId=${SubjectId}&&TrialReadingCriterionId=${TrialReadingCriterionId}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,4 +94,20 @@ export function getTrialJudgyInfo(params) {
|
||||||
data: 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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,11 @@ export function login(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function loginOut() {
|
export function loginOut(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/User/loginOut`,
|
url: `/User/loginOut`,
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function getAllDictionary() {
|
export function getAllDictionary() {
|
||||||
|
|
@ -157,3 +158,30 @@ export function getUserLogList(params) {
|
||||||
data: 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 |
Binary file not shown.
|
After Width: | Height: | Size: 145 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
|
|
@ -2,18 +2,28 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="base-search-form">
|
<div class="base-search-form">
|
||||||
<el-form :size="size" :inline="true" :label-width="labelWidth">
|
<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-input
|
||||||
<!-- 下拉框 -->
|
v-if="item.type === 'Input'"
|
||||||
<el-select
|
|
||||||
v-if="item.type==='Select'"
|
|
||||||
v-model="searchData[item.prop]"
|
v-model="searchData[item.prop]"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
size="mini"
|
size="mini"
|
||||||
:style="{width:item.width}"
|
:style="{ width: item.width }"
|
||||||
|
:readonly="item.readonly"
|
||||||
@change="item.change && item.change(that,searchData[item.prop])"
|
/>
|
||||||
|
<!-- 下拉框 -->
|
||||||
|
<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
|
<el-option
|
||||||
v-for="op in item.options"
|
v-for="op in item.options"
|
||||||
|
|
@ -23,49 +33,122 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select
|
<el-select
|
||||||
v-if="item.type==='Select2'"
|
v-if="item.type === 'Select2'"
|
||||||
v-model="searchData[item.prop]"
|
v-model="searchData[item.prop]"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
size="mini"
|
size="mini"
|
||||||
:style="{width:item.width}"
|
:style="{ width: item.width }"
|
||||||
|
@change="item.change && item.change(that, searchData[item.prop])"
|
||||||
@change="item.change && item.change(that,searchData[item.prop])"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(key,value) of item.options"
|
v-for="(key, value) of item.options"
|
||||||
:key="key"
|
:key="key"
|
||||||
:label="key"
|
:label="key"
|
||||||
:value="value"
|
:value="value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- 单选 -->
|
<!-- 单选 -->
|
||||||
<el-radio-group v-if="item.type==='Radio'" v-model="searchData[item.prop]" :style="{width:item.width}">
|
<el-radio-group
|
||||||
<el-radio v-for="ra in item.radios" :key="ra.value" :label="ra.value">{{ ra.label }}</el-radio>
|
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>
|
||||||
<!-- 单选按钮 -->
|
<!-- 单选按钮 -->
|
||||||
<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-group
|
||||||
<el-radio-button v-for="ra in item.radios" :key="ra.value" :label="ra.value">{{ ra.label }}</el-radio-button>
|
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-radio-group>
|
||||||
<!-- 复选框 -->
|
<!-- 复选框 -->
|
||||||
<el-checkbox-group v-if="item.type==='Checkbox'" v-model="searchData[item.prop]" :style="{width:item.width}">
|
<el-checkbox-group
|
||||||
<el-checkbox v-for="ch in item.checkboxs" :key="ch.value" :label="ch.value">{{ ch.label }}</el-checkbox>
|
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-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-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 -->
|
||||||
<slot v-if="item.type==='Custom'" :name="item.slot" />
|
<slot v-if="item.type === 'Custom'" :name="item.slot" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-for="item in searchHandle" :key="item.label">
|
<el-form-item v-for="item in searchHandle" :key="item.label">
|
||||||
<slot v-if="item.slot" :name="item.slot" />
|
<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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -76,47 +159,45 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
that: {
|
that: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: this
|
default: this,
|
||||||
},
|
},
|
||||||
isHandle: {
|
isHandle: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true,
|
||||||
},
|
},
|
||||||
labelWidth: {
|
labelWidth: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: "",
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'mini'
|
default: "mini",
|
||||||
},
|
},
|
||||||
searchForm: {
|
searchForm: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => [],
|
||||||
},
|
},
|
||||||
searchHandle: {
|
searchHandle: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => [],
|
||||||
},
|
},
|
||||||
searchData: {
|
searchData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {}
|
default: () => {},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClick(emitKey) {
|
handleClick(emitKey) {
|
||||||
// emit事件
|
// emit事件
|
||||||
this.$emit(`${emitKey}`)
|
this.$emit(`${emitKey}`);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
};
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.base-search-form{
|
.base-search-form {
|
||||||
.el-form-item{
|
.el-form-item {
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="base-model-wrapper">
|
<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">
|
<div class="base-modal-body">
|
||||||
<slot name="dialog-body" />
|
<slot name="dialog-body" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -12,46 +22,51 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'BaseDialog',
|
name: "BaseDialog",
|
||||||
props: {
|
props: {
|
||||||
config: {
|
config: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default: () => {
|
||||||
return {
|
return {
|
||||||
visible: false,
|
visible: false,
|
||||||
title: '',
|
title: "",
|
||||||
closeOnClickModal: false,
|
closeOnClickModal: false,
|
||||||
showClose: true,
|
showClose: true,
|
||||||
appendToBody: false,
|
appendToBody: false,
|
||||||
width: '100px',
|
width: "100px",
|
||||||
fullscreen: false
|
fullscreen: false,
|
||||||
}
|
};
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.base-model-wrapper{
|
.base-model-wrapper {
|
||||||
.el-dialog__header{
|
.el-dialog__header {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
.el-dialog__headerbtn{
|
.el-dialog__headerbtn {
|
||||||
top: 10px;
|
top: 10px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.el-dialog__body{
|
.el-dialog__body {
|
||||||
padding:10px 10px 10px 10px;
|
padding: 10px 10px 10px 10px;
|
||||||
.base-modal-body{
|
.base-modal-body {
|
||||||
min-height: 100px;
|
min-height: 100px;
|
||||||
max-height:650px;
|
max-height: 650px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border: 1px solid #e0e0e0;
|
border: 1px solid #e0e0e0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.el-dialog__footer{
|
.el-dialog__footer {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.notFooter {
|
||||||
|
.is-fullscreen .el-dialog__footer {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="chat-wrapper">
|
<div class="chat-wrapper">
|
||||||
<div class="chat-content">
|
<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">
|
<div v-if="!record.mineMsg" class="word">
|
||||||
<!-- <img :src="record.headUrl"> -->
|
<!-- <img :src="record.headUrl"> -->
|
||||||
<img src="@/assets/CRC.png">
|
<img src="@/assets/CRC.png">
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
style="width:100%;height:100%;position:relative;"
|
style="width:100%;height:100%;position:relative;"
|
||||||
class="cornerstone-element"
|
class="cornerstone-element"
|
||||||
@contextmenu.prevent="onContextmenu"
|
@contextmenu.prevent="onContextmenu"
|
||||||
@mousemove="sliderMousemove"
|
|
||||||
@mouseup="sliderMouseup"
|
@mouseup="sliderMouseup"
|
||||||
>
|
>
|
||||||
<div v-show="dicomInfo.series" class="info-series">
|
<div v-show="dicomInfo.series" class="info-series">
|
||||||
|
|
@ -54,7 +53,7 @@
|
||||||
<!-- <div v-show="dicomInfo.acc">ACC {{ dicomInfo.acc }}</div> -->
|
<!-- <div v-show="dicomInfo.acc">ACC {{ dicomInfo.acc }}</div> -->
|
||||||
<!-- <div>{{ dicomInfo.time }}</div> -->
|
<!-- <div>{{ dicomInfo.time }}</div> -->
|
||||||
</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 :style="{top: height + '%'}" style="z-index:10;background: #9e9e9e;height: 20px;width: 100%;position: absolute;top: 0;cursor: move" @mousedown="sliderMousedown($event)" />
|
||||||
</div>
|
</div>
|
||||||
<div style="position: absolute;left: 50%;top: 15px;color: #f44336;">
|
<div style="position: absolute;left: 50%;top: 15px;color: #f44336;">
|
||||||
|
|
@ -163,7 +162,9 @@ export default {
|
||||||
isMove: false
|
isMove: false
|
||||||
},
|
},
|
||||||
mousePosition: { x: '', y: '', mo: '' },
|
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', () => {
|
document.addEventListener('mouseup', () => {
|
||||||
this.sliderMouseup()
|
this.sliderMouseup()
|
||||||
})
|
})
|
||||||
|
document.addEventListener('mousemove', (e) => {
|
||||||
|
this.sliderMousemove(e)
|
||||||
|
})
|
||||||
this.canvas.addEventListener('cornerstonetoolsstackscroll', this.stackScrollCallback)
|
this.canvas.addEventListener('cornerstonetoolsstackscroll', this.stackScrollCallback)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -205,7 +209,7 @@ export default {
|
||||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||||
instanceId = instanceId.split('.')[0]
|
instanceId = instanceId.split('.')[0]
|
||||||
this.stack.instanceId = instanceId
|
this.stack.instanceId = instanceId
|
||||||
if (this.toolState.clipPlaying) this.toggleClipPlay()
|
this.toolState.clipPlaying = false
|
||||||
const element = this.$refs.canvas
|
const element = this.$refs.canvas
|
||||||
cornerstone.enable(element)
|
cornerstone.enable(element)
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|
@ -213,7 +217,9 @@ export default {
|
||||||
cornerstone.loadAndCacheImage(this.stack.imageIds[this.stack.currentImageIdIndex])
|
cornerstone.loadAndCacheImage(this.stack.imageIds[this.stack.currentImageIdIndex])
|
||||||
.then(image => {
|
.then(image => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
if (this.stack.imageIds.indexOf(image.imageId) !== -1) {
|
||||||
this.onFirstImageLoaded(image)
|
this.onFirstImageLoaded(image)
|
||||||
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
if (error.error && error.error.message) {
|
if (error.error && error.error.message) {
|
||||||
|
|
@ -356,6 +362,12 @@ export default {
|
||||||
if (this.dicomInfo.thick) {
|
if (this.dicomInfo.thick) {
|
||||||
this.dicomInfo.thick = this.dicomInfo.thick.toFixed(2)
|
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) {
|
stackScrollCallback(e) {
|
||||||
const { detail } = e
|
const { detail } = e
|
||||||
|
|
@ -403,6 +415,7 @@ export default {
|
||||||
this.dicomInfo.location = position
|
this.dicomInfo.location = position
|
||||||
},
|
},
|
||||||
getOrientationMarker(element) {
|
getOrientationMarker(element) {
|
||||||
|
console.log('getOrientationMarker')
|
||||||
const enabledElement = cornerstone.getEnabledElement(element)
|
const enabledElement = cornerstone.getEnabledElement(element)
|
||||||
const imagePlane = cornerstone.metaData.get(
|
const imagePlane = cornerstone.metaData.get(
|
||||||
'imagePlaneModule',
|
'imagePlaneModule',
|
||||||
|
|
@ -426,6 +439,7 @@ export default {
|
||||||
if (!markers) {
|
if (!markers) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.orientationMarkers = [oppositeColumn, row, column, oppositeRow]
|
this.orientationMarkers = [oppositeColumn, row, column, oppositeRow]
|
||||||
this.originalMarkers = [oppositeColumn, row, column, oppositeRow]
|
this.originalMarkers = [oppositeColumn, row, column, oppositeRow]
|
||||||
this.setMarkers()
|
this.setMarkers()
|
||||||
|
|
@ -438,10 +452,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onImageLoaded(e) {
|
onImageLoaded(e) {
|
||||||
var image = e.detail.image
|
// var image = e.detail.image
|
||||||
// var seriesIndex = -1
|
// // var seriesIndex = -1
|
||||||
var seriesUid = image.data.string('x0020000e')
|
// var seriesUid = image.data.string('x0020000e')
|
||||||
console.log(seriesUid)
|
// console.log(seriesUid)
|
||||||
},
|
},
|
||||||
getToolForElement(toolName) {
|
getToolForElement(toolName) {
|
||||||
var isExist = false
|
var isExist = false
|
||||||
|
|
@ -521,6 +535,9 @@ export default {
|
||||||
this.sliderInfo.oldB = parseInt(e.srcElement.style.top) * boxHeight / 100
|
this.sliderInfo.oldB = parseInt(e.srcElement.style.top) * boxHeight / 100
|
||||||
this.sliderInfo.oldM = e.clientY
|
this.sliderInfo.oldM = e.clientY
|
||||||
this.sliderInfo.isMove = true
|
this.sliderInfo.isMove = true
|
||||||
|
e.stopImmediatePropagation()
|
||||||
|
e.stopPropagation()
|
||||||
|
e.preventDefault()
|
||||||
},
|
},
|
||||||
sliderMousemove(e) {
|
sliderMousemove(e) {
|
||||||
if (!this.sliderInfo.isMove) return
|
if (!this.sliderInfo.isMove) return
|
||||||
|
|
@ -540,6 +557,13 @@ export default {
|
||||||
sliderMouseup(e) {
|
sliderMouseup(e) {
|
||||||
this.sliderInfo.isMove = false
|
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() {
|
onClipStopped() {
|
||||||
this.toolState.clipPlaying = false
|
this.toolState.clipPlaying = false
|
||||||
},
|
},
|
||||||
|
|
@ -610,6 +634,7 @@ export default {
|
||||||
enabledElement.renderingTools.renderCanvasData = renderCanvasData
|
enabledElement.renderingTools.renderCanvasData = renderCanvasData
|
||||||
},
|
},
|
||||||
scrollPage(offset) {
|
scrollPage(offset) {
|
||||||
|
if(this.loading) return
|
||||||
var index = this.stack.currentImageIdIndex + offset
|
var index = this.stack.currentImageIdIndex + offset
|
||||||
if (index < 0) index = 0
|
if (index < 0) index = 0
|
||||||
else if (index >= this.stack.imageIds.length) {
|
else if (index >= this.stack.imageIds.length) {
|
||||||
|
|
@ -621,6 +646,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleClipPlay() {
|
toggleClipPlay() {
|
||||||
|
if(this.loading) return
|
||||||
if (this.toolState.clipPlaying) {
|
if (this.toolState.clipPlaying) {
|
||||||
cornerstoneTools.stopClip(this.canvas)
|
cornerstoneTools.stopClip(this.canvas)
|
||||||
this.toolState.clipPlaying = false
|
this.toolState.clipPlaying = false
|
||||||
|
|
@ -675,8 +701,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
resetRotate() {
|
resetRotate() {
|
||||||
|
if (this.originalMarkers.length > 0) {
|
||||||
this.orientationMarkers = [...this.originalMarkers]
|
this.orientationMarkers = [...this.originalMarkers]
|
||||||
this.setMarkers()
|
this.setMarkers()
|
||||||
|
}
|
||||||
|
|
||||||
var viewport = cornerstone.getViewport(this.canvas)
|
var viewport = cornerstone.getViewport(this.canvas)
|
||||||
viewport.hflip = false
|
viewport.hflip = false
|
||||||
viewport.vflip = false
|
viewport.vflip = false
|
||||||
|
|
@ -685,6 +714,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
setRotate(hflip, vflip, angle, type) {
|
setRotate(hflip, vflip, angle, type) {
|
||||||
|
if (this.orientationMarkers.length > 0) {
|
||||||
var markers = [...this.orientationMarkers]
|
var markers = [...this.orientationMarkers]
|
||||||
if (type === 2) {
|
if (type === 2) {
|
||||||
// 垂直翻转
|
// 垂直翻转
|
||||||
|
|
@ -703,6 +733,7 @@ export default {
|
||||||
this.orientationMarkers = [markers[3]].concat(markers.slice(0, 3))
|
this.orientationMarkers = [markers[3]].concat(markers.slice(0, 3))
|
||||||
}
|
}
|
||||||
this.setMarkers()
|
this.setMarkers()
|
||||||
|
}
|
||||||
var viewport = cornerstone.getViewport(this.canvas)
|
var viewport = cornerstone.getViewport(this.canvas)
|
||||||
if (hflip) viewport.hflip = !viewport.hflip
|
if (hflip) viewport.hflip = !viewport.hflip
|
||||||
if (vflip) viewport.vflip = !viewport.vflip
|
if (vflip) viewport.vflip = !viewport.vflip
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,19 @@
|
||||||
<button :title="$t('trials:dicom-show:lens')" class="btn-link" data-tool="Magnify" @click="setToolActive($event,'Magnify')">
|
<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;" />
|
<svg-icon icon-class="zoom" style="font-size:20px;" />
|
||||||
</button>
|
</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')">
|
<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;" />
|
<svg-icon icon-class="fitToWindow" style="font-size:20px;" />
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -169,19 +182,7 @@
|
||||||
<svg-icon icon-class="fitToImage" style="font-size:20px;" />
|
<svg-icon icon-class="fitToImage" style="font-size:20px;" />
|
||||||
</button>
|
</button>
|
||||||
<!-- <button title="旋转" class="btn-link dropdown" data-tool="Rotate" @click="setToolActive($event,'Rotate')"> -->
|
<!-- <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>
|
||||||
</div>
|
</div>
|
||||||
<!-- 测量标注 -->
|
<!-- 测量标注 -->
|
||||||
|
|
@ -247,7 +248,7 @@
|
||||||
<svg-icon icon-class="previousframe" style="font-size:20px;" />
|
<svg-icon icon-class="previousframe" style="font-size:20px;" />
|
||||||
</button>
|
</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
|
<svg-icon
|
||||||
:icon-class="currentDicomCanvas.toolState.clipPlaying ? 'stop' : 'play'"
|
:icon-class="currentDicomCanvas.toolState.clipPlaying ? 'stop' : 'play'"
|
||||||
style="font-size:20px;"
|
style="font-size:20px;"
|
||||||
|
|
@ -261,9 +262,10 @@
|
||||||
<button class="btn-link" :title="$t('trials:dicom-show:lastframe')" @click="currentDicomCanvas.scrollPage(9999)">
|
<button class="btn-link" :title="$t('trials:dicom-show:lastframe')" @click="currentDicomCanvas.scrollPage(9999)">
|
||||||
<svg-icon icon-class="lastframe" style="font-size:20px;" />
|
<svg-icon icon-class="lastframe" style="font-size:20px;" />
|
||||||
</button>
|
</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="15">15</option>
|
||||||
<option :value="20">20</option>
|
<option :value="20">20</option>
|
||||||
<option :value="30">30</option>
|
<option :value="30">30</option>
|
||||||
|
|
@ -386,20 +388,22 @@ export default {
|
||||||
wwwcList: [],
|
wwwcList: [],
|
||||||
layout: null,
|
layout: null,
|
||||||
seriesList: [],
|
seriesList: [],
|
||||||
customWwc: { visible: false, title: null }
|
customWwc: { visible: false, title: null },
|
||||||
|
fps: 15
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.customWwc = { visible: false, title: this.$t('DicomViewer:data:customWwc') }
|
this.customWwc = { visible: false, title: this.$t('DicomViewer:data:customWwc') }
|
||||||
this.rotateList[0] = '1'
|
this.rotateList[0] = '1'
|
||||||
this.colorList[0] = ''
|
this.colorList[0] = ''
|
||||||
this.wwwcList[0] = '1'
|
this.wwwcList[0] = '-1'
|
||||||
this.colormapsList = cornerstone.colors.getColormapsList()
|
this.colormapsList = cornerstone.colors.getColormapsList()
|
||||||
this.currentDicomCanvas = this.$refs['dicomCanvas0']
|
this.currentDicomCanvas = this.$refs['dicomCanvas0']
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
loadImageStack(dicomSeries) {
|
loadImageStack(dicomSeries) {
|
||||||
|
this.currentDicomCanvas.toolState.clipPlaying = false
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.currentDicomCanvas.loadImageStack(dicomSeries)
|
this.currentDicomCanvas.loadImageStack(dicomSeries)
|
||||||
})
|
})
|
||||||
|
|
@ -444,7 +448,7 @@ export default {
|
||||||
this.colorList[this.currentDicomCanvasIndex] = ''
|
this.colorList[this.currentDicomCanvasIndex] = ''
|
||||||
}
|
}
|
||||||
if (!this.wwwcList[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) {
|
setDicomCanvasfps(event) {
|
||||||
this.currentDicomCanvas.setFps(event.target.value)
|
this.currentDicomCanvas.setFps(event.target.value)
|
||||||
},
|
},
|
||||||
|
clipPlay() {
|
||||||
|
this.currentDicomCanvas.setFps(this.fps)
|
||||||
|
this.currentDicomCanvas.toggleClipPlay()
|
||||||
|
},
|
||||||
fitToType(e, type) {
|
fitToType(e, type) {
|
||||||
const toolButtons = document.querySelectorAll('[data-tool]')
|
const toolButtons = document.querySelectorAll('[data-tool]')
|
||||||
Array.from(toolButtons).forEach((toolBtn) => {
|
Array.from(toolButtons).forEach((toolBtn) => {
|
||||||
|
|
@ -879,13 +887,19 @@ export default {
|
||||||
background-color: #323232;
|
background-color: #323232;
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||||||
|
border: 1px solid #4e4e4e;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
.dicom-wrapper .dropdown:hover .dropdown-content {
|
.dicom-wrapper .dropdown:hover .dropdown-content {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
.dicom-wrapper .dropdown-content p{
|
.dicom-wrapper .dropdown-content div{
|
||||||
|
height: 25px;
|
||||||
|
line-height: 25px;
|
||||||
cursor:point;
|
cursor:point;
|
||||||
}
|
}
|
||||||
|
.dicom-wrapper .dropdown-content div:hover{
|
||||||
|
background-color: #16477b90;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -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;
|
||||||
|
};
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -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;
|
||||||
|
};
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -4,11 +4,12 @@ import {
|
||||||
} from 'element-ui/src/utils/resize-event'
|
} from 'element-ui/src/utils/resize-event'
|
||||||
|
|
||||||
// 设置表格高度
|
// 设置表格高度
|
||||||
const doResize = async(el, binding, vnode) => {
|
const doResize = async (el, binding, vnode) => {
|
||||||
// 获取表格Dom对象
|
// 获取表格Dom对象
|
||||||
const { componentInstance: $table } = await vnode
|
const { componentInstance: $table } = await vnode
|
||||||
// 获取调用传递过来的数据
|
// 获取调用传递过来的数据
|
||||||
const { value } = binding
|
const { value } = binding
|
||||||
|
if (value && value.notAdaptive) return;
|
||||||
// 获取距底部距离(用于展示页码等信息)
|
// 获取距底部距离(用于展示页码等信息)
|
||||||
const bottomOffset = (value && value.bottomOffset) || 40
|
const bottomOffset = (value && value.bottomOffset) || 40
|
||||||
if (!$table) return
|
if (!$table) return
|
||||||
|
|
@ -24,7 +25,7 @@ export default {
|
||||||
// 初始化设置
|
// 初始化设置
|
||||||
bind(el, binding, vnode) {
|
bind(el, binding, vnode) {
|
||||||
// 设置resize监听方法
|
// 设置resize监听方法
|
||||||
el.resizeListener = async() => {
|
el.resizeListener = async () => {
|
||||||
await doResize(el, binding, vnode)
|
await doResize(el, binding, vnode)
|
||||||
}
|
}
|
||||||
// 绑定监听方法到addResizeListener
|
// 绑定监听方法到addResizeListener
|
||||||
|
|
|
||||||
135
src/main.js
135
src/main.js
|
|
@ -4,6 +4,7 @@ import 'normalize.css/normalize.css' // A modern alternative to CSS resets
|
||||||
|
|
||||||
import ElementUI, { MessageBox } from 'element-ui'
|
import ElementUI, { MessageBox } from 'element-ui'
|
||||||
import { getBasicDataAllSelect, getFrontInternationalizationList } from '@/api/dictionary/dictionary'
|
import { getBasicDataAllSelect, getFrontInternationalizationList } from '@/api/dictionary/dictionary'
|
||||||
|
import { sendMFAEmail } from "@/api/user.js";
|
||||||
import { resetReadingRestTime } from '@/api/trials/reading'
|
import { resetReadingRestTime } from '@/api/trials/reading'
|
||||||
// import 'element-ui/lib/theme-chalk/index.css'
|
// import 'element-ui/lib/theme-chalk/index.css'
|
||||||
import './assets/css/theme-blue/index.css' // 浅绿色主题
|
import './assets/css/theme-blue/index.css' // 浅绿色主题
|
||||||
|
|
@ -24,7 +25,6 @@ Vue.use(VueClipboard)
|
||||||
// import htmlToPdf from './utils/htmlToPdf'
|
// import htmlToPdf from './utils/htmlToPdf'
|
||||||
// Vue.use(htmlToPdf)
|
// Vue.use(htmlToPdf)
|
||||||
import permission from './utils/permission'
|
import permission from './utils/permission'
|
||||||
import { OSSclient } from './utils/oss'
|
|
||||||
Vue.use(permission)
|
Vue.use(permission)
|
||||||
|
|
||||||
import Viewer from 'v-viewer'
|
import Viewer from 'v-viewer'
|
||||||
|
|
@ -57,14 +57,18 @@ Vue.use(hasPermi)
|
||||||
// Vue.use(ElementUI, { locale, size: 'medium' })
|
// Vue.use(ElementUI, { locale, size: 'medium' })
|
||||||
import upload from '@/components/element-ui/upload'
|
import upload from '@/components/element-ui/upload'
|
||||||
Vue.use(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'
|
import adaptive from '@/directive/adaptive/index'
|
||||||
// 表格自适应指令
|
// 表格自适应指令
|
||||||
Vue.use(adaptive)
|
Vue.use(adaptive)
|
||||||
import dialogDrag from '@/directive/dialogDrag'
|
import dialogDrag from '@/directive/dialogDrag'
|
||||||
// 窗口拖拽
|
// 窗口拖拽
|
||||||
Vue.use(dialogDrag)
|
Vue.use(dialogDrag)
|
||||||
if(!String.prototype.replaceAll){
|
if (!String.prototype.replaceAll) {
|
||||||
String.prototype.replaceAll = function(str, newStr){
|
String.prototype.replaceAll = function (str, newStr) {
|
||||||
// 正则表达式
|
// 正则表达式
|
||||||
if (Object.prototype.toString.call(str).toLowerCase() === '[object regexp]') {
|
if (Object.prototype.toString.call(str).toLowerCase() === '[object regexp]') {
|
||||||
return this.replace(str, newStr)
|
return this.replace(str, newStr)
|
||||||
|
|
@ -80,6 +84,7 @@ import DictTag from '@/components/DictTag'
|
||||||
import DictData from '@/components/DictData'
|
import DictData from '@/components/DictData'
|
||||||
import { getBasicDataSelect } from '@/api/dictionary/dictionary'
|
import { getBasicDataSelect } from '@/api/dictionary/dictionary'
|
||||||
import { checkConfig } from '@/const/check/index'
|
import { checkConfig } from '@/const/check/index'
|
||||||
|
import { getTrialBodyPartList } from "@/api/trials/setting";
|
||||||
// 全局方法挂载
|
// 全局方法挂载
|
||||||
var $q = params
|
var $q = params
|
||||||
Vue.prototype.checkConfig = checkConfig
|
Vue.prototype.checkConfig = checkConfig
|
||||||
|
|
@ -96,12 +101,14 @@ Vue.prototype.selectDictLabel = selectDictLabel
|
||||||
// Vue.prototype.download = download
|
// Vue.prototype.download = download
|
||||||
Vue.prototype.handleTree = handleTree
|
Vue.prototype.handleTree = handleTree
|
||||||
Vue.prototype.$getObjectName = (url) => {
|
Vue.prototype.$getObjectName = (url) => {
|
||||||
// console.log(url)
|
// console.log(url,'url')
|
||||||
var value = url
|
// console.log(Vue.prototype.OSSclientConfig.viewEndpoint,'url')
|
||||||
var str = value.split("//"); //https://进行分割,
|
var value = url;
|
||||||
var index = str[1].indexOf("/")+1; //indexOf 获取第一个斜杠的索引,
|
let basePath = Vue.prototype.OSSclientConfig.viewEndpoint;
|
||||||
// console.log(str[1].substring(index)); //substring 截取,
|
if (Vue.prototype.OSSclientConfig.ObjectStoreUse === 'AliyunOSS') {
|
||||||
return '/' + str[1].substring(index)
|
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) => {
|
Vue.prototype.getGuid = (text) => {
|
||||||
text = md5(text)
|
text = md5(text)
|
||||||
|
|
@ -117,14 +124,14 @@ Vue.prototype.getGuid = (text) => {
|
||||||
t9 = text.substr(16, 4)
|
t9 = text.substr(16, 4)
|
||||||
t10 = text.substr(20, 12)
|
t10 = text.substr(20, 12)
|
||||||
// console.log(`${t4+t3+t2+t1}-${t6+t5}-${t8+t7}-${t9}-${t10}`)
|
// 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) => {
|
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 */
|
/* eslint-disable */
|
||||||
var reg1 = eval(process.env.VUE_APP_PASSWORD_FOR_PERMISSION) ? new RegExp(`${process.env.VUE_APP_PASSWORD_FOR_REGULAR}`) : /.*/g; //密码必须是8位以上、必须含有字母、数字、特殊符号
|
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)) {
|
if (!reg1.test(value)) {
|
||||||
callback(lang==='zh' ? new Error("密码必须包含:1)8 – 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("密码必须包含:1)8 – 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 {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
|
@ -158,7 +165,7 @@ Vue.prototype.fileToBlob = (file) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
var _vm
|
var _vm
|
||||||
async function VueInit () {
|
async function VueInit() {
|
||||||
var params
|
var params
|
||||||
var res
|
var res
|
||||||
if (~window.location.href.indexOf('/readingDicoms') || ~window.location.href.indexOf('/noneDicomReading') || ~window.location.href.indexOf('/criterionquestions') || ~window.location.href.indexOf('/petct')) {
|
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
|
zhMessages[v.Code] = v.ValueCN
|
||||||
enMessages[v.Code] = v.Value
|
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('zh', zhMessages)
|
||||||
i18n.mergeLocaleMessage('en', enMessages)
|
i18n.mergeLocaleMessage('en', enMessages)
|
||||||
Vue.use(ElementUI, {
|
Vue.use(ElementUI, {
|
||||||
|
|
@ -187,14 +212,14 @@ async function VueInit () {
|
||||||
})
|
})
|
||||||
let d = function (code) {
|
let d = function (code) {
|
||||||
var dictInfo = res.Result
|
var dictInfo = res.Result
|
||||||
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
|
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
|
||||||
try {
|
try {
|
||||||
for (var code in dictInfo) {
|
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 {
|
return {
|
||||||
id: dict.Id,
|
id: dict.Id,
|
||||||
label: lang==='zh' ? dict.ValueCN : dict.Value,
|
label: lang === 'zh' ? dict.ValueCN : dict.Value,
|
||||||
value: dict.DataTypeEnum === 3 ? eval(dict.Code) : dict.IsEnumInt ? parseInt(dict.Code): dict.Code,
|
value: dict.DataTypeEnum === 3 ? eval(dict.Code) : dict.IsEnumInt ? parseInt(dict.Code) : dict.Code,
|
||||||
raw: Object.assign({}, dict),
|
raw: Object.assign({}, dict),
|
||||||
IsBaseLineUse: false,
|
IsBaseLineUse: false,
|
||||||
IsFollowVisitUse: false
|
IsFollowVisitUse: false
|
||||||
|
|
@ -202,35 +227,36 @@ async function VueInit () {
|
||||||
}) : []
|
}) : []
|
||||||
dictInfo[code] = dictList
|
dictInfo[code] = dictList
|
||||||
}
|
}
|
||||||
} catch (e){
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
return dictInfo
|
return dictInfo
|
||||||
}()
|
}()
|
||||||
Vue.prototype.$d = d
|
Vue.prototype.$d = d
|
||||||
Vue.prototype.$fd = function (code, v, type) {
|
Vue.prototype.$fd = function (code, v, type, arr, key = 'label') {
|
||||||
try {
|
try {
|
||||||
|
let data = arr || d;
|
||||||
|
type = type || 'value';
|
||||||
// code === 'YesOrNo' ? console.log(d) : ''
|
// code === 'YesOrNo' ? console.log(d) : ''
|
||||||
type = type || 'value'
|
return data[code].find(i => {
|
||||||
return d[code].find(i => {
|
|
||||||
return i[type] === v
|
return i[type] === v
|
||||||
}) ? d[code].find(i => {
|
}) ? data[code].find(i => {
|
||||||
return i[type] === v
|
return i[type] === v
|
||||||
}).label : ''
|
})[key] : ''
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Vue.prototype.$updateDictionary = function() {
|
Vue.prototype.$updateDictionary = function () {
|
||||||
Vue.prototype.$d = function (code) {
|
Vue.prototype.$d = function (code) {
|
||||||
var dictInfo = res.Result
|
var dictInfo = res.Result
|
||||||
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
|
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
|
||||||
try {
|
try {
|
||||||
for (var code in dictInfo) {
|
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 {
|
return {
|
||||||
id: dict.raw.Id,
|
id: dict.raw.Id,
|
||||||
label: lang==='zh' ? dict.raw.ValueCN : dict.raw.Value,
|
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,
|
value: dict.raw.DataTypeEnum === 3 ? eval(dict.raw.Code) : dict.raw.IsEnumInt ? parseInt(dict.raw.Code) : dict.raw.Code,
|
||||||
raw: Object.assign({}, dict.raw),
|
raw: Object.assign({}, dict.raw),
|
||||||
IsBaseLineUse: false,
|
IsBaseLineUse: false,
|
||||||
IsFollowVisitUse: false
|
IsFollowVisitUse: false
|
||||||
|
|
@ -238,7 +264,7 @@ async function VueInit () {
|
||||||
}) : []
|
}) : []
|
||||||
_vm.$set(dictInfo, code, dictList)
|
_vm.$set(dictInfo, code, dictList)
|
||||||
}
|
}
|
||||||
} catch (e){
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
return dictInfo
|
return dictInfo
|
||||||
|
|
@ -274,14 +300,14 @@ async function VueInit () {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
|
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
|
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') {
|
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
|
return
|
||||||
}
|
}
|
||||||
if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
||||||
window.location.href = `/login`
|
window.location.href = `/login`
|
||||||
zzSessionStorage.removeItem('lastWorkbench')
|
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',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -334,23 +360,25 @@ async function VueInit () {
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
window.VUE_APP_COMPANY_NAME = process.env.VUE_APP_COMPANY_NAME;
|
window.VUE_APP_COMPANY_NAME = process.env.VUE_APP_COMPANY_NAME;
|
||||||
waitOperate(eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION) ? () => {
|
waitOperate(eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION) ? () => {
|
||||||
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
|
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') {
|
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;
|
count = 0;
|
||||||
localStorage.setItem('count', '0')
|
localStorage.setItem('count', '0')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_vm.$store.dispatch('user/logout').then(res => {
|
_vm.$store.dispatch('user/logout').then(res => {
|
||||||
window.location.href = `/login`
|
// 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!', {
|
_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',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
} : () => {}, process.env.VUE_APP_LOGOUT_FOR_TIME,
|
})
|
||||||
|
|
||||||
|
} : () => { }, process.env.VUE_APP_LOGOUT_FOR_TIME,
|
||||||
eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => {
|
eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => {
|
||||||
var lang = zzSessionStorage.getItem('lang')?zzSessionStorage.getItem('lang'):'zh'
|
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') {
|
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;
|
count = 0;
|
||||||
localStorage.setItem('count', '0')
|
localStorage.setItem('count', '0')
|
||||||
if (_vm.$route.path === '/login') {
|
if (_vm.$route.path === '/login') {
|
||||||
|
|
@ -381,9 +409,12 @@ async function VueInit () {
|
||||||
}
|
}
|
||||||
var my_username = zzSessionStorage.getItem('my_username')
|
var my_username = zzSessionStorage.getItem('my_username')
|
||||||
var my_password = zzSessionStorage.getItem('my_password')
|
var my_password = zzSessionStorage.getItem('my_password')
|
||||||
|
let my_userid = zzSessionStorage.getItem('userId')
|
||||||
|
let my_EMail = zzSessionStorage.getItem('my_EMail')
|
||||||
if (md5(_vm.unlock.my_password) === my_password && my_username === _vm.unlock.my_username) {
|
if (md5(_vm.unlock.my_password) === my_password && my_username === _vm.unlock.my_username) {
|
||||||
resetReadingRestTime().then(() => {
|
resetReadingRestTime().then(() => {
|
||||||
})
|
})
|
||||||
|
const closeLock = (_vm) => {
|
||||||
_vm.$message.success(lang === 'zh' ? '解锁成功,请继续操作' : 'Unlocked successfully. Please continue operation.')
|
_vm.$message.success(lang === 'zh' ? '解锁成功,请继续操作' : 'Unlocked successfully. Please continue operation.')
|
||||||
_vm.unlock = {
|
_vm.unlock = {
|
||||||
my_username: null,
|
my_username: null,
|
||||||
|
|
@ -399,20 +430,38 @@ async function VueInit () {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
done()
|
done()
|
||||||
}, 500)
|
}, 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 {
|
} else {
|
||||||
// console.log(111)
|
// console.log(111)
|
||||||
_vm.$message.error(lang === 'zh' ? '请输入正确用户名密码' : 'Please enter the correct password.')
|
_vm.$message.error(lang === 'zh' ? '请输入正确用户名密码' : 'Please enter the correct password.')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
message: h('div', {} , [
|
message: h('div', {}, [
|
||||||
h('el-form', {
|
h('el-form', {
|
||||||
props: { labelWidth: "80px" }
|
props: { labelWidth: "80px" }
|
||||||
}, [
|
}, [
|
||||||
h('el-form-item', {
|
h('el-form-item', {
|
||||||
props: {label: lang === 'zh' ? '用户名' : 'Username'},
|
props: { label: lang === 'zh' ? '用户名' : 'Username' },
|
||||||
}, [
|
}, [
|
||||||
h('input',{
|
h('input', {
|
||||||
props: {
|
props: {
|
||||||
value: _vm.unlock.my_username
|
value: _vm.unlock.my_username
|
||||||
},
|
},
|
||||||
|
|
@ -432,7 +481,7 @@ async function VueInit () {
|
||||||
})
|
})
|
||||||
]),
|
]),
|
||||||
h('el-form-item', {
|
h('el-form-item', {
|
||||||
props: {label: lang === 'zh' ? '密码' : 'Password'},
|
props: { label: lang === 'zh' ? '密码' : 'Password' },
|
||||||
}, [
|
}, [
|
||||||
h('input', {
|
h('input', {
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -457,7 +506,7 @@ async function VueInit () {
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
})
|
})
|
||||||
} : () => {}, process.env.VUE_APP_LOCK_FOR_TIME)
|
} : () => { }, process.env.VUE_APP_LOCK_FOR_TIME)
|
||||||
}
|
}
|
||||||
VueInit()
|
VueInit()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ router.beforeEach(async(to, from, next) => {
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
} else {
|
} else {
|
||||||
OSSclient()
|
OSSclient()
|
||||||
const hasGetUserInfo = store.getters.name
|
const hasGetUserInfo = store.getters.userId
|
||||||
if (hasGetUserInfo) {
|
if (hasGetUserInfo) {
|
||||||
next()
|
next()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ export const constantRoutes = [
|
||||||
children: [{
|
children: [{
|
||||||
path: 'baiscInfo',
|
path: 'baiscInfo',
|
||||||
name: 'BaiscInfo',
|
name: 'BaiscInfo',
|
||||||
component: () => import('@/views/user/myInfo')
|
component: () => import('@/views/user/editInfo')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,7 @@ const actions = {
|
||||||
},
|
},
|
||||||
getMasterSeries({ state }, obj) {
|
getMasterSeries({ state }, obj) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
|
console.log('getMasterSeries')
|
||||||
var seriesInfo = {}
|
var seriesInfo = {}
|
||||||
var i = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
var i = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
||||||
getReadingVisitStudyList(obj.trialId, obj.visitId, obj.visitTaskId).then(res => {
|
getReadingVisitStudyList(obj.trialId, obj.visitId, obj.visitTaskId).then(res => {
|
||||||
|
|
@ -209,14 +210,28 @@ const actions = {
|
||||||
var seriesList = []
|
var seriesList = []
|
||||||
study.SeriesList.forEach((series, index) => {
|
study.SeriesList.forEach((series, index) => {
|
||||||
const imageIds = []
|
const imageIds = []
|
||||||
|
const instanceList = []
|
||||||
series.InstancePathList.forEach((path) => {
|
// series.InstancePathList.forEach((path) => {
|
||||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${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({
|
seriesList.push({
|
||||||
isDicom: study.IsDicom,
|
isDicom: study.IsDicom,
|
||||||
imageIds: imageIds,
|
imageIds: imageIds,
|
||||||
instanceList: series.InstanceList,
|
instanceInfoList: series.InstanceInfoList,
|
||||||
|
instanceList: instanceList,
|
||||||
seriesId: series.Id,
|
seriesId: series.Id,
|
||||||
imageIdIndex: 0,
|
imageIdIndex: 0,
|
||||||
seriesUid: series.SeriesInstanceUid,
|
seriesUid: series.SeriesInstanceUid,
|
||||||
|
|
@ -720,14 +735,13 @@ const actions = {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getStudyInfo({ state }, obj) {
|
getStudyInfo({ state }, obj) {
|
||||||
|
console.log('getStudyInfo')
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
||||||
if (state.visitTaskList[index].studyListInit) {
|
if (state.visitTaskList[index].studyListInit) {
|
||||||
resolve()
|
resolve()
|
||||||
} else {
|
} else {
|
||||||
var studyList = []
|
var studyList = []
|
||||||
// getVisitStudyList
|
|
||||||
// getReadingVisitStudyList
|
|
||||||
getReadingVisitStudyList(obj.trialId, obj.subjectVisitId, obj.visitTaskId).then(res => {
|
getReadingVisitStudyList(obj.trialId, obj.subjectVisitId, obj.visitTaskId).then(res => {
|
||||||
res.Result.forEach((study, studyIndex) => {
|
res.Result.forEach((study, studyIndex) => {
|
||||||
const data = {}
|
const data = {}
|
||||||
|
|
@ -743,19 +757,34 @@ const actions = {
|
||||||
var seriesList = []
|
var seriesList = []
|
||||||
study.SeriesList.forEach((series, seriesIndex) => {
|
study.SeriesList.forEach((series, seriesIndex) => {
|
||||||
const imageIds = []
|
const imageIds = []
|
||||||
try {
|
const instanceList = []
|
||||||
// if (~window.location.href.indexOf('3c210000-3e2c-0016-4247-08dabf28e96b')) {
|
// try {
|
||||||
series.InstancePathList.forEach((path) => {
|
// 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}`)
|
||||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${path}`)
|
// })
|
||||||
})
|
// } catch (e) {
|
||||||
} catch (e) {
|
// console.log(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({
|
seriesList.push({
|
||||||
isDicom: study.IsDicom,
|
isDicom: study.IsDicom,
|
||||||
imageIds: imageIds,
|
imageIds: imageIds,
|
||||||
instanceList: series.InstanceList,
|
instanceInfoList: series.InstanceInfoList,
|
||||||
|
instanceList: instanceList,
|
||||||
seriesId: series.Id,
|
seriesId: series.Id,
|
||||||
imageIdIndex: 0,
|
imageIdIndex: 0,
|
||||||
seriesUid: series.SeriesInstanceUid,
|
seriesUid: series.SeriesInstanceUid,
|
||||||
|
|
@ -782,7 +811,8 @@ const actions = {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
isBeMark: series.IsBeMark,
|
isBeMark: series.IsBeMark,
|
||||||
ww: series.WindowWidth,
|
ww: series.WindowWidth,
|
||||||
wc: series.WindowCenter
|
wc: series.WindowCenter,
|
||||||
|
isExistMutiFrames: series.IsExistMutiFrames
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
data.SeriesList = seriesList
|
data.SeriesList = seriesList
|
||||||
|
|
@ -861,7 +891,12 @@ const actions = {
|
||||||
},
|
},
|
||||||
setLastCanvasTaskId({ state }, taskId) {
|
setLastCanvasTaskId({ state }, taskId) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
|
var isReadingTaskViewInOrder = localStorage.getItem('isReadingTaskViewInOrder')
|
||||||
|
if (parseInt(isReadingTaskViewInOrder) === 2) {
|
||||||
|
if (!state.lastCanvasTaskId) state.lastCanvasTaskId = taskId
|
||||||
|
} else {
|
||||||
state.lastCanvasTaskId = taskId
|
state.lastCanvasTaskId = taskId
|
||||||
|
}
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { getToken, setToken, removeToken, setName, removeName } from '@/utils/auth'
|
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 { resetRouter } from '@/router'
|
||||||
import md5 from 'js-md5'
|
import md5 from 'js-md5'
|
||||||
|
|
@ -83,20 +83,27 @@ const actions = {
|
||||||
},
|
},
|
||||||
// user login
|
// user login
|
||||||
login({ commit }, userInfo) {
|
login({ commit }, userInfo) {
|
||||||
const { username, password } = userInfo
|
const { username, password, UserId } = userInfo
|
||||||
return new Promise((resolve, reject) => {
|
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) {
|
if (response.IsSuccess) {
|
||||||
zzSessionStorage.removeItem('lastWorkbench')
|
zzSessionStorage.removeItem('lastWorkbench')
|
||||||
zzSessionStorage.setItem('my_username', username.trim())
|
zzSessionStorage.setItem('my_username', username.trim())
|
||||||
zzSessionStorage.setItem('my_password', md5(password))
|
zzSessionStorage.setItem('my_password', md5(password))
|
||||||
|
zzSessionStorage.setItem('my_EMail', response.Result.BasicInfo.EMail)
|
||||||
const data = response.Result
|
const data = response.Result
|
||||||
if (data.BasicInfo.IsFirstAdd) {
|
if (data.BasicInfo.IsFirstAdd || data.BasicInfo.LoginState === 1) {
|
||||||
try {
|
try {
|
||||||
zzSessionStorage.setItem('userId', data.BasicInfo.Id)
|
zzSessionStorage.setItem('userId', data.BasicInfo.Id)
|
||||||
commit('SET_TOKEN', data.JWTStr)
|
commit('SET_TOKEN', data.JWTStr)
|
||||||
setToken(data.JWTStr)
|
setToken(data.JWTStr)
|
||||||
resolve(false)
|
resolve(response.Result)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
|
@ -107,6 +114,7 @@ const actions = {
|
||||||
zzSessionStorage.setItem('userName', data.BasicInfo.UserName)
|
zzSessionStorage.setItem('userName', data.BasicInfo.UserName)
|
||||||
commit('SET_TOKEN', data.JWTStr)
|
commit('SET_TOKEN', data.JWTStr)
|
||||||
commit('SET_NAME', data.BasicInfo.RealName)
|
commit('SET_NAME', data.BasicInfo.RealName)
|
||||||
|
zzSessionStorage.setItem('realName', data.BasicInfo.RealName)
|
||||||
zzSessionStorage.setItem('isTestUser', data.BasicInfo.IsTestUser)
|
zzSessionStorage.setItem('isTestUser', data.BasicInfo.IsTestUser)
|
||||||
commit('SET_ISTESTUSER', data.BasicInfo.IsTestUser)
|
commit('SET_ISTESTUSER', data.BasicInfo.IsTestUser)
|
||||||
commit('SET_USERNAME', data.BasicInfo.UserName)
|
commit('SET_USERNAME', data.BasicInfo.UserName)
|
||||||
|
|
@ -161,13 +169,13 @@ const actions = {
|
||||||
commit('SET_PERMISSIONS', JSON.parse(zzSessionStorage.getItem('permissions')))
|
commit('SET_PERMISSIONS', JSON.parse(zzSessionStorage.getItem('permissions')))
|
||||||
commit('SET_ISTESTUSER', zzSessionStorage.getItem('isTestUser'))
|
commit('SET_ISTESTUSER', zzSessionStorage.getItem('isTestUser'))
|
||||||
const user = JSON.parse(userString)
|
const user = JSON.parse(userString)
|
||||||
commit('SET_NAME', user.realName)
|
commit('SET_NAME', zzSessionStorage.getItem('realName'))
|
||||||
commit('SET_USERID', user.id)
|
commit('SET_USERID', user.id)
|
||||||
commit('SET_USERNAME', zzSessionStorage.getItem('userName'))
|
commit('SET_USERNAME', zzSessionStorage.getItem('userName'))
|
||||||
commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignSystemDocCount')))
|
commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignSystemDocCount')))
|
||||||
commit('SET_NEED_SIGN_TRIALS_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignTrialDocCount')))
|
commit('SET_NEED_SIGN_TRIALS_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignTrialDocCount')))
|
||||||
console.log( zzSessionStorage.getItem('TotalNeedSignSystemDocCount'))
|
console.log(zzSessionStorage.getItem('TotalNeedSignSystemDocCount'))
|
||||||
console.log( zzSessionStorage.getItem('TotalNeedSignTrialDocCount'))
|
console.log(zzSessionStorage.getItem('TotalNeedSignTrialDocCount'))
|
||||||
zzSessionStorage.setItem('userName', user.name)
|
zzSessionStorage.setItem('userName', user.name)
|
||||||
zzSessionStorage.setItem('userId', user.id)
|
zzSessionStorage.setItem('userId', user.id)
|
||||||
zzSessionStorage.setItem('userTypeShortName', user.userTypeShortName)
|
zzSessionStorage.setItem('userTypeShortName', user.userTypeShortName)
|
||||||
|
|
@ -179,14 +187,16 @@ const actions = {
|
||||||
},
|
},
|
||||||
// user logout
|
// user logout
|
||||||
async logout({ commit, state }) {
|
async logout({ commit, state }) {
|
||||||
try{
|
try {
|
||||||
await loginOut()
|
|
||||||
removeToken() // must remove token first
|
removeToken() // must remove token first
|
||||||
|
await loginOut({
|
||||||
|
Userd: zzSessionStorage.getItem('userId')
|
||||||
|
})
|
||||||
resetRouter()
|
resetRouter()
|
||||||
removeName()
|
removeName()
|
||||||
zzSessionStorage.clear()
|
zzSessionStorage.clear()
|
||||||
commit('RESET_STATE')
|
commit('RESET_STATE')
|
||||||
}catch(e){
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import dicomParser from "dicom-parser";
|
import dicomParser from "dicom-parser";
|
||||||
import dcmjs from './dcmjs'
|
import dcmjs from './dcmjs'
|
||||||
import {encoder} from "./encoder";
|
import { encoder } from "./encoder";
|
||||||
|
|
||||||
export const anonymization = function (file, config) {
|
export const anonymization = function (file, config) {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
|
|
@ -55,10 +55,15 @@ export const anonymization = function (file, config) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// console.log(dataset)
|
// console.log(dataset)
|
||||||
|
try {
|
||||||
let newDicomFile = dataset.write()
|
let newDicomFile = dataset.write()
|
||||||
const bufferArray = new Uint8Array(newDicomFile)
|
const bufferArray = new Uint8Array(newDicomFile)
|
||||||
const blob = new Blob([bufferArray], { type: 'application/octet-stream' })
|
const blob = new Blob([bufferArray], { type: 'application/octet-stream' })
|
||||||
resolve({blob, pixelDataElement})
|
resolve({ blob, pixelDataElement })
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
resolve(false);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
reader.readAsArrayBuffer(file);
|
reader.readAsArrayBuffer(file);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { encoder } from './encoder'
|
|
||||||
import { anonymization } from './anonymization'
|
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 => {
|
return new Promise(async resolve => {
|
||||||
try {
|
try {
|
||||||
// let blob = await encoder(file, config)
|
// let blob = await encoder(file, config)
|
||||||
// let blob = await fileToBlob(file)
|
let blob = await fileToBlob(file)
|
||||||
let blob = await anonymization(file, config)
|
if (config) {
|
||||||
|
blob = await anonymization(file, config)
|
||||||
|
}
|
||||||
let res = await Vue.prototype.OSSclient.put(name, blob.blob)
|
let res = await Vue.prototype.OSSclient.put(name, blob.blob)
|
||||||
resolve({
|
resolve({
|
||||||
...res,
|
...res,
|
||||||
|
|
@ -35,7 +36,7 @@ function fileToBlob(file) {
|
||||||
} else {
|
} else {
|
||||||
blob = e.target.result
|
blob = e.target.result
|
||||||
}
|
}
|
||||||
resolve(blob)
|
resolve({ blob })
|
||||||
})
|
})
|
||||||
// FileReader 以 ArrayBuffer 格式 读取 File 对象中数据
|
// FileReader 以 ArrayBuffer 格式 读取 File 对象中数据
|
||||||
reader.readAsArrayBuffer(file)
|
reader.readAsArrayBuffer(file)
|
||||||
|
|
|
||||||
|
|
@ -8359,6 +8359,7 @@
|
||||||
allowInvalidVRLength: false
|
allowInvalidVRLength: false
|
||||||
};
|
};
|
||||||
var allowInvalidVRLength = writeOptions.allowInvalidVRLength;
|
var allowInvalidVRLength = writeOptions.allowInvalidVRLength;
|
||||||
|
allowInvalidVRLength = true
|
||||||
var valid = true,
|
var valid = true,
|
||||||
valarr = Array.isArray(value) ? value : [value],
|
valarr = Array.isArray(value) ? value : [value],
|
||||||
total = 0;
|
total = 0;
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ function blobToBuffer(blob, fileName) {
|
||||||
async function ossGenerateSTS() {
|
async function ossGenerateSTS() {
|
||||||
let res = await GetObjectStoreToken()
|
let res = await GetObjectStoreToken()
|
||||||
Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] }
|
Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] }
|
||||||
|
Vue.prototype.OSSclientConfig.ObjectStoreUse = res.Result.ObjectStoreUse;
|
||||||
Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint
|
Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint
|
||||||
switch (res.Result.ObjectStoreUse) {
|
switch (res.Result.ObjectStoreUse) {
|
||||||
case 'AliyunOSS':
|
case 'AliyunOSS':
|
||||||
|
|
@ -40,7 +41,7 @@ async function ossGenerateSTS() {
|
||||||
if (res && res.url) {
|
if (res && res.url) {
|
||||||
resolve({
|
resolve({
|
||||||
name: objectName,
|
name: objectName,
|
||||||
url: Vue.prototype.OSSclientConfig.viewEndpoint + objectName
|
url: res.url
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
reject()
|
reject()
|
||||||
|
|
@ -70,14 +71,14 @@ async function ossGenerateSTS() {
|
||||||
reader.onload = (ex) => {
|
reader.onload = (ex) => {
|
||||||
const bufferStream = new stream.PassThrough()
|
const bufferStream = new stream.PassThrough()
|
||||||
bufferStream.end(Buffer.from(ex.target.result))
|
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) {
|
if (err) {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
reject()
|
reject()
|
||||||
} else {
|
} else {
|
||||||
resolve({
|
resolve({
|
||||||
name: objectName,
|
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) => {
|
reader.onload = (ex) => {
|
||||||
const bufferStream = new stream.PassThrough()
|
const bufferStream = new stream.PassThrough()
|
||||||
bufferStream.end(Buffer.from(ex.target.result))
|
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) {
|
if (err) {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
reject()
|
reject()
|
||||||
} else {
|
} else {
|
||||||
|
console.log(objectName);
|
||||||
resolve({
|
resolve({
|
||||||
name: objectName,
|
name: objectName,
|
||||||
url: 'http://www.abc.com' + objectName
|
url: Vue.prototype.OSSclientConfig.viewEndpoint + decodeUtf8(objectName)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -129,7 +131,15 @@ async function ossGenerateSTS() {
|
||||||
}
|
}
|
||||||
return
|
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
|
export const OSSclient = ossGenerateSTS
|
||||||
|
|
|
||||||
|
|
@ -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图像,用两个枚举值MONOCHROME1,MONOCHROME2 用来判断图像是否是彩色的;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();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
@ -20,7 +20,7 @@ service.interceptors.request.use(
|
||||||
path = router && router.app && router.app._route && router.app._route.path
|
path = router && router.app && router.app._route && router.app._route.path
|
||||||
config.headers['Content-Type'] = 'application/json;charset=UTF-8'
|
config.headers['Content-Type'] = 'application/json;charset=UTF-8'
|
||||||
var language = zzSessionStorage.getItem('lang')
|
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()
|
config.headers['TimeZoneId'] = moment.tz.guess()
|
||||||
if (store.getters.token) {
|
if (store.getters.token) {
|
||||||
config.headers.Authorization = `Bearer ${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')) {
|
if (store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
||||||
window.location.href = `/login`
|
window.location.href = `/login`
|
||||||
zzSessionStorage.removeItem('lastWorkbench')
|
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',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -49,13 +49,13 @@ service.interceptors.request.use(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
var isConfirm = true
|
let timer = null;
|
||||||
|
let time = 1000;
|
||||||
|
|
||||||
service.interceptors.response.use(
|
service.interceptors.response.use(
|
||||||
response => {
|
response => {
|
||||||
const res = response.data
|
const res = response.data
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
isConfirm = true
|
|
||||||
return Promise.resolve(res)
|
return Promise.resolve(res)
|
||||||
} else if (res.IsSuccess === false) {
|
} else if (res.IsSuccess === false) {
|
||||||
if (res.Code !== 5) {
|
if (res.Code !== 5) {
|
||||||
|
|
@ -63,7 +63,7 @@ service.interceptors.response.use(
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
showCancelButton: false,
|
showCancelButton: false,
|
||||||
callback: action => {
|
callback: action => {
|
||||||
if(res.Code === 6) {
|
if (res.Code === 6) {
|
||||||
window.close()
|
window.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -87,29 +87,29 @@ service.interceptors.response.use(
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 400: message = store.state.lang.language === 'en'? 'Request error' : '请求错误'; 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 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 403: message = error.response.data.ErrorMessage; break
|
||||||
case 404: message = store.state.lang.language === 'en'? 'Request address error' : `请求地址出错`; 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 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 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 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 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 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 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 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 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 505: message = store.state.lang.language === 'en' ? 'HTTP version is not supported' : 'HTTP版本不受支持'; break
|
||||||
default: break
|
default: break
|
||||||
}
|
}
|
||||||
if (error.response.status === 401) {
|
if (error.response.status === 401) {
|
||||||
if (store.getters.token) {
|
if (store.getters.token) {
|
||||||
if(message !== ''){
|
if (message !== '') {
|
||||||
Message({
|
setTimer({
|
||||||
message: message,
|
message: message,
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
showClose: true
|
showClose: true
|
||||||
})
|
}, 'message')
|
||||||
}
|
}
|
||||||
store.dispatch('user/logout').then(() => {
|
store.dispatch('user/logout').then(() => {
|
||||||
router.push(`/login`)
|
router.push(`/login`)
|
||||||
|
|
@ -118,34 +118,52 @@ service.interceptors.response.use(
|
||||||
this.$updateDictionary()
|
this.$updateDictionary()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
Message({
|
setTimer({
|
||||||
message: store.state.lang.language === 'en'? 'You are not authorized to access the interface' : '您无权访问接口',
|
message: store.state.lang.language === 'en' ? 'You are not authorized to access the interface' : '您无权访问接口',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
showClose: true
|
showClose: true
|
||||||
})
|
}, 'message')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(message !== '' && isConfirm){
|
if (message !== '') {
|
||||||
MessageBox.confirm(message, store.state.lang.language === 'en'? 'Warning' : '警告', {
|
setTimer([message, store.state.lang.language === 'en' ? 'Warning' : '警告', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
showCancelButton: false,
|
showCancelButton: false,
|
||||||
callback: action => {}
|
callback: action => { }
|
||||||
})
|
}], 'confirm')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!window.navigator.onLine && isConfirm) {
|
if (!window.navigator.onLine) {
|
||||||
MessageBox.confirm(store.state.lang.language === 'en'? 'Please check your network,and try again later!' : '请检查网络,稍后重试!', store.state.lang.language === 'en'? 'Warning' : '警告', {
|
setTimer(
|
||||||
|
[store.state.lang.language === 'en' ? 'Please check your network,and try again later!' : '请检查网络,稍后重试!', store.state.lang.language === 'en' ? 'Warning' : '警告', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
showCancelButton: false,
|
showCancelButton: false,
|
||||||
callback: action => {}
|
callback: action => { }
|
||||||
})
|
}], "confirm"
|
||||||
isConfirm = false
|
)
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(message || 'Error'))
|
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)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
};
|
||||||
|
|
@ -43,28 +43,63 @@
|
||||||
fit="fill"
|
fit="fill"
|
||||||
>
|
>
|
||||||
<div class="viewernavitextwrapper">
|
<div class="viewernavitextwrapper">
|
||||||
<div v-if="item.keySeries" style="padding: 1px;color:red">
|
<div style="padding: 1px 5px 1px 1px;display: flex;justify-content: space-between;">
|
||||||
|
<div v-if="item.keySeries" style="color:red">
|
||||||
Key Images
|
Key Images
|
||||||
</div>
|
</div>
|
||||||
<div v-else style="padding: 1px;">
|
<div v-else>
|
||||||
#{{ item.seriesNumber }}
|
#{{ item.seriesNumber }}
|
||||||
</div>
|
</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;">
|
<div v-show="item.instanceCount" style="padding: 1px;">
|
||||||
{{ item.modality }}: {{ item.instanceCount }} image
|
{{ item.modality }}: {{ item.instanceCount }} image
|
||||||
</div>
|
</div>
|
||||||
<div v-show="!item.keySeries && item.sliceThickness" style="padding: 1px;">
|
<div v-show="!item.keySeries && item.sliceThickness" style="padding: 1px;">
|
||||||
T: {{ item.sliceThickness }}
|
T: {{ parseFloat(item.sliceThickness).toFixed(2) }}
|
||||||
</div>
|
</div>
|
||||||
<div v-show="!item.keySeries &&item.description" style="width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;padding: 1x;">
|
<div v-show="!item.keySeries &&item.description" style="width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;padding: 1x;">
|
||||||
{{ item.description }}
|
{{ item.description }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!item.keySeries" style="padding: 1px;">
|
<div v-if="!item.keySeries" style="padding: 1px;">
|
||||||
{{ item.prefetchInstanceCount }}/{{ item.instanceCount }}
|
{{ item.imageloadedArr.length }}/{{ item.instanceCount }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</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>
|
<div>
|
||||||
<span style="font-size: 12px;margin-right: 5px">{{ $t('trials:audit:table:isReading') }}</span>
|
<span style="font-size: 12px;margin-right: 5px">{{ $t('trials:audit:table:isReading') }}</span>
|
||||||
|
|
@ -83,8 +118,8 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="item.prefetchInstanceCount>0 && item.prefetchInstanceCount<item.instanceCount">
|
<div v-if="item.prefetchInstanceCount>0 && item.prefetchInstanceCount<item.instanceCount * 100">
|
||||||
<el-progress :percentage="parseInt(((item.prefetchInstanceCount/item.instanceCount)*100).toFixed(2))" />
|
<el-progress :percentage="parseInt((item.prefetchInstanceCount/item.instanceCount).toFixed(2))" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -156,10 +191,12 @@ export default {
|
||||||
showDelete: false,
|
showDelete: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
imageList: [],
|
imageList: [],
|
||||||
showSeriesList: []
|
showSeriesList: [],
|
||||||
|
currentLoadIns: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created: function() {
|
created: function() {
|
||||||
|
requestPoolManager.resetRequestPool()
|
||||||
this.type = this.$router.currentRoute.query.type ? this.$router.currentRoute.query.type : ''
|
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
|
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') {
|
} else if (this.type === 'Share') {
|
||||||
this.loadStudy()
|
this.loadStudy()
|
||||||
}
|
}
|
||||||
|
cornerstone.events.addEventListener('cornerstoneimageloadprogress', this.cornerstoneimageloadprogress)
|
||||||
|
window.addEventListener('beforeunload', e => {
|
||||||
|
cornerstone.imageCache.purgeCache()
|
||||||
|
requestPoolManager.resetRequestPool()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
requestPoolManager.stopTaskTimer()
|
requestPoolManager.stopTaskTimer()
|
||||||
|
window.removeEventListener('beforeunload', e => {
|
||||||
|
cornerstone.imageCache.purgeCache()
|
||||||
|
requestPoolManager.resetRequestPool()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadStudy() {
|
loadStudy() {
|
||||||
|
|
@ -204,16 +250,16 @@ export default {
|
||||||
if (data.IsSuccess) {
|
if (data.IsSuccess) {
|
||||||
const { Result } = data
|
const { Result } = data
|
||||||
var seriesList = []
|
var seriesList = []
|
||||||
Result.forEach(function(item) {
|
Result.forEach((item, index) => {
|
||||||
const imageIds = []
|
const imageIds = []
|
||||||
// item.InstanceList.forEach(function(id) {
|
item.InstanceInfoList.forEach(i => {
|
||||||
// imageIds.push(`wadouri:/api/instance/content/${id}`)
|
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
|
||||||
// })
|
for (let j = 0; j < i.NumberOfFrames; j++) {
|
||||||
// item.InstanceList.forEach((id) => {
|
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&seriesIndex=${index}`)
|
||||||
// imageIds.push(`wadouri:http://123.56.94.154:7000/instance/content/${id}`)
|
}
|
||||||
// })
|
} else {
|
||||||
item.InstancePathList.forEach((path) => {
|
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&seriesIndex=${index}`)
|
||||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${path}`)
|
}
|
||||||
})
|
})
|
||||||
var subjectVisitId = scope.$router.currentRoute.query.subjectVisitId
|
var subjectVisitId = scope.$router.currentRoute.query.subjectVisitId
|
||||||
var studyId = scope.$router.currentRoute.query.studyId
|
var studyId = scope.$router.currentRoute.query.studyId
|
||||||
|
|
@ -223,6 +269,7 @@ export default {
|
||||||
subjectVisitId,
|
subjectVisitId,
|
||||||
studyId,
|
studyId,
|
||||||
imageIds: imageIds,
|
imageIds: imageIds,
|
||||||
|
instanceInfoList: item.InstanceInfoList,
|
||||||
seriesId: item.Id,
|
seriesId: item.Id,
|
||||||
seriesUid: item.SeriesInstanceUid,
|
seriesUid: item.SeriesInstanceUid,
|
||||||
seriesNumber: item.SeriesNumber,
|
seriesNumber: item.SeriesNumber,
|
||||||
|
|
@ -238,7 +285,8 @@ export default {
|
||||||
keySeries: item.KeySeries,
|
keySeries: item.KeySeries,
|
||||||
tpCode: scope.tpCode,
|
tpCode: scope.tpCode,
|
||||||
loadStatus: false,
|
loadStatus: false,
|
||||||
imageloadedArr: []
|
imageloadedArr: [],
|
||||||
|
isExistMutiFrames: item.IsExistMutiFrames
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
scope.seriesList = seriesList
|
scope.seriesList = seriesList
|
||||||
|
|
@ -264,26 +312,30 @@ export default {
|
||||||
getInstanceList(seriesId).then(res => {
|
getInstanceList(seriesId).then(res => {
|
||||||
if (!res.Result || (res.Result && res.Result.length === 0)) return
|
if (!res.Result || (res.Result && res.Result.length === 0)) return
|
||||||
var seriesInstanceUid = res.Result[0].SeriesInstanceUid
|
var seriesInstanceUid = res.Result[0].SeriesInstanceUid
|
||||||
// var sliceLocation = res.Result[0].SliceLocation
|
|
||||||
var sliceThickness = res.Result[0].SliceThickness
|
var sliceThickness = res.Result[0].SliceThickness
|
||||||
var isReading = res.Result[0].IsReading
|
var isReading = res.Result[0].IsReading
|
||||||
var isDeleted = res.Result[0].IsDeleted
|
var isDeleted = res.Result[0].IsDeleted
|
||||||
var seriesList = []
|
var seriesList = []
|
||||||
var imageIds = []
|
var imageIds = []
|
||||||
|
let isExistMutiFrames = false
|
||||||
|
const instanceInfoList = []
|
||||||
res.Result.forEach(instance => {
|
res.Result.forEach(instance => {
|
||||||
if (instance.NumberOfFrames > 1) {
|
if (instance.NumberOfFrames > 1) {
|
||||||
for (let i = 0; i < instance.NumberOfFrames; i++) {
|
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 {
|
} 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({
|
seriesList.push({
|
||||||
trialId,
|
trialId,
|
||||||
subjectVisitId,
|
subjectVisitId,
|
||||||
studyId,
|
studyId,
|
||||||
imageIds: imageIds,
|
imageIds: imageIds,
|
||||||
|
instanceInfoList,
|
||||||
seriesId: seriesId,
|
seriesId: seriesId,
|
||||||
seriesUid: seriesInstanceUid,
|
seriesUid: seriesInstanceUid,
|
||||||
seriesNumber: seriesNumber,
|
seriesNumber: seriesNumber,
|
||||||
|
|
@ -296,7 +348,8 @@ export default {
|
||||||
instanceCount: res.Result.length,
|
instanceCount: res.Result.length,
|
||||||
prefetchInstanceCount: 0,
|
prefetchInstanceCount: 0,
|
||||||
loadStatus: false,
|
loadStatus: false,
|
||||||
imageloadedArr: []
|
imageloadedArr: [],
|
||||||
|
isExistMutiFrames: isExistMutiFrames
|
||||||
})
|
})
|
||||||
this.seriesList = seriesList
|
this.seriesList = seriesList
|
||||||
if (this.seriesList.length > 0) {
|
if (this.seriesList.length > 0) {
|
||||||
|
|
@ -320,21 +373,37 @@ export default {
|
||||||
this.$refs.dicomViewer.loadImageStack(this.seriesList[seriesIndex])
|
this.$refs.dicomViewer.loadImageStack(this.seriesList[seriesIndex])
|
||||||
if (!series.loadStatus) {
|
if (!series.loadStatus) {
|
||||||
requestPoolManager.changePriority(series.seriesId)
|
requestPoolManager.changePriority(series.seriesId)
|
||||||
// var isAddToTakPool = false
|
}
|
||||||
// if (this.showSeriesList.includes(`${seriesIndex}`)) {
|
},
|
||||||
// isAddToTakPool = true
|
showMultiFrames(series, seriesIndex, instanceInfo) {
|
||||||
// } else {
|
this.currentSeriesIndex = seriesIndex
|
||||||
// this.showSeriesList.push(`${seriesIndex}`)
|
const imageIds = []
|
||||||
// }
|
if (instanceInfo.NumberOfFrames && instanceInfo.NumberOfFrames > 1) {
|
||||||
// if (!isAddToTakPool) {
|
for (let j = 0; j < instanceInfo.NumberOfFrames; j++) {
|
||||||
// var priority = parseInt(new Date().getTime())
|
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instanceInfo.Path}?frame=${j}&instanceId=${instanceInfo.Id}&seriesIndex=${seriesIndex}`)
|
||||||
// series.isLoading = true
|
}
|
||||||
// series.imageIds.map((imageId) => {
|
} else {
|
||||||
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instanceInfo.Path}?instanceId=${instanceInfo.Id}&seriesIndex=${seriesIndex}`)
|
||||||
// })
|
}
|
||||||
// } else {
|
const seriesInfo = {
|
||||||
// requestPoolManager.changePriority(series.seriesId)
|
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() {
|
initStudy() {
|
||||||
|
|
@ -457,31 +526,44 @@ export default {
|
||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
},
|
},
|
||||||
loadAllImages() {
|
loadAllImages() {
|
||||||
|
const seriesIndex = this.seriesList.findIndex(i => i.loadStatus === false)
|
||||||
|
if (seriesIndex === -1) return
|
||||||
|
const series = this.seriesList[seriesIndex]
|
||||||
var priority = new Date().getTime()
|
var priority = new Date().getTime()
|
||||||
this.seriesList.forEach((series, index) => {
|
for (let i = 0; i < series.imageIds.length; i++) {
|
||||||
series.imageIds.forEach(imageId => {
|
const imageId = series.imageIds[i]
|
||||||
|
if (series.isExistMutiFrames) {
|
||||||
|
const params = this.getInstanceInfo(imageId)
|
||||||
|
if (params.frame && params.frame > 0) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
var p = null
|
var p = null
|
||||||
if (this.firstInstanceId === imageId) {
|
if (this.firstInstanceId === imageId) {
|
||||||
p = priority * 100
|
p = priority * 100
|
||||||
} else {
|
} else {
|
||||||
p = priority - 1
|
p = priority - 1
|
||||||
}
|
}
|
||||||
// this.load(imageId, series.seriesId, priority)
|
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, seriesIndex: seriesIndex, priority: p })
|
||||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, seriesIndex: index, priority: p })
|
}
|
||||||
})
|
|
||||||
})
|
|
||||||
if (this.imageList.length > 0) {
|
if (this.imageList.length > 0) {
|
||||||
this.loopLoad()
|
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() {
|
loopLoad() {
|
||||||
if (this.imageList.length > 0) {
|
if (this.imageList.length > 0) {
|
||||||
requestPoolManager.startTaskTimer()
|
requestPoolManager.startTaskTimer()
|
||||||
console.log('loopLoad')
|
console.log('loopLoad')
|
||||||
this.imageList.map(image => {
|
this.imageList.map(image => {
|
||||||
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority).then(res => {
|
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority)
|
||||||
this.imageLoaded(image, res.data.string('x0020000e'))
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
requestPoolManager.sortTaskPool()
|
requestPoolManager.sortTaskPool()
|
||||||
this.imageList = []
|
this.imageList = []
|
||||||
|
|
@ -564,6 +646,45 @@ export default {
|
||||||
|
|
||||||
return 0
|
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) {
|
cornerstoneImageLoaded(e) {
|
||||||
if (this.firstInstanceId === e.detail.image.imageId && !this.isStartLoad) {
|
if (this.firstInstanceId === e.detail.image.imageId && !this.isStartLoad) {
|
||||||
// 初始化图像加载完成时,自动下载
|
// 初始化图像加载完成时,自动下载
|
||||||
|
|
@ -757,6 +878,29 @@ export default {
|
||||||
color: #D0D0D0;
|
color: #D0D0D0;
|
||||||
font-size: 13px;
|
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 {
|
/* .viewerRightSidePanel {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
||||||
|
|
@ -46,13 +46,6 @@
|
||||||
@click="showSeriesImage($event,index,i,series)"
|
@click="showSeriesImage($event,index,i,series)"
|
||||||
>
|
>
|
||||||
<div class="viewernavigatorwrapper">
|
<div class="viewernavigatorwrapper">
|
||||||
<!-- <el-image
|
|
||||||
class="image-preview"
|
|
||||||
style="height:72px;width:72px;"
|
|
||||||
:src="series.previewImageUrl"
|
|
||||||
fit="fill"
|
|
||||||
/> -->
|
|
||||||
|
|
||||||
<img
|
<img
|
||||||
class="image-preview"
|
class="image-preview"
|
||||||
:src="series.previewImageUrl"
|
:src="series.previewImageUrl"
|
||||||
|
|
@ -62,8 +55,41 @@
|
||||||
fit="fill"
|
fit="fill"
|
||||||
>
|
>
|
||||||
<div class="viewernavitextwrapper">
|
<div class="viewernavitextwrapper">
|
||||||
<div style="padding: 1px;">
|
<div style="padding: 1px 5px 1px 1px;display: flex;justify-content: space-between;">
|
||||||
#{{ series.seriesNumber }}
|
<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>
|
||||||
<div v-show="series.InstanceCount" style="padding: 1px;">
|
<div v-show="series.InstanceCount" style="padding: 1px;">
|
||||||
{{ series.modality }}: {{ series.instanceCount }} image
|
{{ series.modality }}: {{ series.instanceCount }} image
|
||||||
|
|
@ -78,12 +104,12 @@
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<div style="padding: 1px;">
|
<div style="padding: 1px;">
|
||||||
{{ series.prefetchInstanceCount }}/{{ series.instanceCount }}
|
{{ series.imageloadedArr.length }}/{{ series.instanceCount }}
|
||||||
</div>
|
</div>
|
||||||
|
<div />
|
||||||
</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>
|
<div>
|
||||||
<span style="font-size: 12px;">{{ $t('trials:audit:table:isReading') }}</span>
|
<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%;">
|
<!-- <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" />
|
<el-progress v-if="series.prefetchInstanceCount>0 && series.prefetchInstanceCount<series.instanceCount" :percentage="Number(series.prefetchInstanceCount/series.instanceCount)*100" />
|
||||||
</div> -->
|
</div> -->
|
||||||
<div v-if="series.prefetchInstanceCount>0 && series.prefetchInstanceCount<series.instanceCount">
|
<div v-if="series.prefetchInstanceCount>0 && series.prefetchInstanceCount<series.instanceCount * 100">
|
||||||
<el-progress :percentage="parseInt(((series.prefetchInstanceCount/series.instanceCount)*100).toFixed(2))" />
|
<el-progress :percentage="parseInt((series.prefetchInstanceCount/series.instanceCount).toFixed(2))" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -120,7 +146,7 @@
|
||||||
<el-tab-pane :label="$t('trials:dicom-show:relatedVisit')" name="relation-study" class="pane-relation-wrapper">
|
<el-tab-pane :label="$t('trials:dicom-show:relatedVisit')" name="relation-study" class="pane-relation-wrapper">
|
||||||
<div class="viewerSidethumbinner">
|
<div class="viewerSidethumbinner">
|
||||||
<el-collapse v-model="relationActiveName" @change="handelRelationActiveChange">
|
<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">
|
<template slot="title">
|
||||||
|
|
||||||
<div class="text-desc">
|
<div class="text-desc">
|
||||||
|
|
@ -163,13 +189,46 @@
|
||||||
>
|
>
|
||||||
|
|
||||||
<div class="viewernavitextwrapper">
|
<div class="viewernavitextwrapper">
|
||||||
<div v-if="seriesItem.keySeries" style="padding: 1px;color:red">
|
<div style="padding: 1px 5px 1px 1px;display: flex;justify-content: space-between;">
|
||||||
|
<div v-if="seriesItem.keySeries" style="color:red">
|
||||||
Key Images
|
Key Images
|
||||||
</div>
|
</div>
|
||||||
<div v-else style="padding: 1px;">
|
<div v-else>#{{ seriesItem.seriesNumber }}</div>
|
||||||
#{{ seriesItem.seriesNumber }}
|
<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>
|
||||||
<div v-show=" seriesItem.instanceCount" style="padding: 1px;">
|
|
||||||
|
</div>
|
||||||
|
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" />
|
||||||
|
</el-popover>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div v-show="seriesItem.instanceCount" style="padding: 1px;">
|
||||||
{{ seriesItem.modality }}: {{ seriesItem.instanceCount }} image
|
{{ seriesItem.modality }}: {{ seriesItem.instanceCount }} image
|
||||||
</div>
|
</div>
|
||||||
<div v-show="seriesItem.sliceThickness" style="padding: 1px;">
|
<div v-show="seriesItem.sliceThickness" style="padding: 1px;">
|
||||||
|
|
@ -180,7 +239,6 @@
|
||||||
{{ seriesItem.description }}
|
{{ seriesItem.description }}
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div style="position: absolute;bottom: -10px;left: 0;width: 100%;">
|
<!-- <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" />
|
<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: [],
|
imageList: [],
|
||||||
activeNames: [],
|
activeNames: [],
|
||||||
relationActiveName: [],
|
relationActiveName: [],
|
||||||
showSeriesList: []
|
showSeriesList: [],
|
||||||
|
currentLoadIns: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
requestPoolManager.resetRequestPool()
|
||||||
|
document.documentElement.style.userSelect = 'none'
|
||||||
if (this.$router.currentRoute.query.TokenKey) {
|
if (this.$router.currentRoute.query.TokenKey) {
|
||||||
store.dispatch('user/setToken', this.$router.currentRoute.query.TokenKey)
|
store.dispatch('user/setToken', this.$router.currentRoute.query.TokenKey)
|
||||||
changeURLStatic('TokenKey', '')
|
changeURLStatic('TokenKey', '')
|
||||||
|
|
@ -253,16 +314,25 @@ export default {
|
||||||
this.showDelete = parseInt(this.$router.currentRoute.query.showDelete)
|
this.showDelete = parseInt(this.$router.currentRoute.query.showDelete)
|
||||||
// cornerstone.events.addEventListener('cornerstoneimageloaded', this.cornerstoneImageLoaded)
|
// cornerstone.events.addEventListener('cornerstoneimageloaded', this.cornerstoneImageLoaded)
|
||||||
this.getStudiesInfo()
|
this.getStudiesInfo()
|
||||||
|
cornerstone.events.addEventListener('cornerstoneimageloadprogress', this.cornerstoneimageloadprogress)
|
||||||
|
window.addEventListener('beforeunload', e => {
|
||||||
|
cornerstone.imageCache.purgeCache()
|
||||||
|
requestPoolManager.resetRequestPool()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
requestPoolManager.stopTaskTimer()
|
requestPoolManager.stopTaskTimer()
|
||||||
|
window.removeEventListener('beforeunload', e => {
|
||||||
|
cornerstone.imageCache.purgeCache()
|
||||||
|
requestPoolManager.resetRequestPool()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取某个访视下所有的检查信息
|
// 获取某个访视下所有的检查信息
|
||||||
getStudiesInfo() {
|
getStudiesInfo() {
|
||||||
this.studyList = []
|
this.studyList = []
|
||||||
getVisitStudyList(this.trialId, this.subjectVisitId, this.isReading).then(res => {
|
getVisitStudyList(this.trialId, this.subjectVisitId, this.isReading).then(res => {
|
||||||
res.Result.forEach((study) => {
|
res.Result.forEach((study,studyIndex) => {
|
||||||
const data = {}
|
const data = {}
|
||||||
data.StudyId = study.StudyId
|
data.StudyId = study.StudyId
|
||||||
data.StudyCode = study.StudyCode
|
data.StudyCode = study.StudyCode
|
||||||
|
|
@ -272,23 +342,23 @@ export default {
|
||||||
data.InstanceCount = study.InstanceCount
|
data.InstanceCount = study.InstanceCount
|
||||||
data.PreviewImageCount = 0
|
data.PreviewImageCount = 0
|
||||||
var seriesList = []
|
var seriesList = []
|
||||||
study.SeriesList.forEach((series) => {
|
study.SeriesList.forEach((series,seriesIndex) => {
|
||||||
const imageIds = []
|
const imageIds = []
|
||||||
|
series.InstanceInfoList.forEach(i => {
|
||||||
// series.InstanceList.forEach((id) => {
|
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
|
||||||
// imageIds.push(`wadouri:/api/instance/content/${id}`)
|
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}`)
|
||||||
// series.InstanceList.forEach((id) => {
|
}
|
||||||
// imageIds.push(`wadouri:http://123.56.94.154:7000/instance/content/${id}`)
|
} else {
|
||||||
// })
|
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`)
|
||||||
series.InstancePathList.forEach((path) => {
|
}
|
||||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${path}`)
|
|
||||||
})
|
})
|
||||||
seriesList.push({
|
seriesList.push({
|
||||||
trialId: this.trialId,
|
trialId: this.trialId,
|
||||||
subjectVisitId: this.subjectVisitId,
|
subjectVisitId: this.subjectVisitId,
|
||||||
studyId: study.StudyId,
|
studyId: study.StudyId,
|
||||||
imageIds: imageIds,
|
imageIds: imageIds,
|
||||||
|
instanceInfoList: series.InstanceInfoList,
|
||||||
seriesId: series.Id,
|
seriesId: series.Id,
|
||||||
seriesUid: series.SeriesInstanceUid,
|
seriesUid: series.SeriesInstanceUid,
|
||||||
seriesNumber: series.SeriesNumber,
|
seriesNumber: series.SeriesNumber,
|
||||||
|
|
@ -301,7 +371,8 @@ export default {
|
||||||
instanceCount: series.InstanceCount,
|
instanceCount: series.InstanceCount,
|
||||||
prefetchInstanceCount: 0,
|
prefetchInstanceCount: 0,
|
||||||
loadStatus: false,
|
loadStatus: false,
|
||||||
imageloadedArr: []
|
imageloadedArr: [],
|
||||||
|
isExistMutiFrames: series.IsExistMutiFrames
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
data.SeriesList = seriesList
|
data.SeriesList = seriesList
|
||||||
|
|
@ -329,21 +400,37 @@ export default {
|
||||||
this.$refs.dicomViewer.loadImageStack(this.studyList[studyIndex].SeriesList[seriesIndex])
|
this.$refs.dicomViewer.loadImageStack(this.studyList[studyIndex].SeriesList[seriesIndex])
|
||||||
if (!series.loadStatus) {
|
if (!series.loadStatus) {
|
||||||
requestPoolManager.changePriority(series.seriesId)
|
requestPoolManager.changePriority(series.seriesId)
|
||||||
// var isAddToTakPool = false
|
}
|
||||||
// if (this.showSeriesList.includes(`${studyIndex}_${seriesIndex}`)) {
|
},
|
||||||
// isAddToTakPool = true
|
showMultiFrames(studyIndex,series, seriesIndex, instanceInfo) {
|
||||||
// } else {
|
this.currentSeriesIndex = seriesIndex
|
||||||
// this.showSeriesList.push(`${studyIndex}_${seriesIndex}`)
|
const imageIds = []
|
||||||
// }
|
if (instanceInfo.NumberOfFrames && instanceInfo.NumberOfFrames > 1) {
|
||||||
// if (!isAddToTakPool) {
|
for (let j = 0; j < instanceInfo.NumberOfFrames; j++) {
|
||||||
// var priority = parseInt(new Date().getTime())
|
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instanceInfo.Path}?frame=${j}&instanceId=${instanceInfo.Id}&idx=${studyIndex}|${seriesIndex}`)
|
||||||
// series.isLoading = true
|
}
|
||||||
// series.imageIds.map((imageId, i) => {
|
} else {
|
||||||
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instanceInfo.Path}?instanceId=${instanceInfo.Id}&idx=${studyIndex}|${seriesIndex}`)
|
||||||
// })
|
}
|
||||||
// } else {
|
const seriesInfo = {
|
||||||
// requestPoolManager.changePriority(series.seriesId)
|
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) {
|
changeReadingStatus(callback, data) {
|
||||||
|
|
@ -448,19 +535,20 @@ export default {
|
||||||
if (data.Result != null && data.Result.length > 0) {
|
if (data.Result != null && data.Result.length > 0) {
|
||||||
var seriesList = []
|
var seriesList = []
|
||||||
const res = data.Result
|
const res = data.Result
|
||||||
res.forEach(function(item) {
|
res.forEach((item,seriesIndex)=> {
|
||||||
const imageIds = []
|
const imageIds = []
|
||||||
// item.InstanceList.forEach(function(id) {
|
item.InstanceInfoList.forEach(i => {
|
||||||
// imageIds.push(`wadouri:/api/instance/content/${id}`)
|
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
|
||||||
// })
|
for (let j = 0; j < i.NumberOfFrames; j++) {
|
||||||
// item.InstanceList.forEach((id) => {
|
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${index}|${seriesIndex}`)
|
||||||
// imageIds.push(`wadouri:http://123.56.94.154:7000/instance/content/${id}`)
|
}
|
||||||
// })
|
} else {
|
||||||
item.InstancePathList.forEach((path) => {
|
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${index}|${seriesIndex}`)
|
||||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${path}`)
|
}
|
||||||
})
|
})
|
||||||
seriesList.push({
|
seriesList.push({
|
||||||
imageIds: imageIds,
|
imageIds: imageIds,
|
||||||
|
instanceInfoList: item.InstanceInfoList,
|
||||||
seriesId: item.Id,
|
seriesId: item.Id,
|
||||||
seriesUid: item.SeriesInstanceUid,
|
seriesUid: item.SeriesInstanceUid,
|
||||||
seriesNumber: item.SeriesNumber,
|
seriesNumber: item.SeriesNumber,
|
||||||
|
|
@ -473,7 +561,8 @@ export default {
|
||||||
hasLabel: item.HasLabel,
|
hasLabel: item.HasLabel,
|
||||||
keySeries: item.KeySeries,
|
keySeries: item.KeySeries,
|
||||||
loadStatus: false,
|
loadStatus: false,
|
||||||
imageloadedArr: []
|
imageloadedArr: [],
|
||||||
|
isExistMutiFrames: item.IsExistMutiFrames
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
scope.relationStudyList[index].seriesCount = seriesList.length
|
scope.relationStudyList[index].seriesCount = seriesList.length
|
||||||
|
|
@ -502,54 +591,50 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadAllImages() {
|
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())
|
var priority = parseInt(new Date().getTime())
|
||||||
this.studyList.map((study, studyIndex) => {
|
for (let i = 0; i < series.imageIds.length; i++) {
|
||||||
study.SeriesList.map((series, seriesIndex) => {
|
const imageId = series.imageIds[i]
|
||||||
series.imageIds.map(imageId => {
|
if (series.isExistMutiFrames) {
|
||||||
|
const params = this.getInstanceInfo(imageId)
|
||||||
|
if (params.frame && params.frame > 0) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
var p = null
|
var p = null
|
||||||
if (this.firstInstanceId === imageId) {
|
if (this.firstInstanceId === imageId) {
|
||||||
p = priority * 100
|
p = priority * 100
|
||||||
} else {
|
} else {
|
||||||
p = priority - 1
|
p = priority - 1
|
||||||
}
|
}
|
||||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex, seriesIndex, priority: p })
|
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, seriesIndex: 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 })
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
})
|
|
||||||
})
|
|
||||||
if (this.imageList.length > 0) {
|
if (this.imageList.length > 0) {
|
||||||
this.loopLoad()
|
this.loopLoad()
|
||||||
}
|
}
|
||||||
// requestPoolManager.setPendingList(imageIds)
|
// 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() {
|
loopLoad() {
|
||||||
if (this.imageList.length > 0) {
|
if (this.imageList.length > 0) {
|
||||||
requestPoolManager.startTaskTimer()
|
requestPoolManager.startTaskTimer()
|
||||||
this.imageList.map(image => {
|
this.imageList.map(image => {
|
||||||
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority).then(res => {
|
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority)
|
||||||
this.imageLoaded(image, res.data.string('x0020000e'))
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
requestPoolManager.sortTaskPool()
|
requestPoolManager.sortTaskPool()
|
||||||
this.imageList = []
|
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) {
|
// load(imageId, priority = 999) {
|
||||||
// return new Promise((resolve, reject) => {
|
// return new Promise((resolve, reject) => {
|
||||||
// const imageTask = this.buildImageRequestTask(imageId, { priority })
|
// const imageTask = this.buildImageRequestTask(imageId, { priority })
|
||||||
|
|
@ -592,47 +677,43 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// instance下载成功回调
|
cornerstoneimageloadprogress(e){
|
||||||
cornerstoneImageLoaded(e) {
|
const imageId = e.detail.imageId
|
||||||
if (e.detail.image.imageId.includes(this.firstInstanceId) && !this.isStartLoad) {
|
const percentComplete = e.detail.percentComplete
|
||||||
// 初始化图像加载完成时,自动下载
|
const params = {}
|
||||||
this.loadAllImages()
|
const searchParams = new URLSearchParams(imageId.split('?')[1])
|
||||||
this.isStartLoad = true
|
for (const [key, value] of searchParams.entries()) {
|
||||||
// requestPoolManager.executeTask()
|
params[key] = value
|
||||||
}
|
}
|
||||||
const uri = e.detail.image.sharedCacheKey
|
if (this.visitTaskId === params.visitTaskId) {
|
||||||
const index = this.cachedImages.findIndex(item => item.uri === uri)
|
const studyIndex = params.idx.split('|')[0]
|
||||||
if (index === -1) {
|
const seriesIndex = params.idx.split('|')[1]
|
||||||
this.cachedImages.push({ uri: uri, timestamp: new Date().getTime() })
|
var prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount
|
||||||
} else {
|
var instanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount
|
||||||
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 (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) {
|
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
|
||||||
++this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount
|
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)
|
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.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
|
||||||
|
this.loadAllImages()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -694,9 +775,9 @@ export default {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
/* height: 95%; */
|
/* height: 95%; */
|
||||||
height: 99%;
|
height: 99%;
|
||||||
overflow: hidden;
|
/* overflow: hidden;
|
||||||
text-overflow: clip;
|
text-overflow: clip; */
|
||||||
white-space: nowrap;
|
/* white-space: nowrap; */
|
||||||
}
|
}
|
||||||
.viewerContainer .viewerContentWrapper>div {
|
.viewerContainer .viewerContentWrapper>div {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
@ -813,6 +894,29 @@ export default {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 20px;
|
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 {
|
/* .viewerRightSidePanel {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
|
|
|
||||||
|
|
@ -513,12 +513,27 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.EnumType === 'Dictionary'" :span="12">
|
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.EnumType === 'Dictionary'" :span="12">
|
||||||
<el-form-item label="字典表名">
|
<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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.EnumType === 'Dictionary'" :span="12">
|
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.EnumType === 'Dictionary'" :span="12">
|
||||||
<el-form-item label="翻译字段">
|
<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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.EnumType === 'Date'" :span="24">
|
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.EnumType === 'Date'" :span="24">
|
||||||
|
|
@ -696,7 +711,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 Treeselect from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import Sortable from 'sortablejs'
|
import Sortable from 'sortablejs'
|
||||||
|
|
@ -749,13 +764,41 @@ export default {
|
||||||
},
|
},
|
||||||
ChildGroup: null,
|
ChildGroup: null,
|
||||||
tableShow: false,
|
tableShow: false,
|
||||||
rowDrop2TableIsShow: true
|
rowDrop2TableIsShow: true,
|
||||||
|
DictionaryCodeList:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList()
|
this.getList();
|
||||||
|
this.getDictionaryCodeList();
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
addParameter() {
|
||||||
this.form.UrlConfig.ParameterList.push({
|
this.form.UrlConfig.ParameterList.push({
|
||||||
UrlParameterName: null,
|
UrlParameterName: null,
|
||||||
|
|
|
||||||
|
|
@ -3,26 +3,34 @@
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<el-form :inline="true" size="small" class="base-search-form">
|
<el-form :inline="true" size="small" class="base-search-form">
|
||||||
<el-form-item label="CRO Name:">
|
<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-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-search" @click="handleSearch"
|
||||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">Reset</el-button>
|
>Search</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-refresh-left"
|
||||||
|
@click="handleReset"
|
||||||
|
>Reset</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span style="margin-left:auto;">
|
<span style="margin-left: auto">
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="margin-left:auto;"
|
style="margin-left: auto"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="handleAddCro"
|
@click="handleAddCro"
|
||||||
>New</el-button>
|
>New</el-button
|
||||||
|
>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-adaptive="{bottomOffset:60}"
|
v-adaptive="{ bottomOffset: 60 }"
|
||||||
:data="list"
|
:data="list"
|
||||||
stripe
|
stripe
|
||||||
height="100"
|
height="100"
|
||||||
|
|
@ -50,6 +58,16 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
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">
|
<el-table-column label="Action" min-width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -68,7 +86,13 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页组件 -->
|
<!-- 分页组件 -->
|
||||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
<pagination
|
||||||
|
class="page"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="searchData.PageIndex"
|
||||||
|
:limit.sync="searchData.PageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-if="editVisible"
|
v-if="editVisible"
|
||||||
|
|
@ -78,26 +102,32 @@
|
||||||
width="600px"
|
width="600px"
|
||||||
custom-class="base-dialog-wrapper"
|
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>
|
</el-dialog>
|
||||||
</box-content>
|
</box-content>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getCROPageList, deleteCROCompany } from '@/api/dictionary'
|
import { getCROPageList, deleteCROCompany } from "@/api/dictionary";
|
||||||
import BoxContent from '@/components/BoxContent'
|
import BoxContent from "@/components/BoxContent";
|
||||||
import Pagination from '@/components/Pagination'
|
import Pagination from "@/components/Pagination";
|
||||||
import CroForm from './CroForm'
|
import CroForm from "./CroForm";
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
CROName: '',
|
CROName: "",
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
Asc: true,
|
Asc: true,
|
||||||
SortField: ''
|
SortField: "",
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
export default {
|
export default {
|
||||||
name: 'Cros',
|
name: "Cros",
|
||||||
components: { BoxContent, Pagination, CroForm },
|
components: { BoxContent, Pagination, CroForm },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -107,87 +137,93 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
rowData: {},
|
rowData: {},
|
||||||
editVisible: false,
|
editVisible: false,
|
||||||
title: ''
|
title: "",
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取CRO列表信息
|
// 获取CRO列表信息
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
getCROPageList(this.searchData).then(res => {
|
getCROPageList(this.searchData)
|
||||||
this.loading = false
|
.then((res) => {
|
||||||
this.list = res.Result.CurrentPageData
|
this.loading = false;
|
||||||
this.total = res.Result.TotalCount
|
this.list = res.Result.CurrentPageData;
|
||||||
}).catch(() => {
|
this.total = res.Result.TotalCount;
|
||||||
this.loading = false
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 新增CRO
|
// 新增CRO
|
||||||
handleAddCro() {
|
handleAddCro() {
|
||||||
this.rowData = {}
|
this.rowData = {};
|
||||||
this.title = 'Add'
|
this.title = "Add";
|
||||||
this.editVisible = true
|
this.editVisible = true;
|
||||||
},
|
},
|
||||||
// 编辑CRO
|
// 编辑CRO
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.rowData = row
|
this.rowData = row;
|
||||||
this.title = 'Edit'
|
this.title = "Edit";
|
||||||
this.editVisible = true
|
this.editVisible = true;
|
||||||
},
|
},
|
||||||
// 删除CRO
|
// 删除CRO
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
|
||||||
type: 'warning',
|
type: "warning",
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
|
}).then(() => {
|
||||||
})
|
this.loading = true;
|
||||||
.then(() => {
|
|
||||||
this.loading = true
|
|
||||||
deleteCROCompany(row.Id)
|
deleteCROCompany(row.Id)
|
||||||
.then(res => {
|
.then((res) => {
|
||||||
this.loading = false
|
this.loading = false;
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
this.list.splice(
|
||||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
this.list.findIndex((item) => item.Id === row.Id),
|
||||||
|
1
|
||||||
|
);
|
||||||
|
this.$message.success(
|
||||||
|
this.$t("common:message:deletedSuccessfully")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 重置列表
|
// 重置列表
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.searchData = searchDataDefault()
|
this.searchData = searchDataDefault();
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
// 查询
|
// 查询
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1;
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
// 指定排序字段,对列表进行排序
|
// 指定排序字段,对列表进行排序
|
||||||
handleSortByColumn(column) {
|
handleSortByColumn(column) {
|
||||||
if (column.order === 'ascending') {
|
if (column.order === "ascending") {
|
||||||
this.searchData.Asc = true
|
this.searchData.Asc = true;
|
||||||
} else {
|
} else {
|
||||||
this.searchData.Asc = false
|
this.searchData.Asc = false;
|
||||||
}
|
}
|
||||||
this.searchData.SortField = column.prop
|
this.searchData.SortField = column.prop;
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1;
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
// 关闭模态框
|
// 关闭模态框
|
||||||
close() {
|
close() {
|
||||||
this.editVisible = false
|
this.editVisible = false;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.cros{
|
.cros {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -17,70 +17,98 @@
|
||||||
<el-form-item label="CRO Code: " prop="CROCode">
|
<el-form-item label="CRO Code: " prop="CROCode">
|
||||||
<el-input v-model="form.CROCode" />
|
<el-input v-model="form.CROCode" />
|
||||||
</el-form-item>
|
</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>
|
||||||
<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-form-item>
|
||||||
<el-button :disabled="btnLoading" type="primary" @click="handleCancel">Cancel</el-button>
|
<el-button :disabled="btnLoading" type="primary" @click="handleCancel"
|
||||||
<el-button type="primary" :loading="btnLoading" @click="handleSave">Save</el-button>
|
>Cancel</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" :loading="btnLoading" @click="handleSave"
|
||||||
|
>Save</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { addOrUpdateCro } from '@/api/dictionary'
|
import { addOrUpdateCro } from "@/api/dictionary";
|
||||||
export default {
|
export default {
|
||||||
name: 'CroForm',
|
name: "CroForm",
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {}
|
return {};
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
IsTrialLevel: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
form: {
|
form: {
|
||||||
Id: '',
|
Id: "",
|
||||||
CROName: '',
|
CROName: "",
|
||||||
CRONameCN: '',
|
CRONameCN: "",
|
||||||
CROCode: ''
|
CROCode: "",
|
||||||
|
IsTrialLevel: true,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
CROName: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
CROName: [
|
||||||
CRONameCN: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
{ required: true, message: "Please specify", trigger: "blur" },
|
||||||
CROCode: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }]
|
{ 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() {
|
mounted() {
|
||||||
if (Object.keys(this.data).length && this.data.Id) {
|
if (Object.keys(this.data).length && this.data.Id) {
|
||||||
this.form = { ...this.data }
|
this.form = { ...this.data };
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.CROForm.validate(valid => {
|
this.$refs.CROForm.validate((valid) => {
|
||||||
if (!valid) return
|
if (!valid) return;
|
||||||
this.btnLoading = true
|
this.btnLoading = true;
|
||||||
addOrUpdateCro(this.form).then(res => {
|
addOrUpdateCro(this.form)
|
||||||
this.btnLoading = false
|
.then((res) => {
|
||||||
|
this.btnLoading = false;
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.$message.success('Saved successfully')
|
this.$message.success("Saved successfully");
|
||||||
this.$refs['CROForm'].resetFields()
|
this.$refs["CROForm"].resetFields();
|
||||||
this.$emit('getList')
|
this.$emit("getList");
|
||||||
this.$emit('close')
|
this.$emit("close");
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
|
||||||
this.btnLoading = false
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.btnLoading = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.$emit('close')
|
this.$emit("close");
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -3,33 +3,50 @@
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<el-form :inline="true" size="small" class="base-search-form">
|
<el-form :inline="true" size="small" class="base-search-form">
|
||||||
<el-form-item label="Site Name:">
|
<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>
|
||||||
<el-form-item label="Alias Name:">
|
<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>
|
||||||
<el-form-item label="Country:">
|
<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>
|
||||||
<el-form-item label="City:">
|
<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-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-search" @click="handleSearch"
|
||||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">Reset</el-button>
|
>Search</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-refresh-left"
|
||||||
|
@click="handleReset"
|
||||||
|
>Reset</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<div style="margin-left: auto">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
style="margin-left:auto;"
|
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"
|
icon="el-icon-plus"
|
||||||
@click="handleAddSite"
|
@click="handleAddSite"
|
||||||
>New</el-button>
|
>New
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-adaptive="{bottomOffset:60}"
|
v-adaptive="{ bottomOffset: 60 }"
|
||||||
:data="list"
|
:data="list"
|
||||||
stripe
|
stripe
|
||||||
height="100"
|
height="100"
|
||||||
|
|
@ -120,6 +137,13 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
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">
|
<el-table-column label="Action" fixed="right" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -138,131 +162,362 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页组件 -->
|
<!-- 分页组件 -->
|
||||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
<pagination
|
||||||
|
class="page"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="searchData.PageIndex"
|
||||||
|
:limit.sync="searchData.PageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-if="editVisible"
|
v-if="editVisible"
|
||||||
:visible.sync="editVisible"
|
:visible.sync="editVisible"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:title="title"
|
:title="title"
|
||||||
width="600px"
|
width="800px"
|
||||||
custom-class="base-dialog-wrapper"
|
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>
|
</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>
|
</box-content>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getSiteList, deleteSite } from '@/api/dictionary'
|
import {
|
||||||
|
getSiteList,
|
||||||
import BoxContent from '@/components/BoxContent'
|
deleteSite,
|
||||||
import Pagination from '@/components/Pagination'
|
addOrUpdateSite,
|
||||||
import SiteForm from './SiteForm'
|
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 = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
SiteName: '',
|
SiteName: "",
|
||||||
|
PageIndex: 1,
|
||||||
|
PageSize: 20,
|
||||||
|
Asc: false,
|
||||||
|
SortField: "CreateTime",
|
||||||
|
AliasName: "",
|
||||||
|
Country: null,
|
||||||
|
City: null,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
const searchSiteDataDefault = () => {
|
||||||
|
return {
|
||||||
|
// SiteName: "",
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
Asc: true,
|
Asc: true,
|
||||||
SortField: '',
|
SortField: "",
|
||||||
AliasName: '',
|
TrialCode: null,
|
||||||
Country: null,
|
TrialSiteName: null,
|
||||||
City: null
|
TrialSiteAliasName: null,
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
export default {
|
export default {
|
||||||
name: 'Sites',
|
name: "Sites",
|
||||||
components: { BoxContent, Pagination, SiteForm },
|
components: { BoxContent, Pagination, SiteForm, BaseModel },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
editVisible: false,
|
editVisible: false,
|
||||||
title: 'Add',
|
title: "Add",
|
||||||
searchData: searchDataDefault(),
|
searchData: searchDataDefault(),
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
loading: false,
|
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() {
|
mounted() {
|
||||||
this.getList()
|
this.getList();
|
||||||
|
this.getTrialSiteList();
|
||||||
},
|
},
|
||||||
methods: {
|
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列表信息
|
// 获取Site列表信息
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
getSiteList(this.searchData).then(res => {
|
getSiteList(this.searchData)
|
||||||
this.loading = false
|
.then((res) => {
|
||||||
this.list = res.Result.CurrentPageData
|
this.loading = false;
|
||||||
this.total = res.Result.TotalCount
|
this.list = res.Result.CurrentPageData;
|
||||||
}).catch(() => {
|
this.total = res.Result.TotalCount;
|
||||||
this.loading = false
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 新增Site信息
|
// 新增Site信息
|
||||||
handleAddSite() {
|
handleAddSite() {
|
||||||
this.rowData = {}
|
this.rowData = {};
|
||||||
this.title = 'Add'
|
this.title = "Add";
|
||||||
this.editVisible = true
|
this.editVisible = true;
|
||||||
},
|
},
|
||||||
// 编辑Site信息
|
// 编辑Site信息
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.rowData = row
|
this.rowData = row;
|
||||||
this.title = 'Edit'
|
this.title = "Edit";
|
||||||
this.editVisible = true
|
this.editVisible = true;
|
||||||
},
|
},
|
||||||
// 删除Site
|
// 删除Site
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
|
||||||
type: 'warning',
|
type: "warning",
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
|
}).then(() => {
|
||||||
})
|
this.loading = true;
|
||||||
.then(() => {
|
|
||||||
this.loading = true
|
|
||||||
deleteSite(row.Id)
|
deleteSite(row.Id)
|
||||||
.then(res => {
|
.then((res) => {
|
||||||
this.loading = false
|
this.loading = false;
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
this.list.splice(
|
||||||
this.$store.dispatch('global/setSite', {})
|
this.list.findIndex((item) => item.Id === row.Id),
|
||||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
1
|
||||||
|
);
|
||||||
|
this.$store.dispatch("global/setSite", {});
|
||||||
|
this.$message.success(
|
||||||
|
this.$t("common:message:deletedSuccessfully")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 重置列表
|
// 重置列表
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.searchData = searchDataDefault()
|
this.searchData = searchDataDefault();
|
||||||
this.getList()
|
this.getList();
|
||||||
|
},
|
||||||
|
handleResetAddSite() {
|
||||||
|
this.addSystemSiteSearchData = searchSiteDataDefault();
|
||||||
|
this.getTrialSiteList();
|
||||||
},
|
},
|
||||||
// 查询
|
// 查询
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1;
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
// 指定排序字段,对列表进行排序
|
// 指定排序字段,对列表进行排序
|
||||||
handleSortByColumn(column) {
|
handleSortByColumn(column) {
|
||||||
if (column.order === 'ascending') {
|
if (column.order === "ascending") {
|
||||||
this.searchData.Asc = true
|
this.searchData.Asc = true;
|
||||||
} else {
|
} else {
|
||||||
this.searchData.Asc = false
|
this.searchData.Asc = false;
|
||||||
}
|
}
|
||||||
this.searchData.SortField = column.prop
|
this.searchData.SortField = column.prop;
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1;
|
||||||
this.getList()
|
this.getList();
|
||||||
|
},
|
||||||
|
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() {
|
close() {
|
||||||
this.editVisible = false
|
this.editVisible = false;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.Sites{
|
.Sites {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<el-form
|
<el-form
|
||||||
ref="sponsorForm"
|
ref="sponsorForm"
|
||||||
:model="form"
|
:model="form"
|
||||||
|
|
@ -15,73 +14,109 @@
|
||||||
<el-form-item label="Sponsor NameCN: " prop="SponsorName">
|
<el-form-item label="Sponsor NameCN: " prop="SponsorName">
|
||||||
<el-input v-model="form.SponsorNameCN" />
|
<el-input v-model="form.SponsorNameCN" />
|
||||||
</el-form-item>
|
</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-input v-model="form.SponsorCode" />
|
||||||
</el-form-item>
|
</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>
|
||||||
<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-form-item>
|
||||||
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancel">Cancel</el-button>
|
<el-button
|
||||||
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">Save</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>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { addOrUpdateSponsor } from '@/api/dictionary'
|
import { addOrUpdateSponsor } from "@/api/dictionary";
|
||||||
export default {
|
export default {
|
||||||
name: 'SponsorForm',
|
name: "SponsorForm",
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {}
|
return {};
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
IsTrialLevel: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
form: {
|
form: {
|
||||||
Id: '',
|
Id: "",
|
||||||
SponsorName: '',
|
SponsorName: "",
|
||||||
SponsorNameCN: '',
|
SponsorNameCN: "",
|
||||||
SponsorCode: '',
|
SponsorCode: "",
|
||||||
|
IsTrialLevel: true,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
SponsorName: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
SponsorName: [
|
||||||
SponsorNameCN: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
{ required: true, message: "Please specify", trigger: "blur" },
|
||||||
SponsorCode: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }]
|
{ 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() {
|
mounted() {
|
||||||
if (Object.keys(this.data).length && this.data.Id) {
|
if (Object.keys(this.data).length && this.data.Id) {
|
||||||
this.form = { ...this.data }
|
this.form = { ...this.data };
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.sponsorForm.validate(valid => {
|
this.$refs.sponsorForm.validate((valid) => {
|
||||||
if (!valid) return
|
if (!valid) return;
|
||||||
this.btnLoading = true
|
this.btnLoading = true;
|
||||||
addOrUpdateSponsor(this.form).then(res => {
|
addOrUpdateSponsor(this.form)
|
||||||
this.btnLoading = false
|
.then((res) => {
|
||||||
|
this.btnLoading = false;
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.$message.success('Saved successfully')
|
this.$message.success("Saved successfully");
|
||||||
this.$refs['sponsorForm'].resetFields()
|
this.$refs["sponsorForm"].resetFields();
|
||||||
this.$emit('getList')
|
this.$emit("getList");
|
||||||
this.$emit('close')
|
this.$emit("close");
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
|
||||||
this.btnLoading = false
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.btnLoading = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.$emit('close')
|
this.$emit("close");
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -3,26 +3,34 @@
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<el-form :inline="true" size="small" class="base-search-form">
|
<el-form :inline="true" size="small" class="base-search-form">
|
||||||
<el-form-item label="Sponsor Name:">
|
<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-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-search" @click="handleSearch"
|
||||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">Reset</el-button>
|
>Search</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-refresh-left"
|
||||||
|
@click="handleReset"
|
||||||
|
>Reset</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span style="margin-left:auto;">
|
<span style="margin-left: auto">
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="margin-left:auto;"
|
style="margin-left: auto"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="handleAddSponsor"
|
@click="handleAddSponsor"
|
||||||
>New</el-button>
|
>New</el-button
|
||||||
|
>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-adaptive="{bottomOffset:60}"
|
v-adaptive="{ bottomOffset: 60 }"
|
||||||
:data="list"
|
:data="list"
|
||||||
stripe
|
stripe
|
||||||
height="100"
|
height="100"
|
||||||
|
|
@ -50,6 +58,16 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
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">
|
<el-table-column label="Action" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -68,7 +86,13 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页组件 -->
|
<!-- 分页组件 -->
|
||||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
<pagination
|
||||||
|
class="page"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="searchData.PageIndex"
|
||||||
|
:limit.sync="searchData.PageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-if="editVisible"
|
v-if="editVisible"
|
||||||
|
|
@ -78,26 +102,32 @@
|
||||||
width="600px"
|
width="600px"
|
||||||
custom-class="base-dialog-wrapper"
|
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>
|
</el-dialog>
|
||||||
</box-content>
|
</box-content>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getSponsorPageList, deleteSponsor } from '@/api/dictionary'
|
import { getSponsorPageList, deleteSponsor } from "@/api/dictionary";
|
||||||
import BoxContent from '@/components/BoxContent'
|
import BoxContent from "@/components/BoxContent";
|
||||||
import Pagination from '@/components/Pagination'
|
import Pagination from "@/components/Pagination";
|
||||||
import SponsorForm from './SponsorForm'
|
import SponsorForm from "./SponsorForm";
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
SponsorName: '',
|
SponsorName: "",
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
Asc: true,
|
Asc: true,
|
||||||
SortField: ''
|
SortField: "",
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
export default {
|
export default {
|
||||||
name: 'Sponsors',
|
name: "Sponsors",
|
||||||
components: { BoxContent, Pagination, SponsorForm },
|
components: { BoxContent, Pagination, SponsorForm },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -107,87 +137,93 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
rowData: {},
|
rowData: {},
|
||||||
editVisible: false,
|
editVisible: false,
|
||||||
title: ''
|
title: "",
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取Sponsors列表
|
// 获取Sponsors列表
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
getSponsorPageList(this.searchData).then(res => {
|
getSponsorPageList(this.searchData)
|
||||||
this.loading = false
|
.then((res) => {
|
||||||
this.list = res.Result.CurrentPageData
|
this.loading = false;
|
||||||
this.total = res.Result.TotalCount
|
this.list = res.Result.CurrentPageData;
|
||||||
}).catch(() => {
|
this.total = res.Result.TotalCount;
|
||||||
this.loading = false
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 新增Sponsor
|
// 新增Sponsor
|
||||||
handleAddSponsor() {
|
handleAddSponsor() {
|
||||||
this.rowData = {}
|
this.rowData = {};
|
||||||
this.title = 'Add'
|
this.title = "Add";
|
||||||
this.editVisible = true
|
this.editVisible = true;
|
||||||
},
|
},
|
||||||
// 编辑Sponsor
|
// 编辑Sponsor
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.rowData = row
|
this.rowData = row;
|
||||||
this.title = 'Edit'
|
this.title = "Edit";
|
||||||
this.editVisible = true
|
this.editVisible = true;
|
||||||
},
|
},
|
||||||
// 删除Sponsor
|
// 删除Sponsor
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
|
||||||
type: 'warning',
|
type: "warning",
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
|
}).then(() => {
|
||||||
})
|
this.loading = true;
|
||||||
.then(() => {
|
|
||||||
this.loading = true
|
|
||||||
deleteSponsor(row.Id)
|
deleteSponsor(row.Id)
|
||||||
.then(res => {
|
.then((res) => {
|
||||||
this.loading = false
|
this.loading = false;
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
this.list.splice(
|
||||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
this.list.findIndex((item) => item.Id === row.Id),
|
||||||
|
1
|
||||||
|
);
|
||||||
|
this.$message.success(
|
||||||
|
this.$t("common:message:deletedSuccessfully")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 重置列表
|
// 重置列表
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.searchData = searchDataDefault()
|
this.searchData = searchDataDefault();
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
// 查询
|
// 查询
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1;
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
// 指定排序字段,对列表进行排序
|
// 指定排序字段,对列表进行排序
|
||||||
handleSortByColumn(column) {
|
handleSortByColumn(column) {
|
||||||
if (column.order === 'ascending') {
|
if (column.order === "ascending") {
|
||||||
this.searchData.Asc = true
|
this.searchData.Asc = true;
|
||||||
} else {
|
} else {
|
||||||
this.searchData.Asc = false
|
this.searchData.Asc = false;
|
||||||
}
|
}
|
||||||
this.searchData.SortField = column.prop
|
this.searchData.SortField = column.prop;
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1;
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
// 关闭模态框
|
// 关闭模态框
|
||||||
close() {
|
close() {
|
||||||
this.editVisible = false
|
this.editVisible = false;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.sponsors{
|
.sponsors {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,59 +1,86 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="reset-wrapper">
|
<div class="reset-wrapper">
|
||||||
<!-- Reset Password -->
|
|
||||||
<el-page-header :content="$t('passwordReset:title:reset')" @back="goBack" />
|
<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
|
<el-form
|
||||||
ref="resetForm"
|
ref="resetForm"
|
||||||
v-loading="formLoading"
|
v-loading="formLoading"
|
||||||
:model="form"
|
:model="form"
|
||||||
label-width="200px"
|
label-width="130px"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
class="demo-ruleForm"
|
class="demo-ruleForm"
|
||||||
size="small"
|
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-col :span="18">
|
||||||
<el-input v-model="form.EmailOrPhone" autocomplete="off" @change="handleEmailChange" />
|
<el-input
|
||||||
</el-col>
|
v-model="form.EmailOrPhone"
|
||||||
<el-col :span="6" style="text-align:right;">
|
autocomplete="off"
|
||||||
<el-button
|
@change="handleEmailChange"
|
||||||
size="small"
|
/>
|
||||||
type="primary"
|
|
||||||
style="width:80%;"
|
|
||||||
:disabled="sendDisabled"
|
|
||||||
@click="handleSendCode"
|
|
||||||
>{{ sendTitle }}</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item>
|
</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-col :span="18">
|
||||||
<el-form-item prop="VerificationCode">
|
<el-form-item prop="VerificationCode">
|
||||||
<el-input v-model="form.VerificationCode" autocomplete="off" />
|
<el-input v-model="form.VerificationCode" autocomplete="off" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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="sendDisabled"
|
||||||
|
@click="handleSendCode"
|
||||||
|
>{{ sendTitle }}</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<!-- 校验 -->
|
<!-- 校验 -->
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="width:80%;"
|
style="width: 50%; margin: auto; display: block"
|
||||||
:disabled="form.VerificationCode === '' || form.EmailOrPhone === ''"
|
:disabled="form.VerificationCode === '' || form.EmailOrPhone === ''"
|
||||||
@click="verifyCode"
|
@click="verifyCode"
|
||||||
>
|
>
|
||||||
{{ $t('passwordReset:button:verify') }}
|
{{ $t("passwordReset:button:verify") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</div>
|
||||||
</el-form-item>
|
<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-form-item :label="$t('passwordReset:form:userName')" prop="UserId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.UserId"
|
v-model="form.UserId"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
style="width:100%"
|
style="width: 100%"
|
||||||
@change="handleUserChange"
|
@change="handleUserChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -63,65 +90,102 @@
|
||||||
:value="item.UserId"
|
:value="item.UserId"
|
||||||
>
|
>
|
||||||
<span style="float: left">{{ item.UserName }}</span>
|
<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-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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-input v-model="form.UserType" disabled />
|
||||||
</el-form-item>
|
</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" />
|
<el-input v-model="form.NewPwd" show-password autocomplete="off" />
|
||||||
<span style="position: absolute;right: -30px">
|
<span style="position: absolute; right: -30px">
|
||||||
<el-tooltip :content="$t('passwordReset:form:passwordCentent')" placement="top">
|
<el-tooltip
|
||||||
|
:content="$t('passwordReset:form:passwordCentent')"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
<i class="el-icon-question" />
|
<i class="el-icon-question" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</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-input v-model="form.CheckPass" show-password autocomplete="off" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="text-align:right;">
|
</el-form>
|
||||||
|
<div style="width: 50%; margin: auto; display: flex">
|
||||||
<!-- 取消 -->
|
<!-- 取消 -->
|
||||||
<el-button size="small" @click="onCancel">
|
<el-button size="small" @click="onCancel" style="width: 46%">
|
||||||
{{ $t('passwordReset:button:cancel') }}
|
{{ $t("passwordReset:button:cancel") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 提交 -->
|
<!-- 提交 -->
|
||||||
<el-button size="small" type="primary" @click="onSubmit">
|
<el-button
|
||||||
{{ $t('passwordReset:button:submit') }}
|
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>
|
</el-button>
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
import { anonymousSendVerificationCode, verifyAnonymousVerifyCode, anonymousSetPassword } from '@/api/user'
|
anonymousSendVerificationCode,
|
||||||
import md5 from 'js-md5'
|
verifyAnonymousVerifyCode,
|
||||||
var timer = ''
|
anonymousSetPassword,
|
||||||
var countdown = 60
|
} from "@/api/user";
|
||||||
|
import md5 from "js-md5";
|
||||||
|
import Img from "@/assets/icons/svg/resetSuccess.svg";
|
||||||
|
var timer = "";
|
||||||
|
var countdown = 60;
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
var validateEmail = (rule, value, callback) => {
|
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 {
|
} 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)) {
|
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
|
||||||
this.sendDisabled = false
|
this.sendDisabled = false;
|
||||||
callback()
|
callback();
|
||||||
} else {
|
} else {
|
||||||
// 邮箱无效
|
// 邮箱无效
|
||||||
callback(new Error(this.$t('passwordReset:formRule:passwordinvalid')))
|
callback(
|
||||||
this.sendDisabled = true
|
new Error(this.$t("passwordReset:formRule:passwordinvalid"))
|
||||||
}
|
);
|
||||||
|
this.sendDisabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
// var validatePass = (rule, value, callback) => {
|
// var validatePass = (rule, value, callback) => {
|
||||||
// if (value === '') {
|
// if (value === '') {
|
||||||
// // 请输入密码
|
// // 请输入密码
|
||||||
|
|
@ -134,119 +198,181 @@ export default {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
var validatePass2 = (rule, value, callback) => {
|
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) {
|
} 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 {
|
} else {
|
||||||
callback()
|
callback();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
|
active: 0,
|
||||||
|
Img,
|
||||||
form: {
|
form: {
|
||||||
EmailOrPhone: '',
|
EmailOrPhone: "",
|
||||||
VerificationCode: '',
|
VerificationCode: "",
|
||||||
NewPwd: '',
|
NewPwd: "",
|
||||||
UserId: '',
|
UserId: "",
|
||||||
UserType: ''
|
UserType: "",
|
||||||
},
|
},
|
||||||
users: [],
|
users: [],
|
||||||
CheckPass: '',
|
CheckPass: "",
|
||||||
rules: {
|
rules: {
|
||||||
EmailOrPhone: [
|
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,
|
sendDisabled: true,
|
||||||
sendTitle: this.$t('passwordReset:button:send'),
|
sendTitle: this.$t("passwordReset:button:send"),
|
||||||
formLoading: false
|
formLoading: false,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
this.$refs['resetForm'].validate(valid => {
|
this.$refs["resetForm"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.formLoading = true
|
this.formLoading = true;
|
||||||
anonymousSetPassword(this.form.UserId, md5(this.form.NewPwd)).then(res => {
|
anonymousSetPassword(this.form.UserId, md5(this.form.NewPwd))
|
||||||
|
.then((res) => {
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
// 修改成功
|
// 修改成功
|
||||||
this.$message.success(this.$t('passwordReset:message:updatedSuccessfully'))
|
this.$message.success(
|
||||||
this.formLoading = false
|
this.$t("passwordReset:message:updatedSuccessfully")
|
||||||
this.goBack()
|
);
|
||||||
|
this.formLoading = false;
|
||||||
|
this.active = 3;
|
||||||
|
// this.goBack();
|
||||||
} else {
|
} else {
|
||||||
this.$alert(res.ErrorMessage)
|
this.$alert(res.ErrorMessage);
|
||||||
}
|
|
||||||
}).catch(() => { this.formLoading = false })
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.formLoading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleSendCode() {
|
handleSendCode() {
|
||||||
const that = this
|
const that = this;
|
||||||
this.sendDisabled = true
|
this.sendDisabled = true;
|
||||||
// var isReviewer = JSON.parse(zzSessionStorage.getItem('IsReviewer'))
|
// var isReviewer = JSON.parse(zzSessionStorage.getItem('IsReviewer'))
|
||||||
anonymousSendVerificationCode(this.form.EmailOrPhone).then(res => {
|
anonymousSendVerificationCode(this.form.EmailOrPhone)
|
||||||
|
.then((res) => {
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
that.settime(that)
|
let msg = this.$t('passwordReset:message:tip:sendCode').replace("xxx", this.form.EmailOrPhone)
|
||||||
|
this.$message.success(msg)
|
||||||
|
that.settime(that);
|
||||||
} else {
|
} else {
|
||||||
that.$alert(res.ErrorMessage)
|
that.$alert(res.ErrorMessage);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
|
||||||
this.sendDisabled = false
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.sendDisabled = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
verifyCode() {
|
verifyCode() {
|
||||||
this.formLoading = true
|
this.formLoading = true;
|
||||||
verifyAnonymousVerifyCode(this.form.EmailOrPhone, this.form.VerificationCode).then(res => {
|
verifyAnonymousVerifyCode(
|
||||||
this.formLoading = false
|
this.form.EmailOrPhone,
|
||||||
this.users = res.Result
|
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.$message.success(
|
||||||
}).catch(() => { this.formLoading = false })
|
this.$t("passwordReset:message:verifiedSuccessfully")
|
||||||
|
);
|
||||||
|
this.active = 1;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.formLoading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleEmailChange() {
|
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)) {
|
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
|
||||||
this.sendDisabled = false
|
this.sendDisabled = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleUserChange(val) {
|
handleUserChange(val) {
|
||||||
const seleted = this.users.findIndex(user => user.UserId === val)
|
const seleted = this.users.findIndex((user) => user.UserId === val);
|
||||||
if (seleted > -1) {
|
if (seleted > -1) {
|
||||||
this.form.UserType = this.users[seleted].UserType
|
this.form.UserType = this.users[seleted].UserType;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
settime(obj) {
|
settime(obj) {
|
||||||
if (countdown === 0) {
|
if (countdown === 0) {
|
||||||
obj.sendDisabled = false
|
obj.sendDisabled = false;
|
||||||
obj.sendTitle = this.$t('passwordReset:button:send')
|
obj.sendTitle = this.$t("passwordReset:button:send");
|
||||||
countdown = 60
|
countdown = 60;
|
||||||
clearTimeout(timer)
|
clearTimeout(timer);
|
||||||
return
|
return;
|
||||||
} else {
|
} else {
|
||||||
obj.sendDisabled = true
|
obj.sendDisabled = true;
|
||||||
obj.sendTitle = `${this.$t('passwordReset:button:wait')}(${countdown}s)`
|
obj.sendTitle = `${this.$t(
|
||||||
countdown--
|
"passwordReset:button:wait"
|
||||||
|
)}(${countdown}s)`;
|
||||||
|
countdown--;
|
||||||
// eslint-disable-next-line no-self-assign
|
// eslint-disable-next-line no-self-assign
|
||||||
countdown = countdown
|
countdown = countdown;
|
||||||
timer = setTimeout(function() {
|
timer = setTimeout(function () {
|
||||||
obj.settime(obj)
|
obj.settime(obj);
|
||||||
}, 1000)
|
}, 1000);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onCancel() {
|
onCancel() {
|
||||||
this.$refs['resetForm'].resetFields()
|
this.$refs["resetForm"].resetFields();
|
||||||
|
Object.keys(this.form).forEach((key) => {
|
||||||
|
this.form[key] = "";
|
||||||
|
});
|
||||||
|
this.active = 0;
|
||||||
},
|
},
|
||||||
goBack() {
|
goBack() {
|
||||||
this.$router.push('/login')
|
this.$router.push("/login");
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.reset-wrapper {
|
.reset-wrapper {
|
||||||
|
|
@ -270,7 +396,12 @@ export default {
|
||||||
/*/deep/ .is-error{*/
|
/*/deep/ .is-error{*/
|
||||||
/* margin-bottom: 40px;*/
|
/* margin-bottom: 40px;*/
|
||||||
/*}*/
|
/*}*/
|
||||||
.is-error.my_new_pwd{
|
.is-error.my_new_pwd {
|
||||||
margin-bottom: 40px;
|
margin-bottom: 40px;
|
||||||
}
|
}
|
||||||
|
.flexBox {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -6,17 +6,19 @@
|
||||||
<div class="login-body">
|
<div class="login-body">
|
||||||
<div class="login-l">
|
<div class="login-l">
|
||||||
<div class="login-logo">
|
<div class="login-logo">
|
||||||
<img v-if="language === 'zh'" src="@/assets/zzlogo2.png" alt="">
|
<img v-if="language === 'zh'" src="@/assets/zzlogo2.png" alt="" />
|
||||||
<img v-else src="@/assets/zzlogo4.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>
|
||||||
<div class="login-image">
|
<div class="login-image">
|
||||||
<img src="@/assets/login-bg.png">
|
<img src="@/assets/login-bg.png" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="login-r">
|
<div class="login-r">
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<!-- IRC Management System -->
|
<!-- 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>
|
</div>
|
||||||
<el-form
|
<el-form
|
||||||
ref="loginForm"
|
ref="loginForm"
|
||||||
|
|
@ -29,7 +31,11 @@
|
||||||
<el-form-item
|
<el-form-item
|
||||||
prop="username"
|
prop="username"
|
||||||
:rules="[
|
: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">
|
<span class="svg-container">
|
||||||
|
|
@ -50,7 +56,11 @@
|
||||||
<el-form-item
|
<el-form-item
|
||||||
prop="password"
|
prop="password"
|
||||||
:rules="[
|
: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">
|
<span class="svg-container">
|
||||||
|
|
@ -69,101 +79,132 @@
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
/>
|
/>
|
||||||
<span class="show-pwd" @click="showPwd">
|
<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>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- Login -->
|
<!-- Login -->
|
||||||
<el-button
|
<el-button
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="width:100%;margin-bottom:10px;"
|
style="width: 100%; margin-bottom: 10px"
|
||||||
size="medium"
|
size="medium"
|
||||||
@click.native.prevent="handleLogin"
|
@click.native.prevent="handleLogin"
|
||||||
>
|
>
|
||||||
{{ $t('login:button:login') }}
|
{{ $t("login:button:login") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right">
|
||||||
<TopLang v-if="VUE_APP_OSS_CONFIG_REGION !== 'oss-us-west-1'" />
|
<TopLang v-if="VUE_APP_OSS_CONFIG_REGION !== 'oss-us-west-1'" />
|
||||||
<!-- Forget password? -->
|
<!-- Forget password? -->
|
||||||
<el-button type="text" size="medium" @click.native.prevent="handleResetPwd">
|
<el-button
|
||||||
{{ $t('login:button:forgetPassword') }}
|
type="text"
|
||||||
|
size="medium"
|
||||||
|
@click.native.prevent="handleResetPwd"
|
||||||
|
>
|
||||||
|
{{ $t("login:button:forgetPassword") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="language === 'zh'" class="login-footer">
|
<div v-if="language === 'zh'" class="login-footer">
|
||||||
<span>Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司 版权所有</span>
|
<span
|
||||||
|
>Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司
|
||||||
|
版权所有</span
|
||||||
|
>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a target="_blank" href="https://beian.miit.gov.cn/">
|
<a target="_blank" href="https://beian.miit.gov.cn/">
|
||||||
<span>
|
<span> 沪ICP备2021037850-2 </span>
|
||||||
沪ICP备2021037850-2
|
|
||||||
</span>
|
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31011002005859">
|
<a
|
||||||
<img src="@/assets/filing.png">
|
target="_blank"
|
||||||
|
href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31011002005859"
|
||||||
|
>
|
||||||
|
<img src="@/assets/filing.png" />
|
||||||
<span>沪公网安备 31011002005859号</span>
|
<span>沪公网安备 31011002005859号</span>
|
||||||
</a>
|
</a>
|
||||||
<a @click="openAbout">
|
<a @click="openAbout">
|
||||||
<span style="color:#428bca">关于</span>
|
<span style="color: #428bca">关于</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</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
|
<el-dialog
|
||||||
v-if="aboutVisible"
|
v-if="aboutVisible"
|
||||||
:visible.sync="aboutVisible"
|
:visible.sync="aboutVisible"
|
||||||
width="680px"
|
width="680px"
|
||||||
style="margin-top: 0;"
|
style="margin-top: 0"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
<div style="margin: 0 auto;width: 600px;line-height: 28px;text-align: center" >
|
<div
|
||||||
<h1 style="text-align: center;margin-bottom: 20px">关于</h1>
|
style="
|
||||||
<p style="margin-bottom: 20px">
|
margin: 0 auto;
|
||||||
IRC Imaging System
|
width: 600px;
|
||||||
</p>
|
line-height: 28px;
|
||||||
<p style="margin-bottom: 20px">
|
text-align: center;
|
||||||
V1.3.2.001
|
"
|
||||||
</p>
|
>
|
||||||
|
<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'">
|
<p style="margin-bottom: 20px" v-if="language === 'zh'">
|
||||||
Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司 版权所有
|
Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司
|
||||||
|
版权所有
|
||||||
</p>
|
</p>
|
||||||
<p style="margin-bottom: 20px" v-else>
|
<p style="margin-bottom: 20px" v-else>
|
||||||
Copyright © {{ new Date().getFullYear() }} Shanghai Extensive Imaging Inc.
|
Copyright © {{ new Date().getFullYear() }} Shanghai Extensive Imaging
|
||||||
|
Inc.
|
||||||
</p>
|
</p>
|
||||||
<div style="margin-bottom: 20px">
|
<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>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<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>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters, mapMutations } from 'vuex'
|
import { mapGetters, mapMutations } from "vuex";
|
||||||
import TopLang from './topLang'
|
import TopLang from "./topLang";
|
||||||
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
|
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
|
||||||
import Vcode from 'vue-puzzle-vcode'
|
import Vcode from "vue-puzzle-vcode";
|
||||||
import Img1 from '@/assets/pic-2.png'
|
import Img1 from "@/assets/pic-2.png";
|
||||||
export default {
|
export default {
|
||||||
name: 'Login',
|
name: "Login",
|
||||||
components: { TopLang, Vcode },
|
components: { TopLang, Vcode },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
NODE_ENV: process.env.NODE_ENV,
|
||||||
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
|
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
|
||||||
aboutVisible: false,
|
aboutVisible: false,
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: '',
|
username: "",
|
||||||
password: ''
|
password: "",
|
||||||
|
UserId: null,
|
||||||
},
|
},
|
||||||
loginRules: {
|
loginRules: {
|
||||||
username: [
|
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: [
|
password: [
|
||||||
// {
|
// {
|
||||||
|
|
@ -171,40 +212,40 @@ export default {
|
||||||
// trigger: "blur",
|
// trigger: "blur",
|
||||||
// validator: this.$validatePassword
|
// 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,
|
loading: false,
|
||||||
passwordType: 'password',
|
passwordType: "password",
|
||||||
loginType: null,
|
loginType: null,
|
||||||
location: null,
|
location: null,
|
||||||
isShow: false,
|
isShow: false,
|
||||||
showCode: false,
|
showCode: false,
|
||||||
Img1
|
Img1,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters(["asyncRoutes", "routes", "language"]),
|
||||||
'asyncRoutes',
|
|
||||||
'routes',
|
|
||||||
'language'
|
|
||||||
])
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loginType = this.$route.query.loginType
|
this.loginType = this.$route.query.loginType;
|
||||||
this.location = this.$route.query.location
|
this.location = this.$route.query.location;
|
||||||
zzSessionStorage.setItem('loginType', this.loginType)
|
zzSessionStorage.setItem("loginType", this.loginType);
|
||||||
localStorage.setItem('location', this.location)
|
localStorage.setItem("location", this.location);
|
||||||
if (process.env.VUE_APP_OSS_CONFIG_REGION === 'oss-us-west-1') {
|
if (process.env.VUE_APP_OSS_CONFIG_REGION === "oss-us-west-1") {
|
||||||
this.$i18n.locale = 'en'
|
this.$i18n.locale = "en";
|
||||||
this.setLanguage('en')
|
this.setLanguage("en");
|
||||||
this.$updateDictionary()
|
this.$updateDictionary();
|
||||||
} else {
|
} else {
|
||||||
if (this.location === 'USA') {
|
if (this.location === "USA") {
|
||||||
this.$i18n.locale = 'en'
|
this.$i18n.locale = "en";
|
||||||
this.setLanguage('en')
|
this.setLanguage("en");
|
||||||
this.$updateDictionary()
|
this.$updateDictionary();
|
||||||
} else {
|
} else {
|
||||||
// this.$i18n.locale = 'zh'
|
// this.$i18n.locale = 'zh'
|
||||||
// this.setLanguage('zh')
|
// this.setLanguage('zh')
|
||||||
|
|
@ -213,85 +254,122 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
...mapMutations({ setLanguage: "lang/setLanguage" }),
|
||||||
openAbout() {
|
openAbout() {
|
||||||
this.aboutVisible = true
|
this.aboutVisible = true;
|
||||||
},
|
},
|
||||||
showPwd() {
|
showPwd() {
|
||||||
if (this.passwordType === 'password') {
|
if (this.passwordType === "password") {
|
||||||
this.passwordType = ''
|
this.passwordType = "";
|
||||||
} else {
|
} else {
|
||||||
this.passwordType = 'password'
|
this.passwordType = "password";
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.password.focus()
|
this.$refs.password.focus();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
this.loginType = this.$route.query.loginType
|
this.loginType = this.$route.query.loginType;
|
||||||
this.$refs.loginForm.validate(valid => {
|
this.$refs.loginForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.showCode) {
|
if (this.showCode) {
|
||||||
this.isShow = true
|
this.isShow = true;
|
||||||
} else {
|
} else {
|
||||||
this.onSuccess()
|
this.onSuccess();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// console.log('error submit!!')
|
// console.log('error submit!!')
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
loginIn() {
|
loginIn(Id) {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
this.showCode = false
|
this.showCode = false;
|
||||||
this.$store.dispatch('user/login', this.loginForm).then((res) => {
|
if (Id) this.loginForm.UserId = Id;
|
||||||
if (!res) {
|
this.$store
|
||||||
|
.dispatch("user/login", this.loginForm)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.BasicInfo.IsFirstAdd) {
|
||||||
// 当前用户为首次登录,请先修改密码之后再次登录
|
// 当前用户为首次登录,请先修改密码之后再次登录
|
||||||
this.$message.success(this.$t('login:message:login1'))
|
this.$message.success(this.$t("login:message:login1"));
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$router.push({ path: `/recompose?userName=${this.loginForm.username}` })
|
this.$router.push({
|
||||||
}, 500)
|
path: `/recompose?userName=${this.loginForm.username}`,
|
||||||
return
|
});
|
||||||
|
}, 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;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
this.$store.dispatch('permission/generateRoutes').then(res => {
|
);
|
||||||
this.loading = false
|
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) {
|
if (res && res.length > 0) {
|
||||||
this.$store.dispatch('global/getNoticeList')
|
this.$store.dispatch("global/getNoticeList");
|
||||||
this.$router.addRoutes(res)
|
this.$router.addRoutes(res);
|
||||||
if (this.loginType === 'DevOps') {
|
if (this.loginType === "DevOps") {
|
||||||
this.$router.replace({ path: res[0].path })
|
this.$router.replace({ path: res[0].path });
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
if (this.hasPermi(['role:radmin'])) {
|
if (this.hasPermi(["role:radmin"])) {
|
||||||
this.$router.replace({ path: res[0].path })
|
this.$router.replace({ path: res[0].path });
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
if (this.hasPermi(['role:air', 'role:rpm', 'role:rcrc', 'role:rir'])) {
|
if (
|
||||||
this.$router.replace({ path: '/trials/trials-list' })
|
this.hasPermi(["role:air", "role:rpm", "role:rcrc", "role:rir"])
|
||||||
|
) {
|
||||||
|
this.$router.replace({ path: "/trials/trials-list" });
|
||||||
} else {
|
} else {
|
||||||
this.$router.replace({ path: '/trials' })
|
this.$router.replace({ path: "/trials" });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 此账户暂未配置菜单权限,请联系管理员处理后再登录。
|
// 此账户暂未配置菜单权限,请联系管理员处理后再登录。
|
||||||
this.$message.warning(this.$t('login:message:login2'))
|
this.$message.warning(this.$t("login:message:login2"));
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.showCode = true
|
this.showCode = true;
|
||||||
this.loading = false
|
this.loading = false;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
onSuccess() {
|
onSuccess() {
|
||||||
this.isShow = false
|
this.isShow = false;
|
||||||
this.loginIn()
|
this.loginIn();
|
||||||
},
|
},
|
||||||
handleResetPwd() {
|
handleResetPwd() {
|
||||||
this.$router.push({ name: 'Resetpassword' })
|
this.$router.push({ name: "Resetpassword" });
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
@ -309,7 +387,7 @@ $cursor: #fff;
|
||||||
|
|
||||||
/* reset element-ui css */
|
/* reset element-ui css */
|
||||||
.login-container {
|
.login-container {
|
||||||
.el-input {
|
.login-r .el-input {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 47px;
|
height: 47px;
|
||||||
width: 85%;
|
width: 85%;
|
||||||
|
|
@ -330,20 +408,21 @@ $cursor: #fff;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.login-r {
|
||||||
.el-form-item {
|
.el-form-item {
|
||||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
background: #f4f4f5;
|
background: #f4f4f5;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
color: #454545;
|
color: #454545;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
$bg:#2d3a4b;
|
$bg: #2d3a4b;
|
||||||
$dark_gray:#889aa4;
|
$dark_gray: #889aa4;
|
||||||
$light_gray:#606266;
|
$light_gray: #606266;
|
||||||
.login-container {
|
.login-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -362,7 +441,7 @@ $light_gray:#606266;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translate(-50%,-50%);
|
transform: translate(-50%, -50%);
|
||||||
// margin-top: -230px;
|
// margin-top: -230px;
|
||||||
// margin-left: -400px;
|
// margin-left: -400px;
|
||||||
width: 1200px;
|
width: 1200px;
|
||||||
|
|
@ -376,17 +455,17 @@ $light_gray:#606266;
|
||||||
float: left;
|
float: left;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
.login-logo{
|
.login-logo {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top:35px;
|
top: 35px;
|
||||||
left: 50px;
|
left: 50px;
|
||||||
img{
|
img {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.login-image{
|
.login-image {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top:10px;
|
top: 10px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
// transform: translateY(-50%);
|
// transform: translateY(-50%);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
@ -394,7 +473,6 @@ $light_gray:#606266;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.login-r {
|
.login-r {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -407,12 +485,11 @@ $light_gray:#606266;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
// transform: translateY(-50%);
|
// transform: translateY(-50%);
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform:translate(-50%,-50%);
|
transform: translate(-50%, -50%);
|
||||||
width: 80%;
|
width: 80%;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
}
|
}
|
||||||
.title-container {
|
.title-container {
|
||||||
// margin-bottom: 50px;
|
// margin-bottom: 50px;
|
||||||
|
|
@ -456,7 +533,7 @@ $light_gray:#606266;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.login-footer{
|
.login-footer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 50px;
|
bottom: 50px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
|
|
@ -469,21 +546,20 @@ $light_gray:#606266;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
// color: rgb(180, 190, 199);
|
// color: rgb(180, 190, 199);
|
||||||
color: #909399;
|
color: #909399;
|
||||||
a{
|
a {
|
||||||
display:inline-block;
|
display: inline-block;
|
||||||
text-decoration:none;
|
text-decoration: none;
|
||||||
height:20px;
|
height: 20px;
|
||||||
line-height:20px;
|
line-height: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
span{
|
span {
|
||||||
margin: 0 2px;
|
margin: 0 2px;
|
||||||
|
|
||||||
}
|
}
|
||||||
img{
|
img {
|
||||||
height:20px;
|
height: 20px;
|
||||||
line-height:20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
// p{
|
// p{
|
||||||
// display: inline-block;
|
// display: inline-block;
|
||||||
|
|
@ -494,5 +570,4 @@ $light_gray:#606266;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
:ref="`img${i}`"
|
:ref="`img${i}`"
|
||||||
:key="item.Id"
|
:key="item.Id"
|
||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
:src="`${OSSclientConfig.basePath}${item.Path}`"
|
:src="item.FileType&&item.FileType.indexOf('zip')>=0?zipImg:`${OSSclientConfig.basePath}${item.Path}`"
|
||||||
:style="imgStyle"
|
:style="imgStyle"
|
||||||
style="max-width:100%;max-height: 100%;"
|
style="max-width:100%;max-height: 100%;"
|
||||||
@load="handleImgLoad"
|
@load="handleImgLoad"
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { on, off } from 'element-ui/src/utils/dom'
|
import { on, off } from 'element-ui/src/utils/dom'
|
||||||
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util'
|
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util';
|
||||||
|
|
||||||
const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel'
|
const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel'
|
||||||
|
|
||||||
|
|
@ -102,6 +102,10 @@ export default {
|
||||||
initialIndex: {
|
initialIndex: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0
|
default: 0
|
||||||
|
},
|
||||||
|
zipImg:{
|
||||||
|
required:true,
|
||||||
|
default:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -117,7 +121,7 @@ export default {
|
||||||
offsetX: 0,
|
offsetX: 0,
|
||||||
offsetY: 0,
|
offsetY: 0,
|
||||||
enableTransition: false
|
enableTransition: false
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
:study-code="previewImage.studyCode"
|
:study-code="previewImage.studyCode"
|
||||||
:body-part="previewImage.bodyPart"
|
:body-part="previewImage.bodyPart"
|
||||||
:modality="previewImage.modality"
|
:modality="previewImage.modality"
|
||||||
|
:zip-img='zipImg'
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="thumbnail-wrapper" style="z-index:999;background-color:#fff;">
|
<div class="thumbnail-wrapper" style="z-index:999;background-color:#fff;">
|
||||||
|
|
@ -42,7 +43,7 @@
|
||||||
}"
|
}"
|
||||||
@click="selected(index)"
|
@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">
|
<p v-if="item.FileName" class="item-date">
|
||||||
{{ `${index+1}` }}
|
{{ `${index+1}` }}
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -62,7 +63,8 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ImageViewer from './image-viewer'
|
import ImageViewer from './image-viewer';
|
||||||
|
import zipImg from "@/assets/zip.png";
|
||||||
export default {
|
export default {
|
||||||
name: 'Preview',
|
name: 'Preview',
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -104,7 +106,8 @@ export default {
|
||||||
previewVisible: true,
|
previewVisible: true,
|
||||||
translateX: 0,
|
translateX: 0,
|
||||||
pageSize: 0, // 一页展示的图片数
|
pageSize: 0, // 一页展示的图片数
|
||||||
urlList: []
|
urlList: [],
|
||||||
|
zipImg
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
||||||
|
|
@ -82,10 +82,14 @@ export default {
|
||||||
studyList: [],
|
studyList: [],
|
||||||
subjectVisitId: '',
|
subjectVisitId: '',
|
||||||
sudyId: '',
|
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) {
|
if (this.$router.currentRoute.query.TokenKey) {
|
||||||
store.dispatch('user/setToken', this.$router.currentRoute.query.TokenKey)
|
store.dispatch('user/setToken', this.$router.currentRoute.query.TokenKey)
|
||||||
changeURLStatic('TokenKey', '')
|
changeURLStatic('TokenKey', '')
|
||||||
|
|
@ -97,6 +101,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getBodyPart(bodyPart) {
|
getBodyPart(bodyPart) {
|
||||||
|
console.log(bodyPart)
|
||||||
if (!bodyPart) return ''
|
if (!bodyPart) return ''
|
||||||
var separator = ','
|
var separator = ','
|
||||||
if (bodyPart.indexOf('|') > -1) {
|
if (bodyPart.indexOf('|') > -1) {
|
||||||
|
|
@ -108,14 +113,15 @@ export default {
|
||||||
}
|
}
|
||||||
var arr = bodyPart.split(separator)
|
var arr = bodyPart.split(separator)
|
||||||
var newArr = arr.map(i => {
|
var newArr = arr.map(i => {
|
||||||
return this.$fd('Bodypart', i.trim())
|
return this.$fd('Bodypart', i.trim(),'Code',{Bodypart:this.bp},'Name')
|
||||||
})
|
})
|
||||||
|
console.log(newArr,this.bp)
|
||||||
return newArr.join(' | ')
|
return newArr.join(' | ')
|
||||||
},
|
},
|
||||||
// 获取非Dicom检查信息
|
// 获取非Dicom检查信息
|
||||||
getNoneDicomList() {
|
getNoneDicomList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getNoneDicomStudyList(this.subjectVisitId, this.studyId).then(res => {
|
getNoneDicomStudyList(this.subjectVisitId, this.studyId, true).then(res => {
|
||||||
this.studyList = res.Result
|
this.studyList = res.Result
|
||||||
this.loading = false
|
this.loading = false
|
||||||
const studyIndex = this.studyList.findIndex(item => {
|
const studyIndex = this.studyList.findIndex(item => {
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ export default {
|
||||||
// 获取非Dicom检查信息
|
// 获取非Dicom检查信息
|
||||||
getNoneDicomList() {
|
getNoneDicomList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getNoneDicomStudyList(this.subjectVisitId).then(res => {
|
getNoneDicomStudyList(this.subjectVisitId, '', true).then(res => {
|
||||||
this.noneDicomStudyList = res.Result
|
this.noneDicomStudyList = res.Result
|
||||||
this.loading = false
|
this.loading = false
|
||||||
const study = this.noneDicomStudyList.find((item, index) => {
|
const study = this.noneDicomStudyList.find((item, index) => {
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ export default {
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/deep/ .is-error{
|
::v-deep .is-error{
|
||||||
margin-bottom: 40px;
|
margin-bottom: 40px;
|
||||||
}
|
}
|
||||||
input:-webkit-autofill {
|
input:-webkit-autofill {
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,9 @@
|
||||||
<el-input v-model="form.IndicationType" disabled />
|
<el-input v-model="form.IndicationType" disabled />
|
||||||
</el-form-item>
|
</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
|
<el-select
|
||||||
v-model="form.SiteId"
|
v-model="form.TrialSiteId"
|
||||||
filterable
|
filterable
|
||||||
style="width:100%;"
|
style="width:100%;"
|
||||||
:disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory"
|
:disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory"
|
||||||
|
|
@ -29,12 +29,12 @@
|
||||||
v-for="(item,index) of siteOptions"
|
v-for="(item,index) of siteOptions"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.TrialSiteAliasName"
|
:label="item.TrialSiteAliasName"
|
||||||
:value="item.SiteId"
|
:value="item.TrialSiteId"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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-input v-model="form.TrialSiteCode" disabled />
|
||||||
</el-form-item>
|
</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-input-number v-model="form.AverageEngravingCycle" :disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory" controls-position="right" :min="0" />
|
||||||
</el-form-item>
|
</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-group v-model="form.IsConfirmImagingTechnologist" :disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory">
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="item of $d.YesOrNo"
|
v-for="item of $d.YesOrNo"
|
||||||
|
|
@ -70,7 +70,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 原因 -->
|
<!-- 原因 -->
|
||||||
<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')"
|
:label="$t('trials:researchForm:form:notQualifiedReason')"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -81,13 +81,13 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</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-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 v-for="item of $d.EfficacyEvaluatorType" :key="`EfficacyEvaluatorType${item.value}`" :label="item.value">{{ item.label }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 是否严格按照研究单位影像手册参数完成图像采集 -->
|
<!-- 是否严格按照研究单位影像手册参数完成图像采集 -->
|
||||||
<el-form-item>
|
<el-form-item v-if="!notShowFieldList.includes('IsFollowStudyParameters')">
|
||||||
<span slot="label" v-html="$t('trials:researchForm:form:isFollowStudyParam')" />
|
<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-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>
|
<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>
|
||||||
<!-- 不能严格按照研究单位影像手册参数采集图像原因 -->
|
<!-- 不能严格按照研究单位影像手册参数采集图像原因 -->
|
||||||
<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')" />
|
<span slot="label" v-html="$t('trials:researchForm:form:notFollowStudyParam')" />
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -162,7 +162,7 @@ export default {
|
||||||
TrialSiteCode: '',
|
TrialSiteCode: '',
|
||||||
TrialSiteAliasName: '',
|
TrialSiteAliasName: '',
|
||||||
IndicationType: '', // 适应症
|
IndicationType: '', // 适应症
|
||||||
SiteId: '', // 研究单位名称
|
TrialSiteId: '', // 研究单位名称
|
||||||
UserName: '', // 联系人
|
UserName: '', // 联系人
|
||||||
Phone: '', // 联系人电话
|
Phone: '', // 联系人电话
|
||||||
Email: '', // 联系人邮箱
|
Email: '', // 联系人邮箱
|
||||||
|
|
@ -174,11 +174,11 @@ export default {
|
||||||
NotFollowReson: ''
|
NotFollowReson: ''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
SiteId: [
|
TrialSiteId: [
|
||||||
{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: 'blur' }
|
{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
UserName: [
|
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'] }
|
{ min: 0, max: 50, message: this.$t('trials:researchForm:formRule:maxLength'), trigger: ['blur', 'change'] }
|
||||||
],
|
],
|
||||||
Phone: [
|
Phone: [
|
||||||
|
|
@ -189,7 +189,8 @@ export default {
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
state: null,
|
state: null,
|
||||||
userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1,
|
userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1,
|
||||||
isShow: false
|
isShow: false,
|
||||||
|
notShowFieldList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -202,7 +203,7 @@ export default {
|
||||||
const param = {
|
const param = {
|
||||||
id: this.form.Id,
|
id: this.form.Id,
|
||||||
trialId: this.$route.query.trialId,
|
trialId: this.$route.query.trialId,
|
||||||
siteId: this.form.SiteId,
|
trialSiteId: this.form.TrialSiteId,
|
||||||
userName: this.form.UserName,
|
userName: this.form.UserName,
|
||||||
phone: this.form.Phone,
|
phone: this.form.Phone,
|
||||||
email: this.form.Email,
|
email: this.form.Email,
|
||||||
|
|
@ -234,7 +235,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
async initForm(trialInfo, trialSiteSurvey) {
|
async initForm(trialInfo, trialSiteSurvey, notShowFieldList) {
|
||||||
// 获取项目下的site
|
// 获取项目下的site
|
||||||
const { Result } = await getTrialSiteSelect(this.$route.query.trialId)
|
const { Result } = await getTrialSiteSelect(this.$route.query.trialId)
|
||||||
this.siteOptions = Result
|
this.siteOptions = Result
|
||||||
|
|
@ -246,7 +247,7 @@ export default {
|
||||||
this.form.TrialSiteCode = trialSiteSurvey.TrialSiteCode
|
this.form.TrialSiteCode = trialSiteSurvey.TrialSiteCode
|
||||||
this.form.TrialSiteAliasName = trialSiteSurvey.TrialSiteAliasName // 项目别称
|
this.form.TrialSiteAliasName = trialSiteSurvey.TrialSiteAliasName // 项目别称
|
||||||
this.form.IndicationType = trialInfo.IndicationType // 适应症
|
this.form.IndicationType = trialInfo.IndicationType // 适应症
|
||||||
this.form.SiteId = trialSiteSurvey.SiteId
|
this.form.TrialSiteId = trialSiteSurvey.TrialSiteId
|
||||||
this.form.UserName = trialSiteSurvey.UserName // 联系人
|
this.form.UserName = trialSiteSurvey.UserName // 联系人
|
||||||
this.form.Phone = trialSiteSurvey.Phone // 联系人电话
|
this.form.Phone = trialSiteSurvey.Phone // 联系人电话
|
||||||
this.form.Email = trialSiteSurvey.Email // 联系人邮箱
|
this.form.Email = trialSiteSurvey.Email // 联系人邮箱
|
||||||
|
|
@ -258,9 +259,11 @@ export default {
|
||||||
this.form.NotFollowReson = trialSiteSurvey.NotFollowReson
|
this.form.NotFollowReson = trialSiteSurvey.NotFollowReson
|
||||||
this.state = trialSiteSurvey.State
|
this.state = trialSiteSurvey.State
|
||||||
this.isShow = true
|
this.isShow = true
|
||||||
|
if (!notShowFieldList) return
|
||||||
|
this.notShowFieldList = notShowFieldList
|
||||||
},
|
},
|
||||||
handleSiteChange(val) {
|
handleSiteChange(val) {
|
||||||
var selected = this.siteOptions.find(item => item.SiteId === val)
|
var selected = this.siteOptions.find(item => item.TrialSiteId === val)
|
||||||
if (selected) {
|
if (selected) {
|
||||||
this.form.TrialSiteCode = selected.TrialSiteCode
|
this.form.TrialSiteCode = selected.TrialSiteCode
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
:value="item.Id"
|
:value="item.Id"
|
||||||
/> -->
|
/> -->
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item of $d.Modality"
|
v-for="item of $d.SiteSurvey_ScanEquipmentType"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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-input v-model="form.Parameters" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 扫描仪器制造商名称 -->
|
<!-- 扫描仪器制造商名称 -->
|
||||||
|
|
@ -68,6 +68,10 @@ export default {
|
||||||
trialSiteSurveyEquipmentType: {
|
trialSiteSurveyEquipmentType: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
|
},
|
||||||
|
isShowParameters: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
||||||
|
|
@ -21,28 +21,37 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="EquipmentType"
|
prop="EquipmentType"
|
||||||
:label="$t('trials:equiptResearch:form:equipment')"
|
:label="$t('trials:equiptResearch:form:equipment')"
|
||||||
width="180"
|
min-width="120"
|
||||||
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<!-- 扫描参数 -->
|
<!-- 扫描参数 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
v-if="isShowParameters"
|
||||||
prop="Parameters"
|
prop="Parameters"
|
||||||
:label="$t('trials:equiptResearch:form:param')"
|
:label="$t('trials:equiptResearch:form:param')"
|
||||||
width="180"
|
min-width="100"
|
||||||
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<!-- 扫描仪器制造商名称 -->
|
<!-- 扫描仪器制造商名称 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
min-width="120"
|
||||||
prop="ManufacturerName"
|
prop="ManufacturerName"
|
||||||
:label="$t('trials:equiptResearch:form:manufacturer')"
|
:label="$t('trials:equiptResearch:form:manufacturer')"
|
||||||
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<!-- 扫描仪型号 -->
|
<!-- 扫描仪型号 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
min-width="120"
|
||||||
prop="ScannerType"
|
prop="ScannerType"
|
||||||
:label="$t('trials:equiptResearch:form:model')"
|
:label="$t('trials:equiptResearch:form:model')"
|
||||||
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<!-- 备注 -->
|
<!-- 备注 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
min-width="120"
|
||||||
prop="Note"
|
prop="Note"
|
||||||
:label="$t('trials:equiptResearch:form:precautions')"
|
:label="$t('trials:equiptResearch:form:precautions')"
|
||||||
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="state === 0 && userTypeEnumInt === 0 && !isHistory"
|
v-if="state === 0 && userTypeEnumInt === 0 && !isHistory"
|
||||||
|
|
@ -73,7 +82,7 @@
|
||||||
custom-class="base-dialog-wrapper"
|
custom-class="base-dialog-wrapper"
|
||||||
:append-to-body="userTypeEnumInt !== 0"
|
: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>
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -105,7 +114,8 @@ export default {
|
||||||
userTypeEnumInt: 0,
|
userTypeEnumInt: 0,
|
||||||
state: null,
|
state: null,
|
||||||
trialSiteSurveyId: '',
|
trialSiteSurveyId: '',
|
||||||
trialId: ''
|
trialId: '',
|
||||||
|
isShowParameters: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -152,7 +162,8 @@ export default {
|
||||||
}).catch(() => { this.loading = false })
|
}).catch(() => { this.loading = false })
|
||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
},
|
},
|
||||||
initList(TrialSiteEquipmentSurveyList, trialSiteSurvey) {
|
initList(TrialSiteEquipmentSurveyList, trialSiteSurvey, isShowParameters) {
|
||||||
|
this.isShowParameters = isShowParameters
|
||||||
this.list = TrialSiteEquipmentSurveyList
|
this.list = TrialSiteEquipmentSurveyList
|
||||||
this.state = trialSiteSurvey.State
|
this.state = trialSiteSurvey.State
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ export default {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
var param = {
|
var param = {
|
||||||
trialId: this.trialId,
|
trialId: this.trialId,
|
||||||
siteId: this.siteId,
|
trialSiteId: this.siteId,
|
||||||
trialSiteSurveyId: this.trialSiteSurveyId
|
trialSiteSurveyId: this.trialSiteSurveyId
|
||||||
}
|
}
|
||||||
getTrialSiteSurveySelectList(param).then(res => {
|
getTrialSiteSurveySelectList(param).then(res => {
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.state = res.Result.TrialSiteSurvey.State
|
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['baseResearchInfo'].initForm(res.Result.TrialInfo, res.Result.TrialSiteSurvey)
|
||||||
this.$refs['historicalParticipant'].initList(historicalArr, res.Result.TrialSiteSurvey)
|
this.$refs['historicalParticipant'].initList(historicalArr, res.Result.TrialSiteSurvey)
|
||||||
this.$refs['researchParticipants'].initList(newArr, res.Result.TrialSiteSurvey)
|
this.$refs['researchParticipants'].initList(newArr, res.Result.TrialSiteSurvey)
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,11 @@
|
||||||
<el-card shadow="hover" class="mt10">
|
<el-card shadow="hover" class="mt10">
|
||||||
<!-- 注意事项 -->
|
<!-- 注意事项 -->
|
||||||
<h4>{{ $t('trials:equiptResearch:form:precautions') }}</h4>
|
<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>
|
<li>{{ $t('trials:equiptResearch:form:item1') }}</li>
|
||||||
<!-- 请确保对每位受试者的扫描参数在整个研究过程中保持一致。 -->
|
<!-- 请确保对每位受试者的扫描参数在整个研究过程中保持一致。 -->
|
||||||
|
|
@ -203,7 +207,8 @@ export default {
|
||||||
rejectForm: { reason: '' },
|
rejectForm: { reason: '' },
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
isFullscreen: false,
|
isFullscreen: false,
|
||||||
historyVisible: false
|
historyVisible: false,
|
||||||
|
siteSurveyNoteInfo: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -221,9 +226,12 @@ export default {
|
||||||
if (res.Result) {
|
if (res.Result) {
|
||||||
// this.trialSiteSurveyEquipmentType = res.Result.TrialInfo.TrialSiteSurveyEquipmentType
|
// this.trialSiteSurveyEquipmentType = res.Result.TrialInfo.TrialSiteSurveyEquipmentType
|
||||||
// this.trialSiteSurveyUserRoles = res.Result.TrialInfo.TrialSiteSurveyUserRoles
|
// 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.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['baseResearchInfo'].initForm(res.Result.TrialInfo, res.Result.TrialSiteSurvey, res.Result.SiteSurveyFiledConfig ? res.Result.SiteSurveyFiledConfig.NotShowFieldList : null)
|
||||||
var historicalArr = []
|
var historicalArr = []
|
||||||
var newArr = []
|
var newArr = []
|
||||||
res.Result.TrialSiteUserSurveyList.map(i => {
|
res.Result.TrialSiteUserSurveyList.map(i => {
|
||||||
|
|
@ -236,7 +244,7 @@ export default {
|
||||||
|
|
||||||
this.$refs['historicalParticipant'].initList(historicalArr, res.Result.TrialSiteSurvey)
|
this.$refs['historicalParticipant'].initList(historicalArr, res.Result.TrialSiteSurvey)
|
||||||
this.$refs['researchParticipants'].initList(newArr, 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.isExistIncorrect = res.Result.TrialSiteUserSurveyList.every(item => item.IsCorrect === false)
|
||||||
}
|
}
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|
@ -256,7 +264,7 @@ export default {
|
||||||
this.submit(type)
|
this.submit(type)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
submit() {
|
submit(type) {
|
||||||
// 是否确认提交
|
// 是否确认提交
|
||||||
this.$confirm(this.userTypeEnumInt === 0 ? this.$t('trials:researchForm:message:submitWarning') : this.$t('trials:researchForm:message:submitWarning2'), {
|
this.$confirm(this.userTypeEnumInt === 0 ? this.$t('trials:researchForm:message:submitWarning') : this.$t('trials:researchForm:message:submitWarning2'), {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
|
|
@ -275,9 +283,9 @@ export default {
|
||||||
this.$emit('refreshPage')
|
this.$emit('refreshPage')
|
||||||
}
|
}
|
||||||
// this.$message.success(this.$t('common:message:savedSuccessfully'))
|
// this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
if(type === 'approve'){
|
if (type === 'approve') {
|
||||||
this.$message.success(this.$t('common:message:approvedSuccessfully'))
|
this.$message.success(this.$t('common:message:approvedSuccessfully'))
|
||||||
}else{
|
} else {
|
||||||
this.$message.success(this.$t('trials:researchForm:message:savedSuccessfully'))
|
this.$message.success(this.$t('trials:researchForm:message:savedSuccessfully'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,20 +35,20 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 中心名称 -->
|
<!-- 中心名称 -->
|
||||||
<el-form-item :label="$t('trials:researchForm:form:siteName')" prop="SiteId">
|
<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
|
<el-option
|
||||||
v-for="(item,index) of siteOptions"
|
v-for="(item,index) of siteOptions"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.TrialSiteAliasName"
|
:label="item.TrialSiteAliasName"
|
||||||
:value="item.SiteId"
|
:value="item.TrialSiteId"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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-input v-model="form.TrialSiteCode" disabled />
|
||||||
</el-form-item>
|
</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">
|
<el-link v-if="!form.IsUpdate" type="primary" @click="form.IsUpdate = true">
|
||||||
{{ $t('trials:researchForm:button:updateQsForm') }}
|
{{ $t('trials:researchForm:button:updateQsForm') }}
|
||||||
|
|
@ -160,7 +160,7 @@ export default {
|
||||||
TrialCode: null, // 项目编号
|
TrialCode: null, // 项目编号
|
||||||
IndicationType: null, // 适应症
|
IndicationType: null, // 适应症
|
||||||
ExperimentName: '',
|
ExperimentName: '',
|
||||||
SiteId: null, // 研究单位名称
|
TrialSiteId: null, // 研究单位名称
|
||||||
UserName: null, // 联系人
|
UserName: null, // 联系人
|
||||||
Phone: '', // 联系人电话
|
Phone: '', // 联系人电话
|
||||||
EmailOrPhone: '',
|
EmailOrPhone: '',
|
||||||
|
|
@ -170,7 +170,7 @@ export default {
|
||||||
VerificationCode: ''
|
VerificationCode: ''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
SiteId: [
|
TrialSiteId: [
|
||||||
{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: ['blur'] }
|
{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: ['blur'] }
|
||||||
],
|
],
|
||||||
UserName: [
|
UserName: [
|
||||||
|
|
@ -243,7 +243,7 @@ export default {
|
||||||
this.form.ReplaceUserEmailOrPhone = ''
|
this.form.ReplaceUserEmailOrPhone = ''
|
||||||
}
|
}
|
||||||
const param = {
|
const param = {
|
||||||
siteId: this.form.SiteId,
|
trialSiteId: this.form.TrialSiteId,
|
||||||
userName: this.form.UserName,
|
userName: this.form.UserName,
|
||||||
phone: this.form.Phone,
|
phone: this.form.Phone,
|
||||||
verificationType: 0,
|
verificationType: 0,
|
||||||
|
|
@ -276,7 +276,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleSiteChange(val) {
|
handleSiteChange(val) {
|
||||||
this.isHaveSiteSurveyRecord = false
|
this.isHaveSiteSurveyRecord = false
|
||||||
var selected = this.siteOptions.find(item => item.SiteId === val)
|
var selected = this.siteOptions.find(item => item.TrialSiteId === val)
|
||||||
if (selected) {
|
if (selected) {
|
||||||
this.form.TrialSiteCode = selected.TrialSiteCode
|
this.form.TrialSiteCode = selected.TrialSiteCode
|
||||||
this.isHaveSiteSurveyRecord = selected.IsHaveSiteSurveyRecord
|
this.isHaveSiteSurveyRecord = selected.IsHaveSiteSurveyRecord
|
||||||
|
|
@ -294,6 +294,8 @@ export default {
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.getCode()
|
this.getCode()
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
const msg = this.$t('trials:researchForm:tip:sendCode').replace('xxx', this.form.EmailOrPhone)
|
||||||
|
this.$message.success(msg)
|
||||||
} else {
|
} else {
|
||||||
this.$alert(res.ErrorMessage)
|
this.$alert(res.ErrorMessage)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,7 @@
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="clinicalTrialForm.StartTime"
|
v-model="clinicalTrialForm.StartTime"
|
||||||
type="year"
|
type="year"
|
||||||
|
value-format="yyyy"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -113,6 +114,7 @@
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="clinicalTrialForm.EndTime"
|
v-model="clinicalTrialForm.EndTime"
|
||||||
type="year"
|
type="year"
|
||||||
|
value-format="yyyy"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -134,6 +136,7 @@
|
||||||
import { getTrialExperience, addOrUpdateTrialExperience, deleteTrialExperience, updateOtherExperience } from '@/api/reviewers'
|
import { getTrialExperience, addOrUpdateTrialExperience, deleteTrialExperience, updateOtherExperience } from '@/api/reviewers'
|
||||||
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
|
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
|
||||||
import GcpCertificate from './GcpCertificate.vue'
|
import GcpCertificate from './GcpCertificate.vue'
|
||||||
|
import moment from 'moment'
|
||||||
const getClinicalTrialDefault = () => {
|
const getClinicalTrialDefault = () => {
|
||||||
return {
|
return {
|
||||||
PhaseId: '',
|
PhaseId: '',
|
||||||
|
|
@ -234,11 +237,11 @@ export default {
|
||||||
var dateTime
|
var dateTime
|
||||||
if (this.clinicalTrialForm.StartTime) {
|
if (this.clinicalTrialForm.StartTime) {
|
||||||
dateTime = new Date(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) {
|
if (this.clinicalTrialForm.EndTime) {
|
||||||
dateTime = new Date(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 => {
|
addOrUpdateTrialExperience(this.clinicalTrialForm).then(res => {
|
||||||
this.isDisabled = false
|
this.isDisabled = false
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.PublishTime"
|
v-model="form.PublishTime"
|
||||||
type="date"
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@
|
||||||
:data="list"
|
:data="list"
|
||||||
class="table"
|
class="table"
|
||||||
@sort-change="handleSortByColumn"
|
@sort-change="handleSortByColumn"
|
||||||
|
:default-sort="{prop:'PublishTime',order:'descending'}"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="index"
|
type="index"
|
||||||
|
|
@ -130,8 +131,8 @@ const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
Version: null,
|
Version: null,
|
||||||
UpdateContent: null,
|
UpdateContent: null,
|
||||||
Asc: true,
|
Asc: false,
|
||||||
SortField: '',
|
SortField: 'PublishTime',
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20
|
PageSize: 20
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,11 @@
|
||||||
:label="$t('system:loginLog:label:OptType')"
|
:label="$t('system:loginLog:label:OptType')"
|
||||||
prop="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
|
<el-option
|
||||||
v-for="item of $d.UserOptType"
|
v-for="item of $d.UserOptType"
|
||||||
:key="'UserOptType' + item.label"
|
:key="'UserOptType' + item.label"
|
||||||
|
|
@ -15,15 +19,12 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item label="IP" prop="IP">
|
||||||
label="IP"
|
|
||||||
prop="IP"
|
|
||||||
>
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchData.IP"
|
v-model="searchData.IP"
|
||||||
size="small"
|
size="small"
|
||||||
clearable
|
clearable
|
||||||
style="width:120px;"
|
style="width: 120px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
|
|
@ -34,12 +35,10 @@
|
||||||
v-model="searchData.LoginFaildName"
|
v-model="searchData.LoginFaildName"
|
||||||
size="small"
|
size="small"
|
||||||
clearable
|
clearable
|
||||||
style="width:120px;"
|
style="width: 120px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item :label="$t('system:loginLog:label:CreateTime')">
|
||||||
:label="$t('system:loginLog:label:CreateTime')"
|
|
||||||
>
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="datetimerange"
|
v-model="datetimerange"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
|
|
@ -55,22 +54,19 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="getList"
|
@click="getList"
|
||||||
>
|
>
|
||||||
{{ $t('common:button:search') }}
|
{{ $t("common:button:search") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-adaptive="{bottomOffset:45}"
|
v-adaptive="{ bottomOffset: 45 }"
|
||||||
height="100"
|
height="100"
|
||||||
:data="list"
|
:data="list"
|
||||||
class="table"
|
class="table"
|
||||||
@sort-change="handleSortByColumn"
|
@sort-change="handleSortByColumn"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column type="index" width="50" />
|
||||||
type="index"
|
|
||||||
width="50"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="$t('system:loginLog:table:OptType')"
|
:label="$t('system:loginLog:table:OptType')"
|
||||||
prop="OptType"
|
prop="OptType"
|
||||||
|
|
@ -79,7 +75,7 @@
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd('UserOptType',scope.row.OptType) }}
|
{{ $fd("UserOptType", scope.row.OptType) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -89,6 +85,13 @@
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
show-overflow-tooltip
|
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
|
<el-table-column
|
||||||
:label="$t('system:loginLog:table:LoginFaildName')"
|
:label="$t('system:loginLog:table:LoginFaildName')"
|
||||||
prop="LoginFaildName"
|
prop="LoginFaildName"
|
||||||
|
|
@ -111,7 +114,7 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd('UserType',scope.row.LoginUserTypeEnum) }}
|
{{ $fd("UserType", scope.row.LoginUserTypeEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -129,7 +132,7 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd('UserType',scope.row.OptUserTypeEnum) }}
|
{{ $fd("UserType", scope.row.OptUserTypeEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -140,7 +143,7 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="pagination" style="text-align: right;margin-top:5px;">
|
<div class="pagination" style="text-align: right; margin-top: 5px">
|
||||||
<pagination
|
<pagination
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="searchData.PageIndex"
|
:page.sync="searchData.PageIndex"
|
||||||
|
|
@ -148,27 +151,26 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getUserLogList } from '@/api/user'
|
import { getUserLogList } from "@/api/user";
|
||||||
import Pagination from '@/components/Pagination'
|
import Pagination from "@/components/Pagination";
|
||||||
import moment from 'moment'
|
import moment from "moment";
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
OptType: null,
|
OptType: null,
|
||||||
Ip: '',
|
Ip: "",
|
||||||
LoginFaildName: '',
|
LoginFaildName: "",
|
||||||
BeginDate: '',
|
BeginDate: "",
|
||||||
EndDate: '',
|
EndDate: "",
|
||||||
Asc: false,
|
Asc: false,
|
||||||
SortField: 'CreateTime',
|
SortField: "CreateTime",
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20
|
PageSize: 20,
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination },
|
components: { Pagination },
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -178,53 +180,55 @@ export default {
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
loading: false,
|
loading: false,
|
||||||
datetimerange: []
|
datetimerange: [],
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
getUserLogList(this.searchData).then((res) => {
|
getUserLogList(this.searchData)
|
||||||
this.loading = false
|
.then((res) => {
|
||||||
this.list = res.Result.CurrentPageData
|
this.loading = false;
|
||||||
this.total = res.Result.TotalCount
|
this.list = res.Result.CurrentPageData;
|
||||||
}).catch(() => {
|
this.total = res.Result.TotalCount;
|
||||||
this.loading = false
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleDatetimeChange(val) {
|
handleDatetimeChange(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.searchData.BeginDate = val[0]
|
this.searchData.BeginDate = val[0];
|
||||||
this.searchData.EndDate = val[1]
|
this.searchData.EndDate = val[1];
|
||||||
} else {
|
} else {
|
||||||
this.searchData.BeginDate = ''
|
this.searchData.BeginDate = "";
|
||||||
this.searchData.EndDate = ''
|
this.searchData.EndDate = "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 重置列表查询
|
// 重置列表查询
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.searchData = searchDataDefault()
|
this.searchData = searchDataDefault();
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
// 排序
|
// 排序
|
||||||
handleSortByColumn(column) {
|
handleSortByColumn(column) {
|
||||||
if (column.order === 'ascending') {
|
if (column.order === "ascending") {
|
||||||
this.searchData.Asc = true
|
this.searchData.Asc = true;
|
||||||
} else {
|
} else {
|
||||||
this.searchData.Asc = false
|
this.searchData.Asc = false;
|
||||||
}
|
}
|
||||||
this.searchData.SortField = column.prop
|
this.searchData.SortField = column.prop;
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1;
|
||||||
this.getList()
|
this.getList();
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.log {
|
.log {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -249,5 +253,5 @@ export default {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,6 @@
|
||||||
@reset="handleReset"
|
@reset="handleReset"
|
||||||
@new="handleAddUser"
|
@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>
|
</div>
|
||||||
<base-table
|
<base-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
|
|
@ -68,9 +62,12 @@ const searchDataDefault = () => {
|
||||||
UserType: null,
|
UserType: null,
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
Asc: true,
|
Asc: false,
|
||||||
RealName: '',
|
RealName: '',
|
||||||
SortField: ''
|
BeginCreateTime: '',
|
||||||
|
EndCreateTime: '',
|
||||||
|
CreateTimeArr: [],
|
||||||
|
SortField: 'CreateTime'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -163,6 +160,13 @@ export default {
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
sortable: 'custom',
|
sortable: 'custom',
|
||||||
showOverflowTooltip: true },
|
showOverflowTooltip: true },
|
||||||
|
{
|
||||||
|
prop: "CreateTime",
|
||||||
|
label: this.$t("system:userlist:table:createTime"),
|
||||||
|
minWidth: 200,
|
||||||
|
sortable: "custom",
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
},
|
||||||
{ type: 'operate',
|
{ type: 'operate',
|
||||||
label: this.$t('common:action:action'),
|
label: this.$t('common:action:action'),
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
|
|
@ -193,6 +197,13 @@ export default {
|
||||||
width: '120px',
|
width: '120px',
|
||||||
placeholder: ''
|
placeholder: ''
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: "Input",
|
||||||
|
label: this.$t("system:userlist:label:EMail"),
|
||||||
|
prop: "EMail",
|
||||||
|
width: "120px",
|
||||||
|
placeholder: "",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'Input',
|
type: 'Input',
|
||||||
label: this.$t('system:userlist:label:Organization'),
|
label: this.$t('system:userlist:label:Organization'),
|
||||||
|
|
@ -247,7 +258,14 @@ export default {
|
||||||
options: [], // 下拉选项
|
options: [], // 下拉选项
|
||||||
props: { label: 'UserType', value: 'Id' }, // 下拉选项配置信息,必填
|
props: { label: 'UserType', value: 'Id' }, // 下拉选项配置信息,必填
|
||||||
placeholder: ''
|
placeholder: ''
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
type: "Daterange",
|
||||||
|
label: this.$t("system:userlist:label:CreateTime"),
|
||||||
|
prop: "CreateTimeArr",
|
||||||
|
width: "400px",
|
||||||
|
placeholder: "",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
searchHandle: [
|
searchHandle: [
|
||||||
{ label: this.$t('common:button:reset'), type: 'primary', emitKey: 'reset' },
|
{ label: this.$t('common:button:reset'), type: 'primary', emitKey: 'reset' },
|
||||||
|
|
@ -314,7 +332,14 @@ export default {
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.searchData = searchDataDefault()
|
this.searchData = searchDataDefault()
|
||||||
this.getList()
|
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>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,13 @@
|
||||||
<div class="trials-navbar" style="position: relative">
|
<div class="trials-navbar" style="position: relative">
|
||||||
<div class="leftMenu">
|
<div class="leftMenu">
|
||||||
<img v-if="language === 'zh'" src="@/assets/zzlogo2.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="">
|
<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) -->
|
<!-- 中心影像系统(EICS) -->
|
||||||
{{ $t('trials:trials:title:eics') }}
|
{{ $t('trials:trials:title:eics') }}
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -46,6 +51,12 @@
|
||||||
</span>
|
</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: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-menu-item index="4-3">{{ $t('trials:trials-myinfo:button:loginout') }}</el-menu-item>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
|
|
@ -68,7 +79,8 @@ export default {
|
||||||
isReviewer: false,
|
isReviewer: false,
|
||||||
userTypeShortName: zzSessionStorage.getItem('userTypeShortName'),
|
userTypeShortName: zzSessionStorage.getItem('userTypeShortName'),
|
||||||
notice: '',
|
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: {
|
computed: {
|
||||||
|
|
@ -108,6 +120,9 @@ export default {
|
||||||
case '4-3':
|
case '4-3':
|
||||||
this.logout()
|
this.logout()
|
||||||
break
|
break
|
||||||
|
case "4-4":
|
||||||
|
this.go("/system");
|
||||||
|
break;
|
||||||
case '1':
|
case '1':
|
||||||
this.go('/trials/trials-workbench')
|
this.go('/trials/trials-workbench')
|
||||||
break
|
break
|
||||||
|
|
|
||||||
|
|
@ -12,29 +12,61 @@
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<!-- 项目编号 -->
|
<!-- 项目编号 -->
|
||||||
<el-form-item v-if="trialForm.Id!== ''" :label="$t('trials:trials-list:form:trialId')">
|
<el-form-item
|
||||||
<el-input v-model="trialForm.TrialCode" disabled />
|
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>
|
||||||
<!-- 项目类型 -->
|
<!-- 项目类型 -->
|
||||||
<el-form-item :label="$t('trials:trials-list:form:trialType')" prop="TrialType">
|
<el-form-item
|
||||||
<el-radio-group v-model="trialForm.TrialType " :disabled="trialForm.Id!== ''">
|
:label="$t('trials:trials-list:form:trialType')"
|
||||||
<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>
|
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-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<!-- 试验名称 -->
|
<!-- 试验名称 -->
|
||||||
<el-form-item :label="$t('trials:trials-list:form:experimentName')" prop="ExperimentName">
|
<el-form-item
|
||||||
<el-input v-model="trialForm.ExperimentName" type="textarea" :autosize="{ minRows: 1, maxRows: 4}" />
|
: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>
|
||||||
<!-- 研究方案号 -->
|
<!-- 研究方案号 -->
|
||||||
<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-input v-model="trialForm.ResearchProgramNo" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
<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-input v-model="trialForm.MainResearchUnit" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 负责人PI -->
|
<!-- 负责人PI -->
|
||||||
|
|
@ -45,9 +77,18 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<!-- 申办方 -->
|
<!-- 申办方 -->
|
||||||
<el-form-item :label="$t('trials:trials-list:form:sponsor')">
|
<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
|
<el-option
|
||||||
v-for="(item) in sponsorList"
|
v-for="item in sponsorList"
|
||||||
:key="item.Id"
|
:key="item.Id"
|
||||||
:label="item.SponsorName"
|
:label="item.SponsorName"
|
||||||
:value="item.Id"
|
:value="item.Id"
|
||||||
|
|
@ -56,9 +97,16 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- CRO -->
|
<!-- CRO -->
|
||||||
<el-form-item :label="$t('trials:trials-list:form: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
|
<el-option
|
||||||
v-for="(item) of croList"
|
v-for="item of croList"
|
||||||
:key="item.Id"
|
:key="item.Id"
|
||||||
:label="item.CROName"
|
:label="item.CROName"
|
||||||
:value="item.Id"
|
:value="item.Id"
|
||||||
|
|
@ -68,7 +116,10 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<!-- DeclarationType -->
|
<!-- 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
|
<el-select
|
||||||
v-model="trialForm.DeclarationTypeEnumList"
|
v-model="trialForm.DeclarationTypeEnumList"
|
||||||
size="small"
|
size="small"
|
||||||
|
|
@ -77,7 +128,12 @@
|
||||||
@change="handleDeclarationTypeChange"
|
@change="handleDeclarationTypeChange"
|
||||||
style="width: 100%"
|
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-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- Phase -->
|
<!-- Phase -->
|
||||||
|
|
@ -100,8 +156,14 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<!-- 适应症类型 IndicationType -->
|
<!-- 适应症类型 IndicationType -->
|
||||||
<el-form-item :label="$t('trials:trials-list:form:indicationType')" prop="IndicationTypeId">
|
<el-form-item
|
||||||
<el-select v-model="trialForm.IndicationTypeId" @change="handleIndicationTypeChange">
|
:label="$t('trials:trials-list:form:indicationType')"
|
||||||
|
prop="IndicationTypeId"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="trialForm.IndicationTypeId"
|
||||||
|
@change="handleIndicationTypeChange"
|
||||||
|
>
|
||||||
<!-- <el-option
|
<!-- <el-option
|
||||||
v-for="item of dictionaryList.IndicationType"
|
v-for="item of dictionaryList.IndicationType"
|
||||||
:key="item.Id"
|
:key="item.Id"
|
||||||
|
|
@ -117,9 +179,16 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- Indication -->
|
<!-- 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-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
|
<el-option
|
||||||
v-for="item of $d.Indication"
|
v-for="item of $d.Indication"
|
||||||
v-show="indicationGrouping === item.raw.ChildGroup"
|
v-show="indicationGrouping === item.raw.ChildGroup"
|
||||||
|
|
@ -130,7 +199,11 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-row v-if="[37, 38, 39].includes(trialForm.IndicationEnum)">
|
<el-row v-if="[37, 38, 39].includes(trialForm.IndicationEnum)">
|
||||||
<el-col :span="12">
|
<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
|
<el-option
|
||||||
v-for="item of $d.Indication"
|
v-for="item of $d.Indication"
|
||||||
v-show="indicationGrouping === item.raw.ChildGroup"
|
v-show="indicationGrouping === item.raw.ChildGroup"
|
||||||
|
|
@ -141,7 +214,10 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<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-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -166,9 +242,12 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- Sites -->
|
<!-- Sites -->
|
||||||
<el-form-item :label="$t('trials:trials-list:form:siteCount')">
|
<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-form-item>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<!-- Expected Patients Num -->
|
<!-- Expected Patients Num -->
|
||||||
|
|
@ -193,14 +272,19 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<!-- Visits -->
|
<!-- Visits -->
|
||||||
<el-form-item :label="$t('trials:trials-list:form:visitCount')">
|
<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-form-item>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|
||||||
<!-- Expedited -->
|
<!-- 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-select v-model="trialForm.Expedited">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in expeditedOption"
|
v-for="item in expeditedOption"
|
||||||
|
|
@ -211,15 +295,21 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- Turnaround Time -->
|
<!-- 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-input v-model="trialForm.ProjectCycle" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|
||||||
<!-- Total Reviewers -->
|
<!-- Total Reviewers -->
|
||||||
<el-form-item :label="$t('trials:trials-list:form:totalReviewers')">
|
<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>
|
</el-form-item>
|
||||||
<!-- Type of Reviewers -->
|
<!-- Type of Reviewers -->
|
||||||
<el-form-item :label="$t('trials:trials-list:form:typeofReviewers')">
|
<el-form-item :label="$t('trials:trials-list:form:typeofReviewers')">
|
||||||
|
|
@ -229,106 +319,95 @@
|
||||||
multiple
|
multiple
|
||||||
clearable
|
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-select>
|
||||||
<!-- <el-row v-if="trialForm.AttendedReviewerTypeEnumList.includes(2)">-->
|
<!-- <el-row v-if="trialForm.AttendedReviewerTypeEnumList.includes(2)">-->
|
||||||
<!-- <el-col :span="12">-->
|
<!-- <el-col :span="12">-->
|
||||||
<!-- <el-select-->
|
<!-- <el-select-->
|
||||||
<!-- v-model="trialForm.AttendedReviewerTypeEnumList"-->
|
<!-- v-model="trialForm.AttendedReviewerTypeEnumList"-->
|
||||||
<!-- size="small"-->
|
<!-- size="small"-->
|
||||||
<!-- multiple-->
|
<!-- multiple-->
|
||||||
<!-- clearable-->
|
<!-- clearable-->
|
||||||
<!-- style="width: 100%"-->
|
<!-- style="width: 100%"-->
|
||||||
<!-- >-->
|
<!-- >-->
|
||||||
<!-- <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-select>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<!-- <el-col :span="12">-->
|
<!-- <el-col :span="12">-->
|
||||||
<!-- <el-input size="small" v-model="trialForm.AttendedReviewerTypeOther"/>-->
|
<!-- <el-input size="small" v-model="trialForm.AttendedReviewerTypeOther"/>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<!-- </el-row>-->
|
<!-- </el-row>-->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-left:190px">
|
<el-row style="margin-left: 190px">
|
||||||
<el-form-item label="">
|
<el-form-item label="">
|
||||||
<el-button type="primary" :disabled="btnLoading" @click="handleCancel">
|
<el-button type="primary" :disabled="btnLoading" @click="handleCancel">
|
||||||
{{ $t('trials:trials-list:form:cancel') }}
|
{{ $t("trials:trials-list:form:cancel") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" :loading="btnLoading" @click="handleSave">
|
<el-button type="primary" :loading="btnLoading" @click="handleSave">
|
||||||
{{ $t('trials:trials-list:form:save') }}
|
{{ $t("trials:trials-list:form:save") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import store from '@/store'
|
import { mapState } from "vuex";
|
||||||
import { mapGetters, mapState } from 'vuex'
|
import { getTrialInfo, addOrUpdateTrial } from "@/api/trials";
|
||||||
import { getTrialInfo, addOrUpdateTrial } from '@/api/trials'
|
import { getBasicDataSelects } from "@/api/dictionary/dictionary";
|
||||||
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
|
import { addOrUpdateSponsor, addOrUpdateCro } from "@/api/dictionary";
|
||||||
|
import { getAllSponsorList, getAllCROList } from "@/api/global";
|
||||||
export default {
|
export default {
|
||||||
name: 'TrialForm',
|
name: "TrialForm",
|
||||||
props: {
|
props: {
|
||||||
trialId: {
|
trialId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: "",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const comfirmIndication = (rule, value, callback) => {
|
const comfirmIndication = (rule, value, callback) => {
|
||||||
if ([37, 38, 39].includes(value)) {
|
if ([37, 38, 39].includes(value)) {
|
||||||
if (!this.trialForm.Indication) {
|
if (!this.trialForm.Indication) {
|
||||||
return callback(new Error(this.$t('common:ruleMessage:specify')))
|
return callback(new Error(this.$t("common:ruleMessage:specify")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
callback()
|
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()
|
|
||||||
// }
|
|
||||||
return {
|
return {
|
||||||
trialForm: {
|
trialForm: {
|
||||||
Id: '',
|
Id: "",
|
||||||
TrialCode: '',
|
TrialCode: "",
|
||||||
TrialType: null,
|
TrialType: null,
|
||||||
SponsorId: '',
|
SponsorId: "",
|
||||||
// CriterionIds: [],
|
// CriterionIds: [],
|
||||||
CROId: '',
|
CROId: "",
|
||||||
ReviewModeId: '',
|
ReviewModeId: "",
|
||||||
ReviewTypeIds: [],
|
ReviewTypeIds: [],
|
||||||
|
|
||||||
// 默认值0
|
// 默认值0
|
||||||
Expedited: '',
|
Expedited: "",
|
||||||
|
|
||||||
ModalityIds: [],
|
ModalityIds: [],
|
||||||
Note: '',
|
Note: "",
|
||||||
ExpectedPatients: '',
|
ExpectedPatients: "",
|
||||||
TimePointsPerPatient: '',
|
TimePointsPerPatient: "",
|
||||||
ProjectCycle: '',
|
ProjectCycle: "",
|
||||||
TotalReviewers: '',
|
TotalReviewers: "",
|
||||||
DeclarationTypeId: '',
|
DeclarationTypeId: "",
|
||||||
IndicationTypeId: '',
|
IndicationTypeId: "",
|
||||||
PhaseId: '',
|
PhaseId: "",
|
||||||
AttendedReviewerType: '',
|
AttendedReviewerType: "",
|
||||||
IsLocked: false,
|
IsLocked: false,
|
||||||
ResearchProgramNo: '',
|
ResearchProgramNo: "",
|
||||||
ExperimentName: '',
|
ExperimentName: "",
|
||||||
MainResearchUnit: '',
|
MainResearchUnit: "",
|
||||||
HeadPI: '',
|
HeadPI: "",
|
||||||
PlanSiteCount: null,
|
PlanSiteCount: null,
|
||||||
PlanVisitCount: null,
|
PlanVisitCount: null,
|
||||||
IndicationEnum: null,
|
IndicationEnum: null,
|
||||||
|
|
@ -336,48 +415,113 @@ export default {
|
||||||
AttendedReviewerTypeEnumList: [],
|
AttendedReviewerTypeEnumList: [],
|
||||||
DeclarationTypeEnumList: [],
|
DeclarationTypeEnumList: [],
|
||||||
DeclarationTypeOther: null,
|
DeclarationTypeOther: null,
|
||||||
AttendedReviewerTypeOther: null
|
AttendedReviewerTypeOther: null,
|
||||||
},
|
},
|
||||||
indicationGrouping: null,
|
indicationGrouping: null,
|
||||||
trialFormRules: {
|
trialFormRules: {
|
||||||
Code: [
|
TrialCode: [
|
||||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
{
|
||||||
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
required: true,
|
||||||
|
message: this.$t("common:ruleMessage:specify"),
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
{ max: 10, message: `${this.$t("common:ruleMessage:maxLength")} 10` },
|
||||||
],
|
],
|
||||||
TrialType: [
|
TrialType: [
|
||||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t("common:ruleMessage:specify"),
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
ResearchProgramNo: [
|
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: [
|
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: [
|
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: [
|
ReviewModeId: [
|
||||||
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t("common:ruleMessage:select"),
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
Expedited: [
|
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: [
|
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: [
|
DeclarationTypeEnumList: [
|
||||||
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t("common:ruleMessage:select"),
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
ReviewTypeIds: [
|
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,
|
btnLoading: false,
|
||||||
isLock: false,
|
isLock: false,
|
||||||
|
|
@ -386,132 +530,255 @@ export default {
|
||||||
declarationNum: null,
|
declarationNum: null,
|
||||||
indicationNum: null,
|
indicationNum: null,
|
||||||
phaseNum: null,
|
phaseNum: null,
|
||||||
dictionaryList: {}
|
dictionaryList: {},
|
||||||
}
|
|
||||||
|
sponsorList: [],
|
||||||
|
croList: [],
|
||||||
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['sponsorList', 'croList']),
|
...mapState("user", ["isTestUser"]),
|
||||||
...mapState('user', ['isTestUser'])
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initPage()
|
this.initPage();
|
||||||
console.log(this.isTestUser, 'isTestUser')
|
console.log(this.isTestUser, "isTestUser");
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 更新申办方与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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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() {
|
initForm() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
getTrialInfo(this.trialId).then(res => {
|
getTrialInfo(this.trialId)
|
||||||
this.loading = false
|
.then((res) => {
|
||||||
|
this.loading = false;
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
for (var item in this.trialForm) {
|
for (var item in this.trialForm) {
|
||||||
res.Result[item] === '00000000-0000-0000-0000-000000000000' ? '' : this.$set(this.trialForm, item, res.Result[item])
|
res.Result[item] === "00000000-0000-0000-0000-000000000000"
|
||||||
if (item === 'IndicationTypeId') {
|
? ""
|
||||||
this.indicationGrouping = this.$d.IndicationType.filter(v => v.id === res.Result[item])[0].raw.ChildGroup
|
: 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 })
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.trialForm.validate(valid => {
|
this.$refs.trialForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.btnLoading = true
|
this.btnLoading = true;
|
||||||
if (!this.trialForm.Id) {
|
if (!this.trialForm.Id) {
|
||||||
this.trialForm.TrialCode = `${this.declarationNum}${this.indicationNum}${this.phaseNum}`
|
this.trialForm.TrialCode = `${this.declarationNum}${this.indicationNum}${this.phaseNum}`;
|
||||||
console.log(this.trialForm.TrialCode)
|
console.log(this.trialForm.TrialCode);
|
||||||
}
|
}
|
||||||
var params = JSON.parse(JSON.stringify(this.trialForm))
|
var params = JSON.parse(JSON.stringify(this.trialForm));
|
||||||
console.log(params)
|
console.log(params);
|
||||||
addOrUpdateTrial(params).then(res => {
|
addOrUpdateTrial(params)
|
||||||
this.btnLoading = false
|
.then((res) => {
|
||||||
|
this.btnLoading = false;
|
||||||
if (!this.trialForm.Id) {
|
if (!this.trialForm.Id) {
|
||||||
this.trialForm.Id = res.Result
|
this.trialForm.Id = res.Result;
|
||||||
this.$message.success(this.$t('trials:trials-list:message:addedSuccessfully'))
|
this.$message.success(
|
||||||
|
this.$t("trials:trials-list:message:addedSuccessfully")
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
this.$message.success(this.$t('trials:trials-list:message:updatedSuccessfully'))
|
this.$message.success(
|
||||||
|
this.$t("trials:trials-list:message:updatedSuccessfully")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$emit('getList')
|
this.$emit("getList");
|
||||||
this.$emit('closeDialog')
|
this.$emit("closeDialog");
|
||||||
}).catch(() => {
|
|
||||||
this.btnLoading = false
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.btnLoading = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.$emit('closeDialog')
|
this.$emit("closeDialog");
|
||||||
// this.$refs['trialForm'].resetFields()
|
// this.$refs['trialForm'].resetFields()
|
||||||
},
|
},
|
||||||
handleDeclarationTypeChange(val) {
|
handleDeclarationTypeChange(val) {
|
||||||
console.log(val)
|
console.log(val);
|
||||||
if (val.length === 1) {
|
if (val.length === 1) {
|
||||||
// this.declarationNum = this.dictionaryList.DeclarationType.filter(item => item.Idd === val)[0].ShowOrder
|
// 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) {
|
if (this.trialForm.Id) {
|
||||||
const ids = [...this.trialForm.TrialCode]
|
const ids = [...this.trialForm.TrialCode];
|
||||||
ids[2] = this.declarationNum
|
ids[2] = this.declarationNum;
|
||||||
this.trialForm.TrialCode = ids.join('')
|
this.trialForm.TrialCode = ids.join("");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.declarationNum = 'X'
|
this.declarationNum = "X";
|
||||||
if (this.trialForm.Id) {
|
if (this.trialForm.Id) {
|
||||||
const ids = [...this.trialForm.TrialCode]
|
const ids = [...this.trialForm.TrialCode];
|
||||||
ids[2] = this.declarationNum
|
ids[2] = this.declarationNum;
|
||||||
this.trialForm.TrialCode = ids.join('')
|
this.trialForm.TrialCode = ids.join("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleIndicationTypeChange(val) {
|
handleIndicationTypeChange(val) {
|
||||||
this.indicationGrouping = null
|
this.indicationGrouping = null;
|
||||||
if (val) {
|
if (val) {
|
||||||
// this.indicationNum = this.dictionaryList.IndicationType.filter(item => item.Id === val)[0].ShowOrder
|
// 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) {
|
if (this.trialForm.Id) {
|
||||||
const ids = [...this.trialForm.TrialCode]
|
const ids = [...this.trialForm.TrialCode];
|
||||||
ids[3] = this.indicationNum
|
ids[3] = this.indicationNum;
|
||||||
this.trialForm.TrialCode = ids.join('')
|
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) {
|
handlePhaseChange(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
// const phase = this.dictionaryList['Trial_Phase']
|
// const phase = this.dictionaryList['Trial_Phase']
|
||||||
// this.phaseNum = phase.filter(item => item.Id === val)[0].ShowOrder
|
// 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) {
|
if (this.trialForm.Id) {
|
||||||
const ids = [...this.trialForm.TrialCode]
|
const ids = [...this.trialForm.TrialCode];
|
||||||
ids[4] = this.phaseNum
|
ids[4] = this.phaseNum;
|
||||||
this.trialForm.TrialCode = ids.join('')
|
this.trialForm.TrialCode = ids.join("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleExpectedPatientsChange(val) {
|
handleExpectedPatientsChange(val) {
|
||||||
this.trialForm.PlanVisitCount = val * this.trialForm.TimePointsPerPatient
|
this.trialForm.PlanVisitCount = val * this.trialForm.TimePointsPerPatient;
|
||||||
},
|
},
|
||||||
handleTpPerPatientChange(val) {
|
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() {
|
async initPage() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
await this.getDicData()
|
await this.getDicData();
|
||||||
await store.dispatch('global/getSponsorList')
|
await this.getAllSponsorList();
|
||||||
await store.dispatch('global/getCROList')
|
await this.getAllCROList();
|
||||||
if (this.trialId) {
|
if (this.trialId) {
|
||||||
this.trialForm.Id = this.trialId
|
this.trialForm.Id = this.trialId;
|
||||||
this.initForm()
|
this.initForm();
|
||||||
}
|
}
|
||||||
this.loading = false
|
this.loading = false;
|
||||||
},
|
},
|
||||||
getDicData() {
|
getDicData() {
|
||||||
getBasicDataSelects(['DeclarationType', 'IndicationType', 'Modality', 'ReviewMode', 'ReviewType', 'Trial_Phase']).then(res => {
|
getBasicDataSelects([
|
||||||
this.dictionaryList = { ...res.Result }
|
"DeclarationType",
|
||||||
})
|
"IndicationType",
|
||||||
}
|
"Modality",
|
||||||
}
|
"ReviewMode",
|
||||||
}
|
"ReviewType",
|
||||||
|
"Trial_Phase",
|
||||||
|
]).then((res) => {
|
||||||
|
this.dictionaryList = { ...res.Result };
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.trial-Form .el-input,
|
.trial-Form .el-input,
|
||||||
|
|
@ -521,7 +788,7 @@ export default {
|
||||||
.trial-Form .el-textarea {
|
.trial-Form .el-textarea {
|
||||||
width: 340px;
|
width: 340px;
|
||||||
}
|
}
|
||||||
.trial-Form .el-col .el-input{
|
.trial-Form .el-col .el-input {
|
||||||
width: 165px;
|
width: 165px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -1,390 +1,187 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="trial-myinfo">
|
<div class="trial-myinfo">
|
||||||
<div class="trial-myinfo-left">
|
<el-menu
|
||||||
<div class="trial-myinfo-left-top">
|
:default-active="activeIndex"
|
||||||
<div class="trial-myinfo-head">
|
@select="handleSelect"
|
||||||
<!-- 个人头像 -->
|
class="el-menu-demo"
|
||||||
{{ $t('trials:trials-myinfo:title:avater') }}
|
style="width: 200px"
|
||||||
</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-menu-item index="1">{{
|
||||||
</el-button>
|
$t("trials:trials-myinfo:menuTitle:mine")
|
||||||
</div>
|
}}</el-menu-item>
|
||||||
</div>
|
<el-menu-item index="2">{{
|
||||||
<div class="trial-myinfo-right">
|
$t("trials:trials-myinfo:menuTitle:account")
|
||||||
<div class="trial-myinfo-right-box">
|
}}</el-menu-item>
|
||||||
<div class="trial-myinfo-head">
|
<el-menu-item index="3">{{
|
||||||
<!-- 账号信息 -->
|
$t("trials:trials-myinfo:menuTitle:loginLog")
|
||||||
{{ $t('trials:trials-myinfo:title:accountInfo') }}
|
}}</el-menu-item>
|
||||||
</div>
|
</el-menu>
|
||||||
<el-form label-position="right" label-width="180px">
|
<div class="contentBox">
|
||||||
<!-- 用户名 -->
|
<mine
|
||||||
<el-form-item :label="$t('trials:trials-myinfo:form:userName')" style="margin-bottom: 5px;" prop="UserName">
|
:user="user"
|
||||||
<span>{{ user.UserName }}</span>
|
:userTypeOptions="userTypeOptions"
|
||||||
</el-form-item>
|
v-if="activeIndex === '1'"
|
||||||
<el-form-item label="" style="position: relative" prop="UserName">
|
@getUserInfo="getUserInfo"
|
||||||
<el-input v-model="userForm.UserName" :placeholder="$t('trials:trials-myinfo:form:userName')"/>
|
/>
|
||||||
<!-- 修改 -->
|
<account
|
||||||
<el-button :disabled="!userForm.UserName" class="saveBtn" type="primary" size="small" @click="setNewUserName">
|
:user="user"
|
||||||
{{ $t('trials:trials-myinfo:button:update') }}
|
@getUserInfo="getUserInfo"
|
||||||
</el-button>
|
:IsCanConnectInternet="IsCanConnectInternet"
|
||||||
</el-form-item>
|
v-if="activeIndex === '2'"
|
||||||
<!-- 电话 -->
|
/>
|
||||||
<el-form-item :label="$t('trials:trials-myinfo:form:phone')" style="margin-bottom: 5px;" prop="UserName">
|
<login-log v-if="activeIndex === '3'" :id="userId" :isMine="true" />
|
||||||
<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>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getUserTypeList, getUser, updateUser, modifyPassword } from '@/api/admin.js'
|
import mine from "./mine.vue";
|
||||||
import { sendVerificationCode, setNewEmail, setNewPhone, setNewUserName } from '@/api/system/user.js'
|
import account from "./account.vue";
|
||||||
import md5 from 'js-md5'
|
import loginLog from "@/views/trials/trials-panel/trial-summary/login-log";
|
||||||
var timer = ''
|
import { getUserTypeList, getUser } from "@/api/admin.js";
|
||||||
var countdown = 60
|
import store from "@/store";
|
||||||
import store from '@/store'
|
import { mapGetters } from "vuex";
|
||||||
import {mapGetters, mapMutations} from 'vuex'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
name: "TrialsMyinfo",
|
||||||
name: 'TrialsMyinfo',
|
components: { mine, account, "login-log": loginLog },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
activeIndex: "1",
|
||||||
|
|
||||||
userTypeOptions: [],
|
userTypeOptions: [],
|
||||||
user: {},
|
user: {},
|
||||||
password: {},
|
IsCanConnectInternet: true, // 是否可以链接互联网
|
||||||
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
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['userId', 'name'])
|
...mapGetters(["userId", "userName"]),
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getUserInfo()
|
this.getUserInfo();
|
||||||
this.getUserTypeList()
|
this.getUserTypeList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
handleSelect(index) {
|
||||||
handleSave() {
|
this.activeIndex = index;
|
||||||
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()
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
const loading = this.$loading({
|
const loading = this.$loading({
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
lock: true,
|
lock: true,
|
||||||
text: 'Loading',
|
text: "Loading",
|
||||||
spinner: 'el-icon-loading',
|
spinner: "el-icon-loading",
|
||||||
background: 'rgba(0, 0, 0, 0.07)'
|
background: "rgba(0, 0, 0, 0.07)",
|
||||||
})
|
});
|
||||||
getUser(this.userId).then(async res => {
|
getUser(this.userId)
|
||||||
this.user = res.Result
|
.then(async (res) => {
|
||||||
|
this.user = res.Result;
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
zzSessionStorage.setItem('realName', this.user.RealName)
|
zzSessionStorage.setItem("realName", this.user.RealName);
|
||||||
await store.dispatch('user/updateInfo')
|
await store.dispatch("user/updateInfo");
|
||||||
loading.close()
|
loading.close();
|
||||||
}).catch(() => { loading.close() })
|
})
|
||||||
},
|
.catch(() => {
|
||||||
settime(obj) {
|
loading.close();
|
||||||
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)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getUserTypeList() {
|
getUserTypeList() {
|
||||||
getUserTypeList().then(res => {
|
getUserTypeList().then((res) => {
|
||||||
if (res.IsSuccess) {
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.trial-myinfo{
|
.trial-myinfo {
|
||||||
flex: 1;overflow: auto;display: flex;flex-direction: row;justify-content: space-around;
|
flex: 1;
|
||||||
.trial-myinfo-head{
|
|
||||||
position: absolute;top: 40px;left: -10%;font-size: 14px;
|
|
||||||
}
|
|
||||||
.trial-myinfo-left{
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background: #fff;width: calc(50% - 9px);margin: 6px 0;
|
display: flex;
|
||||||
padding-bottom: 50px;
|
flex-direction: row;
|
||||||
.trial-myinfo-left-top{
|
justify-content: space-around;
|
||||||
width: 70%;padding-top: 100px;position: relative;margin: 0 auto;margin-bottom: 10px;
|
.contentBox {
|
||||||
}
|
width: calc(100% - 220px);
|
||||||
}
|
background-color: #fff;
|
||||||
.trial-myinfo-body{
|
padding: 0 20px;
|
||||||
width:160px;height:160px;border-radius: 50%;background: #428bca;display: flex;justify-content: center;align-items: center;
|
height: 100%;
|
||||||
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;
|
overflow: auto;
|
||||||
background: #fff;width: calc(50% - 9px);margin: 6px 0;
|
// padding-bottom: 50px;
|
||||||
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.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 {
|
.sendCode {
|
||||||
position: absolute;right: -10px;top: 50%;transform: translate(100%, -50%);
|
position: absolute;
|
||||||
}
|
right: -10px;
|
||||||
.trial-myinfo-right-box{
|
top: 50%;
|
||||||
width: 70%;padding-top: 100px;position: relative;margin: 0 auto;
|
transform: translate(100%, -50%);
|
||||||
}
|
}
|
||||||
|
.trial-myinfo-right-box {
|
||||||
|
width: 40%;
|
||||||
|
padding-top: 100px;
|
||||||
|
position: relative;
|
||||||
|
// margin: 0 auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
}
|
||||||
<style scoped>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -47,6 +47,7 @@
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item of userTypeOptions"
|
v-for="item of userTypeOptions"
|
||||||
|
v-show="item.UserTypeEnum !== 26 && item.UserTypeEnum !== 27"
|
||||||
:key="item.Id"
|
:key="item.Id"
|
||||||
:label="item.UserTypeShortName"
|
:label="item.UserTypeShortName"
|
||||||
:value="item.Id"
|
:value="item.Id"
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,15 @@
|
||||||
<BaseContainer>
|
<BaseContainer>
|
||||||
<template slot="search-container">
|
<template slot="search-container">
|
||||||
<el-form :inline="true">
|
<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 -->
|
<!-- Modality -->
|
||||||
<el-form-item :label="$t('trials:seletctedReviews:form:modality')">
|
<el-form-item :label="$t('trials:seletctedReviews:form:modality')">
|
||||||
<el-select
|
<el-select
|
||||||
|
|
@ -144,14 +153,14 @@
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
width="120"
|
width="120"
|
||||||
/>
|
/>
|
||||||
<!-- ID -->
|
|
||||||
<!-- <el-table-column-->
|
<el-table-column
|
||||||
<!-- prop="ReviewerCode"-->
|
prop="DoctorUserName"
|
||||||
<!-- :label="$t('trials:seletctedReviews:table:id')"-->
|
:label="$t('trials:seletctedReviews:table:doctorUserName')"
|
||||||
<!-- show-overflow-tooltip-->
|
show-overflow-tooltip
|
||||||
<!-- sortable="custom"-->
|
sortable="custom"
|
||||||
<!-- width="120"-->
|
width="120"
|
||||||
<!-- />-->
|
/>
|
||||||
<!-- Status -->
|
<!-- Status -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="DoctorTrialState"
|
prop="DoctorTrialState"
|
||||||
|
|
@ -266,6 +275,7 @@ import { getSelectionReviewerList, selectReviewers } from '@/api/trials'
|
||||||
const getListQueryDefault = () => {
|
const getListQueryDefault = () => {
|
||||||
return {
|
return {
|
||||||
TrialId: '',
|
TrialId: '',
|
||||||
|
Name:'',
|
||||||
ReadingTypeIds: [],
|
ReadingTypeIds: [],
|
||||||
SubspecialityIds: [],
|
SubspecialityIds: [],
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,11 @@ export default {
|
||||||
this.getList()
|
this.getList()
|
||||||
// 保存成功
|
// 保存成功
|
||||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
|
if(res.Result.IsHaveSPMOrCPM){
|
||||||
this.$emit('nextStep', 'approval')
|
this.$emit('nextStep', 'approval')
|
||||||
|
}else{
|
||||||
|
this.$emit('nextStep', 'confirmation')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|
|
||||||
|
|
@ -11,28 +11,37 @@
|
||||||
<label class="el-label">{{ $t('trials:trials-list:form:indication:') }}</label>
|
<label class="el-label">{{ $t('trials:trials-list:form:indication:') }}</label>
|
||||||
<span>{{$fd('Indication', trialInfo.IndicationEnum)}}{{trialInfo.Indication ? '-' + trialInfo.Indication : '' }}</span>
|
<span>{{$fd('Indication', trialInfo.IndicationEnum)}}{{trialInfo.Indication ? '-' + trialInfo.Indication : '' }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="div-col">
|
<div class="div-col">
|
||||||
<label class="el-label">{{ $t('trials:trials-list:form:criterion:') }}</label>
|
<label class="el-label">{{ $t('trials:trials-list:form:declarationType:') }}</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>
|
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
class="item"
|
class="item"
|
||||||
:content="trialInfo.Modalitys"
|
:content="trialInfo.DeclarationTypeEnumList.map(v => $fd('DeclarationType', v)).join(', ')"
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
<span>{{ trialInfo.Modalitys }}</span>
|
<span>{{ trialInfo.DeclarationTypeEnumList.map(v => $fd('DeclarationType', v)).join(', ') }}</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</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>
|
||||||
<div class="div-row">
|
<div class="div-row">
|
||||||
<!-- <div class="div-col">-->
|
<div class="div-col">
|
||||||
<!-- <label class="el-label">{{ $t('trials:trials-list:form:reviewMode') }}:</label>-->
|
<label class="el-label">{{ $t('trials:trials-list:form:expedited:') }}</label>
|
||||||
<!-- <!– <span>{{ trialInfo.ReadingType }}</span> –>-->
|
<span>{{$fd('YesOrNoForInt', trialInfo.Expedited)}}</span>
|
||||||
<!-- <span>{{ $fd('ReadingMethod', trialInfo.ReadingType) }}</span>-->
|
</div>
|
||||||
<!-- </div>-->
|
|
||||||
<div class="div-col">
|
<div class="div-col">
|
||||||
<label class="el-label">{{ $t('trials:trials-list:form:totalReviewers:') }}</label>
|
<label class="el-label">{{ $t('trials:trials-list:form:totalReviewers:') }}</label>
|
||||||
<span>{{ trialInfo.TotalReviewers }}</span>
|
<span>{{ trialInfo.TotalReviewers }}</span>
|
||||||
|
|
@ -40,7 +49,6 @@
|
||||||
<div class="div-col">
|
<div class="div-col">
|
||||||
<label class="el-label">{{ $t('trials:trials-list:form:typeofReviewers:') }}</label>
|
<label class="el-label">{{ $t('trials:trials-list:form:typeofReviewers:') }}</label>
|
||||||
<span>{{ trialInfo.AttendedReviewerTypeEnumList.map(v => $fd('AttendedReviewerType', v)).join(', ') }}</span>
|
<span>{{ trialInfo.AttendedReviewerTypeEnumList.map(v => $fd('AttendedReviewerType', v)).join(', ') }}</span>
|
||||||
<!-- <span>{{ $fd('AttendedReviewerType', trialInfo.AttendedReviewerType) }}</span>-->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="div-col">
|
<div class="div-col">
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -139,7 +147,10 @@ export default {
|
||||||
this.activeStatus = step
|
this.activeStatus = step
|
||||||
},
|
},
|
||||||
nextStep(stepName) {
|
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.TrialMaxState = this.activeStatus
|
||||||
this.$nextTick(
|
this.$nextTick(
|
||||||
function() {
|
function() {
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,12 @@
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
<!-- 中心编号 -->
|
<!-- 中心编号 -->
|
||||||
<el-form-item :label="$t('trials:researchStaff:table:siteId')">
|
<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
|
<el-option
|
||||||
v-for="(item,index) of siteOptions"
|
v-for="(item,index) of siteOptions"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.TrialSiteCode"
|
:label="item.TrialSiteCode"
|
||||||
:value="item.SiteId"
|
:value="item.TrialSiteId"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -260,7 +260,7 @@ const searchDataDefault = () => {
|
||||||
Asc: true,
|
Asc: true,
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
SiteId: '',
|
TrialSiteId: '',
|
||||||
UserTypeId: '',
|
UserTypeId: '',
|
||||||
IsGenerateAccount: null,
|
IsGenerateAccount: null,
|
||||||
TrialRoleCode: '',
|
TrialRoleCode: '',
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,12 @@
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
<!-- 中心 -->
|
<!-- 中心 -->
|
||||||
<el-form-item :label="$t('trials:researchRecord:table:siteId')">
|
<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
|
<el-option
|
||||||
v-for="(item,index) of siteOptions"
|
v-for="(item,index) of siteOptions"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.TrialSiteCode"
|
:label="item.TrialSiteCode"
|
||||||
:value="item.SiteId"
|
:value="item.TrialSiteId"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -301,7 +301,7 @@ const searchDataDefault = () => {
|
||||||
Asc: true,
|
Asc: true,
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
SiteId: '',
|
TrialSiteId: '',
|
||||||
UserKeyInfo: '',
|
UserKeyInfo: '',
|
||||||
State: null,
|
State: null,
|
||||||
IsDeleted: '',
|
IsDeleted: '',
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div v-loading="loading" class="preview-wrapper">
|
<div v-loading="loading" class="preview-wrapper">
|
||||||
<div class="left-wrapper">
|
<div class="left-wrapper">
|
||||||
<div class="basic-info">
|
<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>
|
<span v-if="otherInfo.ReadingNameOrTaskBlindName">({{ `${otherInfo.ReadingNameOrTaskBlindName}` }})</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="cdList.length>0" class="basic-content">
|
<div v-if="cdList.length>0" class="basic-content">
|
||||||
|
|
@ -196,6 +196,10 @@ export default {
|
||||||
visitTaskId: {
|
visitTaskId: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
|
},
|
||||||
|
isReadingShowSubjectInfo: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,14 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
<template>
|
<template>
|
||||||
<BaseContainer>
|
<BaseContainer class="consistency-analysis-wrapper">
|
||||||
<template slot="search-container">
|
<template slot="search-container">
|
||||||
<el-form :inline="true">
|
<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-form-item :label="$t('trials:consistencyCheck:table:siteId')">
|
||||||
<!-- 中心编号 -->
|
<!-- 中心编号 -->
|
||||||
<el-select v-model="searchData.TrialSiteCode" clearable filterable style="width:120px;">
|
<el-select v-model="searchData.TrialSiteCode" clearable filterable style="width:120px;">
|
||||||
|
|
@ -26,10 +32,10 @@
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 角色 -->
|
<!-- 任务类型 -->
|
||||||
<el-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:role')">
|
<el-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:taskType')">
|
||||||
<el-select v-model="searchData.ArmEnum" clearable style="width:120px;">
|
<el-select v-model="searchData.ReadingCategory" clearable style="width:120px;">
|
||||||
<el-option v-for="item of $d.ArmEnum" :key="'ArmEnum' + item.label" :value="item.value" :label="item.label" />
|
<el-option v-for="item of $d.ReadingCategory" :key="'ReadingCategory' + item.label" :value="item.value" :label="item.label" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 阅片人 -->
|
<!-- 阅片人 -->
|
||||||
|
|
@ -38,36 +44,39 @@
|
||||||
<el-option v-for="item of DoctorUserList" :key="'DoctorUserId' + item.DoctorUserId" :value="item.DoctorUserId" :label="`${item.UserName}(${item.FullName})`" />
|
<el-option v-for="item of DoctorUserList" :key="'DoctorUserId' + item.DoctorUserId" :value="item.DoctorUserId" :label="`${item.UserName}(${item.FullName})`" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:criterionName')">
|
||||||
<el-select v-model="searchData.TrialReadingCriterionId" clearable style="width:120px;">
|
<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-option v-for="item of trialCriterionList" :key="'TrialReadingCriterionId' + item.TrialReadingCriterionId" :value="item.TrialReadingCriterionId" :label="item.TrialReadingCriterionName" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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-select>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- 任务状态 -->
|
|
||||||
<el-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:taskStatus')">
|
|
||||||
<el-select v-model="searchData.TaskState" clearable style="width:120px;">
|
|
||||||
<el-option v-for="item of $d.TaskState" :key="'TaskState' + item.label" :value="item.value" :label="item.label" />
|
|
||||||
</el-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-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:category')">
|
||||||
<el-select v-model="searchData.IsSelfAnalysis" clearable style="width:120px;">
|
<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-option v-for="item of $d.IsSelfAnalysis" :key="'IsSelfAnalysis' + item.label" :value="item.value" :label="item.label" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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>
|
||||||
|
<!-- 任务状态 -->
|
||||||
|
<el-form-item style="margin-bottom:10px" :label="$t('trials:consistencyAnalysis:table:taskStatus')">
|
||||||
|
<el-select v-model="searchData.TaskState" clearable style="width:120px;">
|
||||||
|
<el-option v-for="item of $d.TaskState" :key="'TaskState' + item.label" :value="item.value" :label="item.label" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
<!-- 分配状态 -->
|
<!-- 分配状态 -->
|
||||||
<!-- <el-form-item style="margin-bottom:10px" label="分配状态">
|
<!-- <el-form-item style="margin-bottom:10px" label="分配状态">
|
||||||
<el-select v-model="searchData.TaskAllocationState" clearable style="width:120px;">
|
<el-select v-model="searchData.TaskAllocationState" clearable style="width:120px;">
|
||||||
|
|
@ -84,6 +93,16 @@
|
||||||
@change="changeTimeList"
|
@change="changeTimeList"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</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-form-item style="margin-bottom:10px">
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||||
{{ $t('common:button:search') }}
|
{{ $t('common:button:search') }}
|
||||||
|
|
@ -138,14 +157,6 @@
|
||||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
|
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 任务编号 -->
|
|
||||||
<el-table-column
|
|
||||||
prop="TaskCode"
|
|
||||||
:label="$t('trials:consistencyAnalysis:table:taskCode')"
|
|
||||||
width="120"
|
|
||||||
sortable="custom"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/>
|
|
||||||
<!-- 中心编号 -->
|
<!-- 中心编号 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="TrialSiteCode"
|
prop="TrialSiteCode"
|
||||||
|
|
@ -163,13 +174,24 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<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">
|
<span v-if="scope.row.IsReReadingOrBackInfluenceAnalysis" class="status-primary-circle">
|
||||||
<!-- 影 -->
|
<!-- 影 -->
|
||||||
{{$t('trials:consistencyAnalysis:table:impact')}}
|
{{$t('trials:consistencyAnalysis:table:impact')}}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<!-- 任务编号 -->
|
||||||
|
<!-- <el-table-column
|
||||||
|
prop="TaskCode"
|
||||||
|
:label="$t('trials:consistencyAnalysis:table:taskCode')"
|
||||||
|
width="120"
|
||||||
|
sortable="custom"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/> -->
|
||||||
<!-- 任务名称 -->
|
<!-- 任务名称 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="VisitTaskNum"
|
prop="VisitTaskNum"
|
||||||
|
|
@ -179,17 +201,20 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 盲态任务标识 -->
|
<!-- 盲态任务标识 -->
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
prop="TaskBlindName"
|
prop="TaskBlindName"
|
||||||
:label="$t('trials:consistencyAnalysis:table:taskBlindName')"
|
:label="$t('trials:consistencyAnalysis:table:taskBlindName')"
|
||||||
width="160"
|
width="160"
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/> -->
|
||||||
<!-- 任务类型 -->
|
<!-- 任务类型 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="ReadingCategory"
|
prop="ReadingCategory"
|
||||||
|
|
@ -205,17 +230,16 @@
|
||||||
<el-tag v-if="scope.row.ReadingCategory === 5" type="warning">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
|
<el-tag v-if="scope.row.ReadingCategory === 5" type="warning">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 一致性分析类别 -->
|
<!-- 阅片人 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="IsSelfAnalysis"
|
prop="UserName"
|
||||||
:label="$t('trials:consistencyAnalysis:table:category')"
|
:label="$t('trials:consistencyAnalysis:table:reader')"
|
||||||
width="160"
|
width="120"
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.IsSelfAnalysis" type="primary">{{ $fd('IsSelfAnalysis', scope.row.IsSelfAnalysis) }}</el-tag>
|
{{scope.row.UserName}}({{scope.row.FullName}})
|
||||||
<el-tag v-else type="warning">{{ $fd('IsSelfAnalysis', scope.row.IsSelfAnalysis) }}</el-tag>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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>
|
<el-tag v-if="scope.row.ArmEnum === 8" style="border-color: #4c2791;color:#4c2791;">{{$fd('ArmEnum', scope.row.ArmEnum)}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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
|
<el-table-column
|
||||||
prop="TrialReadingCriterionName"
|
prop="TrialReadingCriterionName"
|
||||||
|
|
@ -255,6 +267,59 @@
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
show-overflow-tooltip
|
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
|
<el-table-column
|
||||||
prop="TaskState"
|
prop="TaskState"
|
||||||
|
|
@ -271,46 +336,8 @@
|
||||||
<el-tag v-if="scope.row.TaskState === 5" type="danger">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
|
<el-tag v-if="scope.row.TaskState === 5" type="danger">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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"
|
prop="ReReadingApplyState"
|
||||||
:label="$t('trials:consistencyAnalysis:table:applyStatus')"
|
:label="$t('trials:consistencyAnalysis:table:applyStatus')"
|
||||||
width="180"
|
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 === 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>
|
<el-tag v-if="scope.row.ReReadingApplyState === 3" type="warning">{{ $fd('ReReadingApplyState', scope.row.ReReadingApplyState) }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<!-- 是否受到退回影响 -->
|
<!-- 是否受到退回影响 -->
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
prop="IsReReadingOrBackInfluenceAnalysis"
|
prop="IsReReadingOrBackInfluenceAnalysis"
|
||||||
:label="$t('trials:consistencyAnalysis:table:impactInfluence')"
|
:label="$t('trials:consistencyAnalysis:table:impactInfluence')"
|
||||||
width="160"
|
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="danger">{{ $fd('YesOrNo', scope.row.IsReReadingOrBackInfluenceAnalysis) }}</el-tag>
|
||||||
<el-tag v-if="scope.row.IsReReadingOrBackInfluenceAnalysis" type="primary">{{ $fd('YesOrNo', scope.row.IsReReadingOrBackInfluenceAnalysis) }}</el-tag>
|
<el-tag v-if="scope.row.IsReReadingOrBackInfluenceAnalysis" type="primary">{{ $fd('YesOrNo', scope.row.IsReReadingOrBackInfluenceAnalysis) }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
fixed="right"
|
fixed="right"
|
||||||
:label="$t('common:action:action')"
|
:label="$t('common:action:action')"
|
||||||
|
|
@ -385,7 +412,7 @@
|
||||||
{{$t('trials:consistencyAnalysis:table:impact')}}
|
{{$t('trials:consistencyAnalysis:table:impact')}}
|
||||||
</span>
|
</span>
|
||||||
<!-- 受到退回影响 -->
|
<!-- 受到退回影响 -->
|
||||||
<span> {{$t('trials:consistencyAnalysis:title:impactInfluence')}}</span>
|
<span>: {{$t('trials:consistencyAnalysis:title:impactInfluence')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- 自身一致性分析 -->
|
<!-- 自身一致性分析 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
|
|
@ -662,7 +689,7 @@ const searchDataDefault = () => {
|
||||||
Asc: true,
|
Asc: true,
|
||||||
SortField: '',
|
SortField: '',
|
||||||
TrialId: null,
|
TrialId: null,
|
||||||
SiteId: null,
|
TrialSiteId: null,
|
||||||
SubjectId: null,
|
SubjectId: null,
|
||||||
SubjectCode: null,
|
SubjectCode: null,
|
||||||
TrialSiteCode: null,
|
TrialSiteCode: null,
|
||||||
|
|
@ -674,7 +701,9 @@ const searchDataDefault = () => {
|
||||||
TaskAllocationState: null,
|
TaskAllocationState: null,
|
||||||
BeginAllocateDate: null,
|
BeginAllocateDate: null,
|
||||||
EndAllocateDate: null,
|
EndAllocateDate: null,
|
||||||
TrialReadingCriterionId: null
|
TrialReadingCriterionId: null,
|
||||||
|
BeginSignTime: null,
|
||||||
|
EndSignTime: null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -707,6 +736,7 @@ export default {
|
||||||
ReaderRulesFormVisible: false,
|
ReaderRulesFormVisible: false,
|
||||||
IsSelfAnalysis: true,
|
IsSelfAnalysis: true,
|
||||||
timeList: [],
|
timeList: [],
|
||||||
|
timeList2: [],
|
||||||
ApplyforReasonVisible: false,
|
ApplyforReasonVisible: false,
|
||||||
ApplyforReasonForm: {
|
ApplyforReasonForm: {
|
||||||
Type: null,
|
Type: null,
|
||||||
|
|
@ -790,9 +820,18 @@ export default {
|
||||||
this.searchData.EndAllocateDate = null
|
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) {
|
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() {
|
applyReReading() {
|
||||||
|
|
@ -981,6 +1020,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.timeList = null
|
this.timeList = null
|
||||||
|
this.timeList2 = null
|
||||||
this.searchData = searchDataDefault()
|
this.searchData = searchDataDefault()
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
@ -1004,12 +1044,17 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.remark{
|
.consistency-analysis-wrapper{
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
.remark{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 5px;
|
left: 5px;
|
||||||
bottom: 7px;
|
bottom: 7px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-primary-circle{
|
.status-primary-circle{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width:20px;
|
width:20px;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- 切换访视 -->
|
<!-- 切换访视 -->
|
||||||
<div
|
<div
|
||||||
v-if="stack.imageRendered && isReadingTaskViewInOrder"
|
v-if="stack.imageRendered && isReadingTaskViewInOrder === 1"
|
||||||
class="info-visit"
|
class="info-visit"
|
||||||
@dblclick.stop="preventDefault($event)"
|
@dblclick.stop="preventDefault($event)"
|
||||||
>
|
>
|
||||||
|
|
@ -181,7 +181,7 @@ export default {
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
isReadingTaskViewInOrder: {
|
isReadingTaskViewInOrder: {
|
||||||
type: Boolean,
|
type: Number,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
customWwcTpl: {
|
customWwcTpl: {
|
||||||
|
|
@ -333,7 +333,8 @@ export default {
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(cornerstoneTools)
|
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', () => {
|
document.addEventListener('mouseup', () => {
|
||||||
this.sliderMouseup()
|
this.sliderMouseup()
|
||||||
})
|
})
|
||||||
|
|
@ -477,7 +478,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goViewer(e) {
|
goViewer(e) {
|
||||||
console.log(this.$refs['sliderBox'].clientHeight)
|
// console.log(this.$refs['sliderBox'].clientHeight)
|
||||||
var height = e.offsetY * 100 / this.$refs['sliderBox'].clientHeight
|
var height = e.offsetY * 100 / this.$refs['sliderBox'].clientHeight
|
||||||
this.height = height
|
this.height = height
|
||||||
var index = Math.trunc(this.stack.imageIds.length * this.height / 100)
|
var index = Math.trunc(this.stack.imageIds.length * this.height / 100)
|
||||||
|
|
@ -546,7 +547,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
mouseUp(e) {
|
mouseUp(e) {
|
||||||
console.log('mouseUp')
|
// console.log('mouseUp')
|
||||||
if (this.readingTaskState >= 2) return
|
if (this.readingTaskState >= 2) return
|
||||||
this.image = e.detail.image
|
this.image = e.detail.image
|
||||||
this.getToolStateInfo(e)
|
this.getToolStateInfo(e)
|
||||||
|
|
@ -672,7 +673,7 @@ export default {
|
||||||
this.sliderInfo.isMove = false
|
this.sliderInfo.isMove = false
|
||||||
},
|
},
|
||||||
getMeasureData() {
|
getMeasureData() {
|
||||||
console.log('getMeasureData')
|
// console.log('getMeasureData')
|
||||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.stack.visitTaskId)
|
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.stack.visitTaskId)
|
||||||
this.measureData = this.visitTaskList[idx].MeasureData
|
this.measureData = this.visitTaskList[idx].MeasureData
|
||||||
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||||
|
|
@ -754,14 +755,10 @@ export default {
|
||||||
getToolStateInfo(e) {
|
getToolStateInfo(e) {
|
||||||
const { element, currentPoints, image, viewport } = e.detail
|
const { element, currentPoints, image, viewport } = e.detail
|
||||||
var imageId = image.imageId
|
var imageId = image.imageId
|
||||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
const imageInfo = this.getInstanceInfo(imageId)
|
||||||
var frame = null
|
var instanceId = imageInfo.instanceId
|
||||||
if (instanceId.includes('?frame=')) {
|
var frame = imageInfo.frame
|
||||||
frame = instanceId.split('?frame=')[1]
|
|
||||||
instanceId = instanceId.split('?frame=')[0]
|
|
||||||
}
|
|
||||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||||
instanceId = instanceId.split('.')[0]
|
|
||||||
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||||
for (var m = 0; m < this.measuredTools.length; m++) {
|
for (var m = 0; m < this.measuredTools.length; m++) {
|
||||||
var toolType = this.measuredTools[m]
|
var toolType = this.measuredTools[m]
|
||||||
|
|
@ -818,7 +815,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stackScrollCallback(e) {
|
stackScrollCallback(e) {
|
||||||
console.log('stackScrollCallback')
|
// console.log('stackScrollCallback')
|
||||||
const { detail } = e
|
const { detail } = e
|
||||||
if (this.isScrollSync && this.currentDicomCanvasIndex === this.canvasIndex) {
|
if (this.isScrollSync && this.currentDicomCanvasIndex === this.canvasIndex) {
|
||||||
this.scrollSyncInfo.canvasIndex = this.canvasIndex
|
this.scrollSyncInfo.canvasIndex = this.canvasIndex
|
||||||
|
|
@ -924,11 +921,8 @@ export default {
|
||||||
if (this.readingTaskState >= 2) return
|
if (this.readingTaskState >= 2) return
|
||||||
var element = cornerstone.getEnabledElement(this.canvas)
|
var element = cornerstone.getEnabledElement(this.canvas)
|
||||||
var { imageId } = element.image
|
var { imageId } = element.image
|
||||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
const imageInfo = this.getInstanceInfo(imageId)
|
||||||
if (instanceId.includes('?frame=')) {
|
var instanceId = imageInfo.instanceId
|
||||||
instanceId = instanceId.split('?frame=')[0]
|
|
||||||
}
|
|
||||||
instanceId = instanceId.split('.')[0]
|
|
||||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.stack.visitTaskId && i.IsCurrentTask && i.ReadingTaskState < 2)
|
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.stack.visitTaskId && i.IsCurrentTask && i.ReadingTaskState < 2)
|
||||||
if (idx === -1) return
|
if (idx === -1) return
|
||||||
this.measureData = this.visitTaskList[idx].MeasureData
|
this.measureData = this.visitTaskList[idx].MeasureData
|
||||||
|
|
@ -991,15 +985,10 @@ export default {
|
||||||
mouseClick(e) {
|
mouseClick(e) {
|
||||||
const { element, currentPoints, image, viewport } = e.detail
|
const { element, currentPoints, image, viewport } = e.detail
|
||||||
var imageId = image.imageId
|
var imageId = image.imageId
|
||||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
const imageInfo = this.getInstanceInfo(imageId)
|
||||||
var frame = null
|
var instanceId = imageInfo.instanceId
|
||||||
if (instanceId.includes('?frame=')) {
|
var frame = imageInfo.frame
|
||||||
frame = instanceId.split('?frame=')[1]
|
|
||||||
instanceId = instanceId.split('?frame=')[0]
|
|
||||||
}
|
|
||||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||||
instanceId = instanceId.split('.')[0]
|
|
||||||
|
|
||||||
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||||
for (let t = 0; t < this.measuredTools.length; t++) {
|
for (let t = 0; t < this.measuredTools.length; t++) {
|
||||||
var toolType = this.measuredTools[t]
|
var toolType = this.measuredTools[t]
|
||||||
|
|
@ -1010,7 +999,7 @@ export default {
|
||||||
if (i > -1) {
|
if (i > -1) {
|
||||||
var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === toolState.data[i].uuid)
|
var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === toolState.data[i].uuid)
|
||||||
if (idx > -1) {
|
if (idx > -1) {
|
||||||
console.log('mouseClick')
|
// console.log('mouseClick')
|
||||||
DicomEvent.$emit('setCollapseActive', this.measureData[idx])
|
DicomEvent.$emit('setCollapseActive', this.measureData[idx])
|
||||||
if (this.readingTaskState < 2) {
|
if (this.readingTaskState < 2) {
|
||||||
const measureData = {}
|
const measureData = {}
|
||||||
|
|
@ -1095,18 +1084,14 @@ export default {
|
||||||
this.minVistNum = this.visitTaskList[0].VisitTaskNum
|
this.minVistNum = this.visitTaskList[0].VisitTaskNum
|
||||||
this.measureData = this.visitTaskList[idx].MeasureData
|
this.measureData = this.visitTaskList[idx].MeasureData
|
||||||
const imageId = this.stack.imageIds[this.stack.currentImageIdIndex]
|
const imageId = this.stack.imageIds[this.stack.currentImageIdIndex]
|
||||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
const imageInfo = this.getInstanceInfo(imageId)
|
||||||
var frame = null
|
var instanceId = imageInfo.instanceId
|
||||||
if (instanceId.includes('?frame=')) {
|
var frame = imageInfo.frame
|
||||||
frame = instanceId.split('?frame=')[1]
|
|
||||||
instanceId = instanceId.split('?frame=')[0]
|
|
||||||
}
|
|
||||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||||
instanceId = instanceId.split('.')[0]
|
|
||||||
this.stack.instanceId = instanceId
|
this.stack.instanceId = instanceId
|
||||||
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||||
ToolStateManager.clearImageIdToolState(dicomSeries.imageIds)
|
ToolStateManager.clearImageIdToolState(dicomSeries.imageIds)
|
||||||
if (this.toolState.clipPlaying) this.toggleClipPlay()
|
this.toggleClipPlay(false)
|
||||||
this.toolState.viewportInvert = false
|
this.toolState.viewportInvert = false
|
||||||
this.toolState.dicomInfoVisible = false
|
this.toolState.dicomInfoVisible = false
|
||||||
|
|
||||||
|
|
@ -1126,21 +1111,26 @@ export default {
|
||||||
// }
|
// }
|
||||||
// resolve()
|
// resolve()
|
||||||
// })
|
// })
|
||||||
|
this.loading = true
|
||||||
cornerstone.loadAndCacheImage(this.stack.imageIds[this.stack.currentImageIdIndex])
|
cornerstone.loadAndCacheImage(this.stack.imageIds[this.stack.currentImageIdIndex])
|
||||||
.then(async image => {
|
.then(async image => {
|
||||||
|
if (this.stack.imageIds.indexOf(image.imageId) !== -1) {
|
||||||
await scope.onFirstImageLoaded(image)
|
await scope.onFirstImageLoaded(image)
|
||||||
|
}
|
||||||
|
scope.loading = false
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
if (error.error && error.error.message) {
|
if (error.error && error.error.message) {
|
||||||
this.$alert(error.error.message)
|
this.$alert(error.error.message)
|
||||||
}
|
}
|
||||||
|
scope.loading = false
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onFirstImageLoaded(image) {
|
onFirstImageLoaded(image) {
|
||||||
console.log('onFirstImageLoaded')
|
// console.log('onFirstImageLoaded')
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
const element = this.$refs.canvas
|
const element = this.$refs.canvas
|
||||||
var viewport = cornerstone.getDefaultViewportForImage(this.canvas, image)
|
var viewport = cornerstone.getDefaultViewportForImage(this.canvas, image)
|
||||||
|
|
@ -1208,14 +1198,10 @@ export default {
|
||||||
|
|
||||||
this.stack.firstImageLoading = false
|
this.stack.firstImageLoading = false
|
||||||
this.toolState.dicomInfoVisible = true
|
this.toolState.dicomInfoVisible = true
|
||||||
var instanceId = image.imageId.split('/')[image.imageId.split('/').length - 1]
|
const imageInfo = this.getInstanceInfo(image.imageId)
|
||||||
var frame = null
|
var instanceId = imageInfo.instanceId
|
||||||
if (instanceId.includes('?frame=')) {
|
var frame = imageInfo.frame
|
||||||
frame = instanceId.split('?frame=')[1]
|
|
||||||
instanceId = instanceId.split('?frame=')[0]
|
|
||||||
}
|
|
||||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||||
instanceId = instanceId.split('.')[0]
|
|
||||||
this.stack.instanceId = instanceId
|
this.stack.instanceId = instanceId
|
||||||
this.height = (this.stack.currentImageIdIndex) * 100 / (this.stack.imageIds.length - 1)
|
this.height = (this.stack.currentImageIdIndex) * 100 / (this.stack.imageIds.length - 1)
|
||||||
this.resetWwwc()
|
this.resetWwwc()
|
||||||
|
|
@ -1223,7 +1209,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onNewImage(e) {
|
onNewImage(e) {
|
||||||
console.log('cornerstonenewimage')
|
// console.log('cornerstonenewimage')
|
||||||
if (this.isCurrentTask && this.readingTaskState < 2) {
|
if (this.isCurrentTask && this.readingTaskState < 2) {
|
||||||
this.resetHideMeasureArr()
|
this.resetHideMeasureArr()
|
||||||
}
|
}
|
||||||
|
|
@ -1260,6 +1246,12 @@ export default {
|
||||||
if (this.dicomInfo.thick) {
|
if (this.dicomInfo.thick) {
|
||||||
this.dicomInfo.thick = this.dicomInfo.thick.toFixed(2)
|
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() {
|
getScreenshots() {
|
||||||
const canvas = this.canvas.querySelector('canvas')
|
const canvas = this.canvas.querySelector('canvas')
|
||||||
|
|
@ -1281,14 +1273,10 @@ export default {
|
||||||
this.stack.imageRendered = true
|
this.stack.imageRendered = true
|
||||||
// const { element } = e.detail
|
// const { element } = e.detail
|
||||||
var imageId = e.detail.image.imageId
|
var imageId = e.detail.image.imageId
|
||||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
const imageInfo = this.getInstanceInfo(imageId)
|
||||||
var frame = null
|
var instanceId = imageInfo.instanceId
|
||||||
if (instanceId.includes('?frame=')) {
|
var frame = imageInfo.frame
|
||||||
frame = instanceId.split('?frame=')[1]
|
|
||||||
instanceId = instanceId.split('?frame=')[0]
|
|
||||||
}
|
|
||||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||||
instanceId = instanceId.split('.')[0]
|
|
||||||
if (this.imageId !== instanceId) {
|
if (this.imageId !== instanceId) {
|
||||||
this.getOrientationMarker(e.detail.element)
|
this.getOrientationMarker(e.detail.element)
|
||||||
// 初次加载时,如果该影像存在标记,则以标记的窗宽窗位为初始化默认值,否则以序列的窗宽窗位为初始化默认值
|
// 初次加载时,如果该影像存在标记,则以标记的窗宽窗位为初始化默认值,否则以序列的窗宽窗位为初始化默认值
|
||||||
|
|
@ -1340,18 +1328,14 @@ export default {
|
||||||
var element = cornerstone.getEnabledElement(this.canvas)
|
var element = cornerstone.getEnabledElement(this.canvas)
|
||||||
var viewport = element.viewport
|
var viewport = element.viewport
|
||||||
// 测量完成
|
// 测量完成
|
||||||
console.log('completed')
|
// console.log('completed')
|
||||||
this.activeTool = 1
|
this.activeTool = 1
|
||||||
this.activeToolName = ''
|
this.activeToolName = ''
|
||||||
var { imageId } = element.image
|
var { imageId } = element.image
|
||||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
const imageInfo = this.getInstanceInfo(imageId)
|
||||||
var frame = null
|
var instanceId = imageInfo.instanceId
|
||||||
if (instanceId.includes('?frame=')) {
|
var frame = imageInfo.frame
|
||||||
frame = instanceId.split('?frame=')[1]
|
|
||||||
instanceId = instanceId.split('?frame=')[0]
|
|
||||||
}
|
|
||||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
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') {
|
if (e.detail.toolName === 'Length' || e.detail.toolName === 'ArrowAnnotate' || e.detail.toolName === 'RectangleRoi') {
|
||||||
const measureData = {}
|
const measureData = {}
|
||||||
measureData.studyId = this.stack.studyId
|
measureData.studyId = this.stack.studyId
|
||||||
|
|
@ -1462,20 +1446,16 @@ export default {
|
||||||
},
|
},
|
||||||
onMeasurementmodified(e) {
|
onMeasurementmodified(e) {
|
||||||
// 移动
|
// 移动
|
||||||
console.log('modified')
|
// console.log('modified')
|
||||||
if (this.readingTaskState >= 2) return
|
if (this.readingTaskState >= 2) return
|
||||||
const { measurementData, toolType } = e.detail
|
const { measurementData, toolType } = e.detail
|
||||||
var element = cornerstone.getEnabledElement(this.canvas)
|
var element = cornerstone.getEnabledElement(this.canvas)
|
||||||
var viewport = element.viewport
|
var viewport = element.viewport
|
||||||
var { imageId } = element.image
|
var { imageId } = element.image
|
||||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
const imageInfo = this.getInstanceInfo(imageId)
|
||||||
var frame = null
|
var instanceId = imageInfo.instanceId
|
||||||
if (instanceId.includes('?frame=')) {
|
var frame = imageInfo.frame
|
||||||
frame = instanceId.split('?frame=')[1]
|
|
||||||
instanceId = instanceId.split('?frame=')[0]
|
|
||||||
}
|
|
||||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||||
instanceId = instanceId.split('.')[0]
|
|
||||||
|
|
||||||
var uuid = measurementData.uuid
|
var uuid = measurementData.uuid
|
||||||
var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === 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 element = cornerstone.getEnabledElement(this.canvas)
|
||||||
var { imageId } = element.image
|
var { imageId } = element.image
|
||||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
const imageInfo = this.getInstanceInfo(imageId)
|
||||||
if (instanceId.includes('?frame=')) {
|
var instanceId = imageInfo.instanceId
|
||||||
instanceId = instanceId.split('?frame=')[0]
|
|
||||||
}
|
|
||||||
instanceId = instanceId.split('.')[0]
|
|
||||||
var idx = this.measureData.findIndex(item => item.InstanceId === instanceId)
|
var idx = this.measureData.findIndex(item => item.InstanceId === instanceId)
|
||||||
var measureData = null
|
var measureData = null
|
||||||
if (idx > -1) {
|
if (idx > -1) {
|
||||||
|
|
@ -1595,8 +1572,10 @@ export default {
|
||||||
|
|
||||||
resetViewport() {
|
resetViewport() {
|
||||||
this.toolState.viewportInvert = false
|
this.toolState.viewportInvert = false
|
||||||
|
if (this.originalMarkers.length > 0) {
|
||||||
this.orientationMarkers = [...this.originalMarkers]
|
this.orientationMarkers = [...this.originalMarkers]
|
||||||
this.setMarkers()
|
this.setMarkers()
|
||||||
|
}
|
||||||
var image = cornerstone.getImage(this.canvas)
|
var image = cornerstone.getImage(this.canvas)
|
||||||
cornerstone.setViewport(
|
cornerstone.setViewport(
|
||||||
this.canvas,
|
this.canvas,
|
||||||
|
|
@ -1655,18 +1634,19 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleClipPlay() {
|
toggleClipPlay(isPlay) {
|
||||||
if (this.toolState.clipPlaying) {
|
if (isPlay) {
|
||||||
cornerstoneTools.stopClip(this.canvas)
|
|
||||||
this.toolState.clipPlaying = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.toolState.clipPlaying = true
|
this.toolState.clipPlaying = true
|
||||||
cornerstoneTools.playClip(this.canvas, this.dicomInfo.fps)
|
cornerstoneTools.playClip(this.canvas, this.dicomInfo.fps)
|
||||||
cornerstoneTools.getToolState(
|
cornerstoneTools.getToolState(
|
||||||
this.canvas,
|
this.canvas,
|
||||||
'playClip'
|
'playClip'
|
||||||
).data[0].loop = false
|
).data[0].loop = false
|
||||||
|
} else {
|
||||||
|
cornerstoneTools.stopClip(this.canvas)
|
||||||
|
this.toolState.clipPlaying = false
|
||||||
|
return
|
||||||
|
}
|
||||||
},
|
},
|
||||||
setFps(fps) {
|
setFps(fps) {
|
||||||
this.dicomInfo.fps = fps
|
this.dicomInfo.fps = fps
|
||||||
|
|
@ -1711,8 +1691,10 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
resetRotate() {
|
resetRotate() {
|
||||||
|
if (this.originalMarkers.length > 0) {
|
||||||
this.orientationMarkers = [...this.originalMarkers]
|
this.orientationMarkers = [...this.originalMarkers]
|
||||||
this.setMarkers()
|
this.setMarkers()
|
||||||
|
}
|
||||||
var viewport = cornerstone.getViewport(this.canvas)
|
var viewport = cornerstone.getViewport(this.canvas)
|
||||||
viewport.hflip = false
|
viewport.hflip = false
|
||||||
viewport.vflip = false
|
viewport.vflip = false
|
||||||
|
|
@ -1727,6 +1709,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setRotate(hflip, vflip, angle, type) {
|
setRotate(hflip, vflip, angle, type) {
|
||||||
|
if (this.orientationMarkers.length > 0) {
|
||||||
var markers = [...this.orientationMarkers]
|
var markers = [...this.orientationMarkers]
|
||||||
if (type === 2) {
|
if (type === 2) {
|
||||||
// 垂直翻转
|
// 垂直翻转
|
||||||
|
|
@ -1744,6 +1727,7 @@ export default {
|
||||||
this.orientationMarkers = [markers[3]].concat(markers.slice(0, 3))
|
this.orientationMarkers = [markers[3]].concat(markers.slice(0, 3))
|
||||||
}
|
}
|
||||||
this.setMarkers()
|
this.setMarkers()
|
||||||
|
}
|
||||||
var viewport = cornerstone.getViewport(this.canvas)
|
var viewport = cornerstone.getViewport(this.canvas)
|
||||||
if (hflip) viewport.hflip = !viewport.hflip
|
if (hflip) viewport.hflip = !viewport.hflip
|
||||||
if (vflip) viewport.vflip = !viewport.vflip
|
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) {
|
preventDefault(e) {
|
||||||
e.stopImmediatePropagation()
|
e.stopImmediatePropagation()
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
A
|
A
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</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">
|
<div class="layout_box_1_1">
|
||||||
A
|
A
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -292,6 +292,54 @@
|
||||||
<div class="text">{{ $t('trials:lugano:button:fusion') }}</div>
|
<div class="text">{{ $t('trials:lugano:button:fusion') }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
</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">
|
<el-tooltip class="item" effect="dark" :content="$t('trials:reading:button:reset')" placement="bottom">
|
||||||
<div class="tool-wrapper">
|
<div class="tool-wrapper">
|
||||||
|
|
@ -669,7 +717,7 @@ export default {
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
isReadingTaskViewInOrder: {
|
isReadingTaskViewInOrder: {
|
||||||
type: Boolean,
|
type: Number,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
isExistsManual: {
|
isExistsManual: {
|
||||||
|
|
@ -789,7 +837,9 @@ export default {
|
||||||
digitPlaces: 2,
|
digitPlaces: 2,
|
||||||
activeCanvasWW: null,
|
activeCanvasWW: null,
|
||||||
activeCanvasWC: null,
|
activeCanvasWC: null,
|
||||||
activeTaskInfo: {}
|
activeTaskInfo: {},
|
||||||
|
clipPlaying: false,
|
||||||
|
fps: 15
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -828,6 +878,7 @@ export default {
|
||||||
activeSeries: {
|
activeSeries: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(v) {
|
handler(v) {
|
||||||
|
console.log('activeSeries', v)
|
||||||
if (v && v.isCurrentTask && this.studyList.length === 0) {
|
if (v && v.isCurrentTask && this.studyList.length === 0) {
|
||||||
this.activeTaskInfo.taskName = v.taskBlindName
|
this.activeTaskInfo.taskName = v.taskBlindName
|
||||||
this.activeTaskInfo.visitTaskId = v.visitTaskId
|
this.activeTaskInfo.visitTaskId = v.visitTaskId
|
||||||
|
|
@ -844,6 +895,17 @@ export default {
|
||||||
imageQualityIssues: {
|
imageQualityIssues: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(v) {}
|
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) {
|
if (this.petctWindow) {
|
||||||
this.petctWindow.close()
|
this.petctWindow.close()
|
||||||
}
|
}
|
||||||
window.removeEventListener('beforeunload')
|
window.removeEventListener('beforeunload', () => {
|
||||||
|
if (this.petctWindow) {
|
||||||
|
this.petctWindow.close()
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getWwcTpl() {
|
getWwcTpl() {
|
||||||
|
|
@ -1193,6 +1259,8 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
loadImageStack(dicomSeries) {
|
loadImageStack(dicomSeries) {
|
||||||
|
this.clipPlaying = false
|
||||||
|
this.fps = 15
|
||||||
this.canvasObj[this.currentDicomCanvasIndex] = dicomSeries
|
this.canvasObj[this.currentDicomCanvasIndex] = dicomSeries
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.activeSeries = dicomSeries
|
this.activeSeries = dicomSeries
|
||||||
|
|
@ -1364,7 +1432,7 @@ export default {
|
||||||
|
|
||||||
var firstAddSeries = null
|
var firstAddSeries = null
|
||||||
var currentAddSeries = null
|
var currentAddSeries = null
|
||||||
if (this.isReadingTaskViewInOrder) {
|
if (this.isReadingTaskViewInOrder === 1) {
|
||||||
// 有序
|
// 有序
|
||||||
// 获取病灶第一次出现的访视序列
|
// 获取病灶第一次出现的访视序列
|
||||||
var firstAddVisitTaskId = null
|
var firstAddVisitTaskId = null
|
||||||
|
|
@ -1870,6 +1938,31 @@ export default {
|
||||||
}
|
}
|
||||||
this.activeTool = toolName
|
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) {
|
setMeasureData(data) {
|
||||||
this.$refs['measurementList'].setMeasuredData(data)
|
this.$refs['measurementList'].setMeasuredData(data)
|
||||||
|
|
@ -2129,7 +2222,7 @@ export default {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-right: 30px;
|
margin-right: 20px;
|
||||||
.icon{
|
.icon{
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border: 1px solid #404040;
|
border: 1px solid #404040;
|
||||||
|
|
@ -2148,6 +2241,39 @@ export default {
|
||||||
display: none;
|
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{
|
.tool_active{
|
||||||
background-color: #607d8b;
|
background-color: #607d8b;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -795,11 +795,23 @@ export default {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
getDicomSeriesInfo({ seriesId }).then(res => {
|
getDicomSeriesInfo({ seriesId }).then(res => {
|
||||||
var series = res.Result
|
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({
|
resolve({
|
||||||
imageIds: imageIds,
|
imageIds: imageIds,
|
||||||
instanceList: series.InstanceList,
|
instanceList: instanceList,
|
||||||
seriesId: series.Id,
|
seriesId: series.Id,
|
||||||
imageIdIndex: 0,
|
imageIdIndex: 0,
|
||||||
seriesUid: series.SeriesInstanceUid,
|
seriesUid: series.SeriesInstanceUid,
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ cornerstone.init({
|
||||||
gpuTier: intel,
|
gpuTier: intel,
|
||||||
rendering: {
|
rendering: {
|
||||||
// useCPURendering: false,
|
// useCPURendering: false,
|
||||||
useNorm16Texture: true
|
useNorm16Texture: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
cornerstone.Settings.getRuntimeSettings().set('useCursors', false)
|
cornerstone.Settings.getRuntimeSettings().set('useCursors', false)
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,8 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
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)
|
window.addEventListener('message', this.receiveMsg)
|
||||||
this.criterionType = parseInt(localStorage.getItem('CriterionType'))
|
this.criterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||||
DicomEvent.$on('setCollapseActive', measureData => {
|
DicomEvent.$on('setCollapseActive', measureData => {
|
||||||
|
|
|
||||||
|
|
@ -302,7 +302,8 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
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)
|
window.addEventListener('message', this.receiveMsg)
|
||||||
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||||
DicomEvent.$on('setCollapseActive', measureData => {
|
DicomEvent.$on('setCollapseActive', measureData => {
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { getTableAnswerRowInfoList } from '@/api/trials'
|
||||||
import { on, off } from 'element-ui/src/utils/dom'
|
import { on, off } from 'element-ui/src/utils/dom'
|
||||||
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util'
|
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
|
|
@ -223,15 +224,26 @@ export default {
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
this.visitTaskId = this.$router.currentRoute.query.visitTaskId
|
this.visitTaskId = this.$router.currentRoute.query.visitTaskId
|
||||||
this.canvasData = []
|
this.canvasData = []
|
||||||
await store.dispatch('reading/getMeasuredData', this.visitTaskId)
|
let res = await getTableAnswerRowInfoList(this.visitTaskId)
|
||||||
await store.dispatch('reading/getNoneDicomMeasuredData', this.visitTaskId).then(res => {
|
res.Result.forEach(el => {
|
||||||
res.forEach(item => {
|
if (!el.IsDicomReading){
|
||||||
if (item && item.MeasureData) {
|
if (el.MeasureData) {
|
||||||
this.canvasData.push(item.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()
|
resolve()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,8 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
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)
|
window.addEventListener('message', this.receiveMsg)
|
||||||
this.criterionType = parseInt(localStorage.getItem('CriterionType'))
|
this.criterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||||
DicomEvent.$on('setCollapseActive', measureData => {
|
DicomEvent.$on('setCollapseActive', measureData => {
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ export default {
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
isReadingTaskViewInOrder: {
|
isReadingTaskViewInOrder: {
|
||||||
type: Boolean,
|
type: Number,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
isExistsManual: {
|
isExistsManual: {
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,8 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
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)
|
window.addEventListener('message', this.receiveMsg)
|
||||||
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||||
DicomEvent.$on('setCollapseActive', measureData => {
|
DicomEvent.$on('setCollapseActive', measureData => {
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,8 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
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)
|
window.addEventListener('message', this.receiveMsg)
|
||||||
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||||
DicomEvent.$on('setCollapseActive', measureData => {
|
DicomEvent.$on('setCollapseActive', measureData => {
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,8 @@
|
||||||
<!-- 系统评估结果为:xxx,与当前调整的结果不一致,请填写调整原因 -->
|
<!-- 系统评估结果为: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>
|
||||||
<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>
|
||||||
<!-- <template v-else>
|
<!-- <template v-else>
|
||||||
<span>{{ currentTaskReason }}</span>
|
<span>{{ currentTaskReason }}</span>
|
||||||
|
|
@ -733,7 +734,8 @@ export default {
|
||||||
}
|
}
|
||||||
var token = getToken()
|
var token = getToken()
|
||||||
var trialReadingCriterionId = this.$router.currentRoute.query.TrialReadingCriterionId
|
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 subjectId = this.$router.currentRoute.query.subjectId
|
||||||
var trialId = this.$router.currentRoute.query.trialId
|
var trialId = this.$router.currentRoute.query.trialId
|
||||||
var isReadingTaskViewInOrder = this.$router.currentRoute.query.isReadingTaskViewInOrder
|
var isReadingTaskViewInOrder = this.$router.currentRoute.query.isReadingTaskViewInOrder
|
||||||
|
|
|
||||||
|
|
@ -49,21 +49,51 @@
|
||||||
/>
|
/>
|
||||||
<div class="image-desc">
|
<div class="image-desc">
|
||||||
<div class="flex-div">
|
<div class="flex-div">
|
||||||
<div v-if="!study.IsCriticalSequence">#{{ series.seriesNumber }} </div>
|
<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'">
|
<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">
|
<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)" />
|
<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>
|
||||||
<!-- 暂停 -->
|
|
||||||
<!-- <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>
|
</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">
|
<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)" />
|
<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>
|
||||||
</div>
|
</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.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">
|
<p v-show="series.description">
|
||||||
<el-tooltip class="item" effect="dark" :content="series.description" placement="right">
|
<el-tooltip class="item" effect="dark" :content="series.description" placement="right">
|
||||||
<div style="">{{ series.description }}</div>
|
<div style="">{{ series.description }}</div>
|
||||||
|
|
@ -73,7 +103,10 @@
|
||||||
<p v-show="series.sliceThickness && !study.IsCriticalSequence">
|
<p v-show="series.sliceThickness && !study.IsCriticalSequence">
|
||||||
T: {{ parseFloat(series.sliceThickness).toFixed(digitPlaces) }}
|
T: {{ parseFloat(series.sliceThickness).toFixed(digitPlaces) }}
|
||||||
</p>
|
</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
|
{{ series.modality }}: {{ series.instanceCount }} image
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -88,9 +121,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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
|
<el-progress
|
||||||
:percentage="parseInt(((series.prefetchInstanceCount/series.instanceCount)*100).toFixed(2))"
|
:percentage="parseInt((series.prefetchInstanceCount / series.instanceCount).toFixed(2))"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -185,7 +218,8 @@ export default {
|
||||||
srDialogVisible: false,
|
srDialogVisible: false,
|
||||||
srInfo: {},
|
srInfo: {},
|
||||||
digitPlaces: 2,
|
digitPlaces: 2,
|
||||||
visitTaskIdx: -1
|
visitTaskIdx: -1,
|
||||||
|
currentLoadIns: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -219,7 +253,8 @@ export default {
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
mounted() {
|
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'))
|
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||||
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
||||||
DicomEvent.$on('refreshStudyListMeasureData', () => {
|
DicomEvent.$on('refreshStudyListMeasureData', () => {
|
||||||
|
|
@ -233,6 +268,8 @@ export default {
|
||||||
// this.studyList = this.visitTaskList[idx].StudyList
|
// 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('cornerstoneimageloaded', this.cornerstoneImageLoaded)
|
||||||
// cornerstone.events.addEventListener('cornerstoneimagecachefull', this.cornerstoneimagecachefull)
|
// cornerstone.events.addEventListener('cornerstoneimagecachefull', this.cornerstoneimagecachefull)
|
||||||
// cornerstone.events.addEventListener('cornerstoneimagecachechanged', this.cornerstoneimagecachechanged)
|
// cornerstone.events.addEventListener('cornerstoneimagecachechanged', this.cornerstoneimagecachechanged)
|
||||||
|
|
@ -246,13 +283,27 @@ export default {
|
||||||
window.removeEventListener('beforeunload', e => { cornerstone.imageCache.purgeCache() })
|
window.removeEventListener('beforeunload', e => { cornerstone.imageCache.purgeCache() })
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
initStudyInfo() {
|
||||||
const loading = this.$loading({ fullscreen: true })
|
const loading = this.$loading({ fullscreen: true })
|
||||||
// 初始化待渲染序列
|
// 初始化待渲染序列
|
||||||
this.getInitSeries().then((res) => {
|
this.getInitSeries().then((res) => {
|
||||||
requestPoolManager.startTaskTimer()
|
requestPoolManager.startTaskTimer()
|
||||||
res.map((item) => {
|
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)
|
var i = res.findIndex(s => s.isCurrentTask)
|
||||||
if (i > -1) {
|
if (i > -1) {
|
||||||
|
|
@ -261,71 +312,18 @@ export default {
|
||||||
this.measureData = this.visitTaskList[idx].MeasureData
|
this.measureData = this.visitTaskList[idx].MeasureData
|
||||||
this.studyList = this.visitTaskList[idx].StudyList
|
this.studyList = this.visitTaskList[idx].StudyList
|
||||||
var priority = parseInt(new Date().getTime())
|
var priority = parseInt(new Date().getTime())
|
||||||
|
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 => {
|
res[i].imageIds.map(image => {
|
||||||
priority--
|
priority--
|
||||||
this.imageList.push({ imageId: image, seriesId: res[i].seriesId, studyIndex: res[i].studyIndex, seriesIndex: res[i].seriesIndex, visitTaskId: res[i].visitTaskId, 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 })
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
this.loopLoad()
|
this.loopLoad()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -341,9 +339,9 @@ export default {
|
||||||
var p = parseInt(new Date().getTime())
|
var p = parseInt(new Date().getTime())
|
||||||
var imageId = seriesInfo.imageIds[seriesInfo.imageIdIndex]
|
var imageId = seriesInfo.imageIds[seriesInfo.imageIdIndex]
|
||||||
requestPoolManager.loadAndCacheImagePlus(imageId, seriesInfo.seriesId, p * 100).then(res => {
|
requestPoolManager.loadAndCacheImagePlus(imageId, seriesInfo.seriesId, p * 100).then(res => {
|
||||||
if (seriesInfo.isCurrentTask) {
|
// if (seriesInfo.isCurrentTask) {
|
||||||
this.imageLoaded({ studyIndex: seriesInfo.studyIndex, seriesIndex: seriesInfo.seriesIndex, imageId: res.imageId }, res.data.string('x0020000e'))
|
// this.imageLoaded({ studyIndex: seriesInfo.studyIndex, seriesIndex: seriesInfo.seriesIndex, imageId: res.imageId }, res.data.string('x0020000e'))
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getStudyList() {
|
getStudyList() {
|
||||||
|
|
@ -367,11 +365,12 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
async getInitSeries() {
|
async getInitSeries() {
|
||||||
|
console.log('getInitSeries')
|
||||||
var seriesList = []
|
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)
|
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||||
this.studyList = this.visitTaskList[idx].StudyList
|
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])
|
const obj = this.getFirstMarkedSeries(this.visitTaskList[idx].MeasureData, [...this.visitTaskList[idx].StudyList])
|
||||||
if (Object.keys(obj).length !== 0) {
|
if (Object.keys(obj).length !== 0) {
|
||||||
|
|
@ -626,9 +625,15 @@ export default {
|
||||||
}
|
}
|
||||||
if (!isAddToTakPool) {
|
if (!isAddToTakPool) {
|
||||||
var priority = parseInt(new Date().getTime())
|
var priority = parseInt(new Date().getTime())
|
||||||
series.imageIds.map((imageId) => {
|
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 })
|
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
|
||||||
})
|
})
|
||||||
|
}
|
||||||
if (this.imageList.length > 0) {
|
if (this.imageList.length > 0) {
|
||||||
this.loopLoadStatus = 0
|
this.loopLoadStatus = 0
|
||||||
this.loopLoad()
|
this.loopLoad()
|
||||||
|
|
@ -647,6 +652,53 @@ export default {
|
||||||
|
|
||||||
store.dispatch('reading/setActiveSeries', series)
|
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) {
|
setSeriesActive(obj) {
|
||||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||||
if (idx === -1) return
|
if (idx === -1) return
|
||||||
|
|
@ -705,10 +757,17 @@ export default {
|
||||||
// }
|
// }
|
||||||
// 均只下载关键序列
|
// 均只下载关键序列
|
||||||
if (!isCurrentTask && study.IsCriticalSequence) {
|
if (!isCurrentTask && study.IsCriticalSequence) {
|
||||||
series.imageIds.map(image => {
|
if (series.isExistMutiFrames) {
|
||||||
|
series.instanceInfoList.map(image => {
|
||||||
priority = priority - 1
|
priority = priority - 1
|
||||||
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
|
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) {
|
if (this.imageList.length > 0) {
|
||||||
// requestPoolManager.startTaskTimer()
|
// requestPoolManager.startTaskTimer()
|
||||||
this.imageList.map(image => {
|
this.imageList.map(image => {
|
||||||
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority).then(res => {
|
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority)
|
||||||
if (res) {
|
|
||||||
this.imageLoaded(image, res.data.string('x0020000e'))
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
requestPoolManager.sortTaskPool()
|
requestPoolManager.sortTaskPool()
|
||||||
|
|
||||||
|
|
@ -744,12 +799,22 @@ export default {
|
||||||
}
|
}
|
||||||
if (!isAddToTakPool) {
|
if (!isAddToTakPool) {
|
||||||
const priority = parseInt(new Date().getTime())
|
const priority = parseInt(new Date().getTime())
|
||||||
|
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 => {
|
series.imageIds.map(image => {
|
||||||
const index = this.cachedImages.findIndex(item => item.uri === image)
|
const index = this.cachedImages.findIndex(item => item.uri === image)
|
||||||
if (index === -1) {
|
if (index === -1) {
|
||||||
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
|
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if (this.imageList.length > 0) {
|
if (this.imageList.length > 0) {
|
||||||
this.loopLoadStatus = 0
|
this.loopLoadStatus = 0
|
||||||
this.loopLoad()
|
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) {
|
cornerstoneimagecachechanged(e) {
|
||||||
const cacheInfo = cornerstone.imageCache.getCacheInfo()
|
const cacheInfo = cornerstone.imageCache.getCacheInfo()
|
||||||
console.log(cacheInfo)
|
console.log(cacheInfo)
|
||||||
|
|
@ -936,6 +1042,7 @@ export default {
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/deep/.el-collapse{
|
/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>
|
</style>
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue