|
@@ -269,7 +269,7 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="brand" label="厂商" min-width="90">
|
|
<el-table-column prop="brand" label="厂商" min-width="90">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
- {{ formatBrand(row.brand) }}
|
|
|
|
|
|
|
+ {{ formatBrand(row.vendorName) }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="model" label="型号" min-width="130" show-overflow-tooltip />
|
|
<el-table-column prop="model" label="型号" min-width="130" show-overflow-tooltip />
|
|
@@ -343,7 +343,7 @@
|
|
|
<el-table v-else :data="cameraList" stripe size="small" border>
|
|
<el-table v-else :data="cameraList" stripe size="small" border>
|
|
|
<!-- <el-table-column prop="ip" label="本地IP" min-width="110" /> -->
|
|
<!-- <el-table-column prop="ip" label="本地IP" min-width="110" /> -->
|
|
|
<el-table-column prop="cameraId" label="设备ID" min-width="100" show-overflow-tooltip />
|
|
<el-table-column prop="cameraId" label="设备ID" min-width="100" show-overflow-tooltip />
|
|
|
- <el-table-column prop="name" label="名称" min-width="100" show-overflow-tooltip />
|
|
|
|
|
|
|
+ <el-table-column prop="cameraName" label="名称" min-width="100" show-overflow-tooltip />
|
|
|
<el-table-column :label="t('状态(心跳)')" min-width="140">
|
|
<el-table-column :label="t('状态(心跳)')" min-width="140">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<span :class="['status-text', row.status === 'active' ? 'status-active' : 'status-dead']">
|
|
<span :class="['status-text', row.status === 'active' ? 'status-active' : 'status-dead']">
|
|
@@ -361,7 +361,7 @@
|
|
|
<el-button type="primary" link @click="handleViewRunParams(row)">查看</el-button>
|
|
<el-button type="primary" link @click="handleViewRunParams(row)">查看</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="brand" label="厂商" min-width="90">
|
|
|
|
|
|
|
+ <el-table-column prop="brand" :label="t('厂商')" min-width="90">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
{{ formatBrand(row.brand) }}
|
|
{{ formatBrand(row.brand) }}
|
|
|
</template>
|
|
</template>
|
|
@@ -376,11 +376,7 @@
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<el-button type="primary" link :icon="Edit" @click="handleEditCamera(row)" />
|
|
<el-button type="primary" link :icon="Edit" @click="handleEditCamera(row)" />
|
|
|
<el-button type="danger" link :icon="Delete" @click="handleDeleteCamera(row)" />
|
|
<el-button type="danger" link :icon="Delete" @click="handleDeleteCamera(row)" />
|
|
|
- <el-button
|
|
|
|
|
- link
|
|
|
|
|
- :class="['crosshairs-btn', { active: activeCameraId === row.id }]"
|
|
|
|
|
- @click="handleViewCamera(row)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-button link :class="['crosshairs-btn', { active: !row.streamSn }]" @click="handleViewCamera(row)">
|
|
|
<Icon icon="mdi:crosshairs" />
|
|
<Icon icon="mdi:crosshairs" />
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
@@ -503,10 +499,10 @@
|
|
|
<el-input v-model="cameraForm.password" type="password" show-password placeholder="请输入密码" />
|
|
<el-input v-model="cameraForm.password" type="password" show-password placeholder="请输入密码" />
|
|
|
</el-form-item> -->
|
|
</el-form-item> -->
|
|
|
<el-form-item label="参数配置">
|
|
<el-form-item label="参数配置">
|
|
|
- <JsonEditor v-model="cameraForm.paramConfig" height="140px" placeholder="请输入参数配置 (JSON)" />
|
|
|
|
|
|
|
+ <JsonEditor v-model="cameraForm.paramConfig" height="200px" placeholder="请输入参数配置 (JSON)" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="设备运行参数">
|
|
<el-form-item label="设备运行参数">
|
|
|
- <JsonEditor v-model="cameraForm.runtimeParams" height="140px" placeholder="设备运行参数 (JSON)" />
|
|
|
|
|
|
|
+ <JsonEditor v-model="cameraForm.runtimeParams" height="200px" placeholder="设备运行参数 (JSON)" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
@@ -578,9 +574,11 @@ import type {
|
|
|
import type { FormInstance, FormRules } from 'element-plus'
|
|
import type { FormInstance, FormRules } from 'element-plus'
|
|
|
import dayjs from 'dayjs'
|
|
import dayjs from 'dayjs'
|
|
|
import { useI18n } from 'vue-i18n'
|
|
import { useI18n } from 'vue-i18n'
|
|
|
-
|
|
|
|
|
|
|
+import { useRouter } from 'vue-router'
|
|
|
const { t } = useI18n({ useScope: 'global' })
|
|
const { t } = useI18n({ useScope: 'global' })
|
|
|
|
|
|
|
|
|
|
+const router = useRouter()
|
|
|
|
|
+
|
|
|
// 格式化状态显示
|
|
// 格式化状态显示
|
|
|
function formatStatus(status: LssNodeStatus | undefined): string {
|
|
function formatStatus(status: LssNodeStatus | undefined): string {
|
|
|
switch (status) {
|
|
switch (status) {
|
|
@@ -636,12 +634,7 @@ const activeCameraId = ref<number | null>(null)
|
|
|
|
|
|
|
|
function handleViewCamera(row: CameraInfoDTO) {
|
|
function handleViewCamera(row: CameraInfoDTO) {
|
|
|
// 切换激活状态
|
|
// 切换激活状态
|
|
|
- if (activeCameraId.value === row.id) {
|
|
|
|
|
- activeCameraId.value = null
|
|
|
|
|
- } else {
|
|
|
|
|
- activeCameraId.value = row.id
|
|
|
|
|
- }
|
|
|
|
|
- console.log('Camera active:', row.id, activeCameraId.value === row.id)
|
|
|
|
|
|
|
+ router.push(`/live-stream?cameraId=${row.cameraId}`)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 格式化品牌
|
|
// 格式化品牌
|
|
@@ -697,7 +690,7 @@ function getHeartbeatClass(status: LssHeartbeatStatus | undefined): string {
|
|
|
function handleViewConfig(row: CameraInfoDTO) {
|
|
function handleViewConfig(row: CameraInfoDTO) {
|
|
|
paramsCamera.value = row
|
|
paramsCamera.value = row
|
|
|
paramsDialogType.value = 'config'
|
|
paramsDialogType.value = 'config'
|
|
|
- paramsDialogTitle.value = `参数配置 - ${row.name}`
|
|
|
|
|
|
|
+ paramsDialogTitle.value = `参数配置 - ${row.cameraName}`
|
|
|
paramsContent.value = row.paramConfig || ''
|
|
paramsContent.value = row.paramConfig || ''
|
|
|
paramsDialogVisible.value = true
|
|
paramsDialogVisible.value = true
|
|
|
}
|
|
}
|
|
@@ -706,7 +699,7 @@ function handleViewConfig(row: CameraInfoDTO) {
|
|
|
function handleViewRunParams(row: CameraInfoDTO) {
|
|
function handleViewRunParams(row: CameraInfoDTO) {
|
|
|
paramsCamera.value = row
|
|
paramsCamera.value = row
|
|
|
paramsDialogType.value = 'run'
|
|
paramsDialogType.value = 'run'
|
|
|
- paramsDialogTitle.value = `运行参数 - ${row.name}`
|
|
|
|
|
|
|
+ paramsDialogTitle.value = `运行参数 - ${row.cameraName}`
|
|
|
paramsContent.value = row.runtimeParams || ''
|
|
paramsContent.value = row.runtimeParams || ''
|
|
|
paramsDialogVisible.value = true
|
|
paramsDialogVisible.value = true
|
|
|
}
|
|
}
|
|
@@ -1360,10 +1353,10 @@ onMounted(() => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&.active {
|
|
&.active {
|
|
|
- color: #67c23a;
|
|
|
|
|
|
|
+ color: red;
|
|
|
|
|
|
|
|
&:hover {
|
|
&:hover {
|
|
|
- color: #85ce61;
|
|
|
|
|
|
|
+ color: red;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|