报表导出配置及阅片bug修复
continuous-integration/drone/push Build is passing Details

uat_us
caiyiling 2025-01-02 10:57:58 +08:00
parent 8799431f7a
commit 2b987fb1ae
5 changed files with 205 additions and 38 deletions

View File

@ -3932,3 +3932,22 @@ export function updateTrialUserRole(data) {
data
})
}
// 获取报表配置
export function getTrialQuestionExportResult(data) {
return request({
url: `/ReadingQuestion/getTrialQuestionExportResult`,
method: 'post',
data
})
}
// 修改报表配置
export function setTrialQuestionExportResult(data) {
return request({
url: `/ReadingQuestion/SetTrialQuestionExportResult`,
method: 'post',
data
})
}

View File

@ -328,6 +328,7 @@ export default {
if (!isNaN(parseInt(isMeasurable)) && parseInt(isMeasurable) === 1) {
this.isDisabledMeasurableRadio = true
}
i.MeasureData = JSON.parse(i.MeasureData)
}
this.markList.push({tableQuestionId: i.TableQuestionId, measureData: i, saveEnum: 1})
})

View File

@ -0,0 +1,103 @@
<template>
<div>
<el-button type="primary" size="mini" @click="submit" style="margin-bottom: 5px;">提交</el-button>
<el-table
v-loading="loading"
:data="exportInfo.QuestionList"
height="500"
row-key="Id"
border
default-expand-all
:tree-props="{ children: 'Children', hasChildren: 'hasChildren' }"
>
<el-table-column prop="QuestionName" label="问题" width="300">
</el-table-column>
<el-table-column :key="item.Code" v-for="item in exportInfo.DicList" :label="item.ValueCN" >
<template v-slot="scope">
<el-checkbox
@change="() => changeState(scope, item.Code)"
:checked="getCheckState(scope, item.Code)">
</el-checkbox>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { getTrialQuestionExportResult, setTrialQuestionExportResult } from '@/api/trials'
export default {
name: 'configList',
props: {
trialReadingCriterionId: {
type: String,
required: true
}
},
data() {
return {
loading: false,
exportInfo: []
}
},
mounted() {
this.getConfigInfo()
},
methods: {
async getConfigInfo() {
try {
this.loading = true
let res = await getTrialQuestionExportResult({trialReadingCriterionId: this.trialReadingCriterionId})
if (res.IsSuccess) {
this.exportInfo = res.Result
}
this.loading = false
} catch(e) {
this.loading = false
console.log(e)
}
},
async submit() {
this.loading = true
try {
let params= {
questionList: [],
tableQuestionList: []
}
params.questionList = this.exportInfo.QuestionList.map(i => {
return {
questionId: i.QuestionId,
tableQuestionId: i.TableQuestionId,
exportResult: i.ExportResult
}
})
this.exportInfo.QuestionList.forEach(i => {
let childlist = i.Children.map(k => {
return {
questionId: i.QuestionId,
tableQuestionId: k.TableQuestionId,
exportResult: k.ExportResult,
}
})
params.tableQuestionList = params.tableQuestionList.concat(childlist)
})
let res = await setTrialQuestionExportResult(params)
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
this.loading = false
} catch(e) {
this.loading = false
console.log(e)
}
},
//
getCheckState(item, code) {
return item.row.ExportResult.indexOf(code) > -1;
},
//
changeState(item, code) {
item.row.ExportResult.indexOf(code)>-1?item.row.ExportResult.splice(item.row.ExportResult.indexOf(code), 1):item.row.ExportResult.push(code);
},
}
}
</script>

View File

@ -1,7 +1,7 @@
<template>
<div style="text-align: right">
<!--导出-->
<el-button
<!-- <el-button
type="primary"
:disabled="!(trialCriterionList.length > 0)"
icon="el-icon-download"
@ -10,7 +10,12 @@
style="margin-bottom: 10px"
>
{{ $t('common:button:export') }}
</el-button>
</el-button> -->
<el-tabs v-model="exportType">
<el-tab-pane
label="报表导出"
name="report"
>
<el-tabs type="border-card" v-model="TrialReadingCriterionId">
<el-tab-pane
:label="i.TrialReadingCriterionName"
@ -18,7 +23,7 @@
v-for="i of trialCriterionList"
:key="i.TrialReadingCriterionId"
>
<el-table v-loading="loading" :data="list" border stripe>
<el-table v-if="TrialReadingCriterionId === i.TrialReadingCriterionId" v-loading="loading" :data="list" border stripe height="500">
<el-table-column label="" :min-width="50">
<template slot-scope="scope">
{{ scope.$index + 1 }}
@ -52,6 +57,37 @@
</el-table>
</el-tab-pane>
</el-tabs>
</el-tab-pane>
<el-tab-pane
label="CDISC导出"
name="CDISC"
>
</el-tab-pane>
<el-tab-pane
label="报表导出配置"
name="reportConfig"
>
<el-tabs type="border-card" v-model="configTrialReadingCriterionId">
<el-tab-pane
:label="i.TrialReadingCriterionName"
:name="i.TrialReadingCriterionId"
v-for="i of trialCriterionList"
:key="i.TrialReadingCriterionId"
>
<configList
v-if="configTrialReadingCriterionId === i.TrialReadingCriterionId && exportType === 'reportConfig'"
:trialReadingCriterionId="i.TrialReadingCriterionId"
/>
</el-tab-pane>
</el-tabs>
</el-tab-pane>
<el-tab-pane
label="CDISC导出配置"
name="CDISCConfig"
>
</el-tab-pane>
</el-tabs>
</div>
</template>
@ -66,9 +102,12 @@ import {
getDetailedOfEvaluatedLesion_Export,
} from '@/api/export'
import { getTrialCriterionList } from '@/api/trials/reading'
import configList from './configList'
export default {
name: 'exportList',
components: {
configList
},
data() {
return {
loading: false,
@ -76,6 +115,8 @@ export default {
TrialReadingCriterionId: null,
trialId: null,
list: [],
exportType:'report',
configTrialReadingCriterionId: ''
}
},
props: {
@ -189,6 +230,7 @@ export default {
this.trialCriterionList = res.Result
this.TrialReadingCriterionId =
this.trialCriterionList[0].TrialReadingCriterionId
this.configTrialReadingCriterionId = this.trialCriterionList[0].TrialReadingCriterionId
})
.catch(() => {})
},

View File

@ -833,9 +833,11 @@
</el-dialog>
<el-dialog
v-if="exportVisible"
v-dialogDrag
:title="$t('trials:reviewTrack:button:export')"
:visible.sync="exportVisible"
:close-on-click-modal="false"
width="80%"
append-to-body>
<exportList :trial-reading-criterion-id="TrialReadingCriterionId" :data="searchData" />
</el-dialog>