diff --git a/src/App.vue b/src/App.vue index b645feb..c031348 100644 --- a/src/App.vue +++ b/src/App.vue @@ -25,7 +25,7 @@ window.customConfigUrl = { openColor: '#00C957', //运行中 颜色 closeColor: '#FF0000', //非运行中 颜色 - type: 1, //1十堰 2武汉 3苏州 + type: 2, //1十堰 2武汉 3苏州 typeConfig: [ { type: 1, diff --git a/src/router/index.js b/src/router/index.js index 1333e19..f25df1f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -602,48 +602,48 @@ export const constantRoutes = [ // ] // }, - // { - // name: "Security", - // alwaysShow: true, - // component: Layout, - // hidden: false, - // name: "Security", - // path: "/Security", - // redirect: "noRedirect", - // meta: { - // icon: "afxt", - // link: null, - // noCache: false, - // title: "安防系统", - // }, - // children: [ - // { - // component: () => import('@/views/Security/videoSurveillance'), - // hidden: false, - // name: "videoSurveillance", - // path: "videoSurveillance", - // meta: { - // icon: "spjk", - // link: null, - // noCache: false, - // title: "视频监控", - // }, - // }, - // { - // component: () => import('@/views/Security/doorControl'), - // hidden: false, - // name: "doorControl", - // path: "doorControl", - // meta: { - // icon: "afmj", - // link: null, - // noCache: false, - // title: "门禁", - // }, - // }, - // ] + { + name: "Security", + alwaysShow: true, + component: Layout, + hidden: false, + name: "Security", + path: "/Security", + redirect: "noRedirect", + meta: { + icon: "afxt", + link: null, + noCache: false, + title: "安防系统", + }, + children: [ + { + component: () => import('@/views/Security/videoSurveillance'), + hidden: false, + name: "videoSurveillance", + path: "videoSurveillance", + meta: { + icon: "spjk", + link: null, + noCache: false, + title: "视频监控", + }, + }, + { + component: () => import('@/views/Security/doorControl'), + hidden: false, + name: "doorControl", + path: "doorControl", + meta: { + icon: "afmj", + link: null, + noCache: false, + title: "门禁", + }, + }, + ] - // }, + }, // { // path: '', // component: Layout, diff --git a/src/views/Device/deviceControl.vue b/src/views/Device/deviceControl.vue index 3032f9d..3208c9a 100644 --- a/src/views/Device/deviceControl.vue +++ b/src/views/Device/deviceControl.vue @@ -73,6 +73,15 @@ label="设备名称" align="center" > + + +
-import { forEach, throttle } from "lodash"; -import res_json from "./../../mock/data"; +import { throttle } from "lodash"; import { getArea } from "@/api/area.js"; import { getDeviceType, getDevices, updateDevice } from "@/api/device.js"; import { ElMessage, ElNotification } from "element-plus"; @@ -680,21 +669,6 @@ const handleTabbar = (e) => { throttledRedraw(); // 只重绘上层动态内容 }; -const getIconStatus = (id) => { - let _d = _typesDictionary.filter((d) => { - return d.value == id; - }); - if (_d[0]) { - return _d[0].isSelected; - } else { - return false; - } -}; - -const showTable = () => { - tableModelValue.value = true; -}; - const editFun = () => { isEdit.value = !isEdit.value; if (!isEdit.value) { @@ -1340,20 +1314,6 @@ const resizeCanvas = () => { throttledRedraw(); }; -const isCGQ = (type) => { - if ( - type == 26 || - type == 30 || - type == 31 || - type == 32 || - type == 34 || - type == 35 - ) { - return true; - } - return false; -}; - // 绘制tooltip(保持不变) const drawTooltip = () => { if (!activeMarker.value || !activeMarker.value.target) return; @@ -1492,17 +1452,9 @@ const draw = () => { if (SELECT_ACTION_TYPE.value && point.TypeId !== SELECT_ACTION_TYPE.value) { return; } - let status = getIconStatus(point.TypeId); - const size = - point.DeviceId === selectedPointId.value || status - ? pointSize.value * scale.value * 0.2 - : pointSize.value * scale.value * 0.2; - - const iSize = - point.DeviceId === selectedPointId.value || status - ? iconSize.value * scale.value * 0.2 - : iconSize.value * scale.value * 0.2; + const size = pointSize.value * scale.value * 0.2; + const iSize = iconSize.value * scale.value * 0.2; ctx.value.beginPath(); ctx.value.arc( @@ -1548,7 +1500,7 @@ const draw = () => { } } - // 添加文字传感器数值(带圆角边框和半透明背景) + // 添加文字传感器数值(带圆角边框和半透明背景)当缩放倍率大于20时出现 if ( point.TypeName.includes("传感器") === true && point.Data && @@ -1652,14 +1604,6 @@ const draw = () => { // ctx.value.strokeStyle = window.customConfigUrl.faultColor; // } else if (point.target == "device" && point.IsFault) { // ctx.value.strokeStyle = window.customConfigUrl.faultColor; - // } else if ( - // point.target == "device" && - // !isCGQ(point.TypeId) && - // point.TypeId != 66 - // ) { - // ctx.value.strokeStyle = window.customConfigUrl.closeColor; - // ctx.value.lineWidth = 0.5; - // ctx.value.stroke(); // } ctx.value.shadowBlur = 0;