myApps.vue 6.7 KB

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