messagePage.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <template>
  2. <view class="messageData">
  3. <view class="box-bg">
  4. <uni-nav-bar :fixed="true" dark left-icon="left" background-color='#202246' title="消息" @clickLeft="back" />
  5. </view>
  6. <view class="messageDataCharts">
  7. <qiun-data-charts type="gauge" :opts="opts" :chartData="chartData" />
  8. <view class="messageDataChartsText">
  9. <text>未读消息</text>
  10. </view>
  11. </view>
  12. <view class="msg_main">
  13. <view class="msg_main_com flex justify-between" style="margin-top:10px">
  14. <view class="msg_main_com_left">
  15. <image src="../../static/jnImage/powerPage/msgOne.png" mode=""></image>
  16. <text>电量类</text>
  17. </view>
  18. <view class="msg_main_com_right" style="background-color: #F14E51;">
  19. <text>88</text>
  20. </view>
  21. </view>
  22. <view class="msg_main_com flex justify-between" style="margin-top:10px">
  23. <view class="msg_main_com_left">
  24. <image src="../../static/jnImage/powerPage/msgTwo.png" mode=""></image>
  25. <text>安全生产</text>
  26. </view>
  27. <view class="msg_main_com_right" style="background-color: #F14E51;">
  28. <text>88</text>
  29. </view>
  30. </view>
  31. <view class="msg_main_com flex justify-between" style="margin-top:10px">
  32. <view class="msg_main_com_left">
  33. <image src="../../static/jnImage/powerPage/msgThree.png" mode=""></image>
  34. <text>公司公告</text>
  35. </view>
  36. <view class="msg_main_com_right" style="background-color: #F14E51;">
  37. <text>88</text>
  38. </view>
  39. </view>
  40. <view class="msg_main_com flex justify-between" style="margin-top:10px">
  41. <view class="msg_main_com_left">
  42. <image src="../../static/jnImage/powerPage/msgFour.png" mode=""></image>
  43. <text>会议通知</text>
  44. </view>
  45. <view class="msg_main_com_right" style="background-color: #F14E51;">
  46. <text>88</text>
  47. </view>
  48. </view>
  49. <view class="msg_main_com flex justify-between" style="margin-top:10px">
  50. <view class="msg_main_com_left">
  51. <image src="../../static/jnImage/powerPage/msgFive.png" mode=""></image>
  52. <text>其他消息</text>
  53. </view>
  54. <view class="msg_main_com_right" style="background-color: #F14E51;">
  55. <text>88</text>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. data() {
  64. return {
  65. chartData: {},
  66. opts: {
  67. padding: undefined,
  68. title: {
  69. name: "66",
  70. fontSize: 50,
  71. color: "#fff",
  72. offsetY: -5
  73. },
  74. subtitle: {
  75. name: "",
  76. fontSize: 15,
  77. color: "#1890ff",
  78. offsetY: 0
  79. },
  80. extra: {
  81. gauge: {
  82. type: "progress",
  83. width: 20,
  84. labelColor: "#666666",
  85. startAngle: 0.75,
  86. endAngle: 0.25,
  87. startNumber: 0,
  88. endNumber: 100,
  89. labelFormat: "",
  90. splitLine: {
  91. fixRadius: -10,
  92. splitNumber: 10,
  93. width: 15,
  94. color: "#FFFFFF",
  95. childNumber: 5,
  96. childWidth: 12
  97. },
  98. pointer: {
  99. width: 24,
  100. color: "auto"
  101. }
  102. }
  103. }
  104. }
  105. }
  106. },
  107. onReady() {
  108. this.getServerData();
  109. },
  110. methods: {
  111. back() {
  112. this.$tab.navigateBack()
  113. },
  114. getServerData() {
  115. //模拟从服务器获取数据时的延时
  116. setTimeout(() => {
  117. let res = {
  118. categories: [{
  119. "value": 0.2,
  120. "color": "#1890ff"
  121. }, {
  122. "value": 0.8,
  123. "color": "#2fc25b"
  124. }, {
  125. "value": 1,
  126. "color": "#f04864"
  127. }],
  128. series: [{
  129. name: "完成率",
  130. data: 0.66
  131. }]
  132. };
  133. this.opts.title.name = '50'
  134. this.chartData = JSON.parse(JSON.stringify(res));
  135. }, 500);
  136. },
  137. }
  138. }
  139. </script>
  140. <style lang="scss">
  141. page {
  142. background-color: #202246;
  143. }
  144. .messageData {
  145. width: 100vw;
  146. background: url('../../static/jnImage/loginPage/windBack.png'), url('../../static/jnImage/loginPage/backWav.png');
  147. background-repeat: no-repeat, repeat;
  148. background-size: 100% 260px, 100% 5px;
  149. .box-bg {
  150. width: 100vw;
  151. padding: 0;
  152. .uni-navbar {
  153. .uni-navbar__content {
  154. padding: 5px 0;
  155. height: 50px;
  156. }
  157. }
  158. }
  159. .messageDataCharts {
  160. width: 100%;
  161. height: 300px;
  162. position: relative;
  163. .messageDataChartsText {
  164. width: 30%;
  165. height: 30px;
  166. line-height: 30px;
  167. background: #4287FF;
  168. border-radius: 15px;
  169. text-align: center;
  170. position: absolute;
  171. bottom: 30px;
  172. left: 35%;
  173. text {
  174. color: #fff;
  175. font-size: 30upx;
  176. }
  177. }
  178. }
  179. .msg_main {
  180. padding: 0 20px;
  181. .msg_main_com {
  182. padding: 10px;
  183. background-color: #3F4572;
  184. border-radius: 5px;
  185. .msg_main_com_left {
  186. image {
  187. width: 30px;
  188. height: 30px;
  189. position: relative;
  190. top: 1px;
  191. margin-right: 10px;
  192. }
  193. text {
  194. font-size: 30upx;
  195. color: #fff;
  196. position: relative;
  197. top: -8px;
  198. }
  199. }
  200. .msg_main_com_right {
  201. width: 25px;
  202. height: 25px;
  203. text-align: center;
  204. border-radius: 5px;
  205. position: relative;
  206. top: 6px;
  207. text {
  208. color: #fff;
  209. position: relative;
  210. top: 6px;
  211. }
  212. }
  213. }
  214. }
  215. }
  216. </style>