修改测试用例1

This commit is contained in:
guanj
2026-01-12 11:06:54 +08:00
parent 08afdddc51
commit e9d7231a75
16 changed files with 923 additions and 822 deletions

View File

@@ -33,7 +33,7 @@ import { useDictData } from '@/stores/dictData'
import PopupVersion from '@/views/govern/manage/basic/popupVersion.vue'
import { Plus } from '@element-plus/icons-vue'
import { auditEdData } from '@/api/cs-device-boot/edData'
import { getFileUrl, downLoadFile } from '@/api/cs-system-boot/manage'
defineOptions({
name: 'govern/manage/basic/version'
})
@@ -72,6 +72,16 @@ const tableStore = new TableStore({
width: '180',
render: 'buttons',
buttons: [
{
name: 'productSetting',
title: '下载文件',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
downloadTheReport(row.filePath)
}
},
{
name: 'edit',
title: '编辑',
@@ -151,11 +161,30 @@ queryByCode('Device_Type').then(res => {
res1.data.splice(index, 1)
}
})
console.log('🚀 ~ res1.data.map ~ res1.data:', res1.data)
DevTypeOptions.value = res1.data
})
})
// 下载报告
const downloadTheReport = (name: string) => {
getFileUrl(name).then((res: any) => {
downLoadFile(res.data).then(res => {
let blob = new Blob([res], {
type: 'application/octet-stream'
})
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a') // 创建a标签
link.href = url
link.download = name.split('/').pop() || '升级文件' // 设置下载的文件名
document.body.appendChild(link)
link.click() //执行下载
document.body.removeChild(link)
ElMessage.success('下载成功')
})
})
}
tableStore.table.params.devType = ''
provide('tableStore', tableStore)
onMounted(() => {