infoPage.vue 5.8 KB

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