index.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. <template>
  2. <view class="report">
  3. <view class="home_header">
  4. <view class="header_message" @click="changeMsg">
  5. <image src="../../static/jnImage/indexPage/alarmSet.png"></image>
  6. </view>
  7. <view class="header_title">
  8. <!-- <image src="../../static/jnImage/loginPage/logo.png" mode=""></image> -->
  9. <text class="titleName">发电场站生产实时运营管理平台</text>
  10. </view>
  11. <view class="header_more" @click="changeStation">
  12. <image src="../../static/jnImage/indexPage/moreNew.png"></image>
  13. </view>
  14. </view>
  15. <view class="report_main">
  16. <view class="report_DataAll" v-for="(item,index) in reportProgressData" :key="index">
  17. <view class="report_Data flex justify-between">
  18. <view class="report_Data_1 flex">
  19. <image src="../../static/jnImage/indexPage/windIcon.png" mode=""></image>
  20. <text>{{item.inPower}}</text>
  21. </view>
  22. <view class="report_Data_2">
  23. <text>{{item.name}}</text>
  24. </view>
  25. <view class="report_Data_3">
  26. <text>{{item.allPower}}</text>
  27. </view>
  28. </view>
  29. <view class="report_Data_msg">
  30. <view class="show_msg" :style="showProgress(item)">
  31. </view>
  32. </view>
  33. </view>
  34. <view class="yearTab">
  35. <text v-for="(item,index) in yearData" :key="index" @click="changeYearTab(item)"
  36. :style="item.showColor ? 'background: #4287FF;color:#fff': ''">{{item.nameZN}}</text>
  37. </view>
  38. <view class="reportTable">
  39. <uni-table ref="table" border emptyText="暂无更多数据" width="100%">
  40. <uni-tr>
  41. <uni-th align="center">性能指标</uni-th>
  42. <uni-th width="45" align="center">数据</uni-th>
  43. <uni-th width="45" align="center">数据</uni-th>
  44. <uni-th width="45" align="center">数据</uni-th>
  45. </uni-tr>
  46. <uni-tr v-for="(item, index) in tableData" :key="index">
  47. <uni-td>{{ item.name }}</uni-td>
  48. <uni-td align="center">{{ item.data1 }}</uni-td>
  49. <uni-td align="center">{{ item.data2 }}</uni-td>
  50. <uni-td align="center">{{ item.data3 }}</uni-td>
  51. </uni-tr>
  52. </uni-table>
  53. </view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. export default {
  59. onLoad: function() {},
  60. data() {
  61. return {
  62. reportProgressData: [],
  63. yearTab: 'day',
  64. yearData: [],
  65. tableData: []
  66. }
  67. },
  68. created() {
  69. this.tableData = [{
  70. name: '指标一',
  71. data1: '2.8',
  72. data2: '3.6',
  73. data3: '4.8'
  74. },
  75. {
  76. name: '指标二',
  77. data1: '2.8',
  78. data2: '3.6',
  79. data3: '4.8'
  80. },
  81. {
  82. name: '指标三',
  83. data1: '2.8',
  84. data2: '3.6',
  85. data3: '4.8'
  86. },
  87. ]
  88. this.reportProgressData = [{
  89. inPower: '961万kWh',
  90. allPower: '1865万kWh',
  91. progress: '70%',
  92. name: '年发电量'
  93. },
  94. {
  95. inPower: '171天',
  96. allPower: '365天',
  97. progress: '56%',
  98. name: '日历进度'
  99. },
  100. {
  101. inPower: '日历进程',
  102. allPower: '年发电量',
  103. progress: '65%',
  104. name: '完成度'
  105. },
  106. ],
  107. this.yearData = [{
  108. nameZN: '日简报',
  109. nameEN: 'day',
  110. showColor: true
  111. },
  112. {
  113. nameZN: '月简报',
  114. nameEN: 'month',
  115. showColor: false
  116. },
  117. {
  118. nameZN: '年简报',
  119. nameEN: 'year',
  120. showColor: false
  121. }
  122. ]
  123. },
  124. methods: {
  125. showProgress(item) {
  126. return `width: ${item.progress};`
  127. },
  128. changeMsg() {
  129. this.$tab.navigateTo('/pages/common/messagePage')
  130. },
  131. changeStation() {
  132. this.$tab.navigateTo('/pages/common/stationListPage')
  133. },
  134. changeYearTab(item) {
  135. this.yearData.forEach(it => {
  136. it.showColor = false
  137. if (it.nameEN === item.nameEN) {
  138. item.showColor = true
  139. this.yearTab = it.nameEN
  140. }
  141. })
  142. },
  143. }
  144. }
  145. </script>
  146. <style lang="scss">
  147. page {
  148. background-color: #202246;
  149. }
  150. .report {
  151. width: 100vw;
  152. background: url('../../static/jnImage/loginPage/windBack.png'), url('../../static/jnImage/loginPage/backWav.png');
  153. background-repeat: no-repeat, repeat;
  154. background-size: 100% 260px, 100% 5px;
  155. .home_header {
  156. width: calc(100% -32px);
  157. display: flex;
  158. justify-content: space-between;
  159. height: 60px;
  160. padding-top: 16px;
  161. // position: fixed;
  162. .header_message {
  163. width: 15%;
  164. image {
  165. position: relative;
  166. top: 5px;
  167. left: 10px;
  168. width: 25px;
  169. height: 25px;
  170. }
  171. }
  172. .header_title {
  173. width: 70%;
  174. position: relative;
  175. left: 5px;
  176. image {
  177. width: 28px;
  178. height: 22px;
  179. position: relative;
  180. top: 5px;
  181. }
  182. .titleName {
  183. line-height: 20px;
  184. font-size: 36upx;
  185. font-family: FZZhengHeiS-M-GB;
  186. font-weight: 600;
  187. color: #fff;
  188. position: relative;
  189. top: 8px;
  190. }
  191. }
  192. .header_more {
  193. width: 15%;
  194. position: relative;
  195. top: 10px;
  196. left: 10px;
  197. image {
  198. width: 25px;
  199. height: 18px;
  200. }
  201. }
  202. }
  203. .report_main {
  204. padding: 0 20px;
  205. .report_DataAll {
  206. margin-top: 10px;
  207. .report_Data {
  208. .report_Data_1 {
  209. image {
  210. width: 18px;
  211. height: 18px;
  212. }
  213. text {
  214. margin-left: 5px;
  215. font-size: 28upx;
  216. color: #A49EAC;
  217. position: relative;
  218. top: 0px;
  219. }
  220. }
  221. .report_Data_2 {
  222. text {
  223. font-size: 32upx;
  224. color: #A49EAC;
  225. }
  226. }
  227. .report_Data_3 {
  228. text {
  229. font-size: 28upx;
  230. color: #A49EAC;
  231. }
  232. }
  233. }
  234. .report_Data_msg {
  235. width: 100%;
  236. height: 20px;
  237. border-radius: 5px;
  238. background: #0B143E;
  239. .show_msg {
  240. height: 20px;
  241. background: #00BC6F;
  242. border-radius: 5px 0 0 5px;
  243. }
  244. }
  245. }
  246. .yearTab {
  247. width: 99%;
  248. height: 30px;
  249. border-radius: 5px;
  250. background: #0B143E;
  251. margin-top: 20px;
  252. text {
  253. display: inline-block;
  254. width: 33%;
  255. height: 30px;
  256. text-align: center;
  257. color: #4287FF;
  258. line-height: 30px;
  259. }
  260. text:nth-of-type(1) {
  261. border-radius: 5px 0 0 5px;
  262. }
  263. text:nth-of-type(3) {
  264. border-radius: 0 5px 5px 0;
  265. }
  266. }
  267. .reportTable {
  268. width: 100%;
  269. margin-top: 10px;
  270. .table--border {
  271. border: 1px solid rgba(255, 255, 255, 0.3);
  272. }
  273. .uni-table {
  274. background-color: rgba(255, 255, 255, 0);
  275. .uni-table-tr {
  276. .table--border {
  277. border: 1px solid rgba(255, 255, 255, 0.3);
  278. }
  279. .uni-table-th {
  280. background-color: #2E336D;
  281. }
  282. .uni-table-th,
  283. .uni-table-td {
  284. color: #fff;
  285. font-size: 26upx;
  286. }
  287. .uni-table-th:nth-of-type(1) {
  288. background-color: #6C4B9E;
  289. }
  290. }
  291. .uni-table-tr:hover {
  292. background-color: rgba(255, 255, 255, 0);
  293. }
  294. }
  295. }
  296. }
  297. }
  298. </style>