uat_us
caiyiling 2024-03-27 11:02:33 +08:00
commit 2d94f07796
2 changed files with 89 additions and 10 deletions

View File

@ -0,0 +1,60 @@
<template>
<div style="text-align: left">
<el-tabs type="border-card" v-model="TrialReadingCriterionId" style="height:300px">
<el-tab-pane :label="i.TrialReadingCriterionName" :name="i.TrialReadingCriterionId" v-for="i of trialCriterionList" :key="i.TrialReadingCriterionId">
<div class="message">
<span>{{$t('trials:consistencyAnalysis:button:exportSelf')}}</span>
<el-button type="primary" icon="el-icon-download" @click="handleExport(1)" size="mini">
{{$t('common:button:export')}}
</el-button>
</div>
<div class="message">
<span>{{$t('trials:consistencyAnalysis:button:exportGroup')}}</span>
<el-button type="primary" icon="el-icon-download" @click="handleExport(2)" size="mini">
{{$t('common:button:export')}}
</el-button>
</div>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import { getTrialCriterionList } from '@/api/trials/reading'
export default {
name: "exportList",
data() {
return {
TrialReadingCriterionId: null,
trialId: null,
}
},
mounted() {
this.trialId =this.$route.query.trialId
this.getTrialCriterionList()
},
methods: {
handleExport(type) {
this.$emit("handleExport",type,this.TrialReadingCriterionId)
},
getTrialCriterionList() {
getTrialCriterionList(this.trialId).then(res => {
this.trialCriterionList = res.Result
this.TrialReadingCriterionId = this.trialCriterionList[0].TrialReadingCriterionId
}).catch(() => {})
}
}
}
</script>
<style scoped>
.message{
display:flex;
align-items:center;
line-height:60px;
}
.message span{
margin-right:20px;
}
</style>

View File

@ -91,14 +91,12 @@
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
<el-button type="primary" icon="el-icon-download" @click="handleExport(1)">
<!-- {{ $t('common:button:export') }}{{$t('trials:consistencyAnalysis:button:self')}}-->
<!-- <el-button type="primary" icon="el-icon-download" @click="handleExport(1)">
{{$t('trials:consistencyAnalysis:button:exportSelf')}}
</el-button>
<el-button type="primary" icon="el-icon-download" @click="handleExport(2)">
<!-- {{ $t('common:button:export') }}{{$t('trials:consistencyAnalysis:button:group')}}-->
{{$t('trials:consistencyAnalysis:button:exportGroup')}}
</el-button>
</el-button> -->
<!-- 自身一致性分析 -->
<el-button type="primary" v-if="hasPermi(['trials:trials-panel:reading:consistency-analysis:edit'])" @click="openTaskConsistentRule(true)">
{{$t('trials:consistencyAnalysis:button:self')}}
@ -111,6 +109,10 @@
<el-button type="primary" v-if="hasPermi(['trials:trials-panel:reading:consistency-analysis:edit'])" @click="openSite()">
{{$t('trials:consistencyAnalysis:button:site')}}
</el-button>
<!--导出-->
<el-button type="primary" icon="el-icon-download" @click="exportVisible = true">
{{$t('common:button:export')}}
</el-button>
</el-form-item>
</el-form>
</template>
@ -628,6 +630,14 @@
</el-button>
</div>
</el-dialog>
<el-dialog
v-if="exportVisible"
:title="$t('trials:reviewTrack:button:export')"
:visible.sync="exportVisible"
:close-on-click-modal="false"
append-to-body>
<exportList :trial-reading-criterion-id="TrialReadingCriterionId" @handleExport="handleExport"/>
</el-dialog>
</template>
</BaseContainer>
</template>
@ -641,6 +651,7 @@ import VirtualCenter from './components/VirtualCenter'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
import { getToken } from '@/utils/auth'
import exportList from './components/exportList.vue'
const searchDataDefault = () => {
return {
PageIndex: 1,
@ -665,7 +676,7 @@ const searchDataDefault = () => {
}
export default {
name: 'TrialsNotice',
components: { BaseContainer, Pagination, ReaderRulesForm, DoctorConsistentRuleSubjectTable, GroupConsistentRuleSubjectTable, VirtualCenter },
components: {exportList, BaseContainer, Pagination, ReaderRulesForm, DoctorConsistentRuleSubjectTable, GroupConsistentRuleSubjectTable, VirtualCenter },
data() {
return {
TrialReadingCriterionId: null,
@ -704,7 +715,9 @@ export default {
},
changeNum: 0,
openWindow:null,
isOpenSite: false
isOpenSite: false,
exportVisible:false
}
},
mounted() {
@ -722,16 +735,22 @@ export default {
openSite() {
this.isOpenSite = true
},
handleExport(type) {
if (!this.searchData.TrialReadingCriterionId) {
handleExport(type,TrialReadingCriterionId) {
// if (!this.searchData.TrialReadingCriterionId) {
// this.$alert(this.$t('trials:consistencyAnalysis:message:selectCriterion'))//''
// return
// }
if (!TrialReadingCriterionId) {
this.$alert(this.$t('trials:consistencyAnalysis:message:selectCriterion'))//''
return
}
let obj = JSON.parse(JSON.stringify(this.searchData));
obj.TrialReadingCriterionId = TrialReadingCriterionId;
if (type === 1) {
getSelfAnalysisTaskList_Export(this.searchData).then(res => {
getSelfAnalysisTaskList_Export(obj).then(res => {
}).catch(() => { this.loading = false })
} else {
getGroupAnalysisTaskList_Export(this.searchData).then(res => {
getGroupAnalysisTaskList_Export(obj).then(res => {
}).catch(() => { this.loading = false })
}
},