irc_web/.svn/pristine/21/21e7154febf8280058bbd6baaea...

70 lines
1.7 KiB
Plaintext

<template>
<el-tabs v-model="activeName" v-loading="loading" style="min-height:500px">
<el-tab-pane
v-for="criterion in criterions"
:key="criterion.ReadingQuestionCriterionTrialId"
:label="criterion.ReadingQuestionCriterionTrialName"
:name="criterion.ReadingQuestionCriterionTrialId"
>
<ECRF
:ref="criterion.readingQuestionCriterionTrialId"
:trial-id="trialId"
:subject-id="subjectId"
:criterion-id="criterion.ReadingQuestionCriterionTrialId"
:visit-task-id="visitTaskId"
/>
</el-tab-pane>
<!-- <el-tab-pane label="标准2" name="second">
<ECRF ref="second" />
</el-tab-pane> -->
</el-tabs>
</template>
<script>
import { getTrialConfirmCriterionList } from '@/api/trials'
import ECRF from './ECRF'
export default {
name: 'Criterions',
components: { ECRF },
props: {
trialId: {
type: String,
required: true
},
subjectId: {
type: String,
required: true
},
visitTaskId: {
type: String,
required: true
}
},
data() {
return {
activeName: '',
loading: false,
criterions: []
}
},
mounted() {
this.getCriterions()
},
methods: {
getCriterions() {
this.loading = true
var param = {
trialId: this.$router.currentRoute.query.trialId
}
getTrialConfirmCriterionList(param).then(res => {
this.criterions = res.Result
this.activeName = this.criterions[0].ReadingQuestionCriterionTrialId
this.loading = false
}).catch(() => { this.loading = false })
}
}
}
</script>