equipmentControlOverdue.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. <!-- 数据看板-设备管控-超期服役排行 -->
  2. <template>
  3. <view class="equipmentControl">
  4. <!-- 超期服役排行 -->
  5. <view class="table" v-if="pageType==1">
  6. <view class="table-border">
  7. <view class="table-th">
  8. <view class="table-th-li">
  9. <view>排行</view>
  10. <view>学院单位</view>
  11. <view>设备总数(台)</view>
  12. <view>超期服役数(台)</view>
  13. </view>
  14. </view>
  15. <view class="table-tb">
  16. <view class="table-tb-li" v-for="(item,index) in dataList" :key="index">
  17. <view>
  18. <text :class="index==0?'sortOne':(index==1?'sortTow':(index==2?'sortThree':'sortFive'))">{{index+1}}</text>
  19. </view>
  20. <view>{{item.data2}}</view>
  21. <view>{{item.data2}}</view>
  22. <view>{{item.data2}}</view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <!-- 设备使用寿命 -->
  28. <view class="table-tow" v-if="pageType==2">
  29. <view class="table-border">
  30. <view class="table-th">
  31. <view class="table-th-li">
  32. <view>学院单位</view>
  33. <view>5年内(台)</view>
  34. <view>10年内(台)</view>
  35. <view>12年内(台)</view>
  36. <view>20年内(台)</view>
  37. </view>
  38. </view>
  39. <view class="table-tb">
  40. <view class="table-tb-li" v-for="(item,index) in dataList" :key="index">
  41. <view>{{item.data1}}</view>
  42. <view>{{item.data2}}</view>
  43. <view>{{item.data2}}</view>
  44. <view>{{item.data2}}</view>
  45. <view>{{item.data2}}</view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import {
  54. config
  55. } from '@/api/request/config.js'
  56. import {
  57. } from '@/pages_basics/api/index.js'
  58. export default {
  59. name: "equipmentControl",
  60. components: {
  61. },
  62. data() {
  63. return {
  64. pageType: 1,
  65. // 查询参数
  66. queryParams: {
  67. page: 1,
  68. pageSize: 10,
  69. },
  70. dataList: [{
  71. data1: '植物保护',
  72. data2: '499',
  73. data3: '47',
  74. data4: '220',
  75. data5: '137',
  76. },
  77. {
  78. data1: '资源环境',
  79. data2: '199',
  80. data3: '7',
  81. data4: '120',
  82. data5: '37',
  83. },
  84. {
  85. data1: '生命科学',
  86. data2: '299',
  87. data3: '71',
  88. data4: '10',
  89. data5: '37',
  90. },
  91. {
  92. data1: '资源环境',
  93. data2: '199',
  94. data3: '7',
  95. data4: '120',
  96. data5: '37',
  97. },
  98. {
  99. data1: '生命科学',
  100. data2: '299',
  101. data3: '71',
  102. data4: '10',
  103. data5: '37',
  104. },
  105. ],
  106. total: 0,
  107. }
  108. },
  109. onLoad(option) {
  110. if (option.pageType) {
  111. this.pageType = option.pageType;
  112. if (this.pageType == 1) {
  113. uni.setNavigationBarTitle({
  114. title: '超期服役排行'
  115. })
  116. }else if(this.pageType == 2){
  117. uni.setNavigationBarTitle({
  118. title:'设备使用寿命统计'
  119. })
  120. }
  121. }
  122. },
  123. created() {
  124. },
  125. beforeMount() {
  126. },
  127. mounted() {},
  128. methods: {
  129. dateClick(index) {
  130. this.dateIndex = index;
  131. },
  132. },
  133. }
  134. </script>
  135. <style lang="stylus" scoped>
  136. .equipmentControl {
  137. height: 100%;
  138. width: 100%;
  139. background: #363744;
  140. box-sizing: border-box;
  141. .table {
  142. width: 750rpx;
  143. .table-border {
  144. overflow: auto;
  145. .table-th {
  146. width: 750rpx;
  147. height: 80rpx;
  148. background: rgba(162, 162, 162, 0.2);
  149. padding: 0 30rpx;
  150. box-sizing: border-box;
  151. .table-th-li {
  152. height: 80rpx;
  153. display: flex;
  154. justify-content: flex-start;
  155. >view {
  156. font-weight: 400;
  157. font-size: 30rpx;
  158. color: #FFFFFF;
  159. line-height: 80rpx;
  160. text-align: center;
  161. margin-right: 18rpx;
  162. width: 120rpx;
  163. overflow: hidden;
  164. text-overflow: ellipsis;
  165. white-space: nowrap;
  166. }
  167. >view:nth-of-type(1) {
  168. width: 90rpx;
  169. text-align: left;
  170. }
  171. >view:nth-of-type(2) {
  172. width: 168rpx;
  173. }
  174. >view:nth-of-type(3) {
  175. width: 190rpx;
  176. }
  177. >view:nth-of-type(4) {
  178. width: 300rpx;
  179. }
  180. }
  181. }
  182. .table-tb {
  183. width: 750rpx;
  184. border-bottom: 1rpx dashed rgba(216, 216, 216, 0.2);
  185. background: #3E414F;
  186. padding: 0 30rpx;
  187. box-sizing: border-box;
  188. .table-tb-li {
  189. height: 80rpx;
  190. border-bottom: 1rpx dashed rgba(216, 216, 216, 0.2);
  191. display: flex;
  192. justify-content: flex-start;
  193. >view {
  194. font-weight: 400;
  195. font-size: 28rpx;
  196. color: #FFFFFF;
  197. line-height: 80rpx;
  198. text-align: center;
  199. margin-right: 38rpx;
  200. width: 120rpx;
  201. overflow: hidden;
  202. text-overflow: ellipsis;
  203. white-space: nowrap;
  204. }
  205. >view:nth-of-type(1) {
  206. width: 90rpx;
  207. text-align: left;
  208. }
  209. >view:nth-of-type(2) {
  210. width: 168rpx;
  211. }
  212. >view:nth-of-type(3) {
  213. width: 190rpx;
  214. }
  215. >view:nth-of-type(4) {
  216. width: 300rpx;
  217. }
  218. }
  219. }
  220. }
  221. }
  222. .sortOne {
  223. display: inline-block;
  224. width: 40rpx;
  225. height: 40rpx;
  226. padding: 4rpx;
  227. box-sizing: border-box;
  228. background: rgba(255, 0, 0, 0.2);
  229. font-weight: 400;
  230. font-size: 28rpx;
  231. color: #FF0000;
  232. line-height: 40rpx;
  233. text-align: center;
  234. border-radius: 20rpx;
  235. }
  236. .sortTow {
  237. display: inline-block;
  238. width: 40rpx;
  239. height: 40rpx;
  240. padding: 4rpx;
  241. box-sizing: border-box;
  242. background: rgba(255, 153, 0, 0.2);
  243. font-weight: 400;
  244. font-size: 28rpx;
  245. color: #FF9900;
  246. line-height: 40rpx;
  247. text-align: center;
  248. border-radius: 20rpx;
  249. }
  250. .sortThree {
  251. display: inline-block;
  252. width: 40rpx;
  253. height: 40rpx;
  254. padding: 4rpx;
  255. box-sizing: border-box;
  256. background: rgba(255, 242, 0, 0.2);
  257. font-weight: 400;
  258. font-size: 28rpx;
  259. color: #FFF200;
  260. line-height: 40rpx;
  261. text-align: center;
  262. border-radius: 20rpx;
  263. }
  264. .sortFive {
  265. display: inline-block;
  266. width: 40rpx;
  267. height: 40rpx;
  268. padding: 4rpx;
  269. box-sizing: border-box;
  270. background: rgba(1, 131, 250, 0.2);
  271. font-weight: 400;
  272. font-size: 28rpx;
  273. color: #0183FA;
  274. line-height: 40rpx;
  275. text-align: center;
  276. border-radius: 20rpx;
  277. }
  278. .table-tow {
  279. width: 750rpx;
  280. .table-border {
  281. overflow: auto;
  282. .table-th {
  283. width: 860rpx;
  284. height: 80rpx;
  285. background: rgba(162, 162, 162, 0.2);
  286. padding: 0 30rpx;
  287. box-sizing: border-box;
  288. .table-th-li {
  289. height: 80rpx;
  290. display: flex;
  291. justify-content: flex-start;
  292. >view {
  293. font-weight: 400;
  294. font-size: 30rpx;
  295. color: #FFFFFF;
  296. line-height: 80rpx;
  297. text-align: center;
  298. margin-right: 18rpx;
  299. width: 140rpx;
  300. overflow: hidden;
  301. text-overflow: ellipsis;
  302. white-space: nowrap;
  303. }
  304. >view:nth-of-type(1) {
  305. width: 168rpx;
  306. text-align: left;
  307. }
  308. }
  309. }
  310. .table-tb {
  311. width: 860rpx;
  312. border-bottom: 1rpx dashed rgba(216, 216, 216, 0.2);
  313. background: #3E414F;
  314. padding: 0 30rpx;
  315. box-sizing: border-box;
  316. .table-tb-li {
  317. height: 80rpx;
  318. border-bottom: 1rpx dashed rgba(216, 216, 216, 0.2);
  319. display: flex;
  320. justify-content: flex-start;
  321. >view {
  322. font-weight: 400;
  323. font-size: 28rpx;
  324. color: #FFFFFF;
  325. line-height: 80rpx;
  326. text-align: center;
  327. margin-right: 38rpx;
  328. width: 140rpx;
  329. overflow: hidden;
  330. text-overflow: ellipsis;
  331. white-space: nowrap;
  332. }
  333. >view:nth-of-type(1) {
  334. width: 168rpx;
  335. text-align: left;
  336. }
  337. }
  338. }
  339. }
  340. }
  341. }
  342. </style>