|
@@ -140,9 +140,10 @@
|
|
|
</template>
|
|
|
<!-- 试验报告下载 -->
|
|
|
<template slot="testReport" slot-scope="text, record">
|
|
|
- <a :href="$api.baseUrl + '/DFMEA/file/downloadFile.do?id=' + record.testReportId + '&fileType=17'">
|
|
|
- {{ record.testReportFileName }}
|
|
|
- </a>
|
|
|
+ <span class="clickContent" @click="onClick(record, 1)" :title="text">{{ text }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="materialsFileName" slot-scope="text, record">
|
|
|
+ <span class="clickContent" @click="onClick(record, 2)" :title="text">{{ text }}</span>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
</a-card>
|
|
@@ -502,6 +503,17 @@ export default {
|
|
|
return val === null ? this.$t('global-btn.no') : this.$t('global-btn.yes');
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ // 材料报告
|
|
|
+ title: () => this.$t('verity.dvp.material.report'),
|
|
|
+ width: 250,
|
|
|
+ align: 'center',
|
|
|
+ dataIndex: 'materialsFileName',
|
|
|
+ ellipsis: true,
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: "materialsFileName"
|
|
|
+ },
|
|
|
+ },
|
|
|
{
|
|
|
// 测试结果及分析
|
|
|
title: () => this.$t('verity.dvp.test.result.analysis'),
|
|
@@ -594,6 +606,22 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ /**
|
|
|
+ * 材料清单文件下载
|
|
|
+ * @param record
|
|
|
+ */
|
|
|
+ onClick(record, num) {
|
|
|
+ let fileId = undefined;
|
|
|
+ if (num === 1) { // 试验报告
|
|
|
+ fileId = record.testReportId;
|
|
|
+ } else if (num === 2) { // 材料报告
|
|
|
+ fileId = record.materialsReportId;
|
|
|
+ }
|
|
|
+ this.download('/DFMEA/file/downloadFile', {
|
|
|
+ id: fileId,
|
|
|
+ fileType: 17,
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 获取列表数据 */
|
|
|
list() {
|
|
|
let _that = this;
|
|
@@ -916,4 +944,9 @@ export default {
|
|
|
.export-margin {
|
|
|
margin-right: -24px;
|
|
|
}
|
|
|
+
|
|
|
+/deep/ .clickContent {
|
|
|
+ color: #1890FF;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
</style>
|