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.vue 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <image class="top_logo" :src="logo" mode="aspectFit"></image>
  5. <!-- <view class="tite">
  6. {{ $t('MainTitle') }}
  7. </view> -->
  8. <view class="time">
  9. <view class="time_top">
  10. {{formattedTime}}
  11. </view>
  12. <view class="time_bottom">
  13. <view>
  14. </view>
  15. <view class="time_bottom1">
  16. {{$t('status')}}
  17. <view class="time_state" v-if="status=='ok'">
  18. {{$t('online')}}
  19. </view>
  20. <view class="time_state1" v-else>
  21. {{$t('offline')}}
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="parameter">
  28. <view class="parameter_list">
  29. <view class="parameter_box" @click="onreturn('故障')">
  30. <view class="parameter_list1">
  31. <image src="../../static/faultlist.png" mode=""></image>
  32. </view>
  33. <view class="fault_txt">
  34. {{$t('FaultRec')}}
  35. </view>
  36. </view>
  37. <!-- <view class="parameter_box" @click="onreturn('告警')">
  38. <view class="parameter_list1">
  39. <image src="../../static/fault.png" mode=""></image>
  40. </view>
  41. <view class="fault_txt">
  42. {{$t('WarningRec')}}
  43. </view>
  44. </view> -->
  45. <view class="parameter_box" @click="onreturn('事件')">
  46. <view class="parameter_list1">
  47. <image src="../../static/event.png" mode=""></image>
  48. </view>
  49. <view class="fault_txt">
  50. {{$t('RunningRec')}}
  51. </view>
  52. </view>
  53. <view class="parameter_box" @click="onreturn('基础')">
  54. <view class="parameter_list1">
  55. <image src="../../static/Basics.png" mode=""></image>
  56. </view>
  57. <view class="fault_txt">
  58. {{$t('SYSIfo')}}
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. <view class="parameter_bottom">
  64. <view style="display: flex;align-items: center;">
  65. <view class="parameter_bottom1" @click="onclick">
  66. <image src="../../static/home.png" mode=""></image><text class="parameter_bottom2">{{$t('ReturnModeSelection')}}</text>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. </template>
  72. <!-- -->
  73. <script>
  74. import {
  75. getTime
  76. } from "../../utils/index.js"
  77. import {
  78. getfaultsList
  79. } from "../../api/api.js"
  80. import {
  81. mapState
  82. } from 'vuex';
  83. export default {
  84. data() {
  85. return {
  86. logo:'../../static/logo/logo31.png'
  87. }
  88. },
  89. onLoad() {
  90. },
  91. computed: {
  92. // 使用 mapState 映射多个状态到组件的计算属性
  93. ...mapState(['formattedTime', 'status']),
  94. },
  95. beforeUnmount() {},
  96. methods: {
  97. // 返回首页
  98. onreturn(e) {
  99. console.log(e);
  100. this.$store.commit('getevent', e);
  101. if(e=="基础"){
  102. uni.redirectTo({
  103. url: '/pages/SYSifo/index'
  104. });
  105. }else{
  106. uni.redirectTo({
  107. url: '/pages/details/index'
  108. });
  109. }
  110. },
  111. onclick() {
  112. uni.redirectTo({
  113. url: '/pages/index/index'
  114. });
  115. },
  116. }
  117. }
  118. </script>
  119. <style lang="scss" scoped>
  120. .content {
  121. width: 100%;
  122. height: 100vh;
  123. opacity: 1;
  124. // background: linear-gradient(180deg, rgba(215, 230, 245, 0) 0%, rgba(196, 229, 255, 1) 100%);
  125. background: radial-gradient(40.46% 50% at 50.01912045889101% 50%, rgba(225, 238, 222, 1) 0%, rgba(196, 219, 193, 1) 100%);
  126. box-sizing: border-box;
  127. }
  128. .top {
  129. width: 100%;
  130. height: 100px;
  131. display: flex;
  132. align-items: center;
  133. justify-content: space-between;
  134. background-size: 100% 100%;
  135. background-repeat: no-repeat;
  136. // background-color: #fff;
  137. background: rgba(225, 238, 222, 1);
  138. padding-right:46px;
  139. padding:0px 46px;
  140. box-sizing: border-box;
  141. }
  142. .top_logo{
  143. // width:327px;
  144. width:260px;
  145. // width:100px;
  146. // width:88px;
  147. // height: 56px;
  148. // height: 88px;
  149. }
  150. .tite{
  151. width:240px;
  152. height: 50px;
  153. font-size: 80rpx;
  154. font-weight: 600;
  155. margin-left:90px;
  156. }
  157. .time{
  158. width:277px;
  159. text-align: right;
  160. }
  161. .time_top {
  162. font-size: 17px;
  163. }
  164. .time_bottom {
  165. display: flex;
  166. font-size: 17px;
  167. justify-content: space-between;
  168. }
  169. .time_bottom1 {
  170. display: flex;
  171. }
  172. .time_state {
  173. font-size: 17px;
  174. font-weight: 600;
  175. color: rgba(22, 68, 144, 1);
  176. }
  177. .time_state1 {
  178. font-size: 17px;
  179. font-weight: 600;
  180. color: rgba(217, 22, 22, 1);
  181. }
  182. .parameter {
  183. width: 100%;
  184. // height: 100%;
  185. margin-top: 113px;
  186. display: flex;
  187. /* align-items: center; */
  188. justify-content: space-around;
  189. box-sizing: border-box;
  190. }
  191. .parameter_box {
  192. display: flex;
  193. flex-direction: column;
  194. align-items: center;
  195. }
  196. .parameter_list {
  197. width: 100%;
  198. padding: 0px 40px;
  199. display: flex;
  200. justify-content: space-around;
  201. }
  202. .parameter_list1 {
  203. width: 234.46px;
  204. height: 336.76px;
  205. background-image: url("../../static/faults.png");
  206. background-size: 100% 100%;
  207. display: flex;
  208. align-items: center;
  209. justify-content: center;
  210. image {
  211. width: 118.46px;
  212. height: 118.46px;
  213. }
  214. }
  215. .fault_txt {
  216. height: 27.9px;
  217. opacity: 1;
  218. /** 文本1 */
  219. font-size: 23.5px;
  220. font-weight: 400;
  221. letter-spacing: 0px;
  222. line-height: 32.24px;
  223. color: rgba(0, 0, 0, 1);
  224. text-align: left;
  225. vertical-align: top;
  226. margin-top: 40px;
  227. }
  228. .fault_image {
  229. width: 234.46px;
  230. height: 336.76px;
  231. }
  232. .parameter_xian {
  233. width: 100%;
  234. height: 55px;
  235. background: linear-gradient(180deg, rgba(30, 131, 189, 1) 0%, rgba(69, 168, 230, 0.92) 100%);
  236. box-shadow: inset 0px 0px 9.79px rgba(0, 0, 0, 0.1);
  237. display: flex;
  238. align-items: center;
  239. /* justify-content: space-around; */
  240. font-size: 28px;
  241. font-weight: 600;
  242. padding: 0px 20px;
  243. box-sizing: border-box;
  244. .parameter_xian1 {
  245. width: 100px;
  246. }
  247. }
  248. .parameter_bottom {
  249. display: flex;
  250. justify-content: space-between;
  251. margin-bottom: 10px;
  252. padding: 0px 16px;
  253. position: fixed;
  254. left: 10px;
  255. bottom: 20px;
  256. width: 100%;
  257. box-sizing: border-box;
  258. }
  259. .parameter_bottom1 {
  260. display: flex;
  261. align-items: center;
  262. image {
  263. width: 32px;
  264. height: 32px;
  265. display: flex;
  266. }
  267. }
  268. .parameter_bottom11 {
  269. display: flex;
  270. align-items: center;
  271. margin-left: 100px;
  272. image {
  273. width: 32px;
  274. height: 32px;
  275. display: flex;
  276. }
  277. }
  278. .parameter_bottom2 {
  279. font-size: 19.58px;
  280. font-weight: 400;
  281. color: rgba(0, 0, 0, 1);
  282. margin-left: 10px;
  283. }
  284. </style>