فهرست منبع

fix:pad新增需求修改

chenzhen2 1 سال پیش
والد
کامیت
997dfb4335

+ 2 - 2
public/images/ipdImages/rectangle-active.svg

@@ -1,7 +1,7 @@
 <svg width="193" height="40" viewBox="0 0 193 40" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0 40L-1.74846e-06 7.62939e-06L153 9.41552e-07C167.001 3.29535e-07 174.002 2.35269e-08 179.35 2.72483C184.054 5.12167 187.878 8.94619 190.275 13.6502C193 18.998 193 25.9987 193 40L0 40Z" fill="url(#paint0_linear_998_8038)"/>
+<path d="M0 40L-1.74846e-06 7.62939e-06L153 9.41552e-07C167.001 3.29535e-07 174.002 2.35269e-08 179.35 2.72483C184.054 5.12167 187.878 8.94619 190.275 13.6502C193 18.998 193 25.9987 193 40L0 40Z" fill="url(#paint0_linear_2106_6264)"/>
 <defs>
-<linearGradient id="paint0_linear_998_8038" x1="-8.74228e-07" y1="20" x2="193" y2="20" gradientUnits="userSpaceOnUse">
+<linearGradient id="paint0_linear_2106_6264" x1="-8.74228e-07" y1="20" x2="193" y2="20" gradientUnits="userSpaceOnUse">
 <stop stop-color="#C5A861"/>
 <stop offset="1" stop-color="#EBD9A8"/>
 </linearGradient>

+ 2 - 2
public/images/ipdImages/rectangle-fotter.svg

@@ -1,7 +1,7 @@
 <svg width="93" height="40" viewBox="0 0 93 40" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0 40L-1.74846e-06 3.8147e-06L53 1.49799e-06C67.0013 8.85977e-07 74.002 5.79968e-07 79.3498 2.72483C84.0538 5.12167 87.8783 8.94618 90.2752 13.6502C93 18.998 93 25.9987 93 40L0 40Z" fill="url(#paint0_linear_1187_8053)"/>
+<path d="M0 40L-1.74846e-06 3.8147e-06L53 1.49799e-06C67.0013 8.85977e-07 74.002 5.79968e-07 79.3498 2.72483C84.0538 5.12167 87.8783 8.94618 90.2752 13.6502C93 18.998 93 25.9987 93 40L0 40Z" fill="url(#paint0_linear_2106_6254)"/>
 <defs>
-<linearGradient id="paint0_linear_1187_8053" x1="93" y1="27" x2="18.4726" y2="27" gradientUnits="userSpaceOnUse">
+<linearGradient id="paint0_linear_2106_6254" x1="93" y1="27" x2="18.4726" y2="27" gradientUnits="userSpaceOnUse">
 <stop stop-color="#414141"/>
 <stop offset="1" stop-color="#282828"/>
 </linearGradient>

+ 4 - 4
public/images/ipdImages/rectangle3.svg

@@ -1,9 +1,9 @@
 <svg width="160" height="40" viewBox="0 0 160 40" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0 40L-1.74846e-06 0L120 -5.24537e-06C134.001 -5.85738e-06 141.002 -6.16339e-06 146.35 2.72483C151.054 5.12166 154.878 8.94618 157.275 13.6502C160 18.998 160 25.9987 160 40L0 40Z" fill="url(#paint0_linear_998_8032)"/>
+<path d="M0 40L-1.74846e-06 0L120 -5.24537e-06C134.001 -5.85738e-06 141.002 -6.16339e-06 146.35 2.72483C151.054 5.12166 154.878 8.94618 157.275 13.6502C160 18.998 160 25.9987 160 40L0 40Z" fill="url(#paint0_linear_2106_3439)"/>
 <defs>
-<linearGradient id="paint0_linear_998_8032" x1="160" y1="27" x2="31.7808" y2="27" gradientUnits="userSpaceOnUse">
-<stop stop-color="#414141"/>
-<stop offset="1" stop-color="#282828"/>
+<linearGradient id="paint0_linear_2106_3439" x1="-8.74228e-07" y1="20" x2="160" y2="20" gradientUnits="userSpaceOnUse">
+<stop stop-color="#C5A861"/>
+<stop offset="1" stop-color="#EBD9A8"/>
 </linearGradient>
 </defs>
 </svg>

+ 3 - 3
public/images/ipdImages/rectangle1.svg

@@ -1,7 +1,7 @@
-<svg width="195" height="40" viewBox="0 0 195 40" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0 40L-1.74846e-06 7.62939e-06L155 8.54129e-07C169.001 2.42113e-07 176.002 -6.38958e-08 181.35 2.72483C186.054 5.12167 189.878 8.94619 192.275 13.6502C195 18.998 195 25.9987 195 40L0 40Z" fill="url(#paint0_linear_998_8035)"/>
+<svg width="160" height="40" viewBox="0 0 160 40" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M0 40L-1.74846e-06 0L120 -5.24537e-06C134.001 -5.85738e-06 141.002 -6.16339e-06 146.35 2.72483C151.054 5.12166 154.878 8.94618 157.275 13.6502C160 18.998 160 25.9987 160 40L0 40Z" fill="url(#paint0_linear_2106_6258)"/>
 <defs>
-<linearGradient id="paint0_linear_998_8035" x1="195" y1="27" x2="38.7329" y2="27" gradientUnits="userSpaceOnUse">
+<linearGradient id="paint0_linear_2106_6258" x1="160" y1="27" x2="31.7808" y2="27" gradientUnits="userSpaceOnUse">
 <stop stop-color="#414141"/>
 <stop offset="1" stop-color="#282828"/>
 </linearGradient>

+ 3 - 2
public/images/ipdImages/rectangle2.svg

@@ -1,7 +1,8 @@
+
 <svg width="195" height="40" viewBox="0 0 195 40" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0 40L-1.74846e-06 7.62939e-06L155 8.54129e-07C169.001 2.42113e-07 176.002 -6.38958e-08 181.35 2.72483C186.054 5.12167 189.878 8.94619 192.275 13.6502C195 18.998 195 25.9987 195 40L0 40Z" fill="url(#paint0_linear_1040_8060)"/>
+<path d="M0 40L-1.74846e-06 7.62939e-06L155 8.54129e-07C169.001 2.42113e-07 176.002 -6.38958e-08 181.35 2.72483C186.054 5.12167 189.878 8.94619 192.275 13.6502C195 18.998 195 25.9987 195 40L0 40Z" fill="url(#paint0_linear_2106_3442)"/>
 <defs>
-<linearGradient id="paint0_linear_1040_8060" x1="195" y1="27" x2="38.7329" y2="27" gradientUnits="userSpaceOnUse">
+<linearGradient id="paint0_linear_2106_3442" x1="195" y1="27" x2="38.7329" y2="27" gradientUnits="userSpaceOnUse">
 <stop stop-color="#414141"/>
 <stop offset="1" stop-color="#282828"/>
 </linearGradient>

+ 1 - 1
src/apis/envmonitor.ts

@@ -43,7 +43,7 @@ export const changeTempHttp = (params: any) => {
 // 查询灯的状态(优先查采集的状态)
 export const getLampHttp = (params: any) => {
   // { timeout: 2000 }
-  return https().request<RootObject<any>>(`${duoduoenvService}light/status/query?spaceId=${params.spaceId}`, Method.GET, undefined, ContentType.json)
+  return https({ timeout: 150000 }).request<RootObject<any>>(`${duoduoenvService}light/status/query?spaceId=${params.spaceId}`, Method.GET, undefined, ContentType.json)
   // return https({ timeout: 20000 }).request<RootObject<any>>(`${testApi}light/status/query?spaceId=${params.spaceId}`, Method.GET, undefined, ContentType.json)
 }
 

+ 23 - 0
src/utils/index.ts

@@ -687,3 +687,26 @@ export const formateTimeContinuous: any = function (index: any = 1,
     }
   }
 }
+
+export const fix: any = function (d: any) {
+  if (parseInt(d) == d) return d;
+
+  // 小数变整数.
+  let len: any = 1;
+  while (parseInt(d) != d) {
+    d = d * 10;
+    len *= 10;
+  }
+
+  // 取末位
+  let last: any = Math.abs(len == 1 ? 0 : d % 10);
+  let d1: any = d - last;
+  if (last >= 0 && last < 5) {
+    d1 = d1 + 5;
+  } else {
+    d1 = d1 + 10;
+  }
+
+  d1 = d1 / len;
+  return d1;
+}

+ 34 - 26
src/views/envmonitor/components/Air/ChildAirControl.vue

@@ -153,12 +153,12 @@ import {
   onUnmounted,
   onBeforeMount,
   onBeforeUnmount,
-  nextTick,
+  nextTick
 } from "vue";
 import { Switch, Dialog, Toast } from "vant";
 import { swiper } from "@/utils/swiper";
 import { querySpaceConditioners, setSpaceCondtioners } from "@/apis/envmonitor";
-import { getRelNowTime, parseImgUrl, setQueryConfig } from "@/utils";
+import { fix, getRelNowTime, parseImgUrl, setQueryConfig } from "@/utils";
 import any = jasmine.any;
 
 export default defineComponent({
@@ -166,11 +166,11 @@ export default defineComponent({
     temperature: {
       // 空调基本信息
       type: Number,
-      default: () => 0,
+      default: () => 0
     },
     airData: {
       type: Object,
-      default: () => {},
+      default: () => {}
     },
     // hasAir: {
     //   // 有无空调
@@ -180,33 +180,33 @@ export default defineComponent({
     airVolumes: {
       // 风量信息
       type: Array,
-      default: () => [],
+      default: () => []
     },
     projectId: {
       type: String,
-      default: () => "",
+      default: () => ""
     },
     spaceId: {
       type: String,
-      default: () => "",
+      default: () => ""
     },
     userIsControl: {
       type: Boolean,
-      default: () => false,
+      default: () => false
     },
     forceOverTimeFlag: {
       type: Boolean,
-      default: () => false,
+      default: () => false
     },
     seviceEquipmentList: {
       // 是否走服务定制的设备
       type: Array,
-      default: () => [],
-    },
+      default: () => []
+    }
   },
   components: {
     Switch,
-    [Dialog.Component.name]: Dialog.Component,
+    [Dialog.Component.name]: Dialog.Component
   },
   setup(props, contx) {
     const propsVal = props;
@@ -223,7 +223,7 @@ export default defineComponent({
       workMode: 0, //1=cold(制冷);2=hot(制热);3=wind(通风)
       gear: 0, //  风量
       isOpen: false, // 空调开关 true 是开
-      runStatus: 0, // 查询设备的真实状态
+      runStatus: 0 // 查询设备的真实状态
     };
     const feedbackTimer: any = null;
     const airTimer: any = null;
@@ -270,7 +270,7 @@ export default defineComponent({
         remark: [],
         nowImg: "",
         toWhere: "",
-        designTemperature: 0,
+        designTemperature: 0
       },
       // 设置温度条的位置
       setBarNowPerstion() {
@@ -340,19 +340,19 @@ export default defineComponent({
         if (!handBox) {
           return;
         }
-        handBox.addEventListener("touchstart", function (e: any) {
+        handBox.addEventListener("touchstart", function(e: any) {
           barLeft = isNaN(parseInt(barBox.style.left))
             ? 0
             : parseInt(barBox.style.left);
           isMove = true;
         });
-        handBox.addEventListener("touchend", function (e: any) {
+        handBox.addEventListener("touchend", function(e: any) {
           isMove = false;
           proxyData.changeZongAir("temp", proxyData.realTemp);
           proxyData.airTemp = proxyData.realTemp;
         });
         swiper(handBox, {
-          swipeLeft: function (e: any) {
+          swipeLeft: function(e: any) {
             if (isMove) {
               barLeft = Math.abs(barLeft);
               let moveRealX: any = Math.abs(e.mation.moveX - e.mation.startX);
@@ -360,20 +360,28 @@ export default defineComponent({
               left = left < 0 ? 0 : left;
               barBox.style.left = left + "px";
               proxyData.realTemp = left * part + proxyData.airData.minTempSet;
-              proxyData.realTemp = Math.round(proxyData.realTemp);
+              // proxyData.realTemp = Math.round(proxyData.realTemp);
+              if (proxyData.realTemp) {
+                proxyData.realTemp = proxyData.realTemp.toFixed(1);
+                proxyData.realTemp = fix(proxyData.realTemp);
+              }
             }
           },
-          swipeRight: function (e: any) {
+          swipeRight: function(e: any) {
             if (isMove) {
               barLeft = Math.abs(barLeft);
               let moveRealX: any = Math.abs(e.mation.moveX - e.mation.startX);
               let left: any = barLeft + moveRealX;
               left = left > sliderWidth ? sliderWidth : left;
               proxyData.realTemp = left * part + proxyData.airData.minTempSet;
-              proxyData.realTemp = Math.round(proxyData.realTemp);
+              // proxyData.realTemp = Math.round(proxyData.realTemp);
+              if (proxyData.realTemp) {
+                proxyData.realTemp = proxyData.realTemp.toFixed(1);
+                proxyData.realTemp = fix(proxyData.realTemp);
+              }
               barBox.style.left = left + proxyData.sliderPading + "px";
             }
-          },
+          }
         });
       },
       // 获取操作时长
@@ -447,7 +455,7 @@ export default defineComponent({
       // 改变设备状态
       setSpaceCondtioners(data: any) {
         setSpaceCondtioners(data)
-          .then((res) => {
+          .then(res => {
             proxyData.loadinngEnd();
           })
           .catch(() => {
@@ -465,7 +473,7 @@ export default defineComponent({
         let obj: any = {
           id: proxyData.airData.id, //类型:String  必有字段  备注:设备id
           code: proxyData.airData[equpObj.codeKey], //类型:String  必有字段  备注:编码 EquipSwtichSet
-          value: equpObj.value, //类型:String  必有字段  备注:值 0
+          value: equpObj.value //类型:String  必有字段  备注:值 0
         };
         data.push(obj);
         console.log("设备数据处理---");
@@ -480,7 +488,7 @@ export default defineComponent({
         proxyData.endBoxSwiper();
         // debugger
         proxyData.setBarNowPerstion();
-      },
+      }
     });
     onBeforeUnmount(() => {});
     onMounted(() => {
@@ -490,9 +498,9 @@ export default defineComponent({
       });
     });
     return {
-      ...toRefs(proxyData),
+      ...toRefs(proxyData)
     };
-  },
+  }
 });
 </script>
   <style lang="scss" scoped>

+ 20 - 4
src/views/envmonitor/components/Air/manualIndex.vue

@@ -243,7 +243,7 @@ import {
 import { Switch, Dialog, Toast } from "vant";
 import { swiper } from "@/utils/swiper";
 import { querySpaceConditioners, setSpaceCondtioners } from "@/apis/envmonitor";
-import { getRelNowTime, parseImgUrl, setQueryConfig } from "@/utils";
+import { fix, getRelNowTime, parseImgUrl, setQueryConfig } from "@/utils";
 import any = jasmine.any;
 
 export default defineComponent({
@@ -421,7 +421,7 @@ export default defineComponent({
         ) {
           let left: any =
             (proxyData.airTemp - proxyData.airData.minTempSet) / proxyData.part;
-          left = Math.floor(left);
+          // left = Math.floor(left);
           if (barBox) {
             barBox.style.left = left + "px";
           }
@@ -487,7 +487,11 @@ export default defineComponent({
               left = left < 0 ? 0 : left;
               barBox.style.left = left + "px";
               proxyData.realTemp = left * part + proxyData.airData.minTempSet;
-              proxyData.realTemp = Math.round(proxyData.realTemp);
+              // proxyData.realTemp = Math.round(proxyData.realTemp);
+              if (proxyData.realTemp) {
+                proxyData.realTemp = proxyData.realTemp.toFixed(1);
+                proxyData.realTemp = fix(proxyData.realTemp);
+              }
             }
           },
           swipeRight: function(e: any) {
@@ -497,7 +501,11 @@ export default defineComponent({
               let left: any = barLeft + moveRealX;
               left = left > sliderWidth ? sliderWidth : left;
               proxyData.realTemp = left * part + proxyData.airData.minTempSet;
-              proxyData.realTemp = Math.round(proxyData.realTemp);
+              // proxyData.realTemp = Math.round(proxyData.realTemp);
+              if (proxyData.realTemp) {
+                proxyData.realTemp = proxyData.realTemp.toFixed(1);
+                proxyData.realTemp = fix(proxyData.realTemp);
+              }
               barBox.style.left = left + proxyData.sliderPading + "px";
             }
           }
@@ -879,6 +887,10 @@ export default defineComponent({
         proxyData.equipList.map((item: any) => {
           item.isOpen = item.runStatus === 1 ? true : false;
           item.boundPoint = item.boundPoint || {};
+          if (item.tempSet) {
+            item.tempSet = item.tempSet.toFixed(1);
+            item.tempSet = fix(item.tempSet);
+          }
         });
       },
       // 初始化滚动
@@ -973,6 +985,10 @@ export default defineComponent({
             proxyData.firstLoadingAir = false;
             proxyData.loadingAir = false;
             proxyData.airTemp = data.tempSet;
+            if (proxyData.airTemp) {
+              proxyData.airTemp = proxyData.airTemp.toFixed(1);
+              proxyData.airTemp = fix(proxyData.airTemp);
+            }
             proxyData.airData.maxTempSet = data.maxTempSet;
             proxyData.airData.minTempSet = data.minTempSet;
             proxyData.airData.isOpen = data.runStatus ? true : false;

+ 26 - 17
src/views/envmonitor/components/FloorHeating/ChildTempSet.vue

@@ -37,30 +37,31 @@ import {
   onUnmounted,
   onBeforeMount,
   onBeforeUnmount,
-  nextTick,
+  nextTick
 } from "vue";
 import { Switch, Dialog, Toast } from "vant";
 import { swiper } from "@/utils/swiper";
 import { querySpaceConditioners, setSpaceCondtioners } from "@/apis/envmonitor";
-import { parseImgUrl, setQueryConfig } from "@/utils";
+import { fix, parseImgUrl, setQueryConfig } from "@/utils";
 import any = jasmine.any;
 
 export default defineComponent({
   props: {
     floorData: {
       type: Object,
-      default: () => {},
-    },
+      default: () => {}
+    }
   },
   components: { Switch },
   setup(props, contx) {
     const propsVal = props;
     let timeTemp: any = null;
     let timeColor: any = null;
+    let realTemp: any = 0;
     const proxyData = reactive({
       lampSw: false,
       itemWidth: "0%",
-      realTemp: 0,
+      realTemp: realTemp,
       part: 0,
       floorData: props.floorData,
       swiperIinit: false,
@@ -70,7 +71,7 @@ export default defineComponent({
         let obj: any = {
           id: proxyData.floorData.id, //类型:String  必有字段  备注:设备id
           code: proxyData.floorData.tempSetCode, //类型:String  必有字段  备注:编码 EquipSwtichSet
-          value: proxyData.realTemp, //类型:String  必有字段  备注:值 0
+          value: proxyData.realTemp //类型:String  必有字段  备注:值 0
         };
         data.push(obj);
         console.log(data);
@@ -80,7 +81,7 @@ export default defineComponent({
       setSpaceCondtioners(data: any) {
         console.log("调节数据", data);
         setSpaceCondtioners(data)
-          .then((res) => {})
+          .then(res => {})
           .catch(() => {
             Toast("连接异常,请检查网络!");
           });
@@ -120,18 +121,18 @@ export default defineComponent({
         if (!handBox) {
           return;
         }
-        handBox.addEventListener("touchstart", function (e: any) {
+        handBox.addEventListener("touchstart", function(e: any) {
           barLeft = isNaN(parseInt(barBox.style.left))
             ? 0
             : parseInt(barBox.style.left);
           isMove = true;
         });
-        handBox.addEventListener("touchend", function (e: any) {
+        handBox.addEventListener("touchend", function(e: any) {
           isMove = false;
           proxyData.changeChildTemp();
         });
         swiper(handBox, {
-          swipeLeft: function (e: any) {
+          swipeLeft: function(e: any) {
             if (isMove) {
               barLeft = Math.abs(barLeft);
               let moveRealX: any = Math.abs(e.mation.moveX - e.mation.startX);
@@ -139,10 +140,14 @@ export default defineComponent({
               left = left < 0 ? 0 : left;
               barBox.style.left = left + "px";
               proxyData.realTemp = left * part + proxyData.floorData.minTempSet;
-              proxyData.realTemp = Math.round(proxyData.realTemp);
+              // proxyData.realTemp = Math.round(proxyData.realTemp);
+              if (proxyData.realTemp) {
+                proxyData.realTemp = proxyData.realTemp.toFixed(1);
+                proxyData.realTemp = fix(proxyData.realTemp);
+              }
             }
           },
-          swipeRight: function (e: any) {
+          swipeRight: function(e: any) {
             if (isMove) {
               barLeft = Math.abs(barLeft);
               let moveRealX: any = Math.abs(e.mation.moveX - e.mation.startX);
@@ -150,9 +155,13 @@ export default defineComponent({
               left = left > sliderWidth ? sliderWidth : left;
               barBox.style.left = left + "px";
               proxyData.realTemp = left * part + proxyData.floorData.minTempSet;
-              proxyData.realTemp = Math.round(proxyData.realTemp);
+              // proxyData.realTemp = Math.round(proxyData.realTemp);
+              if (proxyData.realTemp) {
+                proxyData.realTemp = proxyData.realTemp.toFixed(1);
+                proxyData.realTemp = fix(proxyData.realTemp);
+              }
             }
-          },
+          }
         });
       },
       // 设置温度条的位置
@@ -198,7 +207,7 @@ export default defineComponent({
           proxyData.endBoxSwiper();
           proxyData.setBarNowPerstion();
         });
-      },
+      }
     });
 
     watch(props, (newProps: any) => {});
@@ -207,9 +216,9 @@ export default defineComponent({
       proxyData.barSwiperInit();
     });
     return {
-      ...toRefs(proxyData),
+      ...toRefs(proxyData)
     };
-  },
+  }
 });
 </script>
   <style lang="scss" scoped>

+ 52 - 32
src/views/envmonitor/components/FloorHeating/index.vue

@@ -115,7 +115,7 @@ import {
   watch,
   onBeforeMount,
   onUnmounted,
-  onBeforeUnmount,
+  onBeforeUnmount
 } from "vue";
 import { Switch, Toast } from "vant";
 import {
@@ -123,9 +123,9 @@ import {
   getStatusHttp,
   querySapceFloorHeating,
   setallLampHttp,
-  setSpaceCondtioners,
+  setSpaceCondtioners
 } from "@/apis/envmonitor";
-import { getRelNowTime, parseImgUrl, setQueryConfig } from "@/utils";
+import { fix, getRelNowTime, parseImgUrl, setQueryConfig } from "@/utils";
 import { type } from "os";
 import { onDeactivated } from "vue";
 import { AnyMxRecord } from "dns";
@@ -136,29 +136,29 @@ export default defineComponent({
   props: {
     projectId: {
       type: String,
-      default: () => "",
+      default: () => ""
     },
     spaceId: {
       type: String,
-      default: () => "",
+      default: () => ""
     },
     showFloorBox: {
       type: Boolean,
-      default: () => false,
+      default: () => false
     },
     userIsControl: {
       type: Boolean,
-      default: () => false,
+      default: () => false
     },
     forceOverTimeFlag: {
       type: Boolean,
-      default: () => false,
+      default: () => false
     },
     seviceEquipmentList: {
       // 是否走服务定制的设备
       type: Array,
-      default: () => [],
-    },
+      default: () => []
+    }
   },
   components: { Switch },
   setup(props, contx) {
@@ -166,6 +166,7 @@ export default defineComponent({
     let heatingData: any = {};
     let floorHeathingStatus: any = null;
     const timeOut: any = null;
+    let realTemp: any = 0;
     const proxyData = reactive({
       distroyFlag: false,
       seviceEquipmentList: props.seviceEquipmentList,
@@ -181,7 +182,7 @@ export default defineComponent({
       floorHeathingStatus: floorHeathingStatus,
       swiperIinit: false,
       part: 1,
-      realTemp: 0,
+      realTemp: realTemp,
       navType: "all",
       runStatus: 0,
       lightColorImg: parseImgUrl("page-officehome", "lightColorControl.svg"),
@@ -208,7 +209,7 @@ export default defineComponent({
           let obj: any = {
             id: item.id, //类型:String  必有字段  备注:设备id
             code: code, //类型:String  必有字段  备注:编码 EquipSwtichSet
-            value: value, //类型:String  必有字段  备注:值 0
+            value: value //类型:String  必有字段  备注:值 0
           };
           data.push(obj);
         });
@@ -228,7 +229,7 @@ export default defineComponent({
           let obj: any = {
             id: item.id, //类型:String  必有字段  备注:设备id
             code: code, //类型:String  必有字段  备注:编码 EquipSwtichSet
-            value: value, //类型:String  必有字段  备注:值 0
+            value: value //类型:String  必有字段  备注:值 0
           };
           data.push(obj);
         });
@@ -243,7 +244,7 @@ export default defineComponent({
       setSpaceCondtioners(data: any, item: any = null) {
         console.log("调节数据", data);
         setSpaceCondtioners(data)
-          .then((res) => {
+          .then(res => {
             proxyData.loadingFlag = false;
             if (item) {
               item.loading = false;
@@ -321,18 +322,18 @@ export default defineComponent({
         if (!handBox) {
           return;
         }
-        handBox.addEventListener("touchstart", function (e: any) {
+        handBox.addEventListener("touchstart", function(e: any) {
           barLeft = isNaN(parseInt(barBox.style.left))
             ? 0
             : parseInt(barBox.style.left);
           isMove = true;
         });
-        handBox.addEventListener("touchend", function (e: any) {
+        handBox.addEventListener("touchend", function(e: any) {
           isMove = false;
           proxyData.eqChangeTemp();
         });
         swiper(handBox, {
-          swipeLeft: function (e: any) {
+          swipeLeft: function(e: any) {
             if (isMove) {
               barLeft = Math.abs(barLeft);
               let moveRealX: any = Math.abs(e.mation.moveX - e.mation.startX);
@@ -341,10 +342,14 @@ export default defineComponent({
               barBox.style.left = left + "px";
               proxyData.realTemp =
                 left * part + proxyData.heatingData.minTempSet;
-              proxyData.realTemp = Math.round(proxyData.realTemp);
+              // proxyData.realTemp = Math.round(proxyData.realTemp);
+              if (proxyData.realTemp) {
+                proxyData.realTemp = proxyData.realTemp.toFixed(1);
+                proxyData.realTemp = fix(proxyData.realTemp);
+              }
             }
           },
-          swipeRight: function (e: any) {
+          swipeRight: function(e: any) {
             if (isMove) {
               barLeft = Math.abs(barLeft);
               let moveRealX: any = Math.abs(e.mation.moveX - e.mation.startX);
@@ -353,17 +358,27 @@ export default defineComponent({
               barBox.style.left = left + "px";
               proxyData.realTemp =
                 left * part + proxyData.heatingData.minTempSet;
-              proxyData.realTemp = Math.round(proxyData.realTemp);
+              // proxyData.realTemp = Math.round(proxyData.realTemp);
+              if (proxyData.realTemp) {
+                proxyData.realTemp = proxyData.realTemp.toFixed(1);
+                proxyData.realTemp = fix(proxyData.realTemp);
+              }
             }
-          },
+          }
         });
       },
-      // 设置温度条的位置
-      setBarNowPerstion() {
+      setRelTemp() {
         proxyData.realTemp = proxyData.heatingData.tempSet
           ? proxyData.heatingData.tempSet
           : 0;
 
+        if (proxyData.realTemp) {
+          proxyData.realTemp = proxyData.realTemp.toFixed(1);
+          proxyData.realTemp = fix(proxyData.realTemp);
+        }
+      },
+      // 设置温度条的位置
+      setBarNowPerstion() {
         let barBox: any = document.querySelector("#barFloorId");
         if (!barBox) {
           return;
@@ -406,21 +421,26 @@ export default defineComponent({
         }
         proxyData.floorHeatingList.map((item: any) => {
           item.switch = item.runStatus ? true : false;
+          if (item.tempSet) {
+            item.tempSet = item.tempSet.toFixed(1);
+            item.tempSet = fix(item.tempSet);
+          }
         });
       },
       // 获取地暖的状态
       getFloorHeatingList() {
         let str: any = setQueryConfig({ spaceId: proxyData.spaceId });
         querySapceFloorHeating(str)
-          .then((res) => {
+          .then(res => {
             const resData: any = res;
             const data: any = resData ? resData.data : {};
             proxyData.heatingData = data;
-            // if (data.equipList && data.equipList.length) {
-            //   proxyData.floorHeatingList = data.equipList || [];
-            // }
-            proxyData.floorHeatingList = [data.equipList[0]];
+            if (data.equipList && data.equipList.length) {
+              proxyData.floorHeatingList = data.equipList || [];
+            }
+            // proxyData.floorHeatingList = [data.equipList[0]];
             proxyData.formateDataStatus();
+            proxyData.setRelTemp();
             proxyData.sliderInit();
             proxyData.startfloorHeathingStatus();
           })
@@ -458,7 +478,7 @@ export default defineComponent({
             proxyData.getFloorHeatingList();
           }
         }, timerLen);
-      },
+      }
     });
     watch(
       [() => props, () => props.spaceId],
@@ -485,7 +505,7 @@ export default defineComponent({
       },
       {
         deep: true,
-        immediate: true,
+        immediate: true
       }
     );
     onBeforeUnmount(() => {
@@ -500,9 +520,9 @@ export default defineComponent({
       proxyData.getFloorHeatingList();
     });
     return {
-      ...toRefs(proxyData),
+      ...toRefs(proxyData)
     };
-  },
+  }
 });
 </script>
   <style lang="scss" scoped>

+ 22 - 13
src/views/envmonitor/components/ManualWork/index.vue

@@ -137,17 +137,13 @@
       </template>
 
       <div class="device-tip" v-if="isAir">
-        <span>计费方式:</span>
-        <p>
-          <span> * </span>
-          空调延时采用后付费方式,系统将根据您申请的时间产生延时费用。预约时间下您可自由开启空间下的设备。
-        </p>
-        <p>
-          收费标准按开机设备对应空间的面积计费,空调加时费用按0.4元/m²·h进行计费,照明设备延时使用不计费。
-        </p>
-        <p>
-          如您提前结束工作,请点击“我要离开”按钮,系统会自动调整设备关闭时间,感谢与您一同共创可持续的办公环境。
-        </p>
+        <span>* 设备加时提示:</span>
+        <ul>
+          <li>工作日大厦提供固定时段空调,其余时间可通过“预约加时”功能额外申请空调使用时间;</li>
+          <li>空调加时采用后付费方式,系统将依据真实使用时长,空间面积和加时单价据实计算加时费用,空调加时单价为0.4元/㎡·h;</li>
+          <li>提交完申请,待您所在公司<b>行政人员审批通过后</b>,预约时段内您可自由开关空间下的设备;</li>
+          <li>如您提前结束使用,请点击“我要离开”按钮,系统会自动调整设备关闭时间我们期待与您共创可持续的办公空间。</li>
+        </ul>
       </div>
     </div>
 
@@ -1902,8 +1898,21 @@ export default defineComponent({
       display: inline-block;
       padding-bottom: 10px;
     }
-    p {
-      line-height: 24px;
+    ul {
+      list-style-position: inside;
+      list-style: disc !important;
+      li {
+        list-style: disc !important;
+        color: rgba(139, 148, 158, 1);
+        font-family: PingFang SC;
+        font-size: 12px;
+        font-weight: 400;
+        line-height: 26px;
+        padding-bottom: 5px;
+        b{
+          color: #000;
+        }
+      }
     }
   }
 }

+ 50 - 25
src/views/envmonitor/index.vue

@@ -47,7 +47,7 @@
       </div>
       <div class="left-space">
         <div class="text">
-          <div>
+          <div  @click.stop="refreshSpace">
             {{ officeData.localName }}
           </div>
           <!-- <div
@@ -73,6 +73,7 @@
             <img :src="parseImgUrl('ipdImages', 'template-icon.svg')" alt="" />
             <span class="temp-text">温度</span>
             <span class="temp-num"
+            @click="handleDetail(envlist[3])"
               >{{ officeData.temperature ? officeData.temperature : "--"
               }}<sup>℃</sup></span
             >
@@ -115,9 +116,9 @@
           >
             <img
               v-if="item.active"
-              :src="parseImgUrl('ipdImages', 'rectangle-active.svg')"
+              :src="index==0?parseImgUrl('ipdImages', 'rectangle1-active.svg'):parseImgUrl('ipdImages', 'rectangle-active.svg')"
             />
-            <img :src="parseImgUrl('ipdImages', 'rectangle1.svg')" v-else />
+            <img :src="index==0?parseImgUrl('ipdImages', 'rectangle1.svg'):parseImgUrl('ipdImages', 'rectangle2.svg')" v-else />
 
             <span>{{ item.spaceName }} </span>
           </div>
@@ -2050,8 +2051,21 @@ export default defineComponent({
           proxyData.spaceData[index2] = temp;
         }
       },
+      refreshSpace(){
+        console.log("被点击了--");
+        let space:any={}
+        proxyData.spaceData.map((item:any)=>{
+          if(item.spaceId===proxyData.spaceInfo.spaceId){
+            space=item
+          }
+        })
+        proxyData.changeSpace(space,2);
+      },
       // 切换空间
       changeSpace(item: any, type: any = 0) {
+        if( proxyData.spaceInfo.spaceId==item.spaceId && type!==2){
+          return;
+        }
         //清除空间下所有的定时器
         proxyData.clearAll();
         // 重置当前选中空间的状态
@@ -2496,33 +2510,23 @@ export default defineComponent({
       position: relative;
       display: inline-block;
       vertical-align: middle;
-      width: 186px;
+      // width: 195px;
+      width: 193px;
       height: 40px;
       font-size: 0;
       img {
         width: 100%;
+        // height: 100%;
         height: 40px;
       }
-      &:nth-child(1) {
-        left: 0;
-        z-index: 333;
-      }
-      &:nth-child(2) {
-        margin-left: -25px;
-        z-index: 222;
-      }
-      &:nth-child(3) {
-        margin-left: -25px;
-        z-index: 111;
-      }
       span {
         position: absolute;
         display: inline-block;
         width: 128px;
         height: 18px;
-        left: 50%;
-        top: 50%;
-        transform: translateY(-40%) translateX(-50%);
+        top: 12px;
+        // top: 50%;
+        // transform: translateY(-48%);
         font-family: "Noto Sans SC";
         font-style: normal;
         font-weight: 400;
@@ -2535,6 +2539,28 @@ export default defineComponent({
         text-overflow: ellipsis; /*隐藏后添加省略号*/
         white-space: nowrap; /*强制不换行*/
       }
+      &:nth-child(1) {
+        left: 0;
+        width: 160px;
+        z-index: 333;
+        span {
+          left: 16px;
+        }
+      }
+      &:nth-child(2) {
+        margin-left: -33px;
+        z-index: 222;
+        span {
+          right: 16px;
+        }
+      }
+      &:nth-child(3) {
+        margin-left: -33px;
+        z-index: 111;
+        span {
+          right: 16px;
+        }
+      }
     }
     .fotter-item-end {
       position: relative;
@@ -2547,26 +2573,25 @@ export default defineComponent({
       z-index: 1;
       img {
         width: 100%;
+        height: 40px;
       }
       span {
         position: absolute;
-        left: 50%;
+        // left: 50%;
         top: 50%;
-        transform: translate(-50%, -50%);
+        right: 28px;
+        transform: translateY(-50%);
         font-family: "Noto Sans SC";
         font-style: normal;
         font-weight: 400;
         font-size: 16px;
+        line-height: 18px;
         text-align: center;
         color: #c3c7cb;
       }
     }
     .fotter-item-active {
-      margin-bottom: 0px;
       z-index: 999;
-      img {
-        height: 40px;
-      }
       span {
         color: #1f2429;
       }