|
@@ -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)
|
|
|
//})
|