Merge branch 'uat' into uat_us

uat_us
DESKTOP-6C3NK6N\WXS 2024-09-05 10:45:21 +08:00
commit 19e3177e23
196 changed files with 24356 additions and 12925 deletions

View File

@ -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

View File

@ -3,6 +3,7 @@
<router-view />
<div
v-show="show"
v-if="$route.matched.length > 0"
v-adaptive
@click="openI18n"
style="
@ -81,6 +82,7 @@
>
</div>
</el-drawer>
<feedBack v-if="$route.matched.length > 0" />
</div>
</template>
@ -90,10 +92,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 +115,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 +281,7 @@ textarea {
.title-logo {
height: 40px;
}
.title-logo {
height: 40px;
}
</style>

View File

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

View File

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

View File

@ -51,4 +51,10 @@ export function batchAddOrUpdateFrontInternationalization(params) {
data: params
})
}
// 获取当前版本
export function getCurrentPublishInfo() {
return request({
url: `/PublishLog/getCurrentPublishInfo`,
method: 'get'
})
}

View File

@ -160,3 +160,30 @@ export function getSubjectProgress_Export(param) {
data: param
})
}
// 导出项目列表
export function getTrialList_Export(data) {
return requestDownload({
url: `/ExcelExport/getTrialList_Export`,
responseType: 'blob',
method: 'post',
data
})
}
// 导出培训记录
export function pMTrainingRecordList_Export(data) {
return requestDownload({
url: `/ExcelExport/pMTrainingRecordList_Export`,
responseType: 'blob',
method: 'post',
data
})
}
// 导出影像指控
export function qCVisitList_Export(data) {
return requestDownload({
url: `/ExcelExport/qCVisitList_Export`,
responseType: 'blob',
method: 'post',
data
})
}

View File

@ -187,3 +187,10 @@ export function setSkipReadingCache(param) {
data: param
})
}
export function resetReadingTask(param) {
return request({
url: `/ReadingImageTask/resetReadingTask`,
method: 'post',
data: param
})
}

View File

@ -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,178 @@ export function getTrialExtralConfig(params) {
params
})
}
// 项目新增或修改dicomAE配置
export function addOrUpdateDicomAE(data) {
return request({
url: `/TrialDicomAE/addOrUpdateDicomAE`,
method: 'post',
data
})
}
// 测试dicomAE链接
export function testSCPServerConnect(data) {
return request({
url: `/TrialDicomAE/testSCPServerConnect`,
method: 'post',
data
})
}
// 获取dicomAE默认值
export function getTrialPacsConfigInfo(params) {
return request({
url: `/TrialConfig/getTrialPacsConfigInfo`,
method: 'get',
params
})
}
// 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 verifyPacsImage(data) {
return request({
url: `/Patient/verifyPacsImage`,
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 getPatientSeriesList(scpStudyId) {
return request({
url: `/Patient/getPatientSeriesList?scpStudyId=${scpStudyId}`,
method: 'get'
})
}
// 获取反馈列表
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

View File

@ -200,7 +200,7 @@ export default {
this.stack.seriesId = dicomSeries.seriesId
this.stack.seriesNumber = dicomSeries.seriesNumber
this.stack.imageIds = dicomSeries.imageIds
this.stack.currentImageIdIndex = dicomSeries.imageIdIndex ? dicomSeries.imageIdIndex : 0
this.stack.currentImageIdIndex = dicomSeries.imageIdIndex && dicomSeries.imageIdIndex < dicomSeries.imageIds.length ? dicomSeries.imageIdIndex : 0
this.stack.firstImageLoading = true
this.stack.description = dicomSeries.description
this.toolState.viewportInvert = false

View File

@ -405,7 +405,8 @@ export default {
loadImageStack(dicomSeries) {
this.currentDicomCanvas.toolState.clipPlaying = false
this.$nextTick(() => {
this.currentDicomCanvas.loadImageStack(dicomSeries)
let series = Object.assign({}, dicomSeries)
this.currentDicomCanvas.loadImageStack(series)
})
},
loadOtherImageStack(seriesList) {
@ -415,7 +416,8 @@ export default {
Array.from(elements).forEach((element, index) => {
const canvasIndex = element.getAttribute('data-index')
if (index < seriesList.length && element.style.display !== 'none') {
this.$refs[`dicomCanvas${canvasIndex}`].loadImageStack(seriesList[index])
let series = Object.assign({}, seriesList[index])
this.$refs[`dicomCanvas${canvasIndex}`].loadImageStack(series)
}
})
})

View File

@ -2,12 +2,13 @@ import Vue from "vue";
import MFACOMP from "./index.vue";
const MFAConstructor = Vue.extend(MFACOMP);
let MFAINSTANCELIST = [];
const MFA = options => {
const { UserId, username, EMail, callBack, cancelBack, status = 'login' } = options;
if (!UserId) throw `UserId is requred.but ${UserId}`
const id = `MFA${new Date().getTime()}`;
const instance = new MFAConstructor();
MFAINSTANCELIST.push(instance)
instance.id = id;
instance.vm = instance.$mount();
if (instance.vm.visible) return;
@ -20,7 +21,17 @@ const MFA = options => {
if (cancelBack) cancelBack();
document.body.removeChild(instance.vm.$el);
instance.vm.$destroy();
let index = MFAINSTANCELIST.findIndex(item => item.id === id);
MFAINSTANCELIST.splice(index, 1)
});
return instance.vm;
}
MFA.close = () => {
if (MFAINSTANCELIST.length <= 0) return;
MFAINSTANCELIST.forEach(item => {
document.body.removeChild(item.vm.$el);
item.vm.$destroy();
})
MFAINSTANCELIST = [];
}
export default MFA;

View File

@ -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() {

View File

@ -15,7 +15,7 @@
accept=".pdf"
>
<el-button size="small" type="primary" :disabled="btnDisabled || $route.query.ReviewStatus === '1'" >{{ $t('system:GcpCertificate:upload:Upload') }}</el-button>
<span slot="tip" class="el-upload__tip">{{$t('system:GcpCertificate:tap:must2') }}</span>
<span slot="tip" class="el-upload__tip">{{$t('system:tip:file:pdf') }}</span>
</el-upload>
</div>
</template>

View File

@ -0,0 +1,37 @@
import Vue from "vue";
import FEEDBACKCOMP from "./index.vue";
const FBConstructor = Vue.extend(FEEDBACKCOMP);
let FBCINSTANCELIST = [];
const FB = options => {
const { type, callBack, cancelBack, trialId = null, Id = null, visitTaskId = null, SubjectVisitId = null } = options;
if (!type) throw `type is requred.but ${type}`
const id = `FB${new Date().getTime()}`;
const instance = new FBConstructor();
FBCINSTANCELIST.push(instance);
instance.id = id;
instance.vm = instance.$mount();
if (instance.vm.visible) return;
document.body.appendChild(instance.vm.$el);
instance.vm.open({ type, trialId, Id, visitTaskId, SubjectVisitId });
instance.vm.$on("success", (Id) => {
if (callBack) callBack();
});
instance.vm.$on("closed", () => {
document.body.removeChild(instance.vm.$el);
instance.vm.$destroy();
let index = FBCINSTANCELIST.findIndex(item => item.id === id);
FBCINSTANCELIST.splice(index, 1)
if (cancelBack) cancelBack()
});
return instance.vm;
}
FB.close = () => {
if (FBCINSTANCELIST.length <= 0) return;
FBCINSTANCELIST.forEach(item => {
document.body.removeChild(item.vm.$el);
item.vm.$destroy();
})
FBCINSTANCELIST = [];
}
export default FB;

View File

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

View File

@ -0,0 +1,416 @@
<template>
<!--FEEDBACK-->
<div v-if="visible" @click.stop="() => false" class="feedBack-box">
<div class="feedBack-box-modal"></div>
<el-dialog
:visible.sync="visible"
v-dialogDrag
width="800px"
:close-on-click-modal="false"
@close="cancel"
:modal="false"
>
<div slot="title">
{{ title }}
</div>
<!-- 项目详情 -->
<div class="trialsBox" v-if="visitTaskId || SubjectVisitId">
<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.SubjectCode }} - {{ 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%"
popper-class="feedBack-select-box"
>
<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"
:isUpload.sync="loading"
:trialId="trialId"
: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,
SubjectVisitId: 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",
},
],
},
isUpload: false,
};
},
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, SubjectVisitId } = data;
this.type = type;
this.trialId = trialId;
this.Id = Id;
this.visitTaskId = visitTaskId;
this.SubjectVisitId = SubjectVisitId;
if (visitTaskId) {
this.isImgfail = true;
}
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.SubjectVisitId) {
this.form.SubjectVisitId = this.SubjectVisitId;
}
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();
this.getInfo(this.Id, this.visitTaskId);
}
} 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;
}
if (res.Result.SubjectVisitId) {
this.SubjectVisitId = res.Result.SubjectVisitId;
}
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>

View File

@ -0,0 +1,252 @@
<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 }" style="width: 100%; height: 100%">
<viewer
:ref="file.url"
:images="fileList"
style="
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
"
>
<img
class="el-upload-list__item-thumbnail"
:src="`${file.url}`"
alt=""
crossorigin="anonymous"
style="max-width: 100%; max-height: 100%"
/>
<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,
},
isUpload: {
required: true,
default: false,
},
trialId: {
type: String,
default: "",
},
},
data() {
return {
fileList: [],
btnDisabled: 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 defaultPath = "/System/FeedBack/";
if (this.trialId) {
defaultPath = `/${this.trialId}/FeedBack/`;
}
let res = await this.OSSclient.put(`${defaultPath}${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.$emit("update:isUpload", true);
this.btnDisabled = true;
this.fileList.push({
url: param.file.url,
path: fileName,
uid: param.file.uid,
});
let file = await this.fileToBlob(param.file);
let res = await this.uploadToOSS(fileName, file);
this.btnDisabled = false;
let index = this.fileList.findIndex(
(item) => item.uid === param.file.uid
);
if (!res) {
if (index >= 0) {
this.fileList.splice(index, 1);
}
return this.$emit("update:isUpload", false);
}
this.fileList[index].url = this.OSSclientConfig.basePath + res.name;
this.fileList[index].path = res.name;
this.$emit("update:path", [...this.path, res.name]);
this.$emit("update: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;
}
.el-upload-list--picture-card .el-upload-list__item-thumbnail {
width: auto;
height: auto;
}
</style>

View File

@ -0,0 +1,35 @@
import Vue from "vue";
import FEEDBACKCOMP from "./index.vue";
const FBConstructor = Vue.extend(FEEDBACKCOMP);
let FBCTABLEINSTANCELIST = [];
const FBT = (options = {}) => {
const { data = {}, callBack } = options;
// if (!UserId) throw `UserId is requred.but ${UserId}`
const id = `FB${new Date().getTime()}`;
const instance = new FBConstructor();
FBCTABLEINSTANCELIST.push(instance);
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) => {
if (callBack) callBack();
});
instance.vm.$on("closed", () => {
document.body.removeChild(instance.vm.$el);
instance.vm.$destroy();
let index = FBCTABLEINSTANCELIST.findIndex(item => item.id === id);
FBCTABLEINSTANCELIST.splice(index, 1)
});
return instance.vm;
}
FBT.close = () => {
if (FBCTABLEINSTANCELIST.length <= 0) return;
FBCTABLEINSTANCELIST.forEach(item => {
document.body.removeChild(item.vm.$el);
item.vm.$destroy();
})
FBCTABLEINSTANCELIST = [];
}
export default FBT;

View File

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

View File

@ -0,0 +1,62 @@
<template>
<div v-if="visible" @click.stop="() => false" class="feedBack-box">
<el-dialog
:visible.sync="visible"
v-dialogDrag
width="1200px"
:close-on-click-modal="false"
@close="cancel"
:fullscreen="true"
>
<div slot="title">
{{ title }}
</div>
<feedBackTable :trialId="trialId" @success="success" />
</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")}`;
}
},
success() {
this.$emit("success");
},
},
};
</script>
// <style lang="scss" scoped>
// ::v-deep .el-dialog__body {
// padding-bottom: 0;
// height: 500px;
// }
//
</style>

View File

@ -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>

View File

@ -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>

View File

@ -1,180 +0,0 @@
<template>
<div style="text-align: center">
<div style="display: flex;justify-content: center">
<video v-if="videoSrc" id="video" controls crossorigin="anonymous" width="400" height="270"">
<source :src="videoSrc" type="video/mp4">
无法播放请点击转码
</video>
<div v-else style="border:2px dashed #999;border-radius: 10px;cursor:pointer;width:400px;height:270px;display: flex;justify-content: center;align-items: center" @click="$refs.fileInput.click()">
请选择视频文件
</div>
</div>
<input v-show="false" ref="fileInput" type="file" accept="video/*" @change="fileChange">
<div v-if="isVideoToMp4" style="display: flex;align-items: center;justify-content: right;margin-top: 10px;">
<div>转码进度: </div>
<el-progress style="width: 200px" :percentage="percentage" :format="() => {return percentage + '%'}" />
</div>
<div style="margin-top: 10px;display: flex;justify-content: right;align-items: center">
<el-button size="small" type="primary" :disabled="isVideoToMp4 || isDisabled" @click="$refs.fileInput.click()"></el-button>
<el-button v-if="isNeedToMp4" size="small" type="primary" :disabled="(videoSrc ? false : true) || isVideoToMp4 || isDisabled" @click="videoToMp4"></el-button>
<el-button size="small" type="primary" :disabled="(videoSrc ? false : true) || isVideoToMp4 || isDisabled" @click="upload"></el-button>
</div>
</div>
</template>
<script>
import { createFFmpeg, fetchFile } from '@ffmpeg/ffmpeg'
const ffmpeg = createFFmpeg({
log: true,
corePath: './ffmpeg-core.js'
})
export default {
props: {
},
data() {
return {
isDisabled: false,
imgList: [],
fileObj: null,
videoList: [],
videoSrc: null,
file: null,
dataBuffer: null,
percentage: 0,
isVideoToMp4: false,
isNeedToMp4: false
}
},
watch: {
},
mounted() {
},
methods: {
async uploadVideo(objectName, file) {
try {
this.isDisabled = true
const result = await this.OSSclient.put(objectName, file)
this.$emit('uploadOver', true, result, this.file.name)
} catch (e) {
console.log(e)
this.isDisabled = false
this.$emit('uploadOver', false)
}
},
upload() {
if (document.querySelector('#video').readyState === 0 && document.querySelector('#video').buffered.length === 0) {
this.$alert(this.$t('components:uploadvideo:message:xf2'))
this.isNeedToMp4 = true
return
}
this.uploadVideo(`file/videofile/${this.file.name.split('.')[0]}${new Date().getTime()}.mp4`, this.dataBuffer)
},
async videoToMp4() {
//
// https
if (!window.isSecureContext) {
this.$alert(this.$t('components:uploadvideo:message:xf3'))
return
}
//
if (!window.crossOriginIsolated) {
this.$alert(this.$t('components:uploadvideo:message:xf4'))
return
}
this.$message.success(this.$t('components:uploadvideo:message:xf5'))
if (!ffmpeg.isLoaded()) {
await ffmpeg.load()
}
this.percentage = 0
this.isVideoToMp4 = true
ffmpeg.setProgress(({ ratio }) => {
console.log(ratio)
if (ratio * 100 < 1) {
this.percentage = parseInt(0)
} else {
this.percentage = parseInt(ratio * 100)
}
})
ffmpeg.FS('writeFile', 'input.mp4', await fetchFile(this.videoSrc))
await ffmpeg.run('-i', 'input.mp4', 'output.mp4')
this.videoSrc = null
const data = ffmpeg.FS('readFile', 'output.mp4')
this.dataBuffer = new Blob([data.buffer], { type: 'video/mp4' })
this.$message.success(this.$t('components:uploadvideo:message:xf6'))
setTimeout(() => {
this.videoSrc = URL.createObjectURL(this.dataBuffer)
this.isVideoToMp4 = false
this.isNeedToMp4 = false
process.exit(0)
}, 50)
},
fileChange(e) {
this.videoSrc = null
const files = e.target.files || e.dataTransfer.files
this.file = files[0]
var reader = new FileReader()
reader.readAsArrayBuffer(this.file)
reader.onloadend = async(e) => {
this.dataBuffer = new Blob([e.target.result], { type: 'video/mp4' })
this.videoSrc = URL.createObjectURL(this.dataBuffer)
this.$message.success(this.$t('components:uploadvideo:message:xf7'))
e.target.files = []
}
},
deleteimg(index) {
this.imgList.splice(index, 1)
},
jietu() {
this.screenShot('video')
},
screenShot(id) {
var player = document.getElementById(id)
var canvas = document.createElement('canvas')
var img = document.createElement('img')
canvas.width = player.videoWidth
canvas.height = player.videoHeight
canvas.getContext('2d').drawImage(player, 0, 0, canvas.width, canvas.height)
var dataURL = canvas.toDataURL('image/png')
img.src = dataURL
img.width = player.clientWidth
img.height = player.clientHeight
img.style.objectFit = 'contain'
this.imgList.push(dataURL)
},
downFile(data, fileName) {
var save_link = document.createElementNS(
'http://www.jumi.com',
'a'
)
save_link.href = data
save_link.download = fileName
var event = document.createEvent('MouseEvents')
event.initMouseEvent(
'click',
true,
false,
window,
0,
0,
0,
0,
0,
false,
false,
false,
false,
0,
null
)
save_link.dispatchEvent(event)
}
}
}
</script>
<style lang='scss'>
#cutImage{
img{
}
}
</style>

View File

@ -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>

View File

@ -1,10 +1,9 @@
import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
// import { createVersionPolling } from "@/utils/version-polling.esm.js";
import ElementUI, { MessageBox } from 'element-ui'
import { getBasicDataAllSelect, getFrontInternationalizationList } from '@/api/dictionary/dictionary'
import { sendMFAEmail } from "@/api/user.js";
import { getBasicDataAllSelect, getFrontInternationalizationList, getCurrentPublishInfo } from '@/api/dictionary/dictionary'
import { resetReadingRestTime } from '@/api/trials/reading'
// import 'element-ui/lib/theme-chalk/index.css'
import './assets/css/theme-blue/index.css' // 浅绿色主题
@ -60,6 +59,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 +189,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) => {
@ -301,7 +307,7 @@ async function VueInit() {
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
setInterval(() => {
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchDetail_m' || _vm.$route.path === '/researchLogin_m' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
return
}
if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) {
@ -358,10 +364,14 @@ 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'
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') {
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 === '/researchDetail_m' || _vm.$route.path === '/researchLogin_m' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
count = 0;
localStorage.setItem('count', '0')
return
@ -371,6 +381,9 @@ async function VueInit() {
if (_vm.$msgbox) {
_vm.$msgbox.close();
}
_vm.$FB.close();
_vm.$FBT.close();
_vm.$MFA.close();
isOpen = false
isLock = null
zzSessionStorage.removeItem('isLock')
@ -387,7 +400,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 === '/researchDetail_m' || _vm.$route.path === '/researchLogin_m' || _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') {
@ -518,5 +531,21 @@ async function VueInit() {
} : () => { }, process.env.VUE_APP_LOCK_FOR_TIME)
}
VueInit()
// createVersionPolling({
// appETagKey: "__APP_ETAG__",
// pollingInterval: 5 * 60 * 1000, // 单位为毫秒
// silent: process.env.NODE_ENV === false, // 开发环境下不检测
// onUpdate: (self) => {
// // 当检测到有新版本时,执行的回调函数,可以在这里提示用户刷新页面
// const result = confirm(_vm.$t("versionPolling:tip"));
// if (result) {
// self.onRefresh();
// } else {
// self.onCancel();
// }
// // 强制更新可以用alert
// // alert('有新版本,请刷新页面');
// },
// });

View File

@ -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()

View File

@ -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'),

View File

@ -9,6 +9,10 @@ const getDefaultState = () => {
studyListQuery: null,
unlock: false,
config: {},
uploadTip: null,
timer: null,
whiteList: [],
checkTaskId: null
}
}

View File

@ -9,7 +9,7 @@ body {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
// font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;
// font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
// "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
@ -52,6 +52,7 @@ a:hover {
div:focus {
outline: none;
}
body .el-table th.gutter {
display: table-cell !important;
}
@ -66,6 +67,7 @@ body .el-table th.gutter {
height: 0;
}
}
.el-loading-mask {
background-color: rgba(255, 255, 255, 0.5);
}
@ -80,6 +82,7 @@ body .el-table th.gutter {
.table-container {
height: calc(100% - 100px);
}
// .pagination-container{
// text-align: right;
// }
@ -92,10 +95,12 @@ body .el-table th.gutter {
border-left: 3px solid #0fc8e0;
font-size: 13px;
margin-bottom: 10px;
p {
margin: 0;
padding-left: 5px;
}
.add {
position: absolute;
right: 10px;
@ -104,9 +109,11 @@ body .el-table th.gutter {
margin-top: -15px;
}
}
.el-dialog__body {
padding: 0 10px;
}
.el-date-editor.el-input,
.el-date-editor.el-input__inner,
.el-select {
@ -114,167 +121,232 @@ body .el-table th.gutter {
}
}
}
.data-list {
display: flex;
flex-direction: column;
flex: 1;
.toolbar {
display: flex;
}
.data-table {
flex: 1;
padding: 5px 0px;
}
.pagination {
height: 32px;
text-align: right;
}
}
.is-fullscreen{
.el-dialog__headerbtn{
top:10px;
.is-fullscreen {
.el-dialog__headerbtn {
top: 10px;
font-size: 30px;
}
.el-dialog__body{
.el-dialog__body {
height: calc(100% - 70px);
padding: 0 20px;
.base-modal-body{
.base-modal-body {
padding: 10px 20px;
height: 100%;
overflow-y: auto;
}
}
.el-dialog__footer{
.el-dialog__footer {
padding: 10px;
}
.link-breadcrumb{
.link-breadcrumb {
cursor: pointer;
color: #428bca;
}
}
.base-dialog-wrapper{
.el-dialog__header{
.base-dialog-wrapper {
.el-dialog__header {
padding: 15px;
}
.base-dialog-body{
.base-dialog-body {
border: 1px solid #e0e0e0;
padding:10px;
max-height:600px;
padding: 10px;
max-height: 600px;
overflow-y: auto;
}
.base-dialog-footer{
text-align:right;
margin-top:10px;
.base-dialog-footer {
text-align: right;
margin-top: 10px;
}
.el-dialog__body{
padding:10px;
.el-dialog__body {
padding: 10px;
}
.el-dialog__footer{
padding: 10px;
.el-dialog__footer {
padding: 10px;
}
}
.el-descriptions{
box-sizing:border-box;
font-size:14px;
color:#303133
.el-descriptions {
box-sizing: border-box;
font-size: 14px;
color: #303133
}
.el-descriptions__header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:20px
.el-descriptions__header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px
}
.el-descriptions__title{
font-size:16px;
font-weight:700
.el-descriptions__title {
font-size: 16px;
font-weight: 700
}
.el-descriptions__body{
color:#606266;
background-color:#fff
.el-descriptions__body {
color: #606266;
background-color: #fff
}
.el-descriptions__body .el-descriptions__table{
border-collapse:collapse;
width:100%;
table-layout:fixed
.el-descriptions__body .el-descriptions__table {
border-collapse: collapse;
width: 100%;
table-layout: fixed
}
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell{
box-sizing:border-box;
text-align:left;
font-weight:400;
line-height:1.5
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell {
box-sizing: border-box;
text-align: left;
font-weight: 400;
line-height: 1.5
}
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell.is-left{
text-align:left
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell.is-left {
text-align: left
}
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell.is-center{
text-align:center
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell.is-center {
text-align: center
}
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell.is-right{
text-align:right
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell.is-right {
text-align: right
}
.el-descriptions .is-bordered{
table-layout:auto
.el-descriptions .is-bordered {
table-layout: auto
}
.el-descriptions .is-bordered .el-descriptions-item__cell{
border:1px solid #ebeef5;
padding:12px 10px
.el-descriptions .is-bordered .el-descriptions-item__cell {
border: 1px solid #ebeef5;
padding: 12px 10px
}
.el-descriptions :not(.is-bordered) .el-descriptions-item__cell{
padding-bottom:12px
.el-descriptions :not(.is-bordered) .el-descriptions-item__cell {
padding-bottom: 12px
}
.el-descriptions--medium.is-bordered .el-descriptions-item__cell{
padding:10px
.el-descriptions--medium.is-bordered .el-descriptions-item__cell {
padding: 10px
}
.el-descriptions--medium:not(.is-bordered) .el-descriptions-item__cell{
padding-bottom:10px
.el-descriptions--medium:not(.is-bordered) .el-descriptions-item__cell {
padding-bottom: 10px
}
.el-descriptions--small{
font-size:12px
.el-descriptions--small {
font-size: 12px
}
.el-descriptions--small.is-bordered .el-descriptions-item__cell{
padding:8px 10px
.el-descriptions--small.is-bordered .el-descriptions-item__cell {
padding: 8px 10px
}
.el-descriptions--small:not(.is-bordered) .el-descriptions-item__cell{
padding-bottom:8px
.el-descriptions--small:not(.is-bordered) .el-descriptions-item__cell {
padding-bottom: 8px
}
.el-descriptions--mini{
font-size:12px
.el-descriptions--mini {
font-size: 12px
}
.el-descriptions--mini.is-bordered .el-descriptions-item__cell{
padding:6px 10px
.el-descriptions--mini.is-bordered .el-descriptions-item__cell {
padding: 6px 10px
}
.el-descriptions--mini:not(.is-bordered) .el-descriptions-item__cell{
padding-bottom:6px
.el-descriptions--mini:not(.is-bordered) .el-descriptions-item__cell {
padding-bottom: 6px
}
.el-descriptions-item{
vertical-align:top
.el-descriptions-item {
vertical-align: top
}
.el-descriptions-item__container{
display:flex
.el-descriptions-item__container {
display: flex
}
.el-descriptions-item__container .el-descriptions-item__content,.el-descriptions-item__container .el-descriptions-item__label{
display:inline-flex;
align-items:baseline
.el-descriptions-item__container .el-descriptions-item__content,
.el-descriptions-item__container .el-descriptions-item__label {
display: inline-flex;
align-items: baseline
}
.el-descriptions-item__container .el-descriptions-item__content{
flex:1
.el-descriptions-item__container .el-descriptions-item__content {
flex: 1
}
.el-descriptions-item__label.has-colon:after{
content:":";
position:relative;
top:-.5px
.el-descriptions-item__label.has-colon:after {
content: ":";
position: relative;
top: -.5px
}
.el-descriptions-item__label.is-bordered-label{
font-weight:700;
color:#909399;
background:#fafafa
.el-descriptions-item__label.is-bordered-label {
font-weight: 700;
color: #909399;
background: #fafafa
}
.el-descriptions-item__label:not(.is-bordered-label){
margin-right:10px
.el-descriptions-item__label:not(.is-bordered-label) {
margin-right: 10px
}
.el-descriptions-item__content{
word-break:break-word;
overflow-wrap:break-word
.el-descriptions-item__content {
word-break: break-word;
overflow-wrap: break-word
}
.feedBack-box {
.el-dialog__wrapper {
z-index: 3999 !important;
}
}
.feedBack-select-box {
z-index: 4000 !important;
}
.feedBack-box-modal {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: .5;
background: #000;
z-index: 3999;
}
.el-message-box__wrapper{
z-index: 9999 !important;
}

View File

@ -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) => {

View File

@ -27,7 +27,7 @@ service.interceptors.request.use(
}
try {
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
if (!path || path === '/ReviewersResearchForm' || path === '/ReviewersResearch' || path === '/login' || path === '/researchForm' || path === '/researchLogin' || path === '/email-recompose' || path === '/recompose' || path === '/resetpassword' || path === '/error') {
if (!path || path === '/ReviewersResearchForm' || path === '/ReviewersResearch' || path === '/login' || path === '/researchForm' || path === '/researchDetail_m' || path === '/researchLogin_m' || path === '/researchLogin' || path === '/email-recompose' || path === '/recompose' || path === '/resetpassword' || path === '/error') {
return config
}
if (store.state.user.userId !== zzSessionStorage.getItem('userId')) {

View File

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

View File

@ -0,0 +1,222 @@
/*!
* version-polling v1.2.6
* (c) 2023 JoeshuTT
* @license MIT
*/
function _defineProperty(obj, key, value) {
key = _toPropertyKey(key);
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _toPrimitive(input, hint) {
if (typeof input !== "object" || input === null) return input;
var prim = input[Symbol.toPrimitive];
if (prim !== undefined) {
var res = prim.call(input, hint || "default");
if (typeof res !== "object") return res;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (hint === "string" ? String : Number)(input);
}
function _toPropertyKey(arg) {
var key = _toPrimitive(arg, "string");
return typeof key === "symbol" ? key : String(key);
}
/**
* 是否有值
* @param {*} val
*/
/**
* 创建一个 Web Work 实例
* @param func
*/
function createWorker(func) {
const blob = new Blob(["(" + func.toString() + ")()"]);
const url = window.URL.createObjectURL(blob);
const worker = new Worker(url);
window.URL.revokeObjectURL(url);
return worker;
}
function createWorkerFunc() {
let timerId = null;
let options;
self.onmessage = event => {
let code = event.data["code"];
options = Object.assign({}, options, event.data["data"]);
const {
htmlFileUrl,
lastEtag,
appETagKey,
pollingInterval,
silentPollingInterval
} = options;
const runReq = () => {
fetch(htmlFileUrl, {
method: "HEAD",
cache: "no-cache"
}).then(response => {
if (Number(response.status) !== 200) {
return;
}
const etag = response.headers.get("etag");
if (lastEtag !== etag) {
self.postMessage({
appETagKey,
lastEtag,
etag
});
}
});
};
const startPollingTask = () => {
timerId = setInterval(runReq, pollingInterval);
};
const pausePollingTask = () => {
if (timerId) {
clearInterval(timerId);
timerId = null;
}
};
if (code === "pause") {
pausePollingTask();
} else {
runReq(); // 立即执行一次
if (!silentPollingInterval) {
startPollingTask();
}
}
};
return self;
}
function closeWorker(worker) {
worker.terminate();
}
let APP_ETAG_KEY = "__APP_ETAG__";
let myWorker;
const defaultOptions = {
appETagKey: APP_ETAG_KEY,
pollingInterval: 5 * 60 * 1000,
htmlFileUrl: `${location.origin}${location.pathname}`,
silent: false,
silentPollingInterval: false,
silentPageVisibility: false,
forceUpdate: false
};
let attached = false;
/**
* 页面隐藏时停止轮询任务页面再度可见时在继续
*/
function handleVisibilityChange() {
if (document.visibilityState === "visible") {
myWorker.postMessage({
code: "resume"
});
} else {
myWorker.postMessage({
code: "pause"
});
}
}
class VersionPolling {
constructor(options) {
_defineProperty(this, "options", void 0);
_defineProperty(this, "appEtag", "");
this.options = Object.assign({}, defaultOptions, options);
this.init();
}
async init() {
const {
htmlFileUrl
} = this.options;
if (!htmlFileUrl) {
throw new Error("[version-polling]: htmlFileUrl is required");
}
const response = await fetch(htmlFileUrl, {
method: "HEAD",
cache: "no-cache"
});
if (Number(response.status) !== 200) {
throw new Error(`[version-polling]: status is ${response.status}`);
}
const etag = response.headers.get("etag");
// eslint-disable-next-line no-eq-null
if (etag == null) {
throw new Error(`[version-polling]: etag is null`);
}
this.appEtag = etag;
localStorage.setItem(`${this.options.appETagKey}`, etag);
this.start();
}
start() {
const {
appETagKey,
pollingInterval,
htmlFileUrl,
silent,
silentPollingInterval,
silentPageVisibility
} = this.options;
if (silent) {
return;
}
myWorker = createWorker(createWorkerFunc);
myWorker.postMessage({
code: "start",
data: {
appETagKey,
pollingInterval,
htmlFileUrl,
silentPollingInterval,
lastEtag: this.appEtag
}
});
myWorker.onmessage = event => {
const {
lastEtag,
etag
} = event.data;
if (lastEtag !== etag) {
this.stop();
this.options.onUpdate(this);
}
};
if (!silentPageVisibility) {
if (!attached) {
document.addEventListener("visibilitychange", handleVisibilityChange);
attached = true;
}
}
}
stop() {
if (myWorker) {
closeWorker(myWorker);
if (attached) {
document.removeEventListener("visibilitychange", handleVisibilityChange);
attached = false;
}
}
}
onRefresh() {
window.location.reload();
}
onCancel() {
this.options.forceUpdate && this.start();
}
}
function createVersionPolling(options) {
const versionPolling = new VersionPolling(options);
return versionPolling;
}
export { VersionPolling, createVersionPolling };

View File

@ -2,7 +2,7 @@
<div class="status-info">
<el-form :inline="true" :model="basicInfo" class="demo-form-inline" size="small">
<el-row>
<el-col :span="6">
<!-- <el-col :span="6">
<el-form-item :label="$t('resumeInfo:label:Pending')">
<span v-if="statusList.Submitted" style="color:#428bca">
<router-link
@ -42,7 +42,7 @@
</span>
<span v-else>{{ statusList.Reading }}</span>
</el-form-item>
</el-col>
</el-col> -->
<el-col :span="6">
<el-form-item :label="$t('resumeInfo:label:Vacation')">
<span style="font-size:12px;margin-right:20px;">{{ holiday }}</span>

View File

@ -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>
@ -63,20 +64,22 @@
import * as dicomParser from 'dicom-parser'
import * as cornerstone from 'cornerstone-core'
import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
import dicomStore from '@/utils/dicom-store'
// import dicomStore from '@/utils/dicom-store'
import dicomViewer from '@/components/Dicom/DicomViewer'
import dicomPreview from '@/components/Dicom/DicomPreview'
var config = {
maxWebWorkers: 4,
startWebWorkersOnDemand: true,
taskConfiguration: {
decodeTask: {
initializeCodecsOnStartup: false
}
}
}
cornerstoneWADOImageLoader.webWorkerManager.initialize(config)
cornerstoneWADOImageLoader.external.dicomParser = dicomParser
cornerstoneWADOImageLoader.external.cornerstone = cornerstone
// cornerstoneWADOImageLoader.webWorkerManager.initialize({
// webWorkerPath: './webWorker.js',
// taskConfiguration: {
// decodeTask: {
// codecsPath: './dicomCodecs.js'
// }
// }
// })
export default {
components: {
dicomViewer,
@ -89,6 +92,7 @@ export default {
},
studyList: {
type: Array,
// eslint-disable-next-line vue/require-valid-default-prop
default: []
}
},
@ -131,8 +135,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 +158,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 +261,7 @@ export default {
text-align: center;
background: rgb(88 84 83);
color: #d0d0d0;
padding: 2px;
padding: 5px;
}
.ps {

View File

@ -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
@ -140,11 +138,21 @@ import * as cornerstone from 'cornerstone-core'
import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
import dicomViewer from '@/components/Dicom/DicomViewer'
import { getStudyInfo, getSeriesList } from '@/api/reading'
import { getInstanceList, setSeriesStatus } from '@/api/trials'
import { getInstanceList, getPatientSeriesList, setSeriesStatus } from '@/api/trials'
import requestPoolManager from '@/utils/request-pool'
import store from '@/store'
import { changeURLStatic } from '@/utils/history.js'
var config = {
maxWebWorkers: 4,
startWebWorkersOnDemand: true,
taskConfiguration: {
decodeTask: {
initializeCodecsOnStartup: false
}
}
}
cornerstoneWADOImageLoader.webWorkerManager.initialize(config)
cornerstoneWADOImageLoader.external.dicomParser = dicomParser
cornerstoneWADOImageLoader.external.cornerstone = cornerstone
const maximumSizeInBytes = 1024 * 1024 * 1024 * 6
@ -185,7 +193,8 @@ export default {
loading: false,
imageList: [],
showSeriesList: [],
currentLoadIns: []
currentLoadIns: [],
isFromCRCUpload: false
}
},
created: function() {
@ -200,6 +209,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)
@ -209,6 +219,8 @@ export default {
this.loadStudy()
} else if (this.type === 'Share') {
this.loadStudy()
} else if (this.type === 'Patient') {
this.loadPatientStudy()
}
cornerstone.events.addEventListener('cornerstoneimageloadprogress', this.cornerstoneimageloadprogress)
window.addEventListener('beforeunload', e => {
@ -224,22 +236,22 @@ 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) {
if (data.Result) {
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 loadPatientStudy() {
try {
let data = await getPatientSeriesList(this.studyId);
if (data.IsSuccess) {
const { Result } = data
var seriesList = []
@ -248,15 +260,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 +286,99 @@ 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 (err) {
console.log(err)
}
},
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 getSeriesList(url) {
try {
const data = await getSeriesList(url)
if (data.IsSuccess) {
const { Result } = data
var seriesList = []
Result.forEach((item, index) => {
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' ? 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 {
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 = this.$router.currentRoute.query.subjectVisitId
var studyId = this.$router.currentRoute.query.studyId
var trialId = this.$router.currentRoute.query.trialId
seriesList.push({
trialId,
subjectVisitId,
studyId,
imageIds: imageIds,
instanceInfoList: item.InstanceInfoList,
seriesId: item.Id,
seriesUid: item.SeriesInstanceUid,
seriesNumber: item.SeriesNumber,
sliceThickness: item.SliceThickness,
modality: item.Modality,
description: item.Description,
isReading: item.IsReading,
isDeleted: item.IsDeleted,
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: this.tpCode,
loadStatus: false,
imageloadedArr: [],
isExistMutiFrames: item.IsExistMutiFrames
})
})
this.seriesList = seriesList
if (this.seriesList.length > 0) {
this.loadAllImages()
this.$refs.dicomViewer.loadImageStack(this.seriesList[0], this.labels[this.tpCode])
this.firstInstanceId = this.seriesList[0].imageIds[0]
}
}
} catch (e) {
console.log(e)
}
},
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 +389,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 +417,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 +432,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 +447,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 +510,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 +554,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 +583,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 +612,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 +646,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 +715,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 +773,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()
}
}
}
}

View File

@ -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,17 @@ 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'
var config = {
maxWebWorkers: 4,
startWebWorkersOnDemand: true,
taskConfiguration: {
decodeTask: {
initializeCodecsOnStartup: false
}
}
}
cornerstoneWADOImageLoader.webWorkerManager.initialize(config)
cornerstoneWADOImageLoader.external.dicomParser = dicomParser
cornerstoneWADOImageLoader.external.cornerstone = cornerstone
const maximumSizeInBytes = 1024 * 1024 * 1024 * 6
@ -289,7 +300,8 @@ export default {
activeNames: [],
relationActiveName: [],
showSeriesList: [],
currentLoadIns: []
currentLoadIns: [],
isFromCRCUpload: false
}
},
mounted() {
@ -305,6 +317,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 +328,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 +430,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 +488,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 +525,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 +558,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 +592,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 +610,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 +624,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 +663,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 +681,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 +698,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 +730,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 +737,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 +848,7 @@ export default {
white-space: normal;
}
.viewerContainer .viewerLeftSidePanel {
width: 215px;
width: 220px;
background-color: #323232;
box-sizing: border-box;
margin: 0;
@ -814,7 +885,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 +964,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;

View File

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

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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

View File

@ -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
>

View File

@ -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
},

View File

@ -59,9 +59,14 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="12" v-if="systemLevel !== 1">
<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="!systemLevel">
<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="!systemLevel">
<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="!systemLevel">
<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="!systemLevel">
<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="!systemLevel">
<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="!systemLevel">
<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="!systemLevel">
<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="!systemLevel">
<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="!systemLevel">
<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="!systemLevel">
<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,250 @@
<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 {};
},
},
systemLevel: {
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.systemLevel) {
if (this.systemLevel === 1) {
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.systemLevel = this.systemLevel;
addOrUpdateEmailNoticeConfigList(this.form)
.then((res) => {
this.loading = false;
this.$emit("closeDialog");
this.$emit("getList");
this.$message.success("Saved successfully");
})
.catch(() => {
this.loading = false;
});
});
},
},
};
</script>

View File

@ -1,25 +1,69 @@
<template>
<box-content>
<div class="search">
<el-form :inline="true" size="mini" class="base-search-form">
<el-form
v-if="!systemLevel"
: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="systemLevel !== 1"
>
<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="!systemLevel"
>
<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="!systemLevel"
>
<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="!systemLevel"
/>
<!-- 附件 -->
<el-table-column
prop="FileName"
:label="$t('trials:emailManageCfg:title:fileName')"
show-overflow-tooltip
width="100"
min-width="100"
v-if="!systemLevel"
>
<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="!systemLevel"
>
<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="!systemLevel"
>
<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="!systemLevel"
>
<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"
:system-level="systemLevel"
@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;
},
},
systemLevel: {
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.systemLevel = this.systemLevel;
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>

View File

@ -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"
: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"
: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"
: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"
: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>

View File

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

View File

@ -0,0 +1,507 @@
<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"
popper-class="feedBack-select-box"
>
<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.FeedBackUserKeyInfo"
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"
popper-class="feedBack-select-box"
>
<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"
popper-class="feedBack-select-box"
>
<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"
popper-class="feedBack-select-box"
/>
</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="100"
show-overflow-tooltip
sortable="custom"
v-if="level > 8"
/>
<el-table-column
:label="$t('feedBack:form:study')"
prop="ExperimentName"
min-width="140"
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:SubjectCode')"
prop="SubjectCode"
min-width="120"
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="140"
show-overflow-tooltip
sortable="custom"
v-if="level > 7"
/>
<el-table-column
:label="$t('feedBack:form:questionType')"
prop="QuestionType"
min-width="180"
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="200"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
:label="$t('feedBack:form:time')"
prop="CreateTime"
min-width="180"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
:label="$t('feedBack:form:status')"
prop="State"
min-width="120"
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="180"
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,
FeedBackUserKeyInfo: 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: {
type: String,
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();
this.$emit("success");
},
});
},
},
};
</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>

View File

@ -11,15 +11,11 @@
<div
:class="{
'login-image': true,
'login-image-usa': NODE_ENV === 'usa',
'login-image-usa': true,
}"
>
<svg-icon
icon-class="login-bg"
style="width: 90%; height: 90%"
v-if="NODE_ENV === 'usa'"
/>
<img src="@/assets/login-bg.png" v-else />
<svg-icon icon-class="login-bg" style="width: 90%; height: 90%" />
<!-- <img src="@/assets/login-bg.png" v-else /> -->
</div>
</div>
<div class="login-r">
@ -112,7 +108,12 @@
{{ $t("login:button:login") }}
</el-button>
<div style="text-align: right">
<TopLang v-if="VUE_APP_OSS_CONFIG_REGION !== 'oss-us-west-1'&& NODE_ENV !== 'usa'" />
<TopLang
v-if="
VUE_APP_OSS_CONFIG_REGION !== 'oss-us-west-1' &&
NODE_ENV !== 'usa'
"
/>
<!-- Forget password? -->
<el-button
type="text"
@ -176,7 +177,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() }} 上海展影医疗科技有限公司
版权所有
@ -195,6 +196,7 @@
>
</div>
</el-dialog>
<browserTip ref="browserTip" />
</div>
</template>
@ -203,13 +205,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: {
@ -252,6 +255,17 @@ export default {
computed: {
...mapGetters(["asyncRoutes", "routes", "language"]),
},
watch: {
"$i18n.locale": {
handler() {
if (this.$refs.browserTip) {
this.$refs.browserTip.open();
}
},
deep: true,
immediate: true,
},
},
mounted() {
this.loginType = this.$route.query.loginType;
this.location = this.$route.query.location;
@ -272,6 +286,7 @@ export default {
// this.$updateDictionary()
}
}
this.$refs.browserTip.open();
},
methods: {
...mapMutations({ setLanguage: "lang/setLanguage" }),

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -26,7 +26,7 @@
<h4>{{ $t('trials:staffResearch:title:newStaff') }}</h4>
<ParticipantList ref="researchParticipants" :is-history="true" @refreshPage="refreshPage" @getList="initPage" />
</el-card>
<!-- 设备调研 -->
<el-card shadow="hover" class="mt10">
<h4>{{ $t('trials:equiptResearch:title:equiptResearch') }}</h4>
@ -35,9 +35,12 @@
<!-- 其他信息调研 -->
<el-card shadow="hover" class="mt10">
<!-- 注意事项 -->
<h4>{{ $t('trials:equiptResearch:form:precautions') }}</h4>
<ol>
<ol v-if="siteSurveyNoteInfo">
<div v-if="$i18n.locale === 'zh'" v-html="siteSurveyNoteInfo.ReplaceContentCN" />
<div v-else v-html="siteSurveyNoteInfo.ReplaceContent" />
</ol>
<ol v-else>
<!-- 只要有可能请确保受试者使用上述指定的扫描仪器采集影像 -->
<li>{{ $t('trials:equiptResearch:form:item1') }}</li>
<!-- 请确保对每位受试者的扫描参数在整个研究过程中保持一致 -->
@ -148,7 +151,8 @@ export default {
rejectForm: { reason: '' },
btnLoading: false,
isFullscreen: false,
historyVisible: false
historyVisible: false,
siteSurveyNoteInfo: null
}
},
mounted() {
@ -165,6 +169,9 @@ export default {
if (res.Result) {
// this.trialSiteSurveyEquipmentType = res.Result.TrialInfo.TrialSiteSurveyEquipmentType
// this.trialSiteSurveyUserRoles = res.Result.TrialInfo.TrialSiteSurveyUserRoles
if (res.Result.SiteSurveyFiledConfig && res.Result.SiteSurveyFiledConfig.ModifyFiledList.length > 0) {
this.siteSurveyNoteInfo = res.Result.SiteSurveyFiledConfig.ModifyFiledList.find(i => i.NeedModifyFiled === 'SiteSurveyNote')
}
var historicalArr = []
var newArr = []
res.Result.TrialSiteUserSurveyList.map(i => {
@ -176,11 +183,11 @@ export default {
})
this.state = res.Result.TrialSiteSurvey.State
this.siteId = res.Result.TrialSiteSurvey.TrialSiteId
this.$refs['baseResearchInfo'].initForm(res.Result.TrialInfo, res.Result.TrialSiteSurvey)
this.$refs['baseResearchInfo'].initForm(res.Result.TrialInfo, res.Result.TrialSiteSurvey, res.Result.SiteSurveyFiledConfig ? res.Result.SiteSurveyFiledConfig.NotShowFieldList : null)
this.$refs['historicalParticipant'].initList(historicalArr, res.Result.TrialSiteSurvey)
this.$refs['researchParticipants'].initList(newArr, res.Result.TrialSiteSurvey)
// this.$refs['researchParticipants'].initList(res.Result.TrialSiteUserSurveyList, res.Result.TrialSiteSurvey)
this.$refs['researchEquipments'].initList(res.Result.TrialSiteEquipmentSurveyList, res.Result.TrialSiteSurvey)
this.$refs['researchEquipments'].initList(res.Result.TrialSiteEquipmentSurveyList, res.Result.TrialSiteSurvey, !(res.Result.SiteSurveyFiledConfig && res.Result.SiteSurveyFiledConfig.ModifyFiledList.length > 0))
this.isExistIncorrect = res.Result.TrialSiteUserSurveyList.every(item => item.IsCorrect === false)
}
this.loading = false

View File

@ -2,7 +2,7 @@
<div class="status-info">
<el-form :inline="true" :model="basicInfo" class="demo-form-inline" size="small">
<el-row>
<el-col :span="6">
<!-- <el-col :span="6">
<el-form-item :label="$t('resumeInfo:label:Pending')">
<span v-if="statusList.Submitted" style="color:#428bca">
<router-link
@ -42,7 +42,7 @@
</span>
<span v-else>{{ statusList.Reading }}</span>
</el-form-item>
</el-col>
</el-col> -->
<el-col :span="6">
<el-form-item :label="$t('resumeInfo:label:Vacation')">
<span style="font-size:12px;margin-right:20px;">{{ holiday }}</span>

View File

@ -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:tip:file:pdf') }}</p>
</div>
<div v-if="!$route.query.ReviewStatus">
<el-table :data="agreementList" size="small">

View File

@ -20,7 +20,7 @@
accept=".pdf"
>
<el-button size="small" type="primary" :loading="btnDisabled">{{ $t('system:GcpCertificate:upload:Upload') }}</el-button>
<span slot="tip" style="margin-left:10px;" class="el-upload__tip">{{ $t('system:GcpCertificate:tap:must') }}</span>
<span slot="tip" style="margin-left:10px;" class="el-upload__tip">{{ $t('system:tip:file:pdf') }}</span>
</el-upload>
</div>
<div>
@ -76,7 +76,7 @@ export default {
methods: {
handleSaveGCP() {
if (this.GCP && this.GCPID === '') {
this.$message.info('Please upload the GCP certificate')
this.$message.info(this.$t('reviewers:GCPCertificate:message:uploadValid'))
return
}
@ -91,7 +91,7 @@ export default {
this.fileList = []
}
this.saveBtnLoading = false
this.$message.success('Saved successfully')
this.$message.success(this.$t('common:message:savedSuccessfully'))
}).catch(() => {
this.saveBtnLoading = false
})
@ -153,7 +153,7 @@ export default {
if (res.IsSuccess) {
this.fileList[0].id = res.Result[0].Id
this.GCPID = res.Result[0].Id
this.$message.success('Uploaded successfully')
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
})
.catch(() => {
@ -165,7 +165,7 @@ export default {
if (isValidFile) {
this.fileList = []
} else {
this.$alert('must be in pdf format')
this.$alert(this.$t('trials:attachment:message:pdf'))
return false
}
},

View File

@ -19,7 +19,7 @@
</div>
</div>
<p>{{ $t('system:GcpCertificate:tap:must') }}</p>
<p>{{ $t('system:tip:file:docx') }}</p>
</div>
<div class="resumeTbl">
<el-table :data="resumeListEN" size="small">
@ -78,7 +78,7 @@
</el-upload>
</div>
</div>
<p>{{ $t('system:GcpCertificate:tap:must') }}</p>
<p>{{ $t('system:tip:file:docx') }}</p>
</div>
<div class="resumeTbl">
<el-table :data="resumeListCN" size="small">

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -38,6 +38,34 @@
style="width: 120px"
/>
</el-form-item>
<el-form-item
:label="$t('system:loginLog:table:LoginUserName')"
prop="LoginFaildName"
>
<el-input
v-model="searchData.LoginUserName"
size="small"
clearable
style="width: 120px"
/>
</el-form-item>
<el-form-item
:label=" $t('system:loginLog:table:LoginUserType')"
prop="LoginUserTypeEnum"
>
<el-select
v-model="searchData.LoginUserTypeEnum"
clearable
style="width: 120px"
>
<el-option
v-for="item of $d.UserType"
:key="'UserType' + item.label"
:value="item.value"
:label="item.label"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('system:loginLog:label:CreateTime')">
<el-date-picker
v-model="datetimerange"
@ -45,17 +73,24 @@
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']"
@change="handleDatetimeChange"
style="width: 380px"
/>
</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
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t("common:button:reset") }}
</el-button>
</el-form-item>
</el-form>
<el-table
@ -85,13 +120,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"
@ -163,6 +198,8 @@ const searchDataDefault = () => {
OptType: null,
Ip: "",
LoginFaildName: "",
LoginUserName: '',
LoginUserTypeEnum: null,
BeginDate: "",
EndDate: "",
Asc: false,
@ -210,6 +247,7 @@ export default {
},
//
handleReset() {
this.datetimerange = []
this.searchData = searchDataDefault();
this.getList();
},

View File

@ -25,12 +25,12 @@
<el-form-item :label="$t('system:userlist:table:FirstName')" prop="FirstName">
<el-input v-model="user.FirstName" />
</el-form-item>
<el-form-item :label="$t('system:userlist:table:Gender')" prop="Sex" style="margin-right:40px;">
<!-- <el-form-item :label="$t('system:userlist:table:Gender')" prop="Sex" style="margin-right:40px;">
<el-radio-group v-model="user.Sex">
<el-radio :label="1">Male</el-radio>
<el-radio :label="0">Female</el-radio>
</el-radio-group>
</el-form-item>
</el-form-item> -->
<el-form-item :label="$t('system:userlist:table:Email')" prop="EMail">
<el-input v-model="user.EMail" />
</el-form-item>

View File

@ -100,15 +100,15 @@ export default {
sortable: 'custom',
showOverflowTooltip: true
},
{
prop: 'Sex',
label: this.$t('system:userlist:table:Gender'),
hidden: true,
slot: 'genderSlot',
minWidth: 100,
sortable: 'custom',
showOverflowTooltip: true
},
// {
// prop: 'Sex',
// label: this.$t('system:userlist:table:Gender'),
// hidden: true,
// slot: 'genderSlot',
// minWidth: 100,
// sortable: 'custom',
// showOverflowTooltip: true
// },
{
prop: 'Phone',
label: this.$t('system:userlist:table:Phone'),

View File

@ -1,139 +0,0 @@
<template>
<div>
<el-button plain @click="open"></el-button>
<el-button plain @click="$refs.file.click()">dicom</el-button>
<input
ref="file"
type="file"
name="file"
webkitdirectory
multiple
@change="beginScanFiles($event)"
/>
<div>
<canvas id="img"></canvas>
</div>
<el-dialog title="上传视频" :close-on-click-modal="false" :visible.sync="IsOpen" width="450px" append-to-body>
<my-videos @uploadOver="uploadOver" />
</el-dialog>
</div>
</template>
<script>
import MyVideos from '@/components/videos'
import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
// import charLS from '@cornerstonejs/codec-charls';
import * as cornerstone from 'cornerstone-core'
import dicomParser from "dicom-parser";
import { Anonymizer } from "dicomedit";
console.log(Anonymizer)
const script = `version "6.3"
temp := "chany"
(0008,0008) := "test"
(0010,0010) := temp
`;
const CharLs = require('@cornerstonejs/codec-charls')
const codecWrapper = {
codec: undefined,
Decoder: undefined,
Encoder: undefined,
encoderName: "JpegLSEncoder",
decoderName: "JpegLSDecoder",
};
function setCodec(codecConfig, encoderName, decoderName, codec = {}) {
codecConfig.Encoder = codec[encoderName];
codecConfig.Decoder = codec[decoderName];
codecConfig.codec = codec;
}
CharLs().then(res => {
setCodec(codecWrapper, codecWrapper.encoderName, codecWrapper.decoderName, res);
})
export default {
components: { MyVideos },
data() {
return {
IsOpen: false,
videoUrl: null,
videoName: null
}
},
methods: {
async upload(name, file) {
let res = await this.OSSclient.put(name, file)
return res
},
beginScanFiles(e) {
var files = e.target.files
console.log(e.target.files)
if (files.length > 0) {
files.forEach(async (item, index) => {
const reader = new FileReader();
reader.onload = async (event) => {
let buffer = event.target.result;
const anonymizer = new Anonymizer(script, { test: 'hello' });
anonymizer.loadDcm(new Uint8Array(buffer))
await anonymizer.applyRules();
let buffer1 = anonymizer.write()
let data1 = dicomParser.parseDicom(new Uint8Array(buffer1))
let data = dicomParser.parseDicom(new Uint8Array(buffer))
// 0002 0010
// if(1.2.840.10008.1.2.1) => 1.2.840.10008.1.2.4.80
let height = data.uint16('x00280011')
let width = data.uint16('x00280010')
let bitsPerSample = data.uint16('x00280100')
let componentCount = data.string('x00280004')
let transportSyntax = data.string('x00020010')
// let pixel = data.byteArrayParser.readUint16('x7fe0x0010')
let pixelDataElement = data.elements.x7fe00010;
let pixelDataOffset = pixelDataElement.dataOffset;
let pixelDataLength = pixelDataElement.length;
let pixelDataBytes = data.byteArray.subarray(pixelDataOffset, pixelDataOffset + pixelDataLength)
if (transportSyntax === '1.2.840.10008.1.2.1' && ~componentCount.indexOf('MONOCHROME')) {
let encoder = new codecWrapper.Encoder();
let decodedBytes = encoder.getDecodedBuffer({width: width, height: height, bitsPerSample: bitsPerSample, componentCount: 1})
encoder.setNearLossless(0);
// 7fe0 0010
decodedBytes.set(pixelDataBytes);
let startTime = performance.now()
encoder.encode()
let endTime = performance.now();
// dicom
let encodeDurationInSeconds = endTime - startTime
let encodedBytes = encoder.getEncodedBuffer();
data.elements['x00020010'].value = '1.2.840.10008.1.2.4.80'
console.log(data.elements['x7fe00010'].length)
data.elements['x7fe00010'].length = encodedBytes.length
console.log(data.elements['x7fe00010'].length)
let mateDataBytes = data.byteArray.subarray(0, pixelDataOffset)
let modifiedByteArray = new Uint8Array([...mateDataBytes, ...encodedBytes])
let newData = new dicomParser.ByteStream(data.byteArrayParser, modifiedByteArray, 0)
console.log(data)
console.log(newData)
console.log(dicomParser.parseDicom(new Uint8Array(newData.byteArray)))
await this.upload(`test/${index}`, newData)
encoder.delete();
return
}
};
reader.readAsArrayBuffer(item);
})
}
},
open() {
this.IsOpen = true
},
uploadOver(isSuccess, res) {
if (isSuccess) {
this.IsOpen = false
this.videoUrl = res.url
this.videoName = res.name
}
}
}
}
</script>
<style scoped>
</style>

View File

@ -1,98 +0,0 @@
<template>
<div>
<el-button plain @click="$refs.file.click()">dicom</el-button>
<input
ref="file"
type="file"
name="file"
webkitdirectory
multiple
@change="beginScanFiles($event)"
/>
</div>
</template>
<script>
import dicomParser from "dicom-parser";
import dcmjs from 'dcmjs'
const CharLs = require('@cornerstonejs/codec-charls')
const codecWrapper = {
codec: undefined,
Decoder: undefined,
Encoder: undefined,
encoderName: "JpegLSEncoder",
decoderName: "JpegLSDecoder",
};
function setCodec(codecConfig, encoderName, decoderName, codec = {}) {
codecConfig.Encoder = codec[encoderName];
codecConfig.Decoder = codec[decoderName];
codecConfig.codec = codec;
}
CharLs().then(res => {
setCodec(codecWrapper, codecWrapper.encoderName, codecWrapper.decoderName, res);
})
export default {
data() {
return {
}
},
methods: {
async upload(name, file) {
let res = await this.OSSclient.put(name, file)
return res
},
beginScanFiles(e) {
var files = e.target.files
if (files.length > 0) {
files.forEach(async (item, index) => {
const reader = new FileReader();
reader.onload = async (event) => {
let buffer = event.target.result;
let data = dicomParser.parseDicom(new Uint8Array(buffer))
let height = data.uint16('x00280011')
let width = data.uint16('x00280010')
let bitsPerSample = data.uint16('x00280100')
let componentCount = data.string('x00280004')
let transportSyntax = data.string('x00020010')
if ((transportSyntax === '1.2.840.10008.1.2.1' || transportSyntax === '1.2.840.10008.1.2') && ~componentCount.indexOf('MONOCHROME')) {
let dataset = dcmjs.data.DicomMessage.readFile(buffer)
console.log(new dcmjs.data.DicomMetaDictionary(dataset))
let pixelDataElement = data.elements.x7fe00010;
let pixelDataOffset = pixelDataElement.dataOffset;
let pixelDataLength = pixelDataElement.length;
let pixelDataBytes = data.byteArray.subarray(pixelDataOffset, pixelDataOffset + pixelDataLength)
let encoder = new codecWrapper.Encoder();
let decodedBytes = encoder.getDecodedBuffer({width: width, height: height, bitsPerSample: bitsPerSample, componentCount: 1})
encoder.setNearLossless(0);
decodedBytes.set(pixelDataBytes);
encoder.encode()
let encodedBytes = encoder.getEncodedBuffer();
dataset.dict['7FE00010'].Value[0] = encodedBytes.buffer;
dataset.meta['00020010'].Value[0] = '1.2.840.10008.1.2.4.80';
let newDicomFile = dataset.write();
const bufferArray = new Uint8Array(newDicomFile);
const blob = new Blob([bufferArray], { type: 'application/octet-stream' });
await this.upload(`test/${index}.dcm`, blob)
}
};
reader.readAsArrayBuffer(item);
})
}
},
open() {
this.IsOpen = true
},
uploadOver(isSuccess, res) {
if (isSuccess) {
this.IsOpen = false
this.videoUrl = res.url
this.videoName = res.name
}
}
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,153 @@
<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,
SubjectVisitId: this.$store.state.trials.checkTaskId,
});
},
//
openFeedBackTable() {
this.$FBT();
},
},
};
</script>
<style lang="scss" scoped>
.feedBack {
position: fixed;
bottom: 50px;
right: -25px;
z-index: 3000;
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>

View File

@ -34,11 +34,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">

View File

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

View File

@ -5,17 +5,13 @@
<el-form :inline="true">
<!-- 项目编号 -->
<el-form-item :label="$t('trials:trials-list:table:trialId')">
<el-input
v-model="searchData.Code"
style="width:100px;"
clearable
/>
<el-input v-model="searchData.Code" style="width: 100px" clearable />
</el-form-item>
<!-- 研究方案号 -->
<el-form-item :label="$t('trials:trials-list:table:researchNumber')">
<el-input
v-model="searchData.ResearchProgramNo"
style="width:100px;"
style="width: 100px"
clearable
/>
</el-form-item>
@ -23,7 +19,7 @@
<el-form-item :label="$t('trials:trials-list:table:experimentName')">
<el-input
v-model="searchData.ExperimentName"
style="width:100px;"
style="width: 100px"
clearable
/>
</el-form-item>
@ -32,11 +28,11 @@
<el-form-item :label="$t('trials:trials-list:table:sponsor')">
<el-select
v-model="searchData.SponsorId"
style="width:150px;"
style="width: 150px"
clearable
>
<el-option
v-for="(item) in sponsorList"
v-for="item in sponsorList"
:key="item.Id"
:label="item.SponsorName"
:value="item.Id"
@ -44,14 +40,17 @@
</el-select>
</el-form-item>
<!-- 阅片标准 -->
<el-form-item :label="$t('trials:trials-list:table:IR_ReadingCriterionList')" v-if="hasPermi(['role:ir'])">
<el-form-item
:label="$t('trials:trials-list:table:IR_ReadingCriterionList')"
v-if="hasPermi(['role:ir'])"
>
<el-select
v-model="searchData.CriterionType"
style="width:150px;"
style="width: 150px"
clearable
>
<el-option
v-for="(item) in $d.CriterionType"
v-for="item in $d.CriterionType"
:key="item.id"
:label="item.label"
:value="item.value"
@ -59,10 +58,13 @@
</el-select>
</el-form-item>
<!-- 联系人 -->
<el-form-item :label="$t('trials:trials-list:table:IR_PMEmailList')" v-if="hasPermi(['role:ir'])">
<el-input
<el-form-item
:label="$t('trials:trials-list:table:IR_PMEmailList')"
v-if="hasPermi(['role:ir'])"
>
<el-input
v-model="searchData.PM_EMail"
style="width:100px;"
style="width: 100px"
clearable
/>
</el-form-item>
@ -70,26 +72,29 @@
<!-- <el-button type="text" @click="isShow = !isShow">More</el-button> -->
<!-- Search -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
{{ $t("common:button:search") }}
</el-button>
<!-- Reset -->
<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>
<!-- Export -->
<el-button
v-hasPermi="['trials:trials-list:export']"
type="primary"
icon="el-icon-download"
:disabled="!(selectArr.length>0)"
:loading="exportLoading"
@click="handleExportTrial"
>
{{ $t('common:button:export') }}
{{ $t("common:button:export") }}
</el-button>
</el-form-item>
</el-form>
<span style="margin-left:auto;">
<span style="margin-left: auto">
<!-- New -->
<el-button
v-hasPermi="['trials:trials-list:new']"
@ -97,24 +102,20 @@
type="primary"
@click="handleNew"
>
{{ $t('common:button:new') }}
{{ $t("common:button:new") }}
</el-button>
</span>
</template>
<!-- 更多搜索条件 -->
<el-drawer
:visible.sync="isShow"
:with-header="false"
size="390px"
>
<div style="padding:10px;">
<el-drawer :visible.sync="isShow" :with-header="false" size="390px">
<div style="padding: 10px">
<el-form label-width="140px">
<el-form-item label="Trial ID">
<el-input
v-model="searchData.Code"
placeholder="Trial ID"
style="width:100%;"
style="width: 100%"
clearable
/>
</el-form-item>
@ -122,7 +123,7 @@
<el-input
v-model="searchData.Indication"
placeholder="Indication"
style="width:100%;"
style="width: 100%"
clearable
/>
</el-form-item>
@ -130,7 +131,7 @@
<el-select
v-model="searchData.CriterionIds"
placeholder="Assessment Criteria"
style="width:100%;"
style="width: 100%"
clearable
multiple
>
@ -152,11 +153,11 @@
<el-select
v-model="searchData.SponsorId"
placeholder="Sponsor"
style="width:100%;"
style="width: 100%"
clearable
>
<el-option
v-for="(item) in sponsorList"
v-for="item in sponsorList"
:key="item.Id"
:label="item.SponsorName"
:value="item.Id"
@ -164,9 +165,14 @@
</el-select>
</el-form-item>
<el-form-item label="CRO">
<el-select v-model="searchData.CROId" placeholder="CRO" style="width:100%;" clearable>
<el-select
v-model="searchData.CROId"
placeholder="CRO"
style="width: 100%"
clearable
>
<el-option
v-for="(item) of croList"
v-for="item of croList"
:key="item.Id"
:label="item.CROName"
:value="item.Id"
@ -177,7 +183,7 @@
<el-select
v-model="searchData.Phase"
placeholder="Phase"
style="width:100%;"
style="width: 100%"
clearable
>
<el-option
@ -193,7 +199,7 @@
<el-select
v-model="searchData.ReviewTypeIds"
placeholder="ReviewType"
style="width:100%;"
style="width: 100%"
clearable
multiple
>
@ -216,7 +222,7 @@
v-model="searchData.ModalityIds"
multiple
placeholder="Modality"
style="width:100%;"
style="width: 100%"
clearable
>
<!-- <el-option
@ -234,7 +240,12 @@
</el-select>
</el-form-item>
<el-form-item label="Expedited: ">
<el-select v-model="searchData.Expedited" value-key="value" clearable style="width:100%;">
<el-select
v-model="searchData.Expedited"
value-key="value"
clearable
style="width: 100%"
>
<el-option
v-for="item in expeditedOption"
:key="item.value"
@ -251,7 +262,7 @@
type="date"
:picker-options="beginPickerOption"
:clearable="false"
style="width:100%;"
style="width: 100%"
/>
</el-form-item>
<el-form-item label="EndDate: ">
@ -262,7 +273,7 @@
type="date"
:picker-options="endpickerOption"
:clearable="false"
style="width:100%;"
style="width: 100%"
/>
</el-form-item>
@ -270,16 +281,23 @@
<el-select
v-model="searchData.AttendedReviewerType"
placeholder="Attended Reviewer Type"
style="width:100%;"
style="width: 100%"
clearable
>
<el-option v-for="item of $d.AttendedReviewerType" :key="item.value" :label="item.label" :value="item.value" />
<el-option
v-for="item of $d.AttendedReviewerType"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSelectSearch">Search</el-button>
<el-button type="primary" @click="handleSelectSearch"
>Search</el-button
>
<el-button type="primary" @click="handleReset">Reset</el-button>
<el-button type="primary" @click="isShow=false">Back</el-button>
<el-button type="primary" @click="isShow = false">Back</el-button>
</el-form-item>
</el-form>
</div>
@ -288,7 +306,7 @@
<!-- 项目列表 -->
<template slot="main-container">
<el-table
v-adaptive="{bottomOffset:60}"
v-adaptive="{ bottomOffset: 60 }"
v-loading="listLoading"
:data="list"
stripe
@ -336,10 +354,26 @@
min-width="120"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.TrialStatusStr === 'Initializing'" type="info">{{ $fd('TrialStatusEnum', scope.row.TrialStatusStr) }}</el-tag>
<el-tag v-if="scope.row.TrialStatusStr === 'Ongoing'" type="primary">{{ $fd('TrialStatusEnum', scope.row.TrialStatusStr) }}</el-tag>
<el-tag v-if="scope.row.TrialStatusStr === 'Completed'" type="warning">{{ $fd('TrialStatusEnum', scope.row.TrialStatusStr) }}</el-tag>
<el-tag v-if="scope.row.TrialStatusStr === 'Stopped'" type="danger">{{ $fd('TrialStatusEnum', scope.row.TrialStatusStr) }}</el-tag>
<el-tag
v-if="scope.row.TrialStatusStr === 'Initializing'"
type="info"
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag
>
<el-tag
v-if="scope.row.TrialStatusStr === 'Ongoing'"
type="primary"
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag
>
<el-tag
v-if="scope.row.TrialStatusStr === 'Completed'"
type="warning"
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag
>
<el-tag
v-if="scope.row.TrialStatusStr === 'Stopped'"
type="danger"
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag
>
</template>
</el-table-column>
<el-table-column
@ -406,7 +440,7 @@
min-width="160"
>
<template slot-scope="scope">
{{scope.row.IR_ReadingCriterionList.join(', ')}}
{{ scope.row.IR_ReadingCriterionList.join(", ") }}
</template>
</el-table-column>
<el-table-column
@ -441,7 +475,7 @@
min-width="170"
>
<template slot-scope="scope">
{{scope.row.IR_PMEmailList.join(', ')}}
{{ scope.row.IR_PMEmailList.join(", ") }}
</template>
</el-table-column>
<el-table-column
@ -519,7 +553,9 @@
<el-table-column
v-if="hasPermi(['role:spm', 'role:cpm'])"
prop="SPM_ReviewerSelectApprovalCount"
:label="$t('trials:trials-list:table:SPM_ReviewerSelectApprovalCount')"
:label="
$t('trials:trials-list:table:SPM_ReviewerSelectApprovalCount')
"
show-overflow-tooltip
sortable="custom"
min-width="160"
@ -543,7 +579,11 @@
v-hasPermi="['trials:trials-list:panel']"
circle
icon="el-icon-info"
:disabled="(scope.row.TrialStatusStr === 'Initializing' && !hasPermi(['role:pm'])) || scope.row.IsDeleted"
:disabled="
(scope.row.TrialStatusStr === 'Initializing' &&
!hasPermi(['role:pm'])) ||
scope.row.IsDeleted
"
:title="$t('trials:trials-list:action:panel')"
@click.stop="handleDetail(scope.row)"
/>
@ -570,19 +610,22 @@
v-hasPermi="['trials:trials-list:abolish']"
circle
icon="el-icon-delete"
:disabled="scope.row.IsDeleted || scope.row.TrialStatusStr !== 'Initializing'"
:disabled="
scope.row.IsDeleted ||
scope.row.TrialStatusStr !== 'Initializing'
"
:title="$t('trials:trials-list:action:abolition')"
@click.stop="handleAbandon(scope.row)"
/>
<!-- 代办详情-->
<!-- <el-button-->
<!-- v-hasPermi="['trials:trials-list:abolish']"-->
<!-- circle-->
<!-- icon="el-icon-receiving"-->
<!-- :disabled="scope.row.TrialStatusStr === 'Initializing'"-->
<!-- :title="$t('trials:trials-list:action:commission')"-->
<!-- @click.stop="handleCommission(scope.row)"-->
<!-- />-->
<!-- 代办详情-->
<!-- <el-button-->
<!-- v-hasPermi="['trials:trials-list:abolish']"-->
<!-- circle-->
<!-- icon="el-icon-receiving"-->
<!-- :disabled="scope.row.TrialStatusStr === 'Initializing'"-->
<!-- :title="$t('trials:trials-list:action:commission')"-->
<!-- @click.stop="handleCommission(scope.row)"-->
<!-- />-->
</template>
</el-table-column>
</el-table>
@ -606,7 +649,11 @@
append-to-body
custom-class="base-dialog-wrapper"
>
<TrialForm :trial-id="currentId" @getList="getList" @closeDialog="closeDialog" />
<TrialForm
:trial-id="currentId"
@getList="getList"
@closeDialog="closeDialog"
/>
</el-dialog>
<!-- 修改项目状态 -->
@ -619,7 +666,11 @@
custom-class="base-dialog-wrapper"
append-to-body
>
<TrialStatusForm :data="currentRow" @closeDialog="closeStatusDialog" @getList="getList" />
<TrialStatusForm
:data="currentRow"
@closeDialog="closeStatusDialog"
@getList="getList"
/>
</el-dialog>
<el-dialog
@ -630,51 +681,66 @@
append-to-body
custom-class="base-dialog-wrapper"
>
<DoneList :trial-id="currentId" @getList="getList" @closeDialog="doneDialogVisible = false" />
<DoneList
:trial-id="currentId"
@getList="getList"
@closeDialog="doneDialogVisible = false"
/>
</el-dialog>
</BaseContainer>
</template>
<script>
import { abandonTrial, ifTrialCanOngoing, getTrialToBeDoneList } from '@/api/trials'
import store from '@/store'
import { mapGetters } from 'vuex'
import Excel from 'exceljs'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
import TrialForm from './components/TrialForm'
import TrialStatusForm from './components/TrialStatusForm'
import DoneList from './components/DoneList'
import {
abandonTrial,
ifTrialCanOngoing,
getTrialToBeDoneList,
} from "@/api/trials";
import { getTrialList_Export } from "@/api/export";
import store from "@/store";
import { mapGetters } from "vuex";
import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination";
import TrialForm from "./components/TrialForm";
import TrialStatusForm from "./components/TrialStatusForm";
import DoneList from "./components/DoneList";
const searchDataDefault = () => {
return {
Code: '',
Code: "",
CriterionIds: [],
SponsorId: '',
SponsorId: "",
ReviewTypeIds: [],
CROId: '',
Expedited: '',
Indication: '',
Phase: '',
CROId: "",
Expedited: "",
Indication: "",
Phase: "",
ModalityIds: [],
BeginDate: '',
EndDate: '',
AttendedReviewerType: '',
ResearchProgramNo: '',
ExperimentName: '',
BeginDate: "",
EndDate: "",
AttendedReviewerType: "",
ResearchProgramNo: "",
ExperimentName: "",
PageIndex: 1,
PageSize: 20,
Asc: false,
SortField: '',
CriterionType:null,
PM_EMail:null,
}
}
SortField: "",
CriterionType: null,
PM_EMail: null,
};
};
export default {
name: 'Trials',
components: { Pagination, BaseContainer, TrialForm, TrialStatusForm, DoneList },
dicts: ['ReadingStandard', 'ReviewType', 'ReadingType'],
name: "Trials",
components: {
Pagination,
BaseContainer,
TrialForm,
TrialStatusForm,
DoneList,
},
dicts: ["ReadingStandard", "ReviewType", "ReadingType"],
data() {
return {
userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1,
exportLoading: false,
userTypeEnumInt: zzSessionStorage.getItem("userTypeEnumInt") * 1,
doneDialogVisible: false,
doneTitle: null,
selectArr: [],
@ -684,191 +750,228 @@ export default {
total: 0,
isShow: false,
dialogVisible: false,
title: '',
currentId: '',
title: "",
currentId: "",
statusVisible: false,
currentRow: {},
currentUser: zzSessionStorage.getItem('userName'),
currentUser: zzSessionStorage.getItem("userName"),
phaseOptions: [
{ value: 'I' },
{ value: 'II' },
{ value: 'III' },
{ value: 'IV' }
{ value: "I" },
{ value: "II" },
{ value: "III" },
{ value: "IV" },
],
expeditedOption: this.$d.TrialExpeditedState,
beginPickerOption: {
disabledDate: time => {
disabledDate: (time) => {
if (this.searchData.EndDate) {
return time.getTime() > new Date(this.searchData.EndDate).getTime()
return time.getTime() > new Date(this.searchData.EndDate).getTime();
} else {
return time.getTime() > Date.now()
return time.getTime() > Date.now();
}
}
},
},
endpickerOption: {
disabledDate: time => {
disabledDate: (time) => {
if (this.searchData.BeginDate) {
return time.getTime() > Date.now() || time.getTime() <= new Date(this.searchData.BeginDate).getTime()
return (
time.getTime() > Date.now() ||
time.getTime() <= new Date(this.searchData.BeginDate).getTime()
);
} else {
return time.getTime() > Date.now()
return time.getTime() > Date.now();
}
}
}
}
},
},
};
},
computed: {
...mapGetters(['sponsorList', 'croList'])
...mapGetters(["sponsorList", "croList"]),
},
created() {
this.initPage()
this.initPage();
},
methods: {
initPage() {
this.getList()
store.dispatch('global/getSponsorList')
store.dispatch('global/getCROList')
this.getList();
store.dispatch("global/getSponsorList");
store.dispatch("global/getCROList");
},
//
getList() {
this.listLoading = true
this.listLoading = true;
getTrialToBeDoneList(this.searchData)
.then(res => {
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
this.listLoading = false
.then((res) => {
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
this.listLoading = false;
})
.catch(() => {
this.listLoading = false
})
this.listLoading = false;
});
},
//
handleSearch() {
this.searchData.PageIndex = 1
this.getList()
this.searchData.PageIndex = 1;
this.getList();
},
//
handleSelectSearch() {
this.searchData.PageIndex = 1
this.getList()
this.isShow = false
this.searchData.PageIndex = 1;
this.getList();
this.isShow = false;
},
//
handleReset() {
this.searchData = searchDataDefault()
this.getList()
this.searchData = searchDataDefault();
this.getList();
},
//
handleNew() {
// this.$router.push({ name: 'CreateTrial' })
this.title = this.$t('trials:trials-list:dialogTitle:new')
this.currentId = ''
this.dialogVisible = true
this.title = this.$t("trials:trials-list:dialogTitle:new");
this.currentId = "";
this.dialogVisible = true;
},
//
handleEdit(row) {
this.title = this.$t('trials:trials-list:dialogTitle:edit')
this.currentId = row.Id
this.dialogVisible = true
this.title = this.$t("trials:trials-list:dialogTitle:edit");
this.currentId = row.Id;
this.dialogVisible = true;
},
handleCommission(row) {
this.doneTitle = this.$t('trials:trials-list:dialogTitle:doneTitle')
this.currentId = row.Id
this.doneDialogVisible = true
this.doneTitle = this.$t("trials:trials-list:dialogTitle:doneTitle");
this.currentId = row.Id;
this.doneDialogVisible = true;
},
closeDialog() {
this.dialogVisible = false
this.dialogVisible = false;
},
//
handleStatus(row) {
if (row.TrialStatusStr === 'Initializing') {
this.listLoading = true
ifTrialCanOngoing(row.Id).then(res => {
this.listLoading = false
if (res.Result) {
this.currentRow = { ...row }
this.statusVisible = true
} else {
this.$confirm(res.ErrorMessage, {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
}
}).catch(() => { this.listLoading = false })
if (row.TrialStatusStr === "Initializing") {
this.listLoading = true;
ifTrialCanOngoing(row.Id)
.then((res) => {
this.listLoading = false;
if (res.Result) {
this.currentRow = { ...row };
this.statusVisible = true;
} else {
this.$confirm(res.ErrorMessage, {
type: "warning",
showCancelButton: false,
callback: (action) => {},
});
}
})
.catch(() => {
this.listLoading = false;
});
} else {
this.currentRow = { ...row }
this.statusVisible = true
this.currentRow = { ...row };
this.statusVisible = true;
}
},
closeStatusDialog() {
this.statusVisible = false
this.statusVisible = false;
},
//
handleAbandon(row) {
this.$confirm(this.$t('trials:trials-list:message:abolition'), {
type: 'warning',
distinguishCancelAndClose: true
}).then(() => {
this.currentRow = { ...row }
this.abandonTrial()
}).catch(() => {})
this.$confirm(this.$t("trials:trials-list:message:abolition"), {
type: "warning",
distinguishCancelAndClose: true,
})
.then(() => {
this.currentRow = { ...row };
this.abandonTrial();
})
.catch(() => {});
},
//
abandonTrial() {
this.listLoading = true
this.listLoading = true;
abandonTrial(this.currentRow.Id, true)
.then(res => {
this.listLoading = false
.then((res) => {
this.listLoading = false;
if (res.IsSuccess) {
this.getList()
this.$message.success(this.$t('trials:trials-list:message:abolitionSuccessfully'))
this.getList();
this.$message.success(
this.$t("trials:trials-list:message:abolitionSuccessfully")
);
}
}).catch(() => { this.listLoading = false })
})
.catch(() => {
this.listLoading = false;
});
},
rowClick(row, col) {
this.$router.push({ path: `/trials/trials-panel?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}` })
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
handleDetail(row) {
this.$router.push({ path: `/trials/trials-panel?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}` })
this.$router.push({
path: `/trials/trials-panel?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}`,
});
},
//
handleSelectChange(val) {
const arr = []
const arr = [];
for (let index = 0; index < val.length; index++) {
arr.push(val[index])
arr.push(val[index]);
}
this.selectArr = arr
this.selectArr = arr;
},
//
handleSortChange(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
if (column.order === "ascending") {
this.searchData.Asc = true;
} else {
this.searchData.Asc = false
} if (column.prop === 'Criterion') {
this.searchData.SortField = 'CriterionId'
} else {
this.searchData.SortField = column.prop
this.searchData.Asc = false;
}
this.searchData.PageIndex = 1
this.getList()
if (column.prop === "Criterion") {
this.searchData.SortField = "CriterionId";
} else {
this.searchData.SortField = column.prop;
}
this.searchData.PageIndex = 1;
this.getList();
},
// Excel
handleExportTrial() {
this.exportLoading = true;
let data = {
...this.searchData,
};
data.TrialIdList = this.selectArr.map((item) => item.Id);
return getTrialList_Export(data)
.then((res) => {
this.exportLoading = false;
})
.catch(() => {
this.exportLoading = false;
});
this.selectArr.forEach((element, index) => {
// element.ExpeditedStr = element.Expedited === 0 ? 'No' : element.Expedited === 1 ? '24H' : '48H'
// element.ModalityListStr = element.ModalityList.join(', ')
// element.CreateTimeStr = element.CreateTime
// element.Criterion = element.CriterionList.join(', ')
element.Deleted = element.IsDeleted ? 'Yes' : 'No'
element.Index = (index + 1)
})
var workbook = new Excel.Workbook()
var sheet = workbook.addWorksheet('Trials')
element.Deleted = element.IsDeleted ? "Yes" : "No";
element.Index = index + 1;
});
var workbook = new Excel.Workbook();
var sheet = workbook.addWorksheet("Trials");
sheet.properties.defaultRowHeight = 22
sheet.properties.defaultRowHeight = 22;
// sheet.columns = [
// { key: 'Index', width: 5 },
// { key: 'Code', width: 15 },
@ -884,102 +987,96 @@ export default {
// { key: 'CreateTimeStr', width: 18 }
// ]
sheet.columns = [
{ key: 'Index', width: 5 },
{ key: 'TrialCode', width: 25 },
{ key: 'ExperimentName', width: 25 },
{ key: 'ResearchProgramNo', width: 25 },
{ key: 'Sponsor', width: 25 },
{ key: 'Deleted', width: 10 },
{ key: 'CreateTime', width: 25 }
]
{ key: "Index", width: 5 },
{ key: "TrialCode", width: 25 },
{ key: "ExperimentName", width: 25 },
{ key: "ResearchProgramNo", width: 25 },
{ key: "Sponsor", width: 25 },
{ key: "Deleted", width: 10 },
{ key: "CreateTime", width: 25 },
];
//
sheet.mergeCells('A1', 'G2')
sheet.getCell('A1').value = 'Trials'
sheet.getCell('A1').alignment = {
vertical: 'middle',
horizontal: 'center'
}
sheet.getCell('A1').font = {
name: 'SimSun',
sheet.mergeCells("A1", "G2");
sheet.getCell("A1").value = "Trials";
sheet.getCell("A1").alignment = {
vertical: "middle",
horizontal: "center",
};
sheet.getCell("A1").font = {
name: "SimSun",
family: 4,
size: 13,
bold: true
}
sheet.mergeCells('A3', 'G3')
var now = new Date()
sheet.getCell('A3').value = now.toLocaleDateString()
sheet.getCell('A3').alignment = {
vertical: 'middle',
horizontal: 'right'
}
bold: true,
};
sheet.mergeCells("A3", "G3");
var now = new Date();
sheet.getCell("A3").value = now.toLocaleDateString();
sheet.getCell("A3").alignment = {
vertical: "middle",
horizontal: "right",
};
sheet.getRow(4).values = [
'NO.',
'Trial ID',
'试验名称',
'研究方案号',
'申办方',
'是否废除',
'Date Created'
]
"NO.",
"Trial ID",
"试验名称",
"研究方案号",
"申办方",
"是否废除",
"Date Created",
];
sheet.getRow(4).font = {
name: 'SimSun',
name: "SimSun",
family: 4,
size: 11,
bold: true
}
sheet.getRow(4).alignment = { vertical: 'middle', horizontal: 'left' }
bold: true,
};
sheet.getRow(4).alignment = { vertical: "middle", horizontal: "left" };
sheet.addRows(this.selectArr)
sheet.addRows(this.selectArr);
sheet.eachRow((row, number) => {
if (number > 3) {
row.eachCell((cell, rowNumber) => {
cell.alignment = { vertical: 'center', horizontal: 'left' }
cell.alignment = { vertical: "center", horizontal: "left" };
cell.border = {
top: { style: 'thin' },
left: { style: 'thin' },
bottom: { style: 'thin' },
right: { style: 'thin' }
}
})
top: { style: "thin" },
left: { style: "thin" },
bottom: { style: "thin" },
right: { style: "thin" },
};
});
}
})
});
workbook.xlsx
.writeBuffer({
base64: true
base64: true,
})
.then(function(xls64) {
.then(function (xls64) {
var data = new Blob([xls64], {
type:
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
})
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
});
if ('msSaveOrOpenBlob' in navigator) {
if ("msSaveOrOpenBlob" in navigator) {
// ie使
window.navigator.msSaveOrOpenBlob(
data,
'Trials' + '.xlsx'
)
window.navigator.msSaveOrOpenBlob(data, "Trials" + ".xlsx");
} else {
var a = document.createElement('a')
var a = document.createElement("a");
var url = URL.createObjectURL(data)
a.href = url
a.download =
'Trials' + '.xlsx'
document.body.appendChild(a)
a.click()
setTimeout(function() {
document.body.removeChild(a)
window.URL.revokeObjectURL(url)
}, 0)
var url = URL.createObjectURL(data);
a.href = url;
a.download = "Trials" + ".xlsx";
document.body.appendChild(a);
a.click();
setTimeout(function () {
document.body.removeChild(a);
window.URL.revokeObjectURL(url);
}, 0);
}
})
}
}
}
});
},
},
};
</script>

View File

@ -5,10 +5,7 @@
<el-form :inline="true">
<!-- 文件类型 -->
<el-form-item :label="$t('trials:signRecords:table:fileType')">
<el-select
v-model="searchData.FileTypeId"
style="width:150px;"
>
<el-select v-model="searchData.FileTypeId" style="width: 150px">
<el-option
v-for="item of typeOptions"
:key="item.FileTypeId"
@ -19,19 +16,31 @@
</el-form-item>
<!-- 文件名称 -->
<el-form-item :label="$t('trials:signRecords:table:fileName')">
<el-input v-model="searchData.Name" style="width:120px;" />
<el-input v-model="searchData.Name" style="width: 120px" />
</el-form-item>
<!-- 签署人 -->
<el-form-item :label="$t('trials:signRecords:table:user')">
<el-select v-model="searchData.UserId" clearable filterable style="width:140px;">
<el-select
v-model="searchData.UserId"
clearable
filterable
style="width: 140px"
>
<el-option
v-for="(item) of userOptions"
v-for="item of userOptions"
:key="item.UserId"
:label="item.RealName"
:value="item.UserId"
>
<span style="float: left">{{ item.RealName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px;margin-left:5px;">
<span
style="
float: right;
color: #8492a6;
font-size: 13px;
margin-left: 5px;
"
>
{{ item.UserName }}
</span>
</el-option>
@ -43,7 +52,7 @@
v-model="searchData.UserTypeId"
clearable
filterable
style="width:120px;"
style="width: 120px"
>
<el-option
v-for="item of userTypeOptions"
@ -57,23 +66,54 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('trials:signRecords:table:isSign')">
<el-select v-model="searchData.IsConfirmed" clearable style="width:120px;">
<el-option v-for="i of $d.YesOrNo" :key="'IsConfirmed' + i.label" :value="i.value" :label="i.label" />
<el-select
v-model="searchData.IsConfirmed"
clearable
style="width: 120px"
>
<el-option
v-for="i of $d.YesOrNo"
:key="'IsConfirmed' + i.label"
:value="i.value"
:label="i.label"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('trials:signRecords:table:isDeleted')">
<el-select v-model="searchData.IsDeleted" clearable style="width:120px;">
<el-option v-for="i of $d.YesOrNo" :key="'IsDeleted' + i.label" :value="i.value" :label="i.label" />
<el-select
v-model="searchData.IsDeleted"
clearable
style="width: 120px"
>
<el-option
v-for="i of $d.YesOrNo"
:key="'IsDeleted' + i.label"
:value="i.value"
:label="i.label"
/>
</el-select>
</el-form-item>
<el-form-item>
<!-- 查询 -->
<el-button icon="el-icon-search" type="primary" @click="handleSearch">
{{ $t('common:button:search') }}
{{ $t("common:button:search") }}
</el-button>
<!-- 重置 -->
<el-button icon="el-icon-refresh-left" type="primary" @click="handleReset">
{{ $t('common:button:reset') }}
<el-button
icon="el-icon-refresh-left"
type="primary"
@click="handleReset"
>
{{ $t("common:button:reset") }}
</el-button>
<!-- 导出 -->
<el-button
type="primary"
icon="el-icon-download"
:loading="exportLoading"
@click="handleExport"
>
{{ $t("common:button:export") }}
</el-button>
</el-form-item>
</el-form>
@ -84,7 +124,7 @@
<el-table
ref="AttachmentsManagement"
v-loading="loading"
v-adaptive="{bottomOffset:60}"
v-adaptive="{ bottomOffset: 60 }"
:data="list"
stripe
height="100"
@ -115,8 +155,12 @@
sortable="custom"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.IsSystemDoc" type="primary">{{ $fd('IsSystemDoc', scope.row.IsSystemDoc) }}</el-tag>
<el-tag v-else type="warning">{{ $fd('IsSystemDoc', scope.row.IsSystemDoc) }}</el-tag>
<el-tag v-if="scope.row.IsSystemDoc" type="primary">{{
$fd("IsSystemDoc", scope.row.IsSystemDoc)
}}</el-tag>
<el-tag v-else type="warning">{{
$fd("IsSystemDoc", scope.row.IsSystemDoc)
}}</el-tag>
</template>
</el-table-column>
<!-- 是否废除 -->
@ -127,8 +171,12 @@
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>
<!-- 上传时间 -->
@ -147,8 +195,12 @@
sortable="custom"
>
<template slot-scope="scope">
<el-tag v-if="!scope.row.IsConfirmed" type="primary">{{ $fd('YesOrNo', scope.row.IsConfirmed) }}</el-tag>
<el-tag v-else type="danger">{{ $fd('YesOrNo', scope.row.IsConfirmed) }}</el-tag>
<el-tag v-if="!scope.row.IsConfirmed" type="primary">{{
$fd("YesOrNo", scope.row.IsConfirmed)
}}</el-tag>
<el-tag v-else type="danger">{{
$fd("YesOrNo", scope.row.IsConfirmed)
}}</el-tag>
</template>
</el-table-column>
<!-- 签署人 -->
@ -193,7 +245,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>
<!-- 预览文件 -->
@ -205,32 +263,45 @@
append-to-body
custom-class="base-dialog-wrapper"
>
<div class="base-modal-body" style="border:2px solid #ccc;padding: 10px">
<PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" @getList="getList" />
<div
class="base-modal-body"
style="border: 2px solid #ccc; padding: 10px"
>
<PreviewFile
v-if="previewVisible"
:file-path="currentPath"
:file-type="currentType"
@getList="getList"
/>
</div>
</el-dialog>
</BaseContainer>
</template>
<script>
import { getDocumentConfirmList, getTrialUserSelect, getTrialUserTypeList, getTrialDocAndSystemDocType } from '@/api/trials'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
import PreviewFile from '@/components/PreviewFile/index'
import store from '@/store'
import {
getDocumentConfirmList,
getTrialUserSelect,
getTrialUserTypeList,
getTrialDocAndSystemDocType,
} from "@/api/trials";
import { pMTrainingRecordList_Export } from "@/api/export";
import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination";
import PreviewFile from "@/components/PreviewFile/index";
const searchDataDefault = () => {
return {
FileTypeId: '',
Name: '',
UserId: '',
UserTypeId: '',
FileTypeId: "",
Name: "",
UserId: "",
UserTypeId: "",
PageIndex: 1,
PageSize: 20,
IsConfirmed: null,
IsDeleted: null
}
}
IsDeleted: null,
};
};
export default {
name: 'AttachmentsManagement',
name: "AttachmentsManagement",
components: { BaseContainer, Pagination, PreviewFile },
data() {
return {
@ -239,84 +310,99 @@ export default {
list: [],
total: 0,
currentRow: {},
currentPath: '',
currentType: '',
currentPath: "",
currentType: "",
previewVisible: false,
userOptions: [],
userTypeOptions: [],
currentUser: zzSessionStorage.getItem('userName'),
currentUser: zzSessionStorage.getItem("userName"),
typeOptions: [],
trialId: this.$route.query.trialId
}
trialId: this.$route.query.trialId,
exportLoading: false,
};
},
mounted() {
this.getTypeOptions()
this.getUserSelect()
this.getUserType()
this.getList()
this.getTypeOptions();
this.getUserSelect();
this.getUserType();
this.getList();
},
methods: {
handleExport() {
this.exportLoading = true;
pMTrainingRecordList_Export(this.searchData)
.then(() => {
this.exportLoading = false;
})
.catch((err) => {
this.exportLoading = false;
});
},
//
getList() {
this.loading = true
this.searchData.TrialId = this.trialId
getDocumentConfirmList(this.searchData).then(async res => {
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
console.log(this.total)
}).catch(() => {
this.loading = false
})
this.loading = true;
this.searchData.TrialId = this.trialId;
getDocumentConfirmList(this.searchData)
.then(async (res) => {
this.loading = false;
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
console.log(this.total);
})
.catch(() => {
this.loading = false;
});
},
//
getTypeOptions() {
getTrialDocAndSystemDocType(this.trialId).then(res => {
this.typeOptions = res.Result
})
getTrialDocAndSystemDocType(this.trialId).then((res) => {
this.typeOptions = res.Result;
});
},
//
getUserSelect() {
getTrialUserSelect(this.trialId).then(res => {
this.userOptions = res.Result
})
getTrialUserSelect(this.trialId).then((res) => {
this.userOptions = res.Result;
});
},
//
getUserType() {
getTrialUserTypeList().then(res => {
this.userTypeOptions = res.Result
})
getTrialUserTypeList().then((res) => {
this.userTypeOptions = res.Result;
});
},
//
handlePreview(row) {
this.currentRow = { ...row }
const { Name, FullFilePath } = row
this.currentPath = FullFilePath
this.currentType = row.Name ? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase() : ''
this.previewVisible = true
this.currentRow = { ...row };
const { Name, FullFilePath } = row;
this.currentPath = FullFilePath;
this.currentType = row.Name
? Name.substring(Name.lastIndexOf(".") + 1).toLocaleLowerCase()
: "";
this.previewVisible = true;
},
//
handleReset() {
this.searchData = searchDataDefault()
this.getList()
this.searchData = searchDataDefault();
this.getList();
this.$nextTick(() => {
this.$refs.AttachmentsManagement.clearSort()
})
this.$refs.AttachmentsManagement.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();
},
},
};
</script>

View File

@ -323,6 +323,7 @@ export default {
},
//
closeSignDialog(isSave) {
this.duration = 0
this.signVisible = false
if (isSave) {
this.currentIsConfirm = true

View File

@ -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>

View File

@ -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

View File

@ -14,7 +14,7 @@
accept=".pdf"
>
<el-button size="small" type="primary" :loading="btnDisabled">{{ $t('trials:enrolledReviews:button:upload') }}</el-button>
<span slot="tip" class="el-upload__tip">{{ `(${$t('trials:enrolledReviews:label:mustBepdf')})` }}</span>
<span slot="tip" class="el-upload__tip">{{ $t('system:tip:file:pdf') }}</span>
</el-upload>
</div>
</template>

View File

@ -139,7 +139,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>
@ -475,6 +476,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)
},

File diff suppressed because it is too large Load Diff

View File

@ -7,10 +7,15 @@
:data="list"
stripe
height="100"
style="min-height: 400px;"
style="min-height: 400px"
@selection-change="handleSelectChange"
>
<el-table-column :selectable="selectable" type="selection" align="left" width="45" />
<el-table-column
:selectable="selectable"
type="selection"
align="left"
width="45"
/>
<!-- 中心编号 -->
<el-table-column
prop="TrialSiteCode"
@ -35,25 +40,44 @@
sortable="custom"
show-overflow-tooltip
/>
<!-- 原截至访视 -->
<el-table-column
prop="FirstGlobalVisitName"
:label="
$t('trials:grouptConsistencyAnalysis:table:firstGlobalVisitName')
"
min-width="160"
sortable="custom"
show-overflow-tooltip
v-if="OtherInfo.IsGenerateGlobalTask && OtherInfo.IsHaveReadingPeriod"
/>
<!-- 是否受到退回影响 -->
<!-- <el-table-column-->
<!-- prop="IsReReadingOrBackInfluenceAnalysis"-->
<!-- :label="$t('trials:grouptConsistencyAnalysis:table:backImpact')"-->
<!-- min-width="160"-->
<!-- sortable="custom"-->
<!-- show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag v-if="!scope.row.IsReReadingOrBackInfluenceAnalysis" type="danger">{{ $fd('YesOrNo', scope.row.IsReReadingOrBackInfluenceAnalysis) }}</el-tag>-->
<!-- <el-tag v-if="scope.row.IsReReadingOrBackInfluenceAnalysis" type="primary">{{ $fd('YesOrNo', scope.row.IsReReadingOrBackInfluenceAnalysis) }}</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="IsReReadingOrBackInfluenceAnalysis"-->
<!-- :label="$t('trials:grouptConsistencyAnalysis:table:backImpact')"-->
<!-- min-width="160"-->
<!-- sortable="custom"-->
<!-- show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag v-if="!scope.row.IsReReadingOrBackInfluenceAnalysis" type="danger">{{ $fd('YesOrNo', scope.row.IsReReadingOrBackInfluenceAnalysis) }}</el-tag>-->
<!-- <el-tag v-if="scope.row.IsReReadingOrBackInfluenceAnalysis" type="primary">{{ $fd('YesOrNo', scope.row.IsReReadingOrBackInfluenceAnalysis) }}</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
</div>
<div v-else>{{$t('trials:grouptConsistencyAnalysis:message:createRandom')}}</div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<div v-else>
{{ $t("trials:grouptConsistencyAnalysis:message:createRandom") }}
</div>
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
<el-form-item>
<!-- 取消 -->
<el-button
@ -62,39 +86,59 @@
type="primary"
@click="close"
>
{{ $t('common:button:cancel') }}
{{ $t("common:button:cancel") }}
</el-button>
<!-- 生成 -->
<el-button size="small" type="primary" :loading="btnLoading" @click="save">
{{data.IsAutoAllocateGenerateTask ? $t('trials:grouptConsistencyAnalysis:button:createRandom') : $t('trials:grouptConsistencyAnalysis:button:create')}}
<el-button
size="small"
type="primary"
:loading="btnLoading"
@click="save"
>
{{
data.IsAutoAllocateGenerateTask
? $t("trials:grouptConsistencyAnalysis:button:createRandom")
: $t("trials:grouptConsistencyAnalysis:button:create")
}}
</el-button>
</el-form-item>
</div>
</el-form>
</template>
<script>
import { getDoctorSelfConsistentRuleSubjectList, confirmGenerateSelfConsistentTask, getDoctorConsistentRuleSubjectList, confirmGenerateConsistentTask } from '@/api/trials/reading'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
import {
getDoctorSelfConsistentRuleSubjectList,
confirmGenerateSelfConsistentTask,
getDoctorConsistentRuleSubjectList,
confirmGenerateConsistentTask,
} from "@/api/trials/reading";
import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination";
const searchDataDefault = () => {
return {
PageIndex: 1,
PageSize: 20,
Asc: true,
SortField: '',
SortField: "",
TrialId: null,
TaskConsistentRuleId: null
}
}
TaskConsistentRuleId: null,
};
};
export default {
name: 'TrialsNotice',
name: "TrialsNotice",
components: { BaseContainer, Pagination },
props: {
data: {
type: Object,
default() {
return {}
}
return {};
},
},
OtherInfo: {
type: Object,
default() {
return {};
},
},
},
data() {
@ -105,71 +149,82 @@ export default {
loading: false,
trialId: this.$route.query.trialId,
SelectList: [],
btnLoading: false
}
btnLoading: false,
};
},
mounted() {
this.searchData.TaskConsistentRuleId = this.data.Id
this.searchData.DoctorUserId = this.data.AnalysisDoctorUser.UserId
this.getList()
this.searchData.TaskConsistentRuleId = this.data.Id;
this.searchData.DoctorUserId = this.data.AnalysisDoctorUser.UserId;
this.getList();
},
methods: {
selectable(row) {
if (row.IsHaveGeneratedTask) {
return false
return false;
} else {
return true
return true;
}
},
handleSelectChange(e) {
this.SelectList = e
this.SelectList = e;
},
save () {
if (this.SelectList.length === 0 && !this.data.IsAutoAllocateGenerateTask) {
save() {
if (
this.SelectList.length === 0 &&
!this.data.IsAutoAllocateGenerateTask
) {
// ''
this.$alert(this.$t('trials:grouptConsistencyAnalysis:message:msg1'))
return
this.$alert(this.$t("trials:grouptConsistencyAnalysis:message:msg1"));
return;
}
this.btnLoading = true
this.loading = true
this.btnLoading = true;
this.loading = true;
var params = {
TaskConsistentRuleId: this.searchData.TaskConsistentRuleId,
SubejctIdList: this.SelectList.map(v => v.SubjectId),
SubejctIdList: this.SelectList.map((v) => v.SubjectId),
DoctorUserId: this.searchData.DoctorUserId,
IsAutoAllocateGenerateTask: this.data.IsAutoAllocateGenerateTask
}
confirmGenerateSelfConsistentTask(params).then(res => {
this.loading = false
this.btnLoading = false
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$emit('getList')
this.close()
}).catch(() => {
this.loading = false
this.btnLoading = false
})
IsAutoAllocateGenerateTask: this.data.IsAutoAllocateGenerateTask,
};
confirmGenerateSelfConsistentTask(params)
.then((res) => {
this.loading = false;
this.btnLoading = false;
this.$message.success(this.$t("common:message:savedSuccessfully"));
this.$emit("getList");
this.close();
})
.catch(() => {
this.loading = false;
this.btnLoading = false;
});
},
getList() {
this.searchData.TrialId = this.$route.query.trialId
this.loading = true
getDoctorSelfConsistentRuleSubjectList(this.searchData).then(res => {
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
}).catch(() => { this.loading = false })
this.searchData.TrialId = this.$route.query.trialId;
this.loading = true;
getDoctorSelfConsistentRuleSubjectList(this.searchData)
.then((res) => {
this.loading = false;
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
})
.catch(() => {
this.loading = false;
});
},
close() {
this.$emit("close");
},
close() { this.$emit('close') },
//
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>

View File

@ -7,10 +7,15 @@
:data="list"
stripe
height="100"
style="min-height: 400px;"
style="min-height: 400px"
@selection-change="handleSelectChange"
>
<el-table-column :selectable="selectable" type="selection" align="left" width="45" />
<el-table-column
:selectable="selectable"
type="selection"
align="left"
width="45"
/>
<!-- 中心编号 -->
<el-table-column
prop="TrialSiteCode"
@ -36,7 +41,11 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{scope.row.DoctorUserList.map(v => {return `${v.UserName} (${v.FullName})`}).join(', ')}}
{{
scope.row.DoctorUserList.map((v) => {
return `${v.UserName} (${v.FullName})`;
}).join(", ")
}}
</template>
</el-table-column>
<!-- 符合规则访视数 -->
@ -47,13 +56,30 @@
sortable="custom"
show-overflow-tooltip
/>
<!-- 原截至访视 -->
<el-table-column
prop="FirstGlobalVisitName"
:label="
$t('trials:grouptConsistencyAnalysis:table:firstGlobalVisitName')
"
min-width="160"
sortable="custom"
show-overflow-tooltip
v-if="OtherInfo.IsGenerateGlobalTask && OtherInfo.IsHaveReadingPeriod"
/>
</el-table>
<!-- 分页组件 -->
<div style="text-align: right">
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
</div>
</div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
<el-form-item>
<!-- 取消 -->
<el-button
@ -62,64 +88,86 @@
type="primary"
@click="close"
>
{{ $t('common:button:cancel') }}
{{ $t("common:button:cancel") }}
</el-button>
<el-button size="small" type="primary" :disabled="!IsAllowAutoAllocate" :loading="btnLoading" @click="save(true)">
{{$t('trials:grouptConsistencyAnalysis:button:RandomCreate')}}
<el-button
size="small"
type="primary"
:disabled="!IsAllowAutoAllocate"
:loading="btnLoading"
@click="save(true)"
>
{{ $t("trials:grouptConsistencyAnalysis:button:RandomCreate") }}
</el-button>
<!-- 生成 -->
<el-button size="small" type="primary" :loading="btnLoading" @click="save(false)">
{{$t('trials:grouptConsistencyAnalysis:button:create')}}
<el-button
size="small"
type="primary"
:loading="btnLoading"
@click="save(false)"
>
{{ $t("trials:grouptConsistencyAnalysis:button:create") }}
</el-button>
</el-form-item>
</div>
</el-form>
</template>
<script>
import { getGroupConsistentRuleSubjectList, confirmGenerateGroupConsistentTask, getDoctorConsistentRuleSubjectList, confirmGenerateConsistentTask } from '@/api/trials/reading'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
import {
getGroupConsistentRuleSubjectList,
confirmGenerateGroupConsistentTask,
getDoctorConsistentRuleSubjectList,
confirmGenerateConsistentTask,
} from "@/api/trials/reading";
import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination";
const searchDataDefault = () => {
return {
PageIndex: 1,
PageSize: 20,
Asc: true,
SortField: '',
SortField: "",
TrialId: null,
TaskConsistentRuleId: null
}
}
TaskConsistentRuleId: null,
};
};
export default {
name: 'TrialsNotice',
name: "TrialsNotice",
components: { BaseContainer, Pagination },
props: {
changeNum: {
type: Number,
default() {
return 0
}
return 0;
},
},
IsSelfAnalysis: {
type: Boolean,
default() {
return false
}
return false;
},
},
TrialReadingCriterionId:{
type:String,
required:true
TrialReadingCriterionId: {
type: String,
required: true,
},
data: {
type: Object,
default() {
return {}
}
return {};
},
},
OtherInfo: {
type: Object,
default() {
return {};
},
},
},
watch: {
changeNum(v) {
this.getList()
}
this.getList();
},
},
data() {
return {
@ -130,77 +178,85 @@ export default {
trialId: this.$route.query.trialId,
SelectList: [],
btnLoading: false,
IsAllowAutoAllocate: true
}
IsAllowAutoAllocate: true,
};
},
mounted() {
this.getList()
this.getList();
},
methods: {
selectable(row) {
if (row.IsHaveGeneratedTask) {
return false
return false;
} else {
return true
return true;
}
},
handleSelectChange(e) {
this.SelectList = e
this.SelectList = e;
},
save (IsAutoAllocateGenerateTask) {
save(IsAutoAllocateGenerateTask) {
if (this.SelectList.length === 0) {
// ''
this.$alert(this.$t('trials:grouptConsistencyAnalysis:message:msg1'))
return
this.$alert(this.$t("trials:grouptConsistencyAnalysis:message:msg1"));
return;
}
this.btnLoading = true
this.loading = true
this.btnLoading = true;
this.loading = true;
var params = {
TrialId: this.$route.query.trialId,
SubejctIdList: this.SelectList.map(v => v.SubjectId),
SubejctIdList: this.SelectList.map((v) => v.SubjectId),
IsAutoAllocateGenerateTask: IsAutoAllocateGenerateTask,
TrialReadingCriterionId: this.TrialReadingCriterionId
}
confirmGenerateGroupConsistentTask(params).then(res => {
this.loading = false
this.btnLoading = false
// ''
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.close()
this.$emit('getList')
}).catch(() => {
this.loading = false
this.btnLoading = false
})
TrialReadingCriterionId: this.TrialReadingCriterionId,
};
confirmGenerateGroupConsistentTask(params)
.then((res) => {
this.loading = false;
this.btnLoading = false;
// ''
this.$message.success(this.$t("common:message:savedSuccessfully"));
this.close();
this.$emit("getList");
})
.catch(() => {
this.loading = false;
this.btnLoading = false;
});
},
getList() {
this.searchData.TrialId = this.$route.query.trialId
this.loading = true
this.searchData.TrialReadingCriterionId = this.TrialReadingCriterionId
getGroupConsistentRuleSubjectList(this.searchData).then(res => {
if (res.OtherInfo.Rule) {
this.$emit('setReaderRulesFormVisible', false)
} else {
this.$emit('setReaderRulesFormVisible', true)
}
this.IsAllowAutoAllocate = res.OtherInfo.IsAllowAutoAllocate
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
}).catch(() => { this.loading = false })
this.searchData.TrialId = this.$route.query.trialId;
this.loading = true;
this.searchData.TrialReadingCriterionId = this.TrialReadingCriterionId;
getGroupConsistentRuleSubjectList(this.searchData)
.then((res) => {
if (res.OtherInfo.Rule) {
this.$emit("setReaderRulesFormVisible", false);
} else {
this.$emit("setReaderRulesFormVisible", true);
}
this.IsAllowAutoAllocate = res.OtherInfo.IsAllowAutoAllocate;
this.loading = false;
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
})
.catch(() => {
this.loading = false;
});
},
close() {
this.$emit("close");
},
close() { this.$emit('close') },
//
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>

View File

@ -10,39 +10,105 @@
>
<div class="base-dialog-body">
<!-- 访视数 -->
<el-form-item :label="$t('trials:consistencyAnalysisRule:table:visitNum')" prop="PlanVisitCount">
<el-input-number v-model="form.PlanVisitCount" :disabled="isDisable" :min="0" controls-position="right" />
<el-form-item
:label="$t('trials:consistencyAnalysisRule:table:visitNum')"
prop="PlanVisitCount"
>
<el-input-number
v-model="form.PlanVisitCount"
:disabled="isDisable"
:min="1"
controls-position="right"
/>
</el-form-item>
<!-- 所选访视是否有阅片期 -->
<el-form-item :label="$t('trials:consistencyAnalysisRule:table:isReadingPeriod')" prop="IsHaveReadingPeriod">
<el-radio-group v-model="form.IsHaveReadingPeriod" :disabled="isDisable" @change="form.IsGenerateGlobalTask = form.IsHaveReadingPeriod">
<el-radio v-for="item of $d.YesOrNo" :key="'form.IsHaveReadingPeriod' + item.value" :label="item.value">{{ item.label }}</el-radio>
<el-form-item
:label="$t('trials:consistencyAnalysisRule:table:isReadingPeriod')"
prop="IsHaveReadingPeriod"
>
<el-radio-group
v-model="form.IsHaveReadingPeriod"
:disabled="isDisable || ruleOtherInfo.IsReadingTaskViewInOrder !== 1"
@change="form.IsGenerateGlobalTask = form.IsHaveReadingPeriod"
>
<el-radio
v-for="item of $d.YesOrNo"
:key="'form.IsHaveReadingPeriod' + item.value"
:label="item.value"
>{{ item.label }}</el-radio
>
</el-radio-group>
</el-form-item>
<!-- 间隔周期 -->
<el-form-item v-if="isSelfAnalysis" :label="$t('trials:consistencyAnalysisRule:table:intervalPeriod')" prop="IntervalWeeks">
<el-input-number v-model="form.IntervalWeeks" :min="0" :disabled="isDisable" controls-position="right" />
<el-form-item
v-if="isSelfAnalysis"
:label="$t('trials:consistencyAnalysisRule:table:intervalPeriod')"
prop="IntervalWeeks"
>
<el-input-number
v-model="form.IntervalWeeks"
:min="0"
:disabled="isDisable"
controls-position="right"
/>
</el-form-item>
<!-- 计划病例数 -->
<el-form-item :label="$t('trials:consistencyAnalysisRule:table:plannedNum')" prop="PlanSubjectCount">
<el-input-number v-model="form.PlanSubjectCount" :min="0" :disabled="isDisable" controls-position="right" />
<el-form-item
:label="$t('trials:consistencyAnalysisRule:table:plannedNum')"
prop="PlanSubjectCount"
>
<el-input-number
v-model="form.PlanSubjectCount"
:min="0"
:disabled="isDisable"
controls-position="right"
/>
</el-form-item>
<!-- 虚拟中心编号 -->
<el-form-item :label="$t('trials:consistencyAnalysisRule:table:siteCode')" prop="BlindTrialSiteCode">
<el-input v-model="form.BlindTrialSiteCode" maxlength="10" style="width: 140px;" :disabled="!!Result.BlindTrialSiteCode || !!OtherInfo.VitrualSiteCode" @input="(v)=>(form.BlindTrialSiteCode = v.replace(/[^\a-\z\A-\Z0-9]/g, ''))"/>
<el-form-item
:label="$t('trials:consistencyAnalysisRule:table:siteCode')"
prop="BlindTrialSiteCode"
>
<el-input
v-model="form.BlindTrialSiteCode"
maxlength="10"
style="width: 140px"
:disabled="!!Result.BlindTrialSiteCode || !!OtherInfo.VitrualSiteCode"
@input="
(v) =>
(form.BlindTrialSiteCode = v.replace(/[^\a-\z\A-\Z0-9]/g, ''))
"
/>
</el-form-item>
<!-- 虚拟受试者位数 -->
<el-form-item :label="$t('trials:consistencyAnalysisRule:table:subjectNum')" prop="BlindSubjectNumberOfPlaces">
<el-input-number v-model="form.BlindSubjectNumberOfPlaces" :min="1" :disabled="isDisable" :max="5" controls-position="right" />
<el-form-item
:label="$t('trials:consistencyAnalysisRule:table:subjectNum')"
prop="BlindSubjectNumberOfPlaces"
>
<el-input-number
v-model="form.BlindSubjectNumberOfPlaces"
:min="1"
:disabled="isDisable"
:max="5"
controls-position="right"
/>
</el-form-item>
<!-- 是否生成全局阅片任务 -->
<el-form-item :label="$t('trials:consistencyAnalysisRule:table:isGenerateGlobalTask')" prop="IsGenerateGlobalTask">
<el-form-item
:label="$t('trials:consistencyAnalysisRule:table:isGenerateGlobalTask')"
prop="IsGenerateGlobalTask"
>
<el-radio-group v-model="form.IsGenerateGlobalTask" disabled>
<el-radio v-for="item of $d.YesOrNo" :key="'form.IsGenerateGlobalTask' + item.value" :label="item.value">{{ item.label }}</el-radio>
<el-radio
v-for="item of $d.YesOrNo"
:key="'form.IsGenerateGlobalTask' + item.value"
:label="item.value"
>{{ item.label }}</el-radio
>
</el-radio-group>
</el-form-item>
</div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
<el-form-item>
<!-- 取消 -->
<el-button
@ -51,64 +117,73 @@
type="primary"
@click="close"
>
{{ $t('common:button:cancel') }}
{{ $t("common:button:cancel") }}
</el-button>
<!-- 保存 -->
<el-button size="small" type="primary" :loading="btnLoading" :disabled="isDisable" @click="save">
{{ $t('common:button:save') }}
<el-button
size="small"
type="primary"
:loading="btnLoading"
:disabled="isDisable"
@click="save"
>
{{ $t("common:button:save") }}
</el-button>
</el-form-item>
</div>
</el-form>
</template>
<script>
import { getConsistentRule, addOrUpdateTaskConsistentRule } from '@/api/trials/reading'
import {
getConsistentRule,
addOrUpdateTaskConsistentRule,
} from "@/api/trials/reading";
export default {
name: 'AddOrUpdateTaskAllocationRuleData',
name: "AddOrUpdateTaskAllocationRuleData",
props: {
TrialReadingCriterionId: {
type: String,
default() {
return ''
}
return "";
},
},
OtherInfo: {
type: Object,
default() {
return {}
}
return {};
},
},
trialCriterionList: {
type: Array,
default() {
return []
}
return [];
},
},
data: {
type: Object,
default() {
return {}
}
return {};
},
},
isDisable: {
type: Boolean,
default() {
return true
}
return true;
},
},
isSelfAnalysis: {
type: Boolean,
default() {
return true
}
return true;
},
},
doctorUserList: {
type: Array,
default() {
return []
}
}
return [];
},
},
},
data() {
return {
@ -120,81 +195,133 @@ export default {
IntervalWeeks: 3,
IsHaveReadingPeriod: null,
IsGenerateGlobalTask: null,
BlindTrialSiteCode: '',
BlindTrialSiteCode: "",
BlindSubjectNumberOfPlaces: 3,
IsEnable: true,
Note: ''
Note: "",
},
Result:{}, //
Result: {}, //
rules: {
IsHaveReadingPeriod: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }],
IsGenerateGlobalTask: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }],
PlanSubjectCount: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
IntervalWeeks: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
PlanVisitCount: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
BlindTrialSiteCode: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
BlindSubjectNumberOfPlaces: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
IsHaveReadingPeriod: [
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: "blur",
},
],
IsGenerateGlobalTask: [
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: "blur",
},
],
PlanSubjectCount: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
],
IntervalWeeks: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
],
PlanVisitCount: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
],
BlindTrialSiteCode: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
],
BlindSubjectNumberOfPlaces: [
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
],
},
loading: false,
btnLoading: false
}
btnLoading: false,
ruleOtherInfo: {},
};
},
mounted() {
// this.form.TrialId = this.$route.query.trialId
// if (Object.keys(this.data).length && this.data.Id) {
// this.form = { ...this.data }
// }
this.getFrom()
this.getFrom();
},
watch:{
"OtherInfo.VitrualSiteCode":{
handler(){
watch: {
"OtherInfo.VitrualSiteCode": {
handler() {
this.form.BlindTrialSiteCode = this.OtherInfo.VitrualSiteCode;
}
}
},
},
},
methods: {
getFrom() {
getConsistentRule({
TrialId: this.$route.query.trialId,
IsSelfAnalysis: this.isSelfAnalysis,
TrialReadingCriterionId: this.TrialReadingCriterionId
}).then(res => {
if (res.Result) {
this.form = res.Result;
this.Result = JSON.parse(JSON.stringify(res.Result));
TrialReadingCriterionId: this.TrialReadingCriterionId,
}).then((res) => {
this.ruleOtherInfo =
{ IsReadingTaskViewInOrder: res.Result.IsReadingTaskViewInOrder } ||
{};
if (res.Result.ConsistentRuleBasic) {
this.form = res.Result.ConsistentRuleBasic;
this.Result = JSON.parse(
JSON.stringify(res.Result.ConsistentRuleBasic)
);
} else {
let o = this.trialCriterionList.find(v => {
return v.TrialReadingCriterionId === this.TrialReadingCriterionId
})
this.form.IsHaveReadingPeriod = o.IsReadingPeriod
this.form.IsGenerateGlobalTask = o.IsReadingPeriod
let o = this.trialCriterionList.find((v) => {
return v.TrialReadingCriterionId === this.TrialReadingCriterionId;
});
this.form.IsHaveReadingPeriod = o.IsReadingPeriod;
this.form.IsGenerateGlobalTask = o.IsReadingPeriod;
}
this.form.BlindTrialSiteCode = this.OtherInfo.VitrualSiteCode
})
this.form.BlindTrialSiteCode = this.OtherInfo.VitrualSiteCode;
});
},
save() {
this.$refs.taskAllocationRuleDataForm.validate(valid => {
if (!valid) return
this.btnLoading = true
this.loading = true
this.form.IsSelfAnalysis = this.isSelfAnalysis
this.form.TrialReadingCriterionId = this.TrialReadingCriterionId
addOrUpdateTaskConsistentRule(this.form).then(res => {
this.loading = false
this.btnLoading = false
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$emit('close')
this.$emit('getList')
}).catch(() => {
this.loading = false
this.btnLoading = false
})
})
this.$refs.taskAllocationRuleDataForm.validate((valid) => {
if (!valid) return;
this.btnLoading = true;
this.loading = true;
this.form.IsSelfAnalysis = this.isSelfAnalysis;
this.form.TrialReadingCriterionId = this.TrialReadingCriterionId;
addOrUpdateTaskConsistentRule(this.form)
.then((res) => {
this.loading = false;
this.btnLoading = false;
this.$message.success(this.$t("common:message:savedSuccessfully"));
this.$emit("close");
this.$emit("getList");
})
.catch(() => {
this.loading = false;
this.btnLoading = false;
});
});
},
close() { this.$emit('close') }
}
}
close() {
this.$emit("close");
},
},
};
</script>
<style lang="scss" scoped>
</style>

View File

@ -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')

View File

@ -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')

View File

@ -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

View File

@ -1247,7 +1247,8 @@ export default {
store.dispatch('reading/setActiveSeries', series)
store.dispatch('reading/setLastCanvasTaskId', series.visitTaskId)
}
this.$refs[`dicomCanvas${index}`][0].loadImageStack(series)
const s = Object.assign({}, series)
this.$refs[`dicomCanvas${index}`][0].loadImageStack(s)
if (this.activeTool) {
if (series.isCurrentTask && series.readingTaskState < 2) {
@ -1270,7 +1271,8 @@ export default {
this.canvasObj[this.currentDicomCanvasIndex] = dicomSeries
this.$nextTick(() => {
this.activeSeries = dicomSeries
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].loadImageStack(dicomSeries).then(res => {
const s = Object.assign({}, dicomSeries)
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].loadImageStack(s).then(res => {
if (this.activeTool) {
if (dicomSeries.isCurrentTask && dicomSeries.readingTaskState < 2) {
this.$nextTick(() => {
@ -1331,7 +1333,8 @@ export default {
// }
this.$nextTick(() => {
this.activeSeries = dicomSeries
this.$refs[`dicomCanvas${canvasIndex}`][0].loadImageStack(dicomSeries)
const s = Object.assign({}, dicomSeries)
this.$refs[`dicomCanvas${canvasIndex}`][0].loadImageStack(s)
store.dispatch('reading/setActiveSeries', dicomSeries)
if (this.currentDicomCanvasIndex === this.maxCanvas - 1) {
@ -1406,7 +1409,8 @@ export default {
var promiseArr = []
for (let i = 0; i < this.maxCanvas && i < seriesStack.length; i++) {
this.canvasObj[i] = seriesStack[i]
promiseArr.push(this.$refs[`dicomCanvas${i}`][0].loadImageStack(seriesStack[i]))
const s = Object.assign({}, seriesStack[i])
promiseArr.push(this.$refs[`dicomCanvas${i}`][0].loadImageStack(s))
}
Promise.all(promiseArr).then(() => {
// this.activateDicomCanvas(this.currentDicomCanvasIndex)
@ -1509,12 +1513,14 @@ export default {
for (let i = 0; i < this.maxCanvas; i++) {
if (i === this.maxCanvas - 1) {
loadImagePromises.push(this.$refs[`dicomCanvas${i}`][0].loadImageStack(currentAddSeries))
const s = Object.assign({}, currentAddSeries)
loadImagePromises.push(this.$refs[`dicomCanvas${i}`][0].loadImageStack(s))
this.currentDicomCanvasIndex = i
this.activeSeries = currentAddSeries
store.dispatch('reading/setActiveSeries', currentAddSeries)
} else {
loadImagePromises.push(this.$refs[`dicomCanvas${i}`][0].loadImageStack(firstAddSeries))
const s = Object.assign({}, firstAddSeries)
loadImagePromises.push(this.$refs[`dicomCanvas${i}`][0].loadImageStack(s))
}
}
Promise.all(loadImagePromises)

View File

@ -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() {

View File

@ -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 {

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