Pārlūkot izejas kodu

fix:手动控制功能

chenzhen2 2 gadi atpakaļ
vecāks
revīzija
3a92f38fec
70 mainītis faili ar 1459 papildinājumiem un 610 dzēšanām
  1. 3 0
      dist/sgipad/images/ipdImages/check-close.svg
  2. 18 0
      dist/sgipad/images/ipdImages/check-open.svg
  3. 1 1
      dist/sgipad/index.html
  4. 1 1
      dist/sgipad/static/css/app.9aebc428.css
  5. 0 1
      dist/sgipad/static/css/chunk-01a39fae.c4397bd5.css
  6. 1 1
      dist/sgipad/static/css/chunk-65cea362.7e10f898.css
  7. BIN
      dist/sgipad/static/css/chunk-166172f4.c9dd4cbe.css.gz
  8. 1 0
      dist/sgipad/static/css/chunk-230ff16d.2d8af64c.css
  9. 1 0
      dist/sgipad/static/css/chunk-282841c6.7bdba1d7.css
  10. 0 1
      dist/sgipad/static/css/chunk-30cb0a71.6c543edf.css
  11. 1 0
      dist/sgipad/static/css/chunk-434d96be.bab2fed5.css
  12. BIN
      dist/sgipad/static/css/chunk-434d96be.bab2fed5.css.gz
  13. BIN
      dist/sgipad/static/css/chunk-65cea362.7e10f898.css.gz
  14. 0 1
      dist/sgipad/static/css/chunk-766e521a.5dbdea74.css
  15. BIN
      dist/sgipad/static/css/chunk-766e521a.5dbdea74.css.gz
  16. BIN
      dist/sgipad/static/js/app.6abc1a01.js.gz
  17. 2 2
      dist/sgipad/static/js/app.6abc1a01.js
  18. BIN
      dist/sgipad/static/js/app.9fe9a268.js.gz
  19. 1 1
      dist/sgipad/static/js/app.6abc1a01.js.map
  20. 0 2
      dist/sgipad/static/js/chunk-01a39fae.1a577376.js
  21. BIN
      dist/sgipad/static/js/chunk-01a39fae.1a577376.js.gz
  22. 0 1
      dist/sgipad/static/js/chunk-01a39fae.1a577376.js.map
  23. 2 2
      dist/sgipad/static/js/chunk-65cea362.3bb23099.js
  24. BIN
      dist/sgipad/static/js/chunk-166172f4.6d91288c.js.gz
  25. 1 1
      dist/sgipad/static/js/chunk-65cea362.3bb23099.js.map
  26. 2 0
      dist/sgipad/static/js/chunk-230ff16d.7fce0ae8.js
  27. BIN
      dist/sgipad/static/js/chunk-230ff16d.7fce0ae8.js.gz
  28. 1 0
      dist/sgipad/static/js/chunk-230ff16d.7fce0ae8.js.map
  29. 2 0
      dist/sgipad/static/js/chunk-282841c6.780c138c.js
  30. 1 0
      dist/sgipad/static/js/chunk-282841c6.780c138c.js.map
  31. BIN
      dist/sgipad/static/js/chunk-2a19e7ab.9b5118ec.js.gz
  32. 0 1
      dist/sgipad/static/js/chunk-2a19e7ab.9b5118ec.js.map
  33. 1 1
      dist/sgipad/static/js/chunk-2a19e7ab.9b5118ec.js
  34. BIN
      dist/sgipad/static/js/chunk-2a19e7ab.b38a0387.js.gz
  35. 1 0
      dist/sgipad/static/js/chunk-2a19e7ab.b38a0387.js.map
  36. 1 1
      dist/sgipad/static/js/chunk-2d0c1282.9696ded4.js
  37. 1 1
      dist/sgipad/static/js/chunk-2d0c1282.9696ded4.js.map
  38. 0 2
      dist/sgipad/static/js/chunk-30cb0a71.4d913c47.js
  39. 0 1
      dist/sgipad/static/js/chunk-30cb0a71.4d913c47.js.map
  40. 1 1
      dist/sgipad/static/js/chunk-3f722bdb.4adf67b1.js
  41. BIN
      dist/sgipad/static/js/chunk-3f722bdb.4adf67b1.js.gz
  42. 1 1
      dist/sgipad/static/js/chunk-3f722bdb.4adf67b1.js.map
  43. 2 0
      dist/sgipad/static/js/chunk-434d96be.21436f24.js
  44. BIN
      dist/sgipad/static/js/chunk-434d96be.21436f24.js.gz
  45. 1 0
      dist/sgipad/static/js/chunk-434d96be.21436f24.js.map
  46. 1 1
      dist/sgipad/static/js/chunk-4ae28914.94640d37.js
  47. BIN
      dist/sgipad/static/js/chunk-4ae28914.94640d37.js.gz
  48. 1 0
      dist/sgipad/static/js/chunk-4ae28914.70991618.js.map
  49. 0 1
      dist/sgipad/static/js/chunk-4ae28914.94640d37.js.map
  50. BIN
      dist/sgipad/static/js/chunk-65cea362.3bb23099.js.gz
  51. 0 2
      dist/sgipad/static/js/chunk-766e521a.98cdaf0e.js
  52. BIN
      dist/sgipad/static/js/chunk-766e521a.98cdaf0e.js.gz
  53. 0 1
      dist/sgipad/static/js/chunk-766e521a.98cdaf0e.js.map
  54. 1 1
      dist/sgipad/static/js/chunk-a8bcba9c.487fb147.js
  55. BIN
      dist/sgipad/static/js/chunk-a8bcba9c.487fb147.js.gz
  56. 1 1
      dist/sgipad/static/js/chunk-a8bcba9c.487fb147.js.map
  57. 3 0
      public/images/ipdImages/check-close.svg
  58. 18 0
      public/images/ipdImages/check-open.svg
  59. 4 0
      src/apis/envmonitor.ts
  60. 2 1
      src/styles/index.scss
  61. 8 0
      src/views/envmonitor/components/Air/manualIndex.vue
  62. 1 1
      src/views/envmonitor/components/Light/index.vue
  63. 21 5
      src/views/envmonitor/components/ManualWork/WorkConfig.vue
  64. 408 78
      src/views/envmonitor/components/ManualWork/index.vue
  65. 1 0
      src/views/envmonitor/components/Map/MapBox.vue
  66. 1 3
      src/views/envmonitor/components/Map/SpaceBox.vue
  67. 95 22
      src/views/envmonitor/index.vue
  68. 84 68
      src/views/mapData/indexOld.vue
  69. 759 400
      src/views/mapDataNew/sichuan.vue
  70. 2 1
      vue.config.js

+ 3 - 0
dist/sgipad/images/ipdImages/check-close.svg

@@ -0,0 +1,3 @@
+<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
+<circle cx="9" cy="9" r="8.5" stroke="#C4C9CF"/>
+</svg>

+ 18 - 0
dist/sgipad/images/ipdImages/check-open.svg

@@ -0,0 +1,18 @@
+<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g filter="url(#filter0_d_1_3)">
+<circle cx="13" cy="9" r="8.5" fill="#CE9F27" stroke="#424C59"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M16.7816 6.25329C16.4943 5.99461 16.0517 6.0178 15.793 6.3051L12.1474 10.354L10.3762 8.38676C10.1175 8.09946 9.67486 8.07627 9.38756 8.33495C9.10026 8.59364 9.07706 9.03625 9.33575 9.32355L11.5655 11.8C11.6675 11.9133 11.7982 11.9855 11.9366 12.0156C12.1984 12.114 12.505 12.049 12.7035 11.8286L16.8334 7.24188C17.0921 6.95458 17.0689 6.51198 16.7816 6.25329Z" fill="#424C59"/>
+</g>
+<defs>
+<filter id="filter0_d_1_3" x="0" y="0" width="26" height="26" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="4"/>
+<feGaussianBlur stdDeviation="2"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_3"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_3" result="shape"/>
+</filter>
+</defs>
+</svg>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/sgipad/index.html


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/sgipad/static/css/app.9aebc428.css


+ 0 - 1
dist/sgipad/static/css/chunk-01a39fae.c4397bd5.css

@@ -1 +0,0 @@
-[data-v-53502a5d]:export{menuBg:#fff;menuText:#162b64;menuActiveText:#435ebe}.canvas-box[data-v-53502a5d]{width:100%;height:calc(100% - .816rem)}.com-upload[data-v-53502a5d]{width:100%;height:100%}.space-search[data-v-53502a5d]{position:fixed;width:3.571rem;left:.102rem;top:.51rem;z-index:333}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/sgipad/static/css/chunk-65cea362.7e10f898.css


BIN
dist/sgipad/static/css/chunk-166172f4.c9dd4cbe.css.gz


+ 1 - 0
dist/sgipad/static/css/chunk-230ff16d.2d8af64c.css

@@ -0,0 +1 @@
+[data-v-81a73114]:export{menuBg:#fff;menuText:#162b64;menuActiveText:#435ebe}.canvas-box[data-v-81a73114]{width:100%;height:calc(100% - .816rem)}.com-upload[data-v-81a73114]{width:100%;height:100%}.space-search[data-v-81a73114]{position:fixed;width:3.571rem;left:.102rem;top:.51rem;z-index:333}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
dist/sgipad/static/css/chunk-282841c6.7bdba1d7.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
dist/sgipad/static/css/chunk-30cb0a71.6c543edf.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
dist/sgipad/static/css/chunk-434d96be.bab2fed5.css


BIN
dist/sgipad/static/css/chunk-434d96be.bab2fed5.css.gz


BIN
dist/sgipad/static/css/chunk-65cea362.7e10f898.css.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
dist/sgipad/static/css/chunk-766e521a.5dbdea74.css


BIN
dist/sgipad/static/css/chunk-766e521a.5dbdea74.css.gz


BIN
dist/sgipad/static/js/app.6abc1a01.js.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 2 - 2
dist/sgipad/static/js/app.6abc1a01.js


BIN
dist/sgipad/static/js/app.9fe9a268.js.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/sgipad/static/js/app.6abc1a01.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 2
dist/sgipad/static/js/chunk-01a39fae.1a577376.js


BIN
dist/sgipad/static/js/chunk-01a39fae.1a577376.js.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
dist/sgipad/static/js/chunk-01a39fae.1a577376.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 2 - 2
dist/sgipad/static/js/chunk-65cea362.3bb23099.js


BIN
dist/sgipad/static/js/chunk-166172f4.6d91288c.js.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/sgipad/static/js/chunk-65cea362.3bb23099.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 2 - 0
dist/sgipad/static/js/chunk-230ff16d.7fce0ae8.js


BIN
dist/sgipad/static/js/chunk-230ff16d.7fce0ae8.js.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
dist/sgipad/static/js/chunk-230ff16d.7fce0ae8.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 2 - 0
dist/sgipad/static/js/chunk-282841c6.780c138c.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
dist/sgipad/static/js/chunk-282841c6.780c138c.js.map


BIN
dist/sgipad/static/js/chunk-2a19e7ab.9b5118ec.js.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
dist/sgipad/static/js/chunk-2a19e7ab.9b5118ec.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/sgipad/static/js/chunk-2a19e7ab.9b5118ec.js


BIN
dist/sgipad/static/js/chunk-2a19e7ab.b38a0387.js.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
dist/sgipad/static/js/chunk-2a19e7ab.b38a0387.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/sgipad/static/js/chunk-2d0c1282.9696ded4.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/sgipad/static/js/chunk-2d0c1282.9696ded4.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 2
dist/sgipad/static/js/chunk-30cb0a71.4d913c47.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
dist/sgipad/static/js/chunk-30cb0a71.4d913c47.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/sgipad/static/js/chunk-3f722bdb.4adf67b1.js


BIN
dist/sgipad/static/js/chunk-3f722bdb.4adf67b1.js.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/sgipad/static/js/chunk-3f722bdb.4adf67b1.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 2 - 0
dist/sgipad/static/js/chunk-434d96be.21436f24.js


BIN
dist/sgipad/static/js/chunk-434d96be.21436f24.js.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
dist/sgipad/static/js/chunk-434d96be.21436f24.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/sgipad/static/js/chunk-4ae28914.94640d37.js


BIN
dist/sgipad/static/js/chunk-4ae28914.94640d37.js.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
dist/sgipad/static/js/chunk-4ae28914.70991618.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
dist/sgipad/static/js/chunk-4ae28914.94640d37.js.map


BIN
dist/sgipad/static/js/chunk-65cea362.3bb23099.js.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 2
dist/sgipad/static/js/chunk-766e521a.98cdaf0e.js


BIN
dist/sgipad/static/js/chunk-766e521a.98cdaf0e.js.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1
dist/sgipad/static/js/chunk-766e521a.98cdaf0e.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/sgipad/static/js/chunk-a8bcba9c.487fb147.js


BIN
dist/sgipad/static/js/chunk-a8bcba9c.487fb147.js.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/sgipad/static/js/chunk-a8bcba9c.487fb147.js.map


+ 3 - 0
public/images/ipdImages/check-close.svg

@@ -0,0 +1,3 @@
+<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
+<circle cx="9" cy="9" r="8.5" stroke="#C4C9CF"/>
+</svg>

+ 18 - 0
public/images/ipdImages/check-open.svg

@@ -0,0 +1,18 @@
+<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g filter="url(#filter0_d_1_3)">
+<circle cx="13" cy="9" r="8.5" fill="#CE9F27" stroke="#424C59"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M16.7816 6.25329C16.4943 5.99461 16.0517 6.0178 15.793 6.3051L12.1474 10.354L10.3762 8.38676C10.1175 8.09946 9.67486 8.07627 9.38756 8.33495C9.10026 8.59364 9.07706 9.03625 9.33575 9.32355L11.5655 11.8C11.6675 11.9133 11.7982 11.9855 11.9366 12.0156C12.1984 12.114 12.505 12.049 12.7035 11.8286L16.8334 7.24188C17.0921 6.95458 17.0689 6.51198 16.7816 6.25329Z" fill="#424C59"/>
+</g>
+<defs>
+<filter id="filter0_d_1_3" x="0" y="0" width="26" height="26" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="4"/>
+<feGaussianBlur stdDeviation="2"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_3"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_3" result="shape"/>
+</filter>
+</defs>
+</svg>

+ 4 - 0
src/apis/envmonitor.ts

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

+ 2 - 1
src/styles/index.scss

@@ -174,7 +174,8 @@ div:focus {
 .popup-content {
 .popup-content {
   height: 100%;
   height: 100%;
   width: 500px;
   width: 500px;
-  padding: 3.33vh 20px;
+  padding: 10px 20px;
+  // padding: 2.33vh 20px;
 }
 }
 
 
 .van-switch--on {
 .van-switch--on {

+ 8 - 0
src/views/envmonitor/components/Air/manualIndex.vue

@@ -757,6 +757,14 @@ export default defineComponent({
       // 总控制改变空调状态
       // 总控制改变空调状态
       airChange() {
       airChange() {
         // 先不更新状态等确认框弹出后再更新状
         // 先不更新状态等确认框弹出后再更新状
+        // 操作空调
+        const domAirOpen = !proxyData.airData.isOpen;
+        if (proxyData.forceOverTimeFlag && domAirOpen) {
+          //需要强制加班
+          contx.emit("triggerWork", 2);
+          return;
+        }
+
         proxyData.airData.isOpen = !proxyData.airData.isOpen;
         proxyData.airData.isOpen = !proxyData.airData.isOpen;
         proxyData.loadingAir = true;
         proxyData.loadingAir = true;
         proxyData.loadingTimer = 0;
         proxyData.loadingTimer = 0;

+ 1 - 1
src/views/envmonitor/components/Light/index.vue

@@ -158,7 +158,7 @@ export default defineComponent({
           if (type === "allLamp") {
           if (type === "allLamp") {
             if (proxyData.forceOverTimeFlag && proxyData.lampSw) {
             if (proxyData.forceOverTimeFlag && proxyData.lampSw) {
               // 强制加班开灯
               // 强制加班开灯
-              contx.emit("triggerWork");
+              contx.emit("triggerWork",3);
               return;
               return;
             }
             }
             //  总开关按钮所有灯
             //  总开关按钮所有灯

+ 21 - 5
src/views/envmonitor/components/ManualWork/WorkConfig.vue

@@ -99,7 +99,7 @@ export default defineComponent({
       },
       },
       // 触发加班按钮
       // 触发加班按钮
       triggerWork() {
       triggerWork() {
-        contx.emit("triggerWork");
+        contx.emit("triggerWork", 1);
       },
       },
       timerText: timerText,
       timerText: timerText,
       text: text,
       text: text,
@@ -473,12 +473,12 @@ export default defineComponent({
           customSceneList.map((item: any) => {
           customSceneList.map((item: any) => {
             let oldTimeEnd: any = endTime;
             let oldTimeEnd: any = endTime;
             if (startTime === item.startTime && endTime === item.endTime) {
             if (startTime === item.startTime && endTime === item.endTime) {
-              item.type = 1;
+              item.type = 3;  // 3=我要离开
               proxyData.delTimeArr.push(item);
               proxyData.delTimeArr.push(item);
             } // 点击我要离开的时候需要删除的数据
             } // 点击我要离开的时候需要删除的数据
             if (oldTimeEnd === item.startTime) {
             if (oldTimeEnd === item.startTime) {
               endTime = item.endTime;
               endTime = item.endTime;
-              item.type = 1;
+              item.type = 3;
               proxyData.delTimeArr.push(item);
               proxyData.delTimeArr.push(item);
             }
             }
           });
           });
@@ -486,13 +486,29 @@ export default defineComponent({
       },
       },
       // 我要离开
       // 我要离开
       myLeaving() {
       myLeaving() {
+        // 格式化当前时间
         proxyData.formatDataDel();
         proxyData.formatDataDel();
-        // console.log("删除了=====");
-        // console.log(proxyData.delTimeArr);
+        // 设置真实的离开时间
+        proxyData.setLeavingTime();  // // 3=我要离开
+        console.log("离开了=====");
+        console.log(proxyData.delTimeArr);
         proxyData.leaveBtnFlag = true;
         proxyData.leaveBtnFlag = true;
         // 取消加班
         // 取消加班
         proxyData.saveBatchCustomScene();
         proxyData.saveBatchCustomScene();
       },
       },
+      // 设置真实的离开时间
+      setLeavingTime() {
+        let nowTime: any = getRelNowTime();
+        proxyData.delTimeArr.map((delTime: any) => {
+          if (nowTime >= delTime.startTime && nowTime <= delTime.endTime) {
+            delTime.endTimeReal = nowTime;
+          } else if (nowTime < delTime.startTime) {
+            delTime.type = 1; // 时间还未开始直接取消加班记录
+          } else if (nowTime > delTime.endTime) {
+            delTime.endTimeReal = delTime.endTime;
+          }
+        });
+      },
       // 取消加班记录
       // 取消加班记录
       saveBatchCustomScene() {
       saveBatchCustomScene() {
         // proxyGlobal.proxy.$loadingStart(0);
         // proxyGlobal.proxy.$loadingStart(0);

+ 408 - 78
src/views/envmonitor/components/ManualWork/index.vue

@@ -2,7 +2,7 @@
   <div class="work-content">
   <div class="work-content">
     <div class="work-space">
     <div class="work-space">
       <div class="space-title">{{ spaceInfo.spaceName }} 申请延时</div>
       <div class="space-title">{{ spaceInfo.spaceName }} 申请延时</div>
-      <div class="device-tip">延时期间,空间相关设备会开启</div>
+      <div class="tip">延时期间,空间相关设备会开启</div>
     </div>
     </div>
     <div class="add-time" id="addTimeId">
     <div class="add-time" id="addTimeId">
       <div class="date_box" v-if="dateArr && dateArr.length">
       <div class="date_box" v-if="dateArr && dateArr.length">
@@ -53,18 +53,66 @@
       </div>
       </div>
     </div>
     </div>
     <!--预约的设备 start-->
     <!--预约的设备 start-->
-    <div class="device-box">
-      <div class="device-title">
-        <span></span>
-        <span></span>
-        <span></span>
-      </div>
+    <div class="device-title">
+      <span class="line"></span>
+      <span class="text">预约开启设备</span>
+      <span class="line"></span>
+    </div>
+    <div class="work-device">
+      <div class="row-title">空调</div>
+      <template
+        v-for="(item, index) in nowData.equipmentList"
+        :key="'eq' + index"
+      >
+        <div class="device-box" v-if="item.equipmentCategory !== 'SELTLT'">
+          <div class="device-row" @click="checkEquipment(item)">
+            <span>{{ item.name }}</span>
+            <img
+              :src="
+                item.isCheck
+                  ? parseImgUrl('ipdImages', 'check-open.svg')
+                  : parseImgUrl('ipdImages', 'check-close.svg')
+              "
+              alt=""
+            />
+          </div>
+        </div>
+      </template>
+      <div class="row-title">灯</div>
+      <template
+        v-for="(item, index) in nowData.equipmentList"
+        :key="'eq' + index"
+      >
+        <div class="device-box" v-if="item.equipmentCategory === 'SELTLT'">
+          <div class="device-row" @click="checkEquipment(item)">
+            <span>{{ item.name }}</span>
+            <img
+              :src="
+                item.isCheck
+                  ? parseImgUrl('ipdImages', 'check-open.svg')
+                  : parseImgUrl('ipdImages', 'check-close.svg')
+              "
+              alt=""
+            />
+          </div>
+        </div>
+      </template>
+
       <div class="device-tip">
       <div class="device-tip">
-        *空调延时采用后付费方式,系统将根据您申请的时间产生延时费用。预约时间下您可自由开启空间下的设备。
-        收费标准按开机设备对应空间的面积计费,空调加时费用按50元/m2·h进行计费,照明设备延时使用不计费。
-        如您提前结束工作,请点击“我要离开”按钮,系统会自动调整设备关闭时间,感谢与您一同共创可持续的办公环境。
+        <span>计费方式:</span>
+        <p>
+          <span> * </span>
+          空调延时采用后付费方式,系统将根据您申请的时间产生延时费用。预约时间下您可自由开启空间下的设备。
+        </p>
+        <p>
+          收费标准按开机设备对应空间的面积计费,空调加时费用按50元/m2·h进行计费,照明设备延时使用不计费。
+        </p>
+        <p>
+          如您提前结束工作,请点击“我要离开”按钮,系统会自动调整设备关闭时间,感谢与您一同共创可持续的办公环境。
+        </p>
       </div>
       </div>
     </div>
     </div>
+
     <van-loading class="temp-loading" v-if="showLoading" />
     <van-loading class="temp-loading" v-if="showLoading" />
   </div>
   </div>
 </template>
 </template>
@@ -98,7 +146,12 @@ import {
 import { myTime } from "@/model/workTimeData";
 import { myTime } from "@/model/workTimeData";
 import { propsToAttrMap } from "@vue/shared";
 import { propsToAttrMap } from "@vue/shared";
 import { isTemplateElement } from "@babel/types";
 import { isTemplateElement } from "@babel/types";
-import { saveBatchCustomScene } from "@/apis/envmonitor";
+import {
+  saveBatchCustomScene,
+  setallLampHttp,
+  setSpaceCondtioners,
+} from "@/apis/envmonitor";
+import { number } from "echarts";
 
 
 export default defineComponent({
 export default defineComponent({
   components: {
   components: {
@@ -117,6 +170,10 @@ export default defineComponent({
       type: Object,
       type: Object,
       default: () => {},
       default: () => {},
     },
     },
+    enterType: {
+      type: Number,
+      default: () => 1,
+    },
   },
   },
   setup(props, context) {
   setup(props, context) {
     const proxyGlobal: any = getCurrentInstance();
     const proxyGlobal: any = getCurrentInstance();
@@ -134,6 +191,7 @@ export default defineComponent({
     const userInfo: any = getUserInfo();
     const userInfo: any = getUserInfo();
     const proxyData = reactive({
     const proxyData = reactive({
       userInfo: userInfo,
       userInfo: userInfo,
+      parseImgUrl: parseImgUrl,
       isEvent: false,
       isEvent: false,
       screenInfo: screenInfo,
       screenInfo: screenInfo,
       projectId: props.projectId,
       projectId: props.projectId,
@@ -147,6 +205,7 @@ export default defineComponent({
       startLen: 0,
       startLen: 0,
       formBtn: false,
       formBtn: false,
       showLoading: false,
       showLoading: false,
+      enterType: props.enterType, // 1:all 2:空调 3:灯
       setScreennWidth() {
       setScreennWidth() {
         let addTimeEl: any = document.querySelector("#addTimeId");
         let addTimeEl: any = document.querySelector("#addTimeId");
         proxyData.screenInfo.screenWidth = addTimeEl.offsetWidth;
         proxyData.screenInfo.screenWidth = addTimeEl.offsetWidth;
@@ -168,7 +227,17 @@ export default defineComponent({
         }
         }
         return nowIndex;
         return nowIndex;
       },
       },
-      // 获取当前位置的坐标
+      // 获取时间的下标
+      getTimerIndex(timerArr: any, val: any) {
+        let cusIndex: any = 0;
+        timerArr.map((time: any, index: any) => {
+          if (time.formatTimer == val) {
+            cusIndex = index;
+          }
+        });
+        return cusIndex;
+      },
+      // 获取当前位置的坐标(多端服务定制的判断规则-待开发)
       getNowPerstion(timerArr: any) {
       getNowPerstion(timerArr: any) {
         let nowIndex: any = proxyData.getNowIndex();
         let nowIndex: any = proxyData.getNowIndex();
         let obj: any = {
         let obj: any = {
@@ -182,14 +251,29 @@ export default defineComponent({
         let cusEndTime: any = proxyData.parseCusEndTime(
         let cusEndTime: any = proxyData.parseCusEndTime(
           proxyData.nowData.cusEndTime
           proxyData.nowData.cusEndTime
         );
         );
+
+        let spaceCustomContentList: any =
+          proxyData.nowData.spaceCustomContentList || [];
+        // debugger
         if (formatTimer >= cusStartTime && formatTimer <= cusEndTime) {
         if (formatTimer >= cusStartTime && formatTimer <= cusEndTime) {
+          // debugger
           //在服务定制时间之间
           //在服务定制时间之间
           timerArr.map((item: any, index: any) => {
           timerArr.map((item: any, index: any) => {
             if (item.formatTimer === cusEndTime) {
             if (item.formatTimer === cusEndTime) {
               obj.nowIndex = index;
               obj.nowIndex = index;
             }
             }
           });
           });
+          let endFormatTimer: any = timerArr[nowIndex + obj.len].formatTimer;
+          spaceCustomContentList.map((item: any) => {
+            let startTime: any = proxyData.parseCusStartTime(item.startTime);
+            if (startTime > cusEndTime && endFormatTimer > startTime) {
+              let cusIndex: any = proxyData.getTimerIndex(timerArr, startTime);
+              obj.len =
+                cusIndex - obj.nowIndex > 0 ? cusIndex - obj.nowIndex : 0;
+            }
+          });
         } else if (formatTimer < cusStartTime) {
         } else if (formatTimer < cusStartTime) {
+          console.log("在当前的服务定制之前---4");
           timerArr.map((item: any, index: any) => {
           timerArr.map((item: any, index: any) => {
             if (item.formatTimer === cusStartTime) {
             if (item.formatTimer === cusStartTime) {
               obj.len = index - nowIndex;
               obj.len = index - nowIndex;
@@ -198,11 +282,23 @@ export default defineComponent({
               }
               }
             }
             }
           });
           });
+        } else if (formatTimer >= cusEndTime) {  // 在服务定制之后
+          // 在服务定制之后
+          console.log("在当前的服务定制之后---4");
+          let endFormatTimer: any = timerArr[nowIndex + obj.len].formatTimer;
+          spaceCustomContentList.map((item: any) => {
+            let startTime: any = proxyData.parseCusStartTime(item.startTime);
+            if (startTime > cusEndTime && endFormatTimer > startTime) {
+              let cusIndex: any = proxyData.getTimerIndex(timerArr, startTime);
+              obj.len =
+                cusIndex - obj.nowIndex > 0 ? cusIndex - obj.nowIndex : 0;
+            }
+          });
         }
         }
         return obj;
         return obj;
       },
       },
-      // 设置可选时间
-      setOptionnalTime(timerArr: any) {
+      // 设置当前可选择的时间可选时间
+      setNowBarPerstion(timerArr: any) {
         let sliderList: any = document.querySelector("#sliderListId");
         let sliderList: any = document.querySelector("#sliderListId");
         let slidersWrapper: any = document.querySelector("#slidersWrapperId");
         let slidersWrapper: any = document.querySelector("#slidersWrapperId");
         let sliderWidth: any = slidersWrapper.getBoundingClientRect().width;
         let sliderWidth: any = slidersWrapper.getBoundingClientRect().width;
@@ -595,22 +691,26 @@ export default defineComponent({
         proxyData.formBtn = false;
         proxyData.formBtn = false;
         let nowIndex: any = proxyData.getNowIndex();
         let nowIndex: any = proxyData.getNowIndex();
         if (proxyData.nowData.week === "今天" && index < nowIndex) {
         if (proxyData.nowData.week === "今天" && index < nowIndex) {
-          // 过去的时间不可选择
-          // 过去的时间不可选择
           return;
           return;
         }
         }
-        if (proxyData.nowData.cusStartTime && proxyData.nowData.cusEndTime) {
-          let formatTimer: any = proxyData.nowTimerArr[index].formatTimer; //在服务定制时间之间
-          let cusStartTime: any = proxyData.parseCusStartTime(
-            proxyData.nowData.cusStartTime
-          );
-          let cusEndTime: any = proxyData.parseCusEndTime(
-            proxyData.nowData.cusEndTime
+
+        let spaceCustomContentList: any =
+          proxyData.nowData.spaceCustomContentList || [];
+        let formatTimer: any = proxyData.nowTimerArr[index].formatTimer; //在服务定制时间之间
+        let flag: any = false;
+        spaceCustomContentList.map((spaceCustom: any) => {
+          let startTime: any = proxyData.parseCusStartTime(
+            spaceCustom.startTime
           );
           );
-          if (formatTimer >= cusStartTime && formatTimer < cusEndTime) {
-            return;
+          let endTime: any = proxyData.parseCusEndTime(spaceCustom.endTime);
+          if (formatTimer >= startTime && formatTimer < endTime) {
+            flag = true;
           }
           }
+        });
+        if (flag) {
+          return;
         }
         }
+
         proxyData.setOptionnalPerstion(index);
         proxyData.setOptionnalPerstion(index);
       },
       },
       /**
       /**
@@ -618,21 +718,42 @@ export default defineComponent({
        */
        */
       dateArr: dateArr,
       dateArr: dateArr,
       myTimeArr: myTimeArr,
       myTimeArr: myTimeArr,
-      // // 服务定制开始时间转化(处理服务定制时间包含几分钟的问题)
-      // parseCusStatTime() {},
-      // // 服务定制结束时间转化(处理服务定制时间包含几分钟的问题)
-      // parseCusEndTime(time: any) {
-      //   let newTime: any = "";
-      //   if (time) {
-      //     let minute: any = (time / 100) % 100;
-      //     if (minute < 30) {
-
-      //     } else if (minute > 30) {
-      //     } else {
-      //       newTime = time;
-      //     }
-      //   }
-      // },
+      // 格式化设备
+      formateEquipment() {
+        console.log(proxyData.enterType);
+        if (proxyData.enterType === 1) {
+          proxyData.nowData.equipmentList.map((item: any) => {
+            item.isCheck = true;
+          });
+        } else if (proxyData.enterType === 2) {
+          proxyData.nowData.equipmentList.map((item: any) => {
+            if (item.equipmentCategory !== "SELTLT") {
+              item.isCheck = true;
+            } else {
+              item.isCheck = false;
+            }
+          });
+        } else {
+          proxyData.nowData.equipmentList.map((item: any) => {
+            if (item.equipmentCategory !== "SELTLT") {
+              item.isCheck = false;
+            } else {
+              item.isCheck = true;
+            }
+          });
+        }
+      },
+      // 加班时间是否在所有的服务定制时间之前
+      isCusTimeBefore(spaceCustomContentList: any, time: any) {
+        let flag: any = false;
+        spaceCustomContentList.map((item: any) => {
+          if (time > item.startTime) {
+            flag = true;
+          }
+        });
+        return flag;
+      },
+      //  设置加班选中区域
       setWorkTimeList() {
       setWorkTimeList() {
         proxyData.isUpdate = false;
         proxyData.isUpdate = false;
         proxyGlobal.proxy.$loadinngEnd();
         proxyGlobal.proxy.$loadinngEnd();
@@ -641,14 +762,11 @@ export default defineComponent({
         let nowDate: any = formatDate("YYYY-MM-DD");
         let nowDate: any = formatDate("YYYY-MM-DD");
         for (let i = 0; i < data.length; i++) {
         for (let i = 0; i < data.length; i++) {
           let date: any = formatDateStr(data[i].date);
           let date: any = formatDateStr(data[i].date);
-          let cusStartTime: any = proxyData.parseCusStartTime(
-            data[i].cusStartTime
-          );
-          let cusEndTime: any = proxyData.parseCusEndTime(data[i].cusEndTime);
-          // let isActive: Boolean = false;
+          let spaceCustomContentList: any =
+            data[i].spaceCustomContentList || []; // 固定服务定制时间
+
           let week: any = getWeekDate(new Date(date).getDay());
           let week: any = getWeekDate(new Date(date).getDay());
           if (date === nowDate) {
           if (date === nowDate) {
-            // isActive = true;
             week = "今天";
             week = "今天";
           }
           }
           let timerArr: any = [];
           let timerArr: any = [];
@@ -656,6 +774,7 @@ export default defineComponent({
             let obj: any = {
             let obj: any = {
               timer: proxyData.timerArr[i],
               timer: proxyData.timerArr[i],
               isCheck: false,
               isCheck: false,
+              isServiceTime: false,
               formatTimer: proxyData.timerArr[i].replace(/[:]/g, "") + "00",
               formatTimer: proxyData.timerArr[i].replace(/[:]/g, "") + "00",
             };
             };
             timerArr.push(obj);
             timerArr.push(obj);
@@ -663,15 +782,20 @@ export default defineComponent({
           let customSceneList: any = data[i]?.customSceneList ?? [];
           let customSceneList: any = data[i]?.customSceneList ?? [];
           customSceneList.map((custom: any) => {
           customSceneList.map((custom: any) => {
             for (let j = 0; j < timerArr.length; j++) {
             for (let j = 0; j < timerArr.length; j++) {
-              // debugger
-              if (timerArr[j].formatTimer < cusStartTime) {
+              if (
+                proxyData.isCusTimeBefore(
+                  spaceCustomContentList,
+                  timerArr[j].formatTimer
+                )
+              ) {
+                // 加班时间在服务定制时间之前
                 let tempStartTime: any = proxyData.parseCusStartTime(
                 let tempStartTime: any = proxyData.parseCusStartTime(
                   custom.startTime
                   custom.startTime
                 );
                 );
                 let tempEndTime: any = proxyData.parseCusStartTime(
                 let tempEndTime: any = proxyData.parseCusStartTime(
                   custom.endTime
                   custom.endTime
                 );
                 );
-                // 加班时间在服务定制时间之前
+
                 if (
                 if (
                   timerArr[j].formatTimer >= tempStartTime &&
                   timerArr[j].formatTimer >= tempStartTime &&
                   timerArr[j].formatTimer < tempEndTime
                   timerArr[j].formatTimer < tempEndTime
@@ -680,6 +804,7 @@ export default defineComponent({
                 }
                 }
               } else {
               } else {
                 // 加班时间在服务外定制时间之后
                 // 加班时间在服务外定制时间之后
+
                 let tempStartTime: any = proxyData.parseCusEndTime(
                 let tempStartTime: any = proxyData.parseCusEndTime(
                   custom.startTime
                   custom.startTime
                 );
                 );
@@ -695,28 +820,36 @@ export default defineComponent({
               }
               }
             }
             }
           });
           });
-          // 是否在固定区域时间
-          if (cusStartTime && cusEndTime) {
-            timerArr.map((item: any) => {
-              if (
-                item.formatTimer >= cusStartTime &&
-                item.formatTimer < cusEndTime
-              ) {
-                item.isServiceTime = true;
-              } else {
-                item.isServiceTime = false;
-              }
-            });
-          }
+
+          spaceCustomContentList.map((spaceCustom: any) => {
+            let startTime: any = proxyData.parseCusStartTime(
+              spaceCustom.startTime
+            );
+            let endTime: any = proxyData.parseCusEndTime(spaceCustom.endTime);
+            // 是否在固定区域时间
+            if (startTime && endTime) {
+              // debugger
+              timerArr.map((item: any) => {
+                if (
+                  item.formatTimer >= startTime &&
+                  item.formatTimer < endTime
+                ) {
+                  item.isServiceTime = true;
+                }
+              });
+            }
+          });
 
 
           proxyData.dateArr.push({
           proxyData.dateArr.push({
             date: date,
             date: date,
             isActive: false,
             isActive: false,
+            equipmentList: data[i].equipmentList,
             oldDate: data[i].date,
             oldDate: data[i].date,
             objectId: data[i].objectId,
             objectId: data[i].objectId,
             cusStartTime: data[i].cusStartTime,
             cusStartTime: data[i].cusStartTime,
             customSceneList: customSceneList,
             customSceneList: customSceneList,
             cusEndTime: data[i].cusEndTime,
             cusEndTime: data[i].cusEndTime,
+            spaceCustomContentList: data[i].spaceCustomContentList,
             day: getDate(new Date(date)),
             day: getDate(new Date(date)),
             week: week,
             week: week,
             timerArr: timerArr,
             timerArr: timerArr,
@@ -752,8 +885,9 @@ export default defineComponent({
         proxyData.activeIndex = index;
         proxyData.activeIndex = index;
         proxyData.nowTimerArr = proxyData.dateArr[index].timerArr;
         proxyData.nowTimerArr = proxyData.dateArr[index].timerArr;
         proxyData.nowData = proxyData.dateArr[index];
         proxyData.nowData = proxyData.dateArr[index];
+        proxyData.formateEquipment();
         nextTick(() => {
         nextTick(() => {
-          proxyData.setOptionnalTime(proxyData.nowTimerArr);
+          proxyData.setNowBarPerstion(proxyData.nowTimerArr);
           let nowIndex: any = proxyData.getNowIndex();
           let nowIndex: any = proxyData.getNowIndex();
           if (proxyData.nowData.week === "今天") {
           if (proxyData.nowData.week === "今天") {
             proxyData.setPastTime(nowIndex);
             proxyData.setPastTime(nowIndex);
@@ -778,12 +912,6 @@ export default defineComponent({
         proxyData.setScreennWidth();
         proxyData.setScreennWidth();
         proxyData.sliderSwiper();
         proxyData.sliderSwiper();
         proxyData.endBoxSwiper();
         proxyData.endBoxSwiper();
-        // if (!proxyData.flag) {
-        //   proxyData.setScreennWidth();
-        //   proxyData.sliderSwiper();
-        //   proxyData.endBoxSwiper();
-        //   proxyData.flag = true;
-        // }
       },
       },
       // 加班数据格式化=》后台需要的数据结构(添加加班逻辑)
       // 加班数据格式化=》后台需要的数据结构(添加加班逻辑)
       formateAddTimer() {
       formateAddTimer() {
@@ -876,6 +1004,7 @@ export default defineComponent({
           type = "2";
           type = "2";
         }
         }
 
 
+        // if()
         let addObj: any = proxyData.formaTimeObj(
         let addObj: any = proxyData.formaTimeObj(
           customSceneList[0],
           customSceneList[0],
           type,
           type,
@@ -888,8 +1017,10 @@ export default defineComponent({
       },
       },
       // 格式化加班单个数据
       // 格式化加班单个数据
       formaTimeObj(item: any, type: any, startTime: any, endTime: any) {
       formaTimeObj(item: any, type: any, startTime: any, endTime: any) {
+        console.log(item);
         let obj: any = {
         let obj: any = {
           projectId: proxyData.projectId, //类型:String  必有字段  备注:项目id
           projectId: proxyData.projectId, //类型:String  必有字段  备注:项目id
+          sceneEquipList: item ? item.sceneEquipList : [],
           objectId: proxyData.nowData.objectId, //类型:String  必有字段  备注:空间id
           objectId: proxyData.nowData.objectId, //类型:String  必有字段  备注:空间id
           sourceType: "sagacareAndtenantslink", //类型:String  必有字段  备注:sagacareAndtenantslink 来源
           sourceType: "sagacareAndtenantslink", //类型:String  必有字段  备注:sagacareAndtenantslink 来源
           startDate: proxyData.nowData.oldDate, //类型:String  必有字段  备注://开始日期
           startDate: proxyData.nowData.oldDate, //类型:String  必有字段  备注://开始日期
@@ -1034,12 +1165,108 @@ export default defineComponent({
         proxyData.formBtn = false;
         proxyData.formBtn = false;
         context.emit("closeWork");
         context.emit("closeWork");
       },
       },
+      // 数组去除重复
+      removeDuplicateObj(arr: any) {
+        let obj = {};
+        arr = arr.reduce((newArr: any, next: any) => {
+          obj[next.objectId]
+            ? ""
+            : (obj[next.objectId] = true && newArr.push(next));
+          return newArr;
+        }, []);
+        return arr;
+      },
+      checkEquipment(item: any) {
+        item.isCheck = !item.isCheck;
+      },
       // 提交申请
       // 提交申请
       addWorkTimer() {
       addWorkTimer() {
         let formTimerArr: any = proxyData.formateAddTimer();
         let formTimerArr: any = proxyData.formateAddTimer();
+        let sceneEquipList: any = [];
+        proxyData.nowData.equipmentList.map((item: any) => {
+          if (item.isCheck) {
+            let obj: any = {
+              projectId: item.projectId, //类型:String  必有字段  备注:无
+              objectId: item.id, //类型:String  必有字段  备注:设备id
+              type: item.equipmentCategory,
+            };
+            sceneEquipList.push(obj);
+          }
+        });
+        if (formTimerArr && formTimerArr.length == 2) {
+          if (
+            formTimerArr[1].startTime >= formTimerArr[0].startTime &&
+            formTimerArr[1].endTime <= formTimerArr[0].endTime
+          ) {
+          } else {
+            formTimerArr.map((item: any) => {
+              if (item.type == "1") {
+                item.sceneEquipList.map((scene: any) => {
+                  let obj: any = {
+                    projectId: scene.projectId, //类型:String  必有字段  备注:无
+                    objectId: scene.objectId, //类型:String  必有字段  备注:设备id
+                    type: scene.type,
+                  };
+                  sceneEquipList.push(obj);
+                });
+              }
+            });
+          }
+        }
+
+        sceneEquipList = proxyData.removeDuplicateObj(sceneEquipList);
+        formTimerArr.map((item: any) => {
+          if (item.type == "0" || item.type == "2") {
+            item.sceneEquipList = sceneEquipList;
+          }
+        });
+        // 保存加班记录
         proxyData.saveBatchCustomScene(formTimerArr);
         proxyData.saveBatchCustomScene(formTimerArr);
-        // console.log("提交申请-----");
-        // console.log(formTimerArr);
+        //  如果在当前时间,需要手动开启设备
+        proxyData.openDeviceAll(formTimerArr);
+      },
+      // 手动控制开启设备
+      openDeviceAll(formTimerArr: any) {
+        let sceneEquipList: any = [];
+        formTimerArr.map((item: any) => {
+          if (item.type == "2") {
+            sceneEquipList = sceneEquipList.concat(item.sceneEquipList);
+          }
+        });
+        sceneEquipList = proxyData.removeDuplicateObj(sceneEquipList);
+        // 改变设备状态
+        let airDevice: any = [];
+        let lightDevice: any = [];
+        sceneEquipList.map((item: any) => {
+          if (item.type == "SELTLT") {
+            let obj: any = {
+              id: item.objectId,
+              switch: true,
+            };
+            lightDevice.push(obj);
+          } else {
+            let obj: any = {
+              id: item.objectId, //类型:String  必有字段  备注:设备id
+              code: "EquipSwitchSet", //类型:String  必有字段  备注:编码 EquipSwtichSet
+              value: "1", //类型:String  必有字段  备注:值 0
+            };
+            airDevice.push(obj);
+          }
+        });
+        proxyData.setSpaceCondtioners(airDevice);
+        proxyData.setallLampHttp(lightDevice);
+      },
+      // 手动开空调
+      setSpaceCondtioners(data: any) {
+        setSpaceCondtioners(data)
+          .then((res) => {})
+          .catch(() => {});
+      },
+      // 手动开灯
+      setallLampHttp(data: any) {
+        setallLampHttp(data)
+          .then((res) => {})
+          .catch(() => {});
       },
       },
       // 提交加班记录
       // 提交加班记录
       saveBatchCustomScene(formTimerArr: any, type: any = 1) {
       saveBatchCustomScene(formTimerArr: any, type: any = 1) {
@@ -1057,7 +1284,6 @@ export default defineComponent({
             } else if (type === 2) {
             } else if (type === 2) {
               // 删除
               // 删除
               proxyData.isUpdate = true;
               proxyData.isUpdate = true;
-              // proxyData.setWorkTimeList();
             }
             }
             proxyData.formBtn = false;
             proxyData.formBtn = false;
           })
           })
@@ -1078,6 +1304,27 @@ export default defineComponent({
             message: "确定删除当前时间吗?",
             message: "确定删除当前时间吗?",
           })
           })
             .then(() => {
             .then(() => {
+              console.log("====");
+              console.log(formTimeArr);
+              let sceneEquipList: any = [];
+              formTimeArr.map((item: any) => {
+                if (item.type == "1") {
+                  item.sceneEquipList.map((scene: any) => {
+                    let obj: any = {
+                      projectId: scene.projectId, //类型:String  必有字段  备注:无
+                      objectId: scene.objectId, //类型:String  必有字段  备注:设备id
+                      type: scene.type,
+                    };
+                    sceneEquipList.push(obj);
+                  });
+                }
+              });
+              sceneEquipList = proxyData.removeDuplicateObj(sceneEquipList);
+              formTimeArr.map((item: any) => {
+                if (item.type !== "1") {
+                  item.sceneEquipList = sceneEquipList;
+                }
+              });
               proxyData.saveBatchCustomScene(formTimeArr, 2);
               proxyData.saveBatchCustomScene(formTimeArr, 2);
             })
             })
             .catch(() => {
             .catch(() => {
@@ -1089,10 +1336,12 @@ export default defineComponent({
     watch(props, (newProps: any) => {
     watch(props, (newProps: any) => {
       proxyData.workkArr = newProps.workkArr;
       proxyData.workkArr = newProps.workkArr;
       proxyData.projectId = newProps.projectId;
       proxyData.projectId = newProps.projectId;
+      proxyData.enterType = newProps.enterType;
+      console.log("newProps.enterType==", newProps.enterType);
+      console.log(newProps.enterType);
       if (proxyData.isUpdate) {
       if (proxyData.isUpdate) {
         proxyData.setWorkTimeList();
         proxyData.setWorkTimeList();
       }
       }
-      // proxyData.getWorkTimeList();
     });
     });
     onMounted(() => {
     onMounted(() => {
       // 设置dom最外层的宽
       // 设置dom最外层的宽
@@ -1110,6 +1359,7 @@ export default defineComponent({
   position: relative;
   position: relative;
   height: 100%;
   height: 100%;
   width: 100%;
   width: 100%;
+  overflow: hidden;
   background: #fff;
   background: #fff;
 }
 }
 .work-space {
 .work-space {
@@ -1124,8 +1374,8 @@ export default defineComponent({
     line-height: 31px;
     line-height: 31px;
     color: #000000;
     color: #000000;
   }
   }
-  .device-tip {
-    padding-bottom: 36px;
+  .tip {
+    padding-bottom: 20px;
     font-family: "Noto Sans SC";
     font-family: "Noto Sans SC";
     font-style: normal;
     font-style: normal;
     font-weight: 400;
     font-weight: 400;
@@ -1146,7 +1396,7 @@ export default defineComponent({
     display: flex;
     display: flex;
     justify-content: space-between;
     justify-content: space-between;
     width: 100%;
     width: 100%;
-    padding-bottom: 35px;
+    padding-bottom: 15px;
 
 
     .date-item {
     .date-item {
       padding-top: 20px;
       padding-top: 20px;
@@ -1295,9 +1545,12 @@ export default defineComponent({
   }
   }
 }
 }
 .add-time-btn {
 .add-time-btn {
-  margin-top: 10px;
+  position: absolute;
+  bottom: 5px;
+  left: 50%;
+  transform: translateX(-50%);
   display: flex;
   display: flex;
-  padding-top: 24px;
+  padding-top: 10px;
   text-align: center;
   text-align: center;
 
 
   .cancel-btn {
   .cancel-btn {
@@ -1331,4 +1584,81 @@ export default defineComponent({
     color: #1f2529;
     color: #1f2529;
   }
   }
 }
 }
+
+.work-device {
+  // padding-top: 10px;
+  height: 30vh;
+  overflow-y: auto;
+  .device-tip {
+    padding-top: 20px;
+    font-weight: 400;
+    font-size: 12px;
+
+    color: #8d9399;
+    span {
+      display: inline-block;
+      padding-bottom: 10px;
+    }
+    p {
+      line-height: 24px;
+    }
+  }
+}
+.device-box {
+  display: flex;
+  justify-content: space-between;
+
+  .device-row {
+    display: flex;
+    justify-content: space-between;
+    width: 48%;
+    font-family: "PingFang SC";
+    font-style: normal;
+    font-weight: 400;
+    font-size: 14px;
+    padding: 10px;
+    color: #1b2129;
+    background: #f7f9fa;
+    border-radius: 4px;
+    margin-top: 10px;
+    line-height: 30px;
+    span {
+      display: inline-block;
+    }
+    img {
+      width: 25px;
+      height: 25px;
+    }
+  }
+}
+
+.row-title {
+  display: block;
+  padding-top: 20px;
+  padding-bottom: 5px;
+}
+.device-title {
+  padding-top: 20px;
+  text-align: center;
+  // padding-bottom: 10px;
+  .line {
+    display: inline-block;
+    vertical-align: middle;
+    width: 155px;
+    height: 0px;
+    border: 1px solid #e1e5eb;
+  }
+  .text {
+    display: inline-block;
+    vertical-align: middle;
+    padding-left: 10px;
+    padding-right: 10px;
+    font-family: "PingFang SC";
+    font-style: normal;
+    font-weight: 400;
+    font-size: 12px;
+    line-height: 17px;
+    color: #8d9399;
+  }
+}
 </style>
 </style>

+ 1 - 0
src/views/envmonitor/components/Map/MapBox.vue

@@ -1223,6 +1223,7 @@ export default defineComponent({
     }
     }
     .device span {
     .device span {
       color: #fff !important;
       color: #fff !important;
+      font-size:16px;
     }
     }
   }
   }
 
 

+ 1 - 3
src/views/envmonitor/components/Map/SpaceBox.vue

@@ -137,9 +137,6 @@ export default defineComponent({
   height: 100%;
   height: 100%;
   background: $elBg;
   background: $elBg;
   .space-box {
   .space-box {
-    // display: flex;
-    // padding-top: 20px;
-    // justify-content: space-between;
     .space-item {
     .space-item {
       display: inline-block;
       display: inline-block;
       margin-top: 20px;
       margin-top: 20px;
@@ -154,6 +151,7 @@ export default defineComponent({
         width: 100%;
         width: 100%;
         line-height: 100px;
         line-height: 100px;
         text-align: center;
         text-align: center;
+        font-size:16px;
       }
       }
       &:nth-child(3n) {
       &:nth-child(3n) {
         margin-right: 0;
         margin-right: 0;

+ 95 - 22
src/views/envmonitor/index.vue

@@ -10,12 +10,13 @@
     }"
     }"
   >
   >
     <div class="main-left">
     <div class="main-left">
-      <div class="left-top" 
-          @touchstart="gtouchstart($event)"
-          @touchmove="gtouchmove()"
-          @touchend="showDeleteButton">
-        <div
-          class="logo-box">
+      <div
+        class="left-top"
+        @touchstart="gtouchstart($event)"
+        @touchmove="gtouchmove()"
+        @touchend="showDeleteButton"
+      >
+        <div class="logo-box">
           <img class="logo-icon" v-if="logImg" :src="logImg" alt="" />
           <img class="logo-icon" v-if="logImg" :src="logImg" alt="" />
           <img
           <img
             class="logo-icon"
             class="logo-icon"
@@ -136,7 +137,7 @@
       <div
       <div
         class="work-btn"
         class="work-btn"
         v-if="
         v-if="
-          (roomType === '开放' && isWork && controlMode !== 1) ||
+          (roomType === '开放' && isWork) ||
           (roomType === '会议室' && scenarioArr && scenarioArr.length)
           (roomType === '会议室' && scenarioArr && scenarioArr.length)
         "
         "
       >
       >
@@ -150,13 +151,13 @@
         ></work-config>
         ></work-config>
 
 
         <!--手动控制的加班 start-->
         <!--手动控制的加班 start-->
-        <!-- <manual-work
+        <manual-config
           v-if="roomType === '开放' && isWork && controlMode === 1"
           v-if="roomType === '开放' && isWork && controlMode === 1"
           :scenarioArr="scenarioArr"
           :scenarioArr="scenarioArr"
           :workkArr="workkArr"
           :workkArr="workkArr"
           @triggerWork="triggerWork"
           @triggerWork="triggerWork"
           @setForceOverTimeFlag="setForceOverTimeFlag"
           @setForceOverTimeFlag="setForceOverTimeFlag"
-        ></manual-work> -->
+        ></manual-config>
 
 
         <scenario-config
         <scenario-config
           v-if="roomType === '会议室' && scenarioArr && scenarioArr.length"
           v-if="roomType === '会议室' && scenarioArr && scenarioArr.length"
@@ -240,6 +241,7 @@
       <!--加班手动控制 start-->
       <!--加班手动控制 start-->
       <manual-overtime
       <manual-overtime
         v-if="isShowWork && controlMode === 1"
         v-if="isShowWork && controlMode === 1"
+        :enterType="enterType"
         :spaceInfo="spaceInfo"
         :spaceInfo="spaceInfo"
         @closeWork="closeWork"
         @closeWork="closeWork"
         :projectId="projectId"
         :projectId="projectId"
@@ -314,7 +316,7 @@ import WorkOvertime from "./components/workOvertime/index.vue";
 import ManualOvertime from "./components/ManualWork/index.vue";
 import ManualOvertime from "./components/ManualWork/index.vue";
 import Contact from "./components/Contact/index.vue";
 import Contact from "./components/Contact/index.vue";
 import WorkConfig from "./components/workOvertime/WorkConfig.vue";
 import WorkConfig from "./components/workOvertime/WorkConfig.vue";
-import ManualWork from "./components/ManualWork/WorkConfig.vue";
+import ManualConfig from "./components/ManualWork/WorkConfig.vue";
 import ScenarioConfig from "./components/Scenario/ScenarioConfig.vue";
 import ScenarioConfig from "./components/Scenario/ScenarioConfig.vue";
 import MapBox from "@/views/envmonitor/components/Map/MapBox.vue";
 import MapBox from "@/views/envmonitor/components/Map/MapBox.vue";
 import Header from "@/components/header/Index.vue";
 import Header from "@/components/header/Index.vue";
@@ -351,9 +353,11 @@ import {
 import Keys from "@/constant/key";
 import Keys from "@/constant/key";
 import {
 import {
   formatDate,
   formatDate,
+  formatDateStr,
   getHours,
   getHours,
   getLocalNewSpaceInfo,
   getLocalNewSpaceInfo,
   getNowWeek,
   getNowWeek,
+  getRelNowTime,
   getUserInfo,
   getUserInfo,
   parseImgUrl,
   parseImgUrl,
   setQueryConfig,
   setQueryConfig,
@@ -379,7 +383,7 @@ export default defineComponent({
     TimeBox,
     TimeBox,
     WorkOvertime,
     WorkOvertime,
     WorkConfig,
     WorkConfig,
-    ManualWork,
+    ManualConfig,
     ScenarioConfig,
     ScenarioConfig,
     Detail,
     Detail,
     Contact,
     Contact,
@@ -568,6 +572,7 @@ export default defineComponent({
     let padImgData: any = [];
     let padImgData: any = [];
     let controlMode: number = 0;
     let controlMode: number = 0;
     const proxyData = reactive({
     const proxyData = reactive({
+      enterType: 1,
       parseImgUrl: parseImgUrl,
       parseImgUrl: parseImgUrl,
       fileUrl: proxyGlobal.proxy.$fileUrl,
       fileUrl: proxyGlobal.proxy.$fileUrl,
       nowDate: nowDate,
       nowDate: nowDate,
@@ -825,7 +830,11 @@ export default defineComponent({
       /**
       /**
        * 加班
        * 加班
        */
        */
-      triggerWork() {
+      triggerWork(type: any = 1) {
+        // console.log(type);
+        proxyData.enterType = type;
+        console.log("proxyData.enterType===");
+        console.log(proxyData.enterType);
         proxyData.isShowWork = true;
         proxyData.isShowWork = true;
       },
       },
       /**
       /**
@@ -1642,6 +1651,7 @@ export default defineComponent({
        */
        */
       workkArr: workkArr,
       workkArr: workkArr,
       secenTimer: secenTimer,
       secenTimer: secenTimer,
+      // 定时查空间的加班记录
       queryCustomAndScenceTimer(timer: any = 10000) {
       queryCustomAndScenceTimer(timer: any = 10000) {
         if (proxyData.secenTimer) {
         if (proxyData.secenTimer) {
           clearTimeout(proxyData.secenTimer);
           clearTimeout(proxyData.secenTimer);
@@ -1651,22 +1661,85 @@ export default defineComponent({
           proxyData.queryCustomAndScence();
           proxyData.queryCustomAndScence();
         }, timer);
         }, timer);
       },
       },
+      // 定时查空间的加班记录
       queryCustomAndScence() {
       queryCustomAndScence() {
         let params: any = {
         let params: any = {
           spaceId: proxyData.spaceInfo.spaceId,
           spaceId: proxyData.spaceInfo.spaceId,
         };
         };
         let str: any = setQueryConfig(params);
         let str: any = setQueryConfig(params);
-        queryCustomAndScence(str).then((res) => {
-          let resData: any = res?.data ?? [];
-          proxyData.workkArr = resData;
-          for (let i = 0; i < proxyData.workkArr.length; i++) {
-            let customSceneList: any =
-              proxyData.workkArr[i]?.customSceneList ?? [];
-            customSceneList = customSceneList.sort(proxyData.compare);
+        queryCustomAndScence(str)
+          .then((res) => {
+            let resData: any = res?.data ?? [];
+            proxyData.workkArr = resData;
+            for (let i = 0; i < proxyData.workkArr.length; i++) {
+              let customSceneList: any =
+                proxyData.workkArr[i]?.customSceneList ?? [];
+              customSceneList = customSceneList.sort(proxyData.compare);
+            }
+            // 手动控制的情况下走新的服务定制
+            if (proxyData.controlMode === 1) {
+              proxyData.formateManualWorkTime();
+            }
+            proxyData.queryCustomAndScenceTimer(5000);
+          })
+          .catch(() => {
+            proxyData.queryCustomAndScenceTimer(5000);
+          });
+      },
+
+      // 手动控制加班处理时间段拼接的逻辑
+      formateManualWorkTime() {
+        // debugger
+        let data: any = proxyData.workkArr;
+        for (let i = 0; i < proxyData.workkArr.length; i++) {
+          let item: any = proxyData.workkArr[i];
+          let spaceCustomContentList: any =
+            proxyData.workkArr[i].spaceCustomContentList || [];
+          spaceCustomContentList = spaceCustomContentList.sort(
+            proxyData.compare
+          );
+          item.spaceCustomContentList = spaceCustomContentList;
+          let nowTime: any = getRelNowTime();
+          let nowDate: any = formatDate("YYYY-MM-DD");
+          let date: any = formatDateStr(data[i].date);
+          item.cusStartTime = spaceCustomContentList[0]
+            ? spaceCustomContentList[0].startTime
+            : "";
+          item.cusEndTime = spaceCustomContentList[0]
+            ? spaceCustomContentList[0].endTime
+            : "";
+          if (nowDate == date) {
+            // 当前时间
+            item.cusStartTime = "";
+            item.cusEndTime = "";
+          }
+          for (let j = 0; j < spaceCustomContentList.length; j++) {
+            if (item.cusStartTime && item.cusEndTime) {
+              if (item.cusEndTime + 1 === spaceCustomContentList[j].startTime) {
+                item.cusEndTime = spaceCustomContentList[j].endTime;
+              }
+            } else {
+              if (
+                nowTime >= spaceCustomContentList[j].startTime &&
+                nowTime <= spaceCustomContentList[j].endTime
+              ) {
+                item.cusStartTime = spaceCustomContentList[j].startTime;
+                item.cusEndTime = spaceCustomContentList[j].endTime;
+              }
+            }
+          }
+          if (!item.cusStartTime) {
+            item.cusStartTime = spaceCustomContentList[0]
+              ? spaceCustomContentList[0].startTime
+              : "";
+            item.cusEndTime = spaceCustomContentList[0]
+              ? spaceCustomContentList[0].endTime
+              : "";
           }
           }
 
 
-          proxyData.queryCustomAndScenceTimer(5000);
-        });
+          console.log("proxyData.workkArr===");
+          console.log(proxyData.workkArr);
+        }
       },
       },
       // 数组排序
       // 数组排序
       compare(obj1: any, obj2: any) {
       compare(obj1: any, obj2: any) {
@@ -2219,7 +2292,7 @@ export default defineComponent({
       position: relative;
       position: relative;
       display: inline-block;
       display: inline-block;
       vertical-align: middle;
       vertical-align: middle;
-      width: 195px;
+      width: 186px;
       height: 40px;
       height: 40px;
       font-size: 0;
       font-size: 0;
       img {
       img {

+ 84 - 68
src/views/mapData/indexOld.vue

@@ -6,6 +6,7 @@
         class="file-upload-input"
         class="file-upload-input"
         id="upfile"
         id="upfile"
         type="file"
         type="file"
+        webkitdirectory
         @change="getFile"
         @change="getFile"
       />
       />
     </div>
     </div>
@@ -77,85 +78,101 @@ export default defineComponent({
       },
       },
       getFile(e: any) {
       getFile(e: any) {
         console.log(e.target.files);
         console.log(e.target.files);
-        let fileSelect: any = e.target.files[0];
-        let name: any = fileSelect.name;
-        name = name.split(".")[0];
-        // this.fileName = fileSelect.name;
-        let reader: any = new FileReader();
-        if (typeof FileReader === "undefined") {
-          console.log("您的浏览器不支持FileReader接口");
-          return;
+        let files: any = e.target.files;
+        for (let i = 0; i < files.length; i++) {
+          let fileSelect: any = files[i];
+          let name: any = fileSelect.name;
+          name = name.split(".")[0];
+          // this.fileName = fileSelect.name;
+          let reader: any = new FileReader();
+          if (typeof FileReader === "undefined") {
+            console.log("您的浏览器不支持FileReader接口");
+            return;
+          }
+          reader.readAsText(fileSelect, "gb2312"); //注意读取中文的是用这个编码,不是utf-8
+          // const _this = this;
+          reader.onload = function () {
+            // console.log(reader.result);
+            let result: any = reader.result;
+            // _this.$nextTick(() => {
+            //     _this.voiceContent = reader.result;
+            // });
+            // proxyData.handleStr(result);
+            proxyData.handPoint(result, name);
+          };
         }
         }
-        reader.readAsText(fileSelect, "gb2312"); //注意读取中文的是用这个编码,不是utf-8
-        // const _this = this;
-        reader.onload = function () {
-          // console.log(reader.result);
-          let result: any = reader.result;
-          // _this.$nextTick(() => {
-          //     _this.voiceContent = reader.result;
-          // });
-          // proxyData.handleStr(result);
-          proxyData.handPoint(result, name);
-        };
       },
       },
       handPoint(result: any, name: any) {
       handPoint(result: any, name: any) {
         result = result.replace(/\"/g, "");
         result = result.replace(/\"/g, "");
         let nameArr: any = name.split("-");
         let nameArr: any = name.split("-");
         let arr: any = result.split(/[(\r\n)\r\n]+/);
         let arr: any = result.split(/[(\r\n)\r\n]+/);
-        let pointObj: any = {
-          spaceId: nameArr[0].toString(),
-          localName:nameArr[0].toString(),
-          canClick:true,
-          pointArr: [],
-          devicePoint: [],
-          circlePoint: [],
-          logPointArr: [],
-        };
+        if (nameArr && nameArr[0] == "B3") {
+          arr.map((item: any) => {
+            if (item) {
+              let itemArr: any = item.split(",");
+              let obj: any = {
+                width: itemArr[0],
+                height: itemArr[1],
+              };
+              console.log(obj)
+            }
+          });
+        } else {
+          let pointObj: any = {
+            spaceId: nameArr[0].toString(),
+            localName: nameArr[0].toString(),
+            canClick: true,
+            pointArr: [],
+            devicePoint: [],
+            circlePoint: [],
+            logPointArr: [],
+          };
 
 
-        // debugger
-        arr.map((item: any, index: any) => {
-          if (item) {
-            let itemArr: any = item.split(",");
-            let obj: any = {
-              left: itemArr[0],
-              top: itemArr[1],
-            };
-            if (nameArr[1]) {
-              pointObj.circlePoint.push(obj);
-            } else {
-              if (index <= 1) {
-                pointObj.logPointArr.push(obj);
-              } else if (index <= 4) {
-                pointObj.devicePoint.push(obj);
+          // debugger
+          arr.map((item: any, index: any) => {
+            if (item) {
+              let itemArr: any = item.split(",");
+              let obj: any = {
+                left: itemArr[0],
+                top: itemArr[1],
+              };
+              if (nameArr[1]) {
+                pointObj.circlePoint.push(obj);
               } else {
               } else {
-                pointObj.pointArr.push(obj);
+                if (index <= 1) {
+                  pointObj.logPointArr.push(obj);
+                } else if (index <= 4) {
+                  pointObj.devicePoint.push(obj);
+                } else {
+                  pointObj.pointArr.push(obj);
+                }
               }
               }
             }
             }
+          });
+          let str: any = localStorage.getItem("spaceList");
+          let spaceList: any = str ? JSON.parse(str) : [];
+          let flag: any = false;
+          spaceList.map((item: any) => {
+            if (nameArr[1] && item.spaceId === nameArr[1]) {
+              item.circlePoint = pointObj.circlePoint;
+              flag = true;
+            } else {
+              if (item.spaceId === nameArr[0]) {
+                // debugger
+                // pointObj.circlePoint = item.circlePoint;
+                item.logPointArr = pointObj.logPointArr;
+                item.devicePoint = pointObj.devicePoint;
+                item.pointArr = pointObj.pointArr;
+                flag = true;
+              }
+            }
+          });
+          if (!flag) {
+            spaceList.push(pointObj);
           }
           }
-        });
-        let str: any = localStorage.getItem("spaceList");
-        let spaceList: any = str ? JSON.parse(str) : [];
-        let flag: any = false;
-        spaceList.map((item: any) => {
-          if (nameArr[1] && item.spaceId === nameArr[1]) {
-            item.circlePoint = pointObj.circlePoint;
-            flag = true;
-          } else {
-           if( item.spaceId === nameArr[0]){
-            // debugger
-            // pointObj.circlePoint = item.circlePoint;
-            item.logPointArr = pointObj.logPointArr;
-            item.devicePoint = pointObj.devicePoint;
-            item.pointArr = pointObj.pointArr;
-            flag = true;
-           }
-          }
-        });
-        if (!flag) {
-          spaceList.push(pointObj);
+          localStorage.setItem("spaceList", JSON.stringify(spaceList));
+          console.log(spaceList);
         }
         }
-        localStorage.setItem("spaceList", JSON.stringify(spaceList));
-        console.log(spaceList);
       },
       },
       // 处理坐标
       // 处理坐标
       handleStr(mapstr: any) {
       handleStr(mapstr: any) {
@@ -187,7 +204,6 @@ export default defineComponent({
           divobj.top = proxyData.getNum(item, "TOP");
           divobj.top = proxyData.getNum(item, "TOP");
           let title: any = proxyData.getNum(item, "title");
           let title: any = proxyData.getNum(item, "title");
           let titleArr: any = title.split("-");
           let titleArr: any = title.split("-");
-          console.log(titleArr);
           divobj.spaceId = titleArr[0];
           divobj.spaceId = titleArr[0];
           divobj.order = titleArr[1] * 1;
           divobj.order = titleArr[1] * 1;
           if (titleArr[2] && titleArr[2] === "c") {
           if (titleArr[2] && titleArr[2] === "c") {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 759 - 400
src/views/mapDataNew/sichuan.vue


+ 2 - 1
vue.config.js

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