|
|
@ -83,7 +83,7 @@ |
|
|
|
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button> |
|
|
|
<!-- <el-button type="text" size="small" @click="downloadMa(scope.row.id)">下载房屋二维码</el-button>--> |
|
|
|
<el-button type="text" size="small" @click="downloadMa(scope.row.id)">下载房屋二维码</el-button> |
|
|
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -148,7 +148,8 @@ export default { |
|
|
|
roomUseArr: [], |
|
|
|
dataForm: { |
|
|
|
id: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
uploadUrl: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
@ -256,10 +257,13 @@ export default { |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
downloadMa (id) { |
|
|
|
this.$http.post(`/custom/epidemicbuildingunit/createHouseQrcode`, {id: id}).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.$http.post(`/custom/epidemicbuildingunit/createHouseQrcode`, {id: id}, { responseType: 'blob' }).then(res => { |
|
|
|
let fileName = '房屋二维码.png' |
|
|
|
let objectUrl = URL.createObjectURL(new Blob([res.data])) |
|
|
|
const link = document.createElement('a') |
|
|
|
link.download = decodeURI(fileName) |
|
|
|
link.href = objectUrl |
|
|
|
link.click() |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
// 导出错误数据 |
|
|
|