diff --git a/src/api/export.js b/src/api/export.js index 777ae1ab..12ccf939 100644 --- a/src/api/export.js +++ b/src/api/export.js @@ -325,3 +325,21 @@ export function getTrialSiteSurveyList_Export(data) { data }) } +// 导出中心设备 +export function getSiteSurveyEquipmentList_Export(data) { + return requestDownload({ + url: `/ExcelExport/getSiteSurveyEquipmentList_Export`, + responseType: 'blob', + method: 'post', + data + }) +} +// 导出中心调研基本信息 +export function getSiteSurveyInfoList_Export(data) { + return requestDownload({ + url: `/ExcelExport/getSiteSurveyInfoList_Export`, + responseType: 'blob', + method: 'post', + data + }) +} diff --git a/src/views/trials/trials-panel/attachments/site-research/components/Equipments.vue b/src/views/trials/trials-panel/attachments/site-research/components/Equipments.vue index c0006718..eecef642 100644 --- a/src/views/trials/trials-panel/attachments/site-research/components/Equipments.vue +++ b/src/views/trials/trials-panel/attachments/site-research/components/Equipments.vue @@ -6,12 +6,8 @@ - + @@ -32,11 +28,7 @@ - + {{ $t('common:button:export') }} @@ -44,150 +36,132 @@ @@ -196,6 +170,7 @@ import { getTrialSiteSelect } from '@/api/trials' import { getSiteSurveyEquipmentList } from '@/api/research' import BaseContainer from '@/components/BaseContainer' import Pagination from '@/components/Pagination' +import { getSiteSurveyEquipmentList_Export } from '@/api/export' const searchDataDefault = () => { return { SortField: '', @@ -228,6 +203,9 @@ export default { this.getSite() }, methods: { + async handleExport() { + await getSiteSurveyEquipmentList_Export(this.searchData) + }, async getList() { try { this.loading = true @@ -243,19 +221,6 @@ export default { this.equipmentControlFieldList.push(item.FiledName) }) } - } catch(e) { - console.log(e) - } finally { - this.loading = false - } - }, - // 导出 - async handleExport() { - try { - this.searchData.TrialId = this.trialId - this.loading = true - const { SortField, Asc, PageIndex, PageSize, ...param } = { ...this.searchData } - await trialSiteUserSummaryListExport({ ...param }) } catch (e) { console.log(e) } finally { diff --git a/src/views/trials/trials-panel/attachments/site-research/components/Questions.vue b/src/views/trials/trials-panel/attachments/site-research/components/Questions.vue index 742a23ee..eaabdf6f 100644 --- a/src/views/trials/trials-panel/attachments/site-research/components/Questions.vue +++ b/src/views/trials/trials-panel/attachments/site-research/components/Questions.vue @@ -28,7 +28,7 @@ - + {{ $t('common:button:export') }} @@ -97,7 +97,7 @@ + :label="$t('trials:researchForm:form:SiteSurveyFile')" show-overflow-tooltip min-width="100"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + @@ -190,6 +208,7 @@ import { getTrialSiteSelect } from '@/api/trials' import { getSiteSurveyInfoList } from '@/api/research' import BaseContainer from '@/components/BaseContainer' import Pagination from '@/components/Pagination' +import { getSiteSurveyInfoList_Export } from '@/api/export' const searchDataDefault = () => { return { SortField: '', @@ -222,6 +241,9 @@ export default { this.getSite() }, methods: { + async handleExport() { + await getSiteSurveyInfoList_Export(this.searchData) + }, async getList() { try { this.loading = true @@ -239,19 +261,6 @@ export default { this.loading = false } }, - // 导出 - async handleExport() { - try { - this.searchData.TrialId = this.trialId - this.loading = true - const { SortField, Asc, PageIndex, PageSize, ...param } = { ...this.searchData } - await trialSiteUserSummaryListExport({ ...param }) - } catch (e) { - console.log(e) - } finally { - this.loading = false - } - }, // 获取site下拉框数据 async getSite() { try {