Преглед на файлове

fix:修改后台服务停止,页面继续刷新;修改切换屏幕

zhaojing преди 2 години
родител
ревизия
a397efc964

+ 24 - 24
src/App.vue

@@ -3,21 +3,22 @@ import { ref, defineComponent, reactive, toRefs, watch, onMounted } from "vue";
 import useProjectStore from "@/store/useProjectStore";
 
 export default defineComponent({
-    setup() {
-        const projectStore = useProjectStore();
-        onMounted(() => {
-            
-             
-            //这两个请求不能写在这里  因为router.beforeEach 发生在后面,获取不到projectId
-            // projectStore.setWeather();
-            // projectStore.setProjectObj();
-        });
-
-        watch(projectStore.$state, (nstate, ostate) => {
-            //console.log(nstate.projectId, ostate.projectId);
-           // debugger;
-        });
-    },
+  setup() {
+    const projectStore = useProjectStore();
+    onMounted(() => {
+      //这两个请求不能写在这里  因为router.beforeEach 发生在后面,获取不到projectId
+      // projectStore.setWeather();
+      // projectStore.setProjectObj();
+    });
+    // projectStore.$subscribe((mutation, state) => {
+    //   console.log("projectStore--state222", mutation);
+    //   // console.log("projectStore--state222", mutation,  JSON.stringify(state));
+    // });
+    // watch(projectStore.$state, (nstate, ostate) => {
+    //   console.log('watch-state',JSON.stringify(nstate) , JSON.stringify(ostate));
+    //    // debugger;
+    // });
+  },
 });
 </script>
 
@@ -26,15 +27,14 @@ export default defineComponent({
 </template>
 
 <style scoped lang="scss">
-
 #app {
-    font-family: Avenir, Helvetica, Arial, sans-serif;
-    -webkit-font-smoothing: antialiased;
-    -moz-osx-font-smoothing: grayscale;
-  
-    // background: #f3fdff;
-    //   text-align: center;
-    //   color: #2c3e50;
-    //   margin-top: 60px;
+  font-family: Avenir, Helvetica, Arial, sans-serif;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+
+  // background: #f3fdff;
+  //   text-align: center;
+  //   color: #2c3e50;
+  //   margin-top: 60px;
 }
 </style>

+ 3 - 0
src/assets/image/horImg/lastbutton.svg

@@ -0,0 +1,3 @@
+<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M11.0667 14.6518C10.5333 14.2517 10.5333 13.4517 11.0667 13.0518L16.4 9.0519C17.0593 8.55749 18 9.02788 18 9.85191V17.8519C18 18.676 17.0592 19.1463 16.4 18.6519L11.0667 14.6518ZM9.8 8.85196C9.35817 8.85196 9 9.21013 9 9.65196V18.052C9 18.4938 9.35817 18.852 9.8 18.852C10.2418 18.852 10.6 18.4938 10.6 18.052V9.65196C10.6 9.21013 10.2418 8.85196 9.8 8.85196Z" fill="#EFDEC6"/>
+</svg>

+ 3 - 0
src/assets/image/horImg/nextButton.svg

@@ -0,0 +1,3 @@
+<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M15.9333 14.6518C16.4667 14.2517 16.4667 13.4517 15.9333 13.0518L10.6 9.0519C9.94075 8.55749 9 9.02788 9 9.85191V17.8519C9 18.676 9.94078 19.1463 10.6 18.6519L15.9333 14.6518ZM17.2 8.85196C17.6418 8.85196 18 9.21013 18 9.65196V18.052C18 18.4938 17.6418 18.852 17.2 18.852C16.7582 18.852 16.4 18.4938 16.4 18.052V9.65196C16.4 9.21013 16.7582 8.85196 17.2 8.85196Z" fill="#EFDEC6"/>
+</svg>

Файловите разлики са ограничени, защото са твърде много
+ 69 - 0
src/assets/image/horImg/persagyLogo2.svg


+ 3 - 0
src/assets/image/horImg/playbutton.svg

@@ -0,0 +1,3 @@
+<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M14 23C18.9706 23 23 18.9706 23 14C23 9.02944 18.9706 5 14 5C9.02944 5 5 9.02944 5 14C5 18.9706 9.02944 23 14 23ZM17.0781 14.7681C17.5579 14.3683 17.5579 13.6314 17.0781 13.2316L13.6402 10.3668C12.9888 9.824 12 10.2872 12 11.135L12 16.8649C12 17.7128 12.9889 18.1759 13.6402 17.6331L17.0781 14.7681Z" fill="#EFDEC6"/>
+</svg>

+ 3 - 0
src/assets/image/horImg/stopbutton.svg

@@ -0,0 +1,3 @@
+<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M23 14C23 18.9706 18.9706 23 14 23C9.02944 23 5 18.9706 5 14C5 9.02944 9.02944 5 14 5C18.9706 5 23 9.02944 23 14ZM11 11.5C11 10.9477 11.4477 10.5 12 10.5C12.5523 10.5 13 10.9477 13 11.5V16.5C13 17.0523 12.5523 17.5 12 17.5C11.4477 17.5 11 17.0523 11 16.5V11.5ZM16 10.5C15.4477 10.5 15 10.9477 15 11.5V16.5C15 17.0523 15.4477 17.5 16 17.5C16.5523 17.5 17 17.0523 17 16.5V11.5C17 10.9477 16.5523 10.5 16 10.5Z" fill="#EFDEC6"/>
+</svg>

+ 20 - 9
src/components/HorFloorSpace.vue

@@ -242,6 +242,7 @@ export default defineComponent({
                         allData.fqueryFs();
                     })
                     .catch((res) => {
+                        contx.emit("donetowpage"); // 所有建筑切换完毕
                         // loading.close();
                     });
             },
@@ -335,10 +336,18 @@ export default defineComponent({
 
                         allData.nowIndicatorIndex = 0;
                         //debugger;
-                        allData.getTimeFloorParam(2000);
+                        allData.getTimeFloorParam(3000);
                     })
                     .catch(function(res) {
                         // loading.close();
+                        allData.nowBuildPage = allData.nowBuildPage + 1;
+                            if (
+                                allData.nowBuildPage > allData.allBuild.length
+                            ) {
+                                contx.emit("donetowpage"); // 所有建筑切换完毕
+                                return;
+                            }
+                            allData.fqueryFs();
                     });
             },
             toplay(){
@@ -355,16 +364,15 @@ export default defineComponent({
                         : allData.secondPageParams;
 
                 allData.fqueryParam(floorparam).then(() => {
+                    if(projectStore.stopSign){ 
+                            return;
+                        }
                     allData.timeoutsign = setTimeout(() => {
                         //debugger;
-                        // if(projectStore.stopSign){ 
-                        //     return;
-                        // }
                         allData.nowIndicatorIndex =
                             allData.nowIndicatorIndex + 1; //湿度等指标的轮询变化
                         if (allData.nowIndicatorIndex == 5) {//如果指标轮询结束 通知切换
                             if (allData.pageNum == allData.nowPage) {
-                                
                                 allData.nowPage = 1;
                                 if (
                                     allData.nowBuildPage ==
@@ -386,8 +394,10 @@ export default defineComponent({
                                 allData.nowIndicatorIndex = 0;
                             }
                         }
-                        allData.getTimeFloorParam(2000);
+                        allData.getTimeFloorParam(3000);
                     }, time);
+                }).catch(()=>{
+                    //debugger;
                 });
             },
             fqueryParam(floorparam) {
@@ -403,7 +413,6 @@ export default defineComponent({
                 return queryParam(endStr, startStr, param, floorparam).then(
                     (res) => {
                         //loading.close();
-
                         //debugger;
                         var showFloors = (res.data.data || {}).floors || [];
                         allData.totalAvgValues =
@@ -435,7 +444,9 @@ export default defineComponent({
                         allData.showFloors = showFloors;
                         allData.selIndicatorId = allData.selIndicator.id;
                     }
-                );
+                ).catch((err) => {
+                    //debugger;
+                });
             },
             spaceHandle(spaceNum) {
                 //返回一层 的每一行 几个房间
@@ -474,7 +485,7 @@ export default defineComponent({
         onMounted(() => {
             allData.nowPage = 1;
             allData.hqueryBuild();
-            console.log("floorspace-mounted");
+            //console.log("floorspace-mounted");
         });
         return { ...toRefs(allData) };
     },

+ 9 - 6
src/components/LastMonthData.vue

@@ -56,11 +56,7 @@ export default defineComponent({
         const allData = reactive({
             lastDataArr: [],
         });
-        onMounted(() => {
-            queryEnvHistory()
-                .then((res) => {
-                    var lastMonthData = res.data.data || [];
-                    var lastMonthInit = [
+        const lastMonthInit = [
                         {
                             id: "temp",
                             name: "温度",
@@ -125,6 +121,11 @@ export default defineComponent({
                             fixed: 0,
                         },
                     ];
+        onMounted(() => {
+            queryEnvHistory()
+                .then((res) => {
+                    var lastMonthData = res.data.data || [];
+               
                     lastMonthInit.forEach((item) => {
                         var filterRes = lastMonthData.filter((ele) => {
                             return ele.code == item.code;
@@ -143,7 +144,9 @@ export default defineComponent({
                     // debugger;
                     allData.lastDataArr = lastMonthInit;
                 })
-                .catch((err) => {});
+                .catch((err) => {
+                    allData.lastDataArr = lastMonthInit;
+                });
         });
         return { ...toRefs(allData) };
     },

+ 9 - 7
src/components/NowData.vue

@@ -47,12 +47,7 @@ export default defineComponent({
             realDataArr: [],
             selectColor: selectColor,
         });
-
-        onMounted(() => {
-            queryEnvCurrent()
-                .then((res) => {
-                    let realTimeData = res.data.data || [];
-                    let realInit = [
+        const realInit = [
                         {
                             id: "temp",
                             code: "Tdb",
@@ -96,6 +91,11 @@ export default defineComponent({
                             fixed: 0,
                         },
                     ];
+        onMounted(() => {
+            queryEnvCurrent()
+                .then((res) => {
+                    let realTimeData = res.data.data || [];
+               
                     realInit.forEach((item) => {
                         var filterRes = realTimeData.filter((ele) => {
                             return ele.code == item.code;
@@ -107,7 +107,9 @@ export default defineComponent({
                     });
                     allData.realDataArr = realInit;
                 })
-                .catch((err) => {});
+                .catch((err) => {
+                    allData.realDataArr = realInit;
+                });
         });
         return { ...toRefs(allData) };
     },

+ 2 - 0
src/components/airSwitchHor.vue

@@ -44,6 +44,7 @@ export default defineComponent({
             //console.log("allData.watch");
         });
         onUnmounted(() => {
+            //console.log("airswitch-unmounted");
             if (allData.achart) {
                 allData.achart.destroy();
                 //console.log("allData.achart222", allData.achart);
@@ -126,6 +127,7 @@ export default defineComponent({
             interval.elements[0].setState("active", true); //将第一个数据设置成 选中状态
         };
         onMounted(() => {
+            //console.log("airswitch-onMounted");
             //initChart();
         });
         // onMounted(() => {

+ 17 - 2
src/components/lastEnergyChart.vue

@@ -14,11 +14,12 @@
     </div>
 </template>
 <script lang="ts">
-import { ref, defineComponent, reactive, toRefs, onMounted } from "vue";
+import { ref, defineComponent, reactive, toRefs, onMounted,watch } from "vue";
 import moment from "moment";
 import { queryLastDayEnergy } from "@/api/index";
 import { Chart, registerShape } from "@antv/g2";
 import DataSet from "@antv/data-set";
+import useProjectStore from "@/store/useProjectStore";
 
 // 自定义 shape, 支持图片形式的气泡
 registerShape("interval", "borderRadius", {
@@ -51,6 +52,7 @@ export default defineComponent({
         },
     },
     setup(props, contx) {
+        const projectStore = useProjectStore();
         const lastChartBox = ref();
         const allData = reactive({
             lastChart: null,
@@ -89,6 +91,10 @@ export default defineComponent({
                     allData.lastChart = allData.cInitChart(resdata);
                     //console.log("contx,contx", contx, contx.emit);
                     allData.setChartInterval();
+                }).catch(()=>{
+                    setTimeout(() => {
+                            contx.emit("donethreepage");
+                        }, 6000);
                 });
             },
             toplay(){
@@ -108,6 +114,9 @@ export default defineComponent({
                     //     .subtract(1, "months")
                     //     .date(12);
                     //var end2 = moment().subtract(1, "months");
+                    if(projectStore.stopSign){ 
+                            return;
+                        }
                     allData.intervalInt = setInterval(() => {
                         var start=moment(allData.ds.state.laststart).add(1, "days");
                         var end=moment(allData.ds.state.lastend).add(1, "days");
@@ -132,7 +141,7 @@ export default defineComponent({
                         //     // allData.lastChart.render(true);
                         // });
 
-                        if (rows.length == 11) {
+                        if (rows.length == 11) {//一页12个数据 如果是11个时停止
                             clearInterval(allData.intervalInt);
                             contx.emit("donethreepage");
                         }
@@ -260,7 +269,13 @@ export default defineComponent({
                 return chart;
             },
         });
+        //这个可以用来监听一个store.state值的变化,detached: false 代表当前组件被卸载时,该监听失效
+        // projectStore.$subscribe((mutation, state) => {
+        //     console.log("projectStore--state222", mutation);
+        //  // console.log("projectStore--state222", mutation,  JSON.stringify(state));
+        // }, { detached: false });
         onMounted(() => {
+            console.log("energychart-mounted");
             allData.getLastDayEnergy();
         });
         return { ...toRefs(allData), lastChartBox };

+ 83 - 24
src/components/pageHead.vue

@@ -8,6 +8,7 @@
             <!-- <img :src="title" v-else /> -->
         </div>
         <div class="horHead-left">
+          <div class="CBIClass">塑美尚格</div>
             <img
                 :src="logo"
                 alt=""
@@ -20,7 +21,26 @@
             </div>
             <div class="right-item">{{ weatherCont.text }}</div>
             <div
-                class="right-item"
+                class="right-item button-wrap" style="display:none;"
+            >
+                <img
+                    class="controlImg" 
+                    alt=""
+                    src="@/assets/image/horImg/lastbutton.svg"  @click="toLast"
+                />
+                <img
+                    class="controlImg"
+                    alt=""
+                    :src="stopSign?playbutton:stopbutton"  @click="toPlayStop" 
+                />
+                <img
+                    class="controlImg" 
+                    alt=""
+                    src="@/assets/image/horImg/nextButton.svg"  @click="toNext" 
+                />
+            </div>
+            <div
+                class="right-item button-wrap"
                 @click="changeScreen"
             >
                 <img
@@ -29,18 +49,6 @@
                     :src="nowScreen == 'vertical' ? changeHor : changeVer"
                 />
             </div>
-            <div
-                class="right-item showButton" @click="toPlay"
-            >播放</div>
-            <div
-                class="right-item showButton" @click="toStop"
-            >暂停</div>
-            <div
-                class="right-item showButton" @click="toLast"
-            >上一页</div>
-            <div
-                class="right-item showButton" @click="toNext"
-            >下一页</div>
         </div>
     </div>
 </template>
@@ -60,22 +68,39 @@ export default defineComponent({
     },
   },
   setup(props, contx) {
-    const { persagyLogo, zhijiangLogo, changeHor, changeVer } = dapingImage;
+    const {
+      CBILogo,
+      persagyLogo,
+      zhijiangLogo,
+      changeHor,
+      changeVer,
+      playbutton,
+      stopbutton,
+    } = dapingImage;
 
     const route: any = useRoute();
     const router = useRouter();
     const projectStore = useProjectStore();
 
-    const { weatherCont, projectObj, projectId } = storeToRefs(projectStore);
+    const { weatherCont, projectObj, projectId, stopSign } = storeToRefs(
+      projectStore
+    );
 
     const allData = reactive({
       // logo: new URL(
       //     "../assets/image/horImg/zhijianglogo.png",
       //     import.meta.url
       // ).href,
-      logo: projectId == "Pj3301100002" ? zhijiangLogo : persagyLogo,
+      logo:
+        projectStore.projectId == "Pj3301100002"
+          ? zhijiangLogo
+          : projectStore.projectId == "Pj1101010007"
+            ? CBILogo
+            : persagyLogo,
       changeHor: changeHor,
       changeVer: changeVer,
+      playbutton: playbutton,
+      stopbutton: stopbutton,
       nowScreen:
         route.path.indexOf("horiScreen") > -1 ? "horizontal" : "vertical",
       nowStr: moment().format("YYYY.MM.DD HH:mm"),
@@ -96,28 +121,39 @@ export default defineComponent({
           router.push({ path: "/verScreen" });
         }
       },
+      toPlayStop() {
+        if (projectStore.stopSign == true) {
+          projectStore.stopSign = false;
+          contx.emit("toplay");
+        } else {
+          projectStore.stopSign = true;
+          contx.emit("tostop");
+        }
+      },
       toPlay() {
-        projectStore.stopSign=false;
+        projectStore.stopSign = false;
         contx.emit("toplay");
       },
       toStop() {
-        debugger;
-        projectStore.stopSign=true;
+        projectStore.stopSign = true;
         contx.emit("tostop");
       },
       toLast() {
+        // class="[stopSign?'':'disbaleImg']"
+        //if(!projectStore.stopSign)return;
         contx.emit("lastpage");
       },
       toNext() {
+        //if(!projectStore.stopSign)return;
         contx.emit("nextpage");
       },
     });
 
     onMounted(() => {
-        console.log("pagehead-mounted");
+      console.log("pagehead-mounted");
       allData.setNowInterval();
     });
-    return { ...toRefs(allData), weatherCont, projectObj };
+    return { ...toRefs(allData), weatherCont, projectObj, stopSign };
   },
 });
 </script>
@@ -152,6 +188,16 @@ export default defineComponent({
     top: 0;
     left: 0;
     font-size: 0;
+    display: flex;
+    align-items: center;
+    .CBIClass {
+      display: inline-block;
+      font-size: 25px;
+      color: #efdec6;
+      font-family: Alibaba PuHuiTi;
+      margin-right:10px;
+      font-weight:600;
+    }
   }
   .horHead-right {
     position: absolute;
@@ -165,7 +211,6 @@ export default defineComponent({
       display: flex;
       justify-content: center;
       align-items: center;
-      cursor: pointer;
       // padding: 12px 16px;
       font-size: 20px;
       color: #efdec6;
@@ -176,20 +221,34 @@ export default defineComponent({
       // border: 2px solid #ffffffcc;
       box-sizing: border-box;
       // border-radius: 8px;
+      .controlImg {
+        margin-right: 0px;
+        width: 34px;
+        cursor: pointer;
+      }
+      .disbaleImg {
+        opacity: 0.3;
+      }
       .firstImg {
-        margin-right: 6px;
+        margin-right: 10px;
         width: 28px;
+        cursor: pointer;
       }
       .item-time {
         font-family: Persagy;
         font-weight: 400;
       }
     }
+    .button-wrap {
+      padding: 0 10px 0 10px;
+      background: rgba(100, 108, 130, 0.3);
+      backdrop-filter: blur(5px);
+      border-radius: 8px;
+    }
     .showButton {
       background: #fff;
       padding: 5px 8px;
       color: #4f4f4f;
-      display:none;
     }
   }
 }

+ 1 - 1
src/router/index.ts

@@ -44,7 +44,7 @@ router.beforeEach(async (to, from, next) => {
     var projectId2;
     //var xxx = Encrypt("Pj1101050043");
     //console.log("xxxx",dealRes);
-    if(projectId=='zhcfzxbj'){
+    if(projectId=='zhcfzxbj'){//北京中海财富中心定制
         projectId2='Pj1101020002';
     }else{
         projectId && (projectId2 = Decrypt(projectId));

+ 1 - 1
src/store/useProjectStore.ts

@@ -14,7 +14,7 @@ const useProjectStore = defineStore({
     state: (): projectStoreState => {
         return {
             weatherCont: {}, //天气
-            projectId: "Pj1101080259", // "Pj3301100002",
+            projectId: "Pj1101010007", // "Pj3301100002", Pj1101080259
             projectObj: {},
             lastAllEnergy: {},
             stopSign:false

+ 8 - 0
src/utils/dapingImage.ts

@@ -1,4 +1,5 @@
 import persagyLogo from "@/assets/image/horImg/persagyLogo.svg";
+import CBILogo from "@/assets/image/horImg/persagyLogo2.svg";
 import zhijiangLogo from "@/assets/image/horImg/zhijianglogo.png";
 
 import changeVer from "@/assets/image/horImg/changeVer.svg";
@@ -32,6 +33,9 @@ import floor_wendu_ver from "@/assets/image/horImg/floor_wendu_ver.png";
 
 import lastGold from "@/assets/image/horImg/lastGold.svg";
 import lastGray from "@/assets/image/horImg/lastGray.svg";
+import playbutton from "@/assets/image/horImg/playbutton.svg"
+import stopbutton from "@/assets/image/horImg/stopbutton.svg"
+
 export const dapingImage = {
     persagyLogo: persagyLogo,
     zhijiangLogo: zhijiangLogo,
@@ -66,4 +70,8 @@ export const dapingImage = {
 
     lastGold: lastGold,
     lastGray: lastGray,
+
+    playbutton:playbutton,
+    stopbutton:stopbutton,
+    CBILogo:CBILogo
 };

+ 16 - 14
src/views/horiScreen/index.vue

@@ -124,25 +124,24 @@ export default {
             //showAllPage: 3,
             toplay(){
                 //todo
-                // if(allData.nowPage==2){
-                //     floorSpace.value&&floorSpace.value.toplay();//第二屏动画播放
-                // }else{
-                //     allData.timePageShow(500);
-                // }
-                allData.timePageShow(500);
+                if(allData.nowPage==2){
+                    floorSpace.value&&floorSpace.value.toplay();//第二屏动画播放
+                }else{
+                    allData.timePageShow(500);
+                }
             },
             tostop(){
                 //todo
-                // if(allData.nowPage==2){
-                //     floorSpace.value&&floorSpace.value.tostop();//第二屏动画暂停
-                // }
-                
+                if(allData.nowPage==2){
+                    floorSpace.value&&floorSpace.value.tostop();//第二屏动画暂停
+                }
                 clearTimeout(allData.timeoutsign);
             },
             nextpage(){
-                //allData.nowPage = allData.nowPage + 1;
+                clearTimeout(allData.timeoutsign);
                 if (allData.nowPage == 3) {
                         allData.nowPage = 1;
+                        !projectStore.stopSign&&allData.timePageShow(7000);//3屏变1屏时,预订下一次的切屏
                         return;
                 }
                 if (allData.nowPage == 1) {
@@ -155,20 +154,24 @@ export default {
                     } else if (showAllPage.value == 2) {
                         allData.nowPage = 1;
                     }
+                    !projectStore.stopSign&&allData.timePageShow(7000);//预订下一次的切屏
                 }
             },
             lastpage(){
+                clearTimeout(allData.timeoutsign);
                 if (allData.nowPage == 3) {
                         allData.nowPage = 2;
                         return;
                 }
                 if (allData.nowPage == 2) {
                     allData.nowPage = 1;
+                    !projectStore.stopSign&&allData.timePageShow(7000);//3屏变1屏时,预订下一次的切屏
                     return;
                 }
                 if (allData.nowPage == 1) { 
                     if (showAllPage.value == 3) {
                         allData.nowPage = 3;
+                        !projectStore.stopSign&&allData.timePageShow(7000);//1屏变3屏时,预订下一次的切屏
                     } else if (showAllPage.value == 2) {
                         allData.nowPage = 2;
                     }
@@ -184,21 +187,20 @@ export default {
             },
             timePageShow(time) {
                 allData.timeoutsign = setTimeout(() => {
+             
                     if(projectStore.stopSign){ 
                         //clearTimeout(allData.timeoutsign);
                         return;
                     }
-                   // allData.nowPage = allData.nowPage + 1;
                     if (allData.nowPage == 3) {
                         allData.nowPage = 1;
-                        console.log('allData.nowPage3',allData.nowPage,time);
+                        //console.log('allData.nowPage3',allData.nowPage,time);
                         allData.timePageShow(7000);//3屏变1屏时,预订下一次的切屏
                         return;
                     }
                     if (allData.nowPage == 1) {
                         allData.nowPage = 2;
                         console.log('allData.nowPage1',allData.nowPage,time);
-                        //clearTimeout(allData.timeoutsign);
                         return;
                     }
                     if (allData.nowPage == 2) { 

+ 20 - 17
src/views/verScreen/index.vue

@@ -110,24 +110,23 @@ export default defineComponent({
             timeoutsign:null,
             //showAllPage: 3,
             toplay(){
-                // if(allData.nowPage==2){
-                //     floorSpace.value&&floorSpace.value.toplay();//第二屏动画播放
-                // }else if(allData.nowPage==3){
-                //     energyChart.value&&energyChart.value.toplay();//第三屏动画播放
-                // }else{
-                //     allData.timePageShow(500);
-                // }
-                allData.timePageShow(500);
+                if(allData.nowPage==2){
+                    floorSpace.value&&floorSpace.value.toplay();//第二屏动画播放
+                }else if(allData.nowPage==3){
+                    energyChart.value&&energyChart.value.toplay();//第三屏动画播放
+                }else{
+                    allData.timePageShow(500);
+                }
             },
             tostop(){
-                // if(allData.nowPage==2){
-                //     floorSpace.value&&floorSpace.value.tostop();//第二屏动画暂停
-                // }else if(allData.nowPage==3){
-                //     energyChart.value&&energyChart.value.tostop();//第三屏动画暂停
-                // }else{
-                //     clearTimeout(allData.timeoutsign);
-                // }
-                clearTimeout(allData.timeoutsign);
+                if(allData.nowPage==2){
+                    floorSpace.value&&floorSpace.value.tostop();//第二屏动画暂停
+                }else if(allData.nowPage==3){
+                    energyChart.value&&energyChart.value.tostop();//第三屏动画暂停
+                }else{
+                    clearTimeout(allData.timeoutsign);
+                }
+                //clearTimeout(allData.timeoutsign);
             },
             doneThreePage() {
                 if(projectStore.stopSign){ 
@@ -150,9 +149,10 @@ export default defineComponent({
                allData.timePageShow(500);
             },
             nextpage(){
-                    //allData.nowPage = allData.nowPage + 1;
+                clearTimeout(allData.timeoutsign);
                 if (allData.nowPage == 3) {
                     allData.nowPage = 1;
+                    !projectStore.stopSign&&allData.timePageShow(7000);//3屏变1屏时,预订下一次的切屏
                     return;
                 }
                 if (allData.nowPage == 1) {
@@ -164,16 +164,19 @@ export default defineComponent({
                         allData.nowPage = 3;
                     } else if (showAllPage.value == 2) {
                         allData.nowPage = 1;
+                        !projectStore.stopSign&&allData.timePageShow(7000);//3屏变1屏时,预订下一次的切屏
                     }
                 }
             },
             lastpage(){
+                clearTimeout(allData.timeoutsign);
                 if (allData.nowPage == 3) {
                     allData.nowPage = 2;
                     return;
                 }
                 if (allData.nowPage == 2) {
                     allData.nowPage = 1;
+                    !projectStore.stopSign&&allData.timePageShow(7000);//3屏变1屏时,预订下一次的切屏
                     return;
                 }
                 if (allData.nowPage == 1) {