equipmentDetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  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>-->
  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" v-if="false">
  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. name:"",
  256. count:"",
  257. info:{},
  258. description: '下次巡检时间:2023/03/30',
  259. list: [{
  260. name: '设备信息'
  261. }, {
  262. name: '设备位置'
  263. }
  264. // , {
  265. // name: '巡检记录',
  266. // },{
  267. // name:'出入库记录'
  268. // },
  269. ],
  270. current: 0,
  271. title:""
  272. }
  273. },
  274. methods: {
  275. onLoad(op){
  276. this.name=op.name
  277. this.getInfo()
  278. },
  279. getInfo(){
  280. uni.showLoading({
  281. title: "加载中",
  282. mask: true,
  283. })
  284. API.deviceDetailsByName({
  285. name:this.name
  286. }).then((res) => {
  287. uni.hideLoading();
  288. this.info=res.data.deviceInfo;
  289. this.count=res.data.count;
  290. }).catch(error => {
  291. uni.showToast({
  292. title: error,
  293. icon: "none"
  294. })
  295. })
  296. },
  297. change(index) {
  298. this.current = index;
  299. }
  300. }
  301. }
  302. </script>
  303. <style lang="scss" scoped>
  304. page{
  305. padding-bottom:100px;
  306. }
  307. /deep/.u-line-1{
  308. overflow: inherit;
  309. }
  310. // 图片
  311. .picture{
  312. width: 100%;
  313. height: 400rpx;
  314. overflow: hidden;
  315. position: relative;
  316. img{
  317. width: 100%;
  318. height: 100%;
  319. }
  320. .amount{
  321. width: 108rpx;
  322. height: 48rpx;
  323. line-height: 48rpx;
  324. border-radius: 4px;
  325. background-color: rgba(0, 0, 0, 1);
  326. color: rgba(255, 255, 255, 1);
  327. font-size: 28rpx;
  328. text-align: center;
  329. font-family: Arial;
  330. position: absolute;
  331. bottom: 48rpx;
  332. right: 32rpx;
  333. }
  334. }
  335. // 信息
  336. .main{
  337. border-radius: 16px 16px 0px 0px;
  338. background-color: #ffffff;
  339. padding-top: 24rpx;
  340. margin-top:-24rpx;
  341. // z-index: 999;
  342. position: relative;
  343. .title{
  344. color: rgba(51, 51, 51, 1);
  345. font-size: 36rpx;
  346. margin-bottom: 24rpx;
  347. padding:0 32rpx;
  348. }
  349. // 标签
  350. .tabs{
  351. position: sticky;
  352. top: 0;
  353. z-index: 9999;
  354. /deep/.u-tab-bar{
  355. background-color: #2A8EFB !important;
  356. bottom:-8rpx;
  357. }
  358. }
  359. .content{
  360. border-top: 1px solid #B7BDBF;
  361. .infos{
  362. padding: 32rpx;
  363. }
  364. .name{
  365. font-size: 32rpx;
  366. margin-bottom: 16rpx;
  367. display: flex;
  368. align-items: center;
  369. color: rgba(51, 51, 51, 1);
  370. .icon{
  371. width: 32rpx;
  372. height: 32rpx;
  373. margin-right: 8rpx;
  374. img{
  375. width: 100%;
  376. height: 100%;
  377. }
  378. }
  379. .text{
  380. line-height: 50rpx;
  381. }
  382. }
  383. .all{
  384. margin-left: auto;
  385. color: rgba(119, 119, 119, 1);
  386. font-size: 24rpx;
  387. }
  388. // 提示
  389. .hint{
  390. /deep/.u-alert-desc{
  391. color: rgba(255, 121, 0, 1);
  392. font-size: 28rpx
  393. }
  394. }
  395. .details{
  396. border-radius: 8px;
  397. background-color: rgba(245, 246, 249, 1);
  398. padding: 24rpx 24rpx 8rpx 24rpx;
  399. display: flex;
  400. justify-content: space-between;
  401. flex-wrap: wrap;
  402. .item{
  403. display: flex;
  404. margin-bottom: 16rpx;
  405. font-size: 24rpx;
  406. width: 45%;
  407. .item-title{
  408. width: 96rpx;
  409. color: rgba(119, 119, 119, 1);
  410. }
  411. @media screen and (max-width: 375px) {
  412. .item-title{
  413. width: 120rpx;
  414. }
  415. }
  416. @media screen and (max-width: 300px) {
  417. .item-title{
  418. width: 130rpx;
  419. }
  420. }
  421. .item-value{
  422. flex: 1;
  423. color: rgba(51, 51, 51, 1);
  424. margin-left: 16rpx;
  425. white-space: nowrap;
  426. overflow: hidden;
  427. text-overflow: ellipsis;
  428. }
  429. }
  430. .location{
  431. color: rgba(51, 51, 51, 1);
  432. padding-bottom: 8rpx;
  433. }
  434. }
  435. }
  436. .inspection-contents{
  437. border-radius: 8px;
  438. background-color: rgba(245, 246, 249, 1);
  439. padding: 24rpx ;
  440. margin-top: 16rpx;
  441. .inspection-title{
  442. display: flex;
  443. justify-content: space-between;
  444. align-items: center;
  445. font-weight: bold;
  446. color: rgba(51, 51, 51, 1);
  447. .state{
  448. width: 80rpx;
  449. height: 48rpx;
  450. line-height: 48rpx;
  451. border-radius: 4px;
  452. background-color: rgba(255, 255, 255, 1);
  453. color: rgba(0, 185, 98, 1);
  454. font-size: 24rpx;
  455. text-align: center;
  456. font-family: Microsoft Yahei;
  457. border: 1px solid rgba(141, 217, 181, 1);
  458. }
  459. }
  460. .inspection-infos{
  461. display: flex;
  462. justify-content: space-between;
  463. align-items: center;
  464. font-size: 24rpx;
  465. margin-top: 8rpx;
  466. line-height: 36rpx;
  467. .inspection-personnel{
  468. display: flex;
  469. align-items: center;
  470. color: rgba(119, 119, 119, 1);
  471. };
  472. .date{
  473. color: rgba(119, 119, 119, 1);
  474. }
  475. }
  476. }
  477. // 出入库记录
  478. .records{
  479. border-radius: 8px;
  480. background-color: rgba(245, 246, 249, 1);
  481. padding: 24rpx 24rpx 8rpx 24rpx ;
  482. margin-top: 16rpx;
  483. .records-title{
  484. font-weight: bold;
  485. color: #333333;
  486. }
  487. .records-infos{
  488. display: flex;
  489. flex-wrap: wrap;
  490. margin-top: 16rpx;
  491. .item{
  492. font-size: 24rpx;
  493. width: 300rpx;
  494. display: flex;
  495. margin-bottom: 16rpx;
  496. color: rgba(119, 119, 119, 1);
  497. }
  498. }
  499. }
  500. }
  501. .highlight{
  502. color:#E60012
  503. }
  504. </style>