123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <template>
- <div class="meetingRooms">
- <div class="meetingRooms-query">
- <Query :show="['floor']" :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-option value="0"> 全部 </a-select-option>
- <a-select-option v-for="item in roomStatusData" :key="item.value" :value="item.value">
- {{ item.label }}
- </a-select-option>
- </a-select>
- </a-form-model-item>
- <a-form-model-item label="会议室人数:" class="formItem">
- <a-select default-value="0" style="width: 120px" v-model="queryData.size">
- <a-select-option value="0"> 全部 </a-select-option>
- <a-select-option v-for="item in roomSizeData" :key="item.value" :value="item.value">
- {{ item.label }}
- </a-select-option>
- </a-select>
- </a-form-model-item>
- <a-form-model-item label="日期:" class="formItem">
- <a-date-picker :default-value="formDateDefaultValue" @change="handleDatePickerChange" format="YYYY/MM/DD" />
- </a-form-model-item>
- </template>
- </Query>
- </div>
- <div class="meetingRooms-content">
- <div v-for="(floor, index) in roomData" :key="floor.floor" :index="index">
- <div class="meetingRooms-floor">
- <div class="meetingRooms-floor-title">
- <a-divider orientation="left" :dashed="true"> {{ floor.floor }} </a-divider>
- </div>
- <a-row :gutter="12">
- <a-col :lg="{ span: 6 }" :sm="{ span: 6 }" :xxl="{ span: 4 }" v-for="room in floor.rooms" :key="room.id">
- <MeetingRoomItem :obj="room" />
- </a-col>
- </a-row>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import MeetingRoomItem from "@/components/scene/meeting/config/meetingRoomItem.vue";
- import Query from "@/components/common/query.vue";
- import apiSceneMeeting from "@/api/scene/meeting/apiSceneMeeting";
- export default {
- components: {
- MeetingRoomItem,
- Query
- },
- data() {
- let timeRange = this.$util.dateUtil.getNearlyMonthRange();
- let now = this.$moment();
- let nowFormat = now.format("YYYY/MM/DD");
- return {
- formDateDefaultValue: now,
- queryData: {
- floorId: "0",
- size: "0",
- date: nowFormat,
- timeRange: timeRange
- },
- roomSizeData: [
- {
- label: "3人",
- value: "3"
- },
- {
- label: "5人",
- value: "5"
- }
- ],
- roomStatusData: [
- {
- label: "会议中",
- value: "1"
- },
- {
- label: "闲置中",
- value: "2"
- },
- {
- label: "已预订",
- value: "3"
- }
- ],
- roomData: [
- {
- floor: "3F",
- rooms: [
- {
- id: 1,
- name: "301会议室",
- timeRange: ["9:00", "10:00"],
- status: "1",
- time: 8,
- devices: [
- { icon: "audio" },
- { icon: "camera" },
- { icon: "api" },
- { icon: "control" },
- { icon: "notification" },
- { icon: "unlock" },
- { icon: "safety-certificate" }
- ]
- },
- {
- id: 2,
- name: "301会议室",
- timeRange: ["9:00", "10:00"],
- status: "1",
- time: 8,
- devices: [
- { icon: "audio" },
- { icon: "camera" },
- { icon: "api" },
- { icon: "control" },
- { icon: "notification" },
- { icon: "unlock" },
- { icon: "safety-certificate" }
- ]
- },
- {
- id: 3,
- name: "301会议室",
- timeRange: ["9:00", "10:00"],
- status: "2",
- time: 8,
- devices: [
- { icon: "audio" },
- { icon: "camera" },
- { icon: "api" },
- { icon: "control" },
- { icon: "notification" },
- { icon: "unlock" },
- { icon: "safety-certificate" }
- ]
- },
- {
- id: 4,
- name: "301会议室",
- timeRange: ["9:00", "10:00"],
- status: "3",
- time: 8,
- devices: [
- { icon: "audio" },
- { icon: "camera" },
- { icon: "api" },
- { icon: "control" },
- { icon: "notification" },
- { icon: "unlock" },
- { icon: "safety-certificate" }
- ]
- }
- ]
- },
- {
- floor: "4F",
- rooms: [
- {
- id: 401,
- name: "401会议室",
- timeRange: ["9:00", "10:00"],
- status: "1",
- time: 8,
- devices: [
- { icon: "audio" },
- { icon: "camera" },
- { icon: "api" },
- { icon: "control" },
- { icon: "notification" },
- { icon: "unlock" },
- { icon: "safety-certificate" }
- ]
- },
- {
- id: 402,
- name: "402会议室",
- timeRange: ["9:00", "10:00"],
- status: "1",
- time: 8,
- devices: [
- { icon: "audio" },
- { icon: "camera" },
- { icon: "api" },
- { icon: "control" },
- { icon: "notification" },
- { icon: "unlock" },
- { icon: "safety-certificate" }
- ]
- }
- ]
- },
- {
- floor: "5F",
- rooms: [
- {
- id: 501,
- name: "501会议室",
- timeRange: ["9:00", "10:00"],
- status: "1",
- time: 8,
- devices: [
- { icon: "audio" },
- { icon: "camera" },
- { icon: "api" },
- { icon: "control" },
- { icon: "notification" },
- { icon: "unlock" },
- { icon: "safety-certificate" }
- ]
- }
- ]
- }
- ]
- };
- },
- props: {},
- mounted() {
- this.getMeetingRooms();
- },
- methods: {
- reset() {},
- search() {},
- handleDatePickerChange(val) {
- this.queryData.date = val.format("YYYY/MM/DD");
- },
- getMeetingRooms() {
- //apiSceneMeeting.getMeetingRoomList(this.queryData).then(res=>{
- // console.log(res)
- //})
- }
- }
- };
- </script>
- <style lang="less" scoped>
- .meetingRooms {
- width: 100%;
- height: 100%;
- .meetingRooms-floor {
- width: 99%;
- height: auto;
- margin: 8px;
- .meetingRooms-floor-title {
- }
- .meetingRooms-floor-item {
- width: 100%;
- height: 150px;
- border: 1px solid red;
- padding: 2% 5%;
- border-left: 2px solid red;
- }
- }
- }
- .formItem {
- margin: 0px 15px;
- }
- </style>
|