| | |
| | | </div> |
| | | <div> |
| | | <el-table ref="yearTable" v-loading="yearTableDetailDataLoading" :data="yearTableDetailData" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border |
| | | height="calc(100vh - 18em)" style="width: 100% ;"> |
| | | <!-- 表格列 --> |
| | | <el-table-column align="center" header-align="center" label="序号" prop="prop" type="index" |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="pagination1.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" background |
| | | @size-change="handleSizeChange1" @current-change="handleCurrentChange1"> |
| | | </el-pagination> |
| | | </div> |
| | |
| | | pageDeviceAcceptance, |
| | | getDeviceAcceptanceFileList, |
| | | delDeviceAcceptanceFileList, |
| | | exportUseRecord, |
| | | exportDeviceAcceptance, |
| | | delDeviceAcceptance, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | export default { |
| | |
| | | this.tableLoading = true |
| | | getDeviceAcceptanceFileList({ acceptanceId: this.acceptanceId }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | |
| | | }, |
| | | // 下载 |
| | | upload(row) { |
| | | let url = ''; |
| | | if (row.type == 1) { |
| | | url = this.javaApi + '/img/' + row.fileUrl |
| | | file.downloadIamge(url, row.fileName) |
| | | } else { |
| | | url = this.javaApi + '/word/' + row.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | } |
| | | this.$download.saveAs(row.fileUrl, row.fileName) |
| | | }, |
| | | // 删除 |
| | | delete(row) { |
| | |
| | | this.tableLoading = true |
| | | delDeviceAcceptanceFileList({ acceptanceFileId: row.acceptanceFileId }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('删除成功') |
| | | this.searchTableList() |
| | | }).catch(err => { |
| | |
| | | // 导出 |
| | | handleDownOne(id) { |
| | | this.outLoading = true |
| | | exportUseRecord({ acceptanceId: id }).then(res => { |
| | | exportDeviceAcceptance({ acceptanceId: id }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, '设备验收.doc') |
| | | this.$message.success('导出成功') |
| | | }) |
| | | }, |
| | | // 删除 |