修复: 移除import type语法 清理未使用的gateway引用

This commit is contained in:
2026-05-20 20:54:53 +08:00
parent c31b426e64
commit c8f36ad3b4
5 changed files with 3 additions and 10 deletions

View File

@@ -11,8 +11,6 @@ import { useMapStore } from "../stores/mapStore"
import { useRoute } from "vue-router" import { useRoute } from "vue-router"
import DeviceInfo from "./DeviceInfo.vue" import DeviceInfo from "./DeviceInfo.vue"
import http from '../api/http.js' import http from '../api/http.js'
import { gwGet, fetchCameras } from '../api/gateway.ts'
import type { StandardDevice } from '../api/gateway.ts'
// TODO Phase2: 遍历 base_device 加载 MapModelId → VgoMap 标记; 告警设备红色闪烁 // TODO Phase2: 遍历 base_device 加载 MapModelId → VgoMap 标记; 告警设备红色闪烁
import initMessageHub from './index.js' // 导入消息中心初始化函数 import initMessageHub from './index.js' // 导入消息中心初始化函数

View File

@@ -119,8 +119,6 @@ import { ElMessage } from 'element-plus'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import store from '@/store' import store from '@/store'
import http from '@/api/http' import http from '@/api/http'
import { gwGet, fetchCameras } from '@/api/gateway'
import type { StandardDevice } from '@/api/gateway'
// 环境变量类型定义 // 环境变量类型定义
interface EnvironmentVariable { interface EnvironmentVariable {

View File

@@ -61,8 +61,7 @@
import { ref, computed, onMounted } from 'vue' import { ref, computed, onMounted } from 'vue'
import { VideoPlay } from '@element-plus/icons-vue' import { VideoPlay } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { fetchCameras, gwGet } from '@/api/gateway' import { fetchCameras, gwGet, Camera } from '@/api/gateway'
import type { Camera } from '@/api/gateway'
const cameras = ref<Camera[]>([]) const cameras = ref<Camera[]>([])
const selectedCamera = ref<Camera | null>(null) const selectedCamera = ref<Camera | null>(null)

View File

@@ -92,8 +92,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, onMounted } from 'vue' import { ref, computed, onMounted } from 'vue'
import { VideoCamera } from '@element-plus/icons-vue' import { VideoCamera } from '@element-plus/icons-vue'
import { fetchCameras, gwGet, gwPost } from '@/api/gateway' import { fetchCameras, gwGet, gwPost, Camera } from '@/api/gateway'
import type { Camera } from '@/api/gateway'
const cameras = ref<Camera[]>([]) const cameras = ref<Camera[]>([])
const selectedCamera = ref<Camera | null>(null) const selectedCamera = ref<Camera | null>(null)

View File

@@ -106,8 +106,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, onMounted, watch } from 'vue' import { ref, computed, onMounted, watch } from 'vue'
import { fetchCameras, gwGet, gwPost } from '@/api/gateway' import { fetchCameras, gwGet, gwPost, Camera } from '@/api/gateway'
import type { Camera } from '@/api/gateway'
const cameras = ref<Camera[]>([]) const cameras = ref<Camera[]>([])
const streamUrls = ref<Record<string, string>>({}) const streamUrls = ref<Record<string, string>>({})