增加国网模板下载

This commit is contained in:
BianLzhaoMin 2025-04-29 14:27:07 +08:00
parent 74f5c38786
commit 2a14332b92
2 changed files with 16 additions and 2 deletions

View File

@ -45,3 +45,13 @@ export function deleteGwTemplateAPI(data) {
data: data, data: data,
}) })
} }
// 下载国网模板
export function downloadGwTemplateByIdAPI(data) {
return request({
url: '/stateGrid/downloadStateGridTemp',
method: 'post',
data: data,
})
}

View File

@ -103,7 +103,7 @@
<script> <script>
import DialogModel from '@/components/DialogModel/index' import DialogModel from '@/components/DialogModel/index'
import AddAndEditForm from './components/addAndEditForm.vue' import AddAndEditForm from './components/addAndEditForm.vue'
import { getGwTemplateListAPI, deleteGwTemplateAPI } from '@/api/data-create/gw-template' import { getGwTemplateListAPI, deleteGwTemplateAPI, downloadGwTemplateByIdAPI } from '@/api/data-create/gw-template'
export default { export default {
components: { components: {
DialogModel, DialogModel,
@ -175,7 +175,11 @@ export default {
this.dialogConfig.outerVisible = true this.dialogConfig.outerVisible = true
}, },
// //
onHandleDownload(row) {}, async onHandleDownload(row) {
// downloadStateGridTemp
const res = await downloadGwTemplateByIdAPI({ id: row.id })
console.log(res, '下载结果')
},
// //
async getGwTemplateList() { async getGwTemplateList() {