合伙人运营小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.wxml 7.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <view class="container">
  2. <!-- 顶部基础信息卡片 -->
  3. <view class="container_box">
  4. <view class="info-card">
  5. <!-- 类型标签 -->
  6. <view class="type-tag {{type === 'station' ? 'tag-station' : 'tag-user'}}">
  7. {{type === 'station' ? '电站' : '用户用电点'}}
  8. </view>
  9. <!-- 名称+地址 -->
  10. <view class="name">{{powerstationdata.poiName}}</view>
  11. <view class="address">{{powerstationdata.addressDetails}}</view>
  12. <!-- 状态/经纬度 -->
  13. <view class="extra-info">
  14. <view class="status {{powerstationdata.powerType==1 ? 'status-active' : 'status-normal'}}">
  15. {{powerstationdata.powerType==1 ? '正常运行' : '异常状态'}}
  16. </view>
  17. <view class="coord">
  18. 经度:{{powerstationdata.longitude}} | 纬度:{{powerstationdata.latitude}}
  19. </view>
  20. </view>
  21. </view>
  22. <!-- 标签页 -->
  23. <view class="tab-bar">
  24. <view class="tab-item {{activeTab==0?'active':''}}" bindtap="changeTab" data-index="0">实时数据</view>
  25. <!-- <view class="tab-item {{activeTab==1?'active':''}}" bindtap="changeTab" data-index="1">历史趋势</view> -->
  26. <view class="tab-item {{activeTab==2?'active':''}}" bindtap="changeTab" data-index="2">消息记录</view>
  27. <view class="tab-item {{activeTab==3?'active':''}}" bindtap="changeTab" data-index="3">充放电记录</view>
  28. </view>
  29. <!-- 数据统计模块(电站/用电点差异化展示) -->
  30. <view wx:if="{{activeTab==0}}">
  31. <view class="stats-container" wx:if="{{type === 'station'}}">
  32. <view class="stats-title">电站运行数据</view>
  33. <view class="stats-grid">
  34. <view class="stats-item">
  35. <view class="stats-value">{{powerstationdata.workorderActual}}kWh</view>
  36. <view class="stats-label">今日发电量</view>
  37. </view>
  38. <view class="stats-item">
  39. <view class="stats-value">{{powerstationdata.workordercount}}个</view>
  40. <view class="stats-label">订单数</view>
  41. </view>
  42. <view class="stats-item">
  43. <view class="stats-value">{{powerstationdata.workorderPower}}kW</view>
  44. <view class="stats-label">功率</view>
  45. </view>
  46. <view class="stats-item">
  47. <view class="stats-value">{{powerstationdata.runTime}}</view>
  48. <view class="stats-label">运行时间</view>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="stats-container" wx:if="{{type === 'user'}}">
  53. <view class="stats-title">用电点能耗数据</view>
  54. <view class="stats-grid">
  55. <view class="stats-item">
  56. <view class="stats-value">{{powerstationdata.workorderActual}}kW</view>
  57. <view class="stats-label">今日发电量</view>
  58. </view>
  59. <view class="stats-item">
  60. <view class="stats-value">{{powerstationdata.workordercount}}kWh</view>
  61. <view class="stats-label">订单数</view>
  62. </view>
  63. <view class="stats-item">
  64. <view class="stats-value">{{powerstationdata.workorderPower}}kW</view>
  65. <view class="stats-label">功率</view>
  66. </view>
  67. <view class="stats-item">
  68. <view class="stats-value">{{powerstationdata.runTime}}kW</view>
  69. <view class="stats-label">运行时间</view>
  70. </view>
  71. </view>
  72. </view>
  73. <!-- 详情列表 -->
  74. <view class="detail-list">
  75. <view class="detail-item">
  76. <view class="detail-label">联系人</view>
  77. <view class="detail-value">{{powerstationdata.receiver || '暂无'}}</view>
  78. </view>
  79. <view class="detail-item">
  80. <view class="detail-label">联系电话</view>
  81. <view class="detail-value">{{powerstationdata.phone || '暂无'}}</view>
  82. </view>
  83. <view class="detail-item">
  84. <view class="detail-label">建成/接入时间</view>
  85. <view class="detail-value">{{powerstationdata.createTime || '暂无'}}</view>
  86. </view>
  87. <view class="detail-item">
  88. <view class="detail-label">所属项目</view>
  89. <view class="detail-value">{{powerstationdata.projectName || '暂无'}}</view>
  90. </view>
  91. <view class="detail-item">
  92. <view class="detail-label">备注信息</view>
  93. <view class="detail-value">{{powerstationdata.notes || '暂无'}}</view>
  94. </view>
  95. </view>
  96. </view>
  97. <!-- 告警记录面板(预留) -->
  98. <view class="panel1 empty-panel1" wx:if="{{activeTab==2}}">
  99. <!-- <view class="empty-text">暂无告警记录</view> -->
  100. <!-- 告警列表项 -->
  101. <view class="alert-card" wx:for="{{alertData}}" wx:key="faultId" bindtap="toAlertDetail" data-alert="{{item}}">
  102. <!-- 未读角标 -->
  103. <view class="unread-tag" wx:if="{{item.status === 'unread'}}"></view>
  104. <!-- 告警类型图标+级别 mockAlerts -->
  105. <view class="alert-left">
  106. <view class="alert-icon {{item.level === 'critical' ? 'icon-critical' : item.level === 'warning' ? 'icon-warning' : 'icon-info'}}">
  107. {{item.level === 'critical' ? '危' : item.level === 'warning' ? '警' : '提'}}
  108. </view>
  109. <view class="alert-type">{{item.controllerId}}</view>
  110. </view>
  111. <!-- -->
  112. <!-- 告警核心信息 -->
  113. <view class="alert-middle">
  114. <view class="alert-title">{{item.faultdescs}}</view>
  115. <view class="alert-desc">{{item.poiName}}</view>
  116. <view class="alert-info">
  117. <text wx:if="{{item.faultstatus==0}}">触发</text>
  118. <text wx:if="{{item.faultstatus==1}}">复位</text>
  119. <text>{{item.createtime}}</text>
  120. </view>
  121. </view>
  122. <!-- 操作按钮 wx:if="{{item.faultstatus==1}}" -->
  123. <view class="alert-right">
  124. <button class="handle-btn" wx:if="{{item.faultstatus==0}}" bindtap="handleAlert" data-id="{{item.id}}" catchtap="true">
  125. 处理
  126. </button>
  127. <view class="handled-tag" wx:if="{{item.faultstatus==1}}">已处理</view>
  128. </view>
  129. </view>
  130. </view>
  131. <!-- 充放电记录面板(预留) -->
  132. <!-- 充放电记录面板 -->
  133. <view class="panel2 empty-panel2" wx:if="{{activeTab==3}}">
  134. <!-- <view class="empty-text">充放电记录加载中...</view> -->
  135. <view class="order-card" wx:for="{{electricitydata}}" wx:key="id" data-order="{{item}}">
  136. <!-- 工单状态标签 -->
  137. <view class="order-tag">
  138. <text wx:if="{{item.workorderType<2}}">待处理</text>
  139. <text wx:if="{{item.workorderType>2&&item.workorderType<6}}">处理中</text>
  140. <text wx:if="{{item.workorderType>5}}">已完成</text>
  141. </view>
  142. <!-- 工单左侧信息 -->
  143. <view class="order-left">
  144. <view class="order-code">工单编号:{{item.workorderId}}</view>
  145. <view class="order-title">{{item.workorderName}}</view>
  146. <view class="order-desc" wx:if="{{item.chargedischargeType==1}}">充电量:{{item.workorderActual}}kWh</view>
  147. <view class="order-desc" wx:if="{{item.chargedischargeType==2}}">放电量:{{item.workorderActual}}kWh</view>
  148. <view class="order-desc" wx:if="{{item.createType==2}}">工单类型:长期</view>
  149. <view class="order-desc" wx:if="{{item.createType==1}}">工单类型:临时</view>
  150. <view class="order-meta">
  151. <text>创建时间:{{item.workorderCreatetime}}</text>
  152. </view>
  153. </view>
  154. <!---->
  155. <!-- 工单右侧操作区 -->
  156. <view class="order-right">
  157. <!-- 待派单:派单按钮 -->
  158. <!-- 1111 -->
  159. </view>
  160. </view>
  161. </view>
  162. </view>
  163. <!-- 底部操作按钮 -->
  164. <!-- <view class="btn-bar">
  165. <button class="btn-navigate" bindtap="navigateToMap">查看地图位置</button>
  166. <button class="btn-call" bindtap="callContact" wx:if="{{info.contactPhone}}">联系负责人</button>
  167. </view> -->
  168. </view>