Explorar o código

警告处理优化

AaronBruin hai 2 meses
pai
achega
dfb1e31927

+ 1 - 0
src/App.vue

@@ -1,4 +1,5 @@
 <template>
+  <!-- IBMS楼宇集成管理平台 -->
   <router-view />
 </template>
 

+ 7 - 7
src/layout/components/AppMain.vue

@@ -2,9 +2,9 @@
   <section class="app-main">
     <router-view v-slot="{ Component, route }">
       <!-- <transition name="fade-transform" mode="out-in"> -->
-        <keep-alive :include="tagsViewStore.cachedViews">
-          <component v-if="!route.meta.link" :is="Component" :key="route.path" />
-        </keep-alive>
+      <keep-alive :include="tagsViewStore.cachedViews">
+        <component v-if="!route.meta.link" :is="Component" :key="route.path" />
+      </keep-alive>
       <!-- </transition> -->
     </router-view>
     <iframe-toggle />
@@ -25,7 +25,7 @@ onMounted(() => {
 
 const onLoad = () => {
   let num = 1
-  console.log('----------------------加载完成');
+  // console.log('----------------------加载完成');
   // 向 iframe 发送消息
   const iframe = document.getElementById("myIframe");
   iframe.contentWindow.postMessage(
@@ -41,10 +41,10 @@ const onLoad = () => {
 function handleScroll() {
   console.log('Iframe scrolled!');
 }
-watch((route) => {
+watch(() => route, (newVal) => {
   addIframe()
-})
-
+}, { deep: true, immediate: true } // 开启深度监听
+)
 function addIframe() {
   if (route.meta.link) {
     useTagsViewStore().addIframeView(route)

+ 1 - 1
src/layout/index.vue

@@ -31,7 +31,7 @@ const classObj = computed(() => ({
     withoutAnimation: sidebar.value.withoutAnimation,
     mobile: device.value === 'mobile'
 }))
-
+const isCollapse = ref(true)
 const { width, height } = useWindowSize();
 const WIDTH = 992; // refer to Bootstrap's responsive design
 

+ 2 - 1
src/views/system/broadcast/modules/deviceList.vue

@@ -6,7 +6,7 @@
         </div>
         <div class="page">
             <div class="header-view">
-                <div class="view_item" v-for="item in headerList" :key="item">{{ item }}</div>
+                <div class="view_item" v-for="(item, index) in headerList" :key="index">{{ item }}</div>
             </div>
             <div class="warning-view">
                 <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
@@ -42,6 +42,7 @@ const props = defineProps({
         default: []
     }
 })
+const value = ref('')
 const headerList = ref(['名称', '使用状态', '状态'])
 const data = ref([]); //列表数据
 const listRef = ref(); //列表dom

+ 1 - 2
src/views/system/elevator/modules/carbonEmission.vue

@@ -103,7 +103,7 @@ onMounted(() => {
                             }],
                             global: false // 缺省为 false
                         },
-                        barBorderRadius: [10, 10, 10, 10]
+                        borderRadius: [10, 10, 10, 10]
                     },
                 },
                 // 曲线表示运行异常
@@ -149,7 +149,6 @@ watch(() => props.resultData, (newVal) => {
         return Object.keys(obj).length === 0;
     }
     flagSion.value = isEmptyObject(newVal)
-    console.log(isEmptyObject(newVal), 88)
     if (chart) {
         chart.setOption({
             xAxis: {

+ 1 - 1
src/views/system/energy/modules/consume.vue

@@ -105,7 +105,7 @@ onMounted(() => {
                             }],
                             global: false // 缺省为 false
                         },
-                        barBorderRadius: [10, 10, 10, 10]
+                        borderRadius: [10, 10, 10, 10]
                     },
                 },
                 // 曲线

+ 0 - 2
src/views/system/entranceguard/equipment.vue

@@ -84,8 +84,6 @@ watch(() => props.resultData, (newVal) => {
     if (newVal) {
         // data.value = await getData();
         data.value = newVal.AlarmList;
-        console.log(data.value, 333);
-
         intervalId && clearInterval(intervalId);
         nextTick(() => {
             //判断列表是否生成滚动条

+ 1 - 1
src/views/system/entranceguard/index.vue

@@ -11,7 +11,7 @@
                     </div>
                     <div class="flex_spection">
                         <HeadlineTag value="非法侵入统计"></HeadlineTag>
-                        <div class="box_arch">
+                        <div class="box_arch" style="pointer-events: none;">
                             <inbreak :resultData="leftData"></inbreak>
                         </div>
                     </div>

+ 2 - 2
src/views/system/inspection/index.vue

@@ -50,9 +50,9 @@
               <div ref="chartRouting" style="width: 100%;height: 100%;"></div>
             </div>
           </div>
-          <div class="flex_spection">
+          <div class="flex_spection" style="height: 33%;">
             <HeadlineTag type="right" value="实时巡检"></HeadlineTag>
-            <div class="box_arch" style="height: 33%;">
+            <div class="box_arch">
               <polling :resultData="leftData.realTime"></polling>
             </div>
           </div>

+ 9 - 5
src/views/system/inspection/point.vue

@@ -3,7 +3,7 @@
         <div class="scroll-view" ref="scrollViewRef" @mouseenter="onMouseenter" @mouseleave="onMouseleave">
             <div ref="listRef" class="list" v-for="(p, n) in count" :key="n">
                 <div class="item" v-for="(item, index) in data" :key="index">
-                    <div class="_eventList_mains_item_text">
+                    <div class="_eventList_mains_item_text view_item">
                         <div :class="item.State === 0 ? '_warning' : '_success'"
                             class="_eventList_mains_item_text_flag">
                         </div>
@@ -11,9 +11,10 @@
                             {{ item.Name }}
                         </el-text>
                     </div>
-                    <el-text class="w-150px mb-2" :class="item.State == 0 ? 'blue_title' : 'red_title'">
+                    <el-text class="w-150px mb-2 view_item" style="justify-content: center;"
+                        :class="item.State == 0 ? 'blue_title' : 'red_title'">
                         {{ item.State == 0 ? '在线' : '离线' }}</el-text>
-                    <el-text class="w-150px mb-2" truncated style="color: white;">
+                    <el-text class="w-150px mb-2 view_item" truncated style="color: white;">
                         {{ item.Date }}
                     </el-text>
                 </div>
@@ -135,7 +136,7 @@ const onMouseleave = () => {
                     width: 10px;
                     height: 10px;
                     border-radius: 50%;
-                    margin-left: 10px;
+                    margin-right: 5px;
                 }
 
                 &_p {
@@ -161,10 +162,13 @@ const onMouseleave = () => {
 }
 
 .view_item {
-    flex: 1;
+    width: 33%;
     display: flex;
     align-items: center;
     justify-content: flex-start;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
 }
 
 .warning-view {

+ 7 - 3
src/views/system/intruderalarm/alarm.vue

@@ -159,9 +159,13 @@ const onMouseleave = () => {
 
 .view_item {
     flex: 1;
-    display: flex;
-    align-items: center;
-    justify-content: flex-start;
+    // display: flex;
+    // align-items: center;
+    // justify-content: flex-start;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    max-width: 33%;
 }
 
 .warning-view {

+ 45 - 15
src/views/system/lighting/modules/running.vue

@@ -75,8 +75,11 @@ const initAccess = () => {
             res.series.push({
                 // name: '职员1',
                 type: 'pie',
-                clockWise: false, //顺时加载
-                hoverAnimation: false, //鼠标移入变大
+                clockwise: true, //顺时加载
+                emphasis: {
+                    scale: false
+                },
+                //鼠标移入变大
                 radius: [65 - i * 15 + '%', 57 - i * 15 + '%'],
                 center: ['30%', '55%'],
                 label: {
@@ -106,7 +109,10 @@ const initAccess = () => {
                         tooltip: {
                             show: false,
                         },
-                        hoverAnimation: false,
+                        emphasis: {
+                            scale: false
+                        },
+
                     },
                 ],
             });
@@ -115,8 +121,11 @@ const initAccess = () => {
                 type: 'pie',
                 silent: true,
                 z: 1,
-                clockWise: false, //顺时加载
-                hoverAnimation: false, //鼠标移入变大
+                clockwise: true, //顺时加载
+                emphasis: {
+                    scale: false
+                },
+                //鼠标移入变大
                 radius: [65 - i * 15 + '%', 57 - i * 15 + '%'],
                 center: ['30%', '55%'],
                 label: {
@@ -141,7 +150,10 @@ const initAccess = () => {
                         tooltip: {
                             show: false,
                         },
-                        hoverAnimation: false,
+                        emphasis: {
+                            scale: false
+                        },
+
                     },
                     {
                         value: 2.5,
@@ -153,7 +165,10 @@ const initAccess = () => {
                         tooltip: {
                             show: false,
                         },
-                        hoverAnimation: false,
+                        emphasis: {
+                            scale: false
+                        },
+
                     },
                 ],
             });
@@ -208,7 +223,7 @@ const initAccess = () => {
         grid: {
             top: '20%',
             bottom: '48%',
-            left: '30%',
+            left: '20%',
             containLabel: false,
         },
         yAxis: [
@@ -296,8 +311,11 @@ watch(() => props.resultData, (newVal) => {
                 res.series.push({
                     // name: '职员1',
                     type: 'pie',
-                    clockWise: false, //顺时加载
-                    hoverAnimation: false, //鼠标移入变大
+                    clockwise: true, //顺时加载
+                    emphasis: {
+                        scale: false
+                    },
+                    //鼠标移入变大
                     radius: [65 - i * 15 + '%', 57 - i * 15 + '%'],
                     center: ['30%', '55%'],
                     label: {
@@ -327,7 +345,10 @@ watch(() => props.resultData, (newVal) => {
                             tooltip: {
                                 show: false,
                             },
-                            hoverAnimation: false,
+                            emphasis: {
+                                scale: false
+                            },
+
                         },
                     ],
                 });
@@ -336,8 +357,11 @@ watch(() => props.resultData, (newVal) => {
                     type: 'pie',
                     silent: true,
                     z: 1,
-                    clockWise: false, //顺时加载
-                    hoverAnimation: false, //鼠标移入变大
+                    clockwise: true, //顺时加载
+                    emphasis: {
+                        scale: false
+                    },
+                    //鼠标移入变大
                     radius: [65 - i * 15 + '%', 57 - i * 15 + '%'],
                     center: ['30%', '55%'],
                     label: {
@@ -362,7 +386,10 @@ watch(() => props.resultData, (newVal) => {
                             tooltip: {
                                 show: false,
                             },
-                            hoverAnimation: false,
+                            emphasis: {
+                                scale: false
+                            },
+
                         },
                         {
                             value: 2.5,
@@ -374,7 +401,10 @@ watch(() => props.resultData, (newVal) => {
                             tooltip: {
                                 show: false,
                             },
-                            hoverAnimation: false,
+                            emphasis: {
+                                scale: false
+                            },
+
                         },
                     ],
                 });

+ 18 - 21
src/views/system/message/modules/carbonEmission.vue

@@ -36,13 +36,12 @@ onMounted(() => {
     if (chartRef.value) {
         chart = echarts.init(chartRef.value);
         // 信息类型
-        const infoTypes = ['紧急通知', '政策法规', '活动预告', '其他'];
-        // 生成随机占比数据
-        const randomData = generateRandomData(4, 100);
-        const data = infoTypes.map((type, index) => ({
-            name: type,
-            value: randomData[index]
-        }));
+        // const infoTypes = ['紧急通知', '政策法规', '活动预告', '其他'];
+        // const randomData = generateRandomData(4, 100);
+        // const data = infoTypes.map((type, index) => ({
+        //     name: type,
+        //     value: randomData[index]
+        // }));
         const option = {
             // 添加动画效果
             animation: true,
@@ -118,20 +117,18 @@ onMounted(() => {
 });
 watch(() => props.resultData, (newVal) => {
     if (chart) {
-        let data = [{
-            name: newVal[0].InformationType,
-            value: newVal[0].UseState
-        }, {
-            name: newVal[1].InformationType,
-            value: newVal[1].UseState
-        }, {
-            name: newVal[2].InformationType,
-            value: newVal[2].UseState
-        }, {
-            name: newVal[3].InformationType,
-            value: newVal[3].UseState
-        }]
-        let legendData = [newVal[0].InformationType, newVal[1].InformationType, newVal[2].InformationType, newVal[3].InformationType]
+        let data = []
+        let legendData = []
+        let arrData = newVal
+        arrData.forEach((item) => {
+            // console.log(item, 776)
+            let arrObj = {
+                name: item.InformationType,
+                value: item.UseState,
+            }
+            data.push(arrObj)
+            legendData.push(item.InformationType)
+        })
         chart.setOption({
             legend: {
                 data: legendData,

+ 7 - 3
src/views/system/passageway/access.vue

@@ -162,9 +162,13 @@ const onMouseleave = () => {
 
 .view_item {
     flex: 1;
-    display: flex;
-    align-items: center;
-    justify-content: flex-start;
+    // display: flex;
+    // align-items: center;
+    // justify-content: flex-start;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    max-width: 33%;
 }
 
 .warning-view {

+ 6 - 5
src/views/system/passengerFlow/earlyWarning.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="person_box">
-        <div class="left_warning center_in">
+        <!-- <div class="left_warning center_in">
             <div class="warning_card center_in">
                 <svg class="warning_icon_star" aria-hidden="true">
                     <defs>
@@ -12,10 +12,10 @@
                     <use xlink:href="#icon-user" fill="url('#myGradient')" />
                 </svg>
             </div>
-        </div>
+        </div> -->
         <div class="right_warning">
             <div class="box_equipment">
-                <span class="equi_title">网络设备</span>
+                <span class="equi_title">客流监控设备</span>
                 <span class="equi_num">{{ networkDevices }}</span>
             </div>
             <div class="box_early_warn">
@@ -85,10 +85,11 @@ onMounted(() => {
 .right_warning {
     display: flex;
     flex-direction: column;
-    justify-content: center;
+    justify-content: space-evenly;
     flex: 1;
     height: 100%;
-    padding-left: 20px;
+    // padding-left: 20px;
+    padding-right: 20px;
 }
 
 .box_equipment {

+ 2 - 2
src/views/system/passengerFlow/index.vue

@@ -37,9 +37,9 @@
               <div ref="chartFlow" style="width: 100%;height: 100%;" />
             </div>
           </div>
-          <div class="flex_spection">
+          <div class="flex_spection" style="height: 33%;">
             <HeadlineTag type="right" value="安全事件列表"></HeadlineTag>
-            <div class="box_arch" style="height: 33%;">
+            <div class="box_arch">
               <incident  :resultData="leftData.Event"></incident>
             </div>
           </div>

+ 20 - 20
src/views/system/receptiondesk/conference.vue

@@ -1,41 +1,41 @@
 <template>
     <div style="width: 100%;height: 100%;">
-        <div class="top_hy">
-            <div class="item" style="width: 25%;">
+        <div class="confer_top_hy">
+            <div class="confer_item" style="width: 25%;">
                 <span>{{ data[0].title }}</span>
-                <span class="num_feed" :style="{ color: data[0].color, marginTop: data[0].top }">
+                <span class="confer_num_feed" :style="{ color: data[0].color, marginTop: data[0].top }">
                     <span :style="{ fontSize: data[0].fontsize }">{{ data[0].value || 0 }}</span>
                     {{ data[0].unit }}
                 </span>
             </div>
-            <div class="right_hy">
-                <div class="item" style="margin-bottom: 10px;flex-direction: row;">
+            <div class="confer_right_hy">
+                <div class="confer_item" style="margin-bottom: 10px;flex-direction: row;">
                     <span>{{ data[1].title }}</span>
-                    <span class="num_feed" :style="{ color: data[1].color, marginTop: data[1].top }">
+                    <span class="confer_num_feed" :style="{ color: data[1].color, marginTop: data[1].top }">
                         <span :style="{ fontSize: data[1].fontsize }">{{ data[1].value || 0 }}</span>
                     </span>
                 </div>
-                <div class="bottom_hy">
-                    <div class="item" style="margin-right: 10px;flex-direction: row;">
+                <div class="confer_bottom_hy">
+                    <div class="confer_item" style="margin-right: 10px;flex-direction: row;">
                         <span>{{ data[2].title }}</span>
-                        <span class="num_feed" :style="{ color: data[2].color, marginTop: data[2].top }">
+                        <span class="confer_num_feed" :style="{ color: data[2].color, marginTop: data[2].top }">
                             <span :style="{ fontSize: data[2].fontsize }">{{ data[2].value || 0 }}</span>
                             {{ data[2].unit }}
                         </span>
                     </div>
-                    <div class="item" style="flex-direction: row;">
+                    <div class="confer_item" style="flex-direction: row;">
                         <span>{{ data[3].title }}</span>
-                        <span class="num_feed" :style="{ color: data[3].color, marginTop: data[3].top }">
+                        <span class="confer_num_feed" :style="{ color: data[3].color, marginTop: data[3].top }">
                             <span :style="{ fontSize: data[3].fontsize }">{{ data[3].value || 0 }}</span>
                         </span>
                     </div>
                 </div>
             </div>
         </div>
-        <div class="person_box">
-            <div class="item" :style="{ flexDirection: item.align, }" v-for="(item, index) in configList" :key="index">
+        <div class="confer_person_box">
+            <div class="confer_item" :style="{ flexDirection: item.align, }" v-for="(item, index) in configList" :key="index">
                 <span>{{ item.title }}</span>
-                <span class="num_feed" :style="{ color: item.color, marginTop: item.top }">
+                <span class="confer_num_feed" :style="{ color: item.color, marginTop: item.top }">
                     <span :style="{ fontSize: item.fontsize }">{{ item.value || 0 }}</span>
                     {{ item.unit }}
                 </span>
@@ -129,7 +129,7 @@ watch(() => props.arrData, (newVal) => {
 </script>
 
 <style scoped lang="scss">
-.person_box {
+.confer_person_box {
     width: 100%;
     height: 66%;
     display: grid;
@@ -140,7 +140,7 @@ watch(() => props.arrData, (newVal) => {
 
 }
 
-.item {
+.confer_item {
     flex: 1;
     height: 100%;
     display: flex;
@@ -151,27 +151,27 @@ watch(() => props.arrData, (newVal) => {
     font-size: 14px;
 }
 
-.top_hy {
+.confer_top_hy {
     display: flex;
     width: 100%;
     height: 33%;
     padding: 10px 10px 0px 10px;
 }
 
-.right_hy {
+.confer_right_hy {
     display: flex;
     flex-direction: column;
     margin-left: 10px;
     width: calc(75% - 10px);
 }
 
-.bottom_hy {
+.confer_bottom_hy {
     display: flex;
     align-items: center;
     flex: 1;
 }
 
-.num_feed {
+.confer_num_feed {
     font-size: 14px;
 }
 </style>

+ 1 - 1
src/views/system/tenement/modules/carbonEmission.vue

@@ -103,7 +103,7 @@ onMounted(() => {
                             }],
                             global: false // 缺省为 false
                         },
-                        barBorderRadius: [10, 10, 10,10]
+                        borderRadius: [10, 10, 10,10]
                     },
                 },
                 // 曲线表示运行异常

+ 2 - 2
src/views/system/tenement/modules/consume.vue

@@ -32,8 +32,8 @@ import { ref } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
 const props = defineProps({
     resultData: {
-        type: Array,
-        default: []
+        type: Object,
+        default: {}
     }
 })
 const runningList = ref([

+ 2 - 2
src/views/system/tenement/modules/running.vue

@@ -35,8 +35,8 @@ import { ref } from "vue";
 import HeadlineTag from '@/components/HeadlineTag'
 const props = defineProps({
     resultData: {
-        type: Array,
-        default: []
+        type: Object,
+        default: {}
     }
 })
 const runningList = ref([