detail.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <template>
  2. <view class="page-body">
  3. <page-header :name="'智能采煤'" :bg="'#1560e0'" :showLeft="true" @goBack="goBack()"></page-header>
  4. <view class="scroll-wrap">
  5. <view class="basic-info-wrap">
  6. <view class="monitor-wrap">
  7. <view class="left">
  8. <image class="icon" src="@/static/jg-icon.png" />
  9. <view class="tip">
  10. 综采动态监视
  11. </view>
  12. </view>
  13. <image class="opera" src="@/static/right-arrow.png" />
  14. </view>
  15. <view class="data-wrap">
  16. <view v-for="(item, index) in basicList" :key="index" class="data-item-wrap">
  17. <view class="title">{{ item.name }}</view>
  18. <view class="data">{{ item.params }}</view>
  19. </view>
  20. </view>
  21. <view class="radius-wrap"></view>
  22. </view>
  23. <view class="detail-info-wrap">
  24. <page-card :name="'乳化泵信息'">
  25. <template v-slot:content>
  26. <view class="info-card-wrap">
  27. <view class="status-tip-wrap">
  28. <status-tip class="item" v-for="(item, index) in rhbList" :key="index" :name="item.name"
  29. :status="item.status" :tip="item.status ? '运行' : '停止'"></status-tip>
  30. </view>
  31. </view>
  32. </template>
  33. </page-card>
  34. <page-card :name="'采煤机信息'" style="margin-top: 30rpx;">
  35. <template v-slot:content>
  36. <view class="info-card-wrap">
  37. <view class="info-wrap">
  38. <view v-for="(item, index) in cardList" :key="index" class="item-wrap">
  39. <view class="title">
  40. {{ item.name }}
  41. </view>
  42. <view class="content">
  43. {{ item.params }}
  44. </view>
  45. </view>
  46. </view>
  47. <cmj-animation></cmj-animation>
  48. </view>
  49. </template>
  50. </page-card>
  51. <page-card :name="'顶板压力'" style="margin-top: 30rpx;">
  52. <template v-slot:content>
  53. <view class="pressure-wrap">
  54. <bar-chart :barType="'column'" :optSet="optLine" :data="chartData" :barHeight="'293rpx'"></bar-chart>
  55. </view>
  56. </template>
  57. </page-card>
  58. </view>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. export default {
  64. data() {
  65. return {
  66. basicList: [{
  67. name: '设计可采长度',
  68. params: '2159m'
  69. },{
  70. name: '开采煤层',
  71. params: '7'
  72. },{
  73. name: '面积',
  74. params: '450301㎡'
  75. },{
  76. name: '煤层总厚',
  77. params: '3.9m'
  78. },{
  79. name: '工作面采高',
  80. params: '2.6m'
  81. },{
  82. name: '支架数',
  83. params: '130'
  84. },{
  85. name: '循环刀数',
  86. params: '12'
  87. },{
  88. name: '回采月份',
  89. params: '2023.11'
  90. }],
  91. rhbList: [{ // 乳化泵信息
  92. name: '1#液泵',
  93. status: 0
  94. }, {
  95. name: '乳化增压泵',
  96. status: 1
  97. }, {
  98. name: '2#液泵',
  99. status: 0
  100. }, {
  101. name: '1#水泵',
  102. status: 0
  103. }, {
  104. name: '3#液泵',
  105. status: 0
  106. }, {
  107. name: '2#水泵',
  108. status: 0
  109. }, ],
  110. chartData: {}, // 柱状图数据
  111. optLine: { // 柱状图配置
  112. dataLabel: false, // 不显示数据标签
  113. color: ['#3495FA'], // 柱状图颜色
  114. legend: {
  115. show: false, // 不显示底部标签
  116. },
  117. xAxis: {
  118. axisLineColor: '#E5E5E5', // x轴线的颜色
  119. fontColor: '#A9A9A9' // x轴字体的颜色
  120. },
  121. yAxis: {
  122. gridColor: '#E5E5E5', // 横向数据标线的颜色
  123. showTitle: true, // 是否显示标题
  124. data: [{
  125. title: 'Mpa', // 标题内容
  126. titleFontColor: '#A9A9A9', // 标题字体颜色
  127. titleOffsetY: -5, // 标题纵向偏移量
  128. titleOffsetX: -5, // 标题横向偏移量
  129. axisLineColor: '#E5E5E5', // y轴线的颜色
  130. fontColor: '#A9A9A9' // y轴字体的颜色
  131. }]
  132. },
  133. extra: {
  134. column: {
  135. width: 15
  136. }
  137. }
  138. },
  139. cardList: [{
  140. name: '牵引速度',
  141. params: '0m/min'
  142. },{
  143. name: '俯仰角',
  144. params: '0°'
  145. },{
  146. name: '瓦斯浓度',
  147. params: '0°'
  148. },{
  149. name: '倾角',
  150. params: '0°'
  151. }]
  152. }
  153. },
  154. onLoad() {
  155. this.getServerData()
  156. },
  157. methods: {
  158. getServerData() { // 获取柱状图数据
  159. let res = {
  160. categories: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"],
  161. series: [{
  162. name: '顶板压力',
  163. data: [35, 36, 31, 33, 13, 34, 35, 36, 38, 41, 37, 45, 54, 46, 50]
  164. }]
  165. };
  166. this.chartData = JSON.parse(JSON.stringify(res));
  167. },
  168. goBack() { // 返回上一頁面
  169. uni.navigateBack()
  170. }
  171. }
  172. }
  173. </script>
  174. <style scoped lang="scss">
  175. .page-body {
  176. .scroll-wrap {
  177. height: calc(100vh - 85rpx);
  178. overflow: scroll;
  179. .basic-info-wrap {
  180. position: relative;
  181. height: 520rpx;
  182. padding: 25rpx 35rpx 99rpx;
  183. background-color: #00A1E9;
  184. background: url(../../../../static/page_bg.png);
  185. background-size: 100%;
  186. .monitor-wrap {
  187. display: flex;
  188. align-items: center;
  189. justify-content: space-between;
  190. padding: 44rpx 36rpx 44rpx 52rpx;
  191. height: 120rpx;
  192. width: 100%;
  193. background: url('../../../../static/opera.png');
  194. background-size: 100% 120rpx;
  195. background-repeat: no-repeat;
  196. margin-bottom: 60rpx;
  197. .left {
  198. display: flex;
  199. align-items: center;
  200. .icon {
  201. width: 37rpx;
  202. height: 36rpx;
  203. margin-right: 21rpx;
  204. }
  205. .tip {
  206. font-size: 34rpx;
  207. font-weight: 700;
  208. color: #fff;
  209. }
  210. }
  211. .opera {
  212. width: 16rpx;
  213. height: 29rpx;
  214. }
  215. }
  216. .data-wrap {
  217. display: flex;
  218. flex-wrap: wrap;
  219. .data-item-wrap {
  220. width: 25%;
  221. padding: 9rpx 0;
  222. min-height: 81rpx;
  223. text-align: center;
  224. margin-top: 60rpx;
  225. border-right: 1px solid #FFFFFF;
  226. .title {
  227. font-size: 22rpx;
  228. color: #FFFFFF;
  229. margin-bottom: 14rpx;
  230. }
  231. .data {
  232. font-weight: 700;
  233. font-size: 32rpx;
  234. color: #FFF600;
  235. }
  236. }
  237. .data-item-wrap:nth-child(-n+4){
  238. margin-top: 0;
  239. }
  240. .data-item-wrap:nth-child(4n) {
  241. border: none;
  242. }
  243. }
  244. .radius-wrap {
  245. position: absolute;
  246. left: 0;
  247. bottom: 0;
  248. width: 100vw;
  249. height: 30rpx;
  250. background-color: #fff;
  251. border-radius: 35rpx 35rpx 0 0;
  252. }
  253. }
  254. .detail-info-wrap {
  255. padding: 40rpx 35rpx;
  256. .info-card-wrap {
  257. padding: 35rpx 55rpx;
  258. .status-tip-wrap {
  259. display: flex;
  260. flex-wrap: wrap;
  261. .item {
  262. width: 50%;
  263. font-size: 26rpx;
  264. margin-top: 48rpx;
  265. /deep/ .name {
  266. color: #8D8D8D;
  267. width: 130rpx;
  268. margin-right: 20rpx;
  269. }
  270. }
  271. .item:nth-child(-n+2) {
  272. margin-top: 0;
  273. }
  274. }
  275. .info-wrap {
  276. display: flex;
  277. flex-wrap: wrap;
  278. .item-wrap {
  279. width: 50%;
  280. display: flex;
  281. font-size: 26rpx;
  282. margin-top: 53rpx;
  283. .title {
  284. width: 104rpx;
  285. margin-right: 58rpx;
  286. font-weight: 700;
  287. color: #8D8D8D;
  288. }
  289. .content {
  290. color: #000000;
  291. }
  292. }
  293. .item-wrap:nth-child(-n+2) {
  294. margin-top: 0;
  295. }
  296. }
  297. /deep/ .animation-wrap {
  298. margin-top: 30rpx;
  299. }
  300. }
  301. .pressure-wrap {
  302. padding: 25rpx 30rpx;
  303. }
  304. }
  305. }
  306. }
  307. </style>