<!--历史评审弹窗--> <template> <el-dialog title="历史评审" width="60%" :visible.sync="isShowInfo" append-to-body :close-on-click-modal="false"> <el-descriptions class="margin-top" title="" :column="2" border style="width: 100%"> <el-descriptions-item label="供应商名称" :label-style="labelStyle" :content-style="contentStyle">{{ dataInfo.supplierName }}</el-descriptions-item> <el-descriptions-item label="供应商编号" :label-style="labelStyle">{{ dataInfo.supplierCode }}</el-descriptions-item> <el-descriptions-item label="供应商状态">{{ dataInfo.supplierStatusName }}</el-descriptions-item> </el-descriptions> <div style="margin-top: 30px; font-size: 1rem">评审记录</div> <el-table :data="tableData" style="width: 100%" max-height="400px" :highlight-current-row="true"> <el-table-column label="序号" width="75"> <template scope="scope"> <span>{{ scope.$index + 1 }}</span> </template> </el-table-column> <el-table-column prop="inputReviewResultName" label="评审结果" width="150" ></el-table-column> <el-table-column prop="inputReviewIllustration" label="评审结果说明"></el-table-column> <el-table-column prop="inputReviewDate" label="评审日期" width="150" /> <el-table-column label="评审附件" width="300"> <template slot-scope="scope"> <el-link v-for="(item, index) in scope.row.inputReviewFileList" :href="baseUrl + item" :disabled="item === ''" type="primary" target="_blank" style="margin-right: 10px;">附件{{ index + 1 }}</el-link> </template> </el-table-column> </el-table> </el-dialog> </template> <script> import { historyReview } from '@/api/supplier/supplier' export default { name: 'HistoryReviewDialog', data() { return { isShowInfo: false, tableData: [], dataInfo: { }, baseUrl: '', labelStyle: { width: '20%' }, contentStyle: { width: '30%' } } }, methods: { initHistoryDialog(row) { this.dataInfo = row this.getHistoryReview(row.supplierCode) this.isShowInfo = true this.baseUrl = this.baseConfig.baseUrl + '/static/' }, getHistoryReview(supplierCode) { historyReview({ supplierCode: supplierCode }).then(res => { res.forEach(record => { if (record.inputReviewDate !== '' && record.inputReviewDate.length > 10) { record.inputReviewDate = record.inputReviewDate.substring(0, 10) } if (record.inputReviewFile !== '') { record.inputReviewFileList = record.inputReviewFile.split(',') } }) res = res.filter(item => item.inputReviewResultName) this.tableData = res }) } } } </script> <style lang='scss' scoped> </style>