fireStation_details.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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. console.log('option: ', that.tableData);
  106. },
  107. methods: {
  108. // 传递当前页面数据到 ‘修改信息’
  109. gotoEditStation(val) {
  110. uni.navigateTo({
  111. url: '/pagesA/fire/fire_station/edit_fireStation/edit_fireStation',
  112. events: {
  113. // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
  114. acceptDataFromOpenedPage: function(val) {
  115. this.tableData = val;
  116. }
  117. },
  118. success: function(res) {
  119. // 通过eventChannel向被打开页面传送数据
  120. res.eventChannel.emit('acceptDataFromOpenerPage', val);
  121. }
  122. });
  123. },
  124. // 值班
  125. goWorkNum(){
  126. uni.navigateTo({
  127. url:"/pagesA/fire/fire_station/people_fireStation/people_fireStation?addId=1"
  128. })
  129. },
  130. // 负责人
  131. goBigNum(){
  132. uni.navigateTo({
  133. url:"/pagesA/fire/fire_station/people_fireStation/people_fireStation?addId=2"
  134. })
  135. },
  136. // 普通人
  137. goPeopleMes(){
  138. uni.navigateTo({
  139. url:"/pagesA/fire/fire_station/people_fireStation/people_fireStation?addId=0"
  140. })
  141. }
  142. }
  143. };
  144. </script>
  145. <style lang="scss" scoped>
  146. page {
  147. background-color: #fff !important;
  148. }
  149. .buju {
  150. margin: 40rpx 0;
  151. }
  152. .container {
  153. border-radius: 30px 30px 0px 0px;
  154. background: #fff;
  155. /*#ifdef H5*/
  156. margin-top: 50rpx;
  157. /* #endif */
  158. /* #ifdef MP-WEIXIN*/
  159. margin-top: 100rpx;
  160. /* #endif */
  161. z-index: 999999999999999999;
  162. position: relative;
  163. }
  164. .cont {}
  165. .weiwan {
  166. color: #d51a52;
  167. background: rgba(213, 26, 82, 0.2);
  168. padding: 5rpx 20rpx;
  169. border-radius: 2px;
  170. border: 1px solid #d51a52;
  171. }
  172. .yiwan {
  173. color: #4cb2b6;
  174. background: rgba(76, 178, 182, 0.2);
  175. padding: 5rpx 20rpx;
  176. border-radius: 2px;
  177. border: 1px solid #4cb2b6;
  178. }
  179. .miaoshu {
  180. margin-right: 20rpx;
  181. color: #274647;
  182. font-weight: 600;
  183. }
  184. /deep/.uni-table-tr,
  185. /deep/.table--stripe[data-v-6cd49106] .uni-table-tr:nth-child(2n + 3),
  186. /deep/.table--stripe.data-v-6cd49106 .uni-table-tr:nth-child(2n + 3),/deep/.table--stripe {
  187. background-color: #F2F4F6;
  188. }
  189. /deep/.table--border[data-v-511e81f9],
  190. /deep/.table--border.data-v-511e81f9,/deep/.table--border {
  191. border-right: 2px #E5E5E5 solid;
  192. border-top-left-radius: 10px !important;
  193. border-bottom-left-radius: 10px !important;
  194. }
  195. /deep/.table--border[data-v-321f8e79],
  196. /deep/.table--border.data-v-321f8e79,/deep/.table--borde{
  197. border-top-right-radius: 10px !important;
  198. border-bottom-right-radius: 10px !important;
  199. }
  200. /deep/ .uni-table {
  201. //这行代码为间隔效果!!!
  202. border-spacing: 0px 6px !important;
  203. background-color: #fff;
  204. }
  205. /deep/ .table--border {
  206. border: none;
  207. }
  208. /deep/ .uniTr{
  209. background-color: #F2F4F6 !important;
  210. }
  211. .manyBtn{
  212. display: inline-block;
  213. width: 180rpx;
  214. height: 40rpx;
  215. font-size: 20rpx;
  216. line-height: 40rpx;
  217. text-align: center;
  218. border-radius: 20rpx;
  219. background-color: #4DB1B6;
  220. color: white;
  221. margin-left: 10rpx;
  222. }
  223. </style>