|
@@ -106,6 +106,7 @@ import client from "@/stores/modules/client";
|
|
|
import icpList from '@/utils/ipc';
|
|
import icpList from '@/utils/ipc';
|
|
|
import socket from "@/stores/modules/socket.js";
|
|
import socket from "@/stores/modules/socket.js";
|
|
|
import useUserInfo from '@/stores/modules/user';
|
|
import useUserInfo from '@/stores/modules/user';
|
|
|
|
|
+import i18n from '@/locales';
|
|
|
|
|
|
|
|
const clientStore = client();
|
|
const clientStore = client();
|
|
|
const socketStore = socket();
|
|
const socketStore = socket();
|
|
@@ -143,9 +144,9 @@ const getPointStatus = (pointKey) => {
|
|
|
|
|
|
|
|
const getPointTagInfo = (pointKey) => {
|
|
const getPointTagInfo = (pointKey) => {
|
|
|
const status = getPointStatus(pointKey)
|
|
const status = getPointStatus(pointKey)
|
|
|
- if (status === 'connected') return { text: '已连接相机', type: 'success' }
|
|
|
|
|
- if (status === 'disconnected') return { text: '未连接相机', type: 'danger' }
|
|
|
|
|
- return { text: '未设置相机', type: 'info' }
|
|
|
|
|
|
|
+ if (status === 'connected') return { text: i18n.global.t('cameraConfig.connected'), type: 'success' }
|
|
|
|
|
+ if (status === 'disconnected') return { text: i18n.global.t('cameraConfig.notConnected'), type: 'danger' }
|
|
|
|
|
+ return { text: i18n.global.t('cameraConfig.notSet'), type: 'info' }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const multiConfig = reactive({
|
|
const multiConfig = reactive({
|
|
@@ -235,12 +236,12 @@ const handleRefresh = async () => {
|
|
|
try {
|
|
try {
|
|
|
const ok = await fetchCameraList()
|
|
const ok = await fetchCameraList()
|
|
|
if (ok) {
|
|
if (ok) {
|
|
|
- ElMessage.success('相机连接状态已更新')
|
|
|
|
|
|
|
+ ElMessage.success(i18n.global.t('cameraConfig.cameraConnected'))
|
|
|
} else {
|
|
} else {
|
|
|
- ElMessage.warning('未获取到相机列表')
|
|
|
|
|
|
|
+ ElMessage.warning(i18n.global.t('cameraConfig.noCameraList'))
|
|
|
}
|
|
}
|
|
|
} catch {
|
|
} catch {
|
|
|
- ElMessage.error('刷新失败,请稍后重试')
|
|
|
|
|
|
|
+ ElMessage.error(i18n.global.t('cameraConfig.refreshFailed'))
|
|
|
} finally {
|
|
} finally {
|
|
|
refreshing.value = false
|
|
refreshing.value = false
|
|
|
}
|
|
}
|