|
|
|
|
@ -12,6 +12,14 @@
@@ -12,6 +12,14 @@
|
|
|
|
|
<template #title-right> |
|
|
|
|
<template v-if="env.VITE_APP_ENV == 'local'"> |
|
|
|
|
<template v-if="isBatchTransfer || isBatchUpgrade"> |
|
|
|
|
<el-button |
|
|
|
|
color="#3894FF" |
|
|
|
|
@click="onSelectAllCheckbox"> |
|
|
|
|
<span class="text-white">{{ |
|
|
|
|
isSelectAllCheckbox ? '取消全选' : '全选' |
|
|
|
|
}} |
|
|
|
|
</span> |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" @click="onBatchSave"> |
|
|
|
|
确定{{ batchText }} |
|
|
|
|
</el-button> |
|
|
|
|
@ -269,9 +277,19 @@ function onBatchUpgrade() {
@@ -269,9 +277,19 @@ function onBatchUpgrade() {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const batchText = computed(() => { |
|
|
|
|
return isBatchTransfer.value ? '迁移' : '升级' |
|
|
|
|
return isBatchTransfer.value ? isonLineTransfer.value ? '迁移' : '导出' : '升级' |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const isSelectAllCheckbox = computed(() => checkDeviceList.value.length === devices.value.length) |
|
|
|
|
|
|
|
|
|
function onSelectAllCheckbox() { |
|
|
|
|
if (isSelectAllCheckbox.value) { |
|
|
|
|
checkDeviceList.value = [] |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
checkDeviceList.value = devices.value.map((item) => item.sn) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function onBatchSave() { |
|
|
|
|
if (!checkDeviceList.value.length) { |
|
|
|
|
message.error(`请选择要${batchText.value}的设备`) |
|
|
|
|
|