myApps.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <template>
  2. <view>
  3. <u-navbar title="我的应用" title-color="#101010" :is-back="false" ></u-navbar>
  4. <!-- 用电管理 -->
  5. <view class="apps-content">
  6. <view class="title">
  7. 用电管理
  8. </view>
  9. <view class="apps-groups">
  10. <view class="item" @click="gotoUrl('/pages/equipmentDataMonitoring/dataMonitoring-list')"
  11. >
  12. <view class="item-icon">
  13. <image class="img" src="@/assets/img/riLine-file-chart-2-line.svg" mode=""></image>
  14. </view>
  15. <view class="item-name">
  16. 设备数据监测
  17. </view>
  18. </view>
  19. <view class="item"
  20. >
  21. <view class="item-icon item-icon2">
  22. <image class="img" src="@/assets/img/iconPark-network-tree.svg" mode=""></image>
  23. </view>
  24. <view class="item-name">
  25. 设备状态监测
  26. </view>
  27. </view>
  28. <view class="item" >
  29. <view class="item-icon item-icon3">
  30. <image class="img" src="@/assets/img/iconPark-ranking-list.svg" mode=""></image>
  31. </view>
  32. <view class="item-name">
  33. 异常设备排名
  34. </view>
  35. </view>
  36. <view class="item" @click="gotoUrl('/pages/abnormal/abnormalAlarmRecord')"
  37. >
  38. <view class="item-icon item-icon4">
  39. <image class="img" src="@/assets/img/iconPark-caution.svg" mode=""></image>
  40. </view>
  41. <view class="item-name">
  42. 异常告警记录
  43. </view>
  44. </view>
  45. <view class="item"
  46. >
  47. <view class="item-icon item-icon5">
  48. <image class="img" src="@/assets/img/iconPark-all-application.svg" mode=""></image>
  49. </view>
  50. <view class="item-name">
  51. 设备管理
  52. </view>
  53. </view>
  54. <view class="item" @click="gotoUrl('/pages/equipmentDataMonitoring/equipmentElectricity')"
  55. >
  56. <view class="item-icon item-icon6">
  57. <image class="img" src="@/assets/img/iconPark-order.svg" mode=""></image>
  58. </view>
  59. <view class="item-name">
  60. 设备用电量
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. <!-- 工单管理 -->
  66. <view class="apps-content" >
  67. <view class="title">
  68. 工单管理
  69. </view>
  70. <view class="apps-groups">
  71. <view class="item">
  72. <view class="item-icon">
  73. <image class="img" src="@/assets/img/riLine-file-list-3-line.svg" mode=""></image>
  74. </view>
  75. <view class="item-name">
  76. 工单统计
  77. </view>
  78. </view>
  79. <view class="item">
  80. <view class="item-icon item-icon7">
  81. <image class="img" src="@/assets/img/iconPark-edit-one.svg" mode=""></image>
  82. </view>
  83. <view class="item-name">
  84. 故障上报
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. <energyCenterTabbar :current="1"></energyCenterTabbar>
  90. </view>
  91. </template>
  92. <script>
  93. import energyCenterTabbar from '@/components/energyCenterTabbar.vue'
  94. import * as API from '@/apis/pagejs/index.js'
  95. export default {
  96. components: {
  97. energyCenterTabbar
  98. },
  99. data() {
  100. return {
  101. codes: '',
  102. abnormalRecordsList: []
  103. }
  104. },
  105. onReady() {
  106. var date = new Date();
  107. var year = date.getFullYear();
  108. var month = date.getMonth()+1 >= 10 ? date.getMonth()+1 : '0'+(date.getMonth()+1);
  109. this.queryDate = year + '-' + month;
  110. this.getfindByOpenId();
  111. this.getAbnormalAlarmRecord();
  112. },
  113. methods: {
  114. // 异常告警记录
  115. getAbnormalAlarmRecord() {
  116. uni.showLoading({
  117. title: "加载中",
  118. mask: true,
  119. })
  120. API.alarmRecord({
  121. queryDate: this.queryDate,
  122. configId: '',
  123. pageIndex: 1,
  124. pageSize: 3,
  125. companyId: this.companyId
  126. }).then((response) => {
  127. uni.hideLoading();
  128. this.abnormalRecordsList = response.data.data;
  129. }).catch(error => {
  130. uni.showToast({
  131. title: error,
  132. icon: "none"
  133. })
  134. })
  135. },
  136. // 商户ID
  137. getfindByOpenId() {
  138. uni.showLoading({
  139. title: "加载中",
  140. mask: true,
  141. })
  142. API.findByOpenId({
  143. openId: this.carhelp.getOpenId()
  144. }).then((response) => {
  145. uni.hideLoading();
  146. this.codes = response.data.regUser.codes;
  147. }).catch(error => {
  148. uni.showToast({
  149. title: error,
  150. icon: "none"
  151. })
  152. })
  153. },
  154. }
  155. }
  156. </script>
  157. <style lang="scss" scoped>
  158. .apps-content{
  159. background-color: #fff;
  160. margin-bottom: 24rpx;
  161. .title{
  162. padding: 32rpx;
  163. color: rgb(51,51,51);
  164. font-size: 36rpx;
  165. font-weight: bold;
  166. border-bottom: 1px solid #f2f4f6;
  167. }
  168. .apps-groups{
  169. display: flex;
  170. flex-wrap: wrap;
  171. .item{
  172. width: 50%;
  173. display: flex;
  174. padding: 32rpx 24rpx;
  175. align-items: center;
  176. border-right: 1px solid #f2f4f6;
  177. .item-icon{
  178. border-radius: 8px;
  179. background: linear-gradient(180deg, rgba(93,155,255,1) 0%,rgba(0,97,255,1) 100%);
  180. width: 72rpx;
  181. height: 72rpx;
  182. display: flex;
  183. align-items: center;
  184. justify-content: center;
  185. .img{
  186. width: 48rpx;
  187. height: 48rpx;
  188. }
  189. }
  190. .item-icon2{
  191. background: linear-gradient(179.2deg, rgba(168,178,238,1) 6.28%,rgba(123,123,240,1) 96.94%);
  192. }
  193. .item-icon3{
  194. background: linear-gradient(181.79deg, rgba(117,213,224,1) -1.13%,rgba(53,153,203,1) 94.2%);
  195. }
  196. .item-icon4{
  197. background: linear-gradient(180.29deg, rgba(255,124,112,1) 0.9%,rgba(255,79,63,1) 100.4%);
  198. }
  199. .item-icon5{
  200. background: linear-gradient(180deg, rgba(93,155,255,1) 0%,rgba(0,97,255,1) 100%);
  201. }
  202. .item-icon6{
  203. background: linear-gradient(178.44deg, rgba(122,232,227,1) 3.96%,rgba(57,182,182,1) 100.6%);
  204. }
  205. .item-icon7{
  206. background: linear-gradient(180.4deg, rgba(127,213,151,1) 2.1%,rgba(67,176,116,1) 101.21%);
  207. }
  208. .item-name{
  209. color: rgba(51,51,51,1);
  210. font-size: 36rpx;
  211. margin-left: 16rpx;
  212. font-weight: bold;
  213. }
  214. }
  215. }
  216. }
  217. </style>