|
@@ -151,7 +151,8 @@
|
|
|
</template>
|
|
|
<!--操作-->
|
|
|
<template slot='operation' slot-scope='name, row'>
|
|
|
- <a href='javascript: void(0);' @click='editInit(row)' :disabled="isLook">
|
|
|
+ <!-- 等效试验的试验在验证阶段,不用编辑 -->
|
|
|
+ <a href='javascript: void(0);' @click='editInit(row)' :disabled="isLook || row.equivalentId">
|
|
|
<!-- 编辑 -->
|
|
|
<a-tooltip :title="$t('global-btn.edit')">
|
|
|
<i class='iconfont iconicon-bianji'></i>
|
|
@@ -165,6 +166,9 @@
|
|
|
<template slot="materialsFileName" slot-scope="text, record">
|
|
|
<span class="clickContent" @click="viewReport(record, 2)" :title="text">{{ text }}</span>
|
|
|
</template>
|
|
|
+ <template slot="equivalentCode" slot-scope="text, record">
|
|
|
+ <span :title="text" class="clickContent" @click="viewReport(record, 3)"> {{ record.equivalentCode || '-'}} </span>
|
|
|
+ </template>
|
|
|
</a-table>
|
|
|
</a-card>
|
|
|
</a-row>
|
|
@@ -498,6 +502,16 @@ export default {
|
|
|
return val === '1' ? this.$t('plan.dvp.non-equivalent-experiment') : this.$t('plan.dvp.equivalent-experiment');
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ // 等效实验报告编号
|
|
|
+ title: () => this.$t('plan.dvp.equivalent-experiment-report-number'),
|
|
|
+ width: 150,
|
|
|
+ align: 'center',
|
|
|
+ dataIndex: 'e',
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: "equivalentCode"
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
// 测试开始日期
|
|
|
title: () => this.$t('verity.dvp.test.start.date'),
|
|
@@ -772,16 +786,30 @@ export default {
|
|
|
* @param record
|
|
|
*/
|
|
|
viewReport(record, num) {
|
|
|
- let fileId = undefined;
|
|
|
- let fileName = undefined;
|
|
|
- if (num === 1) { // 试验报告
|
|
|
- fileId = record.testReportId;
|
|
|
- fileName = record.testReportFileName;
|
|
|
- } else if (num === 2) { // 材料报告
|
|
|
- fileId = record.materialsReportId;
|
|
|
- fileName = record.materialsFileName;
|
|
|
- }
|
|
|
- let url = this.$api.baseUrl + '/DFMEA/file/downloadFile.do?id=' + parseInt(fileId) + '&fileType=17';
|
|
|
+
|
|
|
+ let fileIdMapping = {
|
|
|
+ 1: 'testReportId',
|
|
|
+ 2: 'materialsReportId',
|
|
|
+ 3: 'equivalentId'
|
|
|
+ };
|
|
|
+
|
|
|
+ let fileNameMapping = {
|
|
|
+ 1: 'testReportFileName',
|
|
|
+ 2: 'materialsFileName',
|
|
|
+ 3: 'equivalentName'
|
|
|
+ };
|
|
|
+
|
|
|
+ let fileTypeMapping = {
|
|
|
+ 1: '17',
|
|
|
+ 2: '17',
|
|
|
+ 3: '8'
|
|
|
+ };
|
|
|
+
|
|
|
+ let fileId = record[fileIdMapping[num]] || null;
|
|
|
+ let fileName = record[fileNameMapping[num]] || null;
|
|
|
+ let fileType = fileTypeMapping[num];
|
|
|
+
|
|
|
+ let url = this.$api.baseUrl + '/DFMEA/file/downloadFile.do?id=' + parseInt(fileId) + '&fileType=' + fileType;
|
|
|
fetch(url, {
|
|
|
method: 'get'
|
|
|
}).then(res => {
|
|
@@ -796,7 +824,7 @@ export default {
|
|
|
});
|
|
|
this.download('/DFMEA/file/downloadFile', {
|
|
|
id: fileId,
|
|
|
- fileType: 17
|
|
|
+ fileType: fileType
|
|
|
});
|
|
|
},
|
|
|
/** 获取列表数据 */
|
|
@@ -842,6 +870,7 @@ export default {
|
|
|
testStartTime: this.queryParam.testStartTime || '',
|
|
|
testEndTime: this.queryParam.testEndTime || '',
|
|
|
testReportCode: this.queryParam.testReportCode || '',
|
|
|
+ isEquivalent: this.queryParam.isEquivalent || '',
|
|
|
testResult: this.testResult || '',
|
|
|
});
|
|
|
},
|