报表导出配置及阅片bug修复
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
8799431f7a
commit
2b987fb1ae
|
@ -3931,4 +3931,23 @@ export function updateTrialUserRole(data) {
|
||||||
method: 'put',
|
method: 'put',
|
||||||
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
|
||||||
|
})
|
||||||
}
|
}
|
|
@ -328,6 +328,7 @@ export default {
|
||||||
if (!isNaN(parseInt(isMeasurable)) && parseInt(isMeasurable) === 1) {
|
if (!isNaN(parseInt(isMeasurable)) && parseInt(isMeasurable) === 1) {
|
||||||
this.isDisabledMeasurableRadio = true
|
this.isDisabledMeasurableRadio = true
|
||||||
}
|
}
|
||||||
|
i.MeasureData = JSON.parse(i.MeasureData)
|
||||||
}
|
}
|
||||||
this.markList.push({tableQuestionId: i.TableQuestionId, measureData: i, saveEnum: 1})
|
this.markList.push({tableQuestionId: i.TableQuestionId, measureData: i, saveEnum: 1})
|
||||||
})
|
})
|
||||||
|
|
|
@ -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>
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<!--导出-->
|
<!--导出-->
|
||||||
<el-button
|
<!-- <el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
:disabled="!(trialCriterionList.length > 0)"
|
:disabled="!(trialCriterionList.length > 0)"
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
|
@ -10,48 +10,84 @@
|
||||||
style="margin-bottom: 10px"
|
style="margin-bottom: 10px"
|
||||||
>
|
>
|
||||||
{{ $t('common:button:export') }}
|
{{ $t('common:button:export') }}
|
||||||
</el-button>
|
</el-button> -->
|
||||||
<el-tabs type="border-card" v-model="TrialReadingCriterionId">
|
<el-tabs v-model="exportType">
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
:label="i.TrialReadingCriterionName"
|
label="报表导出"
|
||||||
:name="i.TrialReadingCriterionId"
|
name="report"
|
||||||
v-for="i of trialCriterionList"
|
|
||||||
:key="i.TrialReadingCriterionId"
|
|
||||||
>
|
>
|
||||||
<el-table v-loading="loading" :data="list" border stripe>
|
<el-tabs type="border-card" v-model="TrialReadingCriterionId">
|
||||||
<el-table-column label="" :min-width="50">
|
<el-tab-pane
|
||||||
<template slot-scope="scope">
|
:label="i.TrialReadingCriterionName"
|
||||||
{{ scope.$index + 1 }}
|
:name="i.TrialReadingCriterionId"
|
||||||
</template>
|
v-for="i of trialCriterionList"
|
||||||
</el-table-column>
|
:key="i.TrialReadingCriterionId"
|
||||||
<!-- 文件名称 -->
|
|
||||||
<el-table-column
|
|
||||||
:label="$t('trials:reviewTrack:title:fileName')"
|
|
||||||
:min-width="50"
|
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<el-table v-if="TrialReadingCriterionId === i.TrialReadingCriterionId" v-loading="loading" :data="list" border stripe height="500">
|
||||||
{{ scope.row.FileName }}
|
<el-table-column label="" :min-width="50">
|
||||||
</template>
|
<template slot-scope="scope">
|
||||||
</el-table-column>
|
{{ scope.$index + 1 }}
|
||||||
<el-table-column
|
</template>
|
||||||
prop=""
|
</el-table-column>
|
||||||
:label="$t('common:action:action')"
|
<!-- 文件名称 -->
|
||||||
min-width="80"
|
<el-table-column
|
||||||
>
|
:label="$t('trials:reviewTrack:title:fileName')"
|
||||||
<template slot-scope="scope">
|
:min-width="50"
|
||||||
<!-- 下载 -->
|
>
|
||||||
<el-button
|
<template slot-scope="scope">
|
||||||
icon="el-icon-download"
|
{{ scope.row.FileName }}
|
||||||
circle
|
</template>
|
||||||
:title="$t('trials:reviewTrack:title:download')"
|
</el-table-column>
|
||||||
size="mini"
|
<el-table-column
|
||||||
@click="handleExport(scope.row.ExportCatogory)"
|
prop=""
|
||||||
|
:label="$t('common:action:action')"
|
||||||
|
min-width="80"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<!-- 下载 -->
|
||||||
|
<el-button
|
||||||
|
icon="el-icon-download"
|
||||||
|
circle
|
||||||
|
:title="$t('trials:reviewTrack:title:download')"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport(scope.row.ExportCatogory)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</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"
|
||||||
/>
|
/>
|
||||||
</template>
|
</el-tab-pane>
|
||||||
</el-table-column>
|
</el-tabs>
|
||||||
</el-table>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane
|
||||||
|
label="CDISC导出配置"
|
||||||
|
name="CDISCConfig"
|
||||||
|
>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -66,9 +102,12 @@ import {
|
||||||
getDetailedOfEvaluatedLesion_Export,
|
getDetailedOfEvaluatedLesion_Export,
|
||||||
} from '@/api/export'
|
} from '@/api/export'
|
||||||
import { getTrialCriterionList } from '@/api/trials/reading'
|
import { getTrialCriterionList } from '@/api/trials/reading'
|
||||||
|
import configList from './configList'
|
||||||
export default {
|
export default {
|
||||||
name: 'exportList',
|
name: 'exportList',
|
||||||
|
components: {
|
||||||
|
configList
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
|
@ -76,6 +115,8 @@ export default {
|
||||||
TrialReadingCriterionId: null,
|
TrialReadingCriterionId: null,
|
||||||
trialId: null,
|
trialId: null,
|
||||||
list: [],
|
list: [],
|
||||||
|
exportType:'report',
|
||||||
|
configTrialReadingCriterionId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -189,6 +230,7 @@ export default {
|
||||||
this.trialCriterionList = res.Result
|
this.trialCriterionList = res.Result
|
||||||
this.TrialReadingCriterionId =
|
this.TrialReadingCriterionId =
|
||||||
this.trialCriterionList[0].TrialReadingCriterionId
|
this.trialCriterionList[0].TrialReadingCriterionId
|
||||||
|
this.configTrialReadingCriterionId = this.trialCriterionList[0].TrialReadingCriterionId
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
|
|
|
@ -833,9 +833,11 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-if="exportVisible"
|
v-if="exportVisible"
|
||||||
|
v-dialogDrag
|
||||||
:title="$t('trials:reviewTrack:button:export')"
|
:title="$t('trials:reviewTrack:button:export')"
|
||||||
:visible.sync="exportVisible"
|
:visible.sync="exportVisible"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
|
width="80%"
|
||||||
append-to-body>
|
append-to-body>
|
||||||
<exportList :trial-reading-criterion-id="TrialReadingCriterionId" :data="searchData" />
|
<exportList :trial-reading-criterion-id="TrialReadingCriterionId" :data="searchData" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
Loading…
Reference in New Issue