myApps.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  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 class="item" v-if="codes&&codes.indexOf('energyAdmin')!=-1"
  65. @click="gotoUrl('/pages/managementList/managementList?isback=1')"
  66. >
  67. <view class="item-icon item-icon10">
  68. <image class="img" src="@/assets/img/riLine-account-box-line.svg" mode=""></image>
  69. </view>
  70. <view class="item-name">
  71. 授权管理
  72. </view>
  73. </view>
  74. <view class="item"
  75. @click="gotoUrl('/pages/equipmentDataMonitoring/equipmentElectricityWater')"
  76. >
  77. <view class="item-icon item-icon7">
  78. <image class="img" src="@/assets/img/mine/iconPark-water-level.svg" mode=""></image>
  79. </view>
  80. <view class="item-name">
  81. 设备用水量
  82. </view>
  83. </view>
  84. <view class="item" v-if="companyInfo.type==2"
  85. @click="gotoUrl('/pages/platformRevenueStatistics/platformRevenueStatistics?isback=1')"
  86. >
  87. <view class="item-icon item-icon5">
  88. <image class="img" src="@/assets/img/riLine-money-cny-box-line.svg" mode=""></image>
  89. </view>
  90. <view class="item-name">
  91. 收入统计
  92. </view>
  93. </view>
  94. <view class="item" v-if="companyInfo.type==2"
  95. @click="gotoUrl('/pages/platformRevenueStatistics/electricityConsumptionAnalysis?isback=1')"
  96. >
  97. <view class="item-icon item-icon8">
  98. <image class="img" src="@/assets/img/iconPark-chart-histogram-two.svg" mode=""></image>
  99. </view>
  100. <view class="item-name">
  101. 能耗分析
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. <!-- 租户管理 -->
  107. <view class="apps-content" v-if="codes&&codes.indexOf('property')!=-1" >
  108. <view class="title">
  109. 租户管理
  110. </view>
  111. <view class="apps-groups">
  112. <view class="item" @click="gotoUrl('/pages/tenantList/contractList')" >
  113. <view class="item-icon item-icon9">
  114. <image class="img" src="@/assets/img/riLine-folder-user-line.svg" mode=""></image>
  115. </view>
  116. <view class="item-name">
  117. 租户管理预警
  118. </view>
  119. </view>
  120. <view class="item" @click="gotoUrl('/pages/tenantList/tenantList')" >
  121. <view class="item-icon item-icon7">
  122. <image class="img" src="@/assets/img/iconPark-order.svg" mode=""></image>
  123. </view>
  124. <view class="item-name">
  125. 扣费记录
  126. </view>
  127. </view>
  128. <view class="item" @click="gotoUrl('/pages/deductionRecord/billingRules')" >
  129. <view class="item-icon item-icon8">
  130. <image class="img" src="@/assets/img/riLine-file-text-line.svg" mode=""></image>
  131. </view>
  132. <view class="item-name">
  133. 计费规则
  134. </view>
  135. </view>
  136. <view class="item" @click="gotoUrl('/pages/tenantList/remoteControl')" >
  137. <view class="item-icon item-icon9">
  138. <image class="img" src="@/assets/img/riLine-remote-control-line.svg" mode=""></image>
  139. </view>
  140. <view class="item-name">
  141. 远程控制
  142. </view>
  143. </view>
  144. <view class="item" @click="gotoUrl('/pages/tenantList/rechargeRecord')" >
  145. <view class="item-icon item-icon3">
  146. <u-icon name="clock" color="#fff" size="48" ></u-icon>
  147. </view>
  148. <view class="item-name">
  149. 充值记录
  150. </view>
  151. </view>
  152. </view>
  153. </view>
  154. <energyCenterTabbar :current="1"></energyCenterTabbar>
  155. </view>
  156. </template>
  157. <script>
  158. import energyCenterTabbar from '@/components/energyCenterTabbar.vue'
  159. import * as API from '@/apis/pagejs/index.js'
  160. import * as API_managementList from '@/apis/pagejs/managementList.js'
  161. export default {
  162. components: {
  163. energyCenterTabbar
  164. },
  165. data() {
  166. return {
  167. codes: '',
  168. abnormalRecordsList: [],
  169. informationList:[],
  170. companyInfo:{}
  171. }
  172. },
  173. onReady() {
  174. var date = new Date();
  175. var year = date.getFullYear();
  176. var month = date.getMonth()+1 >= 10 ? date.getMonth()+1 : '0'+(date.getMonth()+1);
  177. this.queryDate = year + '-' + month;
  178. this.getfindByOpenId();
  179. //this.getAbnormalAlarmRecord();
  180. //this.getInformationList()
  181. },
  182. methods: {
  183. //授权二维码
  184. getInformationList() {
  185. API_managementList.informationList().then((response) => {
  186. this.informationList = response.data.informationList;
  187. }).catch(error => {
  188. uni.showToast({
  189. title: error,
  190. icon: "none"
  191. })
  192. })
  193. },
  194. // 异常告警记录
  195. getAbnormalAlarmRecord() {
  196. uni.showLoading({
  197. title: "加载中",
  198. mask: true,
  199. })
  200. API.alarmRecord({
  201. queryDate: this.queryDate,
  202. configId: '',
  203. pageIndex: 1,
  204. pageSize: 3,
  205. companyId: this.companyId
  206. }).then((response) => {
  207. uni.hideLoading();
  208. this.abnormalRecordsList = response.data.data;
  209. }).catch(error => {
  210. uni.showToast({
  211. title: error,
  212. icon: "none"
  213. })
  214. })
  215. },
  216. // 商户ID
  217. getfindByOpenId() {
  218. uni.showLoading({
  219. title: "加载中",
  220. mask: true,
  221. })
  222. API.findByOpenId({
  223. openId: this.carhelp.getOpenId()
  224. }).then((response) => {
  225. uni.hideLoading();
  226. this.codes = response.data.regUser.codes;
  227. this.companyInfo=response.data.companyInfo
  228. }).catch(error => {
  229. uni.showToast({
  230. title: error,
  231. icon: "none"
  232. })
  233. })
  234. },
  235. }
  236. }
  237. </script>
  238. <style lang="scss" scoped>
  239. .apps-content{
  240. background-color: #fff;
  241. margin-bottom: 24rpx;
  242. .title{
  243. padding: 32rpx;
  244. color: rgb(51,51,51);
  245. font-size: 36rpx;
  246. font-weight: bold;
  247. border-bottom: 1px solid #f2f4f6;
  248. }
  249. .apps-groups{
  250. display: flex;
  251. flex-wrap: wrap;
  252. .item{
  253. width: 50%;
  254. display: flex;
  255. padding: 32rpx 24rpx;
  256. align-items: center;
  257. border-right: 1px solid #f2f4f6;
  258. .item-icon{
  259. border-radius: 8px;
  260. background: linear-gradient(180deg, rgba(93,155,255,1) 0%,rgba(0,97,255,1) 100%);
  261. width: 72rpx;
  262. height: 72rpx;
  263. display: flex;
  264. align-items: center;
  265. justify-content: center;
  266. .img{
  267. width: 48rpx;
  268. height: 48rpx;
  269. }
  270. }
  271. .item-icon2{
  272. background: linear-gradient(179.2deg, rgba(168,178,238,1) 6.28%,rgba(123,123,240,1) 96.94%);
  273. }
  274. .item-icon3{
  275. background: linear-gradient(181.79deg, rgba(117,213,224,1) -1.13%,rgba(53,153,203,1) 94.2%);
  276. }
  277. .item-icon4{
  278. background: linear-gradient(180.29deg, rgba(255,124,112,1) 0.9%,rgba(255,79,63,1) 100.4%);
  279. }
  280. .item-icon5{
  281. background: linear-gradient(180deg, rgba(93,155,255,1) 0%,rgba(0,97,255,1) 100%);
  282. }
  283. .item-icon6{
  284. background: linear-gradient(178.44deg, rgba(122,232,227,1) 3.96%,rgba(57,182,182,1) 100.6%);
  285. }
  286. .item-icon7{
  287. background: linear-gradient(179.2deg, rgba(96,213,124,1) -0.62%,rgba(0,161,39,1) 97.92%);
  288. }
  289. .item-icon8{
  290. background: linear-gradient(179.2deg, rgba(168,178,238,1) 6.28%,rgba(123,123,240,1) 96.94%);
  291. }
  292. .item-icon9{
  293. background: linear-gradient(180deg, rgba(93,155,255,1) 0%,rgba(0,97,255,1) 100%);
  294. }
  295. .item-icon10{
  296. background:linear-gradient(181.79deg, rgba(117,213,224,1) -1.13%,rgba(53,153,203,1) 94.2%)
  297. }
  298. .item-name{
  299. color: rgba(51,51,51,1);
  300. font-size: 36rpx;
  301. margin-left: 16rpx;
  302. font-weight: bold;
  303. }
  304. }
  305. }
  306. }
  307. </style>