equipmentDetail.vue 12 KB

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