| | |
| | | <!-- <el-table-column label="仪器名称" min-width="150" prop="unitName"></el-table-column>--> |
| | | <!-- <el-table-column label="型号" min-width="100" prop="model"></el-table-column>--> |
| | | <el-table-column label="地点" min-width="150" prop="address"></el-table-column> |
| | | <el-table-column label="日期" min-width="180" prop="accidentDate"></el-table-column> |
| | | <el-table-column label="日期" min-width="180" prop="accidentDate" |
| | | :formatter="formatDateCell"></el-table-column> |
| | | <el-table-column label="事故情况" min-width="180" prop="descriptionOfAccident" |
| | | show-overflow-tooltip></el-table-column> |
| | | <!-- 操作按钮 --> |
| | | <el-table-column align="center" fixed="right" label="操作" min-width="120"> |
| | | <template #default="scope"> |
| | | <el-button :disabled="scope.row.ratifyStatus === 1" size="small" link type="primary" |
| | | <el-button :disabled="scope.row.isFinish === 1" size="small" link type="primary" |
| | | @click="handleForm(scope.row.accidentReportId)">操作</el-button> |
| | | <el-button size="small" link type="primary" @click="handleDownOne(scope.row.accidentReportId)">导出</el-button> |
| | | <el-button :disabled="scope.row.isFinish === 1" size="small" link type="danger" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="pagination1.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | <el-pagination :current-page="pagination1.current" :page-size="pagination1.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" background |
| | | @size-change="handleSizeChange1" @current-change="handleCurrentChange1"> |
| | | </el-pagination> |
| | |
| | | exportDeviceAccidentReport, |
| | | delDeviceAccidentReport, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { formatListDate } from './dateFormat' |
| | | import { saveBlobOrShowError } from '@/utils/saveBlob' |
| | | export default { |
| | | name: "equipment-accident", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | |
| | | }, |
| | | // 方法集合 |
| | | methods: { |
| | | formatDateCell(row, column, cellValue) { |
| | | return formatListDate(cellValue) |
| | | }, |
| | | // 查询 |
| | | getYearTableDetailData(deviceId) { |
| | | this.yearTableDetailDataLoading = true |
| | |
| | | this.outLoading = true |
| | | exportDeviceAccidentReport({ accidentReportId: id }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, '仪器设备事故报告单.doc') |
| | | saveBlobOrShowError(res, '仪器设备事故报告单.doc', 'application/msword') |
| | | }).catch(() => { |
| | | this.outLoading = false |
| | | }) |
| | | }, |
| | | // 删除 |