infoPage.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. <template>
  2. <view class="equipmentInformationInfoPage">
  3. <view class="info-max-box">
  4. <img class="left-img" src="">
  5. <view class="right-box">
  6. <view>设备分类:</view>
  7. <view>设备名称:</view>
  8. <view>设备编号:</view>
  9. <view>设备状态:</view>
  10. </view>
  11. </view>
  12. <view class="text-max-box">
  13. <img src="">
  14. <view>类型</view>
  15. <view>类型</view>
  16. </view>
  17. <view class="text-max-box">
  18. <img src="">
  19. <view>品牌</view>
  20. <view>品牌</view>
  21. </view>
  22. <view class="text-max-box">
  23. <img src="">
  24. <view>设备原值(元)</view>
  25. <view>500,000</view>
  26. </view>
  27. <view class="text-title-box">参数用途</view>
  28. <view class="text-max-box">
  29. <img src="">
  30. <view>设备用途</view>
  31. <view class="colorA" @click="lookText(1)">查看</view>
  32. </view>
  33. <view class="text-max-box">
  34. <img src="">
  35. <view>技术参数</view>
  36. <view class="colorA" @click="lookText(2)">查看</view>
  37. </view>
  38. <view class="text-max-box">
  39. <img src="">
  40. <view>备注</view>
  41. <view class="colorA" @click="lookText(3)">查看</view>
  42. </view>
  43. <view class="text-title-box">设备归属</view>
  44. <view class="text-max-box">
  45. <img src="">
  46. <view>设备管理员</view>
  47. <view>设备管理员</view>
  48. </view>
  49. <view class="text-max-box">
  50. <img src="">
  51. <view>管理部门</view>
  52. <view>管理部门</view>
  53. </view>
  54. <view class="text-max-box">
  55. <img src="">
  56. <view>存放位置</view>
  57. <view>存放位置</view>
  58. </view>
  59. <view class="text-title-box">厂家产地</view>
  60. <view class="text-max-box">
  61. <img src="">
  62. <view>单位</view>
  63. <view>单位</view>
  64. </view>
  65. <view class="text-max-box">
  66. <img src="">
  67. <view>生产厂家</view>
  68. <view>生产厂家</view>
  69. </view>
  70. <view class="text-max-box">
  71. <img src="">
  72. <view>产地</view>
  73. <view>产地</view>
  74. </view>
  75. <view class="bottom-button" @click="onShade()">登记使用信息</view>
  76. <view class="shade-max-big-box" v-if="shadeType == 1||shadeType == 2||shadeType == 3||shadeType == 4">
  77. <view class="shade-top-flex" @click="offShade()"></view>
  78. <view class="shade-big-box">
  79. <view class="shade-title-box" v-if="shadeType == 1||shadeType == 2||shadeType == 3">登记使用信息</view>
  80. <view class="shade-title-box" v-if="shadeType == 4">{{shadeDataD.data1}}</view>
  81. <view class="shade-box" v-if="shadeType == 1">
  82. <view class="shade-text-box">
  83. <view>使用人</view>
  84. <view>{{shadeDataA.data1}}</view>
  85. </view>
  86. <view class="shade-text-box">
  87. <view>使用类型</view>
  88. <view>{{shadeDataA.data2}}</view>
  89. </view>
  90. <view class="shade-text-box">
  91. <view>开机时间</view>
  92. <view>{{shadeDataA.data3}}</view>
  93. </view>
  94. <view class="shade-text-box">
  95. <view>关机时间</view>
  96. <view>
  97. <uni-datetime-picker v-model="shadeDataA.data4">{{shadeDataA.data4}}</uni-datetime-picker>
  98. </view>
  99. </view>
  100. <view class="shade-text-box">
  101. <view>使用总时长</view>
  102. <view>{{shadeDataA.data5}}</view>
  103. </view>
  104. <view class="shade-button">确定</view>
  105. </view>
  106. <view class="shade-box" v-if="shadeType == 2">
  107. <view class="shade-text-box">
  108. <view>使用人</view>
  109. <view>{{shadeDataB.data1}}</view>
  110. </view>
  111. <view class="shade-text-box">
  112. <view>使用类型</view>
  113. <view>{{shadeDataB.data2}}</view>
  114. </view>
  115. <view class="shade-text-box">
  116. <view>开机时间</view>
  117. <view>{{shadeDataB.data3}}</view>
  118. </view>
  119. <view class="shade-text-box">
  120. <view>关机时间</view>
  121. <view>{{shadeDataB.data4}}</view>
  122. </view>
  123. <view class="shade-text-box">
  124. <view>使用总时长</view>
  125. <view>{{shadeDataB.data5}}</view>
  126. </view>
  127. <view class="shade-button">确定</view>
  128. </view>
  129. <view class="shade-box-c" v-if="shadeType == 3">
  130. <view class="shade-text-title">当前设备已被【{{shadeDataC.data1}}】登记使用,</view>
  131. <view class="shade-text-title">开机时间:{{shadeDataC.data2}}</view>
  132. <view class="shade-text-title">如有疑问请联系:{{shadeDataC.data3}}</view>
  133. </view>
  134. <view class="shade-box" v-if="shadeType == 4">
  135. <view class="text-box">
  136. {{shadeDataD.data2}}
  137. </view>
  138. </view>
  139. </view>
  140. </view>
  141. </view>
  142. </template>
  143. <script>
  144. import {
  145. mpDeviceDetail,
  146. } from '@/pages_equipmentUtilization/api/index.js'
  147. export default {
  148. props: {
  149. equipmentId: {},
  150. },
  151. data() {
  152. return {
  153. shadeType:0,
  154. shadeDataA:{
  155. data1:'张工',
  156. data2:'自用',
  157. data3:'2026-01-25 15:30',
  158. data4:'2026-01-25 15:30',
  159. data5:'3天2小时15分',
  160. },
  161. shadeDataB:{
  162. data1:'张工',
  163. data2:'自用',
  164. data3:'2026-01-25 15:30',
  165. data4:'2026-01-25 15:30',
  166. data5:'3天2小时15分',
  167. },
  168. shadeDataC:{
  169. data1:'张工',
  170. data2:'2026-01-25 15:30',
  171. data3:'010-88888888',
  172. },
  173. shadeDataD:{
  174. data1:'张工',
  175. data2:'2026-01-25 15:30',
  176. },
  177. }
  178. },
  179. mounted() {
  180. this.mpDeviceDetail(this.equipmentId);
  181. },
  182. methods: {
  183. //获取设备信息
  184. async mpDeviceDetail(id) {
  185. let self = this;
  186. const {
  187. data
  188. } = await mpDeviceDetail({id:id});
  189. if (data.code == 200) {
  190. }
  191. },
  192. lookText(type){
  193. if(type == 1){
  194. this.$set(this,'shadeDataD',{
  195. data1:'设备用途',
  196. data2:'设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途设备用途',
  197. });
  198. }else if(type == 2){
  199. this.$set(this,'shadeDataD',{
  200. data1:'技术参数',
  201. data2:'技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数技术参数',
  202. });
  203. }else if(type == 3){
  204. this.$set(this,'shadeDataD',{
  205. data1:'备注',
  206. data2:'备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注备注',
  207. });
  208. }
  209. this.$set(this,'shadeType',4);
  210. },
  211. onShade(){
  212. //判断 登记时1 退订2 已占用3
  213. this.$set(this,'shadeType',1);
  214. },
  215. offShade(){
  216. this.$set(this,'shadeType',0);
  217. },
  218. },
  219. }
  220. </script>
  221. <style lang="stylus" scoped>
  222. .equipmentInformationInfoPage {
  223. height: 100%;
  224. flex:1;
  225. display:flex;
  226. flex-direction:column;
  227. background-color: #fff;
  228. overflow: scroll;
  229. .info-max-box{
  230. display: flex;
  231. .left-img{
  232. width:200rpx;
  233. height:200rpx;
  234. display: inline-block;
  235. }
  236. .right-box{
  237. flex:1;
  238. }
  239. }
  240. .text-max-box{
  241. display: flex;
  242. border-bottom: 1rpx solid #f2f2f2;
  243. line-height:80rpx;
  244. padding: 0 40rpx;
  245. img{
  246. width:40rpx;
  247. height:40rpx;
  248. display: inline-block;
  249. }
  250. view:nth-child(2){
  251. flex:1;
  252. }
  253. view:nth-child(3){
  254. }
  255. .colorA{
  256. color:#0183FA;
  257. }
  258. }
  259. .text-title-box{
  260. line-height:80rpx;
  261. background-color: #f2f2f2;
  262. padding: 0 30rpx;
  263. }
  264. .bottom-button{
  265. width:300rpx;
  266. line-height:80rpx;
  267. text-align: center;
  268. margin:60rpx auto;
  269. color:#fff;
  270. background-color: #0183FA;
  271. border-radius:6rpx;
  272. }
  273. .shade-max-big-box{
  274. position: absolute;
  275. top:0;
  276. left:0;
  277. width:100%;
  278. height:100%;
  279. background-color: rgba(0,0,0,0.3)
  280. display: flex;
  281. flex-direction: column;
  282. .shade-top-flex{
  283. flex:1;
  284. }
  285. .shade-big-box{
  286. background-color: #fff;
  287. .shade-title-box{
  288. font-weight:900;
  289. padding-right:20rpx;
  290. width:300rpx;
  291. border-bottom-right-radius: 40rpx
  292. background-color: #0183FA;
  293. color:#fff;
  294. text-align: center;
  295. line-height:60rpx;
  296. }
  297. .shade-box{
  298. padding:20rpx 0 100rpx;
  299. .shade-text-box{
  300. display: flex;
  301. border-bottom:1rpx solid #f2f2f2;
  302. line-height:80rpx;
  303. padding:0 30rpx;
  304. view:nth-child(1){
  305. flex:1;
  306. }
  307. view:nth-child(1){
  308. flex:3;
  309. }
  310. }
  311. .shade-button{
  312. width:300rpx;
  313. line-height:80rpx;
  314. text-align: center;
  315. background-color: #0183FA;
  316. border-radius:8rpx;
  317. color:#fff;
  318. margin:40rpx auto 0;
  319. }
  320. .text-box{
  321. padding:60rpx 40rpx 200rpx;
  322. }
  323. }
  324. .shade-box-c{
  325. padding:120rpx 0 200rpx;
  326. .shade-text-title{
  327. text-align-last: center;
  328. line-height: 60rpx;
  329. }
  330. }
  331. }
  332. }
  333. }
  334. </style>