Browse Source

fix: 解决温度滚动条不能滑动的问题

chenzhen2 2 years ago
parent
commit
2957fda276

+ 2 - 3
src/apis/envmonitor.ts

@@ -170,8 +170,7 @@ export const querySpaceSceneConfig = (params: any) => {
  *  查询加班记录
  */
 export const queryCustomAndScence = (params: any) => {
-  //return https().request<any>(`${duoduoenvService}customScene/queryCustomAndScence?${params}`, Method.GET, undefined, ContentType.json)
-
+  //return https().request<any>(`${testApi}customScene/queryCustomAndScence?${params}`, Method.GET, undefined, ContentType.json)
   return https().request<any>(`${duoduoenvService}customScene/queryCustomAndScence?${params}`, Method.GET, undefined, ContentType.json)
 }
 
@@ -180,7 +179,7 @@ export const queryCustomAndScence = (params: any) => {
  * @param params
  */
 export const saveBatchCustomScene = (data: any) => {
-  // return post(`${duoduoenvService}customScene/saveBatchCustomScene`, data)
+  //return post(`${testApi}customScene/saveBatchCustomScene`, data)
   return post(`${duoduoenvService}customScene/saveBatchCustomScene`, data)
 }
 

+ 14 - 12
src/views/envmonitor/components/Air/manualIndex.vue

@@ -634,7 +634,7 @@ export default defineComponent({
         const domAirOpen = !childItem.isOpen;
         if (proxyData.forceOverTimeFlag && domAirOpen) {
           //需要强制加班
-          contx.emit("triggerWork", 2,childItem);
+          contx.emit("triggerWork", 2, childItem);
           return;
         }
         if (!childItem.isOpen && btnType !== "switch") {
@@ -797,16 +797,18 @@ export default defineComponent({
       // 初始化滚动
       async barSwiperInit() {
         if (proxyData.airData.isOpen && !proxyData.showChild) {
-          if (!proxyData.swiperIinit) {
-            await nextTick(() => {
-              proxyData.endBoxSwiper();
-              proxyData.setBarNowPerstion();
-            });
-          } else {
-            await nextTick(() => {
-              proxyData.setBarNowPerstion();
-            });
-          }
+          proxyData.endBoxSwiper();
+          proxyData.setBarNowPerstion();
+          // if (!proxyData.swiperIinit) {
+          //   await nextTick(() => {
+          //     proxyData.endBoxSwiper();
+          //     proxyData.setBarNowPerstion();
+          //   });
+          // } else {
+          //   await nextTick(() => {
+          //     proxyData.setBarNowPerstion();
+          //   });
+          // }
         }
       },
       // 设置子设备的可调范围
@@ -1129,7 +1131,7 @@ export default defineComponent({
     }
     .show-all {
       position: absolute;
-      width: 100px;
+      width: 110px;
       bottom: -8px;
       font-family: PingFang SC;
       font-size: 14px;

+ 20 - 5
src/views/envmonitor/components/ManualWork/index.vue

@@ -1096,7 +1096,7 @@ export default defineComponent({
           sceneEquipList:
             item && item.sceneEquipList ? item.sceneEquipList : [],
           objectId: proxyData.nowData.objectId, //类型:String  必有字段  备注:空间id
-          sourceType: "sagacareAndtenantslink", //类型:String  必有字段  备注:sagacareAndtenantslink 来源
+          sourceType: proxyData.userInfo.pubname, //类型:String  必有字段  备注:sagacareAndtenantslink 来源
           startDate: proxyData.nowData.oldDate, //类型:String  必有字段  备注://开始日期
           endDate: proxyData.nowData.oldDate, //类型:String  必有字段  备注://结束日期
           startTime: startTime, //类型:String  必有字段  备注://开始时间
@@ -1122,14 +1122,28 @@ export default defineComponent({
           timerArr[proxyData.startIndex].isCheck &&
           timerArr[endIndex].isCheck
         ) {
-          let customSceneList: any = proxyData.nowData.customSceneList;
+          let customSceneList: any = proxyData.nowData.customSceneList || [];
           let startTime: any = timerArr[proxyData.startIndex].formatTimer;
           let endTime: any = timerArr[proxyData.endIndex].formatTimer;
           let delTimerArr: any = [];
           let addTimeArr: any = [];
+
           // 删除时间的数据拼接
-          customSceneList.map((item: any, index: any) => {
-            if (item.startTime < startTime) {
+          for (let i = 0; i < customSceneList.length; i++) {
+            let item: any = customSceneList[i];
+            let index: any = i;
+            if (item.startTime === startTime && item.endTime === endTime) {
+              // 代表需要删除该段
+              // 整段删除
+              let delObj: any = proxyData.formaTimeObj(
+                item,
+                "1",
+                item.startTime,
+                item.endTime
+              );
+              delTimerArr.push(delObj);
+              break;
+            } else if (item.startTime < startTime) {
               if (item.endTime <= endTime) {
                 let delObj: any = proxyData.formaTimeObj(
                   item,
@@ -1221,7 +1235,8 @@ export default defineComponent({
                 addTimeArr.push(addObj1);
               }
             }
-          });
+          }
+
           addTimeArr.map((item: any) => {
             let realTime: any = getRelNowTime();
             if (realTime >= item.startTime && realTime <= item.endTime) {

+ 19 - 5
src/views/envmonitor/components/workOvertime/index.vue

@@ -878,7 +878,7 @@ export default defineComponent({
         let obj: any = {
           projectId: proxyData.projectId, //类型:String  必有字段  备注:项目id
           objectId: proxyData.nowData.objectId, //类型:String  必有字段  备注:空间id
-          sourceType: "sagacareAndtenantslink", //类型:String  必有字段  备注:sagacareAndtenantslink 来源
+          sourceType: proxyData.userInfo.pubname, //类型:String  必有字段  备注:sagacareAndtenantslink 来源
           startDate: proxyData.nowData.oldDate, //类型:String  必有字段  备注://开始日期
           endDate: proxyData.nowData.oldDate, //类型:String  必有字段  备注://结束日期
           startTime: startTime, //类型:String  必有字段  备注://开始时间
@@ -904,14 +904,27 @@ export default defineComponent({
           timerArr[proxyData.startIndex].isCheck &&
           timerArr[endIndex].isCheck
         ) {
-          let customSceneList: any = proxyData.nowData.customSceneList;
+          let customSceneList: any = proxyData.nowData.customSceneList || [];
           let startTime: any = timerArr[proxyData.startIndex].formatTimer;
           let endTime: any = timerArr[proxyData.endIndex].formatTimer;
           let delTimerArr: any = [];
           let addTimeArr: any = [];
           // 删除时间的数据拼接
-          customSceneList.map((item: any, index: any) => {
-            if (item.startTime < startTime) {
+          for (let i = 0; i < customSceneList.length; i++) {
+            let index: any = i;
+            let item: any = customSceneList[i];
+            if (startTime == item.startTime && endTime == item.endTime) {
+              // 代表需要删除该段
+              // 整段删除
+              let delObj: any = proxyData.formaTimeObj(
+                item,
+                "1",
+                item.startTime,
+                item.endTime
+              );
+              delTimerArr.push(delObj);
+              break;
+            } else if (item.startTime < startTime) {
               if (item.endTime <= endTime) {
                 let delObj: any = proxyData.formaTimeObj(
                   item,
@@ -1003,7 +1016,8 @@ export default defineComponent({
                 addTimeArr.push(addObj1);
               }
             }
-          });
+          }
+
           addTimeArr.map((item: any) => {
             let realTime: any = getRelNowTime();
             if (realTime >= item.startTime && realTime <= item.endTime) {

+ 1 - 1
vue.config.js

@@ -109,7 +109,7 @@ module.exports = {
       '/sgipad/test/': {
         // target: 'https://duoduoenv.sagacloud.cn',
         // target: 'http://192.168.0.13:52009',
-        target: 'http://192.168.4.54:58002',
+        target: 'http://192.168.4.54:52009',
         changeOrigin: true,
         pathRewrite: {
           '^/sgipad/test': ''