Browse Source

fix: 平板的bug修改

chenzhen2 2 years ago
parent
commit
cdf0339614

+ 36 - 2
src/styles/index.scss

@@ -178,7 +178,7 @@ div:focus {
 }
 
 .van-switch--on {
-  background: $elActiveColor  !important;
+  background: $elActiveColor !important;
 }
 
 
@@ -193,6 +193,8 @@ div:focus {
 }
 
 .com-search {
+  position: relative;
+
   .van-search {
     padding: 0 !important;
     width: 100%;
@@ -205,6 +207,36 @@ div:focus {
     color: #c3c7cb;
   }
 
+  .van-field__left-icon {
+    display: none;
+  }
+
+  .search-box {
+    flex: 1;
+    height: 44px;
+  }
+
+  .search-icon {
+    position: absolute;
+    right: 0;
+    top: 0;
+    display: inline-block;
+    // background: #fff;
+    // height: 44px;
+    // line-height: 44px;
+    // width: 42px;
+    padding-right: 20px;
+    border-radius: 0 22px 22px 0;
+
+    img {
+      width: 24px;
+      height: 24px;
+      margin-top: 10px;
+    }
+
+    // height: 22px;
+  }
+
   .van-search__field {
     border-radius: 22px;
     padding: 0 !important;
@@ -222,6 +254,8 @@ div:focus {
     color: #373c43;
   }
 }
-.van-dialog__confirm, .van-dialog__confirm:active{
+
+.van-dialog__confirm,
+.van-dialog__confirm:active {
   color: $elActiveColor !important;
 }

+ 1 - 0
src/views/envmonitor/components/Contact/index.vue

@@ -173,6 +173,7 @@ export default defineComponent({
       }
       .concat-text {
         margin-top: -10px;
+        font-size: 14px;
       }
     }
   }

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

@@ -510,7 +510,7 @@ export default defineComponent({
       checkSpace(area: any) {
         if (area.disabled) {
           // 如果不在
-          Toast("空间和平板没绑定,暂不支持查看");
+          Toast("空间和平板没绑定,暂不支持查看");
           return;
         }
         proxyData.isSetSearchSpace = false;

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

@@ -7,6 +7,9 @@
         @update:model-value="onSearch"
         @clear="onCancel"
       />
+      <div class="search-icon">
+          <img :src="parseImgUrl('search-icon', 'search-icon.svg')" alt="" />
+        </div>
     </div>
     <div class="space-box">
       <template v-if="spaceData && spaceData.length">
@@ -65,6 +68,7 @@ export default defineComponent({
     const store = useStore();
     const spaceData: any = [];
     const proxyData = reactive({
+      parseImgUrl:parseImgUrl,
       userInfo: userInfo,
       spaceData: spaceData,
       searchValue: "", // 搜索val
@@ -112,7 +116,7 @@ export default defineComponent({
     watch(
       props,
       (newProps: any) => {
-        proxyData.spaceData = JSON.parse(JSON.stringify(newProps.spaceData));
+        proxyData.spaceData = newProps.spaceData;
         proxyData.activeSpace = newProps.spaceInfo;
       },
       {

+ 1 - 1
src/views/envmonitor/components/Scenario/scenarioDailog.vue

@@ -14,7 +14,7 @@
       >
       <span class="status-text2" v-if="!secenaroStatus.loading">
         <span v-if="secenaroStatus.lodingText">
-          已为您切换至适宜讨论的环境</span
+          已为您切换至适宜{{secenaroStatus.sceneName}}的环境</span
         >
       </span>
       <!-- <span class="status-text2" v-else> 切换失败</span> -->

+ 1 - 1
src/views/envmonitor/detail.vue

@@ -383,7 +383,7 @@ export default defineComponent({
               series: [
                 {
                   markLine:
-                    max >= chartMax
+                  max && chartMax && max >= chartMax
                       ? {
                           symbol: "none",
                           data: [

+ 19 - 1
src/views/envmonitor/index.vue

@@ -227,7 +227,7 @@
     >
       <com-map
         v-if="defaultSpace.spaceId && isShowMap"
-        :spaceData="spaceData"
+        :spaceData="copySpaceData"
         :spaceInfo="defaultSpace"
         :projectId="projectId"
         :floorId="defaultSpace.floorId"
@@ -894,6 +894,7 @@ export default defineComponent({
                 proxyData.officeData.temperature.toFixed(1) * 1;
             }
             // 环境数据
+
             proxyData.checkSpaceType(proxyData.officeData.roomFuncType);
             proxyData.formatSpaceInfo(content);
             // proxyData.setPageheight()
@@ -1220,6 +1221,17 @@ export default defineComponent({
             for (let i = 0; i < data.length; i++) {
               proxyData.spaceExistenceDevice[data[i]] = true;
             }
+            // for (let key in proxyData.spaceExistenceDevice) {
+            //   let flag: any = false;
+            //   for (let i = 0; i < data.length; i++) {
+            //     // proxyData.spaceExistenceDevice[data[i]] = true;
+            //     if (data[i] === key) {
+            //       flag = true;
+            //       break;
+            //     }
+            //   }
+            //   proxyData.spaceExistenceDevice[key] = flag;
+            // }
             // if (proxyData.spaceExistenceDevice.airConditioner) {
             //   proxyData.navList[0].noShow = true
             // } else {
@@ -1592,6 +1604,7 @@ export default defineComponent({
       },
       // 平板当前空间
       spaceData: spaceData,
+      copySpaceData: spaceData,
       floorId: "",
       buildingId: "",
       queryWorkSpace() {
@@ -1615,6 +1628,7 @@ export default defineComponent({
           let resData: any = res;
           if (resData.result === "success") {
             proxyData.spaceData = resData?.content ?? [];
+            // proxyData.copySpaceData = resData?.content ?? [];
           } else {
             proxyData.spaceData = [];
           }
@@ -1632,6 +1646,9 @@ export default defineComponent({
             //   item.active = false;
             // }
           });
+          proxyData.copySpaceData = JSON.parse(
+            JSON.stringify(proxyData.spaceData)
+          );
         });
       },
       // 重置空间状态
@@ -2033,6 +2050,7 @@ export default defineComponent({
 
   .fotter {
     position: fixed;
+    font-size: 0;
     left: 0;
     bottom: 0;
     z-index: 666;