<!--历史考核弹窗--> <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="assessAnnualName" label="考核年度" width="200"></el-table-column> <el-table-column prop="annualAssessResultName" label="考核结果" width="150"></el-table-column> <el-table-column prop="annualAssessIllustration" label="考核结果说明"></el-table-column> <el-table-column prop="annualAssessDate" label="考核日期" width="150" /> <el-table-column label="考核结果附件" width="300"> <template slot-scope="scope"> <el-link v-for="(item, index) in scope.row.annualAssessFileList" :key="item.id" :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 { historyAssess } from '@/api/supplier/supplier' export default { name: 'HistoryAssessDialog', data() { return { isShowInfo: false, tableData: [], dataInfo: { }, baseUrl: '', labelStyle: { width: '20%' }, contentStyle: { width: '30%' } } }, methods: { initHistoryDialog(row) { this.dataInfo = row this.getHistoryAssess(row.supplierCode) this.isShowInfo = true this.baseUrl = this.baseConfig.baseUrl + '/static/' }, getHistoryAssess(supplierCode) { historyAssess({ supplierCode: supplierCode }).then(res => { res.forEach(record => { if (record.annualAssessDate !== '' && record.annualAssessDate.length > 10) { record.annualAssessDate = record.annualAssessDate.substring(0, 10) } if (record.annualAssessFile !== '') { record.annualAssessFileList = record.annualAssessFile.split(',') } }) this.tableData = res }) } } } </script> <style lang='scss' scoped> </style>