index.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  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">
  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/uniNavBar')
  130. },
  131. changeYearTab(item) {
  132. this.yearData.forEach(it => {
  133. it.showColor = false
  134. if (it.nameEN === item.nameEN) {
  135. item.showColor = true
  136. this.yearTab = it.nameEN
  137. }
  138. })
  139. },
  140. }
  141. }
  142. </script>
  143. <style lang="scss">
  144. page {
  145. background-color: #202246;
  146. }
  147. .report {
  148. width: 100vw;
  149. background: url('../../static/jnImage/loginPage/windBack.png'), url('../../static/jnImage/loginPage/backWav.png');
  150. background-repeat: no-repeat, repeat;
  151. background-size: 100% 260px, 100% 5px;
  152. .home_header {
  153. width: calc(100% -32px);
  154. display: flex;
  155. justify-content: space-between;
  156. height: 60px;
  157. padding-top: 16px;
  158. // position: fixed;
  159. .header_message {
  160. width: 15%;
  161. image {
  162. position: relative;
  163. top: 5px;
  164. left: 10px;
  165. width: 25px;
  166. height: 25px;
  167. }
  168. }
  169. .header_title {
  170. width: 70%;
  171. position: relative;
  172. left: 5px;
  173. image {
  174. width: 28px;
  175. height: 22px;
  176. position: relative;
  177. top: 5px;
  178. }
  179. .titleName {
  180. line-height: 20px;
  181. font-size: 36upx;
  182. font-family: FZZhengHeiS-M-GB;
  183. font-weight: 600;
  184. color: #fff;
  185. position: relative;
  186. top: 8px;
  187. }
  188. }
  189. .header_more {
  190. width: 15%;
  191. position: relative;
  192. top: 10px;
  193. left: 10px;
  194. image {
  195. width: 25px;
  196. height: 15px;
  197. }
  198. }
  199. }
  200. .report_main {
  201. padding: 0 20px;
  202. .report_DataAll {
  203. margin-top: 10px;
  204. .report_Data {
  205. .report_Data_1 {
  206. image {
  207. width: 18px;
  208. height: 18px;
  209. }
  210. text {
  211. margin-left: 5px;
  212. font-size: 28upx;
  213. color: #A49EAC;
  214. position: relative;
  215. top: 0px;
  216. }
  217. }
  218. .report_Data_2 {
  219. text {
  220. font-size: 32upx;
  221. color: #A49EAC;
  222. }
  223. }
  224. .report_Data_3 {
  225. text {
  226. font-size: 28upx;
  227. color: #A49EAC;
  228. }
  229. }
  230. }
  231. .report_Data_msg {
  232. width: 100%;
  233. height: 20px;
  234. border-radius: 5px;
  235. background: #0B143E;
  236. .show_msg {
  237. height: 20px;
  238. background: #00BC6F;
  239. border-radius: 5px 0 0 5px;
  240. }
  241. }
  242. }
  243. .yearTab {
  244. width: 99%;
  245. height: 30px;
  246. border-radius: 5px;
  247. background: #0B143E;
  248. margin-top: 20px;
  249. text {
  250. display: inline-block;
  251. width: 33%;
  252. height: 30px;
  253. text-align: center;
  254. color: #4287FF;
  255. line-height: 30px;
  256. }
  257. text:nth-of-type(1) {
  258. border-radius: 5px 0 0 5px;
  259. }
  260. text:nth-of-type(3) {
  261. border-radius: 0 5px 5px 0;
  262. }
  263. }
  264. .reportTable {
  265. width: 100%;
  266. margin-top: 10px;
  267. .table--border {
  268. border: 1px solid rgba(255, 255, 255, 0.3);
  269. }
  270. .uni-table {
  271. background-color: rgba(255, 255, 255, 0);
  272. .uni-table-tr {
  273. .table--border {
  274. border: 1px solid rgba(255, 255, 255, 0.3);
  275. }
  276. .uni-table-th {
  277. background-color: #2E336D;
  278. }
  279. .uni-table-th,
  280. .uni-table-td {
  281. color: #fff;
  282. font-size: 26upx;
  283. }
  284. .uni-table-th:nth-of-type(1) {
  285. background-color: #6C4B9E;
  286. }
  287. }
  288. .uni-table-tr:hover {
  289. background-color: rgba(255, 255, 255, 0);
  290. }
  291. }
  292. }
  293. }
  294. }
  295. </style>