diff --git a/src/components/FileEcho.vue b/src/components/FileEcho.vue index 5ef4d053..10c14c73 100644 --- a/src/components/FileEcho.vue +++ b/src/components/FileEcho.vue @@ -2,13 +2,13 @@
@@ -50,6 +50,12 @@ export default { type: Boolean, required: false, default: true + }, + // 是否可以下载 + canDownload: { + type: Boolean, + required: false, + default: true } }, watch: { @@ -147,6 +153,7 @@ export default { .file { display: flex; align-items: center; + width: 100%; } .file:last-child { @@ -158,13 +165,17 @@ export default { align-items: center; color: @primary-color; cursor: pointer; - max-width: calc(100% - 97px); + max-width: 100%; } .file-info > .anticon { margin-right: 8px; } +.can-download-file-info { + max-width: calc(100% - 97px); +} + .file-name { white-space: nowrap; overflow: hidden; diff --git a/src/views/businessSupport/askForAdvice/AskForAdviceDetail.vue b/src/views/businessSupport/askForAdvice/AskForAdviceDetail.vue index 87685a52..4d305ed2 100644 --- a/src/views/businessSupport/askForAdvice/AskForAdviceDetail.vue +++ b/src/views/businessSupport/askForAdvice/AskForAdviceDetail.vue @@ -11,27 +11,22 @@
- + {{ detailFormData.standardNameNumber }}
- +
- -
- -
- - +
- + {{ detailFormData.consultationPeriod }}
@@ -58,8 +53,13 @@ :scroll="{x: '100%'}" @change="handleTableChange"> + + + @@ -73,6 +73,7 @@ import { downFile } from '../../../api/manage' import JTable from '../../../components/jero/JTable' import { JeroListMixin } from '../../../mixins/JeroListMixin' import { queryAskForAdviceDetail } from '../../../api/businessSupport' +import { StandardSource } from '../../../enums/commonEnums' export default { name: 'AskForAdviceDetail', @@ -81,7 +82,6 @@ export default { data () { return { toggleStatus: true, - detailData: {}, disableMixinCreated: true, loading: false, columns: [ @@ -165,7 +165,8 @@ export default { { dataIndex: 'basisFile', title: this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'), - width: 120 + width: 180, + scopedSlots: { customRender: 'file' } } ], /* 分页参数 */ @@ -179,7 +180,8 @@ export default { showQuickJumper: true, showSizeChanger: true, total: 0 - } + }, + detailFormData: {} // 上方表单的数据 } }, created () { @@ -195,8 +197,16 @@ export default { } queryAskForAdviceDetail(params).then(res => { if (res.success) { - console.log(res.result) - this.dataSource = res.result || [] + // 处理表格数据 + const tableResult = res.result.processFbConsultationList + this.dataSource = tableResult.records || [] + if (tableResult.total) { + this.ipagination.total = tableResult.total + } else { + this.ipagination.total = 0 + } + // 处理表单数据 + this.detailFormData = res.result.processFbStandardConsultation || {} } else { this.$message.warning(res.message) } @@ -260,6 +270,40 @@ export default { this.ipagination = pagination this.initDetailData() }, + /** + * 跳转标准详情 + */ + toDetailPage () { + const source = this.detailFormData.source + const standardId = this.detailFormData.standardId + let path + // 根据来源跳转不同的详情页 + switch (source) { + // 国内 + case StandardSource.DOMESTIC.value: + path = '/standardRegulationLibrary/DomesticStandardDetail' + break + // 海外 + case StandardSource.OVERSEAS.value: + path = '/standardRegulationLibrary/OverseasStandardDetail' + break + // 企标 + case StandardSource.ENTERPRISE.value: + path = '/enterpriseStandardLibrary/enterpriseStandardDetail' + break + default: + break + } + if (!path) { + return + } + const query = { + id: standardId + } + this.$openPageNewSheet({ + path, query + }) + }, } } @@ -277,5 +321,13 @@ export default { label { width: 6.5rem; } + + /deep/ .file-info { + font-size: 16px; + } +} + +.can-click-table-text { + color: @primary-color !important; } \ No newline at end of file