|
|
|
@ -4,14 +4,16 @@
@@ -4,14 +4,16 @@
|
|
|
|
|
<i class="i-line-md:arrow-left"></i>返回站点数据 |
|
|
|
|
</el-button> |
|
|
|
|
<EdfsWrap title="设备列表" class="flex-1" useScrollBar> |
|
|
|
|
<template #title-right v-if="isTransfer"> |
|
|
|
|
<template #title-right> |
|
|
|
|
<template v-if="isBatchTransfer || isBatchUpgrade"> |
|
|
|
|
<el-button type="primary" @click="onBatchSave"> 确定{{ batchText }} </el-button> |
|
|
|
|
<el-button type="info" @click="onBatchCancel"> 取消 </el-button> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
|
<el-button type="primary" @click="onBatchTransfer"> 批量迁移 </el-button> |
|
|
|
|
<el-button type="primary" @click="onBatchUpgrade"> 批量升级 </el-button> |
|
|
|
|
<el-button type="primary" @click="onBatchTransfer"> <i class="i-mdi:database-arrow-right-outline mr-1" /> |
|
|
|
|
批量迁移 </el-button> |
|
|
|
|
<el-button v-if="isTransfer" type="primary" @click="onBatchUpgrade"> <i class="i-codicon:chip mr-1" />批量升级 |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
</template> |
|
|
|
|
<div class="device-list-wrap"> |
|
|
|
@ -186,7 +188,7 @@
@@ -186,7 +188,7 @@
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<TransferDlg ref="transferDlgRef" @on-save="onLineDeviceTransfer" :is-batch-transfer="isBatchTransfer" /> |
|
|
|
|
<OnLineTransferDlg ref="onLineTransferDlgRef" @on-save="onLineDeviceTransfer" :is-batch-transfer="isBatchTransfer" /> |
|
|
|
|
<OffTransferDlg ref="offTransferDlg" :isBatchTransfer="false" :siteInfo="siteInfo" @on-save="onOffDeviceTransfer" /> |
|
|
|
|
<DeviceDrawer v-model="isShowDetails" ref="deviceDrawerRef" :siteInfo="siteInfo" :is-transfer="isTransfer" /> |
|
|
|
|
</template> |
|
|
|
@ -194,7 +196,7 @@
@@ -194,7 +196,7 @@
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
|
import dayjs from 'dayjs' |
|
|
|
|
import TransferMask from './components/transferMask.vue' |
|
|
|
|
import TransferDlg from './components/transferDlg.vue' |
|
|
|
|
import OnLineTransferDlg from './components/onLineTransferDlg.vue' |
|
|
|
|
import ZMQWorker from '@/composables/useZMQJsonWorker' |
|
|
|
|
import OffTransferDlg from './components/offTransferDlg.vue' |
|
|
|
|
|
|
|
|
@ -224,7 +226,7 @@ import {
@@ -224,7 +226,7 @@ import {
|
|
|
|
|
upgradeProgressStatusMap, |
|
|
|
|
} from './utils' |
|
|
|
|
import { getFirmwarePath } from '@/api/module/firmware' |
|
|
|
|
const transferDlgRef = ref<typeof TransferDlg>() |
|
|
|
|
const onLineTransferDlgRef = ref<typeof OnLineTransferDlg>() |
|
|
|
|
const router = useRouter() |
|
|
|
|
const route = useRoute() |
|
|
|
|
const siteInfo = ref<ISite>( |
|
|
|
@ -413,7 +415,7 @@ function onBatchTransferSave(checkList: IOnlineDevice[]) {
@@ -413,7 +415,7 @@ function onBatchTransferSave(checkList: IOnlineDevice[]) {
|
|
|
|
|
.filter(Boolean) |
|
|
|
|
.join(',') |
|
|
|
|
|
|
|
|
|
transferDlgRef.value?.open(checkList[0], clientIpList, pathList) |
|
|
|
|
onLineTransferDlgRef.value?.open(checkList[0], clientIpList, pathList) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const isBatchUpgrade = ref(false) |
|
|
|
@ -451,7 +453,7 @@ function onBatchCancel() {
@@ -451,7 +453,7 @@ function onBatchCancel() {
|
|
|
|
|
} |
|
|
|
|
function onTransfer(item: IOnlineDevice) { |
|
|
|
|
if (isTransfer.value) { |
|
|
|
|
transferDlgRef.value?.open(item) |
|
|
|
|
onLineTransferDlgRef.value?.open(item) |
|
|
|
|
} else { |
|
|
|
|
offTransferDlg.value?.open(item) |
|
|
|
|
} |
|
|
|
@ -579,7 +581,6 @@ function zmqUpgradeCb(msg: PubMsgData) {
@@ -579,7 +581,6 @@ function zmqUpgradeCb(msg: PubMsgData) {
|
|
|
|
|
upFirmwareStatusReject(deviceSn, msg.feedback) |
|
|
|
|
} |
|
|
|
|
upgradeSnList.value = upgradeSnList.value.filter(item => item !== deviceSn) |
|
|
|
|
// upgradePubDeviceMap.delete(deviceSn) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|