meetingRoomItem.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <div class="meetingRoomItem">
  3. <a-row>
  4. <a-col :span="24">
  5. <div class="meetingRoomItem-title">
  6. {{ obj.name }}
  7. <span style="font-size: 15px">{{ '[' + obj.timeRange[0] + '-' + obj.timeRange[1] + ']' }}</span>
  8. </div>
  9. </a-col>
  10. <a-col :span="16">
  11. <div class="meetingRoomItem-devices">
  12. <div class="meetingRoomItem-device" :style="{backgroundColor: color.light}" v-for="device in obj.devices" :key="device.id">
  13. </div>
  14. </div>
  15. </a-col>
  16. <a-col :span="8">
  17. <div style="">
  18. <div class="meetingRoomItem-state" :style="{color: color.primary}">
  19. <span v-if="obj.status==1">会议中</span>
  20. <span v-if="obj.status==2">闲置中</span>
  21. <span v-if="obj.status==3">已预订</span>
  22. </div>
  23. <div class="meetingRoomItem-num" :style="{color: color.primary}">
  24. {{ obj.time }}
  25. </div>
  26. </div>
  27. </a-col>
  28. <a-col >
  29. <div class="meetingRoomItem-opr">
  30. <a-button class="meetingRoomItem-opr-btn" :style="{backgroundColor: color.dark}" @click="viewDetails">查看信息</a-button>
  31. <a-button class="meetingRoomItem-opr-btn" :style="{backgroundColor: color.dark}" @click="configMeeting">配置策略</a-button>
  32. </div>
  33. </a-col>
  34. </a-row>
  35. <a-modal v-if="detailVisible" v-model="detailVisible" title="会议室详情" :width="1000" style="height: 650px;overflow-y: auto"
  36. :footer="null"
  37. >
  38. <MeetingRoomDetails :data="obj" />
  39. </a-modal>
  40. <a-modal v-if="configVisible" v-model="configVisible" title="配置策略" :width="1000" style="height: 650px;overflow-y: auto"
  41. :footer="null"
  42. >
  43. <MeetingRoomConfig />
  44. </a-modal>
  45. </div>
  46. </template>
  47. <script>
  48. import MeetingRoomDetails from "@/components/scene/meeting/config/meetingRoomDetails.vue";
  49. import MeetingRoomConfig from "@/components/scene/meeting/config/meetingRoomConfig.vue";
  50. export default {
  51. data() {
  52. return {
  53. detailVisible: false,
  54. configVisible: false,
  55. color: {
  56. primary: '#3CC2AC',
  57. light: 'rgba(60,194,172,0.5)',
  58. dark: '#3CC2AC',
  59. }
  60. }
  61. },
  62. components: {
  63. MeetingRoomDetails,
  64. MeetingRoomConfig,
  65. },
  66. props: {
  67. obj: Object,
  68. },
  69. mounted() {
  70. if (this.obj.status==1) {
  71. this.color={
  72. primary: '#3CC2AC',
  73. light: 'rgba(60,194,172,0.5)',
  74. dark: '#3CC2AC',
  75. }
  76. } else if (this.obj.status==2) {
  77. this.color={
  78. primary: '#3AA7E6',
  79. light: 'rgba(58,167,230,0.5)',
  80. dark: '#3AA7E6',
  81. }
  82. } else if (this.obj.status==3) {
  83. this.color={
  84. primary: '#EE8242',
  85. light: 'rgba(238,130,66,0.5)',
  86. dark: '#EE8242',
  87. }
  88. }
  89. },
  90. methods: {
  91. viewDetails() {
  92. this.detailVisible = true;
  93. },
  94. configMeeting() {
  95. this.configVisible = true;
  96. },
  97. }
  98. }
  99. </script>
  100. <style lang="less" scoped>
  101. .meetingRoomItem {
  102. width: 100%;
  103. height: 150px;
  104. padding: 8px 12px 8px 15px;
  105. border-radius: 8px;
  106. background-color: #f7fbff;
  107. .meetingRoomItem-title {
  108. color: #4D4D4D;
  109. font-size: 16px;
  110. padding-left: 3px;
  111. height: 20%;
  112. }
  113. .meetingRoomItem-state {
  114. margin-top: 5%;
  115. text-align: center;
  116. }
  117. .meetingRoomItem-num {
  118. text-align: center;
  119. font-size: 30px;
  120. }
  121. .meetingRoomItem-devices {
  122. margin-top: 5%;
  123. height: 40%;
  124. .meetingRoomItem-device {
  125. display: inline-block;
  126. width: 20px;
  127. height: 20px;
  128. margin: 5px 3px;
  129. border-radius: 3px;
  130. }
  131. }
  132. .meetingRoomItem-opr {
  133. width: 100%;
  134. height: 40%;
  135. text-align: center;
  136. .meetingRoomItem-opr-btn {
  137. width: 47%;
  138. height: 30px;
  139. border-radius: 4px;
  140. color: #ffffff;
  141. font-size: 12px;
  142. }
  143. }
  144. }
  145. </style>