equipmentDetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. <template>
  2. <view>
  3. <u-navbar :title="info.title"></u-navbar>
  4. <!-- 图片 -->
  5. <view class="picture">
  6. <img :src="info.imgUrl" alt="">
  7. <view class="amount" v-if="false">
  8. <text>1</text>/
  9. <text>5</text>
  10. </view>
  11. </view>
  12. <!-- 信息 -->
  13. <view class="main">
  14. <view class="title">
  15. {{info.title}}
  16. </view>
  17. <!-- 标签 -->
  18. <view class="tabs " v-if="false">
  19. <u-tabs bar-width="120" inactive-color="#999999" active-color="#000000" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
  20. </view>
  21. <view class="content">
  22. <!-- 设备信息 -->
  23. <view class="infos">
  24. <view class="name">
  25. <view class="icon"><img src="@/assets/img/riLine-robot-line@1x.png" alt=""></view>
  26. <view class="text">
  27. 设备信息
  28. </view>
  29. </view>
  30. <view class="details">
  31. <view class="item">
  32. <view class="item-title">
  33. 规格
  34. </view>
  35. <view class="item-value">
  36. {{info.specifications}}
  37. </view>
  38. </view>
  39. <view class="item" >
  40. <view class="item-title">
  41. 购置时间
  42. </view>
  43. <view class="item-value">
  44. {{info.buyTime}}
  45. </view>
  46. </view>
  47. <view class="item" >
  48. <view class="item-title">
  49. 数量
  50. </view>
  51. <view class="item-value">
  52. {{info.count}}
  53. </view>
  54. </view>
  55. <view class="item" >
  56. <view class="item-title">
  57. 单位
  58. </view>
  59. <view class="item-value">
  60. {{info.unit}}
  61. </view>
  62. </view>
  63. <view class="item" >
  64. <view class="item-title">
  65. 试验时间
  66. </view>
  67. <view class="item-value">
  68. {{info.experimentLastTime}}
  69. </view>
  70. </view>
  71. <view class="item" >
  72. <view class="item-title">
  73. 制造厂家
  74. </view>
  75. <view class="item-value">
  76. {{info.manufactor}}
  77. </view>
  78. </view>
  79. <view class="item" >
  80. <view class="item-title">
  81. 试验周期
  82. </view>
  83. <view class="item-value">
  84. {{info.experimentPeriod?info.experimentPeriod+'年':''}}
  85. </view>
  86. </view>
  87. <view class="item" >
  88. <view class="item-title">
  89. 单价
  90. </view>
  91. <view class="item-value">
  92. {{info.unitPrice?info.unitPrice+'元':'无'}}
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. <!-- 存放地点 -->
  99. <view class="content">
  100. <view class="infos">
  101. <view class="name">
  102. <view class="icon"><img src="@/assets/img/riLine-robot-line@1x.png" alt=""></view>
  103. <view class="text">
  104. 存放地点
  105. </view>
  106. </view>
  107. <view class="details">
  108. <view class="location">
  109. {{info.addressName}}
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. <!-- 巡检记录 -->
  115. <view class="content">
  116. <view class="infos">
  117. <view class="name">
  118. <view class="icon"><img src="@/assets/img/riLine-device-recover-line@1x.png" alt=""></view>
  119. <view class="text">
  120. 巡检记录
  121. </view>
  122. <view class="all">
  123. 全部记录<u-icon name="arrow-right"></u-icon>
  124. </view>
  125. </view>
  126. <!-- 提示 -->
  127. <view class="hint">
  128. <u-alert-tips icon="bell-fill" type="warning" :show-icon="true" :title="title" :description="description"></u-alert-tips>
  129. </view>
  130. <view class="inspection-contents">
  131. <view class="inspection-title">
  132. <view class="text">
  133. 巡检内容名称
  134. </view>
  135. <view class="state">
  136. 合格
  137. </view>
  138. </view>
  139. <view class="inspection-infos">
  140. <view class="inspection-personnel">
  141. <view class="inspection-name">
  142. 巡检人:
  143. </view>
  144. <view class="value">
  145. 孙斌
  146. </view>
  147. </view>
  148. <view class="inspection-date">
  149. 2023/03/15 09:45:21
  150. </view>
  151. </view>
  152. </view>
  153. </view>
  154. </view>
  155. <!-- 出入库记录 -->
  156. <view class="content">
  157. <view class="infos">
  158. <view class="name">
  159. <view class="icon"><img src="@/assets/img/riLine-todo-line@1x.png" alt=""></view>
  160. <view class="text">
  161. 出入库记录
  162. </view>
  163. <view class="all">
  164. 全部记录<u-icon name="arrow-right"></u-icon>
  165. </view>
  166. </view>
  167. <view class="records">
  168. <view class="records-title">
  169. 洪湖华电光伏线路
  170. </view>
  171. <view class="records-infos">
  172. <view class="item">
  173. <view class="item-title">
  174. 借用数量:
  175. </view>
  176. <view class="item-value">
  177. 4
  178. </view>
  179. </view>
  180. <view class="item">
  181. <view class="item-title">
  182. 借出时间:
  183. </view>
  184. <view class="item-value">
  185. 2023.2.13
  186. </view>
  187. </view>
  188. <view class="item">
  189. <view class="item-title">
  190. 借用人:
  191. </view>
  192. <view class="item-value">
  193. 丁文
  194. </view>
  195. </view>
  196. <view class="item">
  197. <view class="item-title">
  198. 归还时间:
  199. </view>
  200. <view class="item-value highlight">
  201. 未归还
  202. </view>
  203. </view>
  204. </view>
  205. </view>
  206. <view class="records">
  207. <view class="records-title">
  208. 仙桃华润恒升线路
  209. </view>
  210. <view class="records-infos">
  211. <view class="item">
  212. <view class="item-title">
  213. 借用数量:
  214. </view>
  215. <view class="item-value">
  216. 4
  217. </view>
  218. </view>
  219. <view class="item">
  220. <view class="item-title">
  221. 借出时间:
  222. </view>
  223. <view class="item-value">
  224. 2023.2.13
  225. </view>
  226. </view>
  227. <view class="item">
  228. <view class="item-title">
  229. 借用人:
  230. </view>
  231. <view class="item-value">
  232. 丁文
  233. </view>
  234. </view>
  235. <view class="item">
  236. <view class="item-title">
  237. 归还时间:
  238. </view>
  239. <view class="item-value">
  240. 2023.4.1
  241. </view>
  242. </view>
  243. </view>
  244. </view>
  245. </view>
  246. </view>
  247. </view>
  248. </view>
  249. </template>
  250. <script>
  251. import * as API from '@/apis/pagejs/index.js'
  252. export default {
  253. data() {
  254. return {
  255. info:{},
  256. description: '下次巡检时间:2023/03/30',
  257. list: [{
  258. name: '设备信息'
  259. }, {
  260. name: '设备位置'
  261. }
  262. // , {
  263. // name: '巡检记录',
  264. // },{
  265. // name:'出入库记录'
  266. // },
  267. ],
  268. current: 0,
  269. title:""
  270. }
  271. },
  272. methods: {
  273. onLoad(op){
  274. this.name=op.name
  275. this.getInfo()
  276. },
  277. getInfo(){
  278. uni.showLoading({
  279. title: "加载中",
  280. mask: true,
  281. })
  282. API.deviceDetailsByName({
  283. name:this.name
  284. }).then((res) => {
  285. uni.hideLoading();
  286. this.info=res.data.deviceInfo;
  287. }).catch(error => {
  288. uni.showToast({
  289. title: error,
  290. icon: "none"
  291. })
  292. })
  293. },
  294. change(index) {
  295. this.current = index;
  296. }
  297. }
  298. }
  299. </script>
  300. <style lang="scss" scoped>
  301. page{
  302. padding-bottom:100px;
  303. }
  304. /deep/.u-line-1{
  305. overflow: inherit;
  306. }
  307. // 图片
  308. .picture{
  309. width: 100%;
  310. height: 400rpx;
  311. overflow: hidden;
  312. position: relative;
  313. img{
  314. width: 100%;
  315. height: 100%;
  316. }
  317. .amount{
  318. width: 108rpx;
  319. height: 48rpx;
  320. line-height: 48rpx;
  321. border-radius: 4px;
  322. background-color: rgba(0, 0, 0, 1);
  323. color: rgba(255, 255, 255, 1);
  324. font-size: 28rpx;
  325. text-align: center;
  326. font-family: Arial;
  327. position: absolute;
  328. bottom: 48rpx;
  329. right: 32rpx;
  330. }
  331. }
  332. // 信息
  333. .main{
  334. border-radius: 16px 16px 0px 0px;
  335. background-color: #ffffff;
  336. padding-top: 24rpx;
  337. margin-top:-24rpx;
  338. z-index: 999;
  339. position: relative;
  340. .title{
  341. color: rgba(51, 51, 51, 1);
  342. font-size: 36rpx;
  343. margin-bottom: 24rpx;
  344. padding:0 32rpx;
  345. }
  346. // 标签
  347. .tabs{
  348. position: sticky;
  349. top: 0;
  350. z-index: 9999;
  351. /deep/.u-tab-bar{
  352. background-color: #2A8EFB !important;
  353. bottom:-8rpx;
  354. }
  355. }
  356. .content{
  357. border-top: 1px solid #B7BDBF;
  358. .infos{
  359. padding: 32rpx;
  360. }
  361. .name{
  362. font-size: 32rpx;
  363. margin-bottom: 16rpx;
  364. display: flex;
  365. align-items: center;
  366. color: rgba(51, 51, 51, 1);
  367. .icon{
  368. width: 32rpx;
  369. height: 32rpx;
  370. margin-right: 8rpx;
  371. img{
  372. width: 100%;
  373. height: 100%;
  374. }
  375. }
  376. .text{
  377. line-height: 50rpx;
  378. }
  379. }
  380. .all{
  381. margin-left: auto;
  382. color: rgba(119, 119, 119, 1);
  383. font-size: 24rpx;
  384. }
  385. // 提示
  386. .hint{
  387. /deep/.u-alert-desc{
  388. color: rgba(255, 121, 0, 1);
  389. font-size: 28rpx
  390. }
  391. }
  392. .details{
  393. border-radius: 8px;
  394. background-color: rgba(245, 246, 249, 1);
  395. padding: 24rpx 24rpx 8rpx 24rpx;
  396. display: flex;
  397. justify-content: space-between;
  398. flex-wrap: wrap;
  399. .item{
  400. display: flex;
  401. margin-bottom: 16rpx;
  402. font-size: 24rpx;
  403. width: 45%;
  404. .item-title{
  405. width: 96rpx;
  406. color: rgba(119, 119, 119, 1);
  407. }
  408. @media screen and (max-width: 375px) {
  409. .item-title{
  410. width: 120rpx;
  411. }
  412. }
  413. @media screen and (max-width: 300px) {
  414. .item-title{
  415. width: 130rpx;
  416. }
  417. }
  418. .item-value{
  419. flex: 1;
  420. color: rgba(51, 51, 51, 1);
  421. margin-left: 16rpx;
  422. white-space: nowrap;
  423. overflow: hidden;
  424. text-overflow: ellipsis;
  425. }
  426. }
  427. .location{
  428. color: rgba(51, 51, 51, 1);
  429. padding-bottom: 8rpx;
  430. }
  431. }
  432. }
  433. .inspection-contents{
  434. border-radius: 8px;
  435. background-color: rgba(245, 246, 249, 1);
  436. padding: 24rpx ;
  437. margin-top: 16rpx;
  438. .inspection-title{
  439. display: flex;
  440. justify-content: space-between;
  441. align-items: center;
  442. font-weight: bold;
  443. color: rgba(51, 51, 51, 1);
  444. .state{
  445. width: 80rpx;
  446. height: 48rpx;
  447. line-height: 48rpx;
  448. border-radius: 4px;
  449. background-color: rgba(255, 255, 255, 1);
  450. color: rgba(0, 185, 98, 1);
  451. font-size: 24rpx;
  452. text-align: center;
  453. font-family: Microsoft Yahei;
  454. border: 1px solid rgba(141, 217, 181, 1);
  455. }
  456. }
  457. .inspection-infos{
  458. display: flex;
  459. justify-content: space-between;
  460. align-items: center;
  461. font-size: 24rpx;
  462. margin-top: 8rpx;
  463. line-height: 36rpx;
  464. .inspection-personnel{
  465. display: flex;
  466. align-items: center;
  467. color: rgba(119, 119, 119, 1);
  468. };
  469. .date{
  470. color: rgba(119, 119, 119, 1);
  471. }
  472. }
  473. }
  474. // 出入库记录
  475. .records{
  476. border-radius: 8px;
  477. background-color: rgba(245, 246, 249, 1);
  478. padding: 24rpx 24rpx 8rpx 24rpx ;
  479. margin-top: 16rpx;
  480. .records-title{
  481. font-weight: bold;
  482. color: #333333;
  483. }
  484. .records-infos{
  485. display: flex;
  486. flex-wrap: wrap;
  487. margin-top: 16rpx;
  488. .item{
  489. font-size: 24rpx;
  490. width: 300rpx;
  491. display: flex;
  492. margin-bottom: 16rpx;
  493. color: rgba(119, 119, 119, 1);
  494. }
  495. }
  496. }
  497. }
  498. .highlight{
  499. color:#E60012
  500. }
  501. </style>