Compare commits
197 Commits
v1.5.4
...
07fe167eac
| Author | SHA1 | Date | |
|---|---|---|---|
| 07fe167eac | |||
| 2a00dda5f4 | |||
| a185f4755a | |||
| 0aacbf49d9 | |||
| 10e1c92e73 | |||
| e955f4973c | |||
| 0b49bd8dab | |||
| e98e826328 | |||
| 86557af12f | |||
| 581ed42ab6 | |||
| ba17dd4148 | |||
| 1ce67efa9b | |||
| 7e21325fa1 | |||
| 44f6b11d50 | |||
| 6e88d2cae2 | |||
| 62f5f5ac38 | |||
| ddb5254716 | |||
| fcc4820087 | |||
| a3c7e76267 | |||
| c6b38ea528 | |||
| 8b1679dfc5 | |||
| 8597e0a7e8 | |||
| f96f8bca91 | |||
| d0641cdfc9 | |||
| 32274c4a37 | |||
| 132af31c1b | |||
| f8c28fc66d | |||
| 46bc955e76 | |||
| 802870f3b4 | |||
| 8a46adf96f | |||
| 57f470e219 | |||
| 14cc8ad5f5 | |||
| 049d8dc430 | |||
| e0ccfe8da7 | |||
| c5758b17df | |||
| e485b73e1b | |||
| 91c78127f2 | |||
| bbfd119d08 | |||
| 32de7c4f18 | |||
| b76303c63d | |||
| 96cb8a478c | |||
| c13fe6b521 | |||
| fc6d0c7b35 | |||
| 0ba8739cb5 | |||
| aeeb4b05f5 | |||
| df304d8f07 | |||
| 404d18faa5 | |||
| c6c9142934 | |||
| 14ad1ae156 | |||
| ddd35f4ff8 | |||
| 275501db20 | |||
| 7f8d08032c | |||
| c3955dc017 | |||
| c01c69a9fe | |||
| d1f90a2525 | |||
| 4212eb0f52 | |||
| d37c44a268 | |||
| 4c0b219b47 | |||
| 42c1b56dda | |||
| d56b904141 | |||
| aa5f5f9bc6 | |||
| 8fc6bdb437 | |||
| a7ce5526fd | |||
| 4b9118839f | |||
| a533bb680b | |||
| d274c774ba | |||
| a7a034014d | |||
| ca98bc278c | |||
| 03cf2def1b | |||
| 847845a6c4 | |||
| f5ec5505d4 | |||
| 53a9b3882d | |||
| 671be02d13 | |||
| d1956e3077 | |||
| 9486054a19 | |||
| cd3f36756d | |||
| bea2d448ea | |||
| b9b62334c4 | |||
| 8cf5a1a524 | |||
| 02a5f30224 | |||
| 8933a398d7 | |||
| a71c6e92dc | |||
| 80c0bfb694 | |||
| 426faba24c | |||
| c6cc83aeec | |||
| 46f66ce2d2 | |||
| 35846365a4 | |||
| 90e33e1b97 | |||
| 9b6f8717c3 | |||
| 65da9636a2 | |||
| 9a1b28e08c | |||
| 94ca89db27 | |||
| b786c5e656 | |||
| 0a880af52f | |||
| 089d8668f2 | |||
| a1dab30d37 | |||
| 32a7e42c51 | |||
| 1a69bd9003 | |||
| b37e351491 | |||
| c74806a367 | |||
| b637fc5856 | |||
| de18b8e6e3 | |||
| 31d3a17b80 | |||
| a0bbb7b64c | |||
| a8bebaba49 | |||
| 403008c25f | |||
| 52ed67850d | |||
| dfd0b1a767 | |||
| ced87c29c9 | |||
| 5e14615176 | |||
| 65b9cff361 | |||
| 862dcb1b3d | |||
| 3a02e9a596 | |||
| af586a1187 | |||
| 39a0c8163f | |||
| da0dabecca | |||
| 75efdcf0f7 | |||
| bc674ec334 | |||
| 663c78ef51 | |||
| b8b876c0c9 | |||
| 24e7b30b7e | |||
| ba1ba68c78 | |||
| e51e7d0e66 | |||
| 7f36aa5a05 | |||
| e45903d55e | |||
| 02e82bba33 | |||
| 3d3e6a3db0 | |||
| 6e2b7cb76a | |||
| ca2ed72a6f | |||
| c2e2f65434 | |||
| d2fc9ad981 | |||
| c2083e9c9c | |||
| d118f6461f | |||
| 13d968c5b9 | |||
| 65f0af06ad | |||
| 49a93d0188 | |||
| de832afac8 | |||
| c4381a0eb2 | |||
| 17c796bd53 | |||
| 9ce1e569eb | |||
| 8b48f5fe2e | |||
| 98af1e7540 | |||
| ed027781c4 | |||
| dd20a93523 | |||
| ba5e9f82b7 | |||
| 5af5954f2a | |||
| 9e1dbda53c | |||
| 3aa521229f | |||
| cd1735eae8 | |||
| 29dfe79acd | |||
| 885af6d195 | |||
| 98fe1f0365 | |||
| 74e86cbdbe | |||
| 6b06d2a5f0 | |||
| 6250e957f0 | |||
| 9cb9478848 | |||
| bd9ecf13e9 | |||
| fe67ef0189 | |||
| 7283c5a5a1 | |||
| 4d224c115d | |||
| b717530ae3 | |||
| 66e5380fce | |||
| 9f73ae7e31 | |||
| 8876d24054 | |||
| d5084e411b | |||
| cf7c7cbbc1 | |||
| ac272d1e94 | |||
| 6a59ed80e2 | |||
| d0cefb09df | |||
| 4c241b9acd | |||
| e265b0c2af | |||
| 2f549846ba | |||
| d9f10055aa | |||
| 19c2c4eecb | |||
| b3bff41d35 | |||
| 0eb1289cf0 | |||
| 5048f040cc | |||
| 62d7315401 | |||
| 13b083d2df | |||
| 712d2cc89b | |||
| 9795f89ce9 | |||
| 4eb9c2ff85 | |||
| d5f1ecbb04 | |||
| a53fc5478b | |||
| 3ab5c46455 | |||
| c37332e8e2 | |||
| 79cc39918e | |||
| ccac950bcf | |||
| e0b095ebc9 | |||
| 898f6ed8f7 | |||
| ced1be74b3 | |||
| e6926382fd | |||
| 59f27b9d35 | |||
| 12449e0ca0 | |||
| 3b745051eb | |||
| 81c21c995d | |||
| a2ffa87056 |
+33
-1
@@ -1,6 +1,6 @@
|
||||
kind: pipeline
|
||||
type: ssh
|
||||
name: ssh-linux-test-irc-publish
|
||||
name: ssh-linux-uat-irc-publish
|
||||
|
||||
platform:
|
||||
os: Linux
|
||||
@@ -24,6 +24,38 @@ steps:
|
||||
trigger:
|
||||
branch:
|
||||
- uat
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: ssh
|
||||
name: ssh-linux-test-irc-publish
|
||||
|
||||
platform:
|
||||
os: Linux
|
||||
arch: 386
|
||||
|
||||
clone:
|
||||
disable: true #禁用默认克隆
|
||||
|
||||
server:
|
||||
host: 106.14.89.110
|
||||
user: root
|
||||
password:
|
||||
from_secret: local_pwd
|
||||
|
||||
steps:
|
||||
- name: publish-test-irc-vue
|
||||
commands:
|
||||
- echo start publish test-irc-vue
|
||||
- cd /opt/1panel/hang/vue/test-irc
|
||||
- sh test-irc.sh v${DRONE_BUILD_NUMBER}
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+9
-1
@@ -81,6 +81,7 @@
|
||||
>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<feedBack/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -90,10 +91,12 @@ import {
|
||||
getFrontInternationalizationList,
|
||||
} from "@/api/dictionary/dictionary";
|
||||
import { getTrialExtralConfig } from "@/api/trials";
|
||||
import feedBack from '@/views/trials/trials-layout/components/feedBack'
|
||||
import Vue from "vue";
|
||||
import i18n from "./lang";
|
||||
export default {
|
||||
name: "App",
|
||||
components: {feedBack},
|
||||
data() {
|
||||
return {
|
||||
drawer: false,
|
||||
@@ -111,7 +114,9 @@ export default {
|
||||
async handler() {
|
||||
if (
|
||||
this.$route.query.trialId &&
|
||||
this.$route.query.trialId !== this.$store.state.trials.config.trialId
|
||||
this.$route.query.trialId !==
|
||||
this.$store.state.trials.config.trialId &&
|
||||
this.$store.state.trials.whiteList.indexOf(this.$route.path) === -1
|
||||
) {
|
||||
let res = await getTrialExtralConfig({
|
||||
TrialId: this.$route.query.trialId,
|
||||
@@ -275,4 +280,7 @@ textarea {
|
||||
.title-logo {
|
||||
height: 40px;
|
||||
}
|
||||
.title-logo {
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -277,3 +277,19 @@ export function batchAddInternationalization(param) {
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
// 国际化获取迭代列表
|
||||
export function getPublishVersionSelect() {
|
||||
return request({
|
||||
url: `/PublishLog/getPublishVersionSelect`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 国际化批量更新
|
||||
export function batchUpdateInternationalInfo(data) {
|
||||
return request({
|
||||
url: `/Internationalization/batchUpdateInternationalInfo`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1013,4 +1013,36 @@ export function getTrialSiteList(params) {
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取版本记录列表
|
||||
export function getExploreRecommendList(params) {
|
||||
return request({
|
||||
url: `/ExploreRecommend/getExploreRecommendList`,
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 新增或修改推荐版本记录
|
||||
export function addOrUpdateExploreRecommend(params) {
|
||||
return request({
|
||||
url: `/ExploreRecommend/addOrUpdateExploreRecommend`,
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 删除推荐版本记录
|
||||
export function deleteExploreRecommend(id) {
|
||||
return request({
|
||||
url: `/ExploreRecommend/deleteExploreRecommend/${id}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// 获取推荐版本记录详情
|
||||
export function getExploreRecommentInfo(params) {
|
||||
return request({
|
||||
url: `/ExploreRecommend/getExploreRecommentInfo`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
@@ -51,4 +51,10 @@ export function batchAddOrUpdateFrontInternationalization(params) {
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取当前版本
|
||||
export function getCurrentPublishInfo() {
|
||||
return request({
|
||||
url: `/PublishLog/getCurrentPublishInfo`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -187,3 +187,10 @@ export function setSkipReadingCache(param) {
|
||||
data: param
|
||||
})
|
||||
}
|
||||
export function resetReadingTask(param) {
|
||||
return request({
|
||||
url: `/ReadingImageTask/resetReadingTask`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3675,6 +3675,54 @@ export function getTrialSiteSelectList(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function getNextIRMedicalFeedback(param) {
|
||||
return request({
|
||||
url: `/ReadingMedicalReview/getNextIRMedicalFeedback`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function getNextCRCChallenge(param) {
|
||||
return request({
|
||||
url: `/QCList/getNextCRCChallenge`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
// 获取中心dicomae列表
|
||||
export function getTrialSiteDicomAEList(param) {
|
||||
return request({
|
||||
url: `/TrialSiteDicomAE/getTrialSiteDicomAEList`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// 新增或修改中心dicomae信息
|
||||
export function addOrUpdateTrialSiteDicomAE(param) {
|
||||
return request({
|
||||
url: `/TrialSiteDicomAE/addOrUpdateTrialSiteDicomAE`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// 删除中心dicomae信息
|
||||
export function deleteTrialSiteDicomAE(id) {
|
||||
return request({
|
||||
url: `/TrialSiteDicomAE/deleteTrialSiteDicomAE/${id}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// 获取项目中dicomAE配置
|
||||
export function getTrialDicomAE(params) {
|
||||
return request({
|
||||
url: `/TrialDicomAE/getTrialDicomAE`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 获取项目配置
|
||||
export function getTrialExtralConfig(params) {
|
||||
return request({
|
||||
@@ -3683,3 +3731,154 @@ export function getTrialExtralConfig(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
// 项目新增或修改dicomAE配置
|
||||
export function addOrUpdateDicomAE(data) {
|
||||
return request({
|
||||
url: `/TrialDicomAE/addOrUpdateDicomAE`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 测试dicomAE链接
|
||||
export function testSCPServerConnect(id) {
|
||||
return request({
|
||||
url: `/TrialDicomAE/testSCPServerConnect/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// dicomAE配置签名
|
||||
export function ConfigTrialPACSInfoConfirm(data) {
|
||||
return request({
|
||||
url: `/Inspection/configTrialBasicInfo/ConfigTrialPACSInfoConfirm`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取推送记录
|
||||
export function getSCPImageUploadList(data) {
|
||||
return request({
|
||||
url: `/Patient/getSCPImageUploadList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取影像检查患者列表
|
||||
export function getPatientList(data) {
|
||||
return request({
|
||||
url: `/Patient/getPatientList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取影像检查患者检查列表
|
||||
export function getPatientStudyList(data) {
|
||||
return request({
|
||||
url: `/Patient/getPatientStudyList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取接收方AE列表
|
||||
export function getDicomCalledAEList(params) {
|
||||
return request({
|
||||
url: `/Patient/getDicomCalledAEList`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 获取发送方AE列表
|
||||
export function getDicomCallingAEList(params) {
|
||||
return request({
|
||||
url: `/Patient/getDicomCallingAEList`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// CRCpacs上传检查列表
|
||||
export function getVisitPatientStudyFilterList(data) {
|
||||
return request({
|
||||
url: `/Patient/getVisitPatientStudyFilterList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// CRCpacs上传检查
|
||||
export function submitVisitStudyBinding(data) {
|
||||
return request({
|
||||
url: `/Patient/submitVisitStudyBinding`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取pacs检查技术
|
||||
export function getDicomModalityList(params) {
|
||||
return request({
|
||||
url: `/Patient/getDicomModalityList`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 获取反馈列表
|
||||
export function getUserFeedBackList(data) {
|
||||
return request({
|
||||
url: `/UserFeedBack/getUserFeedBackList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 更新反馈状态
|
||||
export function batchUpdateFeedBackState(data) {
|
||||
return request({
|
||||
url: `/UserFeedBack/batchUpdateFeedBackState`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 新增或修改意见反馈
|
||||
export function addOrUpdateUserFeedBack(data) {
|
||||
return request({
|
||||
url: `/UserFeedBack/addOrUpdateUserFeedBack`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取反馈详情
|
||||
export function getUserFeedBackInfo(data) {
|
||||
return request({
|
||||
url: `/UserFeedBack/getUserFeedBackInfo`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 一致性分析获取临床数据列表
|
||||
export function getConsistencyAnalysisReadingClinicalDataList(data) {
|
||||
return request({
|
||||
url: `/ReadingClinicalData/getConsistencyAnalysisReadingClinicalDataList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 新增或修改一致性分析临床数据
|
||||
export function addOrUpdateConsistencyAnalysisReadingClinicalData(data) {
|
||||
return request({
|
||||
url: `/ReadingClinicalData/addOrUpdateConsistencyAnalysisReadingClinicalData`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 一致性分析临床数据签名
|
||||
export function signConsistencyAnalysisReadingClinicalData(data) {
|
||||
return request({
|
||||
url: `/Inspection/ReadingClinicalData/SignConsistencyAnalysisReadingClinicalData`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 一致性分析临床数据设置任务为有效
|
||||
export function setTaskValid(data) {
|
||||
return request({
|
||||
url: `/ReadingClinicalData/setTaskValid`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB |
@@ -4,14 +4,15 @@
|
||||
<el-tabs v-model="trialsTab" @tab-click="clickTab">
|
||||
<el-tab-pane v-for="item of trialsRouter.children.find(v => {return v.name == 'TrialsPanel'}).children" :key="`tab${item.path}`" :disabled="TotalNeedSignTrialDocCount !== 0 && item.path !== '/trials/trials-panel/attachments'" :label="$t(item.LanguageMark)" :name="item.path">
|
||||
<el-tabs v-if="!item.tabHiddn" v-model="trialsTabChild" @tab-click="clickTab">
|
||||
<el-tab-pane
|
||||
v-for="item1 of item.children"
|
||||
v-if="TrialConfig && isShow(item1.path)"
|
||||
:key="`tab1${item1.path}`"
|
||||
:disabled="TotalNeedSignTrialDocCount !== 0 && item1.path !== '/trials/trials-panel/attachments/self-attachment' || (TrialStatusStr === 'Initializing' && (item1.path === '/trials/trials-panel/setting/personnel-manage' || item1.path === '/trials/trials-panel/setting/qc-question' || item1.path === '/trials/trials-panel/setting/reading-unit' || item1.path === '/trials/trials-panel/setting/medical-audit' || item1.path === '/trials/trials-panel/setting/email-manage'))"
|
||||
:label="$t(item1.LanguageMark)"
|
||||
:name="item1.path"
|
||||
/>
|
||||
<template v-for="item1 of item.children">
|
||||
<el-tab-pane
|
||||
v-if="TrialConfig && isShow(item1.path)"
|
||||
:key="`tab1${item1.path}`"
|
||||
:disabled="TotalNeedSignTrialDocCount !== 0 && item1.path !== '/trials/trials-panel/attachments/self-attachment' || (TrialStatusStr === 'Initializing' && (item1.path === '/trials/trials-panel/setting/personnel-manage' || item1.path === '/trials/trials-panel/setting/qc-question' || item1.path === '/trials/trials-panel/setting/reading-unit' || item1.path === '/trials/trials-panel/setting/medical-audit' || item1.path === '/trials/trials-panel/setting/email-manage'))"
|
||||
:label="$t(item1.LanguageMark)"
|
||||
:name="item1.path"
|
||||
/>
|
||||
</template>
|
||||
</el-tabs>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -126,6 +127,10 @@ export default {
|
||||
var additionalAssessmentList = [
|
||||
'/trials/trials-panel/subject/brain-metastasis'
|
||||
]
|
||||
let dicomList = [
|
||||
'/trials/trials-panel/trial-summary/image-inspect',
|
||||
'/trials/trials-panel/trial-summary/push-record',
|
||||
]
|
||||
if (this.TrialConfig.QCProcessEnum === 0 && ~qualityList.indexOf(path)) {
|
||||
isShow = false
|
||||
}
|
||||
@@ -135,6 +140,9 @@ export default {
|
||||
if (!this.IsAdditionalAssessment && ~additionalAssessmentList.indexOf(path)) {
|
||||
isShow = false
|
||||
}
|
||||
if ((!this.TrialConfig.IsPACSConnect || !this.TrialConfig.IsTrialPACSConfirmed) && ~dicomList.indexOf(path)) {
|
||||
isShow = false
|
||||
}
|
||||
return isShow
|
||||
},
|
||||
goBack() {
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
import Vue from "vue";
|
||||
import FEEDBACKCOMP from "./index.vue";
|
||||
const FBConstructor = Vue.extend(FEEDBACKCOMP);
|
||||
|
||||
const FB = options => {
|
||||
const { type, callBack, cancelBack, trialId = null, Id = null, visitTaskId = null } = options;
|
||||
if (!type) throw `type is requred.but ${type}`
|
||||
const id = `FB${new Date().getTime()}`;
|
||||
const instance = new FBConstructor();
|
||||
instance.id = id;
|
||||
instance.vm = instance.$mount();
|
||||
if (instance.vm.visible) return;
|
||||
document.body.appendChild(instance.vm.$el);
|
||||
console.log(type);
|
||||
instance.vm.open({ type, trialId, Id, visitTaskId });
|
||||
instance.vm.$on("success", (Id) => {
|
||||
if (callBack) callBack();
|
||||
|
||||
});
|
||||
instance.vm.$on("closed", () => {
|
||||
document.body.removeChild(instance.vm.$el);
|
||||
instance.vm.$destroy();
|
||||
if (cancelBack) cancelBack()
|
||||
});
|
||||
return instance.vm;
|
||||
}
|
||||
export default FB;
|
||||
@@ -0,0 +1,7 @@
|
||||
import FEEDBACKCOMP from "./index.vue";
|
||||
import FB from "./fun";
|
||||
|
||||
export default Vue => {
|
||||
Vue.component(FEEDBACKCOMP.name, FEEDBACKCOMP);
|
||||
Vue.prototype.$FB = FB;
|
||||
};
|
||||
@@ -0,0 +1,400 @@
|
||||
<template>
|
||||
<!--FEEDBACK-->
|
||||
<div v-if="visible" @click.stop="() => false">
|
||||
<el-dialog
|
||||
:visible.sync="visible"
|
||||
v-dialogDrag
|
||||
width="540px"
|
||||
:close-on-click-modal="false"
|
||||
@close="cancel"
|
||||
>
|
||||
<div slot="title">
|
||||
{{ title }}
|
||||
</div>
|
||||
<!-- 项目详情 -->
|
||||
<div class="trialsBox" v-if="visitTaskId">
|
||||
<el-form
|
||||
label-position="right"
|
||||
:model="form"
|
||||
:inline="true"
|
||||
class="trialsForm"
|
||||
v-if="type === 'detail'"
|
||||
>
|
||||
<el-form-item :label="$t('feedBack:trials:code')" style="width: 40%">
|
||||
<span>{{ form.TrialCode }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('feedBack:trials:name')" style="width: 40%">
|
||||
<span>{{ form.ExperimentName }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('feedBack:trials:siteCode')"
|
||||
style="width: 40%"
|
||||
>
|
||||
<span>{{ form.TrialSiteCode }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('feedBack:trials:visit')" style="width: 40%">
|
||||
<span>{{ form.SubjectVisitName }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-form
|
||||
ref="feedBackForm"
|
||||
label-position="right"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="100px"
|
||||
>
|
||||
<!-- 影像异常tip -->
|
||||
<p class="tip" v-if="type === 'imgfail'">
|
||||
<i
|
||||
class="el-icon-warning-outline"
|
||||
style="color: #f56c6c; font-size: 24px"
|
||||
></i>
|
||||
<span>{{ $t("feedBack:imgfail:tip") }}</span>
|
||||
</p>
|
||||
<!-- 问题反馈 -->
|
||||
<el-form-item
|
||||
:label="$t('feedBack:form:feedBack')"
|
||||
prop="QuestionType"
|
||||
v-if="type === 'feedback' && trialId"
|
||||
>
|
||||
<el-select v-model="form.QuestionType" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in QuestionTypeOptions"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 问题反馈 -->
|
||||
<el-form-item
|
||||
:label="$t('feedBack:form:feedBack')"
|
||||
prop="QuestionType"
|
||||
v-if="type === 'detail'"
|
||||
>
|
||||
<span>{{
|
||||
QuestionTypeOptions.filter(
|
||||
(item) => item.value === form.QuestionType
|
||||
)[0].label
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<!-- 问题描述 -->
|
||||
<el-form-item
|
||||
:label="$t('feedBack:form:description')"
|
||||
prop="QuestionDescription"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.QuestionDescription"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
:maxlength="500"
|
||||
:disabled="type === 'detail'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 截图 -->
|
||||
<el-form-item :label="$t('feedBack:form:screenshot')" prop="screenshot">
|
||||
<uploadImage
|
||||
:path.sync="form.ScreenshotList"
|
||||
:disabled="type === 'detail'"
|
||||
ref="uploadImage"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 反馈时间 -->
|
||||
<el-form-item
|
||||
:label="$t('feedBack:form:time')"
|
||||
prop="screenshot"
|
||||
v-if="type === 'detail'"
|
||||
>
|
||||
<span>{{ form.CreateTime }}</span>
|
||||
</el-form-item>
|
||||
<!-- 状态 -->
|
||||
<el-form-item
|
||||
:label="$t('feedBack:form:status')"
|
||||
prop="screenshot"
|
||||
v-if="type === 'detail' && level > 7"
|
||||
>
|
||||
<el-switch
|
||||
v-model="form.State"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
:active-text="$fd('FeedBackStatus', 1)"
|
||||
:inactive-text="$fd('FeedBackStatus', 0)"
|
||||
:disabled="level < 8 || !isStateChange"
|
||||
@change="changeState"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" v-if="type !== 'detail' || isImgfail">
|
||||
<!-- 取消 -->
|
||||
<el-button size="small" @click.stop="cancel">
|
||||
{{ $t("feedBack:button:cancel") }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click.stop="save"
|
||||
:loading="loading"
|
||||
>
|
||||
{{ $t("feedBack:button:save") }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import uploadImage from "./uploadImage.vue";
|
||||
import {
|
||||
addOrUpdateUserFeedBack,
|
||||
getUserFeedBackInfo,
|
||||
batchUpdateFeedBackState,
|
||||
} from "@/api/trials.js";
|
||||
export default {
|
||||
name: "FB",
|
||||
components: { uploadImage },
|
||||
data() {
|
||||
return {
|
||||
title: null,
|
||||
visible: false,
|
||||
loading: false,
|
||||
options: [],
|
||||
type: null, // detail 表格详情 feedback 填写反馈 imgfail 影像异常
|
||||
trialId: null, // 项目id
|
||||
Id: null, // 反馈数据id
|
||||
visitTaskId: null, // 任务id
|
||||
isImgfail: false, // 是否是影像异常
|
||||
isStateChange: true, // 是否可以切换状态
|
||||
form: {
|
||||
Id: null,
|
||||
SubjectId: null,
|
||||
SubjectVisitId: null,
|
||||
QuestionType: 0,
|
||||
QuestionDescription: null,
|
||||
State: 0,
|
||||
TrialSiteId: null,
|
||||
TrialId: null,
|
||||
VisitTaskId: null,
|
||||
ScreenshotList: [],
|
||||
ScreenshotListStr: null,
|
||||
},
|
||||
rules: {
|
||||
QuestionType: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
QuestionDescription: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: "blur",
|
||||
},
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value.length < 5) {
|
||||
callback(
|
||||
new Error(this.$t("feedBack:ruleMessage:lengthLimitMin5"))
|
||||
);
|
||||
}
|
||||
callback();
|
||||
},
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
level() {
|
||||
if (this.hasPermi(["role:dev", "role:admin"])) {
|
||||
return 9;
|
||||
}
|
||||
if (this.hasPermi(["role:pm"])) {
|
||||
return 8;
|
||||
}
|
||||
if (this.hasPermi(["role:ir", "role:crc"])) {
|
||||
return 7;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
QuestionTypeOptions() {
|
||||
if (this.level > 7) {
|
||||
return [
|
||||
...this.$d.FeedBackTypeToCRC.filter((item) => item.value > 0),
|
||||
...this.$d.FeedBackTypeToIR,
|
||||
];
|
||||
}
|
||||
if (this.hasPermi(["role:ir"])) {
|
||||
return this.$d.FeedBackTypeToIR;
|
||||
}
|
||||
if (this.hasPermi(["role:crc"])) {
|
||||
return this.$d.FeedBackTypeToCRC;
|
||||
}
|
||||
return [];
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
open(data) {
|
||||
let { type, trialId, Id, visitTaskId } = data;
|
||||
this.type = type;
|
||||
this.trialId = trialId;
|
||||
this.Id = Id;
|
||||
this.visitTaskId = visitTaskId;
|
||||
console.log(visitTaskId, "visitTaskId");
|
||||
if (visitTaskId) {
|
||||
this.isImgfail = true;
|
||||
}
|
||||
console.log(this.isImgfail, "isImgfail");
|
||||
this.setTypeOption();
|
||||
if (!Id) {
|
||||
this.title = this.setTitle();
|
||||
}
|
||||
if (Id || visitTaskId) {
|
||||
this.getInfo(Id, visitTaskId);
|
||||
}
|
||||
this.visible = true;
|
||||
},
|
||||
cancel() {
|
||||
this.visible = false;
|
||||
this.$emit("closed");
|
||||
},
|
||||
async save() {
|
||||
try {
|
||||
let validate = await this.$refs.feedBackForm.validate();
|
||||
if (!validate) return;
|
||||
if (this.trialId) {
|
||||
this.form.TrialId = this.trialId;
|
||||
}
|
||||
if (this.visitTaskId) {
|
||||
this.form.VisitTaskId = this.visitTaskId;
|
||||
}
|
||||
if (this.Id) {
|
||||
this.form.Id = this.Id;
|
||||
}
|
||||
this.loading = true;
|
||||
let res = await addOrUpdateUserFeedBack(this.form);
|
||||
this.loading = false;
|
||||
if (res.IsSuccess) {
|
||||
this.$emit("success");
|
||||
this.$message.success(this.$t("feedBack:save:success"));
|
||||
this.cancel();
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false;
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
// 修改状态
|
||||
async changeState() {
|
||||
if (this.isImgfail) return;
|
||||
try {
|
||||
let data = {
|
||||
IdList: [this.Id],
|
||||
State: this.form.State,
|
||||
};
|
||||
let res = await batchUpdateFeedBackState(data);
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t("feedBack:changeState:success"));
|
||||
this.$emit("success");
|
||||
this.cancel();
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
// 获取反馈详情
|
||||
async getInfo(Id, visitTaskId) {
|
||||
try {
|
||||
let data = {
|
||||
Id,
|
||||
visitTaskId,
|
||||
};
|
||||
let res = await getUserFeedBackInfo(data);
|
||||
if (res.IsSuccess && res.Result) {
|
||||
this.form = res.Result;
|
||||
this.Id = res.Result.Id;
|
||||
if (res.Result.State > 0) {
|
||||
this.isStateChange = false;
|
||||
}
|
||||
if (res.Result.VisitTaskId) {
|
||||
this.visitTaskId = res.Result.VisitTaskId;
|
||||
}
|
||||
let code = this.$fd("UserType", res.Result.UserTypeEnum);
|
||||
this.title = this.setTitle(code, res.Result.FeedBackFullName);
|
||||
if (visitTaskId) {
|
||||
code = `${res.Result.SubjectCode}-${res.Result.SubjectVisitName}`;
|
||||
this.title = this.setTitle(code, res.Result.FeedBackFullName);
|
||||
}
|
||||
this.$refs.uploadImage.initFileList(res.Result.ScreenshotList);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
setTypeOption() {
|
||||
if (!this.trialId) return (this.options = []);
|
||||
if (this.hasPermi(["role:ir"]))
|
||||
return (this.option = this.$d.FeedBackTypeToIR);
|
||||
if (this.hasPermi(["role:crc"]))
|
||||
return (this.option = this.$d.FeedBackTypeToCRC);
|
||||
},
|
||||
setTitle(code, name) {
|
||||
console.log(code, name);
|
||||
if (this.hasPermi(["role:pm"]) && this.visitTaskId) {
|
||||
return `${this.$t("feedBack:form:title:pm2")}(${code}/${name})`;
|
||||
}
|
||||
if (this.hasPermi(["role:pm", "role:dev", "role:admin"])) {
|
||||
return `${this.$t("feedBack:form:title:pm")}(${code},${name})`;
|
||||
}
|
||||
if (this.hasPermi(["role:ir", "role:crc"]) && this.type === "detail") {
|
||||
return `${this.$t("feedBack:form:detail:title")}`;
|
||||
}
|
||||
if (this.hasPermi(["role:ir", "role:crc"])) {
|
||||
return `${this.$t("feedBack:form:title")}`;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tip {
|
||||
width: 86%;
|
||||
margin: auto;
|
||||
margin-bottom: 20px;
|
||||
text-align: left;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// border-radius: 5px;
|
||||
// background-color: #eee;
|
||||
i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.trialsBox {
|
||||
margin: auto;
|
||||
margin-bottom: 20px;
|
||||
text-align: left;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 5px;
|
||||
background-color: #eee;
|
||||
}
|
||||
.trialsForm {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
.el-form-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,219 @@
|
||||
<template>
|
||||
<div class="upload-container">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
:class="{ uploadDisabled: disabled ? true : false }"
|
||||
action
|
||||
multiple
|
||||
:http-request="uploadFile"
|
||||
:before-upload="beforeUpload"
|
||||
:file-list="fileList"
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="remove"
|
||||
:on-exceed="handleExceed"
|
||||
accept=".png,.jpg,.jpeg"
|
||||
list-type="picture-card"
|
||||
>
|
||||
<i slot="default" class="el-icon-plus"></i>
|
||||
<div slot="file" slot-scope="{ file }">
|
||||
<viewer :ref="file.url" :images="fileList">
|
||||
<img
|
||||
class="el-upload-list__item-thumbnail"
|
||||
:src="`${file.url}`"
|
||||
alt=""
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
<span class="el-upload-list__item-actions" v-if="!isUpload">
|
||||
<span
|
||||
class="el-upload-list__item-preview"
|
||||
@click="handlePictureCardPreview(file)"
|
||||
>
|
||||
<i class="el-icon-zoom-in"></i>
|
||||
</span>
|
||||
<span
|
||||
class="el-upload-list__item-delete"
|
||||
v-if="!disabled"
|
||||
@click="handleRemove(file)"
|
||||
>
|
||||
<i class="el-icon-delete"></i>
|
||||
</span>
|
||||
</span>
|
||||
<div class="loadingBox" v-else>
|
||||
<i class="el-icon-loading" style="color: #fff; margin: auto"></i>
|
||||
</div>
|
||||
</viewer>
|
||||
</div>
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const type = "Statement of Work";
|
||||
export default {
|
||||
name: "UploadImage",
|
||||
props: {
|
||||
path: {
|
||||
required: true,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
disabled: {
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
btnDisabled: false,
|
||||
isUpload: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
remove(file, fileList) {
|
||||
// this.$emit("update:path", null);
|
||||
},
|
||||
fileToBlob(file) {
|
||||
// 创建 FileReader 对象
|
||||
const reader = new FileReader();
|
||||
return new Promise((resolve) => {
|
||||
// FileReader 添加 load 事件
|
||||
reader.addEventListener("load", (e) => {
|
||||
let blob;
|
||||
if (typeof e.target.result === "object") {
|
||||
blob = new Blob([e.target.result]);
|
||||
} else {
|
||||
blob = e.target.result;
|
||||
}
|
||||
resolve(blob);
|
||||
});
|
||||
// FileReader 以 ArrayBuffer 格式 读取 File 对象中数据
|
||||
reader.readAsArrayBuffer(file);
|
||||
});
|
||||
},
|
||||
// 上传oss
|
||||
async uploadToOSS(name, file) {
|
||||
try {
|
||||
let res = await this.OSSclient.put(
|
||||
`/System/GeneralDocuments/${name}`,
|
||||
file
|
||||
);
|
||||
return res;
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
initFileList(list) {
|
||||
if (list && list.length > 0) {
|
||||
this.fileList = [];
|
||||
list.forEach((item, index) => {
|
||||
let name = item.split("/");
|
||||
this.fileList.push({
|
||||
name: name[name.length - 1],
|
||||
path: item,
|
||||
fullPath: this.OSSclientConfig.basePath + item,
|
||||
url: this.OSSclientConfig.basePath + item,
|
||||
uid: `${name[name.length - 1]}${index}`,
|
||||
});
|
||||
});
|
||||
console.log(this.fileList);
|
||||
}
|
||||
},
|
||||
async uploadFile(param) {
|
||||
var fileName = param.file.name;
|
||||
this.isUpload = true;
|
||||
this.btnDisabled = true;
|
||||
let file = await this.fileToBlob(param.file);
|
||||
let res = await this.uploadToOSS(fileName, file);
|
||||
this.btnDisabled = false;
|
||||
if (!res) return (this.isUpload = false);
|
||||
this.fileList.push({
|
||||
url: this.OSSclientConfig.basePath + res.name,
|
||||
path: res.name,
|
||||
uid: param.file.uid,
|
||||
});
|
||||
this.$emit("update:path", [...this.path, res.name]);
|
||||
this.isUpload = false;
|
||||
return false;
|
||||
},
|
||||
beforeUpload(file, fileList) {
|
||||
const isValidFile = this.fileValid(file.name, ["png", "jpg", "jpeg"]);
|
||||
if (isValidFile) {
|
||||
// this.fileList = [];
|
||||
} else {
|
||||
this.$alert(this.$t("feedBack:uploadImg:format"));
|
||||
return false;
|
||||
}
|
||||
},
|
||||
handlePreview(file) {
|
||||
file.fullPath ? window.open(file.fullPath, "_blank") : "";
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
this.$message.warning(`Upload is currently limited to 1 file`);
|
||||
},
|
||||
fileValid(fileName, typeArr) {
|
||||
var extendName = fileName
|
||||
.substring(fileName.lastIndexOf(".") + 1)
|
||||
.toLocaleLowerCase();
|
||||
if (typeArr.indexOf(extendName) > -1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.$refs[file.url].$viewer.show();
|
||||
},
|
||||
handleRemove(file) {
|
||||
let index = this.fileList.findIndex((item) => item.uid === file.uid);
|
||||
this.fileList.splice(index, 1);
|
||||
let arr = this.fileList.map((item) => item.path);
|
||||
this.$emit("update:path", arr);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.upload-container .el-upload--text {
|
||||
border: none;
|
||||
width: 80px;
|
||||
height: 30px;
|
||||
}
|
||||
.upload-container .el-form-item__label {
|
||||
font-size: 12px;
|
||||
}
|
||||
.upload-container .el-upload-list__item {
|
||||
font-size: 12px;
|
||||
}
|
||||
.logoAMessage {
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.upload-container .uploadDisabled .el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
.upload-container .el-upload--picture-card {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
}
|
||||
.upload-container .el-upload-list--picture-card .el-upload-list__item {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
}
|
||||
.loadingBox {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,23 @@
|
||||
import Vue from "vue";
|
||||
import FEEDBACKCOMP from "./index.vue";
|
||||
const FBConstructor = Vue.extend(FEEDBACKCOMP);
|
||||
|
||||
const FBT = (options = {}) => {
|
||||
const { data = {} } = options;
|
||||
// if (!UserId) throw `UserId is requred.but ${UserId}`
|
||||
const id = `FB${new Date().getTime()}`;
|
||||
const instance = new FBConstructor();
|
||||
instance.id = id;
|
||||
instance.vm = instance.$mount();
|
||||
if (instance.vm.visible) return;
|
||||
document.body.appendChild(instance.vm.$el);
|
||||
instance.vm.open({ ...data });
|
||||
instance.vm.$on("success", (Id) => {
|
||||
});
|
||||
instance.vm.$on("closed", () => {
|
||||
document.body.removeChild(instance.vm.$el);
|
||||
instance.vm.$destroy();
|
||||
});
|
||||
return instance.vm;
|
||||
}
|
||||
export default FBT;
|
||||
@@ -0,0 +1,7 @@
|
||||
import FEEDBACKCOMP from "./index.vue";
|
||||
import FBT from "./fun";
|
||||
|
||||
export default Vue => {
|
||||
Vue.component(FEEDBACKCOMP.name, FEEDBACKCOMP);
|
||||
Vue.prototype.$FBT = FBT;
|
||||
};
|
||||
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<div v-if="visible" @click.stop="() => false">
|
||||
<el-dialog
|
||||
:visible.sync="visible"
|
||||
v-dialogDrag
|
||||
width="1200px"
|
||||
:close-on-click-modal="false"
|
||||
@close="cancel"
|
||||
>
|
||||
<div slot="title">
|
||||
{{ title }}
|
||||
</div>
|
||||
<feedBackTable :trialId="trialId" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import feedBackTable from "@/views/feedBack/index.vue";
|
||||
export default {
|
||||
name: "FBT",
|
||||
components: { feedBackTable },
|
||||
data() {
|
||||
return {
|
||||
title: null,
|
||||
visible: false,
|
||||
trialId: null,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
open(data) {
|
||||
let { code, name, trialId } = data;
|
||||
this.title = this.setTitle(code, name);
|
||||
this.trialId = trialId;
|
||||
this.visible = true;
|
||||
},
|
||||
cancel() {
|
||||
this.visible = false;
|
||||
this.$emit("closed");
|
||||
},
|
||||
setTitle(code, name) {
|
||||
if (this.hasPermi(["role:pm"])) {
|
||||
return `${this.$t("feedBack:table:title:pm")}(${code},${name})`;
|
||||
}
|
||||
if (this.hasPermi(["role:ir", "role:crc"])) {
|
||||
return `${this.$t("feedBack:table:title")}`;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-bottom: 0;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
@@ -224,6 +224,7 @@ import {
|
||||
addOrUpdateArchiveTaskStudy,
|
||||
} from "@/api/load.js";
|
||||
import { parseDicom, getThumbnail, dicomToOSS } from "@/utils/parseDicom.js";
|
||||
import store from "@/store";
|
||||
export default {
|
||||
name: "uploadList",
|
||||
props: {
|
||||
@@ -262,6 +263,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
isLoad() {
|
||||
store.dispatch("trials/setUnLock", this.isLoad);
|
||||
if (!this.isLoad) {
|
||||
this.$refs.file.value = null;
|
||||
if (this.dicomList.some((item) => item.isUpload === 3)) {
|
||||
@@ -747,6 +749,7 @@ export default {
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.isClose = true;
|
||||
store.dispatch("trials/setUnLock", false);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -66,13 +66,13 @@
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!--下载--->
|
||||
<el-button
|
||||
<!-- <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"
|
||||
@@ -103,6 +103,7 @@ 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";
|
||||
import store from "@/store";
|
||||
export default {
|
||||
name: "uploadImage",
|
||||
props: {
|
||||
@@ -247,16 +248,356 @@ export default {
|
||||
},
|
||||
// 打包下载
|
||||
async downloadImage(item) {
|
||||
try {
|
||||
await downloadImage(
|
||||
this.$route.query.trialId,
|
||||
item.SourceSubjectVisitId
|
||||
);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
let zipName = "压缩包.zip";
|
||||
let InstanceInfoList = [
|
||||
{
|
||||
Id: "e634352c-6465-32ba-04b3-824ec8d346a8",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/e634352c-6465-32ba-04b3-824ec8d346a8",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 1,
|
||||
},
|
||||
{
|
||||
Id: "d4ad1dd2-747b-6de7-8ad4-3e81c58943dd",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/d4ad1dd2-747b-6de7-8ad4-3e81c58943dd",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 2,
|
||||
},
|
||||
{
|
||||
Id: "6a1d1d12-2b4a-0368-c7e1-d44f7180b280",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/6a1d1d12-2b4a-0368-c7e1-d44f7180b280",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 3,
|
||||
},
|
||||
{
|
||||
Id: "7a8fb1b4-9ea8-1189-4ca6-b9a9b9547a39",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/7a8fb1b4-9ea8-1189-4ca6-b9a9b9547a39",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 4,
|
||||
},
|
||||
{
|
||||
Id: "8d00be19-5ac5-c608-dbd0-41f84cfacd95",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/8d00be19-5ac5-c608-dbd0-41f84cfacd95",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 5,
|
||||
},
|
||||
{
|
||||
Id: "729ded91-0eca-78f2-1c17-5182d4f27e3a",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/729ded91-0eca-78f2-1c17-5182d4f27e3a",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 6,
|
||||
},
|
||||
{
|
||||
Id: "9e2fd28c-72fe-bb66-e0ce-40115cd82260",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/9e2fd28c-72fe-bb66-e0ce-40115cd82260",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 7,
|
||||
},
|
||||
{
|
||||
Id: "9b31613f-3c9e-28ad-fd9e-7001a69e09b5",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/9b31613f-3c9e-28ad-fd9e-7001a69e09b5",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 8,
|
||||
},
|
||||
{
|
||||
Id: "4982b453-d068-7e56-2acd-a361d8584f35",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/4982b453-d068-7e56-2acd-a361d8584f35",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 9,
|
||||
},
|
||||
{
|
||||
Id: "8279cf5a-2551-43ea-3fe4-673e88ba7e5a",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/8279cf5a-2551-43ea-3fe4-673e88ba7e5a",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 10,
|
||||
},
|
||||
{
|
||||
Id: "6424e9c5-d31b-9388-3b64-a56705ab6fc8",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/6424e9c5-d31b-9388-3b64-a56705ab6fc8",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 11,
|
||||
},
|
||||
{
|
||||
Id: "a73cf3f9-defa-0c22-dfdc-8c5bfb93c9a7",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/a73cf3f9-defa-0c22-dfdc-8c5bfb93c9a7",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 12,
|
||||
},
|
||||
{
|
||||
Id: "dbfaafea-f721-0a93-37c6-69bcc0d957c3",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/dbfaafea-f721-0a93-37c6-69bcc0d957c3",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 13,
|
||||
},
|
||||
{
|
||||
Id: "52000ac1-6a5b-83e2-5468-4dfdf394e455",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/52000ac1-6a5b-83e2-5468-4dfdf394e455",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 14,
|
||||
},
|
||||
{
|
||||
Id: "de34a347-41f4-1018-a710-48d81fa9aadc",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/de34a347-41f4-1018-a710-48d81fa9aadc",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 15,
|
||||
},
|
||||
{
|
||||
Id: "251d6a13-26b7-935b-d765-0c5db1ed7dfc",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/251d6a13-26b7-935b-d765-0c5db1ed7dfc",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 16,
|
||||
},
|
||||
{
|
||||
Id: "b22e93c8-3f6a-484a-a32b-f7626689f8da",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/b22e93c8-3f6a-484a-a32b-f7626689f8da",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 17,
|
||||
},
|
||||
{
|
||||
Id: "6517400b-d4b5-db65-d026-8c06c40bf244",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/6517400b-d4b5-db65-d026-8c06c40bf244",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 18,
|
||||
},
|
||||
{
|
||||
Id: "8e70df99-525a-4ecd-5cf1-6c32698eaa3f",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/8e70df99-525a-4ecd-5cf1-6c32698eaa3f",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 19,
|
||||
},
|
||||
{
|
||||
Id: "7df907f2-b6a6-fd03-67ab-be86c497d412",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/7df907f2-b6a6-fd03-67ab-be86c497d412",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 20,
|
||||
},
|
||||
{
|
||||
Id: "ba31ba5b-728e-8301-273d-459fd3c65a43",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/ba31ba5b-728e-8301-273d-459fd3c65a43",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 21,
|
||||
},
|
||||
{
|
||||
Id: "7528c70c-5ba1-59c1-413c-7bfc984c0066",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/7528c70c-5ba1-59c1-413c-7bfc984c0066",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 22,
|
||||
},
|
||||
{
|
||||
Id: "15dd574d-fc82-c5b7-fefb-497346d4abbb",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/15dd574d-fc82-c5b7-fefb-497346d4abbb",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 23,
|
||||
},
|
||||
{
|
||||
Id: "6cd76aca-91fa-64ce-6077-af48c5e5b18b",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/6cd76aca-91fa-64ce-6077-af48c5e5b18b",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 24,
|
||||
},
|
||||
{
|
||||
Id: "2f0f9f4e-12b8-a6a8-d3f9-f43e2055653d",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/2f0f9f4e-12b8-a6a8-d3f9-f43e2055653d",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 25,
|
||||
},
|
||||
{
|
||||
Id: "3c49f379-8548-67cd-1333-dde28219c6e9",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/3c49f379-8548-67cd-1333-dde28219c6e9",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 26,
|
||||
},
|
||||
{
|
||||
Id: "910f43c8-123a-0753-aaf7-11081eef4268",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/910f43c8-123a-0753-aaf7-11081eef4268",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 27,
|
||||
},
|
||||
{
|
||||
Id: "ffad6b36-74aa-1c7d-01eb-18524da91f6e",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/ffad6b36-74aa-1c7d-01eb-18524da91f6e",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 28,
|
||||
},
|
||||
{
|
||||
Id: "9e2bf22d-8734-62ae-881a-7404064a95ce",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/9e2bf22d-8734-62ae-881a-7404064a95ce",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 29,
|
||||
},
|
||||
{
|
||||
Id: "eef8b291-ffdf-dbfb-244d-5e63dc5b8cc7",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/eef8b291-ffdf-dbfb-244d-5e63dc5b8cc7",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 30,
|
||||
},
|
||||
{
|
||||
Id: "12b0de3a-243c-78b9-b006-82f2cc633a0f",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/12b0de3a-243c-78b9-b006-82f2cc633a0f",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 31,
|
||||
},
|
||||
{
|
||||
Id: "4341ea87-7d54-2608-184e-01e5c976ce9f",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/4341ea87-7d54-2608-184e-01e5c976ce9f",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 32,
|
||||
},
|
||||
{
|
||||
Id: "4db2bac2-18eb-0589-d520-f297b2840e1d",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/4db2bac2-18eb-0589-d520-f297b2840e1d",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 33,
|
||||
},
|
||||
{
|
||||
Id: "9442c2a3-0972-67f7-afc3-6f1a47abefab",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/9442c2a3-0972-67f7-afc3-6f1a47abefab",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 34,
|
||||
},
|
||||
{
|
||||
Id: "a7fb75b0-0b09-5340-70cf-a11afd84b1ec",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/a7fb75b0-0b09-5340-70cf-a11afd84b1ec",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 35,
|
||||
},
|
||||
{
|
||||
Id: "753d7795-451a-bd32-69ea-fd58c1e89d63",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/753d7795-451a-bd32-69ea-fd58c1e89d63",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 36,
|
||||
},
|
||||
{
|
||||
Id: "33bf7274-de0a-e8f9-f97a-c58fb2ea3aaf",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/33bf7274-de0a-e8f9-f97a-c58fb2ea3aaf",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 37,
|
||||
},
|
||||
{
|
||||
Id: "adadae31-37a1-818d-3721-09a1d371c6a5",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/adadae31-37a1-818d-3721-09a1d371c6a5",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 38,
|
||||
},
|
||||
{
|
||||
Id: "f64e8b0d-d2ab-b112-5705-92c23cfc5df6",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/f64e8b0d-d2ab-b112-5705-92c23cfc5df6",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 39,
|
||||
},
|
||||
{
|
||||
Id: "781088b0-5afd-6eb3-5f87-9bfec210d490",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/781088b0-5afd-6eb3-5f87-9bfec210d490",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 40,
|
||||
},
|
||||
{
|
||||
Id: "56df4cef-8053-bff3-21f7-1b1841a3d6e6",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/56df4cef-8053-bff3-21f7-1b1841a3d6e6",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 41,
|
||||
},
|
||||
{
|
||||
Id: "a3e3dab9-7a61-f822-d113-42f46bc5e8ce",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/a3e3dab9-7a61-f822-d113-42f46bc5e8ce",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 42,
|
||||
},
|
||||
{
|
||||
Id: "1cc195b9-e498-179d-b927-6d706266decb",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/1cc195b9-e498-179d-b927-6d706266decb",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 43,
|
||||
},
|
||||
{
|
||||
Id: "7dca834f-d959-898e-a0cb-5c8244c4c4a9",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/7dca834f-d959-898e-a0cb-5c8244c4c4a9",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 44,
|
||||
},
|
||||
{
|
||||
Id: "13eeba83-2e93-800e-e934-a56061633c64",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/13eeba83-2e93-800e-e934-a56061633c64",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 45,
|
||||
},
|
||||
{
|
||||
Id: "971f0a62-92a3-6d04-53c5-51fa9155e28c",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/971f0a62-92a3-6d04-53c5-51fa9155e28c",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 46,
|
||||
},
|
||||
{
|
||||
Id: "2959d06c-5ac7-f3b9-63d4-1a56e3974fc7",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/2959d06c-5ac7-f3b9-63d4-1a56e3974fc7",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 47,
|
||||
},
|
||||
];
|
||||
let path = "https://zy-irc-test-store.oss-cn-shanghai.aliyuncs.com";
|
||||
let files = new Array();
|
||||
for (let i = 0; i < InstanceInfoList.length; i++) {
|
||||
let item = InstanceInfoList[i];
|
||||
let obj = {
|
||||
name: "file" + i,
|
||||
url: path + item.Path,
|
||||
};
|
||||
files.push(obj);
|
||||
}
|
||||
store.dispatch("trials/setUnLock", true);
|
||||
let res = await downloadImage(zipName, files);
|
||||
store.dispatch("trials/setUnLock", false);
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
store.dispatch("trials/setUnLock", false);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script>
|
||||
export default
|
||||
{
|
||||
export default {
|
||||
processSignature: {
|
||||
LogicalConfigConfirmation: 101, // 逻辑配置确认:逻辑配置确认操作
|
||||
ProcessConfigConfirmation: 102, // 流程配置确认:流程配置确认操作
|
||||
@@ -9,6 +8,8 @@ export default
|
||||
ProcessConfigUpdates: 105, // 流程配置更新:流程配置更新操作
|
||||
ExpeditedConfigUpdates: 106, // 加急配置更新:加急配置更新操作
|
||||
QCConfirmation: 107, // 质控问题配置:质控问题配置确认操作
|
||||
DicomConfigConfirmation: 110, // DICOM AE配置确认
|
||||
DicomConfigUpdates: 111, // DICOM AE配置更新
|
||||
ClinicalDataConfirmation: 201, // 临床数据完整性确认:临床数据完整性确认操作
|
||||
AgreeToRetransmit: 202, // 同意重传:同意重传操作
|
||||
QCSingleReviewPassed: 203, // 影像质控单审通过:影像质控审核操作
|
||||
@@ -25,9 +26,9 @@ export default
|
||||
ImageAssessmentReportConfirmation: 214, // 影像评估报告确认
|
||||
MedicalAuditConfirmation: 109, // 医学审核问题确认
|
||||
ReadingUnitConfirmation: 108, // 医学审核问题确认
|
||||
MedicalAudit: 215,// 医学审核
|
||||
HeavyReadingApproval: 216,// 重阅审批
|
||||
MedicalAudit: 215, // 医学审核
|
||||
HeavyReadingApproval: 216, // 重阅审批
|
||||
ResetAndAsyncCriterion: 218, //同步签名
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
+13
-2
@@ -3,7 +3,7 @@ import Vue from 'vue'
|
||||
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
|
||||
|
||||
import ElementUI, { MessageBox } from 'element-ui'
|
||||
import { getBasicDataAllSelect, getFrontInternationalizationList } from '@/api/dictionary/dictionary'
|
||||
import { getBasicDataAllSelect, getFrontInternationalizationList, getCurrentPublishInfo } from '@/api/dictionary/dictionary'
|
||||
import { sendMFAEmail } from "@/api/user.js";
|
||||
import { resetReadingRestTime } from '@/api/trials/reading'
|
||||
// import 'element-ui/lib/theme-chalk/index.css'
|
||||
@@ -60,6 +60,10 @@ import Preview from '@/components/Preview/index'
|
||||
Vue.use(Preview)
|
||||
import MFA from '@/components/MFA/index'
|
||||
Vue.use(MFA)
|
||||
import FB from '@/components/feedBack/index'
|
||||
Vue.use(FB)
|
||||
import FBT from '@/components/feedBackTable/index'
|
||||
Vue.use(FBT)
|
||||
import adaptive from '@/directive/adaptive/index'
|
||||
// 表格自适应指令
|
||||
Vue.use(adaptive)
|
||||
@@ -186,6 +190,9 @@ async function VueInit() {
|
||||
zhMessages[v.Code] = v.ValueCN
|
||||
enMessages[v.Code] = v.Value
|
||||
})
|
||||
// 获取版本信息
|
||||
let PublishInfo = await getCurrentPublishInfo();
|
||||
Vue.prototype.$version = PublishInfo.Result;
|
||||
// 获取检查部位
|
||||
Vue.prototype.$getBodyPart = (id) => {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
@@ -358,6 +365,10 @@ async function VueInit() {
|
||||
}
|
||||
const h = _vm.$createElement
|
||||
/* eslint-disable */
|
||||
// eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION)
|
||||
// process.env.VUE_APP_LOGOUT_FOR_TIME
|
||||
// eval(process.env.VUE_APP_LOCK_FOR_PERMISSION)
|
||||
// process.env.VUE_APP_LOCK_FOR_TIME
|
||||
window.VUE_APP_COMPANY_NAME = process.env.VUE_APP_COMPANY_NAME;
|
||||
waitOperate(eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION) ? () => {
|
||||
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
|
||||
@@ -387,7 +398,7 @@ async function VueInit() {
|
||||
} : () => { }, process.env.VUE_APP_LOGOUT_FOR_TIME,
|
||||
eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => {
|
||||
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
|
||||
if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
|
||||
if (_vm.$store.state.trials.unlock || _vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
|
||||
count = 0;
|
||||
localStorage.setItem('count', '0')
|
||||
if (_vm.$route.path === '/login') {
|
||||
|
||||
+19
-6
@@ -10,8 +10,8 @@ import { OSSclient } from './utils/oss'
|
||||
|
||||
NProgress.configure({ showSpinner: false })
|
||||
|
||||
const whiteList = ['/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms']
|
||||
|
||||
const whiteList = ['/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/researchLogin_m', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms']
|
||||
store.state.trials.whiteList = whiteList;
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
NProgress.start()
|
||||
// 设置页面标题
|
||||
@@ -55,15 +55,28 @@ router.beforeEach(async (to, from, next) => {
|
||||
} else {
|
||||
/* has no token*/
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
// 在免登录whiteList中,直接进入
|
||||
if (to.path === '/readingDicoms' || to.path === '/noneDicomReading') {
|
||||
OSSclient()
|
||||
if (to.path === '/researchLogin') {
|
||||
console.log(to)
|
||||
const flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
|
||||
if (flag) {
|
||||
next(`/researchLogin_m?trialId=${to.query.trialId}&lang=${to.query.lang}`)
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
} else {
|
||||
// 在免登录whiteList中,直接进入
|
||||
if (to.path === '/readingDicoms' || to.path === '/noneDicomReading') {
|
||||
OSSclient()
|
||||
}
|
||||
next()
|
||||
}
|
||||
next()
|
||||
} else {
|
||||
if (to.path === '/researchForm') {
|
||||
next(`/researchLogin?`)
|
||||
NProgress.done()
|
||||
} else if (to.path === '/researchDetail_m') {
|
||||
next(`/researchLogin_m?`)
|
||||
NProgress.done()
|
||||
} else if (to.path === '/ReviewersResearchForm') {
|
||||
next(`/ReviewersResearch?`)
|
||||
NProgress.done()
|
||||
|
||||
@@ -201,6 +201,18 @@ export const constantRoutes = [
|
||||
component: () => import('@/views/research/form'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/researchLogin_m',
|
||||
name: 'researchLogin_m',
|
||||
component: () => import('@/views/research-mobile/login'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/researchDetail_m',
|
||||
name: 'researchDetail_m',
|
||||
component: () => import('@/views/research-mobile/detail'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/trialsResume',
|
||||
component: () => import('@/views/trials/trials-panel/enrolled-reviewers/resume/index'),
|
||||
|
||||
@@ -9,6 +9,9 @@ const getDefaultState = () => {
|
||||
studyListQuery: null,
|
||||
unlock: false,
|
||||
config: {},
|
||||
uploadTip: null,
|
||||
timer: null,
|
||||
whiteList: []
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import dicomParser from "dicom-parser";
|
||||
import dcmjs from './dcmjs'
|
||||
import { encoder } from "./encoder";
|
||||
|
||||
export const anonymization = function (file, config) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
|
||||
+81
-112
@@ -1,18 +1,23 @@
|
||||
import JSZip from "jszip";
|
||||
import axios from "axios";
|
||||
import { saveAs } from "file-saver";
|
||||
import Vue from 'vue';
|
||||
import store from "@/store";
|
||||
import {
|
||||
requestPackageAndAnonymizImage,
|
||||
} from "@/api/load.js";
|
||||
import streamSaver from "streamsaver";
|
||||
import "streamsaver/examples/zip-stream.js"
|
||||
let flag = {};
|
||||
export const resetFlag = () => {
|
||||
flag = {};
|
||||
store.state.trials.uploadTip = null;
|
||||
if (store.state.trials.timer) {
|
||||
clearInterval(store.state.trials.timer);
|
||||
store.state.trials.timer = null;
|
||||
}
|
||||
store.dispatch("trials/setUnLock", false);
|
||||
}
|
||||
export const downloadImage = async (id, id2, IsDicom = true) => {
|
||||
if (flag[`${id2}_${IsDicom}`]) return Vue.prototype.$message.warning(Vue.prototype.$t('trials:upload:tip:uploading'));
|
||||
// if (flag[`${id2}_${IsDicom}`]) return Vue.prototype.$message.warning(Vue.prototype.$t('trials:upload:tip:uploading'));
|
||||
if (flag[`${id2}_${IsDicom}`]) return false;
|
||||
flag[`${id2}_${IsDicom}`] = true
|
||||
try {
|
||||
let params = {
|
||||
@@ -25,26 +30,41 @@ export const downloadImage = async (id, id2, IsDicom = true) => {
|
||||
if (res.IsSuccess) {
|
||||
if (!res.Result) {
|
||||
flag[`${id2}_${IsDicom}`] = false;
|
||||
Vue.prototype.$message.warning(Vue.prototype.$t("trials:upload:message:not"))
|
||||
return 1;
|
||||
// Vue.prototype.$message.warning(Vue.prototype.$t("trials:upload:message:not"))
|
||||
let message = Vue.prototype.$t('trials:upload:tip:uploading').replace("xxx", res.OtherInfo.FileName);
|
||||
store.state.trials.uploadTip = message;
|
||||
if (!store.state.trials.timer) {
|
||||
store.state.trials.timer = setInterval(() => {
|
||||
downloadImage(id, id2, IsDicom);
|
||||
}, 2000);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Vue.prototype.$message.success(Vue.prototype.$t("trials:upload:message:startUpload"));
|
||||
if (store.state.trials.timer) {
|
||||
clearInterval(store.state.trials.timer);
|
||||
store.state.trials.timer = null;
|
||||
}
|
||||
let fileName = res.Result.split("/").pop();
|
||||
let href = Vue.prototype.OSSclientConfig.basePath + res.Result;
|
||||
download(href, res.OtherInfo.FileName, { id2, IsDicom })
|
||||
return 2;
|
||||
// let a = document.createElement("a");
|
||||
// // let fileName =
|
||||
// // res.Result.split("/")[res.Result.split("/").length - 1];
|
||||
// a.download = res.OtherInfo.FileName;
|
||||
// a.href = href;
|
||||
// a.click();
|
||||
// URL.revokeObjectURL(href);
|
||||
// let timer = setTimeout(() => {
|
||||
// a = null;
|
||||
// href = null;
|
||||
// timer = null;
|
||||
// }, 500)
|
||||
// return 2;
|
||||
if (fileName !== res.OtherInfo.FileName) {
|
||||
let message = Vue.prototype.$t('trials:upload:tip:uploading').replace("xxx", res.OtherInfo.FileName);
|
||||
store.state.trials.uploadTip = message;
|
||||
// Vue.prototype.$message.success(Vue.prototype.$t("trials:upload:message:startUpload"));
|
||||
return download(href, res.OtherInfo.FileName, { id2, IsDicom });
|
||||
|
||||
}
|
||||
let a = document.createElement("a");
|
||||
a.download = res.OtherInfo.FileName;
|
||||
a.href = href;
|
||||
a.click();
|
||||
URL.revokeObjectURL(href);
|
||||
let timer = setTimeout(() => {
|
||||
a = null;
|
||||
href = null;
|
||||
timer = null;
|
||||
}, 500)
|
||||
store.state.trials.uploadTip = null;
|
||||
return true;
|
||||
} else {
|
||||
flag[`${id2}_${IsDicom}`] = false;
|
||||
return false;
|
||||
@@ -54,95 +74,6 @@ export const downloadImage = async (id, id2, IsDicom = true) => {
|
||||
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}_${IsDicom}`] = false;
|
||||
zipObj = null;
|
||||
});
|
||||
})
|
||||
.catch((reason) => { flag[`${id2}_${IsDicom}`] = 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;
|
||||
@@ -156,8 +87,10 @@ export const fileDownload = (content, filename) => {
|
||||
let download = async (downloadUrl, downloadFileName, res) => {
|
||||
const blob = await getBlob(downloadUrl);
|
||||
flag[`${res.id2}_${res.IsDicom}`] = false;
|
||||
store.state.trials.uploadTip = null;
|
||||
store.dispatch("trials/setUnLock", false);
|
||||
saveAsB(blob, downloadFileName);
|
||||
return true;
|
||||
}
|
||||
|
||||
let getBlob = (url) => {
|
||||
@@ -196,4 +129,40 @@ let saveAsB = (blob, filename) => {
|
||||
body.removeChild(link);
|
||||
|
||||
window.URL.revokeObjectURL(link.href);
|
||||
}
|
||||
}
|
||||
|
||||
// 前端流式打包下载
|
||||
const handleBatchDown = async (item, zip) => {
|
||||
return new Promise((resolve) => {
|
||||
console.log("同步下载打包开始时间:" + new Date());
|
||||
// 创建压缩文件输出流
|
||||
const zipFileOutputStream = streamSaver.createWriteStream(zipName);
|
||||
// 创建下载文件流
|
||||
const fileIterator = files.values();
|
||||
const readableZipStream = new window.ZIP({
|
||||
async pull(ctrl) {
|
||||
const fileInfo = fileIterator.next();
|
||||
if (fileInfo.done) {//迭代终止
|
||||
ctrl.close();
|
||||
} else {
|
||||
const { name, url } = fileInfo.value;
|
||||
return fetch(url).then(res => {
|
||||
ctrl.enqueue({
|
||||
name,
|
||||
stream: () => res.body
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
if (window.WritableStream && readableZipStream.pipeTo) {
|
||||
// 开始下载
|
||||
readableZipStream
|
||||
.pipeTo(zipFileOutputStream)
|
||||
.then(() => { console.log("同步下载打包结束时间:" + new Date()); resolve(true) })
|
||||
} else {
|
||||
resolve(false);
|
||||
}
|
||||
})
|
||||
|
||||
};
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
<!-- <div class="studyDesc" style="border-bottom:1px solid #9e9e9e;" @click="closeDialog()">
|
||||
<span style="font-size:14px;color:#d0d0d0;margin:5px 0px;line-height: 25px;">返回列表</span>
|
||||
</div> -->
|
||||
<div class="studyDesc" style="line-height: 10px;">
|
||||
<div class="studyDesc">
|
||||
{{ studyTitle }}
|
||||
</div>
|
||||
<div class="studyDesc" style="line-height: 10px">
|
||||
<div class="studyDesc">
|
||||
{{ seriesCount }} Series
|
||||
</div>
|
||||
<div class="viewerSidethumbs ps" style="position: relative;">
|
||||
@@ -38,11 +38,12 @@
|
||||
</span>
|
||||
</span>-->
|
||||
<div class="viewernavitextwrapper">
|
||||
<div style="padding: 1px;">#{{ item.seriesTitle }}</div>
|
||||
<div style="padding: 1px;">#{{ item.seriesNumber }}</div>
|
||||
<div style="padding: 1px;">{{ item.description }}</div>
|
||||
<div
|
||||
v-show="item.instanceCount"
|
||||
style="padding: 1px;"
|
||||
>{{ item.instanceCount }} image
|
||||
>{{ item.modality }} : {{ item.instanceCount }} Series
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -131,8 +132,7 @@ export default {
|
||||
})
|
||||
if (!studyItem) return
|
||||
|
||||
this.studyTitle =
|
||||
studyItem.dicomInfo.patientName || studyItem.dicomInfo.description
|
||||
this.studyTitle = studyItem.dicomInfo.description
|
||||
this.seriesCount = studyItem.seriesList.length
|
||||
var scope = this
|
||||
|
||||
@@ -155,7 +155,8 @@ export default {
|
||||
|
||||
scope.seriesList.push({
|
||||
seriesNumber: series.seriesNumber,
|
||||
seriesTitle: series.description || series.modality || '(Anonymous)',
|
||||
description: series.description,
|
||||
modality: series.modality,
|
||||
instanceCount: series.instanceList.length,
|
||||
imageIds: imageIds,
|
||||
previewImageId: imageIds[0]
|
||||
@@ -257,7 +258,7 @@ export default {
|
||||
text-align: center;
|
||||
background: rgb(88 84 83);
|
||||
color: #d0d0d0;
|
||||
padding: 2px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.ps {
|
||||
|
||||
@@ -68,13 +68,11 @@
|
||||
<div>{{ instance.InstanceNumber }}</div>
|
||||
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" />
|
||||
</el-popover>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-show="item.instanceCount" style="padding: 1px;">
|
||||
{{ item.modality }}: {{ item.instanceCount }} image
|
||||
@@ -185,7 +183,8 @@ export default {
|
||||
loading: false,
|
||||
imageList: [],
|
||||
showSeriesList: [],
|
||||
currentLoadIns: []
|
||||
currentLoadIns: [],
|
||||
isFromCRCUpload: false
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
@@ -200,6 +199,7 @@ export default {
|
||||
changeURLStatic('TokenKey', '')
|
||||
}
|
||||
this.studyId = this.$router.currentRoute.query.studyId
|
||||
this.isFromCRCUpload = !!this.$router.currentRoute.query.isFromCRCUpload
|
||||
if (this.type === 'Series') {
|
||||
// this.initStudy()
|
||||
this.showDelete = parseInt(this.$router.currentRoute.query.showDelete)
|
||||
@@ -224,22 +224,20 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
loadStudy() {
|
||||
var scope = this
|
||||
getStudyInfo(scope.studyId).then(data => {
|
||||
if (data.IsSuccess) {
|
||||
scope.studyCode = data.Result.StudyCode
|
||||
scope.modality = data.Result.Modalities
|
||||
scope.seriesCount = data.Result.SeriesCount
|
||||
scope.description = data.Result.Description
|
||||
var url = `/series/list/${scope.studyId}`
|
||||
scope.getSeriesList(url)
|
||||
}
|
||||
})
|
||||
async loadStudy() {
|
||||
const data = await getStudyInfo(this.studyId)
|
||||
if (data.IsSuccess) {
|
||||
this.studyCode = data.Result.StudyCode
|
||||
this.modality = data.Result.Modalities
|
||||
this.seriesCount = data.Result.SeriesCount
|
||||
this.description = data.Result.Description
|
||||
const url = `/series/list/${this.studyId}`
|
||||
this.getSeriesList(url)
|
||||
}
|
||||
},
|
||||
getSeriesList(url) {
|
||||
var scope = this
|
||||
getSeriesList(url).then(data => {
|
||||
async getSeriesList(url) {
|
||||
try {
|
||||
const data = await getSeriesList(url)
|
||||
if (data.IsSuccess) {
|
||||
const { Result } = data
|
||||
var seriesList = []
|
||||
@@ -248,15 +246,18 @@ export default {
|
||||
item.InstanceInfoList.forEach(i => {
|
||||
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
|
||||
for (let j = 0; j < i.NumberOfFrames; j++) {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&seriesIndex=${index}`)
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&seriesIndex=${index}`)
|
||||
}
|
||||
i.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=0&instanceId=${i.Id}&seriesIndex=${index}`
|
||||
} else {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&seriesIndex=${index}`)
|
||||
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&seriesIndex=${index}`
|
||||
imageIds.push(imageId)
|
||||
i.ImageId = imageId
|
||||
}
|
||||
})
|
||||
var subjectVisitId = scope.$router.currentRoute.query.subjectVisitId
|
||||
var studyId = scope.$router.currentRoute.query.studyId
|
||||
var trialId = scope.$router.currentRoute.query.trialId
|
||||
var subjectVisitId = this.$router.currentRoute.query.subjectVisitId
|
||||
var studyId = this.$router.currentRoute.query.studyId
|
||||
var trialId = this.$router.currentRoute.query.trialId
|
||||
seriesList.push({
|
||||
trialId,
|
||||
subjectVisitId,
|
||||
@@ -271,38 +272,40 @@ export default {
|
||||
description: item.Description,
|
||||
isReading: item.IsReading,
|
||||
isDeleted: item.IsDeleted,
|
||||
previewImageUrl: item.ImageResizePath ? scope.OSSclientConfig.basePath + item.ImageResizePath : `/api/series/preview/${item.Id}`,
|
||||
previewImageUrl: item.ImageResizePath ? this.OSSclientConfig.basePath + item.ImageResizePath : `/api/series/preview/${item.Id}`,
|
||||
instanceCount: item.InstanceCount,
|
||||
prefetchInstanceCount: 0,
|
||||
hasLabel: item.HasLabel,
|
||||
keySeries: item.KeySeries,
|
||||
tpCode: scope.tpCode,
|
||||
tpCode: this.tpCode,
|
||||
loadStatus: false,
|
||||
imageloadedArr: [],
|
||||
isExistMutiFrames: item.IsExistMutiFrames
|
||||
})
|
||||
})
|
||||
scope.seriesList = seriesList
|
||||
if (scope.seriesList.length > 0) {
|
||||
this.seriesList = seriesList
|
||||
if (this.seriesList.length > 0) {
|
||||
this.loadAllImages()
|
||||
scope.$refs.dicomViewer.loadImageStack(scope.seriesList[0], scope.labels[scope.tpCode])
|
||||
scope.firstInstanceId = scope.seriesList[0].imageIds[0]
|
||||
this.$refs.dicomViewer.loadImageStack(this.seriesList[0], this.labels[this.tpCode])
|
||||
this.firstInstanceId = this.seriesList[0].imageIds[0]
|
||||
}
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
initSeries() {
|
||||
var scope = this
|
||||
this.studyCode = this.$router.currentRoute.query.studyCode
|
||||
this.modality = this.$router.currentRoute.query.modality
|
||||
this.seriesCount = 1
|
||||
this.description = this.$router.currentRoute.query.description
|
||||
var seriesId = this.$router.currentRoute.query.seriesId
|
||||
var seriesNumber = this.$router.currentRoute.query.seriesNumber
|
||||
var subjectVisitId = this.$router.currentRoute.query.subjectVisitId
|
||||
var studyId = this.$router.currentRoute.query.studyId
|
||||
var trialId = this.$router.currentRoute.query.trialId
|
||||
getInstanceList(seriesId).then(res => {
|
||||
async initSeries() {
|
||||
try {
|
||||
this.studyCode = this.$router.currentRoute.query.studyCode
|
||||
this.modality = this.$router.currentRoute.query.modality
|
||||
this.seriesCount = 1
|
||||
this.description = this.$router.currentRoute.query.description
|
||||
var seriesId = this.$router.currentRoute.query.seriesId
|
||||
var seriesNumber = this.$router.currentRoute.query.seriesNumber
|
||||
var subjectVisitId = this.$router.currentRoute.query.subjectVisitId
|
||||
var studyId = this.$router.currentRoute.query.studyId
|
||||
var trialId = this.$router.currentRoute.query.trialId
|
||||
const res = await getInstanceList(seriesId)
|
||||
if (!res.Result || (res.Result && res.Result.length === 0)) return
|
||||
var seriesInstanceUid = res.Result[0].SeriesInstanceUid
|
||||
var sliceThickness = res.Result[0].SliceThickness
|
||||
@@ -313,15 +316,19 @@ export default {
|
||||
let isExistMutiFrames = false
|
||||
const instanceInfoList = []
|
||||
res.Result.forEach(instance => {
|
||||
let imageId = ''
|
||||
if (instance.NumberOfFrames > 1) {
|
||||
for (let i = 0; i < instance.NumberOfFrames; i++) {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=${i}&instanceId=${instance.Id}&seriesIndex=0`)
|
||||
}
|
||||
isExistMutiFrames = true
|
||||
imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=0&instanceId=${instance.Id}&seriesIndex=0`
|
||||
} else {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&seriesIndex=0`)
|
||||
const path = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&seriesIndex=0`
|
||||
imageIds.push(path)
|
||||
imageId = path
|
||||
}
|
||||
instanceInfoList.push({ Id: instance.Id, InstanceNumber: instance.InstanceNumber, NumberOfFrames: instance.NumberOfFrames, Path: instance.Path })
|
||||
instanceInfoList.push({ Id: instance.Id, InstanceNumber: instance.InstanceNumber, NumberOfFrames: instance.NumberOfFrames, Path: instance.Path, ImageId: imageId })
|
||||
})
|
||||
seriesList.push({
|
||||
trialId,
|
||||
@@ -337,7 +344,7 @@ export default {
|
||||
description: this.description,
|
||||
isReading,
|
||||
isDeleted,
|
||||
previewImageUrl: res.OtherInfo.ImageResizePath ? scope.OSSclientConfig.basePath + res.OtherInfo.ImageResizePath : res.OtherInfo.ImageResizePath,
|
||||
previewImageUrl: res.OtherInfo.ImageResizePath ? this.OSSclientConfig.basePath + res.OtherInfo.ImageResizePath : res.OtherInfo.ImageResizePath,
|
||||
instanceCount: res.Result.length,
|
||||
prefetchInstanceCount: 0,
|
||||
loadStatus: false,
|
||||
@@ -352,7 +359,9 @@ export default {
|
||||
this.firstInstanceId = this.seriesList[0].imageIds[0]
|
||||
})
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
showSeriesImage(e, seriesIndex, series) {
|
||||
// if (seriesIndex === this.currentSeriesIndex) return
|
||||
@@ -365,7 +374,39 @@ export default {
|
||||
this.currentSeriesIndex = seriesIndex
|
||||
this.$refs.dicomViewer.loadImageStack(this.seriesList[seriesIndex])
|
||||
if (!series.loadStatus) {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
series.isLoading = true
|
||||
var isAddToTakPool = false
|
||||
if (this.showSeriesList.includes(`0_${seriesIndex}`)) {
|
||||
isAddToTakPool = true
|
||||
} else {
|
||||
this.showSeriesList.push(`0_${seriesIndex}`)
|
||||
}
|
||||
if (!isAddToTakPool) {
|
||||
var priority = parseInt(new Date().getTime())
|
||||
// var images = []
|
||||
// if (series.isExistMutiFrames) {
|
||||
// images = series.imageIds.filter(i => i.includes('?frame=0'))
|
||||
// } else {
|
||||
// images = series.imageIds
|
||||
// }
|
||||
// images.map(imageId => {
|
||||
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
|
||||
// })
|
||||
if (series.isExistMutiFrames) {
|
||||
series.instanceInfoList.map(image => {
|
||||
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map(imageId => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoad()
|
||||
}
|
||||
} else {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
}
|
||||
}
|
||||
},
|
||||
showMultiFrames(series, seriesIndex, instanceInfo) {
|
||||
@@ -396,7 +437,39 @@ export default {
|
||||
}
|
||||
this.$refs.dicomViewer.loadImageStack(seriesInfo)
|
||||
if (!series.loadStatus) {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
var isAddToTakPool = false
|
||||
if (this.showSeriesList.includes(`0_${seriesIndex}`)) {
|
||||
isAddToTakPool = true
|
||||
} else {
|
||||
this.showSeriesList.push(`0_${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: 0, seriesIndex: seriesIndex, priority })
|
||||
// })
|
||||
// } else {
|
||||
// series.imageIds.map((imageId) => {
|
||||
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
|
||||
// })
|
||||
// }
|
||||
if (series.isExistMutiFrames) {
|
||||
series.instanceInfoList.map(image => {
|
||||
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map(imageId => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoad()
|
||||
}
|
||||
} else {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
}
|
||||
}
|
||||
},
|
||||
initStudy() {
|
||||
@@ -408,13 +481,6 @@ export default {
|
||||
const seriesInfo = JSON.parse(this.$router.currentRoute.query.series)
|
||||
var seriesList = []
|
||||
const imageIds = []
|
||||
// const scope = this
|
||||
// seriesInfo.InstanceList.forEach(function(item) {
|
||||
// imageIds.push(`wadouri:/api/instance/content/${item}`)
|
||||
// })
|
||||
// seriesInfo.InstanceList.forEach((id) => {
|
||||
// imageIds.push(`wadouri:http://123.56.94.154:7000/instance/content/${id}`)
|
||||
// })
|
||||
seriesInfo.InstancePathList.forEach((path) => {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${path}`)
|
||||
})
|
||||
@@ -444,22 +510,25 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
deleteSeries() {
|
||||
async deleteSeries() {
|
||||
this.loading = true
|
||||
var subjectVisitId = this.$router.currentRoute.query.subjectVisitId
|
||||
var studyId = this.$router.currentRoute.query.studyId
|
||||
var seriesId = this.$router.currentRoute.query.seriesId
|
||||
// trialId, subjectVisitId, studyId, seriesId, state
|
||||
setSeriesStatus(this.trialId, subjectVisitId, studyId, seriesId, 5).then(res => {
|
||||
try {
|
||||
const res = await setSeriesStatus(this.trialId, subjectVisitId, studyId, seriesId, 5)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
changeReadingStatus(callback, data) {
|
||||
async changeReadingStatus(callback, data) {
|
||||
let statusStr = ''
|
||||
if (callback) {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesReading')
|
||||
@@ -470,24 +539,30 @@ export default {
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !data.isReading))
|
||||
this.$confirm(message, {
|
||||
distinguishCancelAndClose: true,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const state = data.isReading ? 1 : 2
|
||||
this.loading = true
|
||||
|
||||
setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state).then(res => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isReading = !data.isReading
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
}).catch(() => {})
|
||||
const confirm = await this.$confirm(
|
||||
message,
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
const state = data.isReading ? 1 : 2
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isReading = !data.isReading
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
changeDeleteStatus(callback, data) {
|
||||
async changeDeleteStatus(callback, data) {
|
||||
let statusStr = ''
|
||||
if (callback) {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesDeleted')
|
||||
@@ -498,46 +573,51 @@ export default {
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !data.isDeleted))
|
||||
this.$confirm(message, {
|
||||
distinguishCancelAndClose: true,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const state = data.isDeleted ? 5 : 4
|
||||
this.loading = true
|
||||
// var trialId = this.$router.currentRoute.query.trialId
|
||||
// var subjectVisitId = this.$router.currentRoute.query.subjectVisitId
|
||||
// var studyId = this.$router.currentRoute.query.studyId
|
||||
// var seriesId = this.$router.currentRoute.query.seriesId
|
||||
setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state).then(res => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isDeleted = !data.isDeleted
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
}).catch(() => {})
|
||||
const confirm = await this.$confirm(
|
||||
message,
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
const state = data.isDeleted ? 5 : 4
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isDeleted = !data.isDeleted
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
loadAllImages() {
|
||||
const seriesIndex = this.seriesList.findIndex(i => i.loadStatus === false)
|
||||
if (seriesIndex === -1) return
|
||||
const series = this.seriesList[seriesIndex]
|
||||
var priority = new Date().getTime()
|
||||
for (let i = 0; i < series.imageIds.length; i++) {
|
||||
const imageId = series.imageIds[i]
|
||||
if (series.isExistMutiFrames) {
|
||||
const params = this.getInstanceInfo(imageId)
|
||||
if (params.frame && params.frame > 0) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
var p = null
|
||||
if (this.firstInstanceId === imageId) {
|
||||
p = priority * 100
|
||||
} else {
|
||||
p = priority - 1
|
||||
}
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, seriesIndex: seriesIndex, priority: p })
|
||||
// var images = []
|
||||
// if (series.isExistMutiFrames) {
|
||||
// images = series.imageIds.filter(i => i.includes('?frame=0'))
|
||||
// } else {
|
||||
// images = series.imageIds
|
||||
// }
|
||||
// images.map(imageId => {
|
||||
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
|
||||
// })
|
||||
if (series.isExistMutiFrames) {
|
||||
series.instanceInfoList.map(image => {
|
||||
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map(imageId => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoad()
|
||||
@@ -562,60 +642,6 @@ export default {
|
||||
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)
|
||||
})
|
||||
})
|
||||
},
|
||||
imageLoaded(image, seriesUid) {
|
||||
var seriesIndex = image.seriesIndex
|
||||
if (seriesIndex < 0) return
|
||||
if (this.seriesList[seriesIndex].imageloadedArr.indexOf(image.imageId) < 0) {
|
||||
++this.seriesList[seriesIndex].prefetchInstanceCount
|
||||
this.seriesList[seriesIndex].imageloadedArr.push(image.imageId)
|
||||
|
||||
if (this.seriesList[seriesIndex].prefetchInstanceCount >= this.seriesList[seriesIndex].instanceCount) {
|
||||
this.seriesList[seriesIndex].prefetchInstanceCount = this.seriesList[seriesIndex].instanceCount
|
||||
// 设置当前序列状态为已下载完成
|
||||
this.seriesList[seriesIndex].loadStatus = true
|
||||
// if (!this.isLoadedAll) {
|
||||
// this.loadAllImages()
|
||||
// }
|
||||
}
|
||||
}
|
||||
},
|
||||
imageLoaded2(imageId, seriesUid) {
|
||||
var seriesIndex = -1
|
||||
for (let i = 0; i < this.seriesList.length; ++i) {
|
||||
if (this.seriesList[i].seriesUid === seriesUid) {
|
||||
seriesIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
if (seriesIndex < 0) return
|
||||
|
||||
const imageIdIndex = this.seriesList[seriesIndex].imageIds.indexOf(imageId)
|
||||
if (imageIdIndex < 0) return
|
||||
if (this.seriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
|
||||
++this.seriesList[seriesIndex].prefetchInstanceCount
|
||||
this.seriesList[seriesIndex].imageloadedArr.push(imageId)
|
||||
|
||||
if (this.seriesList[seriesIndex].prefetchInstanceCount >= this.seriesList[seriesIndex].instanceCount) {
|
||||
this.seriesList[seriesIndex].prefetchInstanceCount = this.seriesList[seriesIndex].instanceCount
|
||||
// 设置当前序列状态为已下载完成
|
||||
this.seriesList[seriesIndex].loadStatus = true
|
||||
// if (!this.isLoadedAll) {
|
||||
// this.loadAllImages()
|
||||
// }
|
||||
}
|
||||
}
|
||||
},
|
||||
datasetsCacheChanged(e) {
|
||||
// const uri = e.detail.uri
|
||||
const cacheInfo = e.detail.cacheInfo
|
||||
@@ -674,52 +700,9 @@ export default {
|
||||
this.seriesList[seriesIndex].prefetchInstanceCount = instanceCount * 100
|
||||
// 设置当前序列状态为已下载完成
|
||||
this.seriesList[seriesIndex].loadStatus = true
|
||||
this.loadAllImages()
|
||||
}
|
||||
}
|
||||
},
|
||||
cornerstoneImageLoaded(e) {
|
||||
if (this.firstInstanceId === e.detail.image.imageId && !this.isStartLoad) {
|
||||
// 初始化图像加载完成时,自动下载
|
||||
this.loadAllImages()
|
||||
this.isStartLoad = true
|
||||
// requestPoolManager.executeTask()
|
||||
}
|
||||
const uri = e.detail.image.sharedCacheKey
|
||||
const index = this.cachedImages.findIndex(item => item.uri === uri)
|
||||
if (index === -1) {
|
||||
this.cachedImages.push({ uri: uri, timestamp: new Date().getTime() })
|
||||
} else {
|
||||
this.cachedImages[index].timestamp = new Date().getTime()
|
||||
}
|
||||
// loadedDataSets[uri].dataSet.byteArray.length
|
||||
// console.log(this.cachedImages.length)
|
||||
// console.log(cornerstoneWADOImageLoader.wadouri.dataSetCacheManager.getInfo().cacheSizeInBytes)
|
||||
// const imageId = e.detail.image.imageId
|
||||
var imageId = e.detail.image.imageId
|
||||
var seriesUid = e.detail.image.data.string('x0020000e')
|
||||
var seriesIndex = -1
|
||||
for (let i = 0; i < this.seriesList.length; ++i) {
|
||||
if (this.seriesList[i].seriesUid === seriesUid) {
|
||||
seriesIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
if (seriesIndex < 0) return
|
||||
|
||||
const imageIdIndex = this.seriesList[seriesIndex].imageIds.indexOf(imageId)
|
||||
if (imageIdIndex < 0) return
|
||||
if (this.seriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
|
||||
++this.seriesList[seriesIndex].prefetchInstanceCount
|
||||
this.seriesList[seriesIndex].imageloadedArr.push(imageId)
|
||||
|
||||
if (this.seriesList[seriesIndex].prefetchInstanceCount >= this.seriesList[seriesIndex].instanceCount) {
|
||||
this.seriesList[seriesIndex].prefetchInstanceCount = this.seriesList[seriesIndex].instanceCount
|
||||
// 设置当前序列状态为已下载完成
|
||||
this.seriesList[seriesIndex].loadStatus = true
|
||||
// if (!this.isLoadedAll) {
|
||||
// this.loadAllImages()
|
||||
// }
|
||||
if (!this.isFromCRCUpload) {
|
||||
this.loadAllImages()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
class="viewernavigatorwrapper"
|
||||
style="position: relative;border:1px solid #434343;"
|
||||
series-type="relation"
|
||||
@click="showRelationSeriesImage($event,seriesItem,index)"
|
||||
@click="showRelationSeriesImage($event,seriesItem,studyIndex,index)"
|
||||
>
|
||||
<!-- <el-image
|
||||
class="image-preview"
|
||||
@@ -264,6 +264,7 @@ import { setSeriesStatus } from '@/api/trials'
|
||||
import requestPoolManager from '@/utils/request-pool'
|
||||
import store from '@/store'
|
||||
import { changeURLStatic } from '@/utils/history.js'
|
||||
// import * as cornerstoneTools from 'cornerstone-tools'
|
||||
cornerstoneWADOImageLoader.external.dicomParser = dicomParser
|
||||
cornerstoneWADOImageLoader.external.cornerstone = cornerstone
|
||||
const maximumSizeInBytes = 1024 * 1024 * 1024 * 6
|
||||
@@ -289,7 +290,8 @@ export default {
|
||||
activeNames: [],
|
||||
relationActiveName: [],
|
||||
showSeriesList: [],
|
||||
currentLoadIns: []
|
||||
currentLoadIns: [],
|
||||
isFromCRCUpload: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -305,6 +307,7 @@ export default {
|
||||
this.visitInfo = this.$router.currentRoute.query.visitInfo
|
||||
this.isReading = this.$router.currentRoute.query.isReading ? this.$router.currentRoute.query.isReading * 1 : 0
|
||||
this.showDelete = parseInt(this.$router.currentRoute.query.showDelete)
|
||||
this.isFromCRCUpload = !!this.$router.currentRoute.query.isFromCRCUpload
|
||||
// cornerstone.events.addEventListener('cornerstoneimageloaded', this.cornerstoneImageLoaded)
|
||||
this.getStudiesInfo()
|
||||
cornerstone.events.addEventListener('cornerstoneimageloadprogress', this.cornerstoneimageloadprogress)
|
||||
@@ -315,72 +318,98 @@ export default {
|
||||
},
|
||||
beforeDestroy() {
|
||||
requestPoolManager.stopTaskTimer()
|
||||
window.removeEventListener('beforeunload', e => {
|
||||
cornerstone.imageCache.purgeCache()
|
||||
window.removeEventListener('beforeunload', e => {
|
||||
cornerstone.imageCache.purgeCache()
|
||||
requestPoolManager.resetRequestPool()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 获取某个访视下所有的检查信息
|
||||
getStudiesInfo() {
|
||||
async getStudiesInfo() {
|
||||
this.studyList = []
|
||||
getVisitStudyList(this.trialId, this.subjectVisitId, this.isReading).then(res => {
|
||||
res.Result.forEach((study,studyIndex) => {
|
||||
const data = {}
|
||||
data.StudyId = study.StudyId
|
||||
data.StudyCode = study.StudyCode
|
||||
data.Modalities = study.Modalities
|
||||
data.SeriesCount = study.SeriesCount
|
||||
data.InstanceCount = study.InstanceCount
|
||||
data.InstanceCount = study.InstanceCount
|
||||
data.PreviewImageCount = 0
|
||||
var seriesList = []
|
||||
study.SeriesList.forEach((series,seriesIndex) => {
|
||||
const imageIds = []
|
||||
series.InstanceInfoList.forEach(i => {
|
||||
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
|
||||
for (let j = 0; j < i.NumberOfFrames; j++) {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`)
|
||||
try {
|
||||
const res = await getVisitStudyList(this.trialId, this.subjectVisitId, this.isReading)
|
||||
if (res.IsSuccess) {
|
||||
res.Result.forEach((study, studyIndex) => {
|
||||
const data = {}
|
||||
data.StudyId = study.StudyId
|
||||
data.StudyCode = study.StudyCode
|
||||
data.Modalities = study.Modalities
|
||||
data.SeriesCount = study.SeriesCount
|
||||
data.InstanceCount = study.InstanceCount
|
||||
data.InstanceCount = study.InstanceCount
|
||||
data.PreviewImageCount = 0
|
||||
var seriesList = []
|
||||
study.SeriesList.forEach((series, seriesIndex) => {
|
||||
const imageIds = []
|
||||
series.InstanceInfoList.forEach(i => {
|
||||
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
|
||||
for (let j = 0; j < i.NumberOfFrames; j++) {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`)
|
||||
}
|
||||
i.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=0&instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`
|
||||
// imageIds.push(`${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}`)
|
||||
} else {
|
||||
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`
|
||||
imageIds.push(imageId)
|
||||
i.ImageId = imageId
|
||||
// imageIds.push(`${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}`)
|
||||
}
|
||||
} else {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`)
|
||||
}
|
||||
})
|
||||
seriesList.push({
|
||||
trialId: this.trialId,
|
||||
subjectVisitId: this.subjectVisitId,
|
||||
studyId: study.StudyId,
|
||||
imageIds: imageIds,
|
||||
instanceInfoList: series.InstanceInfoList,
|
||||
seriesId: series.Id,
|
||||
seriesUid: series.SeriesInstanceUid,
|
||||
seriesNumber: series.SeriesNumber,
|
||||
sliceThickness: series.SliceThickness,
|
||||
modality: series.Modality,
|
||||
description: series.Description,
|
||||
isReading: series.IsReading,
|
||||
isDeleted: series.IsDeleted,
|
||||
previewImageUrl: series.ImageResizePath ? this.OSSclientConfig.basePath + series.ImageResizePath : `/api/series/preview/${series.Id}`,
|
||||
instanceCount: series.InstanceCount,
|
||||
prefetchInstanceCount: 0,
|
||||
loadStatus: false,
|
||||
imageloadedArr: [],
|
||||
isExistMutiFrames: series.IsExistMutiFrames
|
||||
})
|
||||
seriesList.push({
|
||||
trialId: this.trialId,
|
||||
subjectVisitId: this.subjectVisitId,
|
||||
studyId: study.StudyId,
|
||||
imageIds: imageIds,
|
||||
instanceInfoList: series.InstanceInfoList,
|
||||
seriesId: series.Id,
|
||||
seriesUid: series.SeriesInstanceUid,
|
||||
seriesNumber: series.SeriesNumber,
|
||||
sliceThickness: series.SliceThickness,
|
||||
modality: series.Modality,
|
||||
description: series.Description,
|
||||
isReading: series.IsReading,
|
||||
isDeleted: series.IsDeleted,
|
||||
previewImageUrl: series.ImageResizePath ? this.OSSclientConfig.basePath + series.ImageResizePath : `/api/series/preview/${series.Id}`,
|
||||
instanceCount: series.InstanceCount,
|
||||
prefetchInstanceCount: 0,
|
||||
loadStatus: false,
|
||||
imageloadedArr: [],
|
||||
isExistMutiFrames: series.IsExistMutiFrames
|
||||
})
|
||||
})
|
||||
data.SeriesList = seriesList
|
||||
this.studyList.push(data)
|
||||
})
|
||||
data.SeriesList = seriesList
|
||||
this.studyList.push(data)
|
||||
})
|
||||
if (this.studyList.length > 0) {
|
||||
this.$refs.dicomViewer.loadImageStack(this.studyList[0].SeriesList[0])
|
||||
const imageId = this.studyList[0].SeriesList[0].imageIds[0]
|
||||
let instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
instanceId = instanceId.split('.')[0]
|
||||
this.firstInstanceId = instanceId
|
||||
this.activeNames = [this.studyList[0].StudyId]
|
||||
this.loadAllImages()
|
||||
if (this.studyList.length > 0) {
|
||||
this.$refs.dicomViewer.loadImageStack(this.studyList[0].SeriesList[0])
|
||||
const imageId = this.studyList[0].SeriesList[0].imageIds[0]
|
||||
let instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
instanceId = instanceId.split('.')[0]
|
||||
this.firstInstanceId = instanceId
|
||||
this.activeNames = [this.studyList[0].StudyId]
|
||||
this.loadImages(this.studyList[0].SeriesList[0], 0)
|
||||
}
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
loadImages(series, seriesIndex) {
|
||||
var priority = parseInt(new Date().getTime())
|
||||
if (series.isExistMutiFrames) {
|
||||
series.instanceInfoList.map(image => {
|
||||
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map(imageId => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoad()
|
||||
}
|
||||
},
|
||||
showSeriesImage(e, studyIndex, seriesIndex, series) {
|
||||
const element = e.currentTarget
|
||||
@@ -391,11 +420,37 @@ export default {
|
||||
element.classList.add('viewerSideActive')
|
||||
this.currentSeriesIndex = seriesIndex
|
||||
this.$refs.dicomViewer.loadImageStack(this.studyList[studyIndex].SeriesList[seriesIndex])
|
||||
// if (!series.loadStatus) {
|
||||
// requestPoolManager.changePriority(series.seriesId)
|
||||
// }
|
||||
if (!series.loadStatus) {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
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, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map(imageId => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoad()
|
||||
}
|
||||
} else {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
}
|
||||
}
|
||||
},
|
||||
showMultiFrames(studyIndex,series, seriesIndex, instanceInfo) {
|
||||
showMultiFrames(studyIndex, series, seriesIndex, instanceInfo) {
|
||||
this.currentSeriesIndex = seriesIndex
|
||||
const imageIds = []
|
||||
if (instanceInfo.NumberOfFrames && instanceInfo.NumberOfFrames > 1) {
|
||||
@@ -423,10 +478,33 @@ export default {
|
||||
}
|
||||
this.$refs.dicomViewer.loadImageStack(seriesInfo)
|
||||
if (!series.loadStatus) {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
var isAddToTakPool = false
|
||||
if (this.showSeriesList.includes(`${studyIndex}_${seriesIndex}`)) {
|
||||
isAddToTakPool = true
|
||||
} else {
|
||||
this.showSeriesList.push(`${studyIndex}_${seriesIndex}`)
|
||||
}
|
||||
if (!isAddToTakPool) {
|
||||
var priority = parseInt(new Date().getTime())
|
||||
if (series.isExistMutiFrames) {
|
||||
series.instanceInfoList.map(image => {
|
||||
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map((imageId) => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoad()
|
||||
}
|
||||
} else {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
}
|
||||
}
|
||||
},
|
||||
changeReadingStatus(callback, data) {
|
||||
async changeReadingStatus(callback, data) {
|
||||
let statusStr = ''
|
||||
if (callback) {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesReading')
|
||||
@@ -437,24 +515,29 @@ export default {
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !data.isReading))
|
||||
this.$confirm(message, {
|
||||
distinguishCancelAndClose: true,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const state = data.isReading ? 1 : 2
|
||||
this.loading = true
|
||||
|
||||
setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state).then(res => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isReading = !data.isReading
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
}).catch(() => {})
|
||||
const confirm = await this.$confirm(
|
||||
message,
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
const state = data.isReading ? 1 : 2
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isReading = !data.isReading
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
changeDeleteStatus(callback, data) {
|
||||
async changeDeleteStatus(callback, data) {
|
||||
let statusStr = ''
|
||||
if (callback) {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesDeleted')
|
||||
@@ -465,24 +548,31 @@ export default {
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !data.isDeleted))
|
||||
this.$confirm(message, {
|
||||
distinguishCancelAndClose: true,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const state = data.isDeleted ? 5 : 4
|
||||
this.loading = true
|
||||
setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state).then(res => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isDeleted = !data.isDeleted
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
}).catch(() => {})
|
||||
const confirm = await this.$confirm(
|
||||
message,
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
const state = data.isDeleted ? 5 : 4
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isDeleted = !data.isDeleted
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
// 切换关联检查Tab时获取关联检查信息
|
||||
handleTabClick(tab, event) {
|
||||
async handleTabClick(tab, event) {
|
||||
if (tab.name === 'relation-study' && this.relationStudyList.length <= 0) {
|
||||
const loading = this.$loading({
|
||||
target: document.querySelector('.pane-relation-wrapper'),
|
||||
@@ -492,11 +582,13 @@ export default {
|
||||
background: 'rgb(49 49 49 / 50%)',
|
||||
spinner: 'el-icon-loading'
|
||||
})
|
||||
getAllRelationStudyList(this.subjectVisitId).then(res => {
|
||||
try {
|
||||
const res = await getAllRelationStudyList(this.subjectVisitId)
|
||||
loading.close()
|
||||
this.relationStudyList = res.Result
|
||||
console.log(this.relationStudyList)
|
||||
}).catch(() => { loading.close() })
|
||||
} catch (e) {
|
||||
loading.close()
|
||||
}
|
||||
}
|
||||
},
|
||||
handelRelationActiveChange(v) {
|
||||
@@ -508,8 +600,7 @@ export default {
|
||||
}
|
||||
},
|
||||
// 根据关联检查获取序列信息
|
||||
getRelationSeriesByStudy(studyId, index) {
|
||||
console.log('getRelationSeriesByStudy')
|
||||
async getRelationSeriesByStudy(studyId, index) {
|
||||
if (this.relationStudyList[index].seriesCount) {
|
||||
this.relationStudyList[index].showSeries = !this.relationStudyList[index].showSeries
|
||||
this.$forceUpdate()
|
||||
@@ -523,20 +614,21 @@ export default {
|
||||
background: 'rgb(49 49 49 / 50%)',
|
||||
spinner: 'el-icon-loading'
|
||||
})
|
||||
getSeriesList(`/series/list/${studyId}`).then(data => {
|
||||
try {
|
||||
const data = await getSeriesList(`/series/list/${studyId}`)
|
||||
loading.close()
|
||||
if (data.Result != null && data.Result.length > 0) {
|
||||
var seriesList = []
|
||||
const res = data.Result
|
||||
res.forEach((item,seriesIndex)=> {
|
||||
res.forEach((item, seriesIndex) => {
|
||||
const imageIds = []
|
||||
item.InstanceInfoList.forEach(i => {
|
||||
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
|
||||
for (let j = 0; j < i.NumberOfFrames; j++) {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${index}|${seriesIndex}`)
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${index}|${seriesIndex}&isRelation=1`)
|
||||
}
|
||||
} else {
|
||||
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}${i.Path}?instanceId=${i.Id}&idx=${index}|${seriesIndex}&isRelation=1`)
|
||||
}
|
||||
})
|
||||
seriesList.push({
|
||||
@@ -561,13 +653,14 @@ export default {
|
||||
scope.relationStudyList[index].seriesCount = seriesList.length
|
||||
scope.relationStudyList[index].seriesList = seriesList
|
||||
scope.relationStudyList[index].showSeries = true
|
||||
console.log(scope.relationStudyList)
|
||||
scope.$forceUpdate()
|
||||
}
|
||||
}).catch(() => { loading.close() })
|
||||
} catch (e) {
|
||||
loading.close()
|
||||
}
|
||||
}
|
||||
},
|
||||
showRelationSeriesImage(e, series, index) {
|
||||
showRelationSeriesImage(e, series, studyIndex, index) {
|
||||
this.currentRelationIndex = index
|
||||
const element = e.currentTarget
|
||||
const elements = document.querySelectorAll('[series-type]')
|
||||
@@ -578,9 +671,15 @@ export default {
|
||||
this.$refs.dicomViewer.loadImageStack(series)
|
||||
if (!series.loadStatus) {
|
||||
var priority = parseInt(new Date().getTime())
|
||||
series.imageIds.map(imageId => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
if (series.isExistMutiFrames) {
|
||||
series.instanceInfoList.map(image => {
|
||||
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map((imageId) => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
loadAllImages() {
|
||||
@@ -589,21 +688,14 @@ export default {
|
||||
if (seriesIndex === -1) return
|
||||
const series = seriesList[seriesIndex]
|
||||
var priority = parseInt(new Date().getTime())
|
||||
for (let i = 0; i < series.imageIds.length; i++) {
|
||||
const imageId = series.imageIds[i]
|
||||
if (series.isExistMutiFrames) {
|
||||
const params = this.getInstanceInfo(imageId)
|
||||
if (params.frame && params.frame > 0) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
var p = null
|
||||
if (this.firstInstanceId === imageId) {
|
||||
p = priority * 100
|
||||
} else {
|
||||
p = priority - 1
|
||||
}
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, seriesIndex: seriesIndex, priority: p })
|
||||
if (series.isExistMutiFrames) {
|
||||
series.instanceInfoList.map(image => {
|
||||
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map((imageId) => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoad()
|
||||
@@ -628,26 +720,6 @@ export default {
|
||||
this.imageList = []
|
||||
}
|
||||
},
|
||||
// load(imageId, priority = 999) {
|
||||
// return new Promise((resolve, reject) => {
|
||||
// const imageTask = this.buildImageRequestTask(imageId, { priority })
|
||||
// requestPoolManager.addTaskIntoPool(imageTask).then((res) => {
|
||||
// resolve(res)
|
||||
// }).catch(e => {
|
||||
// reject(e)
|
||||
// console.log(e)
|
||||
// })
|
||||
// })
|
||||
// },
|
||||
buildImageRequestTask(imageId, config = {}) {
|
||||
return {
|
||||
key: imageId,
|
||||
...config,
|
||||
execute: () => {
|
||||
return cornerstone.loadAndCacheImage(imageId)
|
||||
}
|
||||
}
|
||||
},
|
||||
datasetsCacheChanged(e) {
|
||||
const cacheInfo = e.detail.cacheInfo
|
||||
const cacheSizeInBytes = cacheInfo.cacheSizeInBytes
|
||||
@@ -655,57 +727,46 @@ export default {
|
||||
// 清理缓存的影像
|
||||
}
|
||||
},
|
||||
imageLoaded(image, seriesUid) {
|
||||
var studyIndex = image.studyIndex
|
||||
var seriesIndex = image.seriesIndex
|
||||
if (seriesIndex < 0 || studyIndex < 0) return
|
||||
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(image.imageId) < 0) {
|
||||
++this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.push(image.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
|
||||
// 设置当前序列状态为已下载完成
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
|
||||
}
|
||||
}
|
||||
},
|
||||
cornerstoneimageloadprogress(e){
|
||||
cornerstoneimageloadprogress(e) {
|
||||
const imageId = e.detail.imageId
|
||||
if (!imageId) return
|
||||
const percentComplete = e.detail.percentComplete
|
||||
const params = {}
|
||||
const searchParams = new URLSearchParams(imageId.split('?')[1])
|
||||
if (!searchParams) return
|
||||
for (const [key, value] of searchParams.entries()) {
|
||||
params[key] = value
|
||||
}
|
||||
if (this.visitTaskId === params.visitTaskId) {
|
||||
const studyIndex = params.idx.split('|')[0]
|
||||
const seriesIndex = params.idx.split('|')[1]
|
||||
var prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount
|
||||
var instanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount
|
||||
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0 && this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.length < this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount) {
|
||||
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
|
||||
const studyIndex = params.idx.split('|')[0]
|
||||
const seriesIndex = params.idx.split('|')[1]
|
||||
var series = !params.isRelation ? this.studyList[studyIndex].SeriesList[seriesIndex] : null
|
||||
if (!series) return
|
||||
var prefetchInstanceCount = series.prefetchInstanceCount
|
||||
var instanceCount = series.instanceCount
|
||||
if (series.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)
|
||||
}
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = prefetchInstanceCount
|
||||
if (percentComplete >= 100) {
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.push(imageId)
|
||||
} else {
|
||||
if (percentComplete !== 100) {
|
||||
this.currentLoadIns.push({ imageId, percentComplete })
|
||||
}
|
||||
prefetchInstanceCount = prefetchInstanceCount + percentComplete
|
||||
}
|
||||
if (prefetchInstanceCount >= instanceCount * 100) {
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = instanceCount * 100
|
||||
// 设置当前序列状态为已下载完成
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
|
||||
series.prefetchInstanceCount = prefetchInstanceCount
|
||||
if (percentComplete >= 100) {
|
||||
series.imageloadedArr.push(imageId)
|
||||
}
|
||||
}
|
||||
if (prefetchInstanceCount >= instanceCount * 100) {
|
||||
series.prefetchInstanceCount = instanceCount * 100
|
||||
// 设置当前序列状态为已下载完成
|
||||
series.loadStatus = true
|
||||
if (!this.isFromCRCUpload) {
|
||||
this.loadAllImages()
|
||||
}
|
||||
}
|
||||
@@ -777,7 +838,7 @@ export default {
|
||||
white-space: normal;
|
||||
}
|
||||
.viewerContainer .viewerLeftSidePanel {
|
||||
width: 215px;
|
||||
width: 220px;
|
||||
background-color: #323232;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
@@ -814,7 +875,7 @@ export default {
|
||||
}
|
||||
.viewerContainer .viewerLeftSidePanel .viewernavigatorwrapper {
|
||||
display: flex;
|
||||
width: 200px;
|
||||
width: 220px;
|
||||
/* height: 84px; */
|
||||
padding: 1px 2px 1px 2px;
|
||||
margin: 2px 0 1px 1px;
|
||||
@@ -893,18 +954,6 @@ export default {
|
||||
border: 1px solid #2c2c2c;
|
||||
padding: 5px;
|
||||
}
|
||||
.frame_list{
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.instance_frame_wrapper ::-webkit-scrollbar {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
}
|
||||
.instance_frame_wrapper ::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background: #d0d0d0;
|
||||
}
|
||||
.frame_content{
|
||||
height: 50px;
|
||||
padding: 5px;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
ref="sysTemplateFrom"
|
||||
v-loading="loading"
|
||||
:model="form"
|
||||
label-width="90px"
|
||||
label-width="140px"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
class="upload-temporary-file"
|
||||
@@ -12,10 +12,13 @@
|
||||
<el-form-item label="Code" prop="Code">
|
||||
<el-input v-model="form.Code" />
|
||||
</el-form-item>
|
||||
<el-form-item label="业务场景: " prop="BusinessScenarioEnum">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:attachment:export:form:business')"
|
||||
prop="BusinessScenarioEnum"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.BusinessScenarioEnum"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
filterable
|
||||
>
|
||||
@@ -27,7 +30,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件: ">
|
||||
<el-form-item :label="$t('dictionary:attachment:export:form:file')">
|
||||
<div class="upload-container">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
@@ -43,84 +46,123 @@
|
||||
:on-exceed="handleExceed"
|
||||
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum" :loading="btnLoading">Select</el-button>
|
||||
<span
|
||||
slot="tip"
|
||||
style="margin-left:10px;"
|
||||
class="el-upload__tip"
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
||||
:loading="btnLoading"
|
||||
>Select</el-button
|
||||
>
|
||||
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">
|
||||
(must be in xlsx/xls/doc/docx format)
|
||||
</span>
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件名" prop="Name">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:attachment:export:form:name')"
|
||||
prop="Name"
|
||||
>
|
||||
<el-input v-model="form.Name" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.Id !== ''" label="是否废除: ">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:attachment:export:form:nameCN')"
|
||||
prop="NameCN"
|
||||
>
|
||||
<el-input v-model="form.NameCN" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.Id !== ''"
|
||||
:label="$t('dictionary:attachment:export:form:isDeleted')"
|
||||
>
|
||||
<el-radio-group v-model="form.IsDeleted">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:attachment:export:form:description')"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.Description"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
placeholder="请输入内容"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
|
||||
<el-form-item style="text-align:right;">
|
||||
<el-button size="small" type="primary" :disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum" :loading="saveBtnLoading" @click="handleSave">Save</el-button>
|
||||
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
|
||||
<el-form-item style="text-align: right">
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
||||
:loading="saveBtnLoading"
|
||||
@click="handleSave"
|
||||
>{{ $t("common:button:save") }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { addOrUpdateCommonDocument, uploadCommonDoc, Upload } from '@/api/dictionary'
|
||||
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
|
||||
import {
|
||||
addOrUpdateCommonDocument,
|
||||
uploadCommonDoc,
|
||||
Upload,
|
||||
} from "@/api/dictionary";
|
||||
import { getBasicDataSelects } from "@/api/dictionary/dictionary";
|
||||
export default {
|
||||
name: 'TemplateForm',
|
||||
name: "TemplateForm",
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() { return {} }
|
||||
}
|
||||
default() {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
Id: '',
|
||||
Code: '',
|
||||
Id: "",
|
||||
Code: "",
|
||||
FileTypeEnum: null,
|
||||
BusinessScenarioEnum: null,
|
||||
Name: '',
|
||||
Path: '',
|
||||
Description: '',
|
||||
IsDeleted: false
|
||||
Name: "",
|
||||
NameCN: "",
|
||||
Path: "",
|
||||
Description: "",
|
||||
IsDeleted: false,
|
||||
},
|
||||
rules: {
|
||||
Code: [{ required: true, message: 'Please specify', trigger: ['blur'] }],
|
||||
Name: [{ required: true, message: 'Please specify', trigger: ['blur'] }],
|
||||
BusinessScenarioEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }]
|
||||
Code: [
|
||||
{ required: true, message: "Please specify", trigger: ["blur"] },
|
||||
],
|
||||
Name: [
|
||||
{ required: true, message: "Please specify", trigger: ["blur"] },
|
||||
],
|
||||
NameCN: [
|
||||
{ required: true, message: "Please specify", trigger: ["blur"] },
|
||||
],
|
||||
BusinessScenarioEnum: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
},
|
||||
fileList: [],
|
||||
btnLoading: false,
|
||||
saveBtnLoading: false,
|
||||
loading: false,
|
||||
dictionaryList: {}
|
||||
}
|
||||
dictionaryList: {},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.initForm()
|
||||
this.initForm();
|
||||
},
|
||||
methods: {
|
||||
async initForm() {
|
||||
await this.getDicData()
|
||||
await this.getDicData();
|
||||
if (Object.keys(this.data).length > 0) {
|
||||
if (this.data.Path) {
|
||||
this.fileList = [
|
||||
@@ -128,97 +170,111 @@ export default {
|
||||
name: this.data.Name,
|
||||
path: this.data.Path,
|
||||
url: this.data.Path,
|
||||
type: this.data.Type
|
||||
}
|
||||
]
|
||||
type: this.data.Type,
|
||||
},
|
||||
];
|
||||
}
|
||||
for (const k in this.form) {
|
||||
if (this.data.hasOwnProperty(k)) {
|
||||
this.form[k] = this.data[k]
|
||||
this.form[k] = this.data[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取文件类型下拉框
|
||||
getDicData() {
|
||||
this.loading = true
|
||||
getBasicDataSelects(['Common_File_ModuleType', 'Common_File_Type']).then(res => {
|
||||
this.dictionaryList = { ...res.Result }
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
this.loading = true;
|
||||
getBasicDataSelects(["Common_File_ModuleType", "Common_File_Type"])
|
||||
.then((res) => {
|
||||
this.dictionaryList = { ...res.Result };
|
||||
this.loading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
beforeUpload(file) {
|
||||
// 检测文件类型是否符合要求
|
||||
if (this.checkFileSuffix(file.name)) {
|
||||
this.fileList = []
|
||||
return true
|
||||
this.fileList = [];
|
||||
return true;
|
||||
} else {
|
||||
this.$alert('必须是word/excel格式')
|
||||
|
||||
return false
|
||||
// this.$alert("必须是word/excel格式");
|
||||
this.$alert(this.$t("dictionary:attachment:export:alert:formatFile"));
|
||||
return false;
|
||||
}
|
||||
},
|
||||
async handleUploadFile(param) {
|
||||
this.loading = true
|
||||
const formData = new FormData()
|
||||
formData.append('file', param.file)
|
||||
this.form.FileName = param.file.name
|
||||
Upload(formData, 1).then(res => {
|
||||
this.fileList.push({ name: param.file.name, path: res.Result.FilePath, fullPath: res.Result.FullFilePath, url: res.Result.FilePath })
|
||||
this.form.Path = res.Result.FilePath
|
||||
this.form.Name = param.file.name
|
||||
this.loading = false
|
||||
this.btnLoading = false
|
||||
})
|
||||
this.loading = true;
|
||||
const formData = new FormData();
|
||||
formData.append("file", param.file);
|
||||
this.form.FileName = param.file.name;
|
||||
Upload(formData, 1).then((res) => {
|
||||
this.fileList.push({
|
||||
name: param.file.name,
|
||||
path: res.Result.FilePath,
|
||||
fullPath: res.Result.FullFilePath,
|
||||
url: res.Result.FilePath,
|
||||
});
|
||||
this.form.Path = res.Result.FilePath;
|
||||
this.form.NameCN = param.file.name;
|
||||
this.loading = false;
|
||||
this.btnLoading = false;
|
||||
});
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.sysTemplateFrom.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$refs.sysTemplateFrom.validate((valid) => {
|
||||
if (!valid) return;
|
||||
if (!this.form.Name) {
|
||||
this.$alert('Please select file.')
|
||||
return
|
||||
this.$alert("Please select file.");
|
||||
return;
|
||||
}
|
||||
this.saveBtnLoading = true
|
||||
addOrUpdateCommonDocument(this.form).then(res => {
|
||||
this.saveBtnLoading = false
|
||||
this.$emit('closeDialog')
|
||||
this.$emit('getList')
|
||||
this.$message.success('Uploaded successfully')
|
||||
}).catch(() => {
|
||||
this.saveBtnLoading = false
|
||||
})
|
||||
})
|
||||
this.saveBtnLoading = true;
|
||||
addOrUpdateCommonDocument(this.form)
|
||||
.then((res) => {
|
||||
this.saveBtnLoading = false;
|
||||
this.$emit("closeDialog");
|
||||
this.$emit("getList");
|
||||
this.$message.success(
|
||||
this.$t("trials:uploadMonitor:table:uploadStatus")
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
this.saveBtnLoading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
handleRemoveFile() {
|
||||
this.fileList = []
|
||||
this.form.Path = ''
|
||||
this.form.Name = ''
|
||||
this.fileList = [];
|
||||
this.form.Path = "";
|
||||
this.form.NameCN = "";
|
||||
this.form.Name = "";
|
||||
},
|
||||
handlePreview(file) {
|
||||
if (file.fullPath) {
|
||||
window.open(file.fullPath, '_blank')
|
||||
window.open(file.fullPath, "_blank");
|
||||
}
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
this.$message.warning(`Upload is currently limited to 1 file`)
|
||||
this.$message.warning(`Upload is currently limited to 1 file`);
|
||||
},
|
||||
checkFileSuffix(fileName) {
|
||||
var typeArr = ['xls', 'xlsx', 'doc', 'docx']
|
||||
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
|
||||
var typeArr = ["xls", "xlsx", "doc", "docx"];
|
||||
var extendName = fileName
|
||||
.substring(fileName.lastIndexOf(".") + 1)
|
||||
.toLocaleLowerCase();
|
||||
if (typeArr.indexOf(extendName) !== -1) {
|
||||
return true
|
||||
return true;
|
||||
} else {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.upload-temporary-file{
|
||||
.upload-temporary-file {
|
||||
.upload-container .el-upload--text {
|
||||
border: none;
|
||||
width: 80px;
|
||||
@@ -231,8 +287,8 @@ export default {
|
||||
color: #428bca;
|
||||
font-size: 13px;
|
||||
}
|
||||
.account_item_clear{
|
||||
.el-tag__close{
|
||||
.account_item_clear {
|
||||
.el-tag__close {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
<BaseContainer>
|
||||
<template slot="search-container">
|
||||
<el-form :inline="true" size="small">
|
||||
<el-form-item label="业务场景">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:attachment:export:search:business')"
|
||||
>
|
||||
<el-select
|
||||
v-model="searchData.BusinessScenarioEnum"
|
||||
style="width:150px;"
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.Common_File_BusinessScenario"
|
||||
@@ -13,41 +15,42 @@
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件名称">
|
||||
<el-input
|
||||
v-model="searchData.Name"
|
||||
style="width:130px;"
|
||||
clearable
|
||||
/>
|
||||
<el-form-item
|
||||
:label="$t('dictionary:attachment:export:search:fileName')"
|
||||
>
|
||||
<el-input v-model="searchData.Name" style="width: 130px" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<!-- 查询 -->
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
{{ $t('common:button:search') }}
|
||||
{{ $t("common:button:search") }}
|
||||
</el-button>
|
||||
<!-- 重置 -->
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
{{ $t("common:button:reset") }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
style="float: right"
|
||||
size="small"
|
||||
@click="handleAdd"
|
||||
>
|
||||
{{ $t("common:button:new") }}
|
||||
</el-button>
|
||||
</el-form>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
style="margin-left:auto;"
|
||||
size="small"
|
||||
@click="handleAdd"
|
||||
>
|
||||
{{ $t('common:button:new') }}
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot="main-container">
|
||||
<el-table
|
||||
v-adaptive="{bottomOffset:60}"
|
||||
v-adaptive="{ bottomOffset: 60 }"
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
stripe
|
||||
@@ -64,70 +67,81 @@
|
||||
|
||||
<el-table-column
|
||||
prop="BusinessScenarioEnum"
|
||||
label="业务场景"
|
||||
:label="$t('dictionary:attachment:export:table:business')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('Common_File_BusinessScenario',scope.row.BusinessScenarioEnum) }}
|
||||
{{
|
||||
$fd(
|
||||
"Common_File_BusinessScenario",
|
||||
scope.row.BusinessScenarioEnum
|
||||
)
|
||||
}}
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="Name"
|
||||
label="文件名称"
|
||||
:label="$t('dictionary:attachment:export:table:name')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="NameCN"
|
||||
:label="$t('dictionary:attachment:export:table:nameCN')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Description"
|
||||
label="描述"
|
||||
:label="$t('dictionary:attachment:export:table:description')"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="IsDeleted"
|
||||
label="是否废除"
|
||||
:label="$t('dictionary:attachment:export:table:isDeleted')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag>
|
||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag>
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||
$fd("YesOrNo", scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
<el-tag v-else type="primary">{{
|
||||
$fd("YesOrNo", scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
label="更新时间"
|
||||
:label="$t('dictionary:attachment:export:table:updateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column label="Action">
|
||||
<el-table-column :label="$t('common:action:action')">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleDownload(scope.row)"
|
||||
>
|
||||
下载
|
||||
<el-button type="text" @click="handleDownload(scope.row)">
|
||||
{{ $t("common:button:download") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
编辑
|
||||
<el-button type="text" @click="handleEdit(scope.row)">
|
||||
{{ $t("common:button:edit") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>
|
||||
删除
|
||||
<el-button type="text" @click="handleDelete(scope.row)">
|
||||
{{ $t("common:button:delete") }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 新增/编辑 -->
|
||||
<el-dialog
|
||||
@@ -138,28 +152,36 @@
|
||||
width="600px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<TemplateForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" />
|
||||
<TemplateForm
|
||||
:data="currentRow"
|
||||
@closeDialog="closeDialog"
|
||||
@getList="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
</BaseContainer>
|
||||
</template>
|
||||
<script>
|
||||
import { getCommonDocumentList, DownloadCommonDoc, deleteCommonDocument } from '@/api/dictionary'
|
||||
import BaseContainer from '@/components/BaseContainer'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import TemplateForm from './TemplateForm'
|
||||
const FileTypeEnum = 2
|
||||
import {
|
||||
getCommonDocumentList,
|
||||
DownloadCommonDoc,
|
||||
deleteCommonDocument,
|
||||
} from "@/api/dictionary";
|
||||
import BaseContainer from "@/components/BaseContainer";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import TemplateForm from "./TemplateForm";
|
||||
const FileTypeEnum = 2;
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
FileTypeEnum: FileTypeEnum,
|
||||
BusinessScenarioEnum: null,
|
||||
Name: '',
|
||||
Name: "",
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
PageSize: 20,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'ExportTemplate',
|
||||
name: "ExportTemplate",
|
||||
components: { BaseContainer, Pagination, TemplateForm },
|
||||
data() {
|
||||
return {
|
||||
@@ -167,73 +189,86 @@ export default {
|
||||
list: [],
|
||||
total: 0,
|
||||
currentRow: {},
|
||||
editDialog: { title: '', visible: false },
|
||||
loading: false
|
||||
}
|
||||
editDialog: { title: "", visible: false },
|
||||
loading: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleDelete(row) {
|
||||
this.$confirm('确定删除该模版?').then(() => {
|
||||
this.$confirm(
|
||||
this.$t("dictionary:attachment:export:confirm:delete")
|
||||
).then(() => {
|
||||
deleteCommonDocument(row.Id).then(() => {
|
||||
this.$message.success('删除成功')
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
this.$message.success(this.$t("common:message:deletedSuccessfully"));
|
||||
this.getList();
|
||||
});
|
||||
});
|
||||
},
|
||||
getList() {
|
||||
this.loading = true
|
||||
getCommonDocumentList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
this.loading = true;
|
||||
getCommonDocumentList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.editDialog.title = 'Add'
|
||||
this.currentRow = { FileTypeEnum: FileTypeEnum }
|
||||
this.editDialog.visible = true
|
||||
this.editDialog.title = "Add";
|
||||
this.currentRow = { FileTypeEnum: FileTypeEnum };
|
||||
this.editDialog.visible = true;
|
||||
},
|
||||
// 下载
|
||||
handleDownload(row) {
|
||||
this.loading = true
|
||||
DownloadCommonDoc(row.Code).then(data => {
|
||||
this.loading = false
|
||||
}).catch(() => { this.loading = false })
|
||||
this.loading = true;
|
||||
DownloadCommonDoc(row.Code)
|
||||
.then((data) => {
|
||||
this.loading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.editDialog.title = 'Edit'
|
||||
this.currentRow = { ...row }
|
||||
this.editDialog.visible = true
|
||||
this.editDialog.title = "Edit";
|
||||
this.currentRow = { ...row };
|
||||
this.editDialog.visible = true;
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
},
|
||||
closeDialog() {
|
||||
this.editDialog.visible = false
|
||||
this.editDialog.visible = false;
|
||||
},
|
||||
// 排序
|
||||
handleSortChange(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .search{
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
<template>
|
||||
<base-model :config="config">
|
||||
<div slot="dialog-body">
|
||||
<el-form
|
||||
ref="browserForm"
|
||||
:model="form"
|
||||
label-width="140px"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
>
|
||||
<div class="base-dialog-body">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:browser:form:title')"
|
||||
prop="Title"
|
||||
>
|
||||
<el-input v-model="form.Title" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('dictionary:browser:form:exploreType')"
|
||||
prop="ExploreType"
|
||||
>
|
||||
<el-input v-model="form.ExploreType" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('dictionary:browser:form:version')"
|
||||
prop="Version"
|
||||
>
|
||||
<el-input v-model="form.Version" type="textarea" rows="5" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('dictionary:browser:form:downloadUrl')"
|
||||
prop="DownloadUrl"
|
||||
>
|
||||
<el-input v-model="form.DownloadUrl" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('dictionary:browser:form:addFile')">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
:before-upload="beforeUpload"
|
||||
:http-request="handleUploadFile"
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="handleRemoveFile"
|
||||
:show-file-list="true"
|
||||
:limit="1"
|
||||
:file-list="fileList"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="fileList.length > 0"
|
||||
>{{ $t("common:button:upload") }}</el-button
|
||||
>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('dictionary:browser:form:isDeleted')">
|
||||
<el-switch
|
||||
v-model="form.IsDeleted"
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="dialog-footer">
|
||||
<el-button size="small" @click="canel">
|
||||
{{ $t("dictionary:browser:button:canel") }}
|
||||
</el-button>
|
||||
<el-button size="small" type="primary" :loading="loading" @click="save">
|
||||
{{ $t("dictionary:browser:button:save") }}
|
||||
</el-button>
|
||||
</div>
|
||||
</base-model>
|
||||
</template>
|
||||
<script>
|
||||
import baseModel from "@/components/BaseModel";
|
||||
import { addOrUpdateExploreRecommend } from "@/api/dictionary";
|
||||
export default {
|
||||
props: {
|
||||
config: {
|
||||
required: true,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
data: {
|
||||
required: true,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
},
|
||||
components: {
|
||||
"base-model": baseModel,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
Version: null,
|
||||
Title: null,
|
||||
IsDeleted: true,
|
||||
ExploreType: null,
|
||||
DownloadUrl: null,
|
||||
Path: null,
|
||||
FileName: null,
|
||||
},
|
||||
rules: {
|
||||
Title: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
ExploreType: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
Version: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
DownloadUrl: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
},
|
||||
fileList: [],
|
||||
loading: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if (this.config.status === "edit") {
|
||||
Object.keys(this.form).forEach((key) => {
|
||||
this.form[key] = this.data[key];
|
||||
});
|
||||
if (this.form.FileName) {
|
||||
this.fileList[0] = {
|
||||
name: this.form.FileName,
|
||||
path: this.form.Path,
|
||||
fullPath: this.form.Path,
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async save() {
|
||||
try {
|
||||
let validate = await this.$refs.browserForm.validate();
|
||||
if (!validate) return false;
|
||||
this.loading = true;
|
||||
if (this.config.status === "edit") {
|
||||
this.form.Id = this.data.Id;
|
||||
}
|
||||
let res = await addOrUpdateExploreRecommend(this.form);
|
||||
if (res.IsSuccess) {
|
||||
this.$emit("close");
|
||||
this.$emit("getList");
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
canel() {
|
||||
this.$emit("close");
|
||||
},
|
||||
handleRemoveFile() {
|
||||
this.form.FileName = null;
|
||||
this.form.Path = null;
|
||||
this.fileList = [];
|
||||
},
|
||||
beforeUpload() {
|
||||
if (this.fileList.length > 0) {
|
||||
this.$alert(this.$t("dictionary:bbrowser:msg:message1"));
|
||||
return;
|
||||
}
|
||||
},
|
||||
handlePreview(row, r2) {
|
||||
if (row.fullPath) {
|
||||
window.open(row.fullPath, "_blank");
|
||||
}
|
||||
},
|
||||
async handleUploadFile(param) {
|
||||
this.loading = true;
|
||||
var file = await this.fileToBlob(param.file);
|
||||
const res = await this.OSSclient.put(
|
||||
`/System/Browser/${param.file.name}`,
|
||||
file
|
||||
);
|
||||
this.fileList.push({
|
||||
name: param.file.name,
|
||||
path: this.$getObjectName(res.url),
|
||||
fullPath: this.$getObjectName(res.url),
|
||||
url: this.$getObjectName(res.url),
|
||||
});
|
||||
this.form.Path = this.$getObjectName(res.url);
|
||||
this.form.FileName = param.file.name;
|
||||
this.loading = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,252 @@
|
||||
<template>
|
||||
<box-content>
|
||||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<el-form-item :label="$t('dictionary:browser:search:title')">
|
||||
<el-input v-model="searchData.Title" style="width: 100px" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('dictionary:browser:search:version')">
|
||||
<el-input v-model="searchData.Version" style="width: 100px" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleReset">{{
|
||||
$t("dictionary:browser:button:reset")
|
||||
}}</el-button>
|
||||
<el-button type="primary" @click="handleSearch">{{
|
||||
$t("dictionary:browser:button:search")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left: auto">
|
||||
<el-button type="primary" size="mini" @click="handleAdd">
|
||||
{{ $t("dictionary:browser:button:add") }}
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- 浏览器推荐版本列表 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{ bottomOffset: 45 }"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width: 100%"
|
||||
@sort-change="handleSortByColumn"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
|
||||
<el-table-column
|
||||
prop="Title"
|
||||
:label="$t('dictionary:browser:table:title')"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ExploreType"
|
||||
:label="$t('dictionary:browser:table:exploreType')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Version"
|
||||
:label="$t('dictionary:browser:table:version')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="DownloadUrl"
|
||||
:label="$t('dictionary:browser:table:path')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="FileName"
|
||||
:label="$t('dictionary:browser:table:fileName')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<a
|
||||
:href="OSSclientConfig.basePath + scope.row.Path"
|
||||
target="_blank"
|
||||
style="color: #428bca"
|
||||
>
|
||||
{{ scope.row.FileName }}
|
||||
</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="IsDeleted"
|
||||
:label="$t('dictionary:browser:table:IsDeleted')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||
$fd("IsSiteDisable", scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
<el-tag v-else>{{
|
||||
$fd("IsSiteDisable", scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
:label="$t('dictionary:browser:table:updateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('dictionary:browser:table:action')"
|
||||
width="200"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleEdit(scope.row)">
|
||||
{{ $t("dictionary:browser:button:edit") }}
|
||||
</el-button>
|
||||
<el-button type="text" @click="handleDelete(scope.row)">
|
||||
{{ $t("dictionary:browser:button:delete") }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<browser-form
|
||||
:config="config"
|
||||
:data="rowData"
|
||||
v-if="config.visible"
|
||||
@close="close"
|
||||
@getList="getList"
|
||||
/>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getExploreRecommendList,
|
||||
deleteExploreRecommend,
|
||||
} from "@/api/dictionary";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import BoxContent from "@/components/BoxContent";
|
||||
import browserForm from "./form.vue";
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
Version: null,
|
||||
Title: null,
|
||||
DownloadUrl: null,
|
||||
FileName: null,
|
||||
IsDeleted: null,
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
Asc: false,
|
||||
SortField: null,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: "browser",
|
||||
components: { BoxContent, Pagination, browserForm },
|
||||
data() {
|
||||
return {
|
||||
searchData: searchDataDefault(),
|
||||
loading: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
rowData: {},
|
||||
config: {
|
||||
visible: false,
|
||||
showClose: true,
|
||||
width: "600px",
|
||||
title: "",
|
||||
appendToBody: true,
|
||||
status: "add",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true;
|
||||
let res = await getExploreRecommendList(this.searchData);
|
||||
if (res.IsSuccess) {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.rowData = {};
|
||||
this.config.title = this.$t("dictionary:browser:form:title:add");
|
||||
this.config.status = "add";
|
||||
this.config.visible = true;
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.rowData = { ...row };
|
||||
this.config.title = this.$t("dictionary:browser:form:title:edit");
|
||||
this.config.status = "edit";
|
||||
this.config.visible = true;
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t("dictionary:browser:message:deleteMessage"), {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
}).then(() => {
|
||||
deleteExploreRecommend(row.Id).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(
|
||||
this.list.findIndex((item) => item.Id === row.Id),
|
||||
1
|
||||
);
|
||||
this.$message.success(
|
||||
this.$t("common:message:deletedSuccessfully")
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
} else {
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
close() {
|
||||
this.config.visible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<div class="browserTip" v-if="visible">
|
||||
<i class="el-icon-warning-outline"></i>
|
||||
<span v-html="tip"></span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getExploreRecommentInfo } from "@/api/dictionary";
|
||||
export default {
|
||||
name: "browserTip",
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
tip: this.$t("browser:tip:changeBorwser"),
|
||||
visible: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async getInfo() {
|
||||
try {
|
||||
let res = await getExploreRecommentInfo();
|
||||
if (res.IsSuccess) {
|
||||
return res.Result;
|
||||
}
|
||||
return false;
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
async open() {
|
||||
try {
|
||||
let browserType = this.getExplore();
|
||||
let type = browserType.split(": ")[0];
|
||||
let No = browserType.split(": ")[1].split(".")[0];
|
||||
console.log(type, No);
|
||||
if (type !== "Chrome" && type !== "Edge") {
|
||||
this.tip = this.$t("browser:tip:changeBorwser");
|
||||
return (this.visible = true);
|
||||
}
|
||||
let res = await this.getInfo();
|
||||
if (!res) return this.$t("dictionary:browser:tip:getError");
|
||||
let currentType = res.filter(
|
||||
(item) => item.ExploreType.toLowerCase() === type.toLowerCase()
|
||||
)[0];
|
||||
if (No < currentType.Version) {
|
||||
this.tip = `<span>${this.$t("browser:tip:borwserversionLow")}</span>`;
|
||||
res.forEach((item, index) => {
|
||||
this.tip += `<a href="${item.DownloadUrl}" target="_blank" style="color:#428bca">${item.Title}</a>`;
|
||||
if (index < res.length - 1) {
|
||||
this.tip += "、";
|
||||
}
|
||||
});
|
||||
return (this.visible = true);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
getExplore() {
|
||||
var Sys = {};
|
||||
var ua = navigator.userAgent.toLowerCase();
|
||||
var s;
|
||||
(s = ua.match(/rv:([\d.]+)\) like gecko/))
|
||||
? (Sys.ie = s[1])
|
||||
: (s = ua.match(/msie ([\d\.]+)/))
|
||||
? (Sys.ie = s[1])
|
||||
: (s = ua.match(/edg\/([\d\.]+)/) || ua.match(/edge\/([\d\.]+)/))
|
||||
? (Sys.edge = s[1])
|
||||
: (s = ua.match(/firefox\/([\d\.]+)/))
|
||||
? (Sys.firefox = s[1])
|
||||
: (s = ua.match(/(?:opera|opr).([\d\.]+)/))
|
||||
? (Sys.opera = s[1])
|
||||
: (s = ua.match(/chrome\/([\d\.]+)/))
|
||||
? (Sys.chrome = s[1])
|
||||
: (s = ua.match(/version\/([\d\.]+).*safari/))
|
||||
? (Sys.safari = s[1])
|
||||
: 0;
|
||||
// 根据关系进行判断
|
||||
if (Sys.ie) return "IE: " + Sys.ie;
|
||||
if (Sys.edge) return "Edge: " + Sys.edge;
|
||||
if (Sys.firefox) return "Firefox: " + Sys.firefox;
|
||||
if (Sys.chrome) return "Chrome: " + Sys.chrome;
|
||||
if (Sys.opera) return "Opera: " + Sys.opera;
|
||||
if (Sys.safari) return "Safari: " + Sys.safari;
|
||||
return "Unkonwn";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.browserTip {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
background-color: rgba(250, 205, 145, 0.129411764705882);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 20px;
|
||||
color: #555;
|
||||
i {
|
||||
color: red;
|
||||
font-size: 24px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -430,9 +430,26 @@
|
||||
<el-form-item v-if="form.Type === 'upload'" label="最大上传个数">
|
||||
<el-input-number v-model="form.ImageCount" controls-position="right" :min="1" :max="10" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item v-if="form.Type !== 'group' && form.Type !== 'summary'" label="注释">-->
|
||||
<!-- <el-input v-model="form.Remark" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item v-if="form.Type === 'select' || form.Type === 'radio'" label="高亮标记值" prop="HighlightAnswerList">
|
||||
<el-select v-model="form.HighlightAnswerList" clearable multiple>
|
||||
<template v-if="form.TypeValue">
|
||||
<el-option
|
||||
v-for="item of form.TypeValue.split('|')"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="form.DictionaryCode">
|
||||
<el-option
|
||||
v-for="item of highlightAnswers"
|
||||
:key="item.Id"
|
||||
:label="item.ValueCN"
|
||||
:value="item.Code"
|
||||
/>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="序号" prop="ShowOrder">
|
||||
<el-input-number
|
||||
v-model="form.ShowOrder"
|
||||
@@ -500,7 +517,7 @@ export default {
|
||||
type: String,
|
||||
default() { return '' }
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
var validateTypeVal = (rule, value, callback) => {
|
||||
if (value === '') {
|
||||
@@ -552,7 +569,8 @@ export default {
|
||||
LimitEdit: 0,
|
||||
GroupId: null,
|
||||
ConvertShowType: 0,
|
||||
QuestionClassify: null
|
||||
QuestionClassify: null,
|
||||
HighlightAnswerList: []
|
||||
},
|
||||
rules: {
|
||||
Type: [
|
||||
@@ -588,7 +606,29 @@ export default {
|
||||
lesionTypes: [],
|
||||
dicList: [],
|
||||
CriterionDictionaryList: [],
|
||||
groupClassifyList:[]
|
||||
groupClassifyList:[],
|
||||
highlightAnswers: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'form.DictionaryCode': {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
async handler(v, oldv) {
|
||||
try {
|
||||
if (!v) {
|
||||
this.highlightAnswers = []
|
||||
return
|
||||
}
|
||||
let res = await getCriterionDictionary({
|
||||
ReadingCriterionId: this.data.ReadingQuestionCriterionSystemId,
|
||||
DictionaryCode: this.form.DictionaryCode
|
||||
})
|
||||
this.highlightAnswers = res.Result[this.form.DictionaryCode]
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -615,7 +655,6 @@ export default {
|
||||
await this.getGroupOptions()
|
||||
await this.getParentQuestions()
|
||||
await this.getLesionType()
|
||||
await this.getBasicConfigSelect()
|
||||
if (Object.keys(this.data).length > 0) {
|
||||
for (const k in this.form) {
|
||||
if (this.data.hasOwnProperty(k)) {
|
||||
@@ -679,18 +718,6 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
getBasicConfigSelect() {
|
||||
// getBasicConfigSelect('Reading_eCRF_Criterion').then(res => {
|
||||
// this.dicList = res.Result
|
||||
// })
|
||||
getCriterionDictionaryList({
|
||||
CriterionId: this.data.ReadingQuestionCriterionSystemId,
|
||||
SystemCriterionId: this.data.ReadingQuestionCriterionSystemId
|
||||
}).then(res => {
|
||||
console.log(this.dicList)
|
||||
this.dicList = res.Result
|
||||
})
|
||||
},
|
||||
getGroupOptions() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.loading = true
|
||||
|
||||
@@ -113,13 +113,13 @@
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="raw.ValueCN"
|
||||
prop="ValueCN"
|
||||
label="中文值"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="raw.Value"
|
||||
prop="Value"
|
||||
label="英文值"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
|
||||
@@ -315,7 +315,26 @@
|
||||
:max="10"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.Type === 'select' || form.Type === 'radio'" label="高亮标记值" prop="HighlightAnswerList">
|
||||
<el-select v-model="form.HighlightAnswerList" clearable multiple>
|
||||
<template v-if="form.TypeValue">
|
||||
<el-option
|
||||
v-for="item of form.TypeValue.split('|')"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="form.DictionaryCode">
|
||||
<el-option
|
||||
v-for="item of $d[form.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value.toString()"
|
||||
/>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="序号" prop="ShowOrder">
|
||||
<el-input-number
|
||||
v-model="form.ShowOrder"
|
||||
@@ -427,7 +446,8 @@ export default {
|
||||
QuestionMark: null,
|
||||
LimitEdit: 0,
|
||||
GlobalReadingShowType: null,
|
||||
QuestionClassify: null
|
||||
QuestionClassify: null,
|
||||
HighlightAnswerList: []
|
||||
|
||||
// IsEnable: true
|
||||
},
|
||||
|
||||
@@ -59,9 +59,14 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="IsSystemLevel < 2">
|
||||
<el-form-item label="收件人" prop="ToUserTypeList">
|
||||
<el-select v-model="form.ToUserTypeList" clearable multiple class="mr">
|
||||
<el-select
|
||||
v-model="form.ToUserTypeList"
|
||||
clearable
|
||||
multiple
|
||||
class="mr"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.UserType"
|
||||
:key="`ToUserTypeList${item.label}`"
|
||||
@@ -71,9 +76,14 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!IsSystemLevel">
|
||||
<el-form-item label="抄送人" prop="CopyUserTypeList">
|
||||
<el-select v-model="form.CopyUserTypeList" clearable multiple class="mr">
|
||||
<el-select
|
||||
v-model="form.CopyUserTypeList"
|
||||
clearable
|
||||
multiple
|
||||
class="mr"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.UserType"
|
||||
:key="`CopyUserTypeList${item.label}`"
|
||||
@@ -83,9 +93,18 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!IsSystemLevel">
|
||||
<el-form-item label="加急状态" prop="EmailUrgentEnum">
|
||||
<el-select v-model="form.EmailUrgentEnum" @change="(v) => {v === 1 ? form.EmailCron = null : null}" clearable class="mr">
|
||||
<el-select
|
||||
v-model="form.EmailUrgentEnum"
|
||||
@change="
|
||||
(v) => {
|
||||
v === 1 ? (form.EmailCron = null) : null;
|
||||
}
|
||||
"
|
||||
clearable
|
||||
class="mr"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.EmailUrgent"
|
||||
:key="`EmailUrgent${item.label}`"
|
||||
@@ -95,13 +114,17 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发送周期和时间" v-if="form.EmailUrgentEnum !== 1" prop="EmailCron">
|
||||
<el-col :span="12" v-if="!IsSystemLevel">
|
||||
<el-form-item
|
||||
label="发送周期和时间"
|
||||
v-if="form.EmailUrgentEnum !== 1"
|
||||
prop="EmailCron"
|
||||
>
|
||||
<el-input style="width: 300px" readonly v-model="form.EmailCron" />
|
||||
<el-button type="primary" @click="showDialog">生成 cron</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!IsSystemLevel">
|
||||
<el-form-item label="是否需要回执" prop="IsReturnRequired">
|
||||
<el-radio-group v-model="form.IsReturnRequired">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
@@ -109,7 +132,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!IsSystemLevel">
|
||||
<el-form-item label="是否自动发送" prop="IsAutoSend">
|
||||
<el-radio-group v-model="form.IsAutoSend">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
@@ -117,18 +140,27 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!IsSystemLevel">
|
||||
<el-form-item label="是否区分标准" prop="IsDistinguishCriteria">
|
||||
<el-radio-group v-model="form.IsDistinguishCriteria" @change="() => {form.CriterionTypeEnum = null}">
|
||||
<el-radio-group
|
||||
v-model="form.IsDistinguishCriteria"
|
||||
@change="
|
||||
() => {
|
||||
form.CriterionTypeEnum = null;
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!IsSystemLevel">
|
||||
<el-form-item
|
||||
:label="$t('trials:auditRecord:table:criterion')"
|
||||
v-if="form.IsDistinguishCriteria" prop="CriterionTypeEnum">
|
||||
v-if="form.IsDistinguishCriteria"
|
||||
prop="CriterionTypeEnum"
|
||||
>
|
||||
<el-select v-model="form.CriterionTypeEnum" clearable class="mr">
|
||||
<el-option
|
||||
v-for="item of $d.CriterionType"
|
||||
@@ -139,7 +171,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!IsSystemLevel">
|
||||
<el-form-item label="是否启用" prop="IsEnable">
|
||||
<el-radio-group v-model="form.IsEnable">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
@@ -147,7 +179,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!IsSystemLevel">
|
||||
<el-form-item label="附件(CN)" prop="IsEnable">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
@@ -160,11 +192,16 @@
|
||||
:limit="1"
|
||||
:file-list="fileListCN"
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="fileListCN.length > 0">{{$t('common:button:upload')}}</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="fileListCN.length > 0"
|
||||
>{{ $t("common:button:upload") }}</el-button
|
||||
>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!IsSystemLevel">
|
||||
<el-form-item label="附件(EN)" prop="IsEnable">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
@@ -177,7 +214,12 @@
|
||||
:limit="1"
|
||||
:file-list="fileListEN"
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="fileListEN.length > 0">{{$t('common:button:upload')}}</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="fileListEN.length > 0"
|
||||
>{{ $t("common:button:upload") }}</el-button
|
||||
>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -186,181 +228,248 @@
|
||||
<el-input
|
||||
v-model="form.EmailHtmlContentCN"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 8, maxRows: 8}"
|
||||
:autosize="{ minRows: 8, maxRows: 8 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮件内容模版(EN)" prop="EmailHtmlContent">
|
||||
<el-input
|
||||
v-model="form.EmailHtmlContent"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 8, maxRows: 8}"
|
||||
:autosize="{ minRows: 8, maxRows: 8 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;padding-bottom: 10px">
|
||||
<el-form-item style="text-align:right;">
|
||||
<el-button size="small" type="primary" @click="handleSave">Save</el-button>
|
||||
<div
|
||||
class="base-dialog-footer"
|
||||
style="text-align: right; margin-top: 10px; padding-bottom: 10px"
|
||||
>
|
||||
<el-form-item style="text-align: right">
|
||||
<el-button size="small" type="primary" @click="handleSave"
|
||||
>Save</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-dialog append-to-body title="生成 cron" :visible.sync="showCron">
|
||||
<vcrontab :hideComponent="['year']" @hide="showCron=false" @fill="crontabFill" :expression="expression"></vcrontab>
|
||||
<vcrontab
|
||||
:hideComponent="['year']"
|
||||
@hide="showCron = false"
|
||||
@fill="crontabFill"
|
||||
:expression="expression"
|
||||
></vcrontab>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { Upload, addOrUpdateEmailNoticeConfigList } from '@/api/dictionary'
|
||||
import { Upload, addOrUpdateEmailNoticeConfigList } from "@/api/dictionary";
|
||||
export default {
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() { return {} }
|
||||
}
|
||||
default() {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
IsSystemLevel: {
|
||||
type: Number,
|
||||
default() {
|
||||
return 0;
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
expression: '',
|
||||
expression: "",
|
||||
showCron: false,
|
||||
form: {
|
||||
Id: '',
|
||||
Code: '',
|
||||
EmailTopicCN: '',
|
||||
EmailTopic: '',
|
||||
BusinessLevelEnum: '',
|
||||
BusinessModuleEnum: '',
|
||||
ToUserTypeList: '',
|
||||
CopyUserTypeList: '',
|
||||
EmailUrgentEnum: '',
|
||||
EmailCron: '',
|
||||
Id: "",
|
||||
Code: "",
|
||||
EmailTopicCN: "",
|
||||
EmailTopic: "",
|
||||
BusinessLevelEnum: "",
|
||||
BusinessModuleEnum: "",
|
||||
ToUserTypeList: "",
|
||||
CopyUserTypeList: "",
|
||||
EmailUrgentEnum: "",
|
||||
EmailCron: "",
|
||||
BusinessScenarioEnum: null,
|
||||
EmailHtmlContentCN: '',
|
||||
EmailHtmlContent: '',
|
||||
AttachPath: '',
|
||||
AttachName: '',
|
||||
AttachNameCN: '',
|
||||
AttachCNPath: '',
|
||||
EmailHtmlContentCN: "",
|
||||
EmailHtmlContent: "",
|
||||
AttachPath: "",
|
||||
AttachName: "",
|
||||
AttachNameCN: "",
|
||||
AttachCNPath: "",
|
||||
IsDistinguishCriteria: true,
|
||||
IsReturnRequired: true,
|
||||
IsUrgent: true,
|
||||
IsEnable: true,
|
||||
IsAutoSend: true,
|
||||
CriterionTypeEnum: null
|
||||
CriterionTypeEnum: null,
|
||||
},
|
||||
rules: {
|
||||
Code: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
BusinessScenarioEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
EmailTopicCN: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
EmailTopic: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
BusinessLevelEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
ToUserTypeList: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
EmailCron: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
EmailUrgentEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
EmailHtmlContentCN: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
EmailHtmlContent: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
CriterionTypeEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
Code: [{ required: true, message: "Please select", trigger: ["blur"] }],
|
||||
BusinessScenarioEnum: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
EmailTopicCN: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
EmailTopic: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
BusinessLevelEnum: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
ToUserTypeList: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
EmailCron: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
EmailUrgentEnum: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
EmailHtmlContentCN: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
EmailHtmlContent: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
CriterionTypeEnum: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
},
|
||||
scenarioOption: [],
|
||||
fileListCN: [],
|
||||
fileListEN: [],
|
||||
loading: false
|
||||
}
|
||||
loading: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.initForm()
|
||||
this.initForm();
|
||||
if (this.IsSystemLevel) {
|
||||
this.form.ToUserTypeList = [];
|
||||
this.form.CopyUserTypeList = [];
|
||||
this.form.EmailUrgentEnum = "3";
|
||||
this.form.IsReturnRequired = false;
|
||||
this.form.IsDistinguishCriteria = false;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showDialog() {
|
||||
this.expression = this.form.EmailCron;//传入的 cron 表达式,可以反解析到 UI 上
|
||||
this.expression = this.form.EmailCron; //传入的 cron 表达式,可以反解析到 UI 上
|
||||
this.showCron = true;
|
||||
},
|
||||
crontabFill(value) {
|
||||
this.form.EmailCron = value;
|
||||
},
|
||||
handleRemoveFileCN() {
|
||||
this.form.AttachNameCN = null
|
||||
this.form.AttachCNPath = null
|
||||
this.fileListCN = []
|
||||
this.form.AttachNameCN = null;
|
||||
this.form.AttachCNPath = null;
|
||||
this.fileListCN = [];
|
||||
},
|
||||
beforeUploadCN() {
|
||||
if (this.fileListCN.length > 0) {
|
||||
this.$alert('最多只能传一个附件')
|
||||
return
|
||||
this.$alert("最多只能传一个附件");
|
||||
return;
|
||||
}
|
||||
},
|
||||
handlePreviewCN(row, r2) {
|
||||
if (row.fullPath) {
|
||||
window.open(row.fullPath, '_blank')
|
||||
window.open(row.fullPath, "_blank");
|
||||
}
|
||||
},
|
||||
handleUploadFileCN(param) {
|
||||
this.btnLoading = true
|
||||
const formData = new FormData()
|
||||
formData.append('file', param.file)
|
||||
this.form.AttachNameCN = param.file.name
|
||||
Upload(formData, 3).then(res => {
|
||||
this.form.AttachCNPath = res.Result.FilePath
|
||||
this.btnLoading = false
|
||||
this.fileListCN.push({ name: param.file.name, path: res.Result.FilePath, fullPath: res.Result.FullFilePath, url: res.Result.FilePath })
|
||||
})
|
||||
this.btnLoading = true;
|
||||
const formData = new FormData();
|
||||
formData.append("file", param.file);
|
||||
this.form.AttachNameCN = param.file.name;
|
||||
Upload(formData, 3).then((res) => {
|
||||
this.form.AttachCNPath = res.Result.FilePath;
|
||||
this.btnLoading = false;
|
||||
this.fileListCN.push({
|
||||
name: param.file.name,
|
||||
path: res.Result.FilePath,
|
||||
fullPath: res.Result.FullFilePath,
|
||||
url: res.Result.FilePath,
|
||||
});
|
||||
});
|
||||
},
|
||||
handleUploadFileEN(param) {
|
||||
this.btnLoading = true
|
||||
const formData = new FormData()
|
||||
formData.append('file', param.file)
|
||||
this.form.AttachName = param.file.name
|
||||
Upload(formData, 3).then(res => {
|
||||
this.form.AttachPath = res.Result.FilePath
|
||||
this.btnLoading = false
|
||||
this.fileListEN.push({ name: param.file.name, path: res.Result.FilePath, fullPath: res.Result.FullFilePath, url: res.Result.FilePath })
|
||||
})
|
||||
this.btnLoading = true;
|
||||
const formData = new FormData();
|
||||
formData.append("file", param.file);
|
||||
this.form.AttachName = param.file.name;
|
||||
Upload(formData, 3).then((res) => {
|
||||
this.form.AttachPath = res.Result.FilePath;
|
||||
this.btnLoading = false;
|
||||
this.fileListEN.push({
|
||||
name: param.file.name,
|
||||
path: res.Result.FilePath,
|
||||
fullPath: res.Result.FullFilePath,
|
||||
url: res.Result.FilePath,
|
||||
});
|
||||
});
|
||||
},
|
||||
handleRemoveFileEN() {
|
||||
this.form.AttachName = null
|
||||
this.form.AttachPath = null
|
||||
this.fileListEN = []
|
||||
this.form.AttachName = null;
|
||||
this.form.AttachPath = null;
|
||||
this.fileListEN = [];
|
||||
},
|
||||
beforeUploadEN() {
|
||||
if (this.fileListEN.length > 0) {
|
||||
this.$alert('最多只能传一个附件')
|
||||
return
|
||||
this.$alert("最多只能传一个附件");
|
||||
return;
|
||||
}
|
||||
},
|
||||
handlePreviewEN(row, r2) {
|
||||
if (row.fullPath) {
|
||||
window.open(row.fullPath, '_blank')
|
||||
window.open(row.fullPath, "_blank");
|
||||
}
|
||||
},
|
||||
async initForm() {
|
||||
this.loading = true
|
||||
this.loading = true;
|
||||
// await this.getScenarios()
|
||||
for (const k in this.form) {
|
||||
if (this.data.hasOwnProperty(k)) {
|
||||
this.form[k] = this.data[k]
|
||||
this.form[k] = this.data[k];
|
||||
}
|
||||
if (k === 'AttachPath' && this.form[k]) {
|
||||
this.fileListEN.push({ name: this.data.AttachName, path: this.data.AttachPath, fullPath: this.data.AttachPath, url: this.data.AttachPath })
|
||||
if (k === "AttachPath" && this.form[k]) {
|
||||
this.fileListEN.push({
|
||||
name: this.data.AttachName,
|
||||
path: this.data.AttachPath,
|
||||
fullPath: this.data.AttachPath,
|
||||
url: this.data.AttachPath,
|
||||
});
|
||||
}
|
||||
if (k === 'AttachCNPath' && this.form[k]) {
|
||||
this.fileListCN.push({ name: this.data.AttachNameCN, path: this.data.AttachCNPath, fullPath: this.data.AttachCNPath, url: this.data.AttachCNPath })
|
||||
if (k === "AttachCNPath" && this.form[k]) {
|
||||
this.fileListCN.push({
|
||||
name: this.data.AttachNameCN,
|
||||
path: this.data.AttachCNPath,
|
||||
fullPath: this.data.AttachCNPath,
|
||||
url: this.data.AttachCNPath,
|
||||
});
|
||||
}
|
||||
}
|
||||
console.log(this.fileListEN, this.fileListCN)
|
||||
this.loading = false
|
||||
this.loading = false;
|
||||
},
|
||||
|
||||
// 保存
|
||||
handleSave() {
|
||||
this.$refs.emailForm.validate(valid => {
|
||||
if (!valid) return
|
||||
this.loading = true
|
||||
addOrUpdateEmailNoticeConfigList(this.form).then(res => {
|
||||
this.loading = false
|
||||
this.$emit('closeDialog')
|
||||
this.$emit('getList')
|
||||
this.$message.success('Saved successfully')
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$refs.emailForm.validate((valid) => {
|
||||
if (!valid) return;
|
||||
this.loading = true;
|
||||
this.form.IsSystemLevel = this.IsSystemLevel;
|
||||
addOrUpdateEmailNoticeConfigList(this.form)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.$emit("closeDialog");
|
||||
this.$emit("getList");
|
||||
this.$message.success("Saved successfully");
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,25 +1,69 @@
|
||||
<template>
|
||||
<box-content>
|
||||
<div class="search">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<el-form
|
||||
v-if="!IsSystemLevel"
|
||||
:inline="true"
|
||||
size="mini"
|
||||
class="base-search-form"
|
||||
>
|
||||
<el-form-item label="是否需要回执:">
|
||||
<el-select v-model="searchData.IsReturnRequired" clearable style="width:100px;">
|
||||
<el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" />
|
||||
<el-select
|
||||
v-model="searchData.IsReturnRequired"
|
||||
clearable
|
||||
style="width: 100px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.YesOrNo"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
:key="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否加急:">
|
||||
<el-select v-model="searchData.IsUrgent" clearable style="width:100px;">
|
||||
<el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" />
|
||||
<el-select
|
||||
v-model="searchData.IsUrgent"
|
||||
clearable
|
||||
style="width: 100px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.YesOrNo"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
:key="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用:">
|
||||
<el-select v-model="searchData.IsEnable" clearable style="width:100px;">
|
||||
<el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" />
|
||||
<el-select
|
||||
v-model="searchData.IsEnable"
|
||||
clearable
|
||||
style="width: 100px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.YesOrNo"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
:key="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:auditRecord:table:criterion')" v-if="isDistinguishCriteria">
|
||||
<el-select v-model="searchData.CriterionTypeEnum" clearable style="width:100px;">
|
||||
<el-option v-for="item of $d.CriterionType" :value="item.value" :label="item.label" />
|
||||
<el-form-item
|
||||
:label="$t('trials:auditRecord:table:criterion')"
|
||||
v-if="isDistinguishCriteria"
|
||||
>
|
||||
<el-select
|
||||
v-model="searchData.CriterionTypeEnum"
|
||||
clearable
|
||||
style="width: 100px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.CriterionType"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
:key="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -27,31 +71,26 @@
|
||||
<el-button type="primary" @click="handleReset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto;">
|
||||
<!-- <el-button
|
||||
<span style="margin-left: auto">
|
||||
<!-- <el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
>
|
||||
场景配置
|
||||
</el-button> -->
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
<el-button type="primary" size="mini" @click="handleAdd">
|
||||
新增
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<!-- 受试者列表 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:45}"
|
||||
v-adaptive="{ bottomOffset: 45 }"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width:100%"
|
||||
style="width: 100%"
|
||||
@sort-change="handleSortByColumn"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
@@ -61,7 +100,7 @@
|
||||
:label="$t('trials:emailManageCfg:title:code')"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="100"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="isDistinguishCriteria"
|
||||
@@ -69,10 +108,10 @@
|
||||
:label="$t('trials:reviewTrack:table:criterionName')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
width="120"
|
||||
min-width="120"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('CriterionType', scope.row.CriterionTypeEnum) }}
|
||||
{{ $fd("CriterionType", scope.row.CriterionTypeEnum) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -80,23 +119,24 @@
|
||||
label="邮件主题(中文)"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="160"
|
||||
min-width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="EmailTopic"
|
||||
label="邮件主题(英文)"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="160"
|
||||
min-width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="BusinessLevelEnum"
|
||||
label="业务层级"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="100">
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('BusinessLevel',scope.row.BusinessLevelEnum) }}
|
||||
{{ $fd("BusinessLevel", scope.row.BusinessLevelEnum) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -104,9 +144,10 @@
|
||||
label="业务模块"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="100">
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('BusinessModule',scope.row.BusinessModuleEnum) }}
|
||||
{{ $fd("BusinessModule", scope.row.BusinessModuleEnum) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -114,10 +155,10 @@
|
||||
label="业务场景"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="130"
|
||||
min-width="130"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('Email_BusinessScenario',scope.row.BusinessScenarioEnum) }}
|
||||
{{ $fd("Email_BusinessScenario", scope.row.BusinessScenarioEnum) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 收件人 -->
|
||||
@@ -125,10 +166,17 @@
|
||||
prop="ToUserTypeList"
|
||||
:label="$t('trials:emailManageCfg:title:toUserTypeList')"
|
||||
show-overflow-tooltip
|
||||
width="100"
|
||||
min-width="100"
|
||||
v-if="IsSystemLevel < 2"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.ToUserTypeList.length > 0?scope.row.ToUserTypeList.map(v => $fd('UserType', v)).join('、'):'' }}
|
||||
{{
|
||||
scope.row.ToUserTypeList.length > 0
|
||||
? scope.row.ToUserTypeList.map((v) => $fd("UserType", v)).join(
|
||||
"、"
|
||||
)
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 抄送人 -->
|
||||
@@ -136,10 +184,17 @@
|
||||
prop="CopyUserTypeList"
|
||||
:label="$t('trials:emailManageCfg:title:copyUserTypeList')"
|
||||
show-overflow-tooltip
|
||||
width="100"
|
||||
min-width="100"
|
||||
v-if="!IsSystemLevel"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.CopyUserTypeList.length > 0?scope.row.CopyUserTypeList.map(v => $fd('UserType', v)).join('、'):'' }}
|
||||
{{
|
||||
scope.row.CopyUserTypeList.length > 0
|
||||
? scope.row.CopyUserTypeList.map((v) => $fd("UserType", v)).join(
|
||||
"、"
|
||||
)
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -147,10 +202,11 @@
|
||||
label="加急状态"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="100"
|
||||
min-width="100"
|
||||
v-if="!IsSystemLevel"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('EmailUrgent',scope.row.EmailUrgentEnum) }}
|
||||
{{ $fd("EmailUrgent", scope.row.EmailUrgentEnum) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -158,17 +214,23 @@
|
||||
label="发送周期和时间"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="160"
|
||||
min-width="160"
|
||||
v-if="!IsSystemLevel"
|
||||
/>
|
||||
<!-- 附件 -->
|
||||
<el-table-column
|
||||
prop="FileName"
|
||||
:label="$t('trials:emailManageCfg:title:fileName')"
|
||||
show-overflow-tooltip
|
||||
width="100"
|
||||
min-width="100"
|
||||
v-if="!IsSystemLevel"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.FilePath" type="text" @click="handlePreview(scope.row.FilePath)">
|
||||
<el-button
|
||||
v-if="scope.row.FilePath"
|
||||
type="text"
|
||||
@click="handlePreview(scope.row.FilePath)"
|
||||
>
|
||||
{{ scope.row.FileName }}
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -179,13 +241,16 @@
|
||||
:label="$t('trials:emailManageCfg:title:isReturnRequired')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
width="140"
|
||||
min-width="140"
|
||||
v-if="!IsSystemLevel"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsReturnRequired" type="danger">
|
||||
{{ $fd('YesOrNo', scope.row.IsReturnRequired) }}
|
||||
{{ $fd("YesOrNo", scope.row.IsReturnRequired) }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsReturnRequired) }}</el-tag>
|
||||
<el-tag v-else type="primary">{{
|
||||
$fd("YesOrNo", scope.row.IsReturnRequired)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 是否自动发送 -->
|
||||
@@ -194,13 +259,16 @@
|
||||
:label="$t('trials:emailManageCfg:title:isAutoSend')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
width="160"
|
||||
min-width="160"
|
||||
v-if="!IsSystemLevel"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsAutoSend" type="danger">
|
||||
{{ $fd('YesOrNo', scope.row.IsAutoSend) }}
|
||||
{{ $fd("YesOrNo", scope.row.IsAutoSend) }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsAutoSend) }}</el-tag>
|
||||
<el-tag v-else type="primary">{{
|
||||
$fd("YesOrNo", scope.row.IsAutoSend)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -208,13 +276,16 @@
|
||||
:label="$t('trials:emailManageCfg:table:IsEnable')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
width="160"
|
||||
min-width="160"
|
||||
v-if="!IsSystemLevel"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsEnable" type="danger">
|
||||
{{ $fd('YesOrNo', scope.row.IsEnable) }}
|
||||
{{ $fd("YesOrNo", scope.row.IsEnable) }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsEnable) }}</el-tag>
|
||||
<el-tag v-else type="primary">{{
|
||||
$fd("YesOrNo", scope.row.IsEnable)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 更新时间 -->
|
||||
@@ -223,7 +294,7 @@
|
||||
:label="$t('trials:emailManageCfg:title:updateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
width="160"
|
||||
min-width="160"
|
||||
/>
|
||||
<!-- 创建时间 -->
|
||||
<el-table-column
|
||||
@@ -231,24 +302,28 @@
|
||||
:label="$t('trials:emailManageCfg:title:createTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
width="160"
|
||||
min-width="160"
|
||||
/>
|
||||
<el-table-column label="Action" width="140" fixed="right">
|
||||
<el-table-column label="Action" min-width="140" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
<el-button type="text" @click="handleEdit(scope.row)">
|
||||
编辑
|
||||
</el-button>
|
||||
|
||||
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
|
||||
|
||||
<el-button type="text" @click="handleDelete(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 搜索框 -->
|
||||
<!-- 修改受试者状态 -->
|
||||
<el-dialog
|
||||
@@ -260,7 +335,12 @@
|
||||
fullscreen
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<EmailForm :data="rowData" @closeDialog="closeDialog" @getList="getList" />
|
||||
<EmailForm
|
||||
:data="rowData"
|
||||
:is-system-level="IsSystemLevel"
|
||||
@closeDialog="closeDialog"
|
||||
@getList="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 修改受试者状态 -->
|
||||
@@ -282,116 +362,128 @@
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getEmailNoticeConfigList, deleteEmailNoticeConfig } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import EmailForm from './EmailForm'
|
||||
import AttachmentList from './AttachmentList'
|
||||
import {
|
||||
getEmailNoticeConfigList,
|
||||
deleteEmailNoticeConfig,
|
||||
} from "@/api/dictionary";
|
||||
import BoxContent from "@/components/BoxContent";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import EmailForm from "./EmailForm";
|
||||
import AttachmentList from "./AttachmentList";
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
IsReturnRequired: '',
|
||||
IsUrgent: '',
|
||||
IsEnable: '',
|
||||
IsReturnRequired: "",
|
||||
IsUrgent: "",
|
||||
IsEnable: "",
|
||||
CriterionTypeEnum: null,
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
PageSize: 20,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'EmailList',
|
||||
name: "EmailList",
|
||||
components: { BoxContent, Pagination, EmailForm, AttachmentList },
|
||||
props: {
|
||||
isDistinguishCriteria: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
},
|
||||
IsSystemLevel: {
|
||||
type: Number,
|
||||
default() {
|
||||
return 0;
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeTab: '0',
|
||||
activeTab: "0",
|
||||
searchData: searchDataDefault(),
|
||||
loading: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
rowData: {},
|
||||
title: '',
|
||||
title: "",
|
||||
editVisible: false,
|
||||
attachmentVisible: false
|
||||
}
|
||||
attachmentVisible: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 获取受试者列表
|
||||
getList() {
|
||||
this.loading = true
|
||||
this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria
|
||||
getEmailNoticeConfigList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => { this.loading = false })
|
||||
this.loading = true;
|
||||
this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria;
|
||||
this.searchData.IsSystemLevel = this.IsSystemLevel;
|
||||
getEmailNoticeConfigList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.title = '新增'
|
||||
this.editVisible = true
|
||||
this.rowData = {};
|
||||
this.title = "新增";
|
||||
this.editVisible = true;
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.rowData = { ...row }
|
||||
this.title = '编辑'
|
||||
this.editVisible = true
|
||||
this.rowData = { ...row };
|
||||
this.title = "编辑";
|
||||
this.editVisible = true;
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(() => {
|
||||
deleteEmailNoticeConfig(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
this.$message.success('删除成功!')
|
||||
}
|
||||
})
|
||||
})
|
||||
this.$confirm(this.$t("trials:staffResearch:message:confirmDel"), {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
}).then(() => {
|
||||
deleteEmailNoticeConfig(row.Id).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
this.getList();
|
||||
this.$message.success("删除成功!");
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
handleDetail(row) {
|
||||
this.rowData = { ...row }
|
||||
this.attachmentVisible = true
|
||||
this.rowData = { ...row };
|
||||
this.attachmentVisible = true;
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 关闭新增、编辑框
|
||||
closeDialog() {
|
||||
this.editVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
this.editVisible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -2,122 +2,148 @@
|
||||
<box-content>
|
||||
<el-tabs v-model="activeTab" type="border-card">
|
||||
<!-- 通用 -->
|
||||
<el-tab-pane
|
||||
:label="$t('trials:emailManageCfg:title:commom')"
|
||||
name="0"
|
||||
>
|
||||
<EmailList v-if="activeTab === '0'" :is-distinguish-criteria="false"></EmailList>
|
||||
<el-tab-pane :label="$t('trials:emailManageCfg:title:commom')" name="0">
|
||||
<EmailList
|
||||
v-if="activeTab === '0'"
|
||||
:is-distinguish-criteria="false"
|
||||
:is-system-level="0"
|
||||
></EmailList>
|
||||
</el-tab-pane>
|
||||
<!-- 标准相关 -->
|
||||
<el-tab-pane
|
||||
:label="$t('trials:emailManageCfg:title:criterions')"
|
||||
name="1"
|
||||
>
|
||||
<EmailList v-if="activeTab === '1'" :is-distinguish-criteria="true"></EmailList>
|
||||
<EmailList
|
||||
v-if="activeTab === '1'"
|
||||
:is-distinguish-criteria="true"
|
||||
:is-system-level="0"
|
||||
></EmailList>
|
||||
</el-tab-pane>
|
||||
<!-- 系统相关 -->
|
||||
<el-tab-pane :label="$t('trials:emailManageCfg:title:system')" name="2">
|
||||
<EmailList
|
||||
v-if="activeTab === '2'"
|
||||
:is-distinguish-criteria="false"
|
||||
:is-system-level="1"
|
||||
></EmailList>
|
||||
</el-tab-pane>
|
||||
<!-- 系统相关-分角色 -->
|
||||
<el-tab-pane :label="$t('trials:emailManageCfg:title:systemDisRole')" name="3">
|
||||
<EmailList
|
||||
v-if="activeTab === '3'"
|
||||
:is-distinguish-criteria="false"
|
||||
:is-system-level="2"
|
||||
></EmailList>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getEmailNoticeConfigList, deleteEmailNoticeConfig } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import EmailList from './components/EmailList'
|
||||
import {
|
||||
getEmailNoticeConfigList,
|
||||
deleteEmailNoticeConfig,
|
||||
} from "@/api/dictionary";
|
||||
import BoxContent from "@/components/BoxContent";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import EmailList from "./components/EmailList";
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
IsReturnRequired: '',
|
||||
IsUrgent: '',
|
||||
IsEnable: '',
|
||||
IsReturnRequired: "",
|
||||
IsUrgent: "",
|
||||
IsEnable: "",
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
PageSize: 20,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'EmailListIndex',
|
||||
name: "EmailListIndex",
|
||||
components: { BoxContent, Pagination, EmailList },
|
||||
data() {
|
||||
return {
|
||||
activeTab: '0',
|
||||
activeTab: "0",
|
||||
searchData: searchDataDefault(),
|
||||
loading: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
rowData: {},
|
||||
title: '',
|
||||
title: "",
|
||||
editVisible: false,
|
||||
attachmentVisible: false
|
||||
}
|
||||
attachmentVisible: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 获取受试者列表
|
||||
getList() {
|
||||
this.loading = true
|
||||
getEmailNoticeConfigList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => { this.loading = false })
|
||||
this.loading = true;
|
||||
getEmailNoticeConfigList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.title = '新增'
|
||||
this.editVisible = true
|
||||
this.rowData = {};
|
||||
this.title = "新增";
|
||||
this.editVisible = true;
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.rowData = { ...row }
|
||||
this.title = '编辑'
|
||||
this.editVisible = true
|
||||
this.rowData = { ...row };
|
||||
this.title = "编辑";
|
||||
this.editVisible = true;
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(() => {
|
||||
deleteEmailNoticeConfig(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
this.$message.success('删除成功!')
|
||||
}
|
||||
})
|
||||
})
|
||||
this.$confirm(this.$t("trials:staffResearch:message:confirmDel"), {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
}).then(() => {
|
||||
deleteEmailNoticeConfig(row.Id).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
this.getList();
|
||||
this.$message.success("删除成功!");
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
handleDetail(row) {
|
||||
this.rowData = { ...row }
|
||||
this.attachmentVisible = true
|
||||
this.rowData = { ...row };
|
||||
this.attachmentVisible = true;
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 关闭新增、编辑框
|
||||
closeDialog() {
|
||||
this.editVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
this.editVisible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -25,56 +25,68 @@
|
||||
<el-tab-pane label="签名管理" name="sign">
|
||||
<Sign v-if="activeTab == 'sign'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="浏览器推荐" name="browser">
|
||||
<Browser v-if="activeTab == 'browser'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import QcQuestions from './components/QcQuestions.vue'
|
||||
import CriterionsTmp from './components/CriterionsTmp'
|
||||
import ClinicalData from './components/ClinicalDataConfig'
|
||||
import MedicalAudit from './components/MedicalAudit'
|
||||
import Anonymization from './components/Anonymization'
|
||||
import IncreaseFields from './components/IncreaseFields'
|
||||
import Email from './email/index.vue'
|
||||
import Sign from './sign/index.vue'
|
||||
import QcQuestions from "./components/QcQuestions.vue";
|
||||
import CriterionsTmp from "./components/CriterionsTmp";
|
||||
import ClinicalData from "./components/ClinicalDataConfig";
|
||||
import MedicalAudit from "./components/MedicalAudit";
|
||||
import Anonymization from "./components/Anonymization";
|
||||
import IncreaseFields from "./components/IncreaseFields";
|
||||
import Email from "./email/index.vue";
|
||||
import Sign from "./sign/index.vue";
|
||||
import Browser from "./browser/index.vue";
|
||||
export default {
|
||||
name: 'Questions',
|
||||
name: "Questions",
|
||||
components: {
|
||||
QcQuestions, CriterionsTmp, ClinicalData, Anonymization, IncreaseFields, Email, Sign,
|
||||
MedicalAudit
|
||||
QcQuestions,
|
||||
CriterionsTmp,
|
||||
ClinicalData,
|
||||
Anonymization,
|
||||
IncreaseFields,
|
||||
Email,
|
||||
Sign,
|
||||
MedicalAudit,
|
||||
Browser,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeTab: 'qc'
|
||||
}
|
||||
}, mounted() {
|
||||
activeTab: "qc",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
if (this.$route.query.tabActive) {
|
||||
this.activeTab = this.$route.query.tabActive
|
||||
this.activeTab = this.$route.query.tabActive;
|
||||
} else {
|
||||
this.activeTab = 'qc'
|
||||
this.activeTab = "qc";
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickTab(tab, event) {
|
||||
this.$router.push({ path: `/dictionary/template?tabActive=${tab.name}` })
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$router.push({ path: `/dictionary/template?tabActive=${tab.name}` });
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.question-wrapper{
|
||||
.el-tabs{
|
||||
.question-wrapper {
|
||||
.el-tabs {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.el-tabs__header {
|
||||
height: 40px;
|
||||
margin-bottom:5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.el-tabs__content{
|
||||
.el-tabs__content {
|
||||
flex: 1;
|
||||
.el-tab-pane{
|
||||
.el-tab-pane {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,490 @@
|
||||
<template>
|
||||
<div class="role">
|
||||
<div ref="leftContainer" class="left">
|
||||
<el-form :inline="true">
|
||||
<!--项目编号/实验名称-->
|
||||
<el-form-item :label="$t('feedBack:search:trials')" v-if="level > 8">
|
||||
<el-input
|
||||
v-model="searchData.TrialKeyInfo"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!--中心-->
|
||||
<el-form-item :label="$t('feedBack:search:site')" v-if="level > 7">
|
||||
<el-input
|
||||
v-model="searchData.TrialSiteCode"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!--受试者访视-->
|
||||
<el-form-item
|
||||
:label="$t('feedBack:search:subjectVisit')"
|
||||
v-if="level > 7"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchData.SubejctAndVisitKeyInfo"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!--角色-->
|
||||
<el-form-item :label="$t('feedBack:search:role')" v-if="level > 7">
|
||||
<el-select
|
||||
v-model="searchData.UserTypeEnum"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of UserTypeOptins"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--反馈人-->
|
||||
<el-form-item :label="$t('feedBack:search:user')" v-if="level > 7">
|
||||
<el-input
|
||||
v-model="searchData.FeedBackKeyInfo"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!--问题类型-->
|
||||
<el-form-item :label="$t('feedBack:search:questionType')">
|
||||
<el-select
|
||||
v-model="searchData.QuestionType"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of QuestionTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--问题描述-->
|
||||
<el-form-item :label="$t('feedBack:search:description')">
|
||||
<el-input
|
||||
v-model="searchData.QuestionDescription"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!--状态-->
|
||||
<el-form-item :label="$t('feedBack:search:status')" v-if="level > 7">
|
||||
<el-select v-model="searchData.State" clearable style="width: 150px">
|
||||
<el-option
|
||||
v-for="item of $d.FeedBackStatus"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--反馈日期-->
|
||||
<el-form-item :label="$t('feedBack:search:time')">
|
||||
<el-date-picker
|
||||
v-model="datetimerange"
|
||||
type="datetimerange"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
:start-placeholder="$t('feedBack:search:beginTime')"
|
||||
:end-placeholder="$t('feedBack:search:endTime')"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@change="handleDatetimeChange"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="getList"
|
||||
>
|
||||
{{ $t("common:button:search") }}
|
||||
</el-button>
|
||||
<!-- 重置 -->
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
{{ $t("common:button:reset") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="report"
|
||||
v-if="level > 7"
|
||||
>
|
||||
{{ $t("common:button:export") }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="resolve"
|
||||
style="float: right"
|
||||
v-if="level > 7"
|
||||
:disabled="tableSelectData.length <= 0"
|
||||
>
|
||||
{{ $t("feedBack:button:resolve") }}
|
||||
</el-button>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{ bottomOffset: 45 }"
|
||||
height="100"
|
||||
:data="list"
|
||||
class="table"
|
||||
@selection-change="handleSelectChange"
|
||||
@sort-change="handleSortByColumn"
|
||||
:default-sort="{ prop: 'CreateTime', order: 'descending' }"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
align="center"
|
||||
width="45"
|
||||
v-if="level > 7"
|
||||
:selectable="handleSelectTable"
|
||||
/>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:trialCode')"
|
||||
prop="TrialCode"
|
||||
min-width="80"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 8"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:study')"
|
||||
prop="NoticeTypeEnum"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 8"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:siteCode')"
|
||||
prop="TrialSiteCode"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 7"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:subjectVisit')"
|
||||
prop="SubjectVisitName"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 7"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:role')"
|
||||
prop="FeedBackUserName"
|
||||
min-width="80"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 7"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:user')"
|
||||
prop="FeedBackFullName"
|
||||
min-width="80"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 7"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:questionType')"
|
||||
prop="QuestionType"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
QuestionTypeOptions.filter(
|
||||
(item) => item.value === scope.row.QuestionType
|
||||
)[0].label
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:description')"
|
||||
prop="QuestionDescription"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:time')"
|
||||
prop="CreateTime"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:status')"
|
||||
prop="State"
|
||||
min-width="80"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 7"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="['danger', 'success'][scope.row.State]">{{
|
||||
$fd("FeedBackStatus", scope.row.State)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:uploadTime')"
|
||||
prop="UpdateTime"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 7"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('common:action:action')"
|
||||
fixed="right"
|
||||
prop="UserTypeShortName"
|
||||
width="80"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="getDetail(scope.row)">
|
||||
{{ $t("common:button:view") }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination" style="text-align: right; margin-top: 5px">
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from "@/components/Pagination";
|
||||
import { batchUpdateFeedBackState, getUserFeedBackList } from "@/api/trials.js";
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
TrialKeyInfo: null,
|
||||
SubejctAndVisitKeyInfo: null,
|
||||
UserTypeEnum: null,
|
||||
FeedBackKeyInfo: null,
|
||||
QuestionDescription: null,
|
||||
QuestionType: null,
|
||||
State: null,
|
||||
TrialSiteCode: null,
|
||||
BeginCreatime: null,
|
||||
EndCreatime: null,
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
Asc: false,
|
||||
SortField: "CreateTime",
|
||||
};
|
||||
};
|
||||
export default {
|
||||
components: { Pagination },
|
||||
props: {
|
||||
trialId: {
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
dicts: [
|
||||
"NoticeApplicableTrial",
|
||||
"NoteLevel",
|
||||
"NoteType",
|
||||
"NoticeState",
|
||||
"NoticeMode",
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
datetimerange: [],
|
||||
// 查询参数
|
||||
searchData: searchDataDefault(),
|
||||
tableSelectData: [],
|
||||
UserTypeOptins: [
|
||||
{ label: "CRC", value: 2 },
|
||||
{ label: "IR", value: 13 },
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
level() {
|
||||
if (this.hasPermi(["role:dev", "role:admin"])) {
|
||||
return 9;
|
||||
}
|
||||
if (this.hasPermi(["role:pm"])) {
|
||||
return 8;
|
||||
}
|
||||
if (this.hasPermi(["role:ir", "role:crc"])) {
|
||||
return 7;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
QuestionTypeOptions() {
|
||||
if (this.level > 7) {
|
||||
return [
|
||||
...this.$d.FeedBackTypeToCRC.filter((item) => item.value > 0),
|
||||
...this.$d.FeedBackTypeToIR,
|
||||
];
|
||||
}
|
||||
if (this.hasPermi(["role:ir"])) {
|
||||
return this.$d.FeedBackTypeToIR;
|
||||
}
|
||||
if (this.hasPermi(["role:crc"])) {
|
||||
return this.$d.FeedBackTypeToCRC;
|
||||
}
|
||||
return [];
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 通过提交状态决定该行的 CheckBox 是否可以勾选
|
||||
handleSelectTable(row) {
|
||||
return row.State < 1;
|
||||
},
|
||||
async getList() {
|
||||
try {
|
||||
if (this.trialId) {
|
||||
this.searchData.TrialId = this.trialId;
|
||||
}
|
||||
this.loading = true;
|
||||
let res = await getUserFeedBackList(this.searchData);
|
||||
this.loading = false;
|
||||
if (res.IsSuccess) {
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false;
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
handleDatetimeChange(val) {
|
||||
if (val) {
|
||||
this.searchData.BeginCreatime = val[0];
|
||||
this.searchData.EndCreatime = val[1];
|
||||
} else {
|
||||
this.searchData.BeginCreatime = "";
|
||||
this.searchData.EndCreatime = "";
|
||||
}
|
||||
},
|
||||
// 重置列表查询
|
||||
handleReset() {
|
||||
this.datetimerange = null;
|
||||
this.handleDatetimeChange();
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
},
|
||||
// 设为解决
|
||||
async resolve() {
|
||||
try {
|
||||
let confirm = await this.$confirm(this.$t("feedBack:resolve:tip"), {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
});
|
||||
if (!confirm) return;
|
||||
let data = {
|
||||
IdList: this.tableSelectData.map((item) => item.Id),
|
||||
state: 1,
|
||||
};
|
||||
let res = await batchUpdateFeedBackState(data);
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t("feedBack:resolve:success"));
|
||||
this.getList();
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
// 导出
|
||||
report() {},
|
||||
// 表格选择
|
||||
handleSelectChange(selection) {
|
||||
// console.log(selection, "handleSelectChange");
|
||||
this.tableSelectData = selection;
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
} else {
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 获取详情
|
||||
getDetail(row) {
|
||||
this.$FB({
|
||||
type: "detail",
|
||||
Id: row.Id,
|
||||
callBack: () => {
|
||||
this.getList();
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.role {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
.left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 0;
|
||||
flex-grow: 4;
|
||||
// border-right: 1px solid #ccc;
|
||||
.filter-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 5px;
|
||||
}
|
||||
.data-table {
|
||||
flex: 1;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.pagination-container {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
.right {
|
||||
width: 0;
|
||||
flex-grow: 6;
|
||||
overflow-y: auto;
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
.selected-row {
|
||||
background-color: cadetblue;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -183,7 +183,7 @@
|
||||
{{ $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.4.001</p>
|
||||
<p style="margin-bottom: 20px">V{{ $version.Version }}</p>
|
||||
<p style="margin-bottom: 20px" v-if="language === 'zh'">
|
||||
Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司
|
||||
版权所有
|
||||
@@ -202,6 +202,7 @@
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<browserTip ref="browserTip" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -210,13 +211,14 @@ import { mapGetters, mapMutations } from "vuex";
|
||||
import TopLang from "./topLang";
|
||||
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
|
||||
import Vcode from "vue-puzzle-vcode";
|
||||
import browserTip from "@/views/dictionary/template/browser/tip.vue";
|
||||
import Img1 from "@/assets/pic-2.png";
|
||||
export default {
|
||||
name: "Login",
|
||||
components: { TopLang, Vcode },
|
||||
components: { TopLang, Vcode, browserTip },
|
||||
data() {
|
||||
return {
|
||||
NODE_ENV: process.env.NODE_ENV,
|
||||
NODE_ENV: process.env.NODE_ENV, // process.env.NODE_ENV
|
||||
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
|
||||
aboutVisible: false,
|
||||
loginForm: {
|
||||
@@ -279,6 +281,7 @@ export default {
|
||||
// this.$updateDictionary()
|
||||
}
|
||||
}
|
||||
this.$refs.browserTip.open();
|
||||
},
|
||||
methods: {
|
||||
...mapMutations({ setLanguage: "lang/setLanguage" }),
|
||||
|
||||
@@ -0,0 +1,310 @@
|
||||
<template>
|
||||
<div class="research_bs_content">
|
||||
<el-form ref="researchBSForm" label-position="left" :model="form" :rules="rules">
|
||||
<div class="basic_content form-label-width">
|
||||
<el-form-item :label="$t('trials:researchForm:title:researchSurveyStatus')">
|
||||
<el-tag>{{ $fd('ResearchRecord', state) }}</el-tag>
|
||||
</el-form-item>
|
||||
<!-- 项目编号 -->
|
||||
<el-form-item :label="$t('trials:researchForm:form:trialId')">
|
||||
<span>{{ form.TrialCode }}</span>
|
||||
</el-form-item>
|
||||
<!-- 试验方案号 -->
|
||||
<el-form-item :label="$t('trials:researchForm:form:researchNo')">
|
||||
<span>{{ form.ResearchProgramNo }}</span>
|
||||
</el-form-item>
|
||||
<!-- 试验名称 -->
|
||||
<el-form-item :label="$t('trials:researchForm:form:researchName')">
|
||||
<span>{{ form.ExperimentName }}</span>
|
||||
</el-form-item>
|
||||
<!-- 适应症类型 -->
|
||||
<el-form-item :label="$t('trials:researchForm:form:decleareType')">
|
||||
<span>{{ form.IndicationType }}</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="login_content">
|
||||
<div class="form-label-width">
|
||||
<el-form-item :label="$t('trials:researchForm:form:siteName')" prop="TrialSiteId">
|
||||
<el-select
|
||||
v-model="form.TrialSiteId"
|
||||
filterable
|
||||
style="width:100%;"
|
||||
:disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory"
|
||||
@change="handleSiteChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item,index) of siteOptions"
|
||||
:key="index"
|
||||
:label="item.TrialSiteAliasName"
|
||||
:value="item.TrialSiteId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 中心编号 -->
|
||||
<el-form-item v-if="form.TrialSiteId" :label="$t('trials:researchForm:form:siteId')">
|
||||
<el-input v-model="form.TrialSiteCode" disabled />
|
||||
</el-form-item>
|
||||
<!-- 联系人 -->
|
||||
<el-form-item :label="$t('trials:researchForm:form:contactor')" prop="UserName">
|
||||
<el-input v-model="form.UserName" :disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory" />
|
||||
</el-form-item>
|
||||
<!-- 联系电话 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:researchForm:form:contactorPhone')"
|
||||
prop="Phone"
|
||||
>
|
||||
<el-input v-model="form.Phone" :disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory" />
|
||||
</el-form-item>
|
||||
<!-- 联系邮箱 -->
|
||||
<el-form-item :label="$t('trials:researchForm:form:contactorEmail')">
|
||||
<el-input v-model="form.Email" disabled />
|
||||
</el-form-item>
|
||||
<!-- 平均刻盘周期(天) -->
|
||||
<el-form-item :label="$t('trials:researchForm:form:engravingCycle')">
|
||||
<el-input-number v-model="form.AverageEngravingCycle" :disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory" controls-position="right" :min="0" style="width:100%;" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<!-- 请确认参与本项目影像采集的影像技师具备对应的资质(如:“技师证”,对应设备的“大型设备上岗证”) -->
|
||||
<el-form-item v-if="!notShowFieldList.includes('IsConfirmImagingTechnologist')" :label="$t('trials:researchForm:form:isQualified')">
|
||||
<el-radio-group v-model="form.IsConfirmImagingTechnologist" :disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory">
|
||||
<el-radio
|
||||
v-for="item of $d.YesOrNo"
|
||||
:key="`IsConfirmImagingTechnologist${item.value}`"
|
||||
:label="item.value"
|
||||
>{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 原因 -->
|
||||
<el-form-item
|
||||
v-if="!notShowFieldList.includes('NotConfirmReson') && form.IsConfirmImagingTechnologist === false"
|
||||
:label="$t('trials:researchForm:form:notQualifiedReason')"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.NotConfirmReson"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 研究单位疗效评估人员类型 -->
|
||||
<el-form-item v-if="!notShowFieldList.includes('EfficacyEvaluatorType')" :label="$t('trials:researchForm:form:staffType')">
|
||||
<el-radio-group v-model="form.EfficacyEvaluatorType" :disabled="!(state === 0 && userTypeEnumInt === 0)|| isHistory">
|
||||
<el-radio v-for="item of $d.EfficacyEvaluatorType" :key="`EfficacyEvaluatorType${item.value}`" :label="item.value">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 是否严格按照研究单位影像手册参数完成图像采集 -->
|
||||
<el-form-item v-if="!notShowFieldList.includes('IsFollowStudyParameters')">
|
||||
<span slot="label" v-html="$t('trials:researchForm:form:isFollowStudyParam')" />
|
||||
<el-radio-group v-model="form.IsFollowStudyParameters" :disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory">
|
||||
<el-radio v-for="item of $d.YesOrNo" :key="`IsFollowStudyParameters${item.value}`" :label="item.value">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 不能严格按照研究单位影像手册参数采集图像原因 -->
|
||||
<el-form-item
|
||||
v-if="!notShowFieldList.includes('NotFollowReson') && !form.IsFollowStudyParameters"
|
||||
>
|
||||
<span slot="label" v-html="$t('trials:researchForm:form:notFollowStudyParam')" />
|
||||
<el-input
|
||||
v-model="form.NotFollowReson"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:disabled="!(state === 0 && userTypeEnumInt === 0) || isHistory"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getTrialSiteSelect } from '@/api/trials'
|
||||
import { addOrUpdateTrialSiteSurvey } from '@/api/research'
|
||||
export default {
|
||||
name: 'ResearchBasicInfo',
|
||||
props: {
|
||||
isHistory: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
var checkPhone = (rule, value, callback) => {
|
||||
const phoneReg = /^[0-9]+$/
|
||||
if (!value) {
|
||||
callback(new Error(this.$t('trials:researchForm:formRule:specify')))
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
if (phoneReg.test(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback(new Error(this.$t('trials:researchForm:formRule:phone')))
|
||||
}
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
return {
|
||||
form: {
|
||||
Id: '',
|
||||
Sponsor: '', // 申办方
|
||||
ResearchProgramNo: '', // 方案号
|
||||
ExperimentName: '',
|
||||
TrialCode: '', // 项目编号
|
||||
TrialSiteCode: '',
|
||||
TrialSiteAliasName: '',
|
||||
IndicationType: '', // 适应症
|
||||
TrialSiteId: '', // 研究单位名称
|
||||
UserName: '', // 联系人
|
||||
Phone: '', // 联系人电话
|
||||
Email: '', // 联系人邮箱
|
||||
AverageEngravingCycle: '',
|
||||
IsConfirmImagingTechnologist: '',
|
||||
NotConfirmReson: '',
|
||||
EfficacyEvaluatorType: '',
|
||||
IsFollowStudyParameters: '',
|
||||
NotFollowReson: ''
|
||||
},
|
||||
rules: {
|
||||
TrialSiteId: [
|
||||
{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: 'blur' }
|
||||
],
|
||||
UserName: [
|
||||
{ required: true, validator: (rule, value, callback) => { !value ? callback(new Error(this.$t('trials:researchForm:formRule:specify'))) : callback() }, trigger: 'blur' },
|
||||
{ min: 0, max: 50, message: this.$t('trials:researchForm:formRule:maxLength'), trigger: ['blur', 'change'] }
|
||||
],
|
||||
Phone: [
|
||||
{ required: true, validator: checkPhone, trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
siteOptions: [],
|
||||
loading: false,
|
||||
state: null,
|
||||
userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1,
|
||||
isShow: false,
|
||||
notShowFieldList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 保存基本信息
|
||||
handleSave(isAutoCommit) {
|
||||
return new Promise(async(resolve) => {
|
||||
try {
|
||||
const valid = await this.$refs['researchBSForm'].validate()
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const param = {
|
||||
id: this.form.Id,
|
||||
trialId: this.$route.query.trialId,
|
||||
trialSiteId: this.form.TrialSiteId,
|
||||
userName: this.form.UserName,
|
||||
phone: this.form.Phone,
|
||||
email: this.form.Email,
|
||||
averageEngravingCycle: this.form.AverageEngravingCycle,
|
||||
isConfirmImagingTechnologist: this.form.IsConfirmImagingTechnologist,
|
||||
notConfirmReson: this.form.NotConfirmReson,
|
||||
efficacyEvaluatorType: this.form.EfficacyEvaluatorType,
|
||||
isFollowStudyParameters: this.form.IsFollowStudyParameters,
|
||||
notFollowReson: this.form.NotFollowReson
|
||||
}
|
||||
const res = await addOrUpdateTrialSiteSurvey(param)
|
||||
this.loading = false
|
||||
if (res.IsSuccess && !isAutoCommit) {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
}
|
||||
resolve(true)
|
||||
} else {
|
||||
if (isAutoCommit) {
|
||||
this.$message.error(this.$t('trials:researchForm:button:msg1'))
|
||||
}
|
||||
resolve(false)
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
resolve(false)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 初始化
|
||||
async initForm(trialInfo, trialSiteSurvey, notShowFieldList) {
|
||||
// 获取项目下的site
|
||||
const { Result } = await getTrialSiteSelect(this.$route.query.trialId)
|
||||
this.siteOptions = Result
|
||||
this.form.Id = trialSiteSurvey.Id
|
||||
this.form.Sponsor = trialInfo.Sponsor // 申办方
|
||||
this.form.ResearchProgramNo = trialInfo.ResearchProgramNo // 方案号
|
||||
this.form.ExperimentName = trialInfo.ExperimentName
|
||||
this.form.TrialCode = trialInfo.TrialCode // 项目编号
|
||||
this.form.TrialSiteCode = trialSiteSurvey.TrialSiteCode
|
||||
this.form.TrialSiteAliasName = trialSiteSurvey.TrialSiteAliasName // 项目别称
|
||||
this.form.IndicationType = trialInfo.IndicationType // 适应症
|
||||
this.form.TrialSiteId = trialSiteSurvey.TrialSiteId
|
||||
this.form.UserName = trialSiteSurvey.UserName // 联系人
|
||||
this.form.Phone = trialSiteSurvey.Phone // 联系人电话
|
||||
this.form.Email = trialSiteSurvey.Email // 联系人邮箱
|
||||
this.form.AverageEngravingCycle = trialSiteSurvey.AverageEngravingCycle
|
||||
this.form.IsConfirmImagingTechnologist = trialSiteSurvey.IsConfirmImagingTechnologist
|
||||
this.form.NotConfirmReson = trialSiteSurvey.NotConfirmReson
|
||||
this.form.EfficacyEvaluatorType = trialSiteSurvey.EfficacyEvaluatorType
|
||||
this.form.IsFollowStudyParameters = trialSiteSurvey.IsFollowStudyParameters
|
||||
this.form.NotFollowReson = trialSiteSurvey.NotFollowReson
|
||||
this.state = trialSiteSurvey.State
|
||||
this.isShow = true
|
||||
if (!notShowFieldList) return
|
||||
this.notShowFieldList = notShowFieldList
|
||||
},
|
||||
handleSiteChange(val) {
|
||||
var selected = this.siteOptions.find(item => item.TrialSiteId === val)
|
||||
if (selected) {
|
||||
this.form.TrialSiteCode = selected.TrialSiteCode
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.research_bs_content{
|
||||
|
||||
.basic_content{
|
||||
padding: 0 20px;
|
||||
background: #fff;
|
||||
|
||||
}
|
||||
.login_content{
|
||||
padding: 5px 20px;
|
||||
margin-top: 5px;
|
||||
background: #fff;
|
||||
/deep/.el-form-item {
|
||||
padding-bottom: 20px;
|
||||
|
||||
}
|
||||
}
|
||||
.code_content{
|
||||
display:flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
.el-input{
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.form-label-width{
|
||||
/deep/.el-form-item__label{
|
||||
width: 140px;
|
||||
}
|
||||
/deep/.el-form-item__content{
|
||||
margin-left: 140px;
|
||||
}
|
||||
}
|
||||
.submit_content{
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/deep/.el-form-item {
|
||||
margin-bottom: 0px;
|
||||
padding-top: 5px;
|
||||
border-bottom: 1px solid #f5f7fa;
|
||||
.el-form-item__content{
|
||||
color: #82848a;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<div
|
||||
v-loading="loading"
|
||||
class="equipment_form_content"
|
||||
>
|
||||
<el-form
|
||||
ref="equipmentForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-position="left"
|
||||
>
|
||||
<!-- 扫描设备 -->
|
||||
<el-form-item :label="$t('trials:equiptResearch:form:equipment')" prop="EquipmentTypeId">
|
||||
<el-select
|
||||
v-model="form.EquipmentTypeId"
|
||||
style="width:100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.SiteSurvey_ScanEquipmentType"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 扫描参数 -->
|
||||
<el-form-item v-if="isShowParameters" :label="$t('trials:equiptResearch:form:param')">
|
||||
<el-input v-model="form.Parameters" />
|
||||
</el-form-item>
|
||||
<!-- 扫描仪器制造商名称 -->
|
||||
<el-form-item :label="$t('trials:equiptResearch:form:manufacturer')">
|
||||
<el-input v-model="form.ManufacturerName" />
|
||||
</el-form-item>
|
||||
<!-- 扫描仪型号 -->
|
||||
<el-form-item :label="$t('trials:equiptResearch:form:model')">
|
||||
<el-input v-model="form.ScannerType" />
|
||||
</el-form-item>
|
||||
<!-- 备注 -->
|
||||
<el-form-item :label="$t('trials:equiptResearch:form:remark')">
|
||||
<el-input v-model="form.Note" />
|
||||
</el-form-item>
|
||||
<div style="text-align: center;padding:20px 0px;">
|
||||
<!-- 取消 -->
|
||||
<el-button
|
||||
size="large"
|
||||
type="primary"
|
||||
@click="handleCancel"
|
||||
>
|
||||
{{ $t("common:button:cancel") }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
<el-button
|
||||
size="large"
|
||||
type="primary"
|
||||
@click="handleSave"
|
||||
>
|
||||
{{ $t("common:button:save") }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { addOrUpdateTrialSiteEquipmentSurvey } from '@/api/research'
|
||||
import { getQueryString } from '@/utils/history.js'
|
||||
export default {
|
||||
name: 'EquipmentForm',
|
||||
props: {
|
||||
equipmentInfo: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
trialSiteSurveyEquipmentType: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
isShowParameters: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
Id: '',
|
||||
EquipmentTypeId: '',
|
||||
Parameters: '',
|
||||
ManufacturerName: '',
|
||||
ScannerType: '',
|
||||
Note: '',
|
||||
TrialSiteSurveyId: ''
|
||||
},
|
||||
rules: {
|
||||
EquipmentTypeId: [
|
||||
{ required: true, message: this.$t('trials:researchForm:formRule:select'), trigger: ['blur', 'change'] }
|
||||
]
|
||||
},
|
||||
loading: false,
|
||||
dictionaryList: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initForm()
|
||||
},
|
||||
methods: {
|
||||
async initForm() {
|
||||
Object.keys(this.equipmentInfo).forEach(key => {
|
||||
this.form[key] = this.equipmentInfo[key]
|
||||
})
|
||||
},
|
||||
// 保存参与者信息
|
||||
async handleSave() {
|
||||
try {
|
||||
const validate = await this.$refs.equipmentForm.validate()
|
||||
if (!validate) return
|
||||
this.loading = true
|
||||
if (!this.form.TrialSiteSurveyId) {
|
||||
this.form.TrialSiteSurveyId = getQueryString('trialSiteSurveyId')
|
||||
}
|
||||
const trialId = getQueryString('trialId')
|
||||
const res = await addOrUpdateTrialSiteEquipmentSurvey(trialId, this.form)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.$emit('getList')
|
||||
this.$emit('close')
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
handleTrialRoleChange(v) {
|
||||
if (v === 1) {
|
||||
// crc
|
||||
this.form.IsGenerateAccount = true
|
||||
this.form.UserTypeId = this.crcId
|
||||
} else if (v === 2) {
|
||||
// cra
|
||||
this.form.IsGenerateAccount = true
|
||||
this.form.UserTypeId = this.craId
|
||||
} else {
|
||||
this.form.IsGenerateAccount = false
|
||||
this.form.UserTypeId = ''
|
||||
}
|
||||
},
|
||||
// 取消保存
|
||||
handleCancel() {
|
||||
this.$emit('close')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.equipment_form_content{
|
||||
padding: 0 10px;
|
||||
/deep/.el-form-item {
|
||||
margin-bottom: 0px;
|
||||
padding: 5px 0 20px 0;
|
||||
border-bottom: 1px solid #f5f7fa;
|
||||
.el-form-item__content{
|
||||
color: #82848a;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,219 @@
|
||||
<template>
|
||||
<div class="equipments_content">
|
||||
<div class="title">
|
||||
<div>{{ $t('trials:equiptResearch:title:equiptResearch') }}</div>
|
||||
<div v-if="state === 0 && userTypeEnumInt === 0 && !isHistory">
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">
|
||||
{{ $t('common:button:add') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="item in list" :key="item.name" class="equipment_info">
|
||||
<div class="p_icon">
|
||||
<i class="el-icon-receiving" />
|
||||
</div>
|
||||
<div class="p_info">
|
||||
<div
|
||||
class="p_info_basic"
|
||||
:style="{maxWidth:w+'px','white-space': 'nowrap',
|
||||
overflow: 'hidden',
|
||||
'text-overflow': 'ellipsis'}"
|
||||
>
|
||||
<div class="p_text">{{ item.EquipmentType }}</div>
|
||||
<div v-if="isShowParameters" class="p_text" style="margin-left:10px">{{ item.Parameters }}</div>
|
||||
<div class="p_text" style="margin-left:10px">{{ item.ManufacturerName }}</div>
|
||||
</div>
|
||||
<div class="p_text">{{ item.ScannerType }}</div>
|
||||
<div class="p_text">{{ item.Note }}</div>
|
||||
</div>
|
||||
<div v-if="state === 0 && userTypeEnumInt === 0 && !isHistory" class="p_func">
|
||||
<el-button type="text" @click="handleEdit(item)">
|
||||
<i class="el-icon-edit-outline" style="font-size: 20px;" />
|
||||
</el-button>
|
||||
<el-button type="text" @click="handleDelete(item)">
|
||||
<i class="el-icon-delete" style="font-size: 20px;" />
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 添加/编辑设备信息 -->
|
||||
<el-drawer
|
||||
:title="title"
|
||||
:visible.sync="formVisible"
|
||||
direction="btt"
|
||||
size="70%"
|
||||
>
|
||||
<EquipmentForm
|
||||
v-if="formVisible"
|
||||
:equipment-info="equipmentInfo"
|
||||
:is-show-parameters="isShowParameters"
|
||||
@getList="getList"
|
||||
@close="close"
|
||||
/>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getTrialSiteEquipmentSurveyList, deleteTrialSiteEquipmentSurvey } from '@/api/research'
|
||||
import EquipmentForm from './EquipmentForm'
|
||||
import { getQueryString } from '@/utils/history.js'
|
||||
export default {
|
||||
name: 'EquipmentsResearch',
|
||||
components: { EquipmentForm },
|
||||
props: {
|
||||
trialSiteSurveyEquipmentType: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
isHistory: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
formVisible: false,
|
||||
title: '',
|
||||
equipmentInfo: {},
|
||||
w: 0,
|
||||
loading: false,
|
||||
userTypeEnumInt: 0,
|
||||
state: null,
|
||||
trialSiteSurveyId: '',
|
||||
trialId: '',
|
||||
isShowParameters: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.w = document.body.clientWidth - 200
|
||||
if (zzSessionStorage.getItem('userTypeEnumInt')) {
|
||||
this.userTypeEnumInt = zzSessionStorage.getItem('userTypeEnumInt') * 1
|
||||
}
|
||||
this.trialSiteSurveyId = getQueryString('trialSiteSurveyId')
|
||||
this.trialId = getQueryString('trialId')
|
||||
},
|
||||
methods: {
|
||||
// 获取列表数据
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true
|
||||
const res = await getTrialSiteEquipmentSurveyList(this.trialSiteSurveyId)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.list = res.Result
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.equipmentInfo = {}
|
||||
this.title = this.$t('trials:equiptResearch:dialogTitle:add')
|
||||
this.formVisible = true
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(obj) {
|
||||
this.equipmentInfo = Object.assign({ ...obj })
|
||||
this.title = this.$t('trials:equiptResearch:dialogTitle:edit')
|
||||
this.formVisible = true
|
||||
},
|
||||
// 删除
|
||||
async handleDelete(obj) {
|
||||
try {
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:staffResearch:message:confirmDel'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
this.loading = true
|
||||
const res = await deleteTrialSiteEquipmentSurvey(obj.Id, this.trialId)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex((item) => item.Id === obj.Id), 1)
|
||||
this.$message.success(this.$t('trials:equiptResearch:message:delSuccessfully'))
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
initList(TrialSiteEquipmentSurveyList, trialSiteSurvey, isShowParameters) {
|
||||
this.isShowParameters = isShowParameters
|
||||
this.list = TrialSiteEquipmentSurveyList
|
||||
this.state = trialSiteSurvey.State
|
||||
this.$forceUpdate()
|
||||
console.log(this.list)
|
||||
},
|
||||
// 关闭窗口
|
||||
close() {
|
||||
this.formVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.equipments_content{
|
||||
background: #fff;
|
||||
padding: 10px;
|
||||
.title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.equipment_info{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
border-top: 1px solid #f5f7fa;
|
||||
.p_icon{
|
||||
width: 70px;
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.p_info{
|
||||
position: relative;
|
||||
flex:1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-evenly;
|
||||
// border-right: 1px solid #f5f7fa;
|
||||
font-size: 13px;
|
||||
}
|
||||
.p_info:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 0;
|
||||
height: 50px;
|
||||
width: 1px;
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
.p_info_basic{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
.p_text{
|
||||
line-height: 25px;
|
||||
color: #82848a;
|
||||
}
|
||||
.p_func{
|
||||
width: 80px;
|
||||
padding: 0 10px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,304 @@
|
||||
<template>
|
||||
<div
|
||||
v-loading="loading"
|
||||
class="participants_form_content"
|
||||
>
|
||||
<el-form
|
||||
ref="participantForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
label-position="left"
|
||||
>
|
||||
<!-- 姓 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:staffResearch:form:lastName')"
|
||||
prop="LastName"
|
||||
>
|
||||
<span>{{ form.LastName }}</span>
|
||||
</el-form-item>
|
||||
<!-- 名 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:staffResearch:form:firstName')"
|
||||
prop="FirstName"
|
||||
>
|
||||
<span>{{ form.FirstName }}</span>
|
||||
</el-form-item>
|
||||
<!-- 电话号码 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:staffResearch:form:phone')"
|
||||
prop="Phone"
|
||||
>
|
||||
<span>{{ form.Phone }}</span>
|
||||
</el-form-item>
|
||||
<!-- 邮箱 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:staffResearch:form:email')"
|
||||
prop="Email"
|
||||
>
|
||||
<span>{{ form.Email }}</span>
|
||||
</el-form-item>
|
||||
<!-- 单位 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:staffResearch:form:organization')"
|
||||
prop="OrganizationName"
|
||||
>
|
||||
<span>{{ form.Email }}</span>
|
||||
</el-form-item>
|
||||
<!-- 用户类型 -->
|
||||
<el-form-item v-if="form.IsGenerateAccount" :label="$t('trials:staffResearch:form:userType')" prop="UserTypeId">
|
||||
<el-select v-model="form.UserTypeId" style="width: 100%" disabled>
|
||||
<el-option v-for="item of userTypeOptions" :key="item.Id" :label="item.UserTypeShortName" :value="item.Id">
|
||||
<span>{{ item.UserType }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 更新状态 -->
|
||||
<el-form-item :label="$t('trials:staffResearch:form:updateState')">
|
||||
<el-radio-group v-model="form.IsHistoryUserDeleted" style="width: 100%">
|
||||
<el-radio v-for="item of $d.IsUserExitTrial" :key="`IsHistoryUserDeleted${item.value}`" :label="item.value">{{
|
||||
item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="errorMsg"
|
||||
label=""
|
||||
>
|
||||
<span
|
||||
v-if="errorMsg"
|
||||
style="font-size: 12px; color: #f66"
|
||||
>
|
||||
{{ errorMsg }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
<div style="text-align: center;padding:20px 0px;">
|
||||
<!-- 取消 -->
|
||||
<el-button
|
||||
size="large"
|
||||
type="primary"
|
||||
@click="handleCancel"
|
||||
>
|
||||
{{ $t("common:button:cancel") }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
<el-button
|
||||
size="large"
|
||||
type="primary"
|
||||
@click="handleSave"
|
||||
>
|
||||
{{ $t("common:button:save") }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { addOrUpdateTrialSiteUserSurvey } from '@/api/research'
|
||||
import { getUserTypeList } from '@/api/research'
|
||||
import { getQueryString } from '@/utils/history.js'
|
||||
export default {
|
||||
name: 'ParticipantForm',
|
||||
props: {
|
||||
participantInfo: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
state: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
var validateEmail = (rule, value, callback) => {
|
||||
if (value === '') {
|
||||
callback(new Error(this.$t('trials:researchForm:formRule:specify')))
|
||||
} else {
|
||||
var reg =
|
||||
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
|
||||
if (this.form.Email && reg.test(this.form.Email)) {
|
||||
this.sendDisabled = false
|
||||
callback()
|
||||
} else {
|
||||
callback(new Error(this.$t('trials:researchForm:formRule:email')))
|
||||
this.sendDisabled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
form: {
|
||||
Id: '',
|
||||
LastName: null,
|
||||
FirstName: null,
|
||||
TrialRoleCode: null,
|
||||
UserTypeId: null,
|
||||
Phone: null,
|
||||
Email: null,
|
||||
OrganizationName: '',
|
||||
IsGenerateAccount: false,
|
||||
IsHistoryUserDeleted: ''
|
||||
},
|
||||
rules: {
|
||||
LastName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('trials:researchForm:formRule:specify'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
min: 0,
|
||||
max: 50,
|
||||
message: this.$t('trials:researchForm:formRule:maxLength'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
FirstName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('trials:researchForm:formRule:specify'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
min: 0,
|
||||
max: 50,
|
||||
message: this.$t('trials:researchForm:formRule:maxLength'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
TrialRoleCode: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('trials:researchForm:formRule:select'),
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
],
|
||||
UserTypeId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('trials:researchForm:formRule:select'),
|
||||
trigger: ['blur']
|
||||
}
|
||||
],
|
||||
Phone: [
|
||||
{
|
||||
max: 50,
|
||||
message: this.$t('common:ruleMessage:maxLength') + ' 50',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
Email: [
|
||||
{ required: true, validator: validateEmail, trigger: ['blur'] }
|
||||
],
|
||||
IsHistoryUserDeleted: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('trials:researchForm:formRule:select'),
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
]
|
||||
},
|
||||
userRoles: [],
|
||||
userTypeOptions: [],
|
||||
userTypeEnumInt: 0,
|
||||
errorMsg: '',
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initForm()
|
||||
},
|
||||
methods: {
|
||||
async initForm() {
|
||||
this.loading = true
|
||||
const res = await getUserTypeList(3)
|
||||
if (res.IsSuccess) {
|
||||
this.userTypeOptions = res.Result
|
||||
var crcObj = res.Result.find((i) => i.UserTypeEnum === 2)
|
||||
this.crcId = crcObj ? crcObj.Id : ''
|
||||
var craObj = res.Result.find((i) => i.UserTypeEnum === 9)
|
||||
this.craId = craObj ? craObj.Id : ''
|
||||
}
|
||||
Object.keys(this.participantInfo).forEach((key) => {
|
||||
this.form[key] = this.participantInfo[key]
|
||||
})
|
||||
if (zzSessionStorage.getItem('userTypeEnumInt')) {
|
||||
this.userTypeEnumInt = zzSessionStorage.getItem('userTypeEnumInt') * 1
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
// 保存参与者信息
|
||||
async handleSave() {
|
||||
try {
|
||||
const validate = await this.$refs.participantForm.validate()
|
||||
if (!validate) return
|
||||
this.loading = true
|
||||
if (!this.form.TrialSiteSurveyId) {
|
||||
this.form.TrialSiteSurveyId = getQueryString('trialSiteSurveyId')
|
||||
}
|
||||
const trialId = getQueryString('trialId')
|
||||
const res = await addOrUpdateTrialSiteUserSurvey(trialId, this.form)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(
|
||||
this.$t('common:message:savedSuccessfully')
|
||||
)
|
||||
|
||||
this.$emit('close', { id: res.Result, errorMessage: '' })
|
||||
}
|
||||
} catch (e) {
|
||||
if (e.Result && e.Result.Id && e.ErrorMessage) {
|
||||
this.$emit('close', {
|
||||
id: e.Result.Id,
|
||||
errorMessage: e.ErrorMessage
|
||||
})
|
||||
} else {
|
||||
console.log(e)
|
||||
}
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
handleTrialRoleChange(v) {
|
||||
if (v === 1) {
|
||||
// crc
|
||||
this.form.IsGenerateAccount = true
|
||||
this.form.UserTypeId = this.crcId
|
||||
} else if (v === 2) {
|
||||
// cra
|
||||
this.form.IsGenerateAccount = true
|
||||
this.form.UserTypeId = this.craId
|
||||
} else {
|
||||
this.form.IsGenerateAccount = false
|
||||
this.form.UserTypeId = ''
|
||||
}
|
||||
},
|
||||
// 取消保存
|
||||
handleCancel() {
|
||||
this.$emit('close')
|
||||
},
|
||||
handleIsCorrectChange(val) {
|
||||
if (!val) {
|
||||
this.form.IsGenerateAccount = false
|
||||
}
|
||||
},
|
||||
handleIsGenerateAccountChange(val) {
|
||||
if (!val) {
|
||||
this.form.UserTypeId = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.participants_form_content{
|
||||
padding: 0 10px;
|
||||
/deep/.el-form-item {
|
||||
margin-bottom: 0px;
|
||||
padding: 5px 0 20px 0;
|
||||
border-bottom: 1px solid #f5f7fa;
|
||||
.el-form-item__content{
|
||||
color: #82848a;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<div class="participants_content">
|
||||
<div class="title">
|
||||
<div>{{ $t('trials:staffResearch:title:historicalStaff') }}</div>
|
||||
</div>
|
||||
<div v-for="item in list" :key="item.Id" class="participant_info">
|
||||
<div class="p_icon">
|
||||
<i class="el-icon-user" />
|
||||
</div>
|
||||
<div class="p_info">
|
||||
<div
|
||||
class="p_info_basic"
|
||||
:style="{maxWidth:w+'px','white-space': 'nowrap',overflow: 'hidden','text-overflow': 'ellipsis'}"
|
||||
>
|
||||
<div class="p_text">{{ `${item.LastName} / ${item.FirstName}` }}</div>
|
||||
<div class="p_text" style="margin:0 10px">{{ $fd('SiteSurvey_UserRoles',item.TrialRoleCode) }}</div>
|
||||
</div>
|
||||
<div class="p_text">{{ item.Phone }}</div>
|
||||
<div class="p_text">{{ item.Email }}</div>
|
||||
<div class="p_text">{{ item.OrganizationName }}</div>
|
||||
</div>
|
||||
<div v-if="state === 0 && (userTypeEnumInt===0 ) && !isHistory" class="p_func">
|
||||
<!-- 编辑 -->
|
||||
<el-button
|
||||
v-if="userTypeEnumInt===0"
|
||||
type="text"
|
||||
@click="editParticipant(item)"
|
||||
>
|
||||
<i class="el-icon-edit-outline" style="font-size: 20px;" />
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 编辑人员信息 -->
|
||||
<el-drawer
|
||||
:title="title"
|
||||
:visible.sync="formVisible"
|
||||
direction="btt"
|
||||
size="70%"
|
||||
>
|
||||
<HistoricalParticipantForm
|
||||
v-if="formVisible"
|
||||
:state="state"
|
||||
:participant-info="participantInfo"
|
||||
@getList="getList"
|
||||
@close="close"
|
||||
/>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getTrialSiteUserSurveyList } from '@/api/research'
|
||||
import HistoricalParticipantForm from './HistoricalParticipantForm'
|
||||
import { getQueryString } from '@/utils/history.js'
|
||||
export default {
|
||||
name: 'HisParticipantsResearch',
|
||||
components: { HistoricalParticipantForm },
|
||||
props: {
|
||||
isHistory: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
list: [],
|
||||
formVisible: false,
|
||||
title: '',
|
||||
participantInfo: null,
|
||||
w: 0,
|
||||
state: null,
|
||||
trialSiteSurveyId: '',
|
||||
trialId: '',
|
||||
userTypeEnumInt: 0,
|
||||
warningList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.w = document.body.clientWidth - 200
|
||||
if (zzSessionStorage.getItem('userTypeEnumInt')) {
|
||||
this.userTypeEnumInt = zzSessionStorage.getItem('userTypeEnumInt') * 1
|
||||
}
|
||||
this.trialSiteSurveyId = getQueryString('trialSiteSurveyId')
|
||||
this.trialId = getQueryString('trialId')
|
||||
},
|
||||
methods: {
|
||||
// 获取参与者列表数据
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true
|
||||
var params = {
|
||||
trialSiteSurveyId: this.trialSiteSurveyId,
|
||||
isHistoryUser: true
|
||||
}
|
||||
const res = await getTrialSiteUserSurveyList(params)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
res.Result.map(item => {
|
||||
var obj = this.warningList.find(i => i.id === item.Id)
|
||||
if (obj) {
|
||||
item.ErrorMessage = obj.errorMessage
|
||||
}
|
||||
})
|
||||
this.list = res.Result
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
// 编辑
|
||||
editParticipant(row) {
|
||||
this.participantInfo = Object.assign({ ...row })
|
||||
this.title = this.$t('trials:staffResearch:dialogTitle:edit')
|
||||
this.formVisible = true
|
||||
},
|
||||
// 初始化列表
|
||||
initList(trialSiteUserSurveyList, trialSiteSurvey) {
|
||||
this.list = trialSiteUserSurveyList
|
||||
this.state = trialSiteSurvey.State
|
||||
this.$forceUpdate()
|
||||
},
|
||||
// 关闭窗口
|
||||
async close(obj) {
|
||||
this.formVisible = false
|
||||
var idx = this.warningList.findIndex(i => i.id === obj.id)
|
||||
if (idx > -1) {
|
||||
this.warningList[idx].errorMessage = obj.errorMessage
|
||||
} else {
|
||||
this.warningList.push({ id: obj.id, errorMessage: obj.errorMessage })
|
||||
}
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.participants_content{
|
||||
background: #fff;
|
||||
padding: 10px;
|
||||
.title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.participant_info{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
border-top: 1px solid #f5f7fa;
|
||||
.p_icon{
|
||||
width: 70px;
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.p_info{
|
||||
position: relative;
|
||||
flex:1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-evenly;
|
||||
// border-right: 1px solid #f5f7fa;
|
||||
font-size: 13px;
|
||||
}
|
||||
.p_info:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 0;
|
||||
height: 50px;
|
||||
width: 1px;
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
.p_info_basic{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
.p_text{
|
||||
line-height: 25px;
|
||||
color: #82848a;
|
||||
}
|
||||
.p_func{
|
||||
width: 80px;
|
||||
padding: 0 10px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<div class="research_note">
|
||||
<div class="title">
|
||||
{{ $t('trials:equiptResearch:form:precautions') }}
|
||||
</div>
|
||||
<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:item2') }}</li>
|
||||
<!-- 试验过程中,如果有任何人员、设备或扫描仪器的替换,请立即通知我们。 -->
|
||||
<li>{{ $t('trials:equiptResearch:form:item3') }}</li>
|
||||
<!-- 请保存好原始(未经压缩的;非重建的)数据。 -->
|
||||
<li>{{ $t('trials:equiptResearch:form:item4') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'ResearchNotes',
|
||||
data() {
|
||||
return {
|
||||
siteSurveyNoteInfo: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initPage(siteSurveyNoteInfo) {
|
||||
this.siteSurveyNoteInfo = siteSurveyNoteInfo
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.research_note{
|
||||
background: #fff;
|
||||
padding: 10px;
|
||||
li{
|
||||
line-height: 20px;
|
||||
font-size: 14px;
|
||||
color: #82848a;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,318 @@
|
||||
<template>
|
||||
<div
|
||||
v-loading="loading"
|
||||
class="participants_form_content"
|
||||
>
|
||||
<el-form
|
||||
ref="participantForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
label-position="left"
|
||||
>
|
||||
<!-- 姓 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:staffResearch:form:lastName')"
|
||||
prop="LastName"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.LastName"
|
||||
:disabled="!(state === 0 && userTypeEnumInt === 0)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 名 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:staffResearch:form:firstName')"
|
||||
prop="FirstName"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.FirstName"
|
||||
:disabled="!(state === 0 && userTypeEnumInt === 0)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 角色 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:staffResearch:form:role')"
|
||||
prop="TrialRoleCode"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.TrialRoleCode"
|
||||
:disabled="!(state === 0 && userTypeEnumInt === 0)"
|
||||
style="width:100%"
|
||||
@change="handleTrialRoleChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.SiteSurvey_UserRoles"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="parseInt(item.value)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 电话号码 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:staffResearch:form:phone')"
|
||||
prop="Phone"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.Phone"
|
||||
:disabled="!(state === 0 && userTypeEnumInt === 0)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 邮箱 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:staffResearch:form:email')"
|
||||
prop="Email"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.Email"
|
||||
:disabled="!(state === 0 && userTypeEnumInt === 0)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 单位 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:staffResearch:form:organization')"
|
||||
prop="OrganizationName"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.OrganizationName"
|
||||
:disabled="!(state === 0 && userTypeEnumInt === 0)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="errorMsg"
|
||||
label=""
|
||||
>
|
||||
<span
|
||||
v-if="errorMsg"
|
||||
style="font-size: 12px; color: #f66"
|
||||
>
|
||||
{{ errorMsg }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
<div style="text-align: center;padding:20px 0px;">
|
||||
<!-- 取消 -->
|
||||
<el-button
|
||||
size="large"
|
||||
type="primary"
|
||||
@click="handleCancel"
|
||||
>
|
||||
{{ $t("common:button:cancel") }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
<el-button
|
||||
size="large"
|
||||
type="primary"
|
||||
@click="handleSave"
|
||||
>
|
||||
{{ $t("common:button:save") }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { addOrUpdateTrialSiteUserSurvey } from '@/api/research'
|
||||
import { getUserTypeList } from '@/api/research'
|
||||
import { getQueryString } from '@/utils/history.js'
|
||||
export default {
|
||||
name: 'ParticipantForm',
|
||||
props: {
|
||||
participantInfo: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
state: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
var validateEmail = (rule, value, callback) => {
|
||||
if (value === '') {
|
||||
callback(new Error(this.$t('trials:researchForm:formRule:specify')))
|
||||
} else {
|
||||
var reg =
|
||||
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
|
||||
if (this.form.Email && reg.test(this.form.Email)) {
|
||||
this.sendDisabled = false
|
||||
callback()
|
||||
} else {
|
||||
callback(new Error(this.$t('trials:researchForm:formRule:email')))
|
||||
this.sendDisabled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
form: {
|
||||
Id: '',
|
||||
LastName: null,
|
||||
FirstName: null,
|
||||
TrialRoleCode: null,
|
||||
UserTypeId: null,
|
||||
Phone: null,
|
||||
Email: null,
|
||||
OrganizationName: '',
|
||||
IsGenerateAccount: false,
|
||||
IsDisable: false
|
||||
},
|
||||
rules: {
|
||||
LastName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('trials:researchForm:formRule:specify'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
min: 0,
|
||||
max: 50,
|
||||
message: this.$t('trials:researchForm:formRule:maxLength'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
FirstName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('trials:researchForm:formRule:specify'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
min: 0,
|
||||
max: 50,
|
||||
message: this.$t('trials:researchForm:formRule:maxLength'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
TrialRoleCode: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('trials:researchForm:formRule:select'),
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
],
|
||||
UserTypeId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('trials:researchForm:formRule:select'),
|
||||
trigger: ['blur']
|
||||
}
|
||||
],
|
||||
Phone: [
|
||||
{
|
||||
max: 50,
|
||||
message: this.$t('common:ruleMessage:maxLength') + ' 50',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
Email: [
|
||||
{ required: true, validator: validateEmail, trigger: ['blur'] }
|
||||
]
|
||||
},
|
||||
userRoles: [],
|
||||
userTypeOptions: [],
|
||||
userTypeEnumInt: 0,
|
||||
errorMsg: '',
|
||||
crcId: '',
|
||||
craId: '',
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initForm()
|
||||
},
|
||||
methods: {
|
||||
async initForm() {
|
||||
this.loading = true
|
||||
const res = await getUserTypeList(3)
|
||||
if (res.IsSuccess) {
|
||||
this.userTypeOptions = res.Result
|
||||
var crcObj = res.Result.find((i) => i.UserTypeEnum === 2)
|
||||
this.crcId = crcObj ? crcObj.Id : ''
|
||||
var craObj = res.Result.find((i) => i.UserTypeEnum === 9)
|
||||
this.craId = craObj ? craObj.Id : ''
|
||||
}
|
||||
Object.keys(this.participantInfo).forEach((key) => {
|
||||
this.form[key] = this.participantInfo[key]
|
||||
})
|
||||
if (zzSessionStorage.getItem('userTypeEnumInt')) {
|
||||
this.userTypeEnumInt = zzSessionStorage.getItem('userTypeEnumInt') * 1
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
// 保存参与者信息
|
||||
async handleSave() {
|
||||
try {
|
||||
const validate = await this.$refs.participantForm.validate()
|
||||
if (!validate) return
|
||||
this.loading = true
|
||||
if (!this.form.TrialSiteSurveyId) {
|
||||
this.form.TrialSiteSurveyId = getQueryString('trialSiteSurveyId')
|
||||
}
|
||||
const trialId = getQueryString('trialId')
|
||||
const res = await addOrUpdateTrialSiteUserSurvey(trialId, this.form)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(
|
||||
this.$t('common:message:savedSuccessfully')
|
||||
)
|
||||
|
||||
this.$emit('close', { id: res.Result, errorMessage: '' })
|
||||
}
|
||||
} catch (e) {
|
||||
if (e.Result && e.Result.Id && e.ErrorMessage) {
|
||||
this.$emit('close', {
|
||||
id: e.Result.Id,
|
||||
errorMessage: e.ErrorMessage
|
||||
})
|
||||
} else {
|
||||
console.log(e)
|
||||
}
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
handleTrialRoleChange(v) {
|
||||
if (v === 1) {
|
||||
// crc
|
||||
this.form.IsGenerateAccount = true
|
||||
this.form.UserTypeId = this.crcId
|
||||
} else if (v === 2) {
|
||||
// cra
|
||||
this.form.IsGenerateAccount = true
|
||||
this.form.UserTypeId = this.craId
|
||||
} else {
|
||||
this.form.IsGenerateAccount = false
|
||||
this.form.UserTypeId = ''
|
||||
}
|
||||
},
|
||||
// 取消保存
|
||||
handleCancel() {
|
||||
this.$emit('close')
|
||||
},
|
||||
handleIsCorrectChange(val) {
|
||||
if (!val) {
|
||||
this.form.IsGenerateAccount = false
|
||||
}
|
||||
},
|
||||
handleIsGenerateAccountChange(val) {
|
||||
if (!val) {
|
||||
this.form.UserTypeId = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.participants_form_content{
|
||||
padding: 0 10px;
|
||||
/deep/.el-form-item {
|
||||
margin-bottom: 0px;
|
||||
padding: 5px 0 20px 0;
|
||||
border-bottom: 1px solid #f5f7fa;
|
||||
.el-form-item__content{
|
||||
color: #82848a;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,249 @@
|
||||
<template>
|
||||
<div class="participants_content">
|
||||
<div class="title">
|
||||
<div>{{ $t('trials:staffResearch:title:newStaff') }}</div>
|
||||
<div v-if="state === 0 && userTypeEnumInt === 0 && !isHistory">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="addParticipant"
|
||||
>
|
||||
{{ $t('common:button:add') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="item in list" :key="item.Id" class="participant_info">
|
||||
<div class="p_icon">
|
||||
<i class="el-icon-user" />
|
||||
</div>
|
||||
<div class="p_info">
|
||||
<div
|
||||
class="p_info_basic"
|
||||
:style="{maxWidth:w+'px','white-space': 'nowrap',overflow: 'hidden','text-overflow': 'ellipsis'}"
|
||||
>
|
||||
<div class="p_text">{{ `${item.LastName} / ${item.FirstName}` }}</div>
|
||||
<div class="p_text" style="margin:0 10px">{{ $fd('SiteSurvey_UserRoles',item.TrialRoleCode) }}</div>
|
||||
</div>
|
||||
<div class="p_text">{{ item.Phone }}</div>
|
||||
<div class="p_text">{{ item.Email }}</div>
|
||||
<div class="p_text">{{ item.OrganizationName }}</div>
|
||||
</div>
|
||||
<div v-if="state === 0 && (userTypeEnumInt===0 ) && !isHistory" class="p_func">
|
||||
<!-- 编辑 -->
|
||||
<el-button
|
||||
type="text"
|
||||
:disabled="state!==0 || item.IsGenerateSuccess"
|
||||
@click="editParticipant(item)"
|
||||
>
|
||||
<i class="el-icon-edit-outline" style="font-size: 20px;" />
|
||||
</el-button>
|
||||
<!-- 移除 -->
|
||||
<el-button
|
||||
type="text"
|
||||
:disabled="state!==0 || item.IsGenerateSuccess"
|
||||
@click="removeParticipant(item)"
|
||||
>
|
||||
<i class="el-icon-delete" style="font-size: 20px;" />
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 添加/编辑人员信息 -->
|
||||
<el-drawer
|
||||
:title="title"
|
||||
:visible.sync="formVisible"
|
||||
direction="btt"
|
||||
size="70%"
|
||||
>
|
||||
<ParticipantForm
|
||||
v-if="formVisible"
|
||||
:state="state"
|
||||
:participant-info="participantInfo"
|
||||
@getList="getList"
|
||||
@close="close"
|
||||
/>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getTrialSiteUserSurveyList, deleteTrialSiteUserSurvey } from '@/api/research'
|
||||
import ParticipantForm from './ParticipantForm'
|
||||
import { getQueryString } from '@/utils/history.js'
|
||||
export default {
|
||||
name: 'ParticipantsResearch',
|
||||
components: { ParticipantForm },
|
||||
props: {
|
||||
isHistory: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
list: [],
|
||||
formVisible: false,
|
||||
title: '',
|
||||
participantInfo: null,
|
||||
w: 0,
|
||||
state: null,
|
||||
trialSiteSurveyId: '',
|
||||
trialId: '',
|
||||
userTypeEnumInt: 0,
|
||||
warningList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.w = document.body.clientWidth - 200
|
||||
if (zzSessionStorage.getItem('userTypeEnumInt')) {
|
||||
this.userTypeEnumInt = zzSessionStorage.getItem('userTypeEnumInt') * 1
|
||||
}
|
||||
this.trialSiteSurveyId = getQueryString('trialSiteSurveyId')
|
||||
this.trialId = getQueryString('trialId')
|
||||
},
|
||||
methods: {
|
||||
// 获取参与者列表数据
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true
|
||||
var params = {
|
||||
trialSiteSurveyId: this.trialSiteSurveyId,
|
||||
isHistoryUser: false
|
||||
}
|
||||
const res = await getTrialSiteUserSurveyList(params)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
res.Result.map(item => {
|
||||
var obj = this.warningList.find(i => i.id === item.Id)
|
||||
if (obj) {
|
||||
item.ErrorMessage = obj.errorMessage
|
||||
}
|
||||
})
|
||||
this.list = res.Result
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
// 新增
|
||||
addParticipant() {
|
||||
this.participantInfo = {}
|
||||
this.title = this.$t('trials:staffResearch:dialogTitle:add')
|
||||
this.formVisible = true
|
||||
},
|
||||
// 编辑
|
||||
editParticipant(obj) {
|
||||
this.participantInfo = Object.assign({ ...obj })
|
||||
this.title = this.$t('trials:staffResearch:dialogTitle:edit')
|
||||
this.formVisible = true
|
||||
},
|
||||
// 删除
|
||||
async removeParticipant(obj) {
|
||||
try {
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:staffResearch:message:confirmDel'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
this.loading = true
|
||||
const res = await deleteTrialSiteUserSurvey(obj.Id, this.trialId)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex((item) => item.Id === obj.Id), 1)
|
||||
this.$message.success(this.$t('trials:staffResearch:message:delSuccessfully'))
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
isExistIncorrect() {
|
||||
return this.list.some(item => item.IsCorrect === false)
|
||||
},
|
||||
|
||||
// 初始化列表
|
||||
initList(trialSiteUserSurveyList, trialSiteSurvey) {
|
||||
this.list = trialSiteUserSurveyList
|
||||
this.state = trialSiteSurvey.State
|
||||
this.$forceUpdate()
|
||||
},
|
||||
// 关闭窗口
|
||||
async close(obj) {
|
||||
this.formVisible = false
|
||||
var idx = this.warningList.findIndex(i => i.id === obj.id)
|
||||
if (idx > -1) {
|
||||
this.warningList[idx].errorMessage = obj.errorMessage
|
||||
} else {
|
||||
this.warningList.push({ id: obj.id, errorMessage: obj.errorMessage })
|
||||
}
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.participants_content{
|
||||
background: #fff;
|
||||
padding: 10px;
|
||||
.title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.participant_info{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
border-top: 1px solid #f5f7fa;
|
||||
.p_icon{
|
||||
width: 70px;
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.p_info{
|
||||
position: relative;
|
||||
flex:1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-evenly;
|
||||
// border-right: 1px solid #f5f7fa;
|
||||
font-size: 13px;
|
||||
}
|
||||
.p_info:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 0;
|
||||
height: 50px;
|
||||
width: 1px;
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
.p_info_basic{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
.p_text{
|
||||
line-height: 25px;
|
||||
color: #82848a;
|
||||
}
|
||||
.p_func{
|
||||
width: 80px;
|
||||
padding: 0 10px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,221 @@
|
||||
<template>
|
||||
<div v-loading="loading" class="research_detal_wrapper">
|
||||
<div class="d_title">{{ $t('trials:researchForm:title:question') }}</div>
|
||||
<div class="d_content">
|
||||
|
||||
<!-- 项目基本信息 -->
|
||||
<BasicInfo ref="basicInfo" />
|
||||
<!-- 历史人员 -->
|
||||
<HistoricalParticipants ref="historicalParticipant" class="mt5" />
|
||||
<!-- 新增人员 -->
|
||||
<Participants ref="participants" class="mt5" />
|
||||
<!-- 设备调研 -->
|
||||
<Equipments ref="equipments" class="mt5" />
|
||||
<!-- 备注 -->
|
||||
<Notes ref="notes" class="mt5" />
|
||||
</div>
|
||||
<div class="d_footer">
|
||||
<div class="d_func_row">
|
||||
<div
|
||||
v-if="state === 0 && userTypeEnumInt === 0"
|
||||
class="d_func"
|
||||
@click="handleSave"
|
||||
>
|
||||
{{ $t('common:button:save') }}
|
||||
</div>
|
||||
<div
|
||||
v-if="(state === 0 && userTypeEnumInt === 0)"
|
||||
class="d_func"
|
||||
@click="handleSubmit('submit')"
|
||||
>
|
||||
{{ $t('trials:researchForm:button:submit') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getSiteSurveyInfo, trialSurveySubmit } from '@/api/research'
|
||||
import { getQueryString } from '@/utils/history.js'
|
||||
import BasicInfo from './components/BasicInfo'
|
||||
import HistoricalParticipants from './components/HistoricalParticipants'
|
||||
import Participants from './components/Participants'
|
||||
import Equipments from './components/Equipments'
|
||||
import Notes from './components/Notes'
|
||||
export default {
|
||||
name: 'ResearchMobileDetail',
|
||||
components: {
|
||||
BasicInfo,
|
||||
HistoricalParticipants,
|
||||
Participants, Equipments, Notes
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trialId: this.$route.query.trialId,
|
||||
trialSiteSurveyId: '',
|
||||
loading: false,
|
||||
state: null,
|
||||
userTypeEnumInt: 0,
|
||||
rejectVisible: false,
|
||||
rejectForm: { reason: '' },
|
||||
siteSurveyNoteInfo: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.trialSiteSurveyId = getQueryString('trialSiteSurveyId')
|
||||
this.initPage()
|
||||
if (zzSessionStorage.getItem('userTypeEnumInt')) {
|
||||
this.userTypeEnumInt = zzSessionStorage.getItem('userTypeEnumInt') * 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 初始化页面
|
||||
async initPage() {
|
||||
try {
|
||||
this.loading = true
|
||||
const res = await getSiteSurveyInfo(this.trialId, this.trialSiteSurveyId)
|
||||
if (res.Result) {
|
||||
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.$refs['basicInfo'].initForm(res.Result.TrialInfo, res.Result.TrialSiteSurvey, res.Result.SiteSurveyFiledConfig ? res.Result.SiteSurveyFiledConfig.NotShowFieldList : null)
|
||||
var historicalArr = []
|
||||
var newArr = []
|
||||
res.Result.TrialSiteUserSurveyList.map(i => {
|
||||
if (i.IsHistoryUser) {
|
||||
historicalArr.push(i)
|
||||
} else {
|
||||
newArr.push(i)
|
||||
}
|
||||
})
|
||||
|
||||
this.$refs['historicalParticipant'].initList(historicalArr, res.Result.TrialSiteSurvey)
|
||||
this.$refs['participants'].initList(newArr, res.Result.TrialSiteSurvey)
|
||||
this.$refs['equipments'].initList(res.Result.TrialSiteEquipmentSurveyList, res.Result.TrialSiteSurvey, !(res.Result.SiteSurveyFiledConfig && res.Result.SiteSurveyFiledConfig.ModifyFiledList.length > 0))
|
||||
this.$refs['notes'].initPage(this.siteSurveyNoteInfo)
|
||||
}
|
||||
this.loading = false
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
// 保存
|
||||
handleSave() {
|
||||
this.$refs['basicInfo'].handleSave(false)
|
||||
},
|
||||
// 提交
|
||||
async handleSubmit(type) {
|
||||
if (this.userTypeEnumInt === 0) {
|
||||
try {
|
||||
this.loading = true
|
||||
const res = await this.$refs['basicInfo'].handleSave(true)
|
||||
this.loading = false
|
||||
if (res) {
|
||||
this.submit(type)
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
} else {
|
||||
this.submit(type)
|
||||
}
|
||||
},
|
||||
async submit(type) {
|
||||
try {
|
||||
const confirm = await this.$confirm(
|
||||
this.userTypeEnumInt === 0 ? this.$t('trials:researchForm:message:submitWarning') : this.$t('trials:researchForm:message:submitWarning2'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
var param = {
|
||||
TrialId: this.trialId,
|
||||
TrialSiteSurveyId: this.trialSiteSurveyId
|
||||
}
|
||||
const res = await trialSurveySubmit(param)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.initPage()
|
||||
if (type === 'approve') {
|
||||
this.$message.success(this.$t('common:message:approvedSuccessfully'))
|
||||
} else {
|
||||
this.$message.success(this.$t('trials:researchForm:message:savedSuccessfully'))
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
// 退出
|
||||
handleBack() {
|
||||
this.$router.push({ path: `/researchLogin_m?trialId=${this.trialId}&lang=${this.$i18n.locale}` })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.research_detal_wrapper{
|
||||
background-color:#f5f7fa;
|
||||
.d_title{
|
||||
margin-bottom: 5px;
|
||||
line-height: 80px;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
// .d_content{
|
||||
|
||||
// }
|
||||
.d_footer{
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
z-index: 10;
|
||||
background-color: #f8f8f8;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
// padding: 20px;
|
||||
}
|
||||
.d_func_row{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.d_func{
|
||||
flex: 1;
|
||||
margin: 20px;
|
||||
color: #fff;
|
||||
background-color: #428bca;
|
||||
border-color: #428bca;
|
||||
padding: 12px 20px;
|
||||
font-size: 14px;
|
||||
border-radius: 4px;
|
||||
transition: .1s;
|
||||
font-weight: 500;
|
||||
box-sizing: border-box;
|
||||
outline: 0;
|
||||
text-align: center;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
&:hover{
|
||||
background: #68a2d5;
|
||||
border-color: #68a2d5;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.mt5{
|
||||
margin-top: 5px
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,406 @@
|
||||
<template>
|
||||
<div class="research_login_m_content">
|
||||
<div class="title">{{ $t('trials:researchForm:title:question') }}</div>
|
||||
<el-form
|
||||
ref="loginForm"
|
||||
v-loading="loading"
|
||||
label-position="left"
|
||||
label-width="120px"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
>
|
||||
<div class="basic_content">
|
||||
<!-- 项目编号 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:researchForm:form:trialId')"
|
||||
>
|
||||
<span>{{ form.TrialCode }}</span>
|
||||
</el-form-item>
|
||||
<!-- 试验方案号 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:researchForm:form:researchNo')"
|
||||
>
|
||||
<span>{{ form.ResearchProgramNo }}</span>
|
||||
</el-form-item>
|
||||
<!-- 试验名称 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:researchForm:form:researchName')"
|
||||
>
|
||||
<span>{{ form.ExperimentName }}</span>
|
||||
</el-form-item>
|
||||
<!-- 适应症类型 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:researchForm:form:decleareType')"
|
||||
>
|
||||
<span>{{ form.IndicationType }}</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="login_content">
|
||||
<el-form-item
|
||||
:label="$t('trials:researchForm:form:siteName')"
|
||||
prop="SiteId"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.TrialSiteId"
|
||||
filterable
|
||||
style="width:100%;"
|
||||
@change="handleSiteChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item,index) of siteOptions"
|
||||
:key="index"
|
||||
:label="item.TrialSiteAliasName"
|
||||
:value="item.TrialSiteId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.TrialSiteId && isHaveSiteSurveyRecord"
|
||||
label=""
|
||||
style="text-align:right;"
|
||||
>
|
||||
<!-- 更新调研表 -->
|
||||
<el-link
|
||||
v-if="!form.IsUpdate"
|
||||
type="primary"
|
||||
@click="form.IsUpdate = true"
|
||||
>
|
||||
{{ $t('trials:researchForm:button:updateQsForm') }}
|
||||
</el-link>
|
||||
<!-- 取消更新调研表 -->
|
||||
<el-link
|
||||
v-else
|
||||
type="primary"
|
||||
@click="form.IsUpdate = false;form.ReplaceUserEmailOrPhone=''"
|
||||
>
|
||||
{{ $t('trials:researchForm:button:cancelUpdateQsForm') }}
|
||||
</el-link>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 原调研表填写人邮箱 -->
|
||||
<el-form-item
|
||||
v-if="form.IsUpdate"
|
||||
:label="$t('trials:researchForm:form:originalEmail')"
|
||||
prop="ReplaceUserEmailOrPhone"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.ReplaceUserEmailOrPhone"
|
||||
autocomplete="new-password"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 联系邮箱 -->
|
||||
<el-form-item
|
||||
:label="$t('trials:researchForm:form:contactorEmail')"
|
||||
prop="EmailOrPhone"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.EmailOrPhone"
|
||||
autocomplete="new-password"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:researchForm:form:verifyCode')"
|
||||
>
|
||||
<div class="code_content">
|
||||
<el-input
|
||||
v-model="form.VerificationCode"
|
||||
autocomplete="new-password"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="sendDisabled || !form.EmailOrPhone || count > 0"
|
||||
@click="handleSendCode"
|
||||
>
|
||||
{{ this.$t('trials:researchForm:button:send') }} {{ sendTitle ? `${sendTitle}` : null }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<div class="submit_content">
|
||||
<el-button
|
||||
size="large"
|
||||
type="primary"
|
||||
@click="onSubmit"
|
||||
>
|
||||
{{ $t('common:button:submit') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { sendVerifyCode, verifySendCode, getTrialSurveyInitInfo } from '@/api/research'
|
||||
import { getUserMenuTree, getUserPermissions } from '@/api/user'
|
||||
import store from '@/store'
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
export default {
|
||||
name: 'ResearchMobileLogin',
|
||||
data() {
|
||||
var checkPhone = (rule, value, callback) => {
|
||||
const phoneReg = /^1[3|4|5|7|8][0-9]{9}$/
|
||||
if (!value) {
|
||||
return callback(new Error(this.$t('trials:researchForm:formRule:specify')))
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (!Number.isInteger(+value)) {
|
||||
callback(new Error(this.$t('trials:researchForm:formRule:phone')))
|
||||
} else {
|
||||
if (phoneReg.test(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback(new Error(this.$t('trials:researchForm:formRule:phone')))
|
||||
}
|
||||
}
|
||||
}, 100)
|
||||
}
|
||||
var validateEmail = (rule, value, callback) => {
|
||||
if (value === '') {
|
||||
callback(new Error(this.$t('trials:researchForm:formRule:specify')))
|
||||
} else {
|
||||
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)) {
|
||||
callback()
|
||||
} else {
|
||||
callback(new Error(this.$t('trials:researchForm:formRule:email')))
|
||||
}
|
||||
}
|
||||
}
|
||||
var validateReplaceEmail = (rule, value, callback) => {
|
||||
if (value === '') {
|
||||
callback(new Error(this.$t('trials:researchForm:formRule:specify')))
|
||||
} else {
|
||||
var reg = /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
|
||||
if (this.form.ReplaceUserEmailOrPhone && reg.test(this.form.ReplaceUserEmailOrPhone)) {
|
||||
callback()
|
||||
} else {
|
||||
callback(new Error(this.$t('trials:researchForm:formRule:email')))
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
trialId: '',
|
||||
form: {
|
||||
Sponsor: null, // 申办方
|
||||
ResearchProgramNo: null, // 方案号
|
||||
TrialCode: null, // 项目编号
|
||||
IndicationType: null, // 适应症
|
||||
ExperimentName: '',
|
||||
TrialSiteId: null, // 研究单位名称
|
||||
UserName: null, // 联系人
|
||||
Phone: '', // 联系人电话
|
||||
EmailOrPhone: '',
|
||||
TrialSiteCode: '',
|
||||
IsUpdate: false,
|
||||
ReplaceUserEmailOrPhone: '',
|
||||
VerificationCode: ''
|
||||
},
|
||||
rules: {
|
||||
TrialSiteId: [
|
||||
{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: ['blur'] }
|
||||
],
|
||||
UserName: [
|
||||
{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: ['blur'] },
|
||||
{ min: 0, max: 50, message: this.$t('trials:researchForm:formRule:maxLength'), trigger: 'blur' }
|
||||
],
|
||||
Phone: [
|
||||
{ required: true, validator: checkPhone, trigger: ['blur'] }
|
||||
],
|
||||
EmailOrPhone: [
|
||||
{ required: true, validator: validateEmail, trigger: ['blur', 'change'] }
|
||||
],
|
||||
ReplaceUserEmailOrPhone: [
|
||||
{ required: true, validator: validateReplaceEmail, trigger: ['blur'] }
|
||||
],
|
||||
VerificationCode: [{ required: true, validator: (rule, value, callback) => { !value ? callback(new Error(this.$t('trials:researchForm:formRule:specify'))) : callback() }, trigger: ['blur'] }]
|
||||
},
|
||||
siteOptions: [],
|
||||
loading: false,
|
||||
sendDisabled: false,
|
||||
btnLoading: false,
|
||||
sendTitle: '',
|
||||
count: '',
|
||||
timer: null,
|
||||
msg: '',
|
||||
lang: 'zh',
|
||||
isHaveSiteSurveyRecord: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'asyncRoutes',
|
||||
'routes',
|
||||
'language'
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
this.$i18n.locale = this.$route.query.lang
|
||||
this.setLanguage(this.$route.query.lang)
|
||||
this.$updateDictionary()
|
||||
if (this.$route.query.trialId) {
|
||||
this.trialId = this.$route.query.trialId
|
||||
this.initPage()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
||||
// 初始化页面
|
||||
async initPage() {
|
||||
try {
|
||||
this.loading = true
|
||||
const res = await getTrialSurveyInitInfo(this.trialId)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.siteOptions = res.Result.TrialSiteSelectList
|
||||
}
|
||||
Object.keys(this.form).forEach(key => {
|
||||
if (res.Result.hasOwnProperty(key)) {
|
||||
this.form[key] = res.Result[key]
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
// 提交
|
||||
async onSubmit() {
|
||||
const validate = await this.$refs.loginForm.validate()
|
||||
if (!validate) return
|
||||
try {
|
||||
this.loading = true
|
||||
if (!this.form.IsUpdate) {
|
||||
this.form.ReplaceUserEmailOrPhone = ''
|
||||
}
|
||||
const param = {
|
||||
trialSiteId: this.form.TrialSiteId,
|
||||
userName: this.form.UserName,
|
||||
phone: this.form.Phone,
|
||||
verificationType: 0,
|
||||
emailOrPhone: this.form.EmailOrPhone,
|
||||
verificationCode: this.form.VerificationCode,
|
||||
isUpdate: this.form.IsUpdate,
|
||||
replaceUserEmailOrPhone: this.form.ReplaceUserEmailOrPhone,
|
||||
trialId: this.trialId
|
||||
}
|
||||
const res = await verifySendCode(param)
|
||||
|
||||
if (res.IsSuccess) {
|
||||
zzSessionStorage.clear()
|
||||
this.$i18n.locale = this.$route.query.lang
|
||||
this.setLanguage(this.$route.query.lang)
|
||||
store.dispatch('user/setToken', res.Result.Token)
|
||||
zzSessionStorage.setItem('TokenKey', res.Result.Token)
|
||||
var permissions = await getUserPermissions()
|
||||
var menuTree = await getUserMenuTree()
|
||||
store.dispatch('user/setTree', menuTree.Result)
|
||||
store.dispatch('user/setPermissions', permissions.Result)
|
||||
this.$router.push({ path: `/researchDetail_m?trialId=${this.trialId}&trialSiteSurveyId=${res.Result.TrialSiteSurveyId}` })
|
||||
this.loading = false
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
this.sendDisabled = false
|
||||
}
|
||||
},
|
||||
handleSiteChange(val) {
|
||||
this.isHaveSiteSurveyRecord = false
|
||||
var selected = this.siteOptions.find(item => item.TrialSiteId === val)
|
||||
if (selected) {
|
||||
this.form.TrialSiteCode = selected.TrialSiteCode
|
||||
this.isHaveSiteSurveyRecord = selected.IsHaveSiteSurveyRecord
|
||||
}
|
||||
},
|
||||
// 发送验证码
|
||||
async handleSendCode() {
|
||||
try {
|
||||
this.loading = true
|
||||
const param = {
|
||||
Email: this.form.EmailOrPhone,
|
||||
TrialId: this.trialId
|
||||
}
|
||||
const res = await sendVerifyCode(param)
|
||||
if (res.IsSuccess) {
|
||||
this.getCode()
|
||||
this.loading = false
|
||||
const msg = this.$t('trials:researchForm:tip:sendCode').replace('xxx', this.form.EmailOrPhone)
|
||||
this.$message.success(msg)
|
||||
} else {
|
||||
this.$alert(res.ErrorMessage)
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
getCode() {
|
||||
const TIME_COUNT = 60
|
||||
if (!this.timer) {
|
||||
this.count = TIME_COUNT
|
||||
this.sendDisabled = true
|
||||
this.timer = setInterval(() => {
|
||||
if (this.count > 0 && this.count <= TIME_COUNT) {
|
||||
this.sendTitle = `(${this.count}s)`
|
||||
this.count--
|
||||
} else {
|
||||
this.sendDisabled = false
|
||||
this.sendTitle = ''
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
onCancel() {
|
||||
this.$refs['loginForm'].resetFields()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.research_login_m_content{
|
||||
background-color:#f5f7fa;
|
||||
.title{
|
||||
margin-bottom: 5px;
|
||||
line-height: 80px;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
}
|
||||
.basic_content{
|
||||
padding: 0 20px;
|
||||
background: #fff;
|
||||
}
|
||||
.login_content{
|
||||
padding: 5px 20px;
|
||||
margin-top: 5px;
|
||||
background: #fff;
|
||||
/deep/.el-form-item {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
}
|
||||
.code_content{
|
||||
display:flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
.el-input{
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.submit_content{
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/deep/.el-form-item {
|
||||
margin-bottom: 0px;
|
||||
padding-top: 5px;
|
||||
border-bottom: 1px solid #f5f7fa;
|
||||
.el-form-item__content{
|
||||
color: #82848a;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -5,7 +5,7 @@
|
||||
<!-- 中心调研表 -->
|
||||
{{ $t('trials:researchForm:title:question') }}
|
||||
</h2>
|
||||
<TopLang style="position: fixed;top: 40px;right: 40px" />
|
||||
<!-- <TopLang style="position: fixed;top: 40px;right: 40px" /> -->
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<div>{{ $t('trials:researchForm:title:researchSurveyStatus') }} <el-tag>{{ $fd('ResearchRecord', state) }}</el-tag></div>
|
||||
<div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<h2 style="text-align:center;">
|
||||
<!-- 中心调研表 -->
|
||||
{{ $t('trials:researchForm:title:question') }}
|
||||
<TopLang style="position: fixed;top: 40px;right: 40px" />
|
||||
<!-- <TopLang style="position: fixed;top: 40px;right: 40px" /> -->
|
||||
</h2>
|
||||
<el-card shadow="hover">
|
||||
<el-form
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div v-loading="pageLoading" style="height:100%;display:flex;flex-direction: column;">
|
||||
<div style="height:50px">
|
||||
<div style="text-align:right;">
|
||||
<!-- <div style="text-align:right;">
|
||||
<el-switch
|
||||
v-model="isEnglish"
|
||||
active-text="EN"
|
||||
inactive-text="中文"
|
||||
style="margin-right:20px;"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
<div style="text-align:center;">
|
||||
<h3>{{ title }}</h3>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="upload-content">
|
||||
<upload-files ref="uploadAgreement" :disabled="$route.query.ReviewStatus === '1'" :doctor-id="doctorId" type="Consultant Agreement" accept=".pdf" @getFileList="getFileList" />
|
||||
</div>
|
||||
<p>{{ $t('system:GcpCertificate:tap:must') }}</p>
|
||||
<p>{{ $t('system:Agreements:tap:must') }}</p>
|
||||
</div>
|
||||
<div v-if="!$route.query.ReviewStatus">
|
||||
<el-table :data="agreementList" size="small">
|
||||
|
||||
@@ -6,122 +6,162 @@
|
||||
v-loading="loading"
|
||||
:model="form"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item label="国际化类型" prop="InternationalizationType">
|
||||
<el-radio-group v-model="form.InternationalizationType">
|
||||
<el-radio
|
||||
v-for="item of $d.InternationalizationType"
|
||||
:key="'InternationalizationType'+item.value"
|
||||
:key="'InternationalizationType' + item.value"
|
||||
:label="item.value"
|
||||
>{{ item.label }}</el-radio>
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="State">
|
||||
<el-radio-group v-model="form.State">
|
||||
<el-radio
|
||||
v-for="item of $d.InternationalizationKeyState"
|
||||
:key="'InternationalizationKeyState'+item.value"
|
||||
:key="'InternationalizationKeyState' + item.value"
|
||||
:label="item.value"
|
||||
>{{ item.label }}</el-radio>
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-table
|
||||
:data="form.AddList"
|
||||
style="width: 100%"
|
||||
height="300"
|
||||
>
|
||||
<el-table-column
|
||||
prop=""
|
||||
label="功能模块/服务名"
|
||||
>
|
||||
<el-form-item label="迭代" prop="PublishLogId">
|
||||
<el-select v-model="form.PublishLogId" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in PublishVersionList"
|
||||
:key="item.Id"
|
||||
:label="item.Version"
|
||||
:value="item.Id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-table :data="form.AddList" style="width: 100%" height="300">
|
||||
<el-table-column prop="" label="功能模块/服务名">
|
||||
<template slot-scope="scope">
|
||||
<el-form-item
|
||||
label=""
|
||||
:prop="`AddList.${scope.$index}.Description`"
|
||||
:prop="`AddList.${scope.$index}.Module`"
|
||||
:rules="[
|
||||
{ required: true,message: $t('common:ruleMessage:specify'), trigger: ['change','blur']},
|
||||
{ max: 200, message: `${$t('common:ruleMessage:maxLength')} 200` }
|
||||
{
|
||||
max: 200,
|
||||
message: `${$t('common:ruleMessage:maxLength')} 200`,
|
||||
trigger: ['change', 'blur'],
|
||||
},
|
||||
]"
|
||||
>
|
||||
<el-input
|
||||
v-model="scope.row.Description"
|
||||
v-model="scope.row.Module"
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop=""
|
||||
label="标识"
|
||||
>
|
||||
<el-table-column prop="" label="标识">
|
||||
<template slot-scope="scope">
|
||||
<el-form-item
|
||||
label=""
|
||||
:prop="`AddList.${scope.$index}.Code`"
|
||||
:rules="[
|
||||
{ required: true,message: $t('common:ruleMessage:specify'), trigger: ['change','blur']},
|
||||
{ max: 200, message: `${$t('common:ruleMessage:maxLength')} 200` }
|
||||
{
|
||||
required: true,
|
||||
message: $t('common:ruleMessage:specify'),
|
||||
trigger: ['change', 'blur'],
|
||||
},
|
||||
{
|
||||
max: 200,
|
||||
message: `${$t('common:ruleMessage:maxLength')} 200`,
|
||||
},
|
||||
]"
|
||||
>
|
||||
<el-input
|
||||
v-model="scope.row.Code"
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop=""
|
||||
label="中文值"
|
||||
>
|
||||
<el-table-column prop="" label="中文值">
|
||||
<template slot-scope="scope">
|
||||
<el-form-item
|
||||
label=""
|
||||
:prop="`AddList.${scope.$index}.ValueCN`"
|
||||
:rules="[
|
||||
{ required: true,message: $t('common:ruleMessage:specify'), trigger: ['change','blur']},
|
||||
{ max: 1000, message: `${$t('common:ruleMessage:maxLength')} 1000` }
|
||||
{
|
||||
required: true,
|
||||
message: $t('common:ruleMessage:specify'),
|
||||
trigger: ['change', 'blur'],
|
||||
},
|
||||
{
|
||||
max: 1000,
|
||||
message: `${$t('common:ruleMessage:maxLength')} 1000`,
|
||||
},
|
||||
]"
|
||||
>
|
||||
<el-input
|
||||
v-model="scope.row.ValueCN"
|
||||
type="textarea"
|
||||
maxlength="1000"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop=""
|
||||
label="英文值"
|
||||
>
|
||||
<el-table-column prop="" label="英文值">
|
||||
<template slot-scope="scope">
|
||||
<el-form-item
|
||||
label=""
|
||||
:prop="`AddList.${scope.$index}.Value`"
|
||||
:rules="[
|
||||
{ required: true,message: $t('common:ruleMessage:specify'), trigger: ['change','blur']},
|
||||
{ max: 1000, message: `${$t('common:ruleMessage:maxLength')} 1000` }
|
||||
{
|
||||
required: true,
|
||||
message: $t('common:ruleMessage:specify'),
|
||||
trigger: ['change', 'blur'],
|
||||
},
|
||||
{
|
||||
max: 1000,
|
||||
message: `${$t('common:ruleMessage:maxLength')} 1000`,
|
||||
},
|
||||
]"
|
||||
>
|
||||
<el-input
|
||||
v-model="scope.row.Value"
|
||||
type="textarea"
|
||||
maxlength="1000"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="right"
|
||||
width="100"
|
||||
>
|
||||
<el-table-column prop="" label="说明">
|
||||
<template slot-scope="scope">
|
||||
<el-form-item
|
||||
label=""
|
||||
:prop="`AddList.${scope.$index}.Description`"
|
||||
:rules="[
|
||||
{
|
||||
max: 200,
|
||||
message: `${$t('common:ruleMessage:maxLength')} 200`,
|
||||
trigger: ['change', 'blur'],
|
||||
},
|
||||
]"
|
||||
>
|
||||
<el-input
|
||||
v-model="scope.row.Description"
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="right" width="100">
|
||||
<template slot="header">
|
||||
<!-- 新增 -->
|
||||
<el-button
|
||||
@@ -129,7 +169,8 @@
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
>{{ $t('common:button:new') }}</el-button>
|
||||
>{{ $t("common:button:new") }}</el-button
|
||||
>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<!-- 删除 -->
|
||||
@@ -138,81 +179,97 @@
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.$index)"
|
||||
>{{ $t('common:button:delete') }}</el-button>
|
||||
>{{ $t("common:button:delete") }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
<template slot="dialog-footer">
|
||||
<el-button size="small" type="primary" @click="handleCancle">取消</el-button>
|
||||
<el-button size="small" type="primary" @click="handleSave">保存</el-button>
|
||||
<el-button size="small" type="primary" @click="handleCancle"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button size="small" type="primary" @click="handleSave"
|
||||
>保存</el-button
|
||||
>
|
||||
</template>
|
||||
</base-model>
|
||||
</template>
|
||||
<script>
|
||||
import { batchAddInternationalization } from '@/api/admin'
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
import { batchAddInternationalization } from "@/api/admin";
|
||||
import BaseModel from "@/components/BaseModel";
|
||||
const formDataDefault = () => {
|
||||
return {
|
||||
State: 0,
|
||||
InternationalizationType: 1,
|
||||
AddList: []
|
||||
}
|
||||
}
|
||||
PublishLogId: null,
|
||||
AddList: [],
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'BatcnAddForm',
|
||||
name: "BatcnAddForm",
|
||||
components: { BaseModel },
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
form: formDataDefault(),
|
||||
model_cfg: { visible: false, showClose: true, width: '800px', title: '', appendToBody: true }
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
model_cfg: {
|
||||
visible: false,
|
||||
showClose: true,
|
||||
width: "800px",
|
||||
title: "",
|
||||
appendToBody: true,
|
||||
},
|
||||
rules: {
|
||||
PublishLogId: [{ required: true, message: "请选择", trigger: "blur" }],
|
||||
},
|
||||
PublishVersionList: [],
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
|
||||
openDialog(title, data) {
|
||||
this.model_cfg.visible = true
|
||||
this.model_cfg.title = title
|
||||
this.form = formDataDefault()
|
||||
openDialog(title, data, options = []) {
|
||||
this.PublishVersionList = options;
|
||||
this.model_cfg.visible = true;
|
||||
this.model_cfg.title = title;
|
||||
this.form = formDataDefault();
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.batcnAddForm.validate(valid => {
|
||||
if (!valid) return
|
||||
this.loading = true
|
||||
batchAddInternationalization(this.form).then(res => {
|
||||
this.loading = false
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.model_cfg.visible = false
|
||||
this.$emit('getList')
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
this.$refs.batcnAddForm.validate((valid) => {
|
||||
if (!valid) return;
|
||||
this.loading = true;
|
||||
batchAddInternationalization(this.form)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.$message.success(this.$t("common:message:savedSuccessfully"));
|
||||
this.model_cfg.visible = false;
|
||||
this.$emit("getList");
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
handleCancle() {
|
||||
this.model_cfg.visible = false
|
||||
this.model_cfg.visible = false;
|
||||
},
|
||||
handleAdd() {
|
||||
this.form.AddList.push({
|
||||
Description: '',
|
||||
Code: '',
|
||||
ValueCN: '',
|
||||
Value: ''
|
||||
})
|
||||
Description: "",
|
||||
Code: "",
|
||||
ValueCN: "",
|
||||
Value: "",
|
||||
});
|
||||
},
|
||||
handleDelete(index) {
|
||||
this.$confirm('是否确认删除?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
this.$confirm("是否确认删除?", {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
}).then(() => {
|
||||
this.form.AddList.splice(index, 1)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
this.form.AddList.splice(index, 1);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -9,147 +9,216 @@
|
||||
label-width="130px"
|
||||
size="small"
|
||||
>
|
||||
<el-form-item label="国际化类型" prop="InternationalizationType">
|
||||
<el-form-item
|
||||
label="国际化类型"
|
||||
prop="InternationalizationType"
|
||||
v-if="status !== 'batch'"
|
||||
>
|
||||
<el-radio-group v-model="form.InternationalizationType">
|
||||
<el-radio
|
||||
v-for="item of $d.InternationalizationType"
|
||||
:key="'InternationalizationType'+item.value"
|
||||
:key="'InternationalizationType' + item.value"
|
||||
:label="item.value"
|
||||
>{{ item.label }}</el-radio>
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="功能模块/服务名" prop="Description">
|
||||
<el-form-item
|
||||
label="功能模块/服务名"
|
||||
prop="Module"
|
||||
v-if="status !== 'batch'"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.Description"
|
||||
v-model="form.Module"
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="标识" prop="Code">
|
||||
<el-form-item label="标识" prop="Code" v-if="status !== 'batch'">
|
||||
<el-input
|
||||
v-model="form.Code"
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="中文值" prop="ValueCN">
|
||||
<el-form-item label="中文值" prop="ValueCN" v-if="status !== 'batch'">
|
||||
<el-input
|
||||
v-model="form.ValueCN"
|
||||
type="textarea"
|
||||
maxlength="1000"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="英文值" prop="Value">
|
||||
<el-form-item label="英文值" prop="Value" v-if="status !== 'batch'">
|
||||
<el-input
|
||||
v-model="form.Value"
|
||||
type="textarea"
|
||||
maxlength="1000"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="状态" prop="State">
|
||||
<el-radio-group v-model="form.State">
|
||||
<el-radio
|
||||
v-for="item of $d.InternationalizationKeyState"
|
||||
:key="'InternationalizationKeyState'+item.value"
|
||||
:key="'InternationalizationKeyState' + item.value"
|
||||
:label="item.value"
|
||||
>{{ item.label }}</el-radio>
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="说明" prop="Description" v-if="status !== 'batch'">
|
||||
<el-input
|
||||
v-model="form.Description"
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="迭代" prop="PublishLogId">
|
||||
<el-select v-model="form.PublishLogId" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in PublishVersionList"
|
||||
:key="item.Id"
|
||||
:label="item.Version"
|
||||
:value="item.Id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<template slot="dialog-footer">
|
||||
<el-button size="small" type="primary" @click="handleCancle">取消</el-button>
|
||||
<el-button size="small" type="primary" @click="handleSave">保存</el-button>
|
||||
<el-button size="small" type="primary" @click="handleCancle"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button size="small" type="primary" @click="handleSave"
|
||||
>保存</el-button
|
||||
>
|
||||
</template>
|
||||
</base-model>
|
||||
</template>
|
||||
<script>
|
||||
import { addOrUpdateInternationalization } from '@/api/admin'
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
import { addOrUpdateInternationalization } from "@/api/admin";
|
||||
import BaseModel from "@/components/BaseModel";
|
||||
const formDataDefault = () => {
|
||||
return {
|
||||
Id: null,
|
||||
State: 0,
|
||||
Description: null,
|
||||
Module: null,
|
||||
Code: null,
|
||||
Value: null,
|
||||
ValueCN: null,
|
||||
InternationalizationType: 1
|
||||
}
|
||||
}
|
||||
InternationalizationType: 1,
|
||||
PublishLogId: null,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'I18nForm',
|
||||
name: "I18nForm",
|
||||
components: { BaseModel },
|
||||
data() {
|
||||
return {
|
||||
status: "add", // add update batch
|
||||
loading: false,
|
||||
form: formDataDefault(),
|
||||
rules: {
|
||||
State: [
|
||||
{ required: true, message: '请选择', trigger: 'blur' }
|
||||
State: [{ required: true, message: "请选择", trigger: "blur" }],
|
||||
Module: [
|
||||
{
|
||||
max: 200,
|
||||
message: `${this.$t("common:ruleMessage:maxLength")} 200`,
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
Description: [
|
||||
{ required: true, message: '请注明', trigger: 'blur' },
|
||||
{ max: 200, message: `${this.$t('common:ruleMessage:maxLength')} 200` }
|
||||
{
|
||||
max: 200,
|
||||
message: `${this.$t("common:ruleMessage:maxLength")} 200`,
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
Code: [
|
||||
{ required: true, message: '请注明', trigger: 'blur' },
|
||||
{ max: 200, message: `${this.$t('common:ruleMessage:maxLength')} 200` }
|
||||
{ required: true, message: "请注明", trigger: "blur" },
|
||||
{
|
||||
max: 200,
|
||||
message: `${this.$t("common:ruleMessage:maxLength")} 200`,
|
||||
},
|
||||
],
|
||||
Value: [
|
||||
{ required: true, message: '请注明', trigger: 'blur' },
|
||||
{ max: 1000, message: `${this.$t('common:ruleMessage:maxLength')} 1000` }
|
||||
{ required: true, message: "请注明", trigger: "blur" },
|
||||
{
|
||||
max: 1000,
|
||||
message: `${this.$t("common:ruleMessage:maxLength")} 1000`,
|
||||
},
|
||||
],
|
||||
ValueCN: [
|
||||
{ required: true, message: '请注明', trigger: 'blur' },
|
||||
{ max: 1000, message: `${this.$t('common:ruleMessage:maxLength')} 1000` }
|
||||
{ required: true, message: "请注明", trigger: "blur" },
|
||||
{
|
||||
max: 1000,
|
||||
message: `${this.$t("common:ruleMessage:maxLength")} 1000`,
|
||||
},
|
||||
],
|
||||
InternationalizationType: [
|
||||
{ required: true, message: '请选择', trigger: 'blur' }
|
||||
]
|
||||
{ required: true, message: "请选择", trigger: "blur" },
|
||||
],
|
||||
PublishLogId: [{ required: true, message: "请选择", trigger: "blur" }],
|
||||
},
|
||||
model_cfg: { visible: false, showClose: true, width: '600px', title: '', appendToBody: true }
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
model_cfg: {
|
||||
visible: false,
|
||||
showClose: true,
|
||||
width: "600px",
|
||||
title: "",
|
||||
appendToBody: true,
|
||||
},
|
||||
PublishVersionList: [],
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
|
||||
openDialog(title, data) {
|
||||
this.model_cfg.visible = true
|
||||
this.model_cfg.title = title
|
||||
openDialog(title, data, options = [], status) {
|
||||
this.PublishVersionList = options;
|
||||
this.status = status;
|
||||
this.model_cfg.visible = true;
|
||||
this.model_cfg.title = title;
|
||||
if (Object.keys(data).length > 0) {
|
||||
for (const k in this.form) {
|
||||
if (data.hasOwnProperty(k)) {
|
||||
this.form[k] = data[k]
|
||||
this.form[k] = data[k];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.form = formDataDefault()
|
||||
this.form = formDataDefault();
|
||||
}
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.i18nForm.validate(valid => {
|
||||
if (!valid) return
|
||||
this.loading = true
|
||||
addOrUpdateInternationalization(this.form).then(res => {
|
||||
this.loading = false
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.model_cfg.visible = false
|
||||
this.$emit('getList')
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
this.$refs.i18nForm.validate((valid) => {
|
||||
if (!valid) return;
|
||||
this.loading = true;
|
||||
if (this.status === "batch") {
|
||||
return this.$emit("batch", this.form);
|
||||
}
|
||||
addOrUpdateInternationalization(this.form)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.$message.success(this.$t("common:message:savedSuccessfully"));
|
||||
this.model_cfg.visible = false;
|
||||
this.$emit("getList");
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
handleCancle() {
|
||||
this.model_cfg.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
this.model_cfg.visible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
+251
-109
@@ -7,11 +7,11 @@
|
||||
v-model="searchData.InternationalizationType"
|
||||
clearable
|
||||
filterable
|
||||
style="width:130px;"
|
||||
style="width: 130px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.InternationalizationType"
|
||||
:key="'InternationalizationType'+item.value"
|
||||
:key="'InternationalizationType' + item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
@@ -19,10 +19,10 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="功能模块/服务名">
|
||||
<el-input
|
||||
v-model="searchData.Description"
|
||||
v-model="searchData.Module"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:130px;"
|
||||
style="width: 130px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="标识">
|
||||
@@ -30,7 +30,7 @@
|
||||
v-model="searchData.Code"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:130px;"
|
||||
style="width: 130px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="中文值">
|
||||
@@ -38,27 +38,55 @@
|
||||
v-model="searchData.ValueCN"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:130px;"
|
||||
style="width: 130px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="英文值">
|
||||
<el-input
|
||||
v-model="searchData.Value"
|
||||
size="small"
|
||||
style="width:130px;"
|
||||
style="width: 130px"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="searchData.State" clearable filterable style="width:130px;">
|
||||
<el-select
|
||||
v-model="searchData.State"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 130px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.InternationalizationKeyState"
|
||||
:key="'InternationalizationKeyState'+item.value"
|
||||
:key="'InternationalizationKeyState' + item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="说明">
|
||||
<el-input
|
||||
v-model="searchData.Description"
|
||||
size="small"
|
||||
clearable
|
||||
style="width: 130px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="迭代">
|
||||
<el-select
|
||||
v-model="searchData.PublishLogId"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 130px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in PublishVersionList"
|
||||
:key="item.Id"
|
||||
:label="item.Version"
|
||||
:value="item.Id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -84,20 +112,27 @@
|
||||
>
|
||||
批量新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-edit-outline"
|
||||
size="mini"
|
||||
:disabled="selectTableList.length <= 0"
|
||||
@click="handleBatchUpdate"
|
||||
>
|
||||
批量更新
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:45}"
|
||||
v-adaptive="{ bottomOffset: 45 }"
|
||||
height="100"
|
||||
:data="list"
|
||||
class="table"
|
||||
@sort-change="handleSortByColumn"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="50"
|
||||
/>
|
||||
@selection-change="handleSelectionChange"
|
||||
><el-table-column type="selection" width="50" />
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
label="国际化类型"
|
||||
prop="InternationalizationType"
|
||||
@@ -106,21 +141,42 @@
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.InternationalizationType === 0" type="primary">
|
||||
{{ $fd('InternationalizationType', scope.row.InternationalizationType) }}
|
||||
<el-tag
|
||||
v-if="scope.row.InternationalizationType === 0"
|
||||
type="primary"
|
||||
>
|
||||
{{
|
||||
$fd(
|
||||
"InternationalizationType",
|
||||
scope.row.InternationalizationType
|
||||
)
|
||||
}}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.InternationalizationType === 1" type="warning">
|
||||
{{ $fd('InternationalizationType', scope.row.InternationalizationType) }}
|
||||
<el-tag
|
||||
v-else-if="scope.row.InternationalizationType === 1"
|
||||
type="warning"
|
||||
>
|
||||
{{
|
||||
$fd(
|
||||
"InternationalizationType",
|
||||
scope.row.InternationalizationType
|
||||
)
|
||||
}}
|
||||
</el-tag>
|
||||
<el-tag v-else>
|
||||
{{ $fd('InternationalizationType', scope.row.InternationalizationType) }}
|
||||
{{
|
||||
$fd(
|
||||
"InternationalizationType",
|
||||
scope.row.InternationalizationType
|
||||
)
|
||||
}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="功能模块/服务名"
|
||||
prop="Description"
|
||||
min-width="100"
|
||||
prop="Module"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
@@ -154,16 +210,30 @@
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.State === 0" type="danger">
|
||||
{{ $fd('InternationalizationKeyState', scope.row.State) }}
|
||||
{{ $fd("InternationalizationKeyState", scope.row.State) }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.State === 1" type="primary">
|
||||
{{ $fd('InternationalizationKeyState', scope.row.State) }}
|
||||
{{ $fd("InternationalizationKeyState", scope.row.State) }}
|
||||
</el-tag>
|
||||
<el-tag v-else>
|
||||
{{ $fd('InternationalizationKeyState', scope.row.State) }}
|
||||
{{ $fd("InternationalizationKeyState", scope.row.State) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="说明"
|
||||
prop="Description"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
label="迭代"
|
||||
prop="Version"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
label="更新时间"
|
||||
prop="UpdateTime"
|
||||
@@ -197,11 +267,10 @@
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination" style="text-align: right;margin-top:5px;">
|
||||
<div class="pagination" style="text-align: right; margin-top: 5px">
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
@@ -209,20 +278,22 @@
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
<i18n-form
|
||||
ref="i18nForm"
|
||||
@getList="getList"
|
||||
/>
|
||||
<i18n-form ref="i18nForm" @getList="getList" @batch="batch" />
|
||||
<BatchAddForm ref="batcnAddForm" @getList="getList" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getInternationalizationList, deleteInternationalization } from '@/api/admin'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import I18nForm from './components/I18nForm.vue'
|
||||
import BatchAddForm from './components/BatchAddForm.vue'
|
||||
import moment from 'moment'
|
||||
import {
|
||||
getInternationalizationList,
|
||||
deleteInternationalization,
|
||||
getPublishVersionSelect,
|
||||
batchUpdateInternationalInfo,
|
||||
} from "@/api/admin";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import I18nForm from "./components/I18nForm.vue";
|
||||
import BatchAddForm from "./components/BatchAddForm.vue";
|
||||
import moment from "moment";
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
Description: null,
|
||||
@@ -230,14 +301,16 @@ const searchDataDefault = () => {
|
||||
ValueCN: null,
|
||||
InternationalizationType: null,
|
||||
State: null,
|
||||
Module: null,
|
||||
PublishLogId: null,
|
||||
Asc: true,
|
||||
SortField: '',
|
||||
SortField: "",
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
PageSize: 20,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'I18n',
|
||||
name: "I18n",
|
||||
components: { Pagination, I18nForm, BatchAddForm },
|
||||
data() {
|
||||
return {
|
||||
@@ -245,100 +318,169 @@ export default {
|
||||
searchData: searchDataDefault(),
|
||||
list: [],
|
||||
total: 0,
|
||||
loading: false
|
||||
}
|
||||
loading: false,
|
||||
PublishVersionList: [],
|
||||
selectTableList: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
this.getPublishVersionSelect();
|
||||
},
|
||||
methods: {
|
||||
// 获取迭代
|
||||
async getPublishVersionSelect() {
|
||||
try {
|
||||
let res = await getPublishVersionSelect();
|
||||
if (res.IsSuccess) {
|
||||
this.PublishVersionList = res.Result;
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
this.loading = true
|
||||
getInternationalizationList(this.searchData).then((res) => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
this.loading = true;
|
||||
getInternationalizationList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 批量更新
|
||||
handleBatchUpdate() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs["i18nForm"].openDialog(
|
||||
"批量更新",
|
||||
{},
|
||||
this.PublishVersionList,
|
||||
"batch"
|
||||
);
|
||||
});
|
||||
},
|
||||
async batch(row) {
|
||||
let { PublishLogId, State } = row;
|
||||
let data = {
|
||||
PublishLogId,
|
||||
State,
|
||||
IdList: this.selectTableList.map((item) => item.Id),
|
||||
};
|
||||
try {
|
||||
let res = await batchUpdateInternationalInfo(data);
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t("common:message:updatedSuccessfully"));
|
||||
this.getList();
|
||||
this.$nextTick(() => {
|
||||
this.$refs["i18nForm"].handleCancle();
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['i18nForm'].openDialog('新增', {})
|
||||
})
|
||||
this.$refs["i18nForm"].openDialog(
|
||||
"新增",
|
||||
{},
|
||||
this.PublishVersionList,
|
||||
"add"
|
||||
);
|
||||
});
|
||||
},
|
||||
handleBatchAdd() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['batcnAddForm'].openDialog('批量新增', {})
|
||||
})
|
||||
this.$refs["batcnAddForm"].openDialog(
|
||||
"批量新增",
|
||||
{},
|
||||
this.PublishVersionList
|
||||
);
|
||||
});
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['i18nForm'].openDialog('编辑', row)
|
||||
})
|
||||
this.$refs["i18nForm"].openDialog(
|
||||
"编辑",
|
||||
row,
|
||||
this.PublishVersionList,
|
||||
"update"
|
||||
);
|
||||
});
|
||||
},
|
||||
// 重置列表查询
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm('是否确认删除?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
deleteInternationalization(row.Id)
|
||||
.then(res => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
})
|
||||
this.$confirm("是否确认删除?", {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
}).then(() => {
|
||||
this.loading = true;
|
||||
deleteInternationalization(row.Id)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res.IsSuccess) {
|
||||
this.getList();
|
||||
this.$message.success(
|
||||
this.$t("common:message:deletedSuccessfully")
|
||||
);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 选择
|
||||
handleSelectionChange(val) {
|
||||
this.selectTableList = val;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.log {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
.left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 0;
|
||||
flex-grow: 4;
|
||||
// border-right: 1px solid #ccc;
|
||||
.filter-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 5px;
|
||||
}
|
||||
.data-table {
|
||||
flex: 1;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.pagination-container {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.log {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
.left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 0;
|
||||
flex-grow: 4;
|
||||
// border-right: 1px solid #ccc;
|
||||
.filter-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 5px;
|
||||
}
|
||||
.data-table {
|
||||
flex: 1;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.pagination-container {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -10,46 +10,72 @@
|
||||
size="small"
|
||||
>
|
||||
<el-form-item label="发布版本" prop="Version">
|
||||
<el-input
|
||||
v-model="form.Version"
|
||||
/>
|
||||
<el-input v-model="form.Version" />
|
||||
</el-form-item>
|
||||
<el-form-item label="更新功能" prop="UpdateContent">
|
||||
<el-input
|
||||
v-model="form.UpdateContent"
|
||||
type="textarea"
|
||||
maxlength="1000"
|
||||
:autosize="{ minRows: 4, maxRows: 5}"
|
||||
:autosize="{ minRows: 4, maxRows: 5 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布日期" prop="PublishTime">
|
||||
<el-form-item label="发布状态" prop="State">
|
||||
<el-select v-model="form.State" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in $d.PublishStatus"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布日期">
|
||||
<el-date-picker
|
||||
v-model="form.PublishTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否当前版本" prop="IsCurrentVersion">
|
||||
<el-select v-model="form.IsCurrentVersion" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<template slot="dialog-footer">
|
||||
<el-button size="small" type="primary" @click="handleCancle">取消</el-button>
|
||||
<el-button size="small" type="primary" @click="handleSave">保存</el-button>
|
||||
<el-button size="small" type="primary" @click="handleCancle"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button size="small" type="primary" @click="handleSave"
|
||||
>保存</el-button
|
||||
>
|
||||
</template>
|
||||
</base-model>
|
||||
</template>
|
||||
<script>
|
||||
import { addOrUpdatePublishLog } from '@/api/admin'
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
import { addOrUpdatePublishLog } from "@/api/admin";
|
||||
import BaseModel from "@/components/BaseModel";
|
||||
const formDataDefault = () => {
|
||||
return {
|
||||
Id: null,
|
||||
Version: null,
|
||||
PublishTime: null,
|
||||
UpdateContent: null
|
||||
}
|
||||
}
|
||||
UpdateContent: null,
|
||||
State: null,
|
||||
IsCurrentVersion: null,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'LogForm',
|
||||
name: "LogForm",
|
||||
components: { BaseModel },
|
||||
data() {
|
||||
return {
|
||||
@@ -57,54 +83,73 @@ export default {
|
||||
form: formDataDefault(),
|
||||
rules: {
|
||||
Version: [
|
||||
{ required: true, message: '请注明', trigger: 'blur' },
|
||||
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
||||
{ required: true, message: "请注明", trigger: "blur" },
|
||||
{ max: 50, message: `${this.$t("common:ruleMessage:maxLength")} 50` },
|
||||
],
|
||||
PublishTime: [
|
||||
{ required: true, message: '请注明', trigger: 'blur' }
|
||||
// PublishTime: [
|
||||
// { required: true, message: '请注明', trigger: 'blur' }
|
||||
// ],
|
||||
IsCurrentVersion: [
|
||||
{ required: true, message: "请选择", trigger: "blur" },
|
||||
],
|
||||
State: [{ required: true, message: "请选择", trigger: "blur" }],
|
||||
UpdateContent: [
|
||||
{ required: true, message: '请注明', trigger: 'blur' },
|
||||
{ max: 1000, message: `${this.$t('common:ruleMessage:maxLength')} 500` }
|
||||
]
|
||||
{ required: true, message: "请注明", trigger: "blur" },
|
||||
{
|
||||
max: 1000,
|
||||
message: `${this.$t("common:ruleMessage:maxLength")} 500`,
|
||||
},
|
||||
],
|
||||
},
|
||||
model_cfg: { visible: false, showClose: true, width: '500px', title: '', appendToBody: true }
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
model_cfg: {
|
||||
visible: false,
|
||||
showClose: true,
|
||||
width: "500px",
|
||||
title: "",
|
||||
appendToBody: true,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
|
||||
openDialog(title, data) {
|
||||
this.model_cfg.visible = true
|
||||
this.model_cfg.title = title
|
||||
this.model_cfg.visible = true;
|
||||
this.model_cfg.title = title;
|
||||
if (Object.keys(data).length > 0) {
|
||||
for (const k in this.form) {
|
||||
if (data.hasOwnProperty(k)) {
|
||||
this.form[k] = data[k]
|
||||
this.form[k] = data[k];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.form = formDataDefault()
|
||||
this.form = formDataDefault();
|
||||
}
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.LogForm.validate(valid => {
|
||||
if (!valid) return
|
||||
this.loading = true
|
||||
addOrUpdatePublishLog(this.form).then(res => {
|
||||
this.loading = false
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.model_cfg.visible = false
|
||||
this.$emit('getList')
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
this.$refs.LogForm.validate((valid) => {
|
||||
if (!valid) return;
|
||||
this.loading = true;
|
||||
addOrUpdatePublishLog(this.form)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.$message.success(this.$t("common:message:savedSuccessfully"));
|
||||
this.model_cfg.visible = false;
|
||||
this.$emit("getList");
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
handleCancle() {
|
||||
this.model_cfg.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
this.model_cfg.visible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-select,
|
||||
.el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
+114
-106
@@ -2,25 +2,11 @@
|
||||
<div class="log">
|
||||
<div ref="leftContainer" class="left">
|
||||
<el-form :inline="true">
|
||||
<el-form-item
|
||||
label="发布版本"
|
||||
prop="Version"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchData.Version"
|
||||
size="small"
|
||||
clearable
|
||||
/>
|
||||
<el-form-item label="发布版本" prop="Version">
|
||||
<el-input v-model="searchData.Version" size="small" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="更新功能"
|
||||
prop="UpdateContent"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchData.UpdateContent"
|
||||
size="small"
|
||||
clearable
|
||||
/>
|
||||
<el-form-item label="更新功能" prop="UpdateContent">
|
||||
<el-input v-model="searchData.UpdateContent" size="small" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
@@ -43,17 +29,14 @@
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:45}"
|
||||
v-adaptive="{ bottomOffset: 45 }"
|
||||
height="100"
|
||||
:data="list"
|
||||
class="table"
|
||||
@sort-change="handleSortByColumn"
|
||||
:default-sort="{prop:'PublishTime',order:'descending'}"
|
||||
:default-sort="{ prop: 'PublishTime', order: 'descending' }"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="50"
|
||||
/>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
label="发布版本"
|
||||
prop="Version"
|
||||
@@ -67,6 +50,16 @@
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="发布状态"
|
||||
prop="State"
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ $fd("PublishStatus", scope.row.State) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="发布日期"
|
||||
prop="PublishTime"
|
||||
@@ -75,10 +68,23 @@
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.PublishTime?moment(scope.row.PublishTime).format('YYYY-MM-DD'):'' }}
|
||||
{{
|
||||
scope.row.PublishTime
|
||||
? moment(scope.row.PublishTime).format("YYYY-MM-DD")
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="是否当前版本"
|
||||
prop="IsCurrentVersion"
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ $fd("YesOrNo", scope.row.IsCurrentVersion) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
@@ -103,11 +109,10 @@
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination" style="text-align: right;margin-top:5px;">
|
||||
<div class="pagination" style="text-align: right; margin-top: 5px">
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
@@ -115,28 +120,25 @@
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
<log-form
|
||||
ref="LogForm"
|
||||
@getList="getList"
|
||||
/>
|
||||
<log-form ref="LogForm" @getList="getList" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getPublishLogList, deletePublishLog } from '@/api/admin'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import LogForm from './components/LogForm.vue'
|
||||
import moment from 'moment'
|
||||
import { getPublishLogList, deletePublishLog } from "@/api/admin";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import LogForm from "./components/LogForm.vue";
|
||||
import moment from "moment";
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
Version: null,
|
||||
UpdateContent: null,
|
||||
Asc: false,
|
||||
SortField: 'PublishTime',
|
||||
SortField: "PublishTime",
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
PageSize: 20,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
components: { Pagination, LogForm },
|
||||
data() {
|
||||
@@ -145,95 +147,101 @@ export default {
|
||||
searchData: searchDataDefault(),
|
||||
list: [],
|
||||
total: 0,
|
||||
loading: false
|
||||
}
|
||||
loading: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
getPublishLogList(this.searchData).then((res) => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
this.loading = true;
|
||||
getPublishLogList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleAdd() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['LogForm'].openDialog('新增', {})
|
||||
})
|
||||
this.$refs["LogForm"].openDialog("新增", {});
|
||||
});
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['LogForm'].openDialog('编辑', row)
|
||||
})
|
||||
this.$refs["LogForm"].openDialog("编辑", row);
|
||||
});
|
||||
},
|
||||
// 重置列表查询
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm('是否确认删除?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
deletePublishLog(row.Id)
|
||||
.then(res => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
})
|
||||
this.$confirm("是否确认删除?", {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
}).then(() => {
|
||||
this.loading = true;
|
||||
deletePublishLog(row.Id)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res.IsSuccess) {
|
||||
this.getList();
|
||||
this.$message.success(
|
||||
this.$t("common:message:deletedSuccessfully")
|
||||
);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.log {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
.left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 0;
|
||||
flex-grow: 4;
|
||||
// border-right: 1px solid #ccc;
|
||||
.filter-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 5px;
|
||||
}
|
||||
.data-table {
|
||||
flex: 1;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.pagination-container {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.log {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
.left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 0;
|
||||
flex-grow: 4;
|
||||
// border-right: 1px solid #ccc;
|
||||
.filter-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 5px;
|
||||
}
|
||||
.data-table {
|
||||
flex: 1;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.pagination-container {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -85,13 +85,13 @@
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
<el-table-column
|
||||
:label="$t('trials:loginLog:table:IPRegion')"
|
||||
prop="IPRegion"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/> -->
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('system:loginLog:table:LoginFaildName')"
|
||||
prop="LoginFaildName"
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
<template>
|
||||
<div
|
||||
:class="{
|
||||
feedBack: true,
|
||||
'feedBack-in': show,
|
||||
'feedBack-out': show === false,
|
||||
}"
|
||||
@click.stop="open"
|
||||
v-if="isShow"
|
||||
>
|
||||
<i class="el-icon-chat-dot-square icon"></i>
|
||||
<transition name="fade">
|
||||
<div class="checkBox" v-show="visible" @click.stop="() => false">
|
||||
<span @click.stop="openFeedBack">{{
|
||||
$t("triials:feedBack:botton:opinion")
|
||||
}}</span>
|
||||
<span @click.stop="openFeedBackTable">{{
|
||||
$t("triials:feedBack:botton:mine")
|
||||
}}</span>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "feedBack",
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
show: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
document.getElementsByTagName("body")[0].addEventListener("click", () => {
|
||||
this.visible = false;
|
||||
if (this.show) {
|
||||
this.show = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
computed: {
|
||||
isShow() {
|
||||
if (this.hasPermi(["role:ir", "role:crc"])) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
if (this.show) {
|
||||
this.visible = !this.visible;
|
||||
}
|
||||
this.show = true;
|
||||
},
|
||||
// 打开意见反馈
|
||||
openFeedBack() {
|
||||
this.$FB({
|
||||
type: "feedback",
|
||||
trialId: this.$route.query.trialId,
|
||||
});
|
||||
},
|
||||
// 打开反馈列表
|
||||
openFeedBackTable() {
|
||||
this.$FBT();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.feedBack {
|
||||
position: fixed;
|
||||
bottom: 50px;
|
||||
right: -25px;
|
||||
z-index: 1000;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: rgba(64, 158, 255, 0.533);
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
color: rgb(255, 255, 255);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.icon {
|
||||
font-size: 30px;
|
||||
}
|
||||
.checkBox {
|
||||
width: 100px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 2px;
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
position: absolute;
|
||||
left: calc(-50% - 50px);
|
||||
top: -58px;
|
||||
span {
|
||||
display: block;
|
||||
width: 98px;
|
||||
line-height: 24px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
&:first-child {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
&:hover {
|
||||
color: #409eff;
|
||||
background: #ecf5ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fade-enter,
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: 0.5s;
|
||||
}
|
||||
.fade-enter-to {
|
||||
opacity: 1;
|
||||
}
|
||||
.feedBack-out {
|
||||
animation-duration: 0.5s;
|
||||
animation-name: btn-in-out;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
.feedBack-in {
|
||||
animation-duration: 0.5s;
|
||||
animation-name: btn-out-in;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
@keyframes btn-out-in {
|
||||
0% {
|
||||
right: -25px;
|
||||
}
|
||||
100% {
|
||||
right: 25px;
|
||||
}
|
||||
}
|
||||
@keyframes btn-in-out {
|
||||
0% {
|
||||
right: 25px;
|
||||
}
|
||||
100% {
|
||||
right: -25px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -41,11 +41,7 @@
|
||||
<!-- 工作台 -->
|
||||
<span slot="title">{{ $t("trials:menuTitle:workbench") }}</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item
|
||||
v-if="!hasPermi(['role:zys'])"
|
||||
index="2"
|
||||
:disabled="TotalNeedSignSystemDocCount !== 0"
|
||||
>
|
||||
<el-menu-item v-if="!hasPermi(['role:zys','role:zyss','role:zybs'])" index="2" :disabled="TotalNeedSignSystemDocCount !== 0">
|
||||
<i class="el-icon-box" />
|
||||
<!-- 我的项目 -->
|
||||
<span slot="title">
|
||||
|
||||
@@ -6,12 +6,14 @@
|
||||
</div>
|
||||
<trialsMain />
|
||||
</div>
|
||||
<!-- <feedBack /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import trialsMain from './components/trialsMain'
|
||||
import trialsNavbar from './components/trialsNavbar'
|
||||
// import feedBack from "./components/feedBack";
|
||||
// import ResizeMixin from './mixin/ResizeHandler'
|
||||
|
||||
export default {
|
||||
@@ -19,9 +21,9 @@ export default {
|
||||
components: {
|
||||
trialsMain,
|
||||
trialsNavbar
|
||||
// feedBack,
|
||||
}
|
||||
// mixins: [ResizeMixin]
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -34,13 +36,13 @@ export default {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
.trials-container{
|
||||
.trials-container {
|
||||
padding: 10px;
|
||||
height: 100%;
|
||||
/deep/ .el-tag{
|
||||
/deep/ .el-tag {
|
||||
background-color: transparent;
|
||||
}
|
||||
/deep/ .el-tag--danger{
|
||||
/deep/ .el-tag--danger {
|
||||
color: #f56c6c;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -827,6 +827,7 @@ export default {
|
||||
}).catch(() => { this.listLoading = false })
|
||||
},
|
||||
rowClick(row, col) {
|
||||
if (row.TrialStatusStr === 'Initializing' && !this.hasPermi(['role:pm']) || row.IsDeleted) return
|
||||
this.$router.push({ path: `/trials/trials-panel?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}` })
|
||||
},
|
||||
// panel
|
||||
|
||||
@@ -323,6 +323,7 @@ export default {
|
||||
},
|
||||
// 关闭签名弹窗
|
||||
closeSignDialog(isSave) {
|
||||
this.duration = 0
|
||||
this.signVisible = false
|
||||
if (isSave) {
|
||||
this.currentIsConfirm = true
|
||||
|
||||
@@ -5,9 +5,14 @@
|
||||
<el-form :inline="true">
|
||||
<!-- 中心 -->
|
||||
<el-form-item :label="$t('trials:researchRecord:table:siteId')">
|
||||
<el-select v-model="searchData.TrialSiteId" clearable filterable style="width:120px;">
|
||||
<el-select
|
||||
v-model="searchData.TrialSiteId"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item,index) of siteOptions"
|
||||
v-for="(item, index) of siteOptions"
|
||||
:key="index"
|
||||
:label="item.TrialSiteCode"
|
||||
:value="item.TrialSiteId"
|
||||
@@ -20,17 +25,21 @@
|
||||
v-model="searchData.UserKeyInfo"
|
||||
class="mr"
|
||||
clearable
|
||||
:placeholder="`${$t('trials:researchRecord:placeholder:contactorInfo')}`"
|
||||
style="width:140px;"
|
||||
:placeholder="`${$t(
|
||||
'trials:researchRecord:placeholder:contactorInfo'
|
||||
)}`"
|
||||
style="width: 140px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 初审人 -->
|
||||
<el-form-item :label="$t('trials:researchRecord:table:preliminaryUser')">
|
||||
<el-form-item
|
||||
:label="$t('trials:researchRecord:table:preliminaryUser')"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchData.PreliminaryUserName"
|
||||
class="mr"
|
||||
clearable
|
||||
style="width:140px;"
|
||||
style="width: 140px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 审核人 -->
|
||||
@@ -39,14 +48,19 @@
|
||||
v-model="searchData.ReviewerUserName"
|
||||
class="mr"
|
||||
clearable
|
||||
style="width:140px;"
|
||||
style="width: 140px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 状态 -->
|
||||
<el-form-item :label="$t('trials:researchRecord:table:status')">
|
||||
<el-select v-model="searchData.State" clearable filterable style="width:120px;">
|
||||
<el-select
|
||||
v-model="searchData.State"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item,index) of $d.ResearchRecord"
|
||||
v-for="(item, index) of $d.ResearchRecord"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -55,8 +69,19 @@
|
||||
</el-form-item>
|
||||
<!-- 是否废除 -->
|
||||
<el-form-item :label="$t('trials:researchRecord:table:isDeleted')">
|
||||
<el-select v-model="searchData.IsDeleted" clearable filterable style="width:120px;">
|
||||
<el-option v-for="item of $d.YesOrNo" v-show="item.raw.ValueCN !== '无'" :key="`IsDeleted${item.value}`" :label="item.label" :value="item.value" />
|
||||
<el-select
|
||||
v-model="searchData.IsDeleted"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.YesOrNo"
|
||||
v-show="item.raw.ValueCN !== '无'"
|
||||
:key="`IsDeleted${item.value}`"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 更新时间 -->
|
||||
@@ -66,34 +91,42 @@
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
style="width:250px;"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 查询 -->
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
{{ $t('common:button:search') }}
|
||||
{{ $t("common:button:search") }}
|
||||
</el-button>
|
||||
<!-- 重置 -->
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
{{ $t("common:button:reset") }}
|
||||
</el-button>
|
||||
<!-- 中心人员 -->
|
||||
<el-button
|
||||
v-hasPermi="['trials:trials-panel:attachments:site-research:summary-record']"
|
||||
v-hasPermi="[
|
||||
'trials:trials-panel:attachments:site-research:summary-record',
|
||||
]"
|
||||
type="primary"
|
||||
icon="el-icon-info"
|
||||
@click="showResearchUser"
|
||||
>
|
||||
{{ $t('trials:researchRecord:button:questionStaffs') }}
|
||||
{{ $t("trials:researchRecord:button:questionStaffs") }}
|
||||
</el-button>
|
||||
<!-- 调查表链接 -->
|
||||
<el-button
|
||||
v-hasPermi="['trials:trials-panel:attachments:site-research:questionnaire-link']"
|
||||
v-hasPermi="[
|
||||
'trials:trials-panel:attachments:site-research:questionnaire-link',
|
||||
]"
|
||||
type="primary"
|
||||
icon="el-icon-link"
|
||||
@click="showResearchLink"
|
||||
>
|
||||
{{ $t('trials:researchRecord:button:questionLink') }}
|
||||
{{ $t("trials:researchRecord:button:questionLink") }}
|
||||
</el-button>
|
||||
</el-form>
|
||||
</template>
|
||||
@@ -103,7 +136,7 @@
|
||||
<el-table
|
||||
ref="siteResearchList"
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:60}"
|
||||
v-adaptive="{ bottomOffset: 60 }"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
@@ -153,7 +186,11 @@
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.PreliminaryUser?scope.row.PreliminaryUser.RealName:"" }}
|
||||
{{
|
||||
scope.row.PreliminaryUser
|
||||
? scope.row.PreliminaryUser.RealName
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 审核人 -->
|
||||
@@ -164,7 +201,7 @@
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.ReviewerUser?scope.row.ReviewerUser.RealName:"" }}
|
||||
{{ scope.row.ReviewerUser ? scope.row.ReviewerUser.RealName : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 状态 -->
|
||||
@@ -175,10 +212,18 @@
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.State === 0" type="primary">{{ $fd('ResearchRecord', scope.row.State) }}</el-tag>
|
||||
<el-tag v-if="scope.row.State === 1" type="info">{{ $fd('ResearchRecord', scope.row.State) }}</el-tag>
|
||||
<el-tag v-if="scope.row.State === 2" type="warning">{{ $fd('ResearchRecord', scope.row.State) }}</el-tag>
|
||||
<el-tag v-if="scope.row.State === 3" type="danger">{{ $fd('ResearchRecord', scope.row.State) }}</el-tag>
|
||||
<el-tag v-if="scope.row.State === 0" type="primary">{{
|
||||
$fd("ResearchRecord", scope.row.State)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.State === 1" type="info">{{
|
||||
$fd("ResearchRecord", scope.row.State)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.State === 2" type="warning">{{
|
||||
$fd("ResearchRecord", scope.row.State)
|
||||
}}</el-tag>
|
||||
<el-tag v-if="scope.row.State === 3" type="danger">{{
|
||||
$fd("ResearchRecord", scope.row.State)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 是否废除 -->
|
||||
@@ -189,8 +234,12 @@
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag>
|
||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag>
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||
$fd("YesOrNo", scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
<el-tag v-else type="primary">{{
|
||||
$fd("YesOrNo", scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 更新时间 -->
|
||||
@@ -200,9 +249,7 @@
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
width="150"
|
||||
>
|
||||
<el-table-column width="150">
|
||||
<template slot-scope="scope">
|
||||
<!-- 查看 -->
|
||||
<el-button
|
||||
@@ -214,7 +261,9 @@
|
||||
/>
|
||||
<!-- 审批 -->
|
||||
<el-button
|
||||
v-hasPermi="['trials:trials-panel:attachments:site-research:auidt']"
|
||||
v-hasPermi="[
|
||||
'trials:trials-panel:attachments:site-research:auidt',
|
||||
]"
|
||||
:disabled="scope.row.State === 0 || scope.row.State === 3"
|
||||
circle
|
||||
:title="$t('trials:researchRecord:action:view')"
|
||||
@@ -223,7 +272,9 @@
|
||||
/>
|
||||
<!-- 废除 -->
|
||||
<el-button
|
||||
v-hasPermi="['trials:trials-panel:attachments:site-research:abolish']"
|
||||
v-hasPermi="[
|
||||
'trials:trials-panel:attachments:site-research:abolish',
|
||||
]"
|
||||
:disabled="scope.row.State !== 0 || scope.row.IsDeleted"
|
||||
circle
|
||||
:title="$t('trials:researchRecord:action:abolish')"
|
||||
@@ -235,7 +286,13 @@
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<!-- 中心人员 -->
|
||||
@@ -246,10 +303,12 @@
|
||||
custom-class="base-dialog-wrapper"
|
||||
:fullscreen="true"
|
||||
>
|
||||
<div class="base-modal-body" style="border:1px solid #ccc;padding: 10px">
|
||||
<div
|
||||
class="base-modal-body"
|
||||
style="border: 1px solid #ccc; padding: 10px"
|
||||
>
|
||||
<Users v-if="researchUserVisible" />
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<!-- 调查表 -->
|
||||
@@ -265,53 +324,87 @@
|
||||
<!-- 调查表链接 -->
|
||||
<base-model :config="share_model">
|
||||
<template slot="dialog-body">
|
||||
<div>
|
||||
<i style="color:#428bca;" class="el-icon-success" />
|
||||
<!-- 成功创建调查表链接 -->
|
||||
<span>{{ $t('trials:researchRecord:message:createLinkSuccessfully') }}</span>
|
||||
</div>
|
||||
<div style="margin:10px 0;">
|
||||
<!-- 链接: -->
|
||||
{{ $t('trials:researchRecord:label:link') }}
|
||||
<el-input ref="shareLink" v-model="shareLink" readonly type="textarea" autosize />
|
||||
</div>
|
||||
<div>
|
||||
<!-- 复制链接 -->
|
||||
<el-button type="primary" round @click="copyLink">
|
||||
{{ $t('trials:researchRecord:button:copyLink') }}
|
||||
</el-button>
|
||||
<div style="width: 100%; display: flex">
|
||||
<div class="shareLink">
|
||||
<div>
|
||||
<i style="color: #428bca" class="el-icon-success" />
|
||||
<!-- 成功创建调查表链接 -->
|
||||
<span>{{
|
||||
$t("trials:researchRecord:message:createLinkSuccessfully")
|
||||
}}</span>
|
||||
</div>
|
||||
<div style="margin: 10px 0">
|
||||
<!-- 链接: -->
|
||||
{{ $t("trials:researchRecord:label:link") }}
|
||||
<el-input
|
||||
ref="shareLink"
|
||||
v-model="shareLink"
|
||||
readonly
|
||||
type="textarea"
|
||||
autosize
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<!-- 复制链接 -->
|
||||
<el-button
|
||||
type="primary"
|
||||
round
|
||||
@click="copyLink"
|
||||
class="shareLinkBtn"
|
||||
>
|
||||
{{ $t("trials:researchRecord:button:copyLink") }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="shareCode">
|
||||
<div class="qrCode">
|
||||
<div id="qrcode" ref="qrcode"></div>
|
||||
</div>
|
||||
<div class="codeBtnBox">
|
||||
<el-button @click="handleCopyImg" type="primary" round>{{
|
||||
$t("trials:researchRecord:button:copyCode")
|
||||
}}</el-button>
|
||||
<el-button @click="savePic" round>{{
|
||||
$t("trials:researchRecord:button:savePic")
|
||||
}}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</base-model>
|
||||
|
||||
</BaseContainer>
|
||||
</template>
|
||||
<script>
|
||||
import { getTrialSiteSurveyList, getTrialSiteSelect, abandonSiteSurvey } from '@/api/trials'
|
||||
import { changeURLStatic } from '@/utils/history.js'
|
||||
import BaseContainer from '@/components/BaseContainer'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import Users from './components/users'
|
||||
import ResearchForm from '@/views/research/form'
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
import {
|
||||
getTrialSiteSurveyList,
|
||||
getTrialSiteSelect,
|
||||
abandonSiteSurvey,
|
||||
} from "@/api/trials";
|
||||
import { changeURLStatic } from "@/utils/history.js";
|
||||
import BaseContainer from "@/components/BaseContainer";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import Users from "./components/users";
|
||||
import ResearchForm from "@/views/research/form";
|
||||
import BaseModel from "@/components/BaseModel";
|
||||
import QRCode from "qrcodejs2";
|
||||
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
SortField: '',
|
||||
SortField: "",
|
||||
Asc: true,
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
TrialSiteId: '',
|
||||
UserKeyInfo: '',
|
||||
TrialSiteId: "",
|
||||
UserKeyInfo: "",
|
||||
State: null,
|
||||
IsDeleted: '',
|
||||
IsDeleted: "",
|
||||
DateRange: [],
|
||||
PreliminaryUserName: null,
|
||||
ReviewerUserName: null
|
||||
}
|
||||
}
|
||||
ReviewerUserName: null,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'SiteResearchList',
|
||||
name: "SiteResearchList",
|
||||
components: { BaseContainer, Pagination, Users, ResearchForm, BaseModel },
|
||||
data() {
|
||||
return {
|
||||
@@ -323,117 +416,223 @@ export default {
|
||||
siteOptions: [],
|
||||
researchUserVisible: false,
|
||||
researchInfoVisible: false,
|
||||
share_model: { visible: false, title: '', width: '500px' },
|
||||
shareLink: '',
|
||||
researchState: this.$d.ResearchRecord
|
||||
}
|
||||
share_model: {
|
||||
visible: false,
|
||||
title: this.$t("trials:researchRecord:title:shark"),
|
||||
width: "800px",
|
||||
},
|
||||
shareLink: "",
|
||||
researchState: this.$d.ResearchRecord,
|
||||
qrcode: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getSite()
|
||||
this.getList();
|
||||
this.getSite();
|
||||
},
|
||||
methods: {
|
||||
// 获取系统文件数据
|
||||
getList() {
|
||||
this.loading = true
|
||||
this.searchData.TrialId = this.trialId
|
||||
this.loading = true;
|
||||
this.searchData.TrialId = this.trialId;
|
||||
if (this.searchData.DateRange && this.searchData.DateRange.length === 2) {
|
||||
this.searchData.UpdateTimeBegin = this.searchData.DateRange[0]
|
||||
this.searchData.updateTimeEnd = this.searchData.DateRange[1]
|
||||
this.searchData.UpdateTimeBegin = this.searchData.DateRange[0];
|
||||
this.searchData.updateTimeEnd = this.searchData.DateRange[1];
|
||||
} else {
|
||||
this.searchData.UpdateTimeBegin = ''
|
||||
this.searchData.updateTimeEnd = ''
|
||||
this.searchData.UpdateTimeBegin = "";
|
||||
this.searchData.updateTimeEnd = "";
|
||||
}
|
||||
getTrialSiteSurveyList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
getTrialSiteSurveyList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 查看调查表记录详情
|
||||
handleViewResearchList(row) {
|
||||
changeURLStatic('trialSiteSurveyId', row.Id)
|
||||
this.researchInfoVisible = true
|
||||
changeURLStatic("trialSiteSurveyId", row.Id);
|
||||
this.researchInfoVisible = true;
|
||||
},
|
||||
// 废除待提交的调查表
|
||||
handleRepealResearch(row) {
|
||||
// 是否确认废除?
|
||||
this.$confirm(this.$t('trials:researchRecord:message:abolish'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(() => {
|
||||
abandonSiteSurvey(this.trialId, row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
// 废除成功
|
||||
this.$message.success(this.$t('trials:researchRecord:message:abolishSuccessfully'))
|
||||
}
|
||||
})
|
||||
})
|
||||
this.$confirm(this.$t("trials:researchRecord:message:abolish"), {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
}).then(() => {
|
||||
abandonSiteSurvey(this.trialId, row.Id).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
this.getList();
|
||||
// 废除成功
|
||||
this.$message.success(
|
||||
this.$t("trials:researchRecord:message:abolishSuccessfully")
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
// 展示当前项目下所有调查表需生成账户的用户信息
|
||||
showResearchUser() {
|
||||
this.researchUserVisible = true
|
||||
this.researchUserVisible = true;
|
||||
},
|
||||
// 复制链接
|
||||
copyLink() {
|
||||
// 中心调研表链接
|
||||
this.$copyText(`${this.$t('trials:researchRecord:message:researchFormLink')}: ${this.shareLink}`).then(
|
||||
res => {
|
||||
this.$copyText(
|
||||
`${this.$t("trials:researchRecord:message:researchFormLink")}: ${
|
||||
this.shareLink
|
||||
}`
|
||||
)
|
||||
.then((res) => {
|
||||
// 复制成功
|
||||
this.$message.success(this.$t('trials:researchRecord:message:copySuccessfully'))
|
||||
}
|
||||
).catch(() => {
|
||||
// 复制失败
|
||||
this.$alert(this.$t('trials:researchRecord:message:copyFailed'))
|
||||
})
|
||||
this.$message.success(
|
||||
this.$t("trials:researchRecord:message:copySuccessfully")
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
// 复制失败
|
||||
this.$alert(this.$t("trials:researchRecord:message:copyFailed"));
|
||||
});
|
||||
},
|
||||
// 创建二维码
|
||||
creatQrCode() {
|
||||
this.$refs.qrcode.innerHTML = ""; //清除二维码方法一
|
||||
let text = this.shareLink;
|
||||
this.qrcode = new QRCode(this.$refs.qrcode, {
|
||||
text: text, //页面地址 ,如果页面需要参数传递请注意哈希模式#
|
||||
width: 200,
|
||||
height: 200,
|
||||
colorDark: "#000000",
|
||||
colorLight: "#ffffff",
|
||||
correctLevel: QRCode.CorrectLevel.H,
|
||||
});
|
||||
// qrcode.clear(); // 清除二维码方法二
|
||||
},
|
||||
// 下载二维码
|
||||
savePic() {
|
||||
let qrCodeCanvas = document
|
||||
.getElementById("qrcode")
|
||||
.getElementsByTagName("canvas");
|
||||
let a = document.createElement("a");
|
||||
a.href = qrCodeCanvas[0].toDataURL("image/url");
|
||||
a.download = `${this.$t("trials:researchRecord:title:code")}.png`;
|
||||
a.click();
|
||||
},
|
||||
// 复制二维码
|
||||
handleCopyImg() {
|
||||
let qrCodeCanvas = document
|
||||
.getElementById("qrcode")
|
||||
.getElementsByTagName("canvas");
|
||||
qrCodeCanvas[0].toBlob(async (blob) => {
|
||||
console.log(blob);
|
||||
const data = [
|
||||
new ClipboardItem({
|
||||
[blob.type]: blob,
|
||||
}),
|
||||
]; // https://w3c.github.io/clipboard-apis/#dom-clipboard-write
|
||||
await navigator.clipboard.write(data).then(
|
||||
() => {
|
||||
this.$message.success(
|
||||
this.$t("trials:researchRecord:message:copySuccess")
|
||||
);
|
||||
},
|
||||
() => {
|
||||
this.$message.error(
|
||||
this.$t("trials:researchRecord:message:UnableWrite")
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
// 获取site下拉框数据
|
||||
getSite() {
|
||||
getTrialSiteSelect(this.trialId).then(res => {
|
||||
this.siteOptions = res.Result
|
||||
})
|
||||
getTrialSiteSelect(this.trialId).then((res) => {
|
||||
this.siteOptions = res.Result;
|
||||
});
|
||||
},
|
||||
// 展示调查表链接
|
||||
showResearchLink() {
|
||||
const trialId = this.trialId
|
||||
this.shareLink = `${location.protocol}//${location.host}/researchLogin?trialId=${trialId}&lang=${this.$i18n.locale}`
|
||||
this.share_model.visible = true
|
||||
const trialId = this.trialId;
|
||||
this.shareLink = `${location.protocol}//${location.host}/researchLogin?trialId=${trialId}&lang=${this.$i18n.locale}`;
|
||||
this.share_model.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.creatQrCode();
|
||||
});
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.searchData.DateRange = []
|
||||
this.searchData = searchDataDefault();
|
||||
this.searchData.DateRange = [];
|
||||
if (this.searchData.DateRange && this.searchData.DateRange.length === 2) {
|
||||
this.searchData.UpdateTimeBegin = this.searchData.DateRange[0]
|
||||
this.searchData.updateTimeEnd = this.searchData.DateRange[1]
|
||||
this.searchData.UpdateTimeBegin = this.searchData.DateRange[0];
|
||||
this.searchData.updateTimeEnd = this.searchData.DateRange[1];
|
||||
} else {
|
||||
this.searchData.UpdateTimeBegin = ''
|
||||
this.searchData.updateTimeEnd = ''
|
||||
this.searchData.UpdateTimeBegin = "";
|
||||
this.searchData.updateTimeEnd = "";
|
||||
}
|
||||
this.getList()
|
||||
this.getList();
|
||||
this.$nextTick(() => {
|
||||
this.$refs.siteResearchList.clearSort()
|
||||
})
|
||||
this.$refs.siteResearchList.clearSort();
|
||||
});
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.getList()
|
||||
this.searchData.SortField = column.prop;
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.qrcode) {
|
||||
this.qrcode = null;
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.shareLink {
|
||||
padding-right: 20px;
|
||||
width: 50%;
|
||||
position: relative;
|
||||
.shareLinkBtn{
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
.shareCode {
|
||||
width: 50%;
|
||||
border-left: 1px solid #eee;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
.qrCode {
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
display: flex;
|
||||
border: 1px solid #c0c4cc;
|
||||
border-radius: 5px;
|
||||
box-shadow: 1px 1px 5px #c0c4cc;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.codeBtnBox {
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -337,7 +337,8 @@ export default {
|
||||
ClinicalDataTrialSetId: this.$router.currentRoute.query.ClinicalDataTrialSetId ? this.$router.currentRoute.query.ClinicalDataTrialSetId : '',
|
||||
readingId: this.$router.currentRoute.query.readingId ? this.$router.currentRoute.query.readingId : '',
|
||||
visitTaskId: this.$router.currentRoute.query.visitTaskId ? this.$router.currentRoute.query.visitTaskId : '',
|
||||
readingClinicalDataId: this.$router.currentRoute.query.readingClinicalDataId ? this.$router.currentRoute.query.readingClinicalDataId : ''
|
||||
readingClinicalDataId: this.$router.currentRoute.query.readingClinicalDataId ? this.$router.currentRoute.query.readingClinicalDataId : '',
|
||||
IsGetAllConsistencyAnalysis:this.$router.currentRoute.query.isGetAllConsistencyAnalysis == 0 ? false : true,
|
||||
}
|
||||
if (this.$router.currentRoute.query.IsOnlyGetCRCReadModule) {
|
||||
param.IsOnlyGetCRCReadModule = true
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- Name CN -->
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
prop="ChineseName"
|
||||
sortable="custom"
|
||||
:label="$t('trials:enrolledReviews:table:nameCN')"
|
||||
v-if="!hasPermi(['role:ea'])"
|
||||
width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
/> -->
|
||||
<!-- 用户名 -->
|
||||
<el-table-column
|
||||
prop="UserName"
|
||||
@@ -140,7 +140,8 @@
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.CriterionCategoryList.find(v => {return v.TrialReadingCriterionId === ite.TrialReadingCriterionId}).StatementCriterionFileList.length > 0">
|
||||
<el-button type="text" @click="windowOpen(scope.row.CriterionCategoryList.find(v => {return v.TrialReadingCriterionId === ite.TrialReadingCriterionId}).StatementCriterionFileList[0].FilePath)">View</el-button>
|
||||
<el-button type="text" @click="preview(scope.row,ite.TrialReadingCriterionId)">View</el-button>
|
||||
<!-- <el-button type="text" @click="windowOpen(scope.row.CriterionCategoryList.find(v => {return v.TrialReadingCriterionId === ite.TrialReadingCriterionId}).StatementCriterionFileList[0].FilePath)">View</el-button> -->
|
||||
</div>
|
||||
<div v-else>
|
||||
<span>{{ $t('trials:enrolledReviews:label:notUpload') }}</span>
|
||||
@@ -474,6 +475,17 @@ export default {
|
||||
this.initPage()
|
||||
},
|
||||
methods: {
|
||||
// 预览
|
||||
preview(row,TrialReadingCriterionId){
|
||||
let file = row.CriterionCategoryList.find(v => {return v.TrialReadingCriterionId === TrialReadingCriterionId}).StatementCriterionFileList[0];
|
||||
let arr = file.FilePath.split(".");
|
||||
|
||||
this.$preview({
|
||||
path:file.FilePath,
|
||||
type:arr[arr.length - 1],
|
||||
title:file.FileName
|
||||
})
|
||||
},
|
||||
isConsistencyChange(row, ite, value, showMessage) {
|
||||
this.batchSetCriterionJoinJoinAnalysis(row, ite, value, showMessage)
|
||||
},
|
||||
|
||||
@@ -179,12 +179,19 @@
|
||||
{ max: 500, message: `${this.$t('common:ruleMessage:maxLength')} 500`, trigger: ['blur', 'change'] }
|
||||
]"
|
||||
>
|
||||
<el-input
|
||||
v-model="adForm.judgeResultRemark"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 4, maxRows: 6}"
|
||||
:disabled="adInfo.ReadingTaskState >= 2"
|
||||
/>
|
||||
<div style="position: relative;">
|
||||
<div style="position: absolute;left: 0;top: 30px;color: #606266;font-size: 13px;">
|
||||
{{ remark }}
|
||||
</div>
|
||||
<el-input
|
||||
v-model="adForm.judgeResultRemark"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 4, maxRows: 6}"
|
||||
:disabled="adInfo.ReadingTaskState >= 2"
|
||||
style="margin-top:25px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
<!-- 截图说明 -->
|
||||
<el-form-item
|
||||
@@ -203,7 +210,7 @@
|
||||
>
|
||||
<i slot="default" class="el-icon-plus" />
|
||||
<div slot="file" slot-scope="{file}">
|
||||
<viewer :images="images" :ref="file.url">
|
||||
<viewer :ref="file.url" :images="images">
|
||||
<img
|
||||
class="el-upload-list__item-thumbnail"
|
||||
:src="OSSclientConfig.basePath + file.url"
|
||||
@@ -229,7 +236,7 @@
|
||||
</viewer>
|
||||
</div>
|
||||
</el-upload>
|
||||
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item v-if="adInfo.ReadingTaskState < 2">
|
||||
<div style="text-align:center;">
|
||||
@@ -317,7 +324,7 @@ import const_ from '@/const/sign-code'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import SignForm from '@/views/trials/components/newSignForm'
|
||||
import DicomEvent from '@/views/trials/trials-panel/reading/dicoms/components/DicomEvent'
|
||||
import store from '@/store'
|
||||
// import store from '@/store'
|
||||
import { changeURLStatic } from '@/utils/history.js'
|
||||
import Viewer from 'v-viewer'
|
||||
export default {
|
||||
@@ -388,7 +395,8 @@ export default {
|
||||
criterionType: null,
|
||||
openWindow: null,
|
||||
isFixed: false,
|
||||
images: []
|
||||
images: [],
|
||||
remark: ''
|
||||
}
|
||||
},
|
||||
// watch: {
|
||||
@@ -424,48 +432,70 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getAdInfo() {
|
||||
async getAdInfo() {
|
||||
this.loading = true
|
||||
getJudgeReadingInfo({ visitTaskId: this.visitTaskId }).then(res => {
|
||||
var judgeQS = []
|
||||
if (res.Result.VisitInfoList.length > 0) {
|
||||
res.Result.VisitInfoList[0].VisitTaskInfoList.map((v, index) => {
|
||||
var qsObj = { armEnum: v.ArmEnum, judgeQuestionList: [], index: index }
|
||||
v.JudgeQuestionList.map(q => {
|
||||
if (q.QuestionType === 1) {
|
||||
qsObj.judgeQuestionList.push(q.QuestionName)
|
||||
} else if (q.QuestionType === 3 && this.criterionType === 10) {
|
||||
qsObj.judgeQuestionList.push(this.$t('trials:globalReview:table:visitRemark'))
|
||||
} else {
|
||||
qsObj.judgeQuestionList.push(this.$fd('JudgeReadingQuestionType', q.QuestionType))
|
||||
}
|
||||
try {
|
||||
const res = await getJudgeReadingInfo({ visitTaskId: this.visitTaskId })
|
||||
if (res.IsSuccess) {
|
||||
var judgeQS = []
|
||||
if (res.Result.VisitInfoList.length > 0) {
|
||||
res.Result.VisitInfoList[0].VisitTaskInfoList.map((v, index) => {
|
||||
var qsObj = { armEnum: v.ArmEnum, judgeQuestionList: [], index: index }
|
||||
v.JudgeQuestionList.map(q => {
|
||||
if (q.QuestionType === 1) {
|
||||
qsObj.judgeQuestionList.push(q.QuestionName)
|
||||
} else if (q.QuestionType === 3 && this.criterionType === 10) {
|
||||
qsObj.judgeQuestionList.push(this.$t('trials:globalReview:table:visitRemark'))
|
||||
} else {
|
||||
qsObj.judgeQuestionList.push(this.$fd('JudgeReadingQuestionType', q.QuestionType))
|
||||
}
|
||||
})
|
||||
judgeQS.push(qsObj)
|
||||
})
|
||||
judgeQS.push(qsObj)
|
||||
})
|
||||
}
|
||||
this.judgeQuestion = judgeQS
|
||||
this.isFixed = this.judgeQuestion.length > 0 && this.judgeQuestion[0].judgeQuestionList.length > 4
|
||||
this.adInfo = res.Result
|
||||
this.adForm.judgeResultTaskId = res.Result.JudgeResultTaskId
|
||||
}
|
||||
this.judgeQuestion = judgeQS
|
||||
this.isFixed = this.judgeQuestion.length > 0 && this.judgeQuestion[0].judgeQuestionList.length > 4
|
||||
this.adInfo = res.Result
|
||||
this.adForm.judgeResultTaskId = res.Result.JudgeResultTaskId
|
||||
|
||||
this.adForm.judgeResultRemark = res.Result.JudgeResultRemark
|
||||
this.fileList = []
|
||||
if (res.Result.JudgeResultImagePathList) {
|
||||
res.Result.JudgeResultImagePathList.map(url => {
|
||||
if (url) { this.fileList.push({ name: '', url: url }) }
|
||||
})
|
||||
this.adForm.judgeResultImagePathList = res.Result.JudgeResultImagePathList
|
||||
this.fileList = []
|
||||
if (res.Result.JudgeResultImagePathList) {
|
||||
res.Result.JudgeResultImagePathList.map(url => {
|
||||
if (url) { this.fileList.push({ name: '', url: url }) }
|
||||
})
|
||||
this.adForm.judgeResultImagePathList = res.Result.JudgeResultImagePathList
|
||||
}
|
||||
this.visitTaskArmList = res.Result.VisitTaskArmList
|
||||
var i = this.visitTaskArmList.findIndex(i => i.VisitTaskId === this.adForm.judgeResultTaskId)
|
||||
if (i > -1) {
|
||||
// 本人已完整查看两位独立阅片人的全部相关影像和评估数据,经过综合研判,更认同第一阅片人(R1)对该病例的整体评估,原因是:
|
||||
this.judgeResultArmEnum = this.visitTaskArmList[i].ArmEnum
|
||||
var msg = ''
|
||||
if (this.judgeResultArmEnum === 1) {
|
||||
msg = this.$t('trials:adReview:title:msg1')
|
||||
} else if (this.judgeResultArmEnum === 2) {
|
||||
msg = this.$t('trials:adReview:title:msg3')
|
||||
}
|
||||
this.remark = msg
|
||||
this.adForm.judgeResultRemark = res.Result.JudgeResultRemark
|
||||
}
|
||||
}
|
||||
this.visitTaskArmList = res.Result.VisitTaskArmList
|
||||
this.loading = false
|
||||
}).catch(() => { this.loading = false })
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
getPriorAdList() {
|
||||
async getPriorAdList() {
|
||||
this.priorLoading = true
|
||||
getReadingPastResultList({ visitTaskId: this.visitTaskId }).then(res => {
|
||||
this.priorADList = res.Result
|
||||
try {
|
||||
const res = await getReadingPastResultList({ visitTaskId: this.visitTaskId })
|
||||
if (res.IsSuccess) {
|
||||
this.priorADList = res.Result
|
||||
}
|
||||
this.priorLoading = false
|
||||
}).catch(() => { this.priorLoading = false })
|
||||
} catch (e) {
|
||||
this.priorLoading = false
|
||||
}
|
||||
},
|
||||
handleVisitTaskArmChange(v) {
|
||||
var i = this.visitTaskArmList.findIndex(i => i.VisitTaskId === v)
|
||||
@@ -479,9 +509,12 @@ export default {
|
||||
msg = this.$t('trials:adReview:title:msg3')
|
||||
}
|
||||
// this.adForm.judgeResultRemark = `本人已完整查看两位独立阅片人的全部相关影像和评估数据,经过综合研判,更认同${this.$fd('ArmEnum', this.judgeResultArmEnum)}对该病例的整体评估,原因是:`
|
||||
this.adForm.judgeResultRemark = msg
|
||||
this.remark = msg
|
||||
this.adForm.judgeResultRemark = ''
|
||||
} else {
|
||||
this.judgeResultArmEnum = ''
|
||||
this.remark = ''
|
||||
this.adForm.judgeResultRemark = ''
|
||||
}
|
||||
},
|
||||
previewCD() {
|
||||
@@ -491,33 +524,32 @@ export default {
|
||||
})
|
||||
window.open(routeData.href, '_blank')
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs['adForm'].validate((valid) => {
|
||||
if (!valid) return
|
||||
this.loading = true
|
||||
var paths = []
|
||||
this.fileList.map(file => {
|
||||
if (file.url) {
|
||||
paths.push(file.url)
|
||||
}
|
||||
})
|
||||
this.adForm.judgeResultImagePathList = paths
|
||||
this.adForm.visitTaskId = this.visitTaskId
|
||||
saveJudgeVisitTaskResult(this.adForm).then(res => {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
async handleSave() {
|
||||
const valid = await this.$refs['adForm'].validate()
|
||||
if (!valid) return
|
||||
this.loading = true
|
||||
var paths = []
|
||||
this.fileList.map(file => {
|
||||
if (file.url) {
|
||||
paths.push(file.url)
|
||||
}
|
||||
})
|
||||
this.adForm.judgeResultImagePathList = paths
|
||||
this.adForm.visitTaskId = this.visitTaskId
|
||||
try {
|
||||
await saveJudgeVisitTaskResult(this.adForm)
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.loading = false
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs['adForm'].validate((valid) => {
|
||||
if (!valid) return
|
||||
const { ImageAssessmentReportConfirmation } = const_.processSignature
|
||||
this.signCode = ImageAssessmentReportConfirmation
|
||||
this.signVisible = true
|
||||
})
|
||||
async handleSubmit() {
|
||||
const valid = await this.$refs['adForm'].validate()
|
||||
if (!valid) return
|
||||
const { ImageAssessmentReportConfirmation } = const_.processSignature
|
||||
this.signCode = ImageAssessmentReportConfirmation
|
||||
this.signVisible = true
|
||||
},
|
||||
// 关闭签名框
|
||||
closeSignDialog(isSign, signInfo) {
|
||||
@@ -528,7 +560,7 @@ export default {
|
||||
}
|
||||
},
|
||||
// 签名并确认
|
||||
signConfirm(signInfo) {
|
||||
async signConfirm(signInfo) {
|
||||
this.loading = true
|
||||
var paths = []
|
||||
this.fileList.map(file => {
|
||||
@@ -543,7 +575,8 @@ export default {
|
||||
},
|
||||
signInfo: signInfo
|
||||
}
|
||||
submitJudgeVisitTaskResult(params).then(async res => {
|
||||
try {
|
||||
const res = await submitJudgeVisitTaskResult(params)
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.isEdit = false
|
||||
@@ -553,38 +586,35 @@ export default {
|
||||
// window.opener.postMessage('refreshTaskList', window.location)
|
||||
// 设置当前任务阅片状态为已读
|
||||
this.adInfo.ReadingTaskState = 2
|
||||
var isAutoTask = await this.getAutoTaskVal()
|
||||
const res = await getAutoCutNextTask()
|
||||
var isAutoTask = res.Result.AutoCutNextTask
|
||||
if (isAutoTask) {
|
||||
store.dispatch('reading/resetVisitTasks')
|
||||
DicomEvent.$emit('getNextTask')
|
||||
// store.dispatch('reading/resetVisitTasks')
|
||||
window.location.reload()
|
||||
} else {
|
||||
// '当前阅片任务已完成,是否进入下一个阅片任务?'
|
||||
this.$confirm(this.$t('trials:adReview:title:msg2'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(() => {
|
||||
store.dispatch('reading/resetVisitTasks')
|
||||
DicomEvent.$emit('getNextTask')
|
||||
})
|
||||
.catch(action => {
|
||||
changeURLStatic('visitTaskId', this.visitTaskId)
|
||||
})
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:adReview:title:msg2'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm === 'confirm') {
|
||||
// store.dispatch('reading/resetVisitTasks')
|
||||
// DicomEvent.$emit('getNextTask')
|
||||
window.location.reload()
|
||||
} else {
|
||||
changeURLStatic('visitTaskId', this.visitTaskId)
|
||||
}
|
||||
}
|
||||
window.opener.postMessage('refreshTaskList', window.location)
|
||||
}
|
||||
this.loading = false
|
||||
}).catch(_ => {
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
this.$refs['signForm'].btnLoading = false
|
||||
})
|
||||
},
|
||||
getAutoTaskVal() {
|
||||
return new Promise((resolve, reject) => {
|
||||
getAutoCutNextTask().then(res => {
|
||||
resolve(res.Result.AutoCutNextTask)
|
||||
}).catch(() => { reject() })
|
||||
})
|
||||
}
|
||||
},
|
||||
handleViewDetail(visitTaskId) {
|
||||
if (this.openWindow) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -111,10 +111,11 @@ export default {
|
||||
this.isRender = true
|
||||
},
|
||||
methods: {
|
||||
handleSave() {
|
||||
this.$refs.assessmentForm.validate(async valid => {
|
||||
if (!valid) return
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
async handleSave() {
|
||||
const valid = await this.$refs.assessmentForm.validate()
|
||||
if (!valid) return
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
try {
|
||||
var answers = []
|
||||
for (const k in this.form) {
|
||||
answers.push({ questionId: k, answer: this.form[k] })
|
||||
@@ -123,13 +124,15 @@ export default {
|
||||
visitTaskId: this.visitTaskId,
|
||||
answerList: answers
|
||||
}
|
||||
submitTaskAdditionalQuestion(params).then(res => {
|
||||
const res = await submitTaskAdditionalQuestion(params)
|
||||
if (res.IsSuccess) {
|
||||
this.$emit('sign')
|
||||
loading.close()
|
||||
}).catch(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
}
|
||||
loading.close()
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
loading.close()
|
||||
}
|
||||
},
|
||||
handleCancel() {
|
||||
this.$emit('close')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-form
|
||||
ref="subjectForm"
|
||||
ref="customWWWC"
|
||||
v-loading="loading"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
@@ -67,11 +67,10 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSave() {
|
||||
this.$refs.subjectForm.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$emit('setWwwc', this.form)
|
||||
})
|
||||
async handleSave() {
|
||||
const valid = await this.$refs.customWWWC.validate()
|
||||
if (!valid) return
|
||||
this.$emit('setWwwc', this.form)
|
||||
},
|
||||
handleCancel() {
|
||||
this.$emit('close')
|
||||
|
||||
@@ -1941,7 +1941,7 @@ export default {
|
||||
for (const [key, value] of searchParams.entries()) {
|
||||
params[key] = value
|
||||
}
|
||||
if (isNaN(params.frame)){
|
||||
if (isNaN(params.frame)) {
|
||||
params.frame = 0
|
||||
}
|
||||
return params
|
||||
|
||||
@@ -798,17 +798,17 @@ export default {
|
||||
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}`
|
||||
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)
|
||||
}
|
||||
instanceList.push(instance.Id)
|
||||
})
|
||||
} else {
|
||||
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}`
|
||||
imageIds.push(imageId)
|
||||
}
|
||||
instanceList.push(instance.Id)
|
||||
})
|
||||
resolve({
|
||||
imageIds: imageIds,
|
||||
instanceList: instanceList,
|
||||
@@ -2149,7 +2149,49 @@ export default {
|
||||
this.screenshotWindow.close()
|
||||
}
|
||||
},
|
||||
async clearAnnotations() {
|
||||
const viewportIds = ['PT_AXIAL', 'CT_AXIAL', 'FUSION_AXIAL']
|
||||
viewportIds.map(v => {
|
||||
const viewport = renderingEngine.getViewport(v)
|
||||
if (viewport) {
|
||||
var annotations = annotation.state.getAnnotations('CircleROI', viewport.element)
|
||||
|
||||
if (annotations && annotations.length > 0) {
|
||||
annotations.map(i => {
|
||||
if (i.metadata.toolName === 'CircleROI') {
|
||||
annotation.state.removeAnnotation(i.annotationUID)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
viewport.render()
|
||||
})
|
||||
try {
|
||||
const visitTaskId = this.$route.query.visitTaskId
|
||||
const res = await getTableAnswerRowInfoList(visitTaskId)
|
||||
if (res.IsSuccess) {
|
||||
var arr = []
|
||||
res.Result.forEach(el => {
|
||||
if (el.OtherMeasureData) {
|
||||
el.OtherMeasureData = JSON.parse(el.OtherMeasureData)
|
||||
el.OtherMeasureData.invalidated = false
|
||||
if (this.readingTaskState === 2) {
|
||||
el.OtherMeasureData.isLocked = true
|
||||
}
|
||||
el.OtherMeasureData.data.remark = el.OrderMarkName
|
||||
const viewport = renderingEngine.getViewport('PT_AXIAL')
|
||||
annotation.state.addAnnotation(el.OtherMeasureData, viewport.element)
|
||||
}
|
||||
arr.push(el)
|
||||
})
|
||||
this.measureDatas = arr
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
},
|
||||
async receiveMsg(event) {
|
||||
console.log(event.data.type)
|
||||
if (event.data.type === 'readingPageUpdate') {
|
||||
// this.$refs['questions'].initList()
|
||||
this.$refs['tableQuestions'].initList(true)
|
||||
@@ -2171,6 +2213,14 @@ export default {
|
||||
FusionEvent.$emit('closeHistoryScreenshot')
|
||||
window.close()
|
||||
}
|
||||
} else if (event.data.type === 'resetPage') {
|
||||
if (this.screenshotWindow) {
|
||||
this.screenshotWindow.close()
|
||||
}
|
||||
this.$refs['tableQuestions'].initList(true)
|
||||
this.$refs['questions'].initList(true)
|
||||
this.isLocate = true
|
||||
this.clearAnnotations()
|
||||
}
|
||||
},
|
||||
startTimer() {
|
||||
|
||||
@@ -66,6 +66,27 @@
|
||||
</template>
|
||||
</el-input>
|
||||
</template>
|
||||
<template v-else-if="question.QuestionType === 55">
|
||||
<el-select
|
||||
v-model="questionForm[question.Id]"
|
||||
:disabled="readingTaskState >= 2 "
|
||||
clearable
|
||||
@change="((val)=>{formItemChange(val, question)})"
|
||||
>
|
||||
<el-option-group
|
||||
:label="!isNaN(parseFloat(question.LastTaskAnswer)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${$fd(question.DictionaryCode,parseFloat(question.LastTaskAnswer))}` : ''"
|
||||
>
|
||||
<template>
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
</el-option-group>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else-if="question.QuestionType === 56">
|
||||
<el-select
|
||||
v-model="questionForm[question.Id]"
|
||||
@@ -73,23 +94,27 @@
|
||||
clearable
|
||||
@change="((val)=>{formItemChange(val, question)})"
|
||||
>
|
||||
<template v-if="pet5PS*1=== -1">
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value !== 4"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<el-option-group
|
||||
:label="!isNaN(parseFloat(question.LastTaskAnswer)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${parseFloat(question.LastTaskAnswer) === 5 ? 'NA' : $fd(question.DictionaryCode,parseFloat(question.LastTaskAnswer))}` : ''"
|
||||
>
|
||||
<template v-if="pet5PS*1=== -1">
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value !== 4"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
</el-option-group>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else-if="question.QuestionType === 57">
|
||||
@@ -99,23 +124,27 @@
|
||||
clearable
|
||||
@change="((val)=>{formItemChange(val, question)})"
|
||||
>
|
||||
<template v-if="pet5PS*1=== -1">
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value !== 1"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<el-option-group
|
||||
:label="!isNaN(parseFloat(question.LastTaskAnswer)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${$fd(question.DictionaryCode,parseFloat(question.LastTaskAnswer))}` : ''"
|
||||
>
|
||||
<template v-if="pet5PS*1=== -1">
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value !== 1"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
</el-option-group>
|
||||
</el-select>
|
||||
</template>
|
||||
<!-- 输入框 -->
|
||||
@@ -286,7 +315,7 @@
|
||||
:reading-task-state="readingTaskState"
|
||||
:question-form="questionForm"
|
||||
:visit-task-id="visitTaskId"
|
||||
:pet5PS="pet5PS"
|
||||
:pet5p-s="pet5PS"
|
||||
:lung-is-inside-volume="lungIsInsideVolume"
|
||||
:liver-is-inside-volume="liverIsInsideVolume"
|
||||
@setFormItemData="setFormItemData"
|
||||
@@ -333,7 +362,7 @@ export default {
|
||||
pet5PS: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
:question-form="questionForm"
|
||||
:reading-task-state="readingTaskState"
|
||||
:visit-task-id="visitTaskId"
|
||||
:pet5PS="questionForm[pet5PSId]"
|
||||
:pet5p-s="questionForm[pet5PSId]"
|
||||
:lung-is-inside-volume="lungIsInsideVolume"
|
||||
:liver-is-inside-volume="liverIsInsideVolume"
|
||||
@setFormItemData="setFormItemData"
|
||||
@@ -163,42 +163,49 @@ export default {
|
||||
}
|
||||
this.initList(true)
|
||||
},
|
||||
initList(isInit) {
|
||||
async initList(isInit) {
|
||||
this.loading = true
|
||||
var params = {
|
||||
trialId: this.trialId,
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionClassify: 0
|
||||
}
|
||||
getDicomReadingQuestionAnswer(params).then(res => {
|
||||
var questions = res.Result
|
||||
try {
|
||||
const params = {
|
||||
trialId: this.trialId,
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionClassify: 0
|
||||
}
|
||||
const res = await getDicomReadingQuestionAnswer(params)
|
||||
if (res.IsSuccess) {
|
||||
const questions = res.Result
|
||||
|
||||
questions.map((v) => {
|
||||
v.IsBaseLineTask = this.isBaseLineTask
|
||||
if (v.Type === 'group' && v.Childrens.length === 0) return
|
||||
if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary') {
|
||||
this.$set(this.questionForm, v.Id, v.Answer ? v.Answer : null)
|
||||
}
|
||||
if (v.Childrens.length > 0) {
|
||||
this.setChild(v.Childrens)
|
||||
}
|
||||
})
|
||||
this.questions = questions
|
||||
this.setPet5PSCommentDisplay()
|
||||
this.measurements = []
|
||||
res.OtherInfo.QuestionMarkInfoList.forEach(i => {
|
||||
if (i.OtherMeasureData) {
|
||||
i.OtherMeasureData = JSON.parse(i.OtherMeasureData)
|
||||
if (i.QuestionType === 51 && isInit) {
|
||||
this.liverRender = false
|
||||
} else if (i.QuestionType === 52 && isInit) {
|
||||
this.lungRender = false
|
||||
questions.map((v) => {
|
||||
v.IsBaseLineTask = this.isBaseLineTask
|
||||
if (v.Type === 'group' && v.Childrens.length === 0) return
|
||||
if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary') {
|
||||
this.$set(this.questionForm, v.Id, v.Answer ? v.Answer : null)
|
||||
}
|
||||
}
|
||||
this.measurements.push(i)
|
||||
})
|
||||
if (v.Childrens.length > 0) {
|
||||
this.setChild(v.Childrens)
|
||||
}
|
||||
})
|
||||
console.log(this.questionForm,questions)
|
||||
this.questions = questions
|
||||
this.setPet5PSCommentDisplay()
|
||||
this.measurements = []
|
||||
res.OtherInfo.QuestionMarkInfoList.forEach(i => {
|
||||
if (i.OtherMeasureData) {
|
||||
i.OtherMeasureData = JSON.parse(i.OtherMeasureData)
|
||||
if (i.QuestionType === 51 && isInit) {
|
||||
this.liverRender = false
|
||||
} else if (i.QuestionType === 52 && isInit) {
|
||||
this.lungRender = false
|
||||
}
|
||||
}
|
||||
this.measurements.push(i)
|
||||
})
|
||||
}
|
||||
this.loading = false
|
||||
}).catch(() => { this.loading = false })
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
setChild(obj) {
|
||||
obj.forEach(i => {
|
||||
@@ -263,37 +270,28 @@ export default {
|
||||
// }
|
||||
})
|
||||
},
|
||||
saveQuestionsForm() {
|
||||
async saveQuestionsForm() {
|
||||
this.loading = true
|
||||
var answers = []
|
||||
for (const k in this.questionForm) {
|
||||
answers.push({ id: k, answer: this.questionForm[k] })
|
||||
}
|
||||
// var questionMarkInfoList = []
|
||||
// this.measurements.forEach(item => {
|
||||
// var i = Object.assign({}, item)
|
||||
// if (i.OtherMeasureData) {
|
||||
// for (const k in i.OtherMeasureData.data.cachedStats) {
|
||||
// i.OtherMeasureData.data.cachedStats[k].pointsInShape = []
|
||||
// }
|
||||
// i.OtherMeasureData = JSON.stringify(i.OtherMeasureData)
|
||||
// }
|
||||
|
||||
// questionMarkInfoList.push(i)
|
||||
// })
|
||||
var params = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
answers: answers
|
||||
// questionMarkInfoList
|
||||
}
|
||||
saveTaskQuestion(1, params).then(async res => {
|
||||
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
|
||||
try {
|
||||
var answers = []
|
||||
for (const k in this.questionForm) {
|
||||
answers.push({ id: k, answer: this.questionForm[k] })
|
||||
}
|
||||
var params = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
answers: answers
|
||||
}
|
||||
const res = await saveTaskQuestion(1, params)
|
||||
if (res.IsSuccess) {
|
||||
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
|
||||
this.loading = false
|
||||
this.questionFormChangeState = false
|
||||
this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 })
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
this.loading = false
|
||||
this.questionFormChangeState = false
|
||||
this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 })
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
checkAnnotationStatus(obj) {
|
||||
for (let i = 0; i < obj.length; i++) {
|
||||
@@ -422,21 +420,27 @@ export default {
|
||||
break
|
||||
}
|
||||
}
|
||||
var params = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
answers,
|
||||
questionMarkInfoList
|
||||
try {
|
||||
var params = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
answers,
|
||||
questionMarkInfoList
|
||||
}
|
||||
const qsType = question.QuestionType === 51 ? 2 : question.QuestionType === 52 ? 3 : null
|
||||
|
||||
const res = await saveTaskQuestion(qsType, params)
|
||||
if (res.IsSuccess) {
|
||||
this.$set(question, 'SaveEnum', 0)
|
||||
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
|
||||
loading.close()
|
||||
this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 })
|
||||
this.resetSuvQuestions(1)
|
||||
}
|
||||
loading.close()
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
loading.close()
|
||||
}
|
||||
const qsType = question.QuestionType === 51 ? 2 : question.QuestionType === 52 ? 3 : null
|
||||
saveTaskQuestion(qsType, params).then(async res => {
|
||||
this.$set(question, 'SaveEnum', 0)
|
||||
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
|
||||
loading.close()
|
||||
this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 })
|
||||
this.resetSuvQuestions(1)
|
||||
}).catch(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
viewAnnotations(question) {
|
||||
@@ -622,7 +626,7 @@ export default {
|
||||
console.log('setfocalFDG')
|
||||
if (this.questionForm[this.pet5PSId] !== '-1' && this.questionForm[this.focalFDGId] === '1') {
|
||||
this.questionForm[this.focalFDGId] = ''
|
||||
}
|
||||
}
|
||||
},
|
||||
setpet5PS() {
|
||||
console.log('setpet5PS')
|
||||
@@ -654,40 +658,38 @@ export default {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
resetSuvQuestions(type = 0) {
|
||||
async resetSuvQuestions(type = 0) {
|
||||
this.loading = true
|
||||
var params = {
|
||||
trialId: this.trialId,
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionClassify: 0
|
||||
}
|
||||
getDicomReadingQuestionAnswer(params).then(res => {
|
||||
var questions = res.Result
|
||||
questions.map((v) => {
|
||||
if (v.Type === 'group' && v.Childrens.length === 0) return
|
||||
// if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary') {
|
||||
// this.$set(this.questionForm, v.Id, v.Answer ? v.Answer : null)
|
||||
// }
|
||||
if (v.Childrens.length > 0) {
|
||||
this.setSuvChild(v.Childrens, type)
|
||||
}
|
||||
// var pet5PS = this.setpet5PS()
|
||||
// this.questionForm[this.pet5PSId] = pet5PS
|
||||
// this.calculatePet5PS = pet5PS
|
||||
// this.setPet5PSCommentDisplay()
|
||||
// this.setUptakeFormBaseline()
|
||||
})
|
||||
for (let i = 0; i < this.questions[0].Childrens[0].Childrens.length; i++) {
|
||||
if (this.questions[0].Childrens[0].Childrens[i].QuestionType === 59) {
|
||||
this.questions[0].Childrens[0].Childrens[i].ShowQuestion = 2
|
||||
this.questions[0].Childrens[0].Childrens[i].IsRequired = 3
|
||||
this.questionForm[this.pet5PSCommentsId] = ''
|
||||
break
|
||||
}
|
||||
try {
|
||||
const params = {
|
||||
trialId: this.trialId,
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionClassify: 0
|
||||
}
|
||||
const res = await getDicomReadingQuestionAnswer(params)
|
||||
if (res.IsSuccess) {
|
||||
const questions = res.Result
|
||||
questions.map((v) => {
|
||||
if (v.Type === 'group' && v.Childrens.length === 0) return
|
||||
if (v.Childrens.length > 0) {
|
||||
this.setSuvChild(v.Childrens, type)
|
||||
}
|
||||
})
|
||||
for (let i = 0; i < this.questions[0].Childrens[0].Childrens.length; i++) {
|
||||
if (this.questions[0].Childrens[0].Childrens[i].QuestionType === 59) {
|
||||
this.questions[0].Childrens[0].Childrens[i].ShowQuestion = 2
|
||||
this.questions[0].Childrens[0].Childrens[i].IsRequired = 3
|
||||
this.questionForm[this.pet5PSCommentsId] = ''
|
||||
break
|
||||
}
|
||||
}
|
||||
this.questionFormChangeState = true
|
||||
}
|
||||
this.questionFormChangeState = true
|
||||
this.loading = false
|
||||
}).catch(() => { this.loading = false })
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
setSuvChild(obj, type) {
|
||||
obj.forEach(i => {
|
||||
|
||||
+117
-115
@@ -316,7 +316,7 @@ export default {
|
||||
this.$set(this.questionForm, 'OrganInfoId', this.answers.OrganInfoId ? this.answers.OrganInfoId : '')
|
||||
|
||||
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断);2:已保存,信息完整
|
||||
var lesionState = this.getQuestionVal(7)
|
||||
// var lesionState = this.getQuestionVal(7)
|
||||
if (!isRerender) {
|
||||
if (this.questionForm.RowId) {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 2)
|
||||
@@ -625,7 +625,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
var lesionState = this.getQuestionVal(7)
|
||||
// var lesionState = this.getQuestionVal(7)
|
||||
if (this.firstRenderAnnotation) {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 2)
|
||||
} else {
|
||||
@@ -871,75 +871,79 @@ export default {
|
||||
this.deleteInfo = null
|
||||
params.rowId = ''
|
||||
}
|
||||
submitTableQuestion(params).then(async res => {
|
||||
this.currentMarkTool = otherMeasureData ? otherMeasureData.type : ''
|
||||
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断);2:已保存,信息完整
|
||||
try {
|
||||
const res = await submitTableQuestion(params)
|
||||
if (res.IsSuccess) {
|
||||
this.currentMarkTool = otherMeasureData ? otherMeasureData.type : ''
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 2)
|
||||
this.originalQuestionForm = { ...this.questionForm }
|
||||
var isLymphLesion = this.getQuestionVal(2)
|
||||
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
|
||||
var lesionOrgan = this.getQuestionVal(6)
|
||||
this.$set(this.questionForm, 'RowId', res.Result.RowId)
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const suvMax = this.getQuestionVal(20)
|
||||
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, suvMax, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 2)
|
||||
this.originalQuestionForm = { ...this.questionForm }
|
||||
loading.close()
|
||||
var isLymphLesion = this.getQuestionVal(2)
|
||||
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
|
||||
var lesionOrgan = this.getQuestionVal(6)
|
||||
this.$set(this.questionForm, 'RowId', res.Result.RowId)
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const suvMax = this.getQuestionVal(20)
|
||||
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, suvMax, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||
FusionEvent.$emit('resetSuvQuestions')
|
||||
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
|
||||
this.$emit('close')
|
||||
|
||||
// FusionEvent.$emit('getAnnotations')
|
||||
FusionEvent.$emit('resetSuvQuestions')
|
||||
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
|
||||
this.$emit('close')
|
||||
this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 })
|
||||
}
|
||||
loading.close()
|
||||
this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 })
|
||||
}).catch(() => { loading.close() })
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
loading.close()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleDeleteMeasureData() {
|
||||
async handleDeleteMeasureData() {
|
||||
// 是否确认清除标记?
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg47'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(async() => {
|
||||
this.organList = []
|
||||
await this.getOrganInfoList()
|
||||
// 重置SUV
|
||||
var suvId = this.getQuestionId(20)
|
||||
this.$set(this.questionForm, suvId, '')
|
||||
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断)
|
||||
if (this.questionForm.RowId) {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 1)
|
||||
} else {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 0)
|
||||
}
|
||||
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData, type: 'clear' })
|
||||
// await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:reading:warnning:msg47'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
this.organList = []
|
||||
await this.getOrganInfoList()
|
||||
// 重置SUV
|
||||
var suvId = this.getQuestionId(20)
|
||||
this.$set(this.questionForm, suvId, '')
|
||||
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断)
|
||||
if (this.questionForm.RowId) {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 1)
|
||||
} else {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 0)
|
||||
}
|
||||
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData, type: 'clear' })
|
||||
// await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
|
||||
|
||||
// Store.$emit('updateImage', this.questionForm.MeasureData.instanceId)
|
||||
var isLymphLesion = this.getQuestionVal(2)
|
||||
isLymphLesion = !isNaN(parseInt(isLymphLesion)) ? parseInt(isLymphLesion) : null
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionOrgan = this.getQuestionVal(6)
|
||||
// Store.$emit('updateImage', this.questionForm.MeasureData.instanceId)
|
||||
var isLymphLesion = this.getQuestionVal(2)
|
||||
isLymphLesion = !isNaN(parseInt(isLymphLesion)) ? parseInt(isLymphLesion) : null
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionOrgan = this.getQuestionVal(6)
|
||||
|
||||
if (!this.questionForm.IsDicomReading) {
|
||||
if (!this.questionForm.IsDicomReading) {
|
||||
|
||||
}
|
||||
this.$set(this.questionForm, 'IsDicomReading', true)
|
||||
}
|
||||
this.$set(this.questionForm, 'IsDicomReading', true)
|
||||
|
||||
this.$set(this.questionForm, 'OtherMeasureData', '')
|
||||
let anwsers = null
|
||||
if (this.answers.measureObj) {
|
||||
anwsers = Object.assign({ measureObj: '' }, this.questionForm)
|
||||
} else {
|
||||
anwsers = Object.assign({}, this.questionForm)
|
||||
}
|
||||
var suvMax = this.getQuestionVal(20)
|
||||
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, suvMax, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: anwsers })
|
||||
this.isInsideVolume = true
|
||||
})
|
||||
.catch(() => {})
|
||||
this.$set(this.questionForm, 'OtherMeasureData', '')
|
||||
let anwsers = null
|
||||
if (this.answers.measureObj) {
|
||||
anwsers = Object.assign({ measureObj: '' }, this.questionForm)
|
||||
} else {
|
||||
anwsers = Object.assign({}, this.questionForm)
|
||||
}
|
||||
var suvMax = this.getQuestionVal(20)
|
||||
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, suvMax, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: anwsers })
|
||||
this.isInsideVolume = true
|
||||
},
|
||||
async clearMeasurement() {
|
||||
this.organList = []
|
||||
@@ -975,65 +979,63 @@ export default {
|
||||
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, suvMax, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: anwsers })
|
||||
this.isInsideVolume = true
|
||||
},
|
||||
handleDelete() {
|
||||
// 是否确认删除?
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg48'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(async() => {
|
||||
if (this.questionForm.RowId) {
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
var param = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionId: this.parentQsId,
|
||||
rowId: this.questionForm.RowId
|
||||
}
|
||||
deleteReadingRowAnswer(param)
|
||||
.then(async res => {
|
||||
loading.close()
|
||||
if (res.IsSuccess) {
|
||||
// this.$emit('getReadingQuestionAndAnswer')
|
||||
if (this.questionForm.IsDicomReading && this.questionForm.OtherMeasureData) {
|
||||
// await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
|
||||
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData, type: 'delete' })
|
||||
}
|
||||
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||
|
||||
// '删除成功!'
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
loading.close()
|
||||
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
|
||||
}
|
||||
}).catch(() => { loading.close() })
|
||||
} else {
|
||||
// const loading = this.$loading({ fullscreen: true })
|
||||
// 移除新建病灶并关闭窗口
|
||||
if (this.questionForm.OtherMeasureData && this.questionForm.IsDicomReading) {
|
||||
// await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
|
||||
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData })
|
||||
}
|
||||
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||
// loading.close()
|
||||
}
|
||||
})
|
||||
},
|
||||
handleClose() {
|
||||
if (!this.questionForm.RowId) {
|
||||
// '当前病灶为新建病灶,未保存。如果关闭窗口,将会删除病灶信息,是否继续?'
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg49'), {
|
||||
async handleDelete() {
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:reading:warnning:msg48'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(async() => {
|
||||
// 移除新建病灶并关闭窗口
|
||||
if (this.questionForm.OtherMeasureData) {
|
||||
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData })
|
||||
// await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
if (this.questionForm.RowId) {
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
try {
|
||||
var param = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionId: this.parentQsId,
|
||||
rowId: this.questionForm.RowId
|
||||
}
|
||||
const res = await deleteReadingRowAnswer(param)
|
||||
if (res.IsSuccess) {
|
||||
if (this.questionForm.IsDicomReading && this.questionForm.OtherMeasureData) {
|
||||
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData, type: 'delete' })
|
||||
}
|
||||
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||
})
|
||||
.catch(() => {})
|
||||
// '删除成功!'
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
loading.close()
|
||||
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
|
||||
}
|
||||
loading.close()
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
loading.close()
|
||||
}
|
||||
} else {
|
||||
// 移除新建病灶并关闭窗口
|
||||
if (this.questionForm.OtherMeasureData && this.questionForm.IsDicomReading) {
|
||||
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData })
|
||||
}
|
||||
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||
}
|
||||
},
|
||||
async handleClose() {
|
||||
if (!this.questionForm.RowId) {
|
||||
// '当前病灶为新建病灶,未保存。如果关闭窗口,将会删除病灶信息,是否继续?'
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:reading:warnning:msg49'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
// 移除新建病灶并关闭窗口
|
||||
if (this.questionForm.OtherMeasureData) {
|
||||
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData })
|
||||
}
|
||||
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||
} else {
|
||||
if (this.questionForm.saveTypeEnum === 1) {
|
||||
this.$emit('close')
|
||||
|
||||
@@ -56,22 +56,25 @@ export default {
|
||||
this.getHotkeys()
|
||||
},
|
||||
methods: {
|
||||
getHotkeys(isReset = false) {
|
||||
async getHotkeys(isReset = false) {
|
||||
this.loading = true
|
||||
this.hotKeyList = []
|
||||
getDoctorShortcutKey({ imageToolType: this.readingTool }).then(res => {
|
||||
res.Result.map(item => {
|
||||
this.hotKeyList.push({ id: item.Id, keys: { controlKey: { altKey: item.AltKey, ctrlKey: item.CtrlKey, shiftKey: item.ShiftKey, metaKey: item.MetaKey, key: item.Keyboardkey, code: item.Code }, text: item.Text }, label: item.ShortcutKeyEnum })
|
||||
})
|
||||
if (isReset) {
|
||||
this.$emit('reset', this.hotKeyList)
|
||||
try {
|
||||
const res = await getDoctorShortcutKey({ imageToolType: this.readingTool })
|
||||
if (res.IsSuccess) {
|
||||
res.Result.map(item => {
|
||||
this.hotKeyList.push({ id: item.Id, keys: { controlKey: { altKey: item.AltKey, ctrlKey: item.CtrlKey, shiftKey: item.ShiftKey, metaKey: item.MetaKey, key: item.Keyboardkey, code: item.Code }, text: item.Text }, label: item.ShortcutKeyEnum })
|
||||
})
|
||||
if (isReset) {
|
||||
this.$emit('reset', this.hotKeyList)
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSave() {
|
||||
async handleSave() {
|
||||
var params = {
|
||||
imageToolType: this.readingTool,
|
||||
shortcutKeyList: []
|
||||
@@ -86,17 +89,15 @@ export default {
|
||||
emptyLabel = item.label
|
||||
break
|
||||
} else {
|
||||
shortcutKeyList.push(
|
||||
{
|
||||
shortcutKeyEnum: item.label,
|
||||
keyboardkey: item.keys.controlKey.key,
|
||||
code: item.keys.controlKey.code,
|
||||
text: item.keys.text,
|
||||
altKey: item.keys.controlKey.altKey,
|
||||
ctrlKey: item.keys.controlKey.ctrlKey,
|
||||
shiftKey: item.keys.controlKey.shiftKey,
|
||||
metaKey: item.keys.controlKey.metaKey }
|
||||
)
|
||||
shortcutKeyList.push({
|
||||
shortcutKeyEnum: item.label,
|
||||
keyboardkey: item.keys.controlKey.key,
|
||||
code: item.keys.controlKey.code,
|
||||
text: item.keys.text,
|
||||
altKey: item.keys.controlKey.altKey,
|
||||
ctrlKey: item.keys.controlKey.ctrlKey,
|
||||
shiftKey: item.keys.controlKey.shiftKey,
|
||||
metaKey: item.keys.controlKey.metaKey })
|
||||
}
|
||||
}
|
||||
if (isExistEmptyText) {
|
||||
@@ -112,43 +113,40 @@ export default {
|
||||
})
|
||||
} else {
|
||||
this.loading = true
|
||||
// this.hotKeyList.map(item => {
|
||||
// shortcutKeyList.push(
|
||||
// {
|
||||
// shortcutKeyEnum: item.label,
|
||||
// keyboardkey: item.keys.controlKey.key,
|
||||
// code: item.keys.controlKey.code,
|
||||
// text: item.keys.text,
|
||||
// altKey: item.keys.controlKey.altKey,
|
||||
// ctrlKey: item.keys.controlKey.ctrlKey,
|
||||
// shiftKey: item.keys.controlKey.shiftKey,
|
||||
// metaKey: item.keys.controlKey.metaKey }
|
||||
// )
|
||||
// })
|
||||
params.shortcutKeyList = shortcutKeyList
|
||||
setShortcutKey(params).then(res => {
|
||||
this.$emit('reset', this.hotKeyList)
|
||||
// this.$emit('close')
|
||||
try {
|
||||
const res = await setShortcutKey(params)
|
||||
if (res.IsSuccess) {
|
||||
this.$emit('reset', this.hotKeyList)
|
||||
}
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
handleReset() {
|
||||
async handleReset() {
|
||||
// '是否确认重置?'
|
||||
this.$confirm(this.$t('trials:hotkeys:message:confirmReset'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
restoreDefaultShortcutKey({ imageToolType: this.readingTool }).then(res => {
|
||||
this.$message.success(this.$t('trials:hotkeys:message:resetSuccessfully')) // '重置成功!'
|
||||
this.getHotkeys(true)
|
||||
}).catch(() => { this.loading = false })
|
||||
})
|
||||
.catch(action => {})
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:hotkeys:message:confirmReset'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await restoreDefaultShortcutKey({ imageToolType: this.readingTool })
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t('trials:hotkeys:message:resetSuccessfully')) // '重置成功!'
|
||||
this.getHotkeys(true)
|
||||
}
|
||||
this.loading = false
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
handleHotkeyVerify(hotkey) {
|
||||
for (const item of this.hotKeyList) {
|
||||
|
||||
+989
-1017
File diff suppressed because it is too large
Load Diff
@@ -2,10 +2,20 @@
|
||||
<div class="measurement-wrapper" :style="{'height':height+10+'px'}">
|
||||
|
||||
<div class="container" :style="{'height':height+'px'}">
|
||||
<h3 v-if="isReadingShowSubjectInfo" style="color: #ddd;padding: 5px 0px;margin: 0;">
|
||||
<span v-if="subjectCode">{{ subjectCode }} </span>
|
||||
<span style="margin-left:5px;">{{ taskBlindName }}</span>
|
||||
</h3>
|
||||
<div class="basic-info">
|
||||
<h3 v-if="isReadingShowSubjectInfo">
|
||||
<span v-if="subjectCode">{{ subjectCode }} </span>
|
||||
<span style="margin-left:5px;">{{ taskBlindName }}</span>
|
||||
</h3>
|
||||
<div v-if="readingTaskState < 2">
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')" placement="bottom">
|
||||
<i
|
||||
class="el-icon-refresh-left"
|
||||
@click="resetMeasuredData"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 非测量问题 -->
|
||||
<div class="lesions">
|
||||
<Questions
|
||||
@@ -157,6 +167,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { splitLesion } from '@/api/trials'
|
||||
import { resetReadingTask } from '@/api/reading'
|
||||
import DicomEvent from './../DicomEvent'
|
||||
import store from '@/store'
|
||||
import { mapGetters } from 'vuex'
|
||||
@@ -1068,6 +1079,39 @@ export default {
|
||||
getECRFQuestions(obj) {
|
||||
this.$refs['ecrf'].getQuestions(obj.visitTaskId)
|
||||
},
|
||||
async resetMeasuredData() {
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:dicomReading:message:confirmReset1'),
|
||||
this.$t('trials:dicomReading:message:confirmReset2'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
try {
|
||||
const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
// 刷新标注、表单、报告页信息
|
||||
this.activeName = ''
|
||||
this.activeItem.activeRowIndex = null
|
||||
this.activeItem.activeCollapseId = null
|
||||
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||
const triald = this.$router.currentRoute.query.trialId
|
||||
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
|
||||
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
DicomEvent.$emit('refreshStudyListMeasureData')
|
||||
}
|
||||
loading.close()
|
||||
} catch (e) {
|
||||
loading.close()
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
receiveMsg(event) {
|
||||
if (event.data.type === 'isCanActiveNoneDicomTool') {
|
||||
this.getUnSaveTarget()
|
||||
@@ -1140,6 +1184,22 @@ export default {
|
||||
|
||||
.container{
|
||||
padding: 10px;
|
||||
.basic-info{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
h3{
|
||||
color: #ddd;
|
||||
padding: 5px 0px;
|
||||
margin: 0;
|
||||
}
|
||||
i{
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.title{
|
||||
padding: 5px;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,10 +2,20 @@
|
||||
<div class="measurement-wrapper" :style="{'height':height+10+'px'}">
|
||||
|
||||
<div class="container" :style="{'height':height+'px'}">
|
||||
<h3 v-if="isReadingShowSubjectInfo" style="color: #ddd;padding: 5px 0px;margin: 0;">
|
||||
<span v-if="subjectCode">{{ subjectCode }} </span>
|
||||
<span style="margin-left:5px;">{{ taskBlindName }}</span>
|
||||
</h3>
|
||||
<div class="basic-info">
|
||||
<h3 v-if="isReadingShowSubjectInfo">
|
||||
<span v-if="subjectCode">{{ subjectCode }} </span>
|
||||
<span style="margin-left:5px;">{{ taskBlindName }}</span>
|
||||
</h3>
|
||||
<div v-if="readingTaskState < 2">
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')" placement="bottom">
|
||||
<i
|
||||
class="el-icon-refresh-left"
|
||||
@click="resetMeasuredData"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 非测量问题 -->
|
||||
<div class="lesions">
|
||||
<!-- 影像质量问题 -->
|
||||
@@ -216,6 +226,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { splitLesion, getSplitPPdSum, getCanMergeLesion, mergeLesion } from '@/api/trials'
|
||||
import { resetReadingTask } from '@/api/reading'
|
||||
import DicomEvent from './../DicomEvent'
|
||||
import store from '@/store'
|
||||
import { mapGetters } from 'vuex'
|
||||
@@ -333,7 +344,8 @@ export default {
|
||||
})
|
||||
})
|
||||
DicomEvent.$on('refreshSplitTargetLesionPDD', async(callback) => {
|
||||
this.splitTargetLesions = await this.getSplitTargetLesionPDD()
|
||||
const res = await getSplitPPdSum({ visitTaskId: this.visitTaskId })
|
||||
this.splitTargetLesions = res.Result
|
||||
if (this.splitTargetLesions && this.splitTargetLesions.length > 0) {
|
||||
this.splitTargetLesions.map(i => {
|
||||
var refName = `${this.lesionTypeQuestionId}_${i.RowIndex}`
|
||||
@@ -388,7 +400,8 @@ export default {
|
||||
loading.close()
|
||||
}
|
||||
if (!this.isBaseLineTask) {
|
||||
this.splitTargetLesions = await this.getSplitTargetLesionPDD()
|
||||
const res = await getSplitPPdSum({ visitTaskId: this.visitTaskId })
|
||||
this.splitTargetLesions = res.Result
|
||||
}
|
||||
this.questions = this.visitTaskList[i].ReadingQuestions
|
||||
this.$nextTick(() => {
|
||||
@@ -530,7 +543,8 @@ export default {
|
||||
this.isCurrentTask = this.visitTaskList[idx].IsCurrentTask
|
||||
}
|
||||
if (!this.isBaseLineTask) {
|
||||
this.splitTargetLesions = await this.getSplitTargetLesionPDD()
|
||||
const res = await getSplitPPdSum({ visitTaskId: this.visitTaskId })
|
||||
this.splitTargetLesions = res.Result
|
||||
}
|
||||
this.getTableQuestions()
|
||||
this.$nextTick(() => {
|
||||
@@ -559,13 +573,6 @@ export default {
|
||||
} catch (e) { console.log(e) }
|
||||
})
|
||||
},
|
||||
getSplitTargetLesionPDD() {
|
||||
return new Promise(resolve => {
|
||||
getSplitPPdSum({ visitTaskId: this.visitTaskId }).then(res => {
|
||||
resolve(res.Result)
|
||||
}).catch(() => { resolve() })
|
||||
})
|
||||
},
|
||||
setHeight() {
|
||||
this.height = window.innerHeight - 140
|
||||
},
|
||||
@@ -688,7 +695,7 @@ export default {
|
||||
})
|
||||
},
|
||||
// 融合
|
||||
handleMerge(answers, questionId, orderMark) {
|
||||
async handleMerge(answers, questionId, orderMark) {
|
||||
this.lesionData = []
|
||||
this.mergeList = []
|
||||
this.merge.visible = true
|
||||
@@ -697,10 +704,16 @@ export default {
|
||||
this.mergeInfo.lesionName = this.getLesionName(orderMark, answers.RowIndex)
|
||||
this.mergeInfo.lesionPart = answers.lesionPart
|
||||
this.merge.loading = true
|
||||
getCanMergeLesion({ rowId: answers.RowId }).then(res => {
|
||||
this.lesionData = res.Result
|
||||
try {
|
||||
const res = await getCanMergeLesion({ rowId: answers.RowId })
|
||||
if (res.IsSuccess) {
|
||||
this.lesionData = res.Result
|
||||
}
|
||||
this.merge.loading = false
|
||||
}).catch(() => { this.merge.loading = false })
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
this.merge.loading = false
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.mergeList = []
|
||||
@@ -718,23 +731,28 @@ export default {
|
||||
|
||||
})
|
||||
},
|
||||
lesionMerge() {
|
||||
async lesionMerge() {
|
||||
this.merge.loading = true
|
||||
var params = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionId: this.mergeInfo.questionId,
|
||||
mergeMainRowId: this.mergeInfo.mergeRowId,
|
||||
mergeRowIdList: this.mergeList
|
||||
}
|
||||
mergeLesion(params).then(res => {
|
||||
try {
|
||||
var params = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionId: this.mergeInfo.questionId,
|
||||
mergeMainRowId: this.mergeInfo.mergeRowId,
|
||||
mergeRowIdList: this.mergeList
|
||||
}
|
||||
const res = await mergeLesion(params)
|
||||
if (res.IsSuccess) {
|
||||
this.merge.visible = false
|
||||
DicomEvent.$emit('readingPageUpdate', {})
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
DicomEvent.$emit('setMeasuredToolsPassive')
|
||||
this.getReadingQuestionAndAnswer()
|
||||
}
|
||||
this.merge.loading = false
|
||||
this.merge.visible = false
|
||||
DicomEvent.$emit('readingPageUpdate', {})
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
DicomEvent.$emit('setMeasuredToolsPassive')
|
||||
this.getReadingQuestionAndAnswer()
|
||||
// 刷新病灶列表及标记
|
||||
}).catch(() => { this.merge.loading = false })
|
||||
} catch (e) {
|
||||
this.merge.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
isCanActiveTool(toolName) {
|
||||
this.isNonTargetMeasurement = false
|
||||
@@ -1284,6 +1302,41 @@ export default {
|
||||
})
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
loading.close()
|
||||
},
|
||||
async resetMeasuredData() {
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:dicomReading:message:confirmReset1'),
|
||||
this.$t('trials:dicomReading:message:confirmReset2'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
try {
|
||||
const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
|
||||
if (res.IsSuccess) {
|
||||
// 刷新标注、表单、报告页信息、融合页表单及标注
|
||||
this.activeName = ''
|
||||
this.activeItem.activeRowIndex = null
|
||||
this.activeItem.activeCollapseId = null
|
||||
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||
const triald = this.$router.currentRoute.query.trialId
|
||||
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
|
||||
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
|
||||
this.$refs['ecrf2'].getQuestions(this.visitTaskId, true)
|
||||
this.$refs['ecrf3'].getQuestions(this.visitTaskId, true)
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
DicomEvent.$emit('refreshStudyListMeasureData')
|
||||
DicomEvent.$emit('resetPage', {})
|
||||
}
|
||||
loading.close()
|
||||
} catch (e) {
|
||||
loading.close()
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1296,6 +1349,22 @@ export default {
|
||||
|
||||
.container{
|
||||
padding: 10px;
|
||||
.basic-info{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
h3{
|
||||
color: #ddd;
|
||||
padding: 5px 0px;
|
||||
margin: 0;
|
||||
}
|
||||
i{
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.title{
|
||||
padding: 5px;
|
||||
|
||||
@@ -51,19 +51,23 @@ export default {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
async getList() {
|
||||
this.loading = true
|
||||
var param = {
|
||||
trialId: this.trialId
|
||||
}
|
||||
getManualList(param).then(res => {
|
||||
this.fileList = res.Result
|
||||
|
||||
if (this.fileList.length > 0) {
|
||||
this.preview(this.fileList[0])
|
||||
try {
|
||||
var param = {
|
||||
trialId: this.trialId
|
||||
}
|
||||
const res = await getManualList(param)
|
||||
if (res.IsSuccess) {
|
||||
this.fileList = res.Result
|
||||
if (this.fileList.length > 0) {
|
||||
this.preview(this.fileList[0])
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
}).catch(() => { this.loading = false })
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
preview(file) {
|
||||
this.$set(this.selected, 'filePath', file.Path)
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
import { getTableAnswerRowInfoList } from '@/api/trials'
|
||||
import { on, off } from 'element-ui/src/utils/dom'
|
||||
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util'
|
||||
import store from '@/store'
|
||||
// import store from '@/store'
|
||||
const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel'
|
||||
var ctx = '' // 画布上下文
|
||||
export default {
|
||||
@@ -223,16 +223,16 @@ export default {
|
||||
getCanvasData() {
|
||||
return new Promise(async resolve => {
|
||||
this.visitTaskId = this.$router.currentRoute.query.visitTaskId
|
||||
this.canvasData = []
|
||||
let res = await getTableAnswerRowInfoList(this.visitTaskId)
|
||||
this.canvasData = []
|
||||
const res = await getTableAnswerRowInfoList(this.visitTaskId)
|
||||
res.Result.forEach(el => {
|
||||
if (!el.IsDicomReading){
|
||||
if (!el.IsDicomReading) {
|
||||
if (el.MeasureData) {
|
||||
el.MeasureData = JSON.parse(el.MeasureData)
|
||||
el.MeasureData.data.remark = el.OrderMarkName
|
||||
this.canvasData.push(el.MeasureData)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
sessionStorage.setItem('measureData', this.canvasData)
|
||||
// await store.dispatch('reading/getMeasuredData', this.visitTaskId)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
/>
|
||||
<div ref="imagesWrapper" class="images">
|
||||
<div v-if="noData" class="empty-text">
|
||||
<slot name="empty">暂无数据</slot>
|
||||
<slot name="empty">{{ $t('trial:reading:noneDicoms:noData') }}</slot>
|
||||
</div>
|
||||
<div v-show="!noData" class="items" :style="itemsStyle">
|
||||
<div
|
||||
|
||||
@@ -36,27 +36,31 @@ export default {
|
||||
this.initForm()
|
||||
},
|
||||
methods: {
|
||||
initForm() {
|
||||
async initForm() {
|
||||
this.loading = true
|
||||
getAutoCutNextTask().then(async res => {
|
||||
this.form.AutoCutNextTask = res.Result.AutoCutNextTask
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.otherForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
setAutoCutNextTask(this.form).then((res) => {
|
||||
this.loading = false
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
try {
|
||||
const res = await getAutoCutNextTask()
|
||||
if (res.IsSuccess) {
|
||||
this.form.AutoCutNextTask = res.Result.AutoCutNextTask
|
||||
}
|
||||
})
|
||||
this.loading = false
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async handleSave() {
|
||||
const valid = await this.$refs.otherForm.validate()
|
||||
if (!valid) return
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await setAutoCutNextTask(this.form)
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
}
|
||||
this.loading = false
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -484,8 +484,8 @@ export default {
|
||||
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionOrgan = this.getQuestionVal(6)
|
||||
const lesionState = Number(this.getQuestionVal(7))
|
||||
const lesionNum = Number(this.getQuestionVal(11))
|
||||
const lesionState = this.getQuestionVal(7)
|
||||
const lesionNum = this.getQuestionVal(11)
|
||||
this.$emit('resetQuestions', { lesionPart, lesionOrgan, lesionState, saveTypeEnum: this.questionForm.saveTypeEnum, lesionNum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||
},
|
||||
|
||||
@@ -547,8 +547,8 @@ export default {
|
||||
this.$set(this.questionForm, 'MeasureData', measureData)
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionOrgan = this.getQuestionVal(6)
|
||||
const lesionState = Number(this.getQuestionVal(7))
|
||||
const lesionNum = Number(this.getQuestionVal(11))
|
||||
const lesionState = this.getQuestionVal(7)
|
||||
const lesionNum = this.getQuestionVal(11)
|
||||
|
||||
this.$emit('resetQuestions', { lesionPart, lesionOrgan, lesionState, lesionNum, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||
this.toolType = measureData.type
|
||||
@@ -572,10 +572,15 @@ export default {
|
||||
}
|
||||
},
|
||||
getQuestionVal(questionMark) {
|
||||
var idx = this.questions.findIndex(i => i.QuestionMark === questionMark)
|
||||
const idx = this.questions.findIndex(i => i.QuestionMark === questionMark)
|
||||
if (idx > -1) {
|
||||
var questionId = this.questions[idx].Id
|
||||
return this.questionForm[questionId]
|
||||
const questionId = this.questions[idx].Id
|
||||
const answer = this.questionForm[questionId]
|
||||
if (isNaN(parseFloat(answer))) {
|
||||
return answer
|
||||
} else {
|
||||
return parseFloat(answer)
|
||||
}
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
@@ -619,78 +624,79 @@ export default {
|
||||
// 生成Blob对象(文件对象)
|
||||
return new Blob([bytesCode], { type: imgtype })
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.measurementForm.validate(async valid => {
|
||||
if (!valid) return
|
||||
var lesionState = this.getQuestionVal(7)
|
||||
var measureData = this.questionForm.MeasureData
|
||||
// 非基线
|
||||
if (!this.isBaseLineTask) {
|
||||
// 新病灶 2
|
||||
// 病灶状态为“存在”的新病灶,请使用箭头工具添加标记2
|
||||
if (this.lesionType === 2 && lesionState === 2) {
|
||||
if (!(measureData && measureData.type === 'ArrowAnnotate')) {
|
||||
this.$confirm(this.$t('trials:readingPGWC:warnning:msg2'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
// 既往新病灶 3
|
||||
// 病灶状态为“存在”的既往新病灶,请使用箭头工具添加标记2
|
||||
if (this.lesionType === 3 && lesionState === 2) {
|
||||
if (!(measureData && measureData.type === 'ArrowAnnotate')) {
|
||||
this.$confirm(this.$t('trials:readingPGWC:warnning:msg3'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
// 病灶状态为“良性”的既往新病灶,请使用箭头工具添加标记3
|
||||
if (this.lesionType === 3 && lesionState === 3) {
|
||||
if (!(measureData && measureData.type === 'ArrowAnnotate')) {
|
||||
this.$confirm(this.$t('trials:readingPGWC:warnning:msg4'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
// 病灶状态为“消失”的既往新病灶,请使用箭头工具添加标记1
|
||||
if (this.lesionType === 3 && lesionState === 1) {
|
||||
if (!(measureData && measureData.type === 'ArrowAnnotate')) {
|
||||
this.$confirm(this.$t('trials:readingPGWC:warnning:msg5'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
// 病灶状态为“不可评估”的既往新病灶,不需要添加标记4
|
||||
if (this.lesionType === 3 && lesionState === 4) {
|
||||
if (measureData) {
|
||||
this.$confirm(this.$t('trials:readingPGWC:warnning:msg6'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
async handleSave() {
|
||||
const valid = await this.$refs.measurementForm.validate()
|
||||
if (!valid) return
|
||||
var lesionState = this.getQuestionVal(7)
|
||||
var measureData = this.questionForm.MeasureData
|
||||
// 非基线
|
||||
if (!this.isBaseLineTask) {
|
||||
// 新病灶 2
|
||||
// 病灶状态为“存在”的新病灶,请使用箭头工具添加标记2
|
||||
if (this.lesionType === 2 && lesionState === 2) {
|
||||
if (!(measureData && measureData.type === 'ArrowAnnotate')) {
|
||||
this.$confirm(this.$t('trials:readingPGWC:warnning:msg2'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType, isMarked: !!measureData }, async val => {
|
||||
// 既往新病灶 3
|
||||
// 病灶状态为“存在”的既往新病灶,请使用箭头工具添加标记2
|
||||
if (this.lesionType === 3 && lesionState === 2) {
|
||||
if (!(measureData && measureData.type === 'ArrowAnnotate')) {
|
||||
this.$confirm(this.$t('trials:readingPGWC:warnning:msg3'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
// 病灶状态为“良性”的既往新病灶,请使用箭头工具添加标记3
|
||||
if (this.lesionType === 3 && lesionState === 3) {
|
||||
if (!(measureData && measureData.type === 'ArrowAnnotate')) {
|
||||
this.$confirm(this.$t('trials:readingPGWC:warnning:msg4'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
// 病灶状态为“消失”的既往新病灶,请使用箭头工具添加标记1
|
||||
if (this.lesionType === 3 && lesionState === 1) {
|
||||
if (!(measureData && measureData.type === 'ArrowAnnotate')) {
|
||||
this.$confirm(this.$t('trials:readingPGWC:warnning:msg5'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
// 病灶状态为“不可评估”的既往新病灶,不需要添加标记4
|
||||
if (this.lesionType === 3 && lesionState === 4) {
|
||||
if (measureData) {
|
||||
this.$confirm(this.$t('trials:readingPGWC:warnning:msg6'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType, isMarked: !!measureData }, async val => {
|
||||
try {
|
||||
var picturePath = ''
|
||||
if (val && measureData) {
|
||||
var pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, val)
|
||||
@@ -724,106 +730,115 @@ export default {
|
||||
organInfoId: this.questionForm.OrganInfoId,
|
||||
markTool: measureData ? measureData.type : ''
|
||||
}
|
||||
submitTableQuestion(params).then(async res => {
|
||||
try {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.currentMarkTool = measureData ? measureData.type : ''
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 2)
|
||||
this.originalQuestionForm = { ...this.questionForm }
|
||||
loading.close()
|
||||
var isLymphLesion = this.getQuestionVal(2)
|
||||
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
|
||||
var lesionOrgan = this.getQuestionVal(6)
|
||||
this.$set(this.questionForm, 'RowId', res.Result.RowId)
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionState = Number(this.getQuestionVal(7))
|
||||
const lesionNum = Number(this.getQuestionVal(11))
|
||||
|
||||
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, saveTypeEnum: this.questionForm.saveTypeEnum, lesionState, lesionNum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
this.$emit('close')
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
DicomEvent.$emit('setMeasuredToolsPassive')
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
}).catch(() => { loading.close() })
|
||||
})
|
||||
})
|
||||
},
|
||||
handleDeleteMeasureData() {
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg47'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(async() => {
|
||||
if (this.questionForm.RowId) {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 1)
|
||||
} else {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 0)
|
||||
}
|
||||
var remark = this.getLesionName(this.orderMark, this.questionForm.RowIndex)
|
||||
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, orderMarkName: remark })
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionOrgan = this.getQuestionVal(6)
|
||||
const lesionState = Number(this.getQuestionVal(7))
|
||||
const lesionNum = Number(this.getQuestionVal(11))
|
||||
const res = await submitTableQuestion(params)
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.currentMarkTool = measureData ? measureData.type : ''
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 2)
|
||||
this.originalQuestionForm = { ...this.questionForm }
|
||||
|
||||
this.$set(this.questionForm, 'MeasureData', '')
|
||||
let anwsers = null
|
||||
if (this.answers.measureObj) {
|
||||
anwsers = Object.assign({ measureObj: '' }, this.questionForm)
|
||||
} else {
|
||||
anwsers = Object.assign({}, this.questionForm)
|
||||
}
|
||||
this.$emit('resetQuestions', { lesionPart, lesionOrgan, lesionState, lesionNum, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: anwsers })
|
||||
DicomEvent.$emit('refreshStudyListMeasureData')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
handleDelete() {
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg48'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(async() => {
|
||||
if (this.questionForm.RowId) {
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
var param = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionId: this.parentQsId,
|
||||
rowId: this.questionForm.RowId
|
||||
}
|
||||
deleteReadingRowAnswer(param)
|
||||
.then(async res => {
|
||||
loading.close()
|
||||
if (res.IsSuccess) {
|
||||
if (this.questionForm.MeasureData) {
|
||||
var remark = this.getLesionName(this.orderMark, this.questionForm.RowIndex)
|
||||
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, orderMarkName: remark })
|
||||
}
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
loading.close()
|
||||
}
|
||||
}).catch(() => { loading.close() })
|
||||
} else {
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
// 移除新建病灶并关闭窗口
|
||||
if (this.questionForm.MeasureData) {
|
||||
var remark = this.getLesionName(this.orderMark, this.questionForm.RowIndex)
|
||||
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, orderMarkName: remark })
|
||||
}
|
||||
var isLymphLesion = this.getQuestionVal(2)
|
||||
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
|
||||
var lesionOrgan = this.getQuestionVal(6)
|
||||
this.$set(this.questionForm, 'RowId', res.Result.RowId)
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionState = this.getQuestionVal(7)
|
||||
const lesionNum = this.getQuestionVal(11)
|
||||
|
||||
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, saveTypeEnum: this.questionForm.saveTypeEnum, lesionState, lesionNum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||
DicomEvent.$emit('refreshStudyListMeasureData')
|
||||
this.$emit('close')
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
DicomEvent.$emit('setMeasuredToolsPassive')
|
||||
loading.close()
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
loading.close()
|
||||
}
|
||||
})
|
||||
},
|
||||
async handleDeleteMeasureData() {
|
||||
// 是否确认清除标记?
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:reading:warnning:msg47'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
if (this.questionForm.RowId) {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 1)
|
||||
} else {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 0)
|
||||
}
|
||||
var remark = this.getLesionName(this.orderMark, this.questionForm.RowIndex)
|
||||
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, orderMarkName: remark })
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionOrgan = this.getQuestionVal(6)
|
||||
const lesionState = this.getQuestionVal(7)
|
||||
const lesionNum = this.getQuestionVal(11)
|
||||
|
||||
this.$set(this.questionForm, 'MeasureData', '')
|
||||
let anwsers = null
|
||||
if (this.answers.measureObj) {
|
||||
anwsers = Object.assign({ measureObj: '' }, this.questionForm)
|
||||
} else {
|
||||
anwsers = Object.assign({}, this.questionForm)
|
||||
}
|
||||
this.$emit('resetQuestions', { lesionPart, lesionOrgan, lesionState, lesionNum, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: anwsers })
|
||||
DicomEvent.$emit('refreshStudyListMeasureData')
|
||||
},
|
||||
async handleDelete() {
|
||||
// 是否确认删除?
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
try {
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:reading:warnning:msg48'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
if (this.questionForm.RowId) {
|
||||
var param = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionId: this.parentQsId,
|
||||
rowId: this.questionForm.RowId
|
||||
}
|
||||
const res = await deleteReadingRowAnswer(param)
|
||||
if (res.IsSuccess) {
|
||||
if (this.questionForm.MeasureData) {
|
||||
const remark = this.getLesionName(this.orderMark, this.questionForm.RowIndex)
|
||||
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, orderMarkName: remark })
|
||||
}
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
loading.close()
|
||||
} else {
|
||||
// 移除新建病灶并关闭窗口
|
||||
if (this.questionForm.MeasureData) {
|
||||
const remark = this.getLesionName(this.orderMark, this.questionForm.RowIndex)
|
||||
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, orderMarkName: remark })
|
||||
}
|
||||
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||
DicomEvent.$emit('refreshStudyListMeasureData')
|
||||
loading.close()
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
loading.close()
|
||||
}
|
||||
},
|
||||
handleClose() {
|
||||
if (!this.questionForm.RowId) {
|
||||
@@ -866,7 +881,7 @@ export default {
|
||||
this.$set(this.questionForm, stateId, 4)
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionOrgan = this.getQuestionVal(6)
|
||||
const lesionState = !isNaN(parseInt(this.getQuestionVal(7))) ? parseInt(this.getQuestionVal(7)) : ''
|
||||
const lesionState = this.getQuestionVal(7)
|
||||
this.$emit('resetQuestions', { lesionPart, lesionOrgan, lesionState, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,20 @@
|
||||
<div class="measurement-wrapper" :style="{'height':height+10+'px'}">
|
||||
|
||||
<div class="container" :style="{'height':height+'px'}">
|
||||
<h3 v-if="isReadingShowSubjectInfo" style="color: #ddd;padding: 5px 0px;margin: 0;">
|
||||
<span v-if="subjectCode">{{ subjectCode }} </span>
|
||||
<span style="margin-left:5px;">{{ taskBlindName }}</span>
|
||||
</h3>
|
||||
<div class="basic-info">
|
||||
<h3 v-if="isReadingShowSubjectInfo">
|
||||
<span v-if="subjectCode">{{ subjectCode }} </span>
|
||||
<span style="margin-left:5px;">{{ taskBlindName }}</span>
|
||||
</h3>
|
||||
<div v-if="readingTaskState < 2">
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')" placement="bottom">
|
||||
<i
|
||||
class="el-icon-refresh-left"
|
||||
@click="resetMeasuredData"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 非测量问题 -->
|
||||
<div class="lesions">
|
||||
<Questions
|
||||
@@ -101,6 +111,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { resetReadingTask } from '@/api/reading'
|
||||
import DicomEvent from './../DicomEvent'
|
||||
import Questions from './../Questions'
|
||||
import QuestionForm from './QuestionForm'
|
||||
@@ -688,6 +699,102 @@ export default {
|
||||
this.activeItem.activeRowIndex = null
|
||||
this.activeItem.activeCollapseId = null
|
||||
this.activeName = ''
|
||||
},
|
||||
getECRFQuestions(obj) {
|
||||
this.$refs['ecrf'].getQuestions(obj.visitTaskId)
|
||||
},
|
||||
async resetMeasuredData() {
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:dicomReading:message:confirmReset1'),
|
||||
this.$t('trials:dicomReading:message:confirmReset2'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
try {
|
||||
const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
// 刷新标注、表单、报告页信息
|
||||
this.activeName = ''
|
||||
this.activeItem.activeRowIndex = null
|
||||
this.activeItem.activeCollapseId = null
|
||||
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||
const triald = this.$router.currentRoute.query.trialId
|
||||
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
|
||||
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
DicomEvent.$emit('refreshStudyListMeasureData')
|
||||
}
|
||||
loading.close()
|
||||
} catch (e) {
|
||||
loading.close()
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
receiveMsg(event) {
|
||||
if (event.data.type === 'isCanActiveNoneDicomTool') {
|
||||
this.getUnSaveTarget()
|
||||
var obj = {}
|
||||
if (this.unSaveTargets.length > 0) {
|
||||
var rowIndex = String(this.unSaveTargets[0].rowIndex)
|
||||
var questionId = this.unSaveTargets[0].questionId
|
||||
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
|
||||
if (rowIndex === this.activeItem.activeRowIndex && questionId === this.activeItem.activeCollapseId && !this.$refs[refName][0].questionForm.MeasureData) {
|
||||
// 判断是否是靶病灶
|
||||
// questions.findIndex(i => i.QuestionMark === questionMark)
|
||||
var lesionType = this.$refs[refName][0].questionForm.LesionType
|
||||
if (lesionType === 0) {
|
||||
// '当前病灶为靶病灶,不允许添加标记!'
|
||||
obj = { isCanActiveTool: false, lesionName: '', reason: this.$t('trials:reading:warnning:msg18') }
|
||||
} else {
|
||||
obj = { isCanActiveTool: true, lesionName: this.$refs[refName][0].lesionMark, reason: '', toolName: event.data.toolName }
|
||||
}
|
||||
} else {
|
||||
let msg = this.$t('trials:reading:warnning:msg5')
|
||||
msg = msg.replace('xxx', this.unSaveTargets[0].lessionName)
|
||||
obj = { isCanActiveTool: false, lesionName: '', reason: msg }
|
||||
}
|
||||
} else {
|
||||
if (this.activeItem.activeCollapseId) {
|
||||
// 判断是否是靶病灶
|
||||
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
|
||||
const lesionType = this.$refs[refName][0].questionForm.LesionType
|
||||
if (lesionType === 0) {
|
||||
// 当前病灶为靶病灶,不允许添加标记!
|
||||
obj = { isCanActiveTool: false, lesionName: '', reason: this.$t('trials:reading:warnning:msg18') }
|
||||
} else {
|
||||
obj = { isCanActiveTool: true, lesionName: this.$refs[refName][0].lesionMark, reason: '', toolName: event.data.toolName }
|
||||
}
|
||||
} else {
|
||||
// 获取非靶病灶/新病灶的长度及标识
|
||||
var qsObj = null
|
||||
var lesionName = ''
|
||||
if (this.isBaseLineTask) {
|
||||
const idx = this.tableQuestions.findIndex(item => item.LesionType === 1)
|
||||
if (idx > -1) {
|
||||
qsObj = this.tableQuestions[idx]
|
||||
}
|
||||
} else {
|
||||
const idx = this.tableQuestions.findIndex(item => item.LesionType === 2)
|
||||
if (idx > -1) {
|
||||
qsObj = this.tableQuestions[idx]
|
||||
}
|
||||
}
|
||||
var maxIndex = this.getMaxRowIndex(qsObj.TableQuestions.Answers)
|
||||
lesionName = `${qsObj.OrderMark}${String(maxIndex + 1).padStart(2, '0')}`
|
||||
obj = { isCanActiveTool: true, lesionName: lesionName, reason: '', toolName: event.data.toolName }
|
||||
}
|
||||
}
|
||||
|
||||
DicomEvent.$emit('isCanActiveNoneDicomTool', obj)
|
||||
} else if (event.data.type === 'setMeasurement') {
|
||||
this.setMeasuredData(event.data.data)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -700,6 +807,22 @@ export default {
|
||||
|
||||
.container{
|
||||
padding: 10px;
|
||||
.basic-info{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
h3{
|
||||
color: #ddd;
|
||||
padding: 5px 0px;
|
||||
margin: 0;
|
||||
}
|
||||
i{
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.title{
|
||||
padding: 5px;
|
||||
|
||||
@@ -111,13 +111,17 @@
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="question.QuestionGenre === 3 && question.QuestionType === 47 && !question.IsBaseLineTask">
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value === 1 ||item.value === 3|| item.value === 4 || item.value === 5"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
<el-option-group
|
||||
:label="!isNaN(parseFloat(question.LastTaskAnswer)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${$fd(question.DictionaryCode,parseFloat(question.LastTaskAnswer))}` : ''"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value === 1 ||item.value === 3|| item.value === 4 || item.value === 5"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
</el-option-group>
|
||||
</template>
|
||||
<template v-else-if="question.QuestionGenre === 3 && question.QuestionType === 49 && question.IsBaseLineTask">
|
||||
<el-option
|
||||
@@ -129,13 +133,17 @@
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="question.QuestionGenre === 3 && question.QuestionType === 49 && !question.IsBaseLineTask">
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value === 1 ||item.value === 2 || item.value === 3 || item.value === 4 || item.value === 5"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
<el-option-group
|
||||
:label="!isNaN(parseFloat(question.LastTaskAnswer)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${$fd(question.DictionaryCode,parseFloat(question.LastTaskAnswer))}` : ''"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d[question.DictionaryCode]"
|
||||
v-show="item.value === 1 ||item.value === 2 || item.value === 3 || item.value === 4 || item.value === 5"
|
||||
:key="item.id"
|
||||
:value="String(item.value)"
|
||||
:label="item.label"
|
||||
/>
|
||||
</el-option-group>
|
||||
</template>
|
||||
<template v-else-if="question.TableQuestionType === 3 || question.QuestionGenre === 3">
|
||||
<el-option
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
/>
|
||||
|
||||
<el-form-item v-if="readingTaskState < 2 && !isFirstChangeTask">
|
||||
<div style="text-align:right">
|
||||
<div class="ecrf-footer">
|
||||
<i v-if="groupClassify === null || groupClassify === 1" class="el-icon-question feedback-icon" @click="openFeedBackTable" />
|
||||
<el-button size="mini" :disabled="!questionFormChangeState || (!formChanged && groupClassify > 0)" :type="questionFormChangeState || (!formChanged && groupClassify > 0) ? 'primary' : null" @click="handleSave">{{ $t('common:button:save') }}</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@@ -31,6 +32,7 @@
|
||||
<script>
|
||||
// import { uploadPrintscreen } from '@/api/reading'
|
||||
import { saveTaskQuestion, getSplenicState, getSplenicVerify, getCanChooseNotMerge, getDicomReadingQuestionAnswer } from '@/api/trials'
|
||||
import { setSkipReadingCache } from '@/api/reading'
|
||||
import QuestionItem from './QuestionItem'
|
||||
import DicomEvent from './DicomEvent'
|
||||
import { mapGetters } from 'vuex'
|
||||
@@ -810,6 +812,35 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
openFeedBackTable() {
|
||||
this.$FB({
|
||||
type: 'imgfail',
|
||||
trialId: this.$route.query.trialId,
|
||||
visitTaskId: this.visitTaskId,
|
||||
callBack: async() => {
|
||||
console.log('callBack')
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:reading:confirm:feedbackmsg'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await setSkipReadingCache({ visitTaskId: this.visitTaskId })
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
window.location.reload()
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
isJSONString(str) {
|
||||
try {
|
||||
JSON.stringify(JSON.parse(str))
|
||||
@@ -853,6 +884,22 @@ export default {
|
||||
.el-select{
|
||||
width: 100%;
|
||||
}
|
||||
.ecrf-footer{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
.feedback-icon{
|
||||
padding: 0 10px;
|
||||
color: #fff;
|
||||
font-weight: 400;
|
||||
font-size: 22px;
|
||||
cursor: pointer;
|
||||
&:hover{
|
||||
color: #68a2d5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,10 +2,21 @@
|
||||
<div class="measurement-wrapper" :style="{'height':height+10+'px'}">
|
||||
|
||||
<div class="container" :style="{'height':height+'px'}">
|
||||
<h3 v-if="isReadingShowSubjectInfo" style="color: #ddd;padding: 5px 0px;margin: 0;">
|
||||
<span v-if="subjectCode">{{ subjectCode }} </span>
|
||||
<span style="margin-left:5px;">{{ taskBlindName }}</span>
|
||||
</h3>
|
||||
<div class="basic-info">
|
||||
<h3 v-if="isReadingShowSubjectInfo">
|
||||
<span v-if="subjectCode">{{ subjectCode }} </span>
|
||||
<span style="margin-left:5px;">{{ taskBlindName }}</span>
|
||||
</h3>
|
||||
<div v-if="readingTaskState < 2">
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')" placement="bottom">
|
||||
<i
|
||||
class="el-icon-refresh-left"
|
||||
@click="resetMeasuredData"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 非测量问题 -->
|
||||
<div class="lesions">
|
||||
<Questions ref="ecrf" :question-form-change-state="questionFormChangeState" :question-form-change-num="questionFormChangeNum" />
|
||||
@@ -122,6 +133,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { splitLesion } from '@/api/trials'
|
||||
import { resetReadingTask } from '@/api/reading'
|
||||
import DicomEvent from './../DicomEvent'
|
||||
import store from '@/store'
|
||||
import { mapGetters } from 'vuex'
|
||||
@@ -943,6 +955,39 @@ export default {
|
||||
getECRFQuestions(obj) {
|
||||
this.$refs['ecrf'].getQuestions(obj.visitTaskId)
|
||||
},
|
||||
async resetMeasuredData() {
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:dicomReading:message:confirmReset1'),
|
||||
this.$t('trials:dicomReading:message:confirmReset2'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
try {
|
||||
const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
// 刷新标注、表单、报告页信息
|
||||
this.activeName = ''
|
||||
this.activeItem.activeRowIndex = null
|
||||
this.activeItem.activeCollapseId = null
|
||||
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||
const triald = this.$router.currentRoute.query.trialId
|
||||
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
|
||||
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
DicomEvent.$emit('refreshStudyListMeasureData')
|
||||
}
|
||||
loading.close()
|
||||
} catch (e) {
|
||||
loading.close()
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
receiveMsg(event) {
|
||||
if (event.data.type === 'isCanActiveNoneDicomTool') {
|
||||
this.getUnSaveTarget()
|
||||
@@ -1021,6 +1066,22 @@ export default {
|
||||
|
||||
.container{
|
||||
padding: 10px;
|
||||
.basic-info{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
h3{
|
||||
color: #ddd;
|
||||
padding: 5px 0px;
|
||||
margin: 0;
|
||||
}
|
||||
i{
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.title{
|
||||
padding: 5px;
|
||||
|
||||
+375
-360
@@ -110,34 +110,38 @@
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="qs.DictionaryCode && qs.QuestionMark === 7 && !isBaseLineTask">
|
||||
<!-- 首次分裂的病灶只能选择存在 -->
|
||||
<template v-if="answers.IsFristAdd=== 'True' && answers.SplitOrMergeType === '0'">
|
||||
<el-option
|
||||
v-for="item of $d[qs.DictionaryCode]"
|
||||
v-show="item.value === 0"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<!-- 首次添加的新病灶不能为无法评估和消失 -->
|
||||
<template v-else-if="isCurrentTaskAdd=== 'True' && lesionType === 2">
|
||||
<el-option
|
||||
v-for="item of $d[qs.DictionaryCode]"
|
||||
v-show="item.value === 0 || item.value === 1"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-option
|
||||
v-for="item of filterState($d[qs.DictionaryCode])"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<el-option-group
|
||||
:label="!isNaN(parseFloat(answers.LastTaskState)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${$fd(qs.DictionaryCode,parseFloat(answers.LastTaskState))}` : ''"
|
||||
>
|
||||
<!-- 首次分裂的病灶只能选择存在 -->
|
||||
<template v-if="answers.IsFristAdd=== 'True' && answers.SplitOrMergeType === '0'">
|
||||
<el-option
|
||||
v-for="item of $d[qs.DictionaryCode]"
|
||||
v-show="item.value === 0"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<!-- 首次添加的新病灶不能为无法评估和消失 -->
|
||||
<template v-else-if="isCurrentTaskAdd=== 'True' && lesionType === 2">
|
||||
<el-option
|
||||
v-for="item of $d[qs.DictionaryCode]"
|
||||
v-show="item.value === 0 || item.value === 1"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-option
|
||||
v-for="item of filterState($d[qs.DictionaryCode])"
|
||||
:key="item.id"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</template>
|
||||
</el-option-group>
|
||||
</template>
|
||||
<template v-else-if="qs.DictionaryCode && qs.QuestionMark !== 7">
|
||||
<el-option
|
||||
@@ -340,16 +344,15 @@ export default {
|
||||
await this.getOrganInfoList()
|
||||
|
||||
// 首次分裂的病灶默认状态为空时,设置默认值为存在
|
||||
if (this.answers.IsFristAdd === 'True' && this.answers.SplitOrMergeType === '0' && isNaN(parseInt(this.getQuestionVal(7)))) {
|
||||
if (this.answers.IsFristAdd === 'True' && this.answers.SplitOrMergeType === '0' && lesionState === '') {
|
||||
const stateId = this.getQuestionId(7)
|
||||
this.$set(this.questionForm, stateId, 0)
|
||||
var isLymphLesion = this.getQuestionVal(2)
|
||||
isLymphLesion = !isNaN(parseInt(isLymphLesion)) ? parseInt(isLymphLesion) : null
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionOrgan = this.getQuestionVal(6)
|
||||
const lesionLength = !isNaN(parseInt(this.getQuestionVal(0))) ? this.getQuestionVal(0) : ''
|
||||
const lesionShort = !isNaN(parseInt(this.getQuestionVal(1))) ? this.getQuestionVal(1) : ''
|
||||
const lesionState = !isNaN(parseInt(this.getQuestionVal(7))) ? parseInt(this.getQuestionVal(7)) : ''
|
||||
const lesionLength = this.getQuestionVal(0)
|
||||
const lesionShort = this.getQuestionVal(1)
|
||||
const lesionState = this.getQuestionVal(7)
|
||||
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, lesionShort, lesionState, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||
}
|
||||
this.isRender = true
|
||||
@@ -515,8 +518,8 @@ export default {
|
||||
}
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionOrgan = this.getQuestionVal(6)
|
||||
const lesionLength = !isNaN(parseInt(this.getQuestionVal(0))) ? this.getQuestionVal(0) : ''
|
||||
const lesionState = !isNaN(parseInt(this.getQuestionVal(7))) ? parseInt(this.getQuestionVal(7)) : ''
|
||||
const lesionLength = this.getQuestionVal(0)
|
||||
const lesionState = this.getQuestionVal(7)
|
||||
this.$emit('resetQuestions', { isLymphLesion: 0, lesionPart, lesionOrgan, lesionState, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||
|
||||
if (question.QuestionMark === 7) {
|
||||
@@ -575,9 +578,8 @@ export default {
|
||||
}
|
||||
|
||||
var isLymphLesion = this.getQuestionVal(2)
|
||||
isLymphLesion = !isNaN(parseInt(isLymphLesion)) ? parseInt(isLymphLesion) : null
|
||||
var lesionLength = !isNaN(parseInt(this.getQuestionVal(0))) ? this.getQuestionVal(0) : ''
|
||||
var lesionShort = !isNaN(parseInt(this.getQuestionVal(1))) ? this.getQuestionVal(1) : ''
|
||||
var lesionLength = this.getQuestionVal(0)
|
||||
var lesionShort = this.getQuestionVal(1)
|
||||
|
||||
// 当前添加的新病灶不做处理
|
||||
if (!(this.isCurrentTaskAdd === 'True')) {
|
||||
@@ -597,7 +599,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
const lesionState = !isNaN(parseInt(this.getQuestionVal(7))) ? parseInt(this.getQuestionVal(7)) : ''
|
||||
const lesionState = this.getQuestionVal(7)
|
||||
var status = ''
|
||||
if (lesionState) {
|
||||
if (this.lesionType === 0 && lesionState === 1) {
|
||||
@@ -646,8 +648,8 @@ export default {
|
||||
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionOrgan = this.getQuestionVal(6)
|
||||
const lesionL = !isNaN(parseInt(this.getQuestionVal(0))) ? this.getQuestionVal(0) : ''
|
||||
var lesionState = !isNaN(parseInt(this.getQuestionVal(7))) ? parseInt(this.getQuestionVal(7)) : ''
|
||||
const lesionL = this.getQuestionVal(0)
|
||||
var lesionState = this.getQuestionVal(7)
|
||||
this.$emit('resetQuestions', { isLymphLesion: 0, lesionPart, lesionOrgan, lesionLength: lesionL, lesionState, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||
this.toolType = measureData.type
|
||||
DicomEvent.$emit('refreshStudyListMeasureData')
|
||||
@@ -670,27 +672,31 @@ export default {
|
||||
}
|
||||
},
|
||||
getQuestionVal(questionMark) {
|
||||
var idx = this.questions.findIndex(i => i.QuestionMark === questionMark)
|
||||
const idx = this.questions.findIndex(i => i.QuestionMark === questionMark)
|
||||
if (idx > -1) {
|
||||
var questionId = this.questions[idx].Id
|
||||
return this.questionForm[questionId]
|
||||
const questionId = this.questions[idx].Id
|
||||
const answer = this.questionForm[questionId]
|
||||
if (isNaN(parseFloat(answer))) {
|
||||
return answer
|
||||
} else {
|
||||
return parseFloat(answer)
|
||||
}
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
filterState(arr) {
|
||||
if (!this.isBaseLineTask) {
|
||||
var isLymphLesion = this.getQuestionVal(2)
|
||||
isLymphLesion = !isNaN(parseInt(isLymphLesion)) ? parseInt(isLymphLesion) : null
|
||||
const lesionLength = !isNaN(parseInt(this.getQuestionVal(0))) ? this.getQuestionVal(0) : 0
|
||||
const lesionShort = !isNaN(parseInt(this.getQuestionVal(1))) ? this.getQuestionVal(1) : 0
|
||||
const lastLesionL = !isNaN(parseInt(this.answers.LastTaskMajorAxis)) ? parseInt(this.answers.LastTaskMajorAxis) : 0
|
||||
const lastLesionS = !isNaN(parseInt(this.answers.LastTaskShortAxis)) ? parseInt(this.answers.LastTaskShortAxis) : 0
|
||||
if (this.lesionType === 1 && isLymphLesion === 1 && this.questionForm.MeasureData && (this.questionForm.MeasureData.type === 'Length' || this.questionForm.MeasureData.type === 'Bidirectional') && lesionShort < lastLesionS) {
|
||||
const isLymphLesion = this.getQuestionVal(2)
|
||||
const lesionLength = this.getQuestionVal(0)
|
||||
const lesionShort = this.getQuestionVal(1)
|
||||
const bLesionL = !isNaN(parseInt(this.answers.LastTaskMajorAxis)) ? parseInt(this.answers.LastTaskMajorAxis) : 0
|
||||
const bLesionS = !isNaN(parseInt(this.answers.LastTaskShortAxis)) ? parseInt(this.answers.LastTaskShortAxis) : 0
|
||||
if (this.lesionType === 1 && isLymphLesion === 1 && this.questionForm.MeasureData && this.questionForm.MeasureData.type === 'Bidirectional' && lesionShort < bLesionS) {
|
||||
arr = arr.filter(i => i.value !== 1)
|
||||
} else if (this.lesionType === 1 && isLymphLesion === 1 && this.questionForm.MeasureData && (this.questionForm.MeasureData.type === 'Length' || this.questionForm.MeasureData.type === 'Bidirectional') && lesionShort >= 10 && lesionShort > lastLesionS) {
|
||||
} else if (this.lesionType === 1 && isLymphLesion === 1 && this.questionForm.MeasureData && this.questionForm.MeasureData.type === 'Bidirectional' && lesionShort >= 10 && lesionShort > bLesionS) {
|
||||
arr = arr.filter(i => i.value === 0 || i.value === 1)
|
||||
} else if (this.lesionType === 1 && isLymphLesion === 0 && this.questionForm.MeasureData && (this.questionForm.MeasureData.type === 'Length' || this.questionForm.MeasureData.type === 'Bidirectional') && lesionLength < lastLesionL) {
|
||||
} else if (this.lesionType === 1 && isLymphLesion === 0 && this.questionForm.MeasureData && (this.questionForm.MeasureData.type === 'Length' || this.questionForm.MeasureData.type === 'Bidirectional') && lesionLength < bLesionL) {
|
||||
arr = arr.filter(i => i.value !== 1)
|
||||
}
|
||||
return arr
|
||||
@@ -754,223 +760,224 @@ export default {
|
||||
// 生成Blob对象(文件对象)
|
||||
return new Blob([bytesCode], { type: imgtype })
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.measurementForm.validate(async valid => {
|
||||
if (!valid) return
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
var measureData = this.questionForm.MeasureData
|
||||
var lesionState = this.getQuestionVal(7)
|
||||
var lesionLength = !isNaN(parseInt(this.getQuestionVal(0))) ? this.getQuestionVal(0) : ''
|
||||
async handleSave() {
|
||||
const valid = await this.$refs.measurementForm.validate()
|
||||
if (!valid) return
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
var measureData = this.questionForm.MeasureData
|
||||
var lesionState = this.getQuestionVal(7)
|
||||
var lesionLength = this.getQuestionVal(0)
|
||||
|
||||
if (this.isBaseLineTask) {
|
||||
// 基线
|
||||
// 靶病灶且状态为存在(0)
|
||||
if (this.lesionType === 0 && lesionState === 0) {
|
||||
// 靶病灶 直径测量工具 长径须大于等于10mm且不小于2倍层厚
|
||||
if (!(measureData && measureData.type === 'Length' && lesionLength >= 10 && (measureData.thick && lesionLength >= 2 * measureData.thick || !measureData.thick))) {
|
||||
// 病灶状态为“存在”的靶病灶,长径应大于10mm且不小于2倍层厚。请使用直径测量工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg06'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 非靶病灶且状态为存在(0)
|
||||
if (this.lesionType === 1 && lesionState === 0) {
|
||||
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'RectangleRoi'))) {
|
||||
// 病灶状态为“存在”的非靶病灶,请使用直径测量工具或矩形工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg07'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 非基线
|
||||
// 靶病灶且状态为存在(0)
|
||||
if (this.lesionType === 0 && lesionState === 0) {
|
||||
if (!(measureData && measureData.type === 'Length')) {
|
||||
// `病灶状态为“存在”的靶病灶,请使用直径测量工具添加标记。`
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg08'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
// 靶病灶且状态为太小(1)
|
||||
if (this.lesionType === 0 && lesionState === 1) {
|
||||
if (!(measureData && (measureData.type === 'ArrowAnnotate'))) {
|
||||
// 病灶状态为“太小”的靶病灶,请使用箭头工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg09'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
} else if (measureData && measureData.type === 'ArrowAnnotate') {
|
||||
const lengthId = this.getQuestionId(0)
|
||||
this.$set(this.questionForm, lengthId, 5)
|
||||
lesionLength = 5
|
||||
}
|
||||
}
|
||||
|
||||
// 靶病灶且状态为无法评估(2)
|
||||
if (this.lesionType === 0 && lesionState === 2) {
|
||||
if (measureData) {
|
||||
// 病灶状态为“无法评估”的靶病灶,不需要添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg10'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 靶病灶且状态为消失(3)
|
||||
if (this.lesionType === 0 && lesionState === 3) {
|
||||
if (!(measureData && measureData.type === 'ArrowAnnotate')) {
|
||||
// 病灶状态为“消失”的靶病灶,请使用箭头工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg11'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
} else if (measureData && measureData.type === 'ArrowAnnotate') {
|
||||
const lId = this.getQuestionId(0)
|
||||
this.$set(this.questionForm, lId, 0)
|
||||
lesionLength = 0
|
||||
}
|
||||
}
|
||||
|
||||
// 非靶病灶且状态为存在(0)
|
||||
if (this.lesionType === 1 && lesionState === 0) {
|
||||
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'RectangleRoi'))) {
|
||||
// 病灶状态为“存在”的非靶病灶,请使用直径测量工具或矩形工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg12'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 非靶病灶且状态为显著增大(1)
|
||||
if (this.lesionType === 1 && lesionState === 1) {
|
||||
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'RectangleRoi'))) {
|
||||
// 病灶状态为“显著增大”的非靶病灶,请使用直径测量工具或矩形工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg13'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 非靶病灶且状态为无法评估(2)
|
||||
if (this.lesionType === 1 && lesionState === 2) {
|
||||
if (measureData) {
|
||||
// 病灶状态为“无法评估”的非靶病灶,不需要添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg14'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 非靶病灶且状态为消失(3)
|
||||
if (this.lesionType === 1 && lesionState === 3) {
|
||||
if (!(measureData && (measureData.type === 'ArrowAnnotate'))) {
|
||||
// 病灶状态为“消失”的非靶病灶,请使用箭头工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg15'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 新病灶且状态为明确(0)
|
||||
if (this.lesionType === 2 && lesionState === 0) {
|
||||
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'ArrowAnnotate'))) {
|
||||
// 病灶状态为“明确”的新病灶,请使用直径测量工具或箭头工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg16'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 新病灶且状态为疑似(1)
|
||||
if (this.lesionType === 2 && lesionState === 1) {
|
||||
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'ArrowAnnotate'))) {
|
||||
// 病灶状态为“疑似”的新病灶,请使用直径测量工具或箭头工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg17'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 新病灶且状态为无法评估(2)
|
||||
if (this.lesionType === 2 && lesionState === 2) {
|
||||
if (measureData) {
|
||||
// 病灶状态为“无法评估”的新病灶,不需要添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg18'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 新病灶且状态为消失(3)
|
||||
if (this.lesionType === 2 && lesionState === 3) {
|
||||
if (!(measureData && (measureData.type === 'ArrowAnnotate'))) {
|
||||
// 病灶状态为“消失”的新病灶,请使用箭头工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg19'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
if (this.isBaseLineTask) {
|
||||
// 基线
|
||||
// 靶病灶且状态为存在(0)
|
||||
if (this.lesionType === 0 && lesionState === 0) {
|
||||
// 靶病灶 直径测量工具 长径须大于等于10mm且不小于2倍层厚
|
||||
if (!(measureData && measureData.type === 'Length' && lesionLength >= 10 && (measureData.thick && lesionLength >= 2 * measureData.thick || !measureData.thick))) {
|
||||
// 病灶状态为“存在”的靶病灶,长径应大于10mm且不小于2倍层厚。请使用直径测量工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg06'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType, isMarked: !!measureData }, async val => {
|
||||
// 非靶病灶且状态为存在(0)
|
||||
if (this.lesionType === 1 && lesionState === 0) {
|
||||
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'RectangleRoi'))) {
|
||||
// 病灶状态为“存在”的非靶病灶,请使用直径测量工具或矩形工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg07'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 非基线
|
||||
// 靶病灶且状态为存在(0)
|
||||
if (this.lesionType === 0 && lesionState === 0) {
|
||||
if (!(measureData && measureData.type === 'Length')) {
|
||||
// `病灶状态为“存在”的靶病灶,请使用直径测量工具添加标记。`
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg08'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
// 靶病灶且状态为太小(1)
|
||||
if (this.lesionType === 0 && lesionState === 1) {
|
||||
if (!(measureData && (measureData.type === 'ArrowAnnotate'))) {
|
||||
// 病灶状态为“太小”的靶病灶,请使用箭头工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg09'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
} else if (measureData && measureData.type === 'ArrowAnnotate') {
|
||||
const lengthId = this.getQuestionId(0)
|
||||
this.$set(this.questionForm, lengthId, 5)
|
||||
lesionLength = 5
|
||||
}
|
||||
}
|
||||
|
||||
// 靶病灶且状态为无法评估(2)
|
||||
if (this.lesionType === 0 && lesionState === 2) {
|
||||
if (measureData) {
|
||||
// 病灶状态为“无法评估”的靶病灶,不需要添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg10'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 靶病灶且状态为消失(3)
|
||||
if (this.lesionType === 0 && lesionState === 3) {
|
||||
if (!(measureData && measureData.type === 'ArrowAnnotate')) {
|
||||
// 病灶状态为“消失”的靶病灶,请使用箭头工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg11'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
} else if (measureData && measureData.type === 'ArrowAnnotate') {
|
||||
const lId = this.getQuestionId(0)
|
||||
this.$set(this.questionForm, lId, 0)
|
||||
lesionLength = 0
|
||||
}
|
||||
}
|
||||
|
||||
// 非靶病灶且状态为存在(0)
|
||||
if (this.lesionType === 1 && lesionState === 0) {
|
||||
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'RectangleRoi'))) {
|
||||
// 病灶状态为“存在”的非靶病灶,请使用直径测量工具或矩形工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg12'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 非靶病灶且状态为显著增大(1)
|
||||
if (this.lesionType === 1 && lesionState === 1) {
|
||||
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'RectangleRoi'))) {
|
||||
// 病灶状态为“显著增大”的非靶病灶,请使用直径测量工具或矩形工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg13'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 非靶病灶且状态为无法评估(2)
|
||||
if (this.lesionType === 1 && lesionState === 2) {
|
||||
if (measureData) {
|
||||
// 病灶状态为“无法评估”的非靶病灶,不需要添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg14'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 非靶病灶且状态为消失(3)
|
||||
if (this.lesionType === 1 && lesionState === 3) {
|
||||
if (!(measureData && (measureData.type === 'ArrowAnnotate'))) {
|
||||
// 病灶状态为“消失”的非靶病灶,请使用箭头工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg15'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 新病灶且状态为明确(0)
|
||||
if (this.lesionType === 2 && lesionState === 0) {
|
||||
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'ArrowAnnotate'))) {
|
||||
// 病灶状态为“明确”的新病灶,请使用直径测量工具或箭头工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg16'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 新病灶且状态为疑似(1)
|
||||
if (this.lesionType === 2 && lesionState === 1) {
|
||||
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'ArrowAnnotate'))) {
|
||||
// 病灶状态为“疑似”的新病灶,请使用直径测量工具或箭头工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg17'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 新病灶且状态为无法评估(2)
|
||||
if (this.lesionType === 2 && lesionState === 2) {
|
||||
if (measureData) {
|
||||
// 病灶状态为“无法评估”的新病灶,不需要添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg18'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 新病灶且状态为消失(3)
|
||||
if (this.lesionType === 2 && lesionState === 3) {
|
||||
if (!(measureData && (measureData.type === 'ArrowAnnotate'))) {
|
||||
// 病灶状态为“消失”的新病灶,请使用箭头工具添加标记。
|
||||
this.$confirm(this.$t('trials:readingBM:warnning:msg19'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType, isMarked: !!measureData }, async val => {
|
||||
try {
|
||||
var picturePath = ''
|
||||
if (val && measureData && this.questionForm.IsDicomReading) {
|
||||
var pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, val)
|
||||
@@ -1010,7 +1017,8 @@ export default {
|
||||
await this.deleteOldLesion(this.deleteInfo.questionId, this.deleteInfo.rowId)
|
||||
this.deleteInfo = null
|
||||
}
|
||||
submitTableQuestion(params).then(async res => {
|
||||
const res = await submitTableQuestion(params)
|
||||
if (res.IsSuccess) {
|
||||
// 保存成功!
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.currentMarkTool = measureData ? measureData.type : ''
|
||||
@@ -1018,94 +1026,87 @@ export default {
|
||||
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 2)
|
||||
this.originalQuestionForm = { ...this.questionForm }
|
||||
loading.close()
|
||||
|
||||
var lesionOrgan = this.getQuestionVal(6)
|
||||
this.$set(this.questionForm, 'RowId', res.Result.RowId)
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionState = Number(this.getQuestionVal(7))
|
||||
const lesionState = this.getQuestionVal(7)
|
||||
this.$emit('resetQuestions', { isLymphLesion: 0, lesionPart, lesionOrgan, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, lesionState, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||
this.$emit('close')
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
DicomEvent.$emit('setMeasuredToolsPassive')
|
||||
}).catch(() => { loading.close() })
|
||||
})
|
||||
}
|
||||
loading.close()
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
loading.close()
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDeleteMeasureData() {
|
||||
async handleDeleteMeasureData() {
|
||||
// 是否确认清除标记?
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg47'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(async() => {
|
||||
// 重置长短径 和 状态
|
||||
var lengId = this.getQuestionId(0)
|
||||
this.$set(this.questionForm, lengId, '')
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:reading:warnning:msg47'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
// 重置长短径 和 状态
|
||||
var lengId = this.getQuestionId(0)
|
||||
this.$set(this.questionForm, lengId, '')
|
||||
|
||||
var stateId = this.getQuestionId(7)
|
||||
this.$set(this.questionForm, stateId, '')
|
||||
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断)
|
||||
if (this.questionForm.RowId) {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 1)
|
||||
} else {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 0)
|
||||
}
|
||||
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionOrgan = this.getQuestionVal(6)
|
||||
const lesionLength = ''
|
||||
const lesionState = !isNaN(parseInt(this.getQuestionVal(7))) ? parseInt(this.getQuestionVal(7)) : ''
|
||||
var stateId = this.getQuestionId(7)
|
||||
this.$set(this.questionForm, stateId, '')
|
||||
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断)
|
||||
if (this.questionForm.RowId) {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 1)
|
||||
} else {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 0)
|
||||
}
|
||||
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionOrgan = this.getQuestionVal(6)
|
||||
const lesionLength = ''
|
||||
const lesionState = this.getQuestionVal(7)
|
||||
|
||||
if (!this.questionForm.IsDicomReading) {
|
||||
DicomEvent.$emit('removeNoneDicomMeasureData', this.questionForm.MeasureData)
|
||||
}
|
||||
this.$set(this.questionForm, 'IsDicomReading', true)
|
||||
if (!this.questionForm.IsDicomReading) {
|
||||
DicomEvent.$emit('removeNoneDicomMeasureData', this.questionForm.MeasureData)
|
||||
}
|
||||
this.$set(this.questionForm, 'IsDicomReading', true)
|
||||
|
||||
this.$set(this.questionForm, 'MeasureData', '')
|
||||
let anwsers = null
|
||||
if (this.answers.measureObj) {
|
||||
anwsers = Object.assign({ measureObj: '' }, this.questionForm)
|
||||
} else {
|
||||
anwsers = Object.assign({}, this.questionForm)
|
||||
}
|
||||
this.$emit('resetQuestions', { isLymphLesion: 0, lesionPart, lesionOrgan, lesionState, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: anwsers })
|
||||
DicomEvent.$emit('refreshStudyListMeasureData')
|
||||
})
|
||||
.catch(() => {})
|
||||
this.$set(this.questionForm, 'MeasureData', '')
|
||||
let anwsers = null
|
||||
if (this.answers.measureObj) {
|
||||
anwsers = Object.assign({ measureObj: '' }, this.questionForm)
|
||||
} else {
|
||||
anwsers = Object.assign({}, this.questionForm)
|
||||
}
|
||||
this.$emit('resetQuestions', { isLymphLesion: 0, lesionPart, lesionOrgan, lesionState, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: anwsers })
|
||||
DicomEvent.$emit('refreshStudyListMeasureData')
|
||||
},
|
||||
handleDelete() {
|
||||
async handleDelete() {
|
||||
// 是否确认删除?
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg48'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(async() => {
|
||||
if (this.questionForm.RowId) {
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
var param = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionId: this.parentQsId,
|
||||
rowId: this.questionForm.RowId
|
||||
}
|
||||
deleteReadingRowAnswer(param)
|
||||
.then(async res => {
|
||||
loading.close()
|
||||
if (res.IsSuccess) {
|
||||
if (this.questionForm.IsDicomReading && this.questionForm.MeasureData) {
|
||||
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
|
||||
}
|
||||
if (!this.questionForm.IsDicomReading && this.questionForm.MeasureData) {
|
||||
DicomEvent.$emit('removeNoneDicomMeasureData', this.questionForm.MeasureData)
|
||||
}
|
||||
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
loading.close()
|
||||
}
|
||||
}).catch(() => { loading.close() })
|
||||
} else {
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
try {
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:reading:warnning:msg48'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
if (this.questionForm.RowId) {
|
||||
var param = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionId: this.parentQsId,
|
||||
rowId: this.questionForm.RowId
|
||||
}
|
||||
const res = await deleteReadingRowAnswer(param)
|
||||
if (res.IsSuccess) {
|
||||
if (this.questionForm.IsDicomReading && this.questionForm.MeasureData) {
|
||||
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
|
||||
}
|
||||
@@ -1113,26 +1114,41 @@ export default {
|
||||
DicomEvent.$emit('removeNoneDicomMeasureData', this.questionForm.MeasureData)
|
||||
}
|
||||
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
}
|
||||
DicomEvent.$emit('refreshStudyListMeasureData')
|
||||
})
|
||||
} else {
|
||||
if (this.questionForm.IsDicomReading && this.questionForm.MeasureData) {
|
||||
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
|
||||
}
|
||||
if (!this.questionForm.IsDicomReading && this.questionForm.MeasureData) {
|
||||
DicomEvent.$emit('removeNoneDicomMeasureData', this.questionForm.MeasureData)
|
||||
}
|
||||
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||
}
|
||||
DicomEvent.$emit('refreshStudyListMeasureData')
|
||||
loading.close()
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
loading.close()
|
||||
}
|
||||
},
|
||||
handleClose() {
|
||||
async handleClose() {
|
||||
if (!this.questionForm.RowId) {
|
||||
// '当前病灶为新建病灶,未保存。如果关闭窗口,将会删除病灶信息,是否继续?'
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg49'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(async() => {
|
||||
// 移除新建病灶并关闭窗口
|
||||
if (this.questionForm.MeasureData) {
|
||||
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
|
||||
}
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||
})
|
||||
.catch(() => {})
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:reading:warnning:msg49'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
if (this.questionForm.MeasureData) {
|
||||
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
|
||||
}
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
|
||||
} else {
|
||||
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断)
|
||||
|
||||
@@ -1150,13 +1166,12 @@ export default {
|
||||
if (isNaN(parseInt(lesionState)) && this.answers.IsFristAdd === 'False') {
|
||||
const stateId = this.getQuestionId(7)
|
||||
this.$set(this.questionForm, stateId, 2)
|
||||
var isLymphLesion = this.getQuestionVal(2)
|
||||
isLymphLesion = !isNaN(parseInt(isLymphLesion)) ? parseInt(isLymphLesion) : null
|
||||
const isLymphLesion = this.getQuestionVal(2)
|
||||
const lesionPart = this.getQuestionVal(8)
|
||||
const lesionOrgan = this.getQuestionVal(6)
|
||||
const lesionLength = !isNaN(parseInt(this.getQuestionVal(0))) ? this.getQuestionVal(0) : ''
|
||||
const lesionShort = !isNaN(parseInt(this.getQuestionVal(1))) ? this.getQuestionVal(1) : ''
|
||||
const lesionState = !isNaN(parseInt(this.getQuestionVal(7))) ? parseInt(this.getQuestionVal(7)) : ''
|
||||
const lesionLength = this.getQuestionVal(0)
|
||||
const lesionShort = this.getQuestionVal(1)
|
||||
const lesionState = this.getQuestionVal(7)
|
||||
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, lesionShort, lesionState, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,20 @@
|
||||
<div class="measurement-wrapper" :style="{'height':height+10+'px'}">
|
||||
|
||||
<div class="container" :style="{'height':height+'px'}">
|
||||
<h3 v-if="isReadingShowSubjectInfo" style="color: #ddd;padding: 5px 0px;margin: 0;">
|
||||
<span v-if="subjectCode">{{ subjectCode }} </span>
|
||||
<span style="margin-left:5px;">{{ taskBlindName }}</span>
|
||||
</h3>
|
||||
<div class="basic-info">
|
||||
<h3 v-if="isReadingShowSubjectInfo">
|
||||
<span v-if="subjectCode">{{ subjectCode }} </span>
|
||||
<span style="margin-left:5px;">{{ taskBlindName }}</span>
|
||||
</h3>
|
||||
<div v-if="readingTaskState < 2">
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')" placement="bottom">
|
||||
<i
|
||||
class="el-icon-refresh-left"
|
||||
@click="resetMeasuredData"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 非测量问题 -->
|
||||
<div class="lesions">
|
||||
<Questions ref="ecrf" :question-form-change-state="questionFormChangeState" :question-form-change-num="questionFormChangeNum" />
|
||||
@@ -118,6 +128,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { splitLesion } from '@/api/trials'
|
||||
import { resetReadingTask } from '@/api/reading'
|
||||
import DicomEvent from './../DicomEvent'
|
||||
|
||||
import store from '@/store'
|
||||
@@ -498,25 +509,31 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
split(rowId, questionId) {
|
||||
async split(rowId, questionId) {
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
var params = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionId: questionId,
|
||||
rowId: rowId
|
||||
}
|
||||
splitLesion(params).then(async res => {
|
||||
loading.close()
|
||||
await this.getReadingQuestionAndAnswer()
|
||||
this.$nextTick(() => {
|
||||
this.tableQuestions.forEach(item => {
|
||||
item.TableQuestions.Answers.forEach(i => {
|
||||
var refName = `${item.Id}_${i.RowIndex}`
|
||||
this.$refs[refName] && this.$refs[refName][0].initForm()
|
||||
try {
|
||||
var params = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionId: questionId,
|
||||
rowId: rowId
|
||||
}
|
||||
const res = await splitLesion(params)
|
||||
if (res.IsSuccess) {
|
||||
await this.getReadingQuestionAndAnswer()
|
||||
this.$nextTick(() => {
|
||||
this.tableQuestions.forEach(item => {
|
||||
item.TableQuestions.Answers.forEach(i => {
|
||||
var refName = `${item.Id}_${i.RowIndex}`
|
||||
this.$refs[refName] && this.$refs[refName][0].initForm()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
loading.close()
|
||||
} catch (e) {
|
||||
loading.close()
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
isCanActiveTool(toolName) {
|
||||
this.getUnSaveTarget()
|
||||
@@ -880,6 +897,39 @@ export default {
|
||||
getECRFQuestions(obj) {
|
||||
this.$refs['ecrf'].getQuestions(obj.visitTaskId)
|
||||
},
|
||||
async resetMeasuredData() {
|
||||
const confirm = await this.$confirm(
|
||||
this.$t('trials:dicomReading:message:confirmReset1'),
|
||||
this.$t('trials:dicomReading:message:confirmReset2'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
try {
|
||||
const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
// 刷新标注、表单、报告页信息
|
||||
this.activeName = ''
|
||||
this.activeItem.activeRowIndex = null
|
||||
this.activeItem.activeCollapseId = null
|
||||
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||
const triald = this.$router.currentRoute.query.trialId
|
||||
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
|
||||
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
|
||||
DicomEvent.$emit('getMeasureData')
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
DicomEvent.$emit('refreshStudyListMeasureData')
|
||||
}
|
||||
loading.close()
|
||||
} catch (e) {
|
||||
loading.close()
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
receiveMsg(event) {
|
||||
if (event.data.type === 'isCanActiveNoneDicomTool') {
|
||||
this.getUnSaveTarget()
|
||||
@@ -951,6 +1001,22 @@ export default {
|
||||
|
||||
.container{
|
||||
padding: 10px;
|
||||
.basic-info{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
h3{
|
||||
color: #ddd;
|
||||
padding: 5px 0px;
|
||||
margin: 0;
|
||||
}
|
||||
i{
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.title{
|
||||
padding: 5px;
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: ((scope.row.isLymphNodes === 1 && scope.row.QuestionMark === 1) || (scope.row.isLymphNodes === 0 && scope.row.QuestionMark === 0)) && (scope.row.LesionType === 0 || scope.row.LesionType === 5) || (scope.row.QuestionMark === 12) ? '#f66' : '#fff'}">
|
||||
<span :style="{color: ((scope.row.isLymphNodes === 1 && scope.row.QuestionMark === 1) || (scope.row.isLymphNodes === 0 && scope.row.QuestionMark === 0)) && (scope.row.LesionType === 0 || scope.row.LesionType === 5) || (scope.row.QuestionMark === 12) || scope.row.HighlightAnswerList.includes(`${scope.row.Answers[task.VisitTaskId]}`) ? '#f66' : '#fff'}" >
|
||||
<template v-if="task.VisitTaskId === visitTaskId && readingTaskState < 2 && [13,14,15,42].includes(scope.row.QuestionType)">
|
||||
<!-- 是否存在疾病(基线时可修改) -->
|
||||
<template v-if="task.IsBaseLine && scope.row.QuestionType=== 15">
|
||||
@@ -411,32 +411,38 @@ export default {
|
||||
getTableHeight() {
|
||||
this.height = window.innerHeight - 170
|
||||
},
|
||||
getReportInfo(IsCalculate) {
|
||||
async getReportInfo(IsCalculate) {
|
||||
this.loading = true
|
||||
var params = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
trialId: this.$router.currentRoute.query.trialId,
|
||||
IsCalculate: IsCalculate !== false
|
||||
}
|
||||
getReadingReportEvaluation(params).then(res => {
|
||||
this.readingTaskState = res.Result.ReadingTaskState
|
||||
this.tumorEvaluate = res.Result.CalculateResult.TumorEvaluate ? parseInt(res.Result.CalculateResult.TumorEvaluate) : null
|
||||
this.isExistDisease = res.Result.CalculateResult.IsExistDisease ? parseInt(res.Result.CalculateResult.IsExistDisease) : null
|
||||
this.answerArr = []
|
||||
this.questions = res.Result.TaskQuestions.concat()
|
||||
this.visitTaskList = res.Result.VisitTaskList
|
||||
var taskQuestions = this.getQuestions(res.Result.TaskQuestions, !this.isShowDetail, null, null)
|
||||
this.taskQuestions = []
|
||||
taskQuestions.forEach(item => {
|
||||
this.$set(this.taskQuestions, this.taskQuestions.length, item)
|
||||
})
|
||||
const tLesion = res.Result.LesionCountList.find(i => i.LesionType === 0)
|
||||
this.tLesionCount = tLesion ? tLesion.Count : 0
|
||||
const ntLesion = res.Result.LesionCountList.find(i => i.LesionType === 1)
|
||||
this.ntLesionCount = ntLesion ? ntLesion.Count : 0
|
||||
this.setScrollTop()
|
||||
try {
|
||||
var params = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
trialId: this.$router.currentRoute.query.trialId,
|
||||
IsCalculate: IsCalculate !== false
|
||||
}
|
||||
const res = await getReadingReportEvaluation(params)
|
||||
if (res.IsSuccess) {
|
||||
this.readingTaskState = res.Result.ReadingTaskState
|
||||
this.tumorEvaluate = res.Result.CalculateResult.TumorEvaluate ? parseInt(res.Result.CalculateResult.TumorEvaluate) : null
|
||||
this.isExistDisease = res.Result.CalculateResult.IsExistDisease ? parseInt(res.Result.CalculateResult.IsExistDisease) : null
|
||||
this.answerArr = []
|
||||
this.questions = res.Result.TaskQuestions.concat()
|
||||
this.visitTaskList = res.Result.VisitTaskList
|
||||
var taskQuestions = this.getQuestions(res.Result.TaskQuestions, !this.isShowDetail, null, null)
|
||||
this.taskQuestions = []
|
||||
taskQuestions.forEach(item => {
|
||||
this.$set(this.taskQuestions, this.taskQuestions.length, item)
|
||||
})
|
||||
const tLesion = res.Result.LesionCountList.find(i => i.LesionType === 0)
|
||||
this.tLesionCount = tLesion ? tLesion.Count : 0
|
||||
const ntLesion = res.Result.LesionCountList.find(i => i.LesionType === 1)
|
||||
this.ntLesionCount = ntLesion ? ntLesion.Count : 0
|
||||
this.setScrollTop()
|
||||
}
|
||||
this.loading = false
|
||||
}).catch(() => { this.loading = false })
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
setScrollTop(a) {
|
||||
setTimeout(() => {
|
||||
@@ -444,7 +450,6 @@ export default {
|
||||
if (this.$refs.reportList) {
|
||||
this.getTableHeight()
|
||||
this.$refs.reportList.bodyWrapper.scrollTop = this.$refs.reportList.bodyWrapper.scrollHeight
|
||||
this.$refs.reportList.bodyWrapper.scrollTop = this.$refs.reportList.bodyWrapper.scrollHeight
|
||||
}
|
||||
})
|
||||
}, 50)
|
||||
@@ -608,24 +613,31 @@ export default {
|
||||
}
|
||||
},
|
||||
async handleConfirm() {
|
||||
await this.handleSave(false)
|
||||
await this.verifyVisitTaskQuestions()
|
||||
var i = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||
var isBaseline = this.visitTaskList[i].IsBaseLine
|
||||
if (isBaseline) {
|
||||
this.assessmentQuestions = await this.getAdditionalAssessments()
|
||||
if (this.assessmentQuestions.length > 0) {
|
||||
this.loading = true
|
||||
try {
|
||||
await this.handleSave(false)
|
||||
await verifyVisitTaskQuestions({ visitTaskId: this.visitTaskId })
|
||||
var i = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||
var isBaseline = this.visitTaskList[i].IsBaseLine
|
||||
if (isBaseline) {
|
||||
const res = await getTaskAdditionalQuestion({ visitTaskId: this.visitTaskId })
|
||||
this.assessmentQuestions = res.Result
|
||||
if (this.assessmentQuestions.length > 0) {
|
||||
// 打开附加评估框
|
||||
this.additionalAssessmentsDig.visible = true
|
||||
this.additionalAssessmentsDig.visible = true
|
||||
} else {
|
||||
const { ImageAssessmentReportConfirmation } = const_.processSignature
|
||||
this.signCode = ImageAssessmentReportConfirmation
|
||||
this.signVisible = true
|
||||
}
|
||||
} else {
|
||||
const { ImageAssessmentReportConfirmation } = const_.processSignature
|
||||
this.signCode = ImageAssessmentReportConfirmation
|
||||
this.signVisible = true
|
||||
}
|
||||
} else {
|
||||
const { ImageAssessmentReportConfirmation } = const_.processSignature
|
||||
this.signCode = ImageAssessmentReportConfirmation
|
||||
this.signVisible = true
|
||||
this.loading = false
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
sign() {
|
||||
@@ -636,31 +648,6 @@ export default {
|
||||
this.signVisible = true
|
||||
})
|
||||
},
|
||||
// 附加评估
|
||||
getAdditionalAssessments() {
|
||||
return new Promise((resolve) => {
|
||||
this.loading = true
|
||||
getTaskAdditionalQuestion({ visitTaskId: this.visitTaskId }).then(res => {
|
||||
this.loading = false
|
||||
resolve(res.Result)
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
},
|
||||
verifyVisitTaskQuestions() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.loading = true
|
||||
verifyVisitTaskQuestions({ visitTaskId: this.visitTaskId }).then(res => {
|
||||
this.loading = false
|
||||
resolve()
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
reject()
|
||||
})
|
||||
})
|
||||
},
|
||||
handleResize() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.reportList && this.$refs.reportList.doLayout()
|
||||
@@ -675,15 +662,16 @@ export default {
|
||||
}
|
||||
},
|
||||
// 签名并确认
|
||||
signConfirm(signInfo) {
|
||||
async signConfirm(signInfo) {
|
||||
this.loading = true
|
||||
var params = {
|
||||
data: {
|
||||
visitTaskId: this.visitTaskId
|
||||
},
|
||||
signInfo: signInfo
|
||||
}
|
||||
submitDicomVisitTask(params).then(async res => {
|
||||
try {
|
||||
var params = {
|
||||
data: {
|
||||
visitTaskId: this.visitTaskId
|
||||
},
|
||||
signInfo: signInfo
|
||||
}
|
||||
const res = await submitDicomVisitTask(params)
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
if (this.$refs['signForm']) {
|
||||
@@ -699,7 +687,8 @@ export default {
|
||||
await store.dispatch('reading/setVisitTaskReadingTaskState', { visitTaskId: this.visitTaskId, readingTaskState: 2 })
|
||||
// DicomEvent.$emit('setReadingState', 2)
|
||||
await store.dispatch('reading/setCurrentReadingTaskState', 2)
|
||||
var isAutoTask = await this.getAutoTaskVal()
|
||||
const res = await getAutoCutNextTask()
|
||||
var isAutoTask = res.Result.AutoCutNextTask
|
||||
if (isAutoTask) {
|
||||
// DicomEvent.$emit('reload')
|
||||
// DicomEvent.$emit('getNextTask')
|
||||
@@ -723,19 +712,12 @@ export default {
|
||||
// DicomEvent.$emit('readingPageStateUpdate', { readingTaskState: 2 })
|
||||
}
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
if (this.$refs['signForm'] && this.$refs['signForm'].btnLoading) {
|
||||
this.$refs['signForm'].btnLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
getAutoTaskVal() {
|
||||
return new Promise((resolve, reject) => {
|
||||
getAutoCutNextTask().then(res => {
|
||||
resolve(res.Result.AutoCutNextTask)
|
||||
}).catch(() => { reject() })
|
||||
})
|
||||
}
|
||||
},
|
||||
previewDicoms(task) {
|
||||
if (this.openWindow) {
|
||||
@@ -755,7 +737,7 @@ export default {
|
||||
this.openWindow = window.open(routeData.href, '_blank')
|
||||
},
|
||||
handleSave(isPrompt) {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise(async(resolve, reject) => {
|
||||
var isBeill
|
||||
var evaluateResult = ''
|
||||
var evaluateAjustReason = ''
|
||||
@@ -805,20 +787,21 @@ export default {
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
var params = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
answers: this.answers
|
||||
}
|
||||
changeDicomReadingQuestionAnswer(params).then(res => {
|
||||
if (isPrompt) {
|
||||
try {
|
||||
var params = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
answers: this.answers
|
||||
}
|
||||
const res = await changeDicomReadingQuestionAnswer(params)
|
||||
if (res.IsSuccess && isPrompt) {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
}
|
||||
this.loading = false
|
||||
resolve()
|
||||
}).catch(() => {
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
reject()
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getWarningText() {
|
||||
@@ -935,4 +918,7 @@ export default {
|
||||
/deep/ .el-switch__label.is-active{
|
||||
color: #428bca;
|
||||
}
|
||||
.colorOfRed{
|
||||
color: #f66;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -69,18 +69,18 @@
|
||||
>
|
||||
<div class="frame_list">
|
||||
<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>
|
||||
<div>{{ instance.InstanceNumber }}</div>
|
||||
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
|
||||
</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>
|
||||
<div>{{ instance.InstanceNumber }}</div>
|
||||
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;color: #ffeb3b;" />
|
||||
</el-popover>
|
||||
@@ -622,7 +622,8 @@ export default {
|
||||
this.seriesIndex = seriesIndex
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].measureData = this.measureData
|
||||
// var dicomStatck = this.studyList[studyIndex].SeriesList[seriesIndex]
|
||||
var dicomStatck = Object.assign({},this.studyList[studyIndex].SeriesList[seriesIndex])
|
||||
var dicomStatck = Object.assign({}, this.studyList[studyIndex].SeriesList[seriesIndex])
|
||||
|
||||
dicomStatck.imageIdIndex = 0
|
||||
this.$emit('loadImageStack', dicomStatck)
|
||||
if (!series.loadStatus && series.modality !== 'SR') {
|
||||
@@ -673,12 +674,12 @@ export default {
|
||||
}
|
||||
} 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}|${idx}`)
|
||||
}
|
||||
}
|
||||
this.studyIndex = studyIndex
|
||||
this.seriesIndex = seriesIndex
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].measureData = this.measureData
|
||||
// var dicomStatck = this.studyList[studyIndex].SeriesList[seriesIndex]
|
||||
var dicomStatck = Object.assign({},this.studyList[studyIndex].SeriesList[seriesIndex])
|
||||
var dicomStatck = Object.assign({}, this.studyList[studyIndex].SeriesList[seriesIndex])
|
||||
dicomStatck.imageIds = imageIds
|
||||
dicomStatck.imageIdIndex = 0
|
||||
this.$emit('loadImageStack', dicomStatck)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user