<!--历史预审弹窗--> <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="preReviewResultName" label="预审结果" width="150" ></el-table-column> <el-table-column prop="preReviewIllustration" label="预审结果说明"></el-table-column> <el-table-column prop="preReviewDate" label="预审日期" width="150" /> <el-table-column label="预审附件" width="300"> <template slot-scope="scope"> <el-link v-for="(item, index) in scope.row.preReviewFileList" :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 { historyInquiry } from '@/api/supplier/supplier' export default { name: 'HistoryInquiryDialog', data() { return { isShowInfo: false, tableData: [], dataInfo: { }, baseUrl: '', labelStyle: { width: '20%' }, contentStyle: { width: '30%' } } }, methods: { initHistoryDialog(row) { this.dataInfo = row this.getHistoryInquiry(row.supplierCode) this.isShowInfo = true this.baseUrl = this.baseConfig.baseUrl + '/static/' }, // 历史预审列表 getHistoryInquiry(supplierCode) { historyInquiry({ supplierCode: supplierCode }).then(res => { // res.forEach(record => { // if (record.preReviewDate !== '' && record.preReviewDate.length > 10) { // record.preReviewDate = record.preReviewDate.substring(0, 10) // } // if (record.preReviewFile !== '') { // record.preReviewFileList = record.preReviewFile.split(',') // } // }) res = res.filter(item => item.preReviewResultName) this.tableData = res }) } } } </script> <style lang='scss' scoped> </style>