equipmentDetail.vue 11 KB

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