meetingRooms.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <template>
  2. <div class="meetingRooms">
  3. <div class="meetingRooms-query">
  4. <Query :show="['floor']" :query-data.sync="queryData" :reset="reset" :search="search">
  5. <template #extraItem>
  6. <a-form-model-item label="会议室状态:" class="formItem">
  7. <a-select default-value="0" style="width: 120px" v-model="queryData.size">
  8. <a-select-option value="0"> 全部 </a-select-option>
  9. <a-select-option v-for="item in roomStatusData" :key="item.value" :value="item.value">
  10. {{ item.label }}
  11. </a-select-option>
  12. </a-select>
  13. </a-form-model-item>
  14. <a-form-model-item label="会议室人数:" class="formItem">
  15. <a-select default-value="0" style="width: 120px" v-model="queryData.size">
  16. <a-select-option value="0"> 全部 </a-select-option>
  17. <a-select-option v-for="item in roomSizeData" :key="item.value" :value="item.value">
  18. {{ item.label }}
  19. </a-select-option>
  20. </a-select>
  21. </a-form-model-item>
  22. <a-form-model-item label="日期:" class="formItem">
  23. <a-date-picker :default-value="formDateDefaultValue" @change="handleDatePickerChange" format="YYYY/MM/DD" />
  24. </a-form-model-item>
  25. </template>
  26. </Query>
  27. </div>
  28. <div class="meetingRooms-content">
  29. <div v-for="(floor, index) in roomData" :key="floor.floor" :index="index">
  30. <div class="meetingRooms-floor">
  31. <div class="meetingRooms-floor-title">
  32. <a-divider orientation="left" :dashed="true"> {{ floor.floor }} </a-divider>
  33. </div>
  34. <a-row :gutter="12">
  35. <a-col :lg="{ span: 6 }" :sm="{ span: 6 }" :xxl="{ span: 4 }" v-for="room in floor.rooms" :key="room.id">
  36. <MeetingRoomItem :obj="room" />
  37. </a-col>
  38. </a-row>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. </template>
  44. <script>
  45. import MeetingRoomItem from "@/components/scene/meeting/config/meetingRoomItem.vue";
  46. import Query from "@/components/common/query.vue";
  47. import apiSceneMeeting from "@/api/scene/meeting/apiSceneMeeting";
  48. export default {
  49. components: {
  50. MeetingRoomItem,
  51. Query
  52. },
  53. data() {
  54. let timeRange = this.$util.dateUtil.getNearlyMonthRange();
  55. let now = this.$moment();
  56. let nowFormat = now.format("YYYY/MM/DD");
  57. return {
  58. formDateDefaultValue: now,
  59. queryData: {
  60. floorId: "0",
  61. size: "0",
  62. date: nowFormat,
  63. timeRange: timeRange
  64. },
  65. roomSizeData: [
  66. {
  67. label: "3人",
  68. value: "3"
  69. },
  70. {
  71. label: "5人",
  72. value: "5"
  73. }
  74. ],
  75. roomStatusData: [
  76. {
  77. label: "会议中",
  78. value: "1"
  79. },
  80. {
  81. label: "闲置中",
  82. value: "2"
  83. },
  84. {
  85. label: "已预订",
  86. value: "3"
  87. }
  88. ],
  89. roomData: [
  90. {
  91. floor: "3F",
  92. rooms: [
  93. {
  94. id: 1,
  95. name: "301会议室",
  96. timeRange: ["9:00", "10:00"],
  97. status: "1",
  98. time: 8,
  99. devices: [
  100. { icon: "audio" },
  101. { icon: "camera" },
  102. { icon: "api" },
  103. { icon: "control" },
  104. { icon: "notification" },
  105. { icon: "unlock" },
  106. { icon: "safety-certificate" }
  107. ]
  108. },
  109. {
  110. id: 2,
  111. name: "301会议室",
  112. timeRange: ["9:00", "10:00"],
  113. status: "1",
  114. time: 8,
  115. devices: [
  116. { icon: "audio" },
  117. { icon: "camera" },
  118. { icon: "api" },
  119. { icon: "control" },
  120. { icon: "notification" },
  121. { icon: "unlock" },
  122. { icon: "safety-certificate" }
  123. ]
  124. },
  125. {
  126. id: 3,
  127. name: "301会议室",
  128. timeRange: ["9:00", "10:00"],
  129. status: "2",
  130. time: 8,
  131. devices: [
  132. { icon: "audio" },
  133. { icon: "camera" },
  134. { icon: "api" },
  135. { icon: "control" },
  136. { icon: "notification" },
  137. { icon: "unlock" },
  138. { icon: "safety-certificate" }
  139. ]
  140. },
  141. {
  142. id: 4,
  143. name: "301会议室",
  144. timeRange: ["9:00", "10:00"],
  145. status: "3",
  146. time: 8,
  147. devices: [
  148. { icon: "audio" },
  149. { icon: "camera" },
  150. { icon: "api" },
  151. { icon: "control" },
  152. { icon: "notification" },
  153. { icon: "unlock" },
  154. { icon: "safety-certificate" }
  155. ]
  156. }
  157. ]
  158. },
  159. {
  160. floor: "4F",
  161. rooms: [
  162. {
  163. id: 401,
  164. name: "401会议室",
  165. timeRange: ["9:00", "10:00"],
  166. status: "1",
  167. time: 8,
  168. devices: [
  169. { icon: "audio" },
  170. { icon: "camera" },
  171. { icon: "api" },
  172. { icon: "control" },
  173. { icon: "notification" },
  174. { icon: "unlock" },
  175. { icon: "safety-certificate" }
  176. ]
  177. },
  178. {
  179. id: 402,
  180. name: "402会议室",
  181. timeRange: ["9:00", "10:00"],
  182. status: "1",
  183. time: 8,
  184. devices: [
  185. { icon: "audio" },
  186. { icon: "camera" },
  187. { icon: "api" },
  188. { icon: "control" },
  189. { icon: "notification" },
  190. { icon: "unlock" },
  191. { icon: "safety-certificate" }
  192. ]
  193. }
  194. ]
  195. },
  196. {
  197. floor: "5F",
  198. rooms: [
  199. {
  200. id: 501,
  201. name: "501会议室",
  202. timeRange: ["9:00", "10:00"],
  203. status: "1",
  204. time: 8,
  205. devices: [
  206. { icon: "audio" },
  207. { icon: "camera" },
  208. { icon: "api" },
  209. { icon: "control" },
  210. { icon: "notification" },
  211. { icon: "unlock" },
  212. { icon: "safety-certificate" }
  213. ]
  214. }
  215. ]
  216. }
  217. ]
  218. };
  219. },
  220. props: {},
  221. mounted() {
  222. this.getMeetingRooms();
  223. },
  224. methods: {
  225. reset() {},
  226. search() {},
  227. handleDatePickerChange(val) {
  228. this.queryData.date = val.format("YYYY/MM/DD");
  229. },
  230. getMeetingRooms() {
  231. //apiSceneMeeting.getMeetingRoomList(this.queryData).then(res=>{
  232. // console.log(res)
  233. //})
  234. }
  235. }
  236. };
  237. </script>
  238. <style lang="less" scoped>
  239. .meetingRooms {
  240. width: 100%;
  241. height: 100%;
  242. .meetingRooms-floor {
  243. width: 99%;
  244. height: auto;
  245. margin: 8px;
  246. .meetingRooms-floor-title {
  247. }
  248. .meetingRooms-floor-item {
  249. width: 100%;
  250. height: 150px;
  251. border: 1px solid red;
  252. padding: 2% 5%;
  253. border-left: 2px solid red;
  254. }
  255. }
  256. }
  257. .formItem {
  258. margin: 0px 15px;
  259. }
  260. </style>