代码更新

This commit is contained in:
2022-07-21 19:52:15 +08:00
parent 2691af74f8
commit d2a88b9a6f
9 changed files with 133 additions and 87 deletions

View File

@@ -123,7 +123,7 @@
:disabled="crud.selections.length !== 1"
@click="downloadWord"
>
下载Word
生成鉴定申请表
</el-button>
</crudOperation>
<!--表格渲染-->
@@ -282,12 +282,19 @@ export default {
}
},
downloadWord() {
const _selectData = this.$refs.table.selection
const data = _selectData[0]
download('/api/devicescrap/downloadWord', { 'devicerecord_id': data.devicerecord_id }).then(result => {
const name = data.device_name + '报废档案'
this.crud.toQuery()
downloadFile(result, name, 'docx')
const msg = '是否继续'
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const _selectData = this.$refs.table.selection
const data = _selectData[0]
download('/api/devicescrap/downloadWord', { 'devicerecord_id': data.devicerecord_id }).then(result => {
const name = data.device_name + '报废档案'
this.crud.toQuery()
downloadFile(result, name, 'docx')
})
})
}
}