fireStation_details.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <template>
  2. <view>
  3. <navInfo :title="'微型消防站详情'"></navInfo>
  4. <view class="bgTopImg">
  5. <image slot="right" :src="`${urls}/navBg@2x.png`" class="bgTopImg"></image>
  6. </view>
  7. <view v-if="tableData != ''" class="container uni-container ">
  8. <view class="buju">
  9. <view class="buju">
  10. <text class="miaoshu">社区名称 :</text>
  11. <text>{{ tableData.microName }}</text>
  12. </view>
  13. <text class="miaoshu">所属区县 :</text>
  14. <text>{{ tableData.county }}</text>
  15. </view>
  16. <view class="buju">
  17. <text class="miaoshu">所属单位 :</text>
  18. <text>{{ tableData.orgName }}</text>
  19. </view>
  20. <view class="buju">
  21. <text class="miaoshu">详细地址 :</text>
  22. <text>{{ tableData.addr }}</text>
  23. </view>
  24. <view class="buju">
  25. <text class="miaoshu">控制室值班人员 :</text>
  26. <text>{{ tableData.dutyer }}</text>
  27. <button @click="goWorkNum" class="manyBtn">查看值班人</button>
  28. </view>
  29. <view class="buju">
  30. <text class="miaoshu">站长 :</text>
  31. <text>{{ tableData.charger }}</text>
  32. <button @click="goBigNum" class="manyBtn">查看站长</button>
  33. </view>
  34. <view class="buju">
  35. <text class="miaoshu">建站日期 :</text>
  36. <text>{{ tableData.builtOn }}</text>
  37. </view>
  38. <view class="buju">
  39. <text class="miaoshu">队员数量 :</text>
  40. <text>{{ tableData.members }}</text>
  41. <button @click="goPeopleMes" class="manyBtn">查看队员</button>
  42. </view>
  43. <view class="buju">
  44. <text class="miaoshu">报警电话 :</text>
  45. <text>{{ tableData.alarmTel }}</text>
  46. </view>
  47. <view class="buju"><text class="miaoshu">微型消防站车辆配备情况 :</text></view>
  48. <view class="buju">
  49. <view class="width100">
  50. <uni-table stripe border emptyText="暂无更多数据">
  51. <uni-tr class="uniTr">
  52. <uni-th align="center">水罐车</uni-th>
  53. <uni-td align="center">{{ tableData.waterTanker }}</uni-td>
  54. </uni-tr>
  55. <uni-tr class="uniTr">
  56. <uni-th align="center">泡沫车</uni-th>
  57. <uni-td align="center">{{ tableData.foamCar }}</uni-td>
  58. </uni-tr>
  59. <uni-tr class="uniTr">
  60. <uni-th align="center">消防摩托</uni-th>
  61. <uni-td align="center">{{ tableData.fireMoto }}</uni-td>
  62. </uni-tr>
  63. <uni-tr class="uniTr">
  64. <uni-th align="center">其它</uni-th>
  65. <uni-td align="center">{{ tableData.others }}</uni-td>
  66. </uni-tr>
  67. </uni-table>
  68. </view>
  69. </view>
  70. <u-button style="width:60%;margin-top:80rpx" @click="gotoEditStation(tableData)" shape="circle" size="large" color="#4cb2b6"
  71. text="修改信息"></u-button>
  72. </view>
  73. </view>
  74. </template>
  75. <script>
  76. var that = null;
  77. import config from '@/config'
  78. const baseUrlImg=config.baseUrlImg
  79. import navInfo from '@/pagesA/components/my-nav/nav'
  80. import {
  81. shijianc
  82. } from '@/utils/common.js'
  83. export default {
  84. components: {
  85. navInfo
  86. },
  87. data() {
  88. return {
  89. urls:baseUrlImg,
  90. tableData: {
  91. orgName: ''
  92. }
  93. };
  94. },
  95. onLoad: function(option) {
  96. that = this;
  97. var data = option.id;
  98. // 接收来自上个页面传递的参数
  99. const eventChannel = this.getOpenerEventChannel();
  100. eventChannel.on('acceptDataFromOpenerPage', function(val) {
  101. that.tableData = val;
  102. that.tableData.builtOn=val.builtOn
  103. });
  104. this.tableData.orgName = option.orgName;
  105. },
  106. methods: {
  107. // 传递当前页面数据到 ‘修改信息’
  108. gotoEditStation(val) {
  109. uni.navigateTo({
  110. url: '/pagesA/fire/fire_station/edit_fireStation/edit_fireStation',
  111. events: {
  112. // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
  113. acceptDataFromOpenedPage: function(val) {
  114. this.tableData = val;
  115. }
  116. },
  117. success: function(res) {
  118. // 通过eventChannel向被打开页面传送数据
  119. res.eventChannel.emit('acceptDataFromOpenerPage', val);
  120. }
  121. });
  122. },
  123. // 值班
  124. goWorkNum(){
  125. uni.navigateTo({
  126. url:"/pagesA/fire/fire_station/people_fireStation/people_fireStation?addId=1"
  127. })
  128. },
  129. // 负责人
  130. goBigNum(){
  131. uni.navigateTo({
  132. url:"/pagesA/fire/fire_station/people_fireStation/people_fireStation?addId=2"
  133. })
  134. },
  135. // 普通人
  136. goPeopleMes(){
  137. uni.navigateTo({
  138. url:"/pagesA/fire/fire_station/people_fireStation/people_fireStation?addId=0"
  139. })
  140. }
  141. }
  142. };
  143. </script>
  144. <style lang="scss" scoped>
  145. page {
  146. background-color: #fff !important;
  147. }
  148. .buju {
  149. margin: 40rpx 0;
  150. }
  151. .container {
  152. border-radius: 30px 30px 0px 0px;
  153. background: #fff;
  154. /*#ifdef H5*/
  155. margin-top: 50rpx;
  156. /* #endif */
  157. /* #ifdef MP-WEIXIN*/
  158. margin-top: 100rpx;
  159. /* #endif */
  160. z-index: 999999999999999999;
  161. position: relative;
  162. }
  163. .cont {}
  164. .weiwan {
  165. color: #d51a52;
  166. background: rgba(213, 26, 82, 0.2);
  167. padding: 5rpx 20rpx;
  168. border-radius: 2px;
  169. border: 1px solid #d51a52;
  170. }
  171. .yiwan {
  172. color: #4cb2b6;
  173. background: rgba(76, 178, 182, 0.2);
  174. padding: 5rpx 20rpx;
  175. border-radius: 2px;
  176. border: 1px solid #4cb2b6;
  177. }
  178. .miaoshu {
  179. margin-right: 20rpx;
  180. color: #274647;
  181. font-weight: 600;
  182. }
  183. /deep/.uni-table-tr,
  184. /deep/.table--stripe[data-v-6cd49106] .uni-table-tr:nth-child(2n + 3),
  185. /deep/.table--stripe.data-v-6cd49106 .uni-table-tr:nth-child(2n + 3),/deep/.table--stripe {
  186. background-color: #F2F4F6;
  187. }
  188. /deep/.table--border[data-v-511e81f9],
  189. /deep/.table--border.data-v-511e81f9,/deep/.table--border {
  190. border-right: 2px #E5E5E5 solid;
  191. border-top-left-radius: 10px !important;
  192. border-bottom-left-radius: 10px !important;
  193. }
  194. /deep/.table--border[data-v-321f8e79],
  195. /deep/.table--border.data-v-321f8e79,/deep/.table--borde{
  196. border-top-right-radius: 10px !important;
  197. border-bottom-right-radius: 10px !important;
  198. }
  199. /deep/ .uni-table {
  200. //这行代码为间隔效果!!!
  201. border-spacing: 0px 6px !important;
  202. background-color: #fff;
  203. }
  204. /deep/ .table--border {
  205. border: none;
  206. }
  207. /deep/ .uniTr{
  208. background-color: #F2F4F6 !important;
  209. }
  210. .manyBtn{
  211. display: inline-block;
  212. width: 180rpx;
  213. height: 40rpx;
  214. font-size: 20rpx;
  215. line-height: 40rpx;
  216. text-align: center;
  217. border-radius: 20rpx;
  218. background-color: #4DB1B6;
  219. color: white;
  220. margin-left: 10rpx;
  221. }
  222. </style>