移动储能车V1版本
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

index.vue 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <image class="top_logo" src="../../static/logo1.png" mode=""></image>
  5. <image class="tite" src="../../static/tite.png" mode=""></image>
  6. <!-- <view class="tite">
  7. {{ $t('MainTitle') }}
  8. </view> -->
  9. <view class="time">
  10. <view class="time_top">
  11. {{formattedTime}}
  12. </view>
  13. <view class="time_bottom">
  14. <view>
  15. </view>
  16. <view class="time_bottom1">
  17. {{$t('status')}}
  18. <view class="time_state" v-if="status=='ok'">
  19. {{$t('online')}}
  20. </view>
  21. <view class="time_state1" v-else>
  22. {{$t('offline')}}
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="parameter">
  29. <view class="parameter_xian">
  30. <view class="parameter_xian1">
  31. {{$t('formNO')}}
  32. </view>
  33. <view class="parameter_xian2">
  34. {{$t('formUnit')}}
  35. </view>
  36. <view class="parameter_xian3">
  37. {{$t('formDescription')}}
  38. </view>
  39. <view class="parameter_xian4">
  40. {{$t('formFailure')}}
  41. </view>
  42. <!-- <view class="parameter_xian5">
  43. 发生时间
  44. </view> -->
  45. <view class="parameter_xian6" v-if="event!='事件'">
  46. {{$t('formRecover')}}
  47. </view>
  48. </view>
  49. <view class="parameter_box">
  50. <view v-for="(item,index) in faultsList" :class="item.RESETTIME==''&&event!='事件'?'parameter_divred':'parameter_div'"
  51. :key="index">
  52. <view class="parameter_xian1">
  53. {{item.ID}}
  54. </view>
  55. <!-- <view class="parameter_xian2">
  56. {{item.TYPE}}
  57. </view> -->
  58. <!-- <zb-tooltip @click.top="close" :content="item.DEVICE" placement="top" :ref="'tooltip'+index"> -->
  59. <view class="parameter_xian2" v-if="item.DEVICE=='亿能BMS-1'">
  60. BMS
  61. </view>
  62. <view class="parameter_xian2" v-if="item.DEVICE=='英博电气pcs-1'">
  63. PCS
  64. </view>
  65. <view class="parameter_xian2" v-if="item.DEVICE=='virtual'">
  66. MCS
  67. </view>
  68. <view class="parameter_xian2" v-if="item.DEVICE=='充电桩ccu-1-1'">
  69. CCU
  70. </view>
  71. <view class="parameter_xian2" v-if="item.DEVICE=='innerIO-1'">
  72. IO
  73. </view>
  74. <!-- </zb-tooltip> -->
  75. <zb-tooltip @click.top="closedevice" :content="item.CONTENT" placement="top" :ref="'device'+index">
  76. <view class="parameter_xian3">
  77. {{item.CONTENT}}
  78. </view>
  79. </zb-tooltip>
  80. <view class="parameter_xian4">
  81. {{item.FAULTTIME.substring(0, 19)}}
  82. </view>
  83. <view class="parameter_xian6" v-if="event!='事件'">
  84. {{item.RESETTIME.substring(0, 19)}}
  85. </view>
  86. </view>
  87. </view>
  88. <view class="parameter_bottom">
  89. <view style="display: flex;align-items: center;">
  90. <view class="parameter_bottom1" @click="onclick">
  91. <image src="../../static/home.png" mode=""></image><text class="parameter_bottom2">{{$t('ReturnModeSelection')}}</text>
  92. </view>
  93. <view class="parameter_bottom11" @click="onReturn">
  94. <image src="../../static/Return.png" mode=""></image><text class="parameter_bottom2">{{$t('Return')}}</text>
  95. </view>
  96. </view>
  97. <!-- <view class="parameter_bottom3">
  98. <view :class="faulttaps=='实时'?'parameter_bottom31':'parameter_bottom32'" @click="taps('实时')">
  99. 实时
  100. </view>
  101. <view v-if="event=='故障'" :class="faulttaps=='故障'?'parameter_bottom31':'parameter_bottom32'" @click="taps('故障')">
  102. 故障
  103. </view>
  104. <view v-if="event=='告警'" :class="faulttaps=='告警'?'parameter_bottom31':'parameter_bottom32'" @click="taps('告警')">
  105. 告警
  106. </view>
  107. <view v-if="event=='事件'" :class="faulttaps=='事件'?'parameter_bottom31':'parameter_bottom32'" @click="taps('事件')">
  108. 事件
  109. </view>
  110. </view> -->
  111. <view class="parameter_bottom4">
  112. <view class="eliminate">
  113. {{$t('FaultClearing')}}
  114. </view>
  115. <uni-pagination :total="total" :current="current" title="标题文字" :show-icon="true" @change="change" />
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. </template>
  121. <!--table -->
  122. <script>
  123. import {
  124. getTime
  125. } from "../../utils/index.js"
  126. import {
  127. getfaultsList
  128. } from "../../api/api.js"
  129. import {
  130. mapState
  131. } from 'vuex';
  132. export default {
  133. data() {
  134. return {
  135. current: 1,
  136. total: 0,
  137. pageSize: 10,
  138. faulttaps: '故障',
  139. faultsList: [],
  140. }
  141. },
  142. onLoad() {
  143. this.faulttaps = this.$store.state.event
  144. this.onfaultsList();
  145. },
  146. computed: {
  147. // 使用 mapState 映射多个状态到组件的计算属性
  148. ...mapState(['formattedTime', 'status',"event"]),
  149. },
  150. beforeUnmount() {},
  151. methods: {
  152. onfaultsList() {
  153. // let data1 =[
  154. // {
  155. // ID:1,
  156. // DEVICE:'亿能BMS-1',
  157. // CONTENT:'CONTENT',
  158. // FAULTTIME:'2024-10-30',
  159. // RESETTIME:'2024-10-30',
  160. // },{
  161. // ID:1,
  162. // DEVICE:'亿能BMS-1',
  163. // CONTENT:'CONTENT',
  164. // FAULTTIME:'2024-10-30',
  165. // RESETTIME:'',
  166. // }
  167. // ]
  168. // this.faultsList = data1
  169. // this.total =10
  170. // return
  171. let data = {
  172. page: this.current,
  173. rows: this.pageSize,
  174. device: '',
  175. starttime: '',
  176. endtime: '',
  177. rt:0,
  178. type:this.faulttaps
  179. }
  180. getfaultsList(data).then(res => {
  181. console.log(res);
  182. if (res.status == 'ok') {
  183. this.faultsList = res.data.list
  184. this.total = res.data.pagination.total
  185. } else {
  186. }
  187. });
  188. },
  189. onclick() {
  190. uni.redirectTo({
  191. url: '/pages/index/index'
  192. });
  193. },
  194. onReturn() {
  195. uni.redirectTo({
  196. url: '/pages/faultlist/index'
  197. });
  198. },
  199. change(e) {
  200. console.log(e);
  201. this.current = e.current
  202. this.onfaultsList()
  203. },
  204. // taps(e) {
  205. // this.faulttaps = e
  206. // this.current = 1
  207. // console.log(e);
  208. // this.onfaultsList()
  209. // },
  210. // 文字提示
  211. closedevice() {
  212. for (let i = 1; i < this.total; i++) {
  213. this.$refs[('device' + i)].close()
  214. }
  215. },
  216. // close() {
  217. // for (let i = 1; i < this.total; i++) {
  218. // this.$refs[('tooltip' + i)].close()
  219. // }
  220. // }
  221. }
  222. }
  223. </script>
  224. <style lang="scss" scoped>
  225. .content {
  226. width: 100%;
  227. height: 100vh;
  228. opacity: 1;
  229. background: linear-gradient(180deg, rgba(215, 230, 245, 0) 0%, rgba(196, 229, 255, 1) 100%);
  230. box-sizing: border-box;
  231. }
  232. .top {
  233. width: 100%;
  234. height: 100px;
  235. display: flex;
  236. align-items: center;
  237. justify-content: space-between;
  238. background-size: 100% 100%;
  239. background-repeat: no-repeat;
  240. background-color: #fff;
  241. padding: 0px 46px;
  242. box-sizing: border-box;
  243. }
  244. .top_logo{
  245. width:327px;
  246. height: 56px;
  247. }
  248. .tite{
  249. width:166px;
  250. height: 50px;
  251. font-size: 34px;
  252. font-weight: 800;
  253. background-image: url("../../static/tite1.png.png");
  254. background-size: 100% 100%;
  255. }
  256. .time{
  257. width:277px;
  258. text-align: right;
  259. }
  260. .time_top {
  261. font-size: 17px;
  262. }
  263. .time_bottom {
  264. display: flex;
  265. font-size: 17px;
  266. justify-content: space-between;
  267. }
  268. .time_bottom1 {
  269. display: flex;
  270. }
  271. .time_state {
  272. font-size: 17px;
  273. font-weight: 600;
  274. color: rgba(22, 68, 144, 1);
  275. }
  276. .parameter {
  277. width: 100%;
  278. /* padding-bottom: 20px; */
  279. display: flex;
  280. padding: 0px 20px 20px 20px;
  281. display: flex;
  282. flex-direction: column;
  283. box-sizing: border-box;
  284. }
  285. .parameter_xian {
  286. width: 100%;
  287. height: 55px;
  288. background: linear-gradient(180deg, rgba(30, 131, 189, 1) 0%, rgba(69, 168, 230, 0.92) 100%);
  289. box-shadow: inset 0px 0px 9.79px rgba(0, 0, 0, 0.1);
  290. display: flex;
  291. align-items: center;
  292. color: #fff;
  293. // justify-content: space-around;1237
  294. justify-content: space-between;
  295. font-size: 28px;
  296. font-weight: 600;
  297. padding: 0px 20px;
  298. box-sizing: border-box;
  299. .parameter_xian1 {
  300. width: 160px;
  301. }
  302. .parameter_xian2 {
  303. width: 160px;
  304. }
  305. .parameter_xian3 {
  306. width: 430px;
  307. }
  308. .parameter_xian4 {
  309. width: 220px;
  310. margin-right: 10px;
  311. white-space: nowrap;
  312. /* 禁止换行 */
  313. overflow: hidden;
  314. /* 超出部分隐藏 */
  315. text-overflow: ellipsis;
  316. /* 显示省略号 */
  317. }
  318. .parameter_xian5 {
  319. width: 240px;
  320. margin-right: 10px;
  321. }
  322. .parameter_xian6 {
  323. width: 240px;
  324. }
  325. }
  326. .parameter_box {
  327. width: 100%;
  328. overflow: auto;
  329. }
  330. .parameter_div {
  331. width: 100%;
  332. height: 46px;
  333. background: rgba(255, 255, 255, 1);
  334. box-shadow: inset 0px 0px 9.79px rgba(0, 0, 0, 0.1);
  335. margin-top: 10px;
  336. display: flex;
  337. align-items: center;
  338. // justify-content: space-around;
  339. justify-content: space-between;
  340. font-weight: 500;
  341. padding: 0px 20px;
  342. box-sizing: border-box;
  343. .parameter_xian1 {
  344. width: 160px;
  345. }
  346. .parameter_xian2 {
  347. width: 160px;
  348. }
  349. .parameter_xian3 {
  350. width: 430px;
  351. }
  352. .parameter_xian4 {
  353. width: 220px;
  354. white-space: nowrap;
  355. /* 禁止换行 */
  356. overflow: hidden;
  357. /* 超出部分隐藏 */
  358. text-overflow: ellipsis;
  359. /* 显示省略号 */
  360. margin-right: 10px;
  361. }
  362. .parameter_xian5 {
  363. width: 240px;
  364. margin-right: 10px;
  365. }
  366. .parameter_xian6 {
  367. width: 240px;
  368. }
  369. }
  370. .parameter_divred {
  371. width: 100%;
  372. height: 46px;
  373. background: rgba(245, 99, 83, 1);
  374. box-shadow: inset 0px 0px 9.79px rgba(0, 0, 0, 0.1);
  375. margin-bottom: 10px;
  376. display: flex;
  377. align-items: center;
  378. color: #fff;
  379. font-weight: 500;
  380. // justify-content: space-around;
  381. justify-content: space-between;
  382. padding: 0px 20px;
  383. box-sizing: border-box;
  384. .parameter_xian1 {
  385. width: 160px;
  386. }
  387. .parameter_xian2 {
  388. width: 160px;
  389. }
  390. .parameter_xian3 {
  391. width: 430px;
  392. }
  393. .parameter_xian4 {
  394. width: 220px;
  395. margin-right: 10px;
  396. white-space: nowrap;
  397. /* 禁止换行 */
  398. overflow: hidden;
  399. /* 超出部分隐藏 */
  400. text-overflow: ellipsis;
  401. /* 显示省略号 */
  402. }
  403. .parameter_xian5 {
  404. width: 240px;
  405. margin-right: 10px;
  406. }
  407. .parameter_xian6 {
  408. width: 240px;
  409. }
  410. }
  411. .parameter_bottom {
  412. display: flex;
  413. justify-content: space-between;
  414. margin-bottom: 10px;
  415. padding: 0px 16px;
  416. position: fixed;
  417. left: 10px;
  418. bottom: 10px;
  419. width: 100%;
  420. box-sizing: border-box;
  421. }
  422. .parameter_bottom1 {
  423. display: flex;
  424. align-items: center;
  425. image {
  426. width: 32px;
  427. height: 32px;
  428. display: flex;
  429. }
  430. }
  431. .parameter_bottom11 {
  432. display: flex;
  433. align-items: center;
  434. margin-left: 100px;
  435. image {
  436. width: 32px;
  437. height: 32px;
  438. display: flex;
  439. }
  440. }
  441. .parameter_bottom2 {
  442. font-size: 19.58px;
  443. font-weight: 400;
  444. color: rgba(0, 0, 0, 1);
  445. margin-left: 10px;
  446. }
  447. .parameter_bottom3 {
  448. display: flex;
  449. }
  450. .parameter_bottom31 {
  451. width: 48px;
  452. height: 48px;
  453. background: linear-gradient(180deg, rgba(74, 167, 224, 1) 0%, rgba(36, 134, 192, 1) 100%);
  454. border-radius: 100%;
  455. display: flex;
  456. align-items: center;
  457. justify-content: center;
  458. font-size: 19px;
  459. font-weight: 700;
  460. margin-right: 20px;
  461. color: rgba(255, 255, 255, 1);
  462. }
  463. .parameter_bottom32 {
  464. width: 48px;
  465. height: 48px;
  466. background: linear-gradient(180deg, rgba(224, 218, 218, 1) 0%, rgba(130, 121, 121, 1) 100%);
  467. border-radius: 100%;
  468. display: flex;
  469. align-items: center;
  470. justify-content: center;
  471. font-size: 19px;
  472. font-weight: 700;
  473. color: #222222;
  474. margin-right: 20px;
  475. }
  476. .parameter_bottom4 {
  477. display: flex;
  478. align-items: center;
  479. }
  480. .eliminate {
  481. width: 107.69px;
  482. height: 44.05px;
  483. opacity: 1;
  484. border-radius: 2.45px;
  485. background: linear-gradient(180deg, rgba(119, 163, 230, 1) 0%, rgba(25, 85, 176, 1) 10.42%, rgba(6, 53, 94, 1) 88.89%, rgba(119, 163, 230, 1) 100%);
  486. margin-right: 20px;
  487. display: flex;
  488. align-items: center;
  489. justify-content: center;
  490. font-size: 23.5px;
  491. font-weight: 400;
  492. color: rgba(255, 255, 255, 1);
  493. box-sizing: border-box;
  494. }
  495. .time_state1 {
  496. font-size: 17px;
  497. font-weight: 600;
  498. color: rgba(217, 22, 22, 1);
  499. }
  500. </style>