瀏覽代碼

智慧会议,筛选器不联动,会议室人数筛选项改成(1-10 11-20 21-30), 楼层只展示有数据的楼层,例如:b1-b4就是停车场,不显示。加查询联动

DESKTOP-6LTVLN7\Liumouren 2 年之前
父節點
當前提交
4a6ddeb028

+ 46 - 97
src/components/common/query.vue

@@ -2,92 +2,41 @@
   <div class="ioc-query-form">
     <a-form layout="inline" :form="formData">
       <a-form-item label="单位名称:" class="formItem" v-if="visible.company">
-        <a-select
-          default-value="0"
-          style="width: 200px"
-          v-model="formData.companyId"
-        >
+        <a-select default-value="0" style="width: 200px" v-model="formData.companyId">
           <!--<a-select-option value="0"> 全部 </a-select-option>-->
-          <a-select-option
-            v-for="item in companyData"
-            :key="item.value"
-            :value="item.value"
-          >
+          <a-select-option v-for="item in companyData" :key="item.value" :value="item.value">
             {{ item.label }}
           </a-select-option>
         </a-select>
       </a-form-item>
       <a-form-item label="部门名称:" class="formItem" v-if="visible.dept">
-        <a-select
-          default-value="0"
-          style="width: 200px"
-          v-model="formData.deptId"
-        >
+        <a-select default-value="0" style="width: 200px" v-model="formData.deptId">
           <a-select-option value="0"> 全部 </a-select-option>
-          <a-select-option
-            v-for="item in deptData"
-            :key="item.value"
-            :value="item.value"
-          >
-            {{ item.label }}
-          </a-select-option>
+          <a-select-option v-for="item in deptData" :key="item.value" :value="item.value"> {{ item.label }} </a-select-option>
         </a-select>
       </a-form-item>
       <a-form-item label="楼层:" class="formItem" v-if="visible.floor">
-        <a-select
-          default-value="1"
-          style="width: 120px"
-          v-model="formData.floorId"
-        >
-          <a-select-option
-            v-for="item in floorData"
-            :key="item.value"
-            :value="item.value"
-          >
-            {{ item.label }}
-          </a-select-option>
+        <a-select default-value="0" style="width: 120px" v-model="formData.floorId">
+          <a-select-option value="0"> 全部 </a-select-option>
+          <a-select-option v-for="item in floorData" :key="item.value" :value="item.value"> {{ item.label }} </a-select-option>
         </a-select>
       </a-form-item>
       <a-form-item label="能源类型:" class="formItem" v-if="visible.energy">
-        <a-select
-          default-value="0"
-          style="width: 200px"
-          v-model="formData.energy"
-        >
+        <a-select default-value="0" style="width: 200px" v-model="formData.energy">
           <a-select-option value="0"> 全部 </a-select-option>
-          <a-select-option
-            v-for="item in energyData"
-            :key="item.value"
-            :value="item.value"
-          >
-            {{ item.label }}
-          </a-select-option>
+          <a-select-option v-for="item in energyData" :key="item.value" :value="item.value"> {{ item.label }} </a-select-option>
         </a-select>
       </a-form-item>
       <a-form-item label="时间范围:" class="formItem" v-if="visible.time">
-        <timeRange
-          :time-range.sync="formData.timeRange"
-          ref="timeRange"
-          style="width: 250px"
-        ></timeRange>
+        <timeRange :time-range.sync="formData.timeRange" ref="timeRange" style="width: 250px"></timeRange>
       </a-form-item>
       <slot name="extraItem"></slot>
       <a-form-item class="formItem" style="float: right; margin-right: 3%">
         <a-space size="middle">
-          <a-button
-            type="primary"
-            size="small"
-            style="width: 70px; background-color: #b3b3b3; border: none"
-            @click="formReset"
+          <a-button type="primary" size="small" style="width: 70px; background-color: #b3b3b3; border: none" @click="formReset"
             >重置</a-button
           >
-          <a-button
-            type="primary"
-            size="small"
-            style="width: 70px"
-            @click="search(formData)"
-            >查询</a-button
-          >
+          <a-button type="primary" size="small" style="width: 70px" @click="search(formData)">查询</a-button>
         </a-space>
       </a-form-item>
     </a-form>
@@ -98,7 +47,7 @@
 import timeRange from "@/components/common/timeRange.vue";
 export default {
   components: {
-    timeRange,
+    timeRange
   },
   props: {
     queryData: Object,
@@ -106,24 +55,24 @@ export default {
     reset: Function,
     search: Function,
     floorOptions: Array,
-    companyOptions: Array,
+    companyOptions: Array
   },
   emits: ["update:queryData"],
   setup(props, context) {
     const methods = {
       updateFormData(obj) {
         context.emit("update:queryData", obj);
-      },
+      }
     };
     return methods;
   },
   watch: {
     formData: {
-      handler: function (val) {
+      handler: function(val) {
         this.updateFormData(val);
       },
-      deep: true,
-    },
+      deep: true
+    }
   },
   data() {
     return {
@@ -133,7 +82,7 @@ export default {
         floor: false,
         dept: false,
         energy: false,
-        time: false,
+        time: false
       },
       formData: {},
       // 单位数据
@@ -144,8 +93,8 @@ export default {
         //},
         {
           label: "北京电信规划院",
-          value: "0",
-        },
+          value: "0"
+        }
         //{
         //  label: '上分',
         //  value: '3'
@@ -155,75 +104,75 @@ export default {
       floorData: [
         {
           value: -3,
-          label: "B3",
+          label: "B3"
         },
         {
           value: -2,
-          label: "B2",
+          label: "B2"
         },
         {
           value: -1,
-          label: "B1",
+          label: "B1"
         },
         {
           value: "1",
-          label: "1F",
+          label: "1F"
         },
         {
           value: 7,
-          label: "7F",
+          label: "7F"
         },
         {
           value: 8,
-          label: "8F",
+          label: "8F"
         },
         {
           value: 9,
-          label: "9F",
+          label: "9F"
         },
         {
           value: 21,
-          label: "21F",
-        },
+          label: "21F"
+        }
       ],
       // 部门数据
       deptData: [
         {
           label: "业务一部",
-          value: "1",
+          value: "1"
         },
         {
           label: "业务二部",
-          value: "2",
+          value: "2"
         },
         {
           label: "业务三部",
-          value: "3",
-        },
+          value: "3"
+        }
       ],
       // 能源类型
       energyData: [
         {
           label: "用电",
-          value: "electric",
+          value: "electric"
         },
         {
           label: "用水",
-          value: "water",
+          value: "water"
         },
         {
           label: "用热",
-          value: "hot",
+          value: "hot"
         },
         {
           label: "用冷",
-          value: "cold",
+          value: "cold"
         },
         {
           label: "光伏",
-          value: "pv",
-        },
-      ],
+          value: "pv"
+        }
+      ]
     };
   },
   created() {
@@ -242,9 +191,9 @@ export default {
     }
     if (this.queryData) {
       this.formData = JSON.parse(JSON.stringify(this.queryData));
-      if (this.queryData.floorId == "0") {
-        this.formData.floorId = "1";
-      }
+      // if (this.queryData.floorId == "0") {
+      //   this.formData.floorId = "1";
+      // }
       this.oriQueryData = JSON.parse(JSON.stringify(this.queryData));
     }
   },
@@ -252,8 +201,8 @@ export default {
     formReset() {
       this.formData = JSON.parse(JSON.stringify(this.oriQueryData));
       this.search();
-    },
-  },
+    }
+  }
 };
 </script>
 

+ 9 - 5
src/components/home/HomeLeft.vue

@@ -46,7 +46,7 @@
           智慧场景
         </a-menu-item>
       </a-menu-item-group>
-      <a-menu-item-group key="g2">
+      <a-menu-item-group key="g2" style="margin-top:40px;">
         <template slot="title">
           <div @mouseover="showNav" class="allNavBtn2">
             <div>单点登录</div>
@@ -109,6 +109,12 @@ export default {
 .ant-avatar-image {
   border-radius: 0 !important;
 }
+* {
+  user-select: none;
+  -moz-user-select: none;
+  -webkit-user-select: none;
+  -ms-user-select: none;
+}
 .homeLeft {
   width: 100%;
   height: 100%;
@@ -126,15 +132,13 @@ export default {
   .allNavBtn2 {
     width: 100%;
     cursor: default;
-    font-size: 16px;
     font-weight: 400;
-    padding-bottom: 10px;
     padding-left: 24px;
-    margin: 12px 0;
     color: #fff;
     &-menuList {
+      margin-top: 24px;
       & div {
-        margin: 5px;
+        margin: 12px 0;
         cursor: pointer;
         &:hover {
           & span {

+ 4 - 0
src/components/home/NavigationPage.vue

@@ -83,6 +83,10 @@ export default {
         letter-spacing: 1px;
         color: #333333;
         cursor: pointer;
+        &:hover {
+          color: #00c6fb;
+          box-shadow: 0px 1px 5px 0px #00c6fb64;
+        }
       }
     }
   }

+ 1 - 1
src/components/scene/meeting/config/meetingRoomItem.vue

@@ -28,7 +28,7 @@
             <span v-if="obj.status == 1">会议中</span> <span v-if="obj.status == 2">闲置中</span>
             <span v-if="obj.status == 3">已预订</span>
           </div>
-          <div class="meetingRoomItem-num" :style="{ color: color.primary }">{{ obj.time }}</div>
+          <div class="meetingRoomItem-num" :style="{ color: color.primary }">{{ obj.size }}</div>
         </div>
       </a-col>
       <a-col>

+ 50 - 8
src/components/scene/meeting/config/meetingRooms.vue

@@ -1,10 +1,10 @@
 <template>
   <div class="meetingRooms">
     <div class="meetingRooms-query">
-      <Query :show="['floor']" :query-data.sync="queryData" :reset="reset" :search="search">
+      <Query :show="['floor']" :floorOptions.sync="floorOptions" :query-data.sync="queryData" :reset="reset" :search="search">
         <template #extraItem>
           <a-form-model-item label="会议室状态:" class="formItem">
-            <a-select default-value="0" style="width: 120px" v-model="queryData.size">
+            <a-select default-value="0" style="width: 120px" v-model="queryData.state">
               <a-select-option value="0"> 全部 </a-select-option>
               <a-select-option v-for="item in roomStatusData" :key="item.value" :value="item.value">
                 {{ item.label }}
@@ -27,7 +27,7 @@
     </div>
 
     <div class="meetingRooms-content">
-      <div v-for="(floor, index) in roomData" :key="floor.floor" :index="index">
+      <div v-for="(floor, index) in roomData2" :key="floor.floor" :index="index">
         <div class="meetingRooms-floor">
           <div class="meetingRooms-floor-title">
             <a-divider orientation="left" :dashed="true"> {{ floor.floor }} </a-divider>
@@ -46,7 +46,7 @@
 <script>
 import MeetingRoomItem from "@/components/scene/meeting/config/meetingRoomItem.vue";
 import Query from "@/components/common/query.vue";
-import apiSceneMeeting from "@/api/scene/meeting/apiSceneMeeting";
+// import apiSceneMeeting from "@/api/scene/meeting/apiSceneMeeting";
 
 export default {
   components: {
@@ -61,6 +61,7 @@ export default {
       formDateDefaultValue: now,
       queryData: {
         floorId: "0",
+        state: "0",
         size: "0",
         date: nowFormat,
         timeRange: timeRange
@@ -93,6 +94,8 @@ export default {
           value: "3"
         }
       ],
+      floorOptions: [],
+      roomData2: [],
       roomData: [
         {
           floor: "3F",
@@ -103,6 +106,7 @@ export default {
               timeRange: ["9:00", "10:00"],
               status: "1",
               time: 8,
+              size: 8,
               devices: [
                 { icon: "audio" },
                 { icon: "camera" },
@@ -119,6 +123,7 @@ export default {
               timeRange: ["9:00", "10:00"],
               status: "1",
               time: 8,
+              size: 10,
               devices: [
                 { icon: "audio" },
                 { icon: "camera" },
@@ -135,6 +140,7 @@ export default {
               timeRange: ["9:00", "10:00"],
               status: "2",
               time: 8,
+              size: 20,
               devices: [
                 { icon: "audio" },
                 { icon: "camera" },
@@ -151,6 +157,7 @@ export default {
               timeRange: ["9:00", "10:00"],
               status: "3",
               time: 8,
+              size: 25,
               devices: [
                 { icon: "audio" },
                 { icon: "camera" },
@@ -172,6 +179,7 @@ export default {
               timeRange: ["9:00", "10:00"],
               status: "1",
               time: 8,
+              size: 10,
               devices: [
                 { icon: "audio" },
                 { icon: "camera" },
@@ -188,6 +196,7 @@ export default {
               timeRange: ["9:00", "10:00"],
               status: "1",
               time: 8,
+              size: 16,
               devices: [
                 { icon: "audio" },
                 { icon: "camera" },
@@ -209,6 +218,7 @@ export default {
               timeRange: ["9:00", "10:00"],
               status: "1",
               time: 8,
+              size: 10,
               devices: [
                 { icon: "audio" },
                 { icon: "camera" },
@@ -226,17 +236,49 @@ export default {
   },
   props: {},
   mounted() {
-    console.log("this.roomData", this.roomData);
-    console.log("this.queryData", this.queryData);
     this.getMeetingRooms();
   },
   methods: {
-    reset() {},
-    search() {},
+    reset() {
+      this.queryData = {
+        floorId: "0",
+        state: "0",
+        size: "0",
+        date: nowFormat,
+        timeRange: timeRange
+      };
+      this.search();
+    },
+    search() {
+      let returnRoomData = [];
+      this.roomData.forEach(item => {
+        if ((this.queryData.floorId != "0" && this.queryData.floorId == item.floor) || this.queryData.floorId == "0") {
+          let itemRoomsItem = [];
+          itemRoomsItem = item.rooms.filter(item2 => {
+            return (
+              (this.queryData.state != "0" ? item2.status == this.queryData.state : true) &&
+              (this.queryData.size != "0"
+                ? (this.queryData.size - 1) * 10 < item2.size && item2.size <= this.queryData.size * 10
+                : true)
+            );
+          });
+          if (itemRoomsItem && itemRoomsItem.length > 0) {
+            returnRoomData.push({ floor: item.floor, rooms: itemRoomsItem });
+          }
+        }
+      });
+      this.roomData2 = returnRoomData;
+    },
     handleDatePickerChange(val) {
       this.queryData.date = val.format("YYYY/MM/DD");
     },
     getMeetingRooms() {
+      this.roomData2 = this.roomData;
+      if (this.roomData2.length > 0) {
+        this.roomData2.forEach(item => {
+          this.floorOptions.push({ value: item.floor, label: item.floor });
+        });
+      }
       //apiSceneMeeting.getMeetingRoomList(this.queryData).then(res=>{
       //  console.log(res)
       //})