|
|
|
|
@ -28,7 +28,7 @@
@@ -28,7 +28,7 @@
|
|
|
|
|
<template v-else> |
|
|
|
|
<el-button type="primary" @click="onBatchTransfer"> |
|
|
|
|
<i class="i-mdi:database-arrow-right-outline mr-1"/> |
|
|
|
|
{{ isonLineTransfer ? '数据迁移' : '数据导出' }} |
|
|
|
|
{{ localTransferBtnText }} |
|
|
|
|
</el-button> |
|
|
|
|
<el-button v-if="isonLineTransfer" type="primary" @click="onBatchUpgrade"> |
|
|
|
|
<i class="i-codicon:chip mr-1"/>批量升级 |
|
|
|
|
@ -60,7 +60,7 @@
@@ -60,7 +60,7 @@
|
|
|
|
|
> |
|
|
|
|
<template v-if="env.VITE_APP_ENV == 'local'"> |
|
|
|
|
<el-tooltip |
|
|
|
|
:content="isonLineTransfer ? '数据迁移' : '数据导出'" |
|
|
|
|
:content="isonLineTransfer ? '数据导出' : '数据导入'" |
|
|
|
|
v-if="isonLineTransfer ? item.status === '在线' : true" |
|
|
|
|
> |
|
|
|
|
<i |
|
|
|
|
@ -167,6 +167,7 @@ import DeviceDrawer from './components/deviceDrawer.vue'
@@ -167,6 +167,7 @@ import DeviceDrawer from './components/deviceDrawer.vue'
|
|
|
|
|
import { getFirmwarePath } from '@/api/module/firmware' |
|
|
|
|
import { createTask, type TaskCreateParams } from '@/api/module/taks' |
|
|
|
|
import EdfsWrap from "@/components/Edfs-wrap.vue"; |
|
|
|
|
import { computed } from "vue"; |
|
|
|
|
|
|
|
|
|
const env = import.meta.env |
|
|
|
|
const onLineTransferDlgRef = ref<typeof OnLineTransferDlg>() |
|
|
|
|
@ -180,6 +181,9 @@ const type = ref<'export' | 'details'>(route.query.type as 'export' | 'details')
@@ -180,6 +181,9 @@ const type = ref<'export' | 'details'>(route.query.type as 'export' | 'details')
|
|
|
|
|
const isonLineTransfer = computed(() => type.value === 'export') |
|
|
|
|
const message = useMessage() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const localTransferBtnText = computed(()=> isonLineTransfer.value ? '数据导出' : '数据导入') |
|
|
|
|
|
|
|
|
|
const transferDataStore = useTransferDataStore() |
|
|
|
|
const { devicesMap } = storeToRefs(transferDataStore) |
|
|
|
|
|
|
|
|
|
@ -277,7 +281,7 @@ function onBatchUpgrade() {
@@ -277,7 +281,7 @@ function onBatchUpgrade() {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const batchText = computed(() => { |
|
|
|
|
return isBatchTransfer.value ? isonLineTransfer.value ? '迁移' : '导出' : '升级' |
|
|
|
|
return isBatchTransfer.value ? isonLineTransfer.value ? '导出' : '导入' : '升级' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const isSelectAllCheckbox = computed(() => checkDeviceList.value.length === devices.value.length) |
|
|
|
|
@ -339,7 +343,7 @@ window.onbeforeunload = function () {
@@ -339,7 +343,7 @@ window.onbeforeunload = function () {
|
|
|
|
|
onBeforeRouteLeave(async (to, from, next) => { |
|
|
|
|
if (transferStatus.value === 'progress') { |
|
|
|
|
try { |
|
|
|
|
await message.confirm('当前迁移尚未完成,是否确认离开?') |
|
|
|
|
await message.confirm('当前导出尚未完成,是否确认离开?') |
|
|
|
|
window.location.href = to.fullPath |
|
|
|
|
} catch (error) { |
|
|
|
|
next(false) |
|
|
|
|
|