infoPage.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <!-- 实验室详情 -->
  2. <template>
  3. <view class="infoPage">
  4. <view class="title">
  5. <view class="title-t">
  6. <view :style="'border:1rpx solid '+newData.levelColor+';color:'+newData.levelColor+';'">
  7. {{newData.levelName}}
  8. </view>
  9. <view>{{newData.subName}}</view>
  10. </view>
  11. <view class="title-m">
  12. <view v-for="(item,index) in newData.labClassTypeList" :key="index">{{item.typeName}}</view>
  13. </view>
  14. <view class="title-m1">
  15. <img src="@/pages_manage/images/icon_xq_xy.png">
  16. <view>{{newData.deptName}}</view>
  17. </view>
  18. <view class="title-b">
  19. <img src="@/pages_manage/images/icon_14.png">
  20. <view>{{newData.buildName}}{{newData.floorName}}{{newData.subName}}{{ newData.roomNum}}</view>
  21. </view>
  22. </view>
  23. <view class="tab-btn">
  24. <view :class="currentIndex==index?'color-B':''" v-for="(item,index) in tabData" :key="index"
  25. @click="tabFun(index)">{{item}}</view>
  26. </view>
  27. <!-- 物联控制 -->
  28. <iotControl v-if="pageType == 2" :subjectData="subjectData"></iotControl>
  29. <!-- 安全信息牌 -->
  30. <safetyCard v-if="pageType == 3" :subjectData="subjectData"></safetyCard>
  31. <!-- 进出记录 -->
  32. <accessRecord v-if="pageType == 4" :subjectData="subjectData"></accessRecord>
  33. <!-- 语音广播弹窗 -->
  34. <voiceBroadcast v-if="broadcastPage" :subjectData="subjectData"></voiceBroadcast>
  35. <!-- 空调弹窗 -->
  36. <airConditioning v-if="conditioningPage" :subjectData="subjectData"></airConditioning>
  37. </view>
  38. </template>
  39. <script>
  40. import {
  41. iotControl
  42. } from '@/pages_manage/views/laboratory/iotControl.vue'
  43. import {
  44. safetyCard
  45. } from '@/pages_manage/views/laboratory/safetyCard.vue'
  46. import {
  47. accessRecord
  48. } from '@/pages_manage/views/laboratory/accessRecord.vue'
  49. import {
  50. voiceBroadcast
  51. } from '@/pages_manage/views/laboratory/voiceBroadcast.vue'
  52. import {
  53. airConditioning
  54. } from '@/pages_manage/views/laboratory/airConditioning.vue'
  55. export default {
  56. name: 'infoPage',
  57. components: {
  58. iotControl,
  59. safetyCard,
  60. accessRecord,
  61. voiceBroadcast,
  62. airConditioning,
  63. },
  64. data() {
  65. return {
  66. newData: {},
  67. tabData: ['物联控制', '安全信息牌', '进出记录'],
  68. currentIndex: 0,
  69. pageType: 2,
  70. //语音广播弹窗
  71. broadcastPage: false,
  72. //空调弹窗
  73. conditioningPage: false,
  74. // 查询参数
  75. queryParams: {
  76. page: 1,
  77. pageSize: 20,
  78. },
  79. subjectData: null,
  80. }
  81. },
  82. onLoad(option) {
  83. this.$set(this, 'newData', JSON.parse(decodeURIComponent(option.infoData)));
  84. this.$set(this, 'subjectData', JSON.parse(decodeURIComponent(option.infoData)));
  85. },
  86. created() {
  87. },
  88. mounted() {
  89. },
  90. methods: {
  91. tabFun(index) {
  92. this.$set(this, 'currentIndex', index);
  93. if (index == 0) {
  94. //物联控制
  95. this.$set(this, 'pageType', 2);
  96. } else if (index == 1) {
  97. //安全信息牌
  98. this.$set(this, 'pageType', 3);
  99. } else if (index == 2) {
  100. //进出记录
  101. this.$set(this, 'pageType', 4);
  102. }
  103. },
  104. buttonClick(type, row) {
  105. let self = this;
  106. if (type == 'subDetail') {
  107. //实验室详情
  108. } else if (type == 'broadcastOpen') {
  109. //语音弹窗开启
  110. this.$set(this, 'broadcastPage', true);
  111. } else if (type == 'broadcastClose') {
  112. //语音弹窗关闭
  113. this.$set(this, 'broadcastPage', false);
  114. } else if (type == 'conditioningOpen') {
  115. //空调弹窗开启
  116. this.$set(this, 'conditioningPage', true);
  117. } else if (type == 'conditioningClose') {
  118. //空调弹窗关闭
  119. this.$set(this, 'conditioningPage', false);
  120. } else if (type == 'back') {
  121. this.$set(this, 'pageType', 2);
  122. }
  123. },
  124. },
  125. }
  126. </script>
  127. <style lang="stylus" scoped>
  128. .infoPage {
  129. height: 100%;
  130. display flex;
  131. flex-direction column;
  132. .title {
  133. height: auto;
  134. background: #FFFFFF;
  135. padding: 0 20rpx;
  136. box-sizing: border-box;
  137. .title-t {
  138. display: flex;
  139. justify-content: flex-start;
  140. align-items: center;
  141. padding: 28rpx 0 20rpx 0;
  142. box-sizing: border-box;
  143. >view:nth-of-type(1) {
  144. background: #fff;
  145. margin-right: 20rpx;
  146. border-radius: 8px;
  147. padding: 6rpx 16rpx;
  148. box-sizing: border-box;
  149. }
  150. >view:nth-of-type(2) {
  151. font-family: PingFang SC;
  152. font-weight: 500;
  153. font-size: 30rpx;
  154. color: #333333;
  155. line-height: 36rpx;
  156. }
  157. }
  158. .title-m {
  159. display: flex;
  160. justify-content: flex-start;
  161. flex-wrap: wrap;
  162. >view {
  163. display: inline-block;
  164. font-family: PingFang SC;
  165. font-weight: 500;
  166. font-size: 24rpx;
  167. color: #0183FA;
  168. background: rgba(1, 131, 250, 0.2);
  169. border-radius: 18rpx;
  170. padding: 6rpx 12rpx;
  171. box-sizing: border-box;
  172. margin-right: 12rpx;
  173. margin-bottom: 20rpx;
  174. }
  175. }
  176. .title-m1 {
  177. display: flex;
  178. justify-content: flex-start;
  179. margin: 0rpx 0 20rpx 0;
  180. >img {
  181. width: 30rpx;
  182. height: 27rpx;
  183. margin-right: 12rpx;
  184. }
  185. >view {
  186. font-family: PingFang SC;
  187. font-weight: 500;
  188. font-size: 26rpx;
  189. color: #666666;
  190. line-height: 30rpx;
  191. }
  192. }
  193. .title-b {
  194. display: flex;
  195. justify-content: flex-start;
  196. margin-bottom: 22rpx;
  197. >img {
  198. width: 30rpx;
  199. height: 27rpx;
  200. margin-right: 12rpx;
  201. }
  202. >view {
  203. font-family: PingFang SC;
  204. font-weight: 500;
  205. font-size: 26rpx;
  206. color: #666666;
  207. line-height: 30rpx;
  208. }
  209. }
  210. }
  211. .tab-btn {
  212. width: 750rpx;
  213. height: 80rpx;
  214. border: 1px solid #E0E0E0;
  215. background: #fff;
  216. display: flex;
  217. justify-content: flex-start;
  218. margin-top: 20rpx;
  219. >view {
  220. width: 250rpx;
  221. height: 80rpx;
  222. font-family: PingFang SC;
  223. font-weight: 500;
  224. font-size: 32rpx;
  225. color: #222222;
  226. line-height: 80rpx;
  227. text-align: center;
  228. border-right: 1px solid #E0E0E0;
  229. }
  230. .color-B {
  231. width: 250rpx;
  232. height: 80rpx;
  233. font-family: PingFang SC;
  234. font-weight: 500;
  235. font-size: 32rpx;
  236. color: #FFFFFF;
  237. line-height: 80rpx;
  238. text-align: center;
  239. background: #0183FA;
  240. }
  241. }
  242. }
  243. </style>