移动储能车V1版本
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

supply.vue 31KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <image class="top_logo" src="../../static/logo.png" mode=""></image>
  5. <image class="tite" src="../../static/tite.png" mode=""></image>
  6. <view class="time">
  7. <view class="time_top">
  8. {{formattedTime}}
  9. </view>
  10. <view class="time_bottom">
  11. <view>
  12. </view>
  13. <view class="time_bottom1">
  14. 连接状态:
  15. <view class="time_state" v-if="uidatasdata.bms_ChgLinkSt">
  16. 在线
  17. </view>
  18. <view class="time_state1" v-else>
  19. 离线
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="parameter">
  26. <view class="parameter_left">
  27. <view class="parameter_left1">
  28. <canvas class="canvas" canvas-id="canvas2">
  29. </canvas>
  30. <view class="parameter_canvas">
  31. <view class="parameter_canvas1">
  32. 0
  33. </view>
  34. <view class="parameter_canvas2">
  35. 100%
  36. </view>
  37. </view>
  38. </view>
  39. <image class="parameter_leftdian1" src="../../static/dian1.png" alt="" />
  40. <view class="parameter_lef2">
  41. <image src="../../static/dian2.png" mode=""></image>
  42. </view>
  43. <image class="parameter_leftche" src="../../static/che.png" mode=""></image>
  44. <view class="parameter_leftview">直流补电</view>
  45. </view>
  46. <view class="parameter_right">
  47. <view class="parameter_righttop">
  48. <view class="parameter_1">
  49. <view class="parameter_shan">
  50. <image src="../../static/shan.png" mode=""></image>
  51. <view class="parameter_SOCright">
  52. <view class="parameter_SOCright1">
  53. 充电功率
  54. </view>
  55. <view>
  56. <text class="parameter_SOCright2">{{((uidatasdata.ChargingStation_1_telemetryFrameccu_outputVoltage*uidatasdata.ChargingStation_1_telemetryFrameccu_chargeOutputCurrent)/1000).toFixed(2)}} </text><text> kW</text>
  57. </view>
  58. </view>
  59. </view>
  60. <view class="parameter_SOC">
  61. <image src="../../static/SOC.png" mode=""></image>
  62. <view class="parameter_SOCright">
  63. <view class="parameter_SOCright1">
  64. SOC
  65. </view>
  66. <view>
  67. <text class="parameter_SOCright2">{{uidatasdata.SOC}}</text><text> %</text>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="parameter_Battery">
  72. <image src="../../static/Battery.png" mode=""></image>
  73. <view class="parameter_SOCright">
  74. <view class="parameter_SOCright1">
  75. 电池状态
  76. </view>
  77. <view class="parameter_Batterystate">
  78. <view v-if="uidatasdata.bms_BatSysState==5">
  79. 故障
  80. </view>
  81. <view v-if="uidatasdata.bms_BatSysState==0">
  82. 出始化
  83. </view>
  84. <view v-if="uidatasdata.bms_BatSysState==1">
  85. 未上高压
  86. </view>
  87. <view v-if="uidatasdata.bms_BatSysState==2">
  88. 上高压中
  89. </view>
  90. <view v-if="uidatasdata.bms_BatSysState==3">
  91. 已上高压
  92. </view>
  93. <view v-if="uidatasdata.bms_BatSysState==4">
  94. 下高压中
  95. </view>
  96. <!-- {{uidatasdata.bms_BatSysState==0.00?'无效':'有效'}} -->
  97. </view>
  98. </view>
  99. </view>
  100. <view class="parameter_state">
  101. <image src="../../static/setup.png" mode=""></image>
  102. <view class="parameter_SOCright">
  103. <view class="parameter_SOCright1">
  104. 系统状态
  105. </view>
  106. <view class="parameter_Batterystate">
  107. <!-- {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} -->
  108. <!-- <view v-if="uidatasdata.bms_ChgLinkSt==0">
  109. 无连接
  110. </view>
  111. <view v-if="uidatasdata.bms_ChgLinkSt==1">
  112. 快充连接
  113. </view> -->
  114. <view v-if="uidatasdata.bms_ChargeStatus==0">
  115. 未充电
  116. </view>
  117. <view v-if="uidatasdata.bms_ChargeStatus==1">
  118. 充电中
  119. </view>
  120. <view v-if="uidatasdata.bms_ChargeStatus==2">
  121. 充电故障
  122. </view>
  123. <view v-if="uidatasdata.bms_ChargeStatus==3">
  124. 充满
  125. </view>
  126. <view v-if="uidatasdata.bms_ChargeStatus==4">
  127. 充电停止
  128. </view>
  129. <view v-if="uidatasdata.bms_ChargeStatus==5">
  130. 保留
  131. </view>
  132. </view>
  133. </view>
  134. </view>
  135. </view>
  136. </view>
  137. <view class="parameter_tap">
  138. <view :class="segmented==1?'parameter_tap1':'parameter_tap2'" @click="ontap(1)">
  139. 电池信息
  140. </view>
  141. <view :class="segmented==2?'parameter_tap1':'parameter_tap2'" @click="ontap(2)">
  142. 连接信息
  143. </view>
  144. <view :class="segmented==3?'parameter_tap1':'parameter_tap2'" @click="ontap(3)">
  145. 统计信息
  146. </view>
  147. <view :class="segmented==4?'parameter_tap1':'parameter_tap2'" @click="ontap(4)">
  148. 液冷信息
  149. </view>
  150. </view>
  151. <view class="parameter_zheng">
  152. <view class="parameter_box" v-if="segmented==1">
  153. <view class="parameter_zheng1">
  154. <view class="parameter_zheng11">
  155. <view class="parameter_zheng12">
  156. 电池功率
  157. </view>
  158. <view class="parameter_zheng13">
  159. {{uidatasdata.BatSysSt2_BatPower}} <text class="parameter_zheng14">KW</text>
  160. </view>
  161. </view>
  162. <view class="parameter_zheng11">
  163. <view class="parameter_zheng12">
  164. 电池内总压
  165. </view>
  166. <view class="parameter_zheng13">
  167. {{uidatasdata.BatSysSt2_BatSumVInt}} <text class="parameter_zheng14">V</text>
  168. </view>
  169. </view>
  170. <view class="parameter_zheng11">
  171. <view class="parameter_zheng12">
  172. 允许充电功率
  173. </view>
  174. <view class="parameter_zheng13">
  175. {{uidatasdata.DchChgCurPowLimit_MaxChargePowerLimit}} <text class="parameter_zheng14">KW</text>
  176. </view>
  177. </view>
  178. <view class="parameter_zheng11">
  179. <view class="parameter_zheng12">
  180. 最大单体电压
  181. </view>
  182. <view class="parameter_zheng13">
  183. {{uidatasdata.BatCellVPeak_ValMaxCellVoltage}} <text class="parameter_zheng14">v</text>
  184. </view>
  185. </view>
  186. <view class="parameter_zheng11">
  187. <view class="parameter_zheng12">
  188. 最大单体温度
  189. </view>
  190. <view class="parameter_zheng13">
  191. {{uidatasdata.BatSysLimitVal_MaxCellTemperatureLimit}} <text class="parameter_zheng14">℃</text>
  192. </view>
  193. </view>
  194. </view>
  195. <view class="parameter_zheng2">
  196. <view class="parameter_zheng11">
  197. <view class="parameter_zheng12">
  198. 电池电流
  199. </view>
  200. <view class="parameter_zheng13">
  201. {{uidatasdata.BatSysSt2_BatCur}} <text class="parameter_zheng14">A</text>
  202. </view>
  203. </view>
  204. <view class="parameter_zheng11">
  205. <view class="parameter_zheng12">
  206. 电池外总压
  207. </view>
  208. <view class="parameter_zheng13">
  209. {{uidatasdata.BatSysSt2_BatSumVOut}} <text class="parameter_zheng14">V</text>
  210. </view>
  211. </view>
  212. <view class="parameter_zheng11">
  213. <view class="parameter_zheng12">
  214. 允许充电电流
  215. </view>
  216. <view class="parameter_zheng13">
  217. {{uidatasdata.ChargingInformation_Chg_Max_Cur}}<text class="parameter_zheng14"> A</text>
  218. </view>
  219. </view>
  220. <view class="parameter_zheng11">
  221. <view class="parameter_zheng12">
  222. 最小单体电压
  223. </view>
  224. <view class="parameter_zheng13">
  225. {{uidatasdata.BatCellVPeak_ValMinCellVoltage }}<text class="parameter_zheng14"> v</text>
  226. </view>
  227. </view>
  228. <view class="parameter_zheng11">
  229. <view class="parameter_zheng12">
  230. 最小单体温度
  231. </view>
  232. <view class="parameter_zheng13">
  233. {{uidatasdata.CellTemperatureLimitsStatus_MinTemp}} <text class="parameter_zheng14"> ℃</text>
  234. </view>
  235. </view>
  236. </view>
  237. </view>
  238. <view class="parameter_box" v-if="segmented==2">
  239. <view class="parameter_zheng1">
  240. <view class="parameter_zheng11">
  241. <view class="parameter_zheng12">
  242. 电池系统工作模式
  243. </view>
  244. <view class="parameter_Batterystate">
  245. <!-- {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} -->
  246. <view v-if="uidatasdata.bms_BatSysWorkMode_==0">
  247. 无效
  248. </view>
  249. <view v-if="uidatasdata.bms_BatSysWorkMode_==1">
  250. 放电模式
  251. </view>
  252. <view v-if="uidatasdata.bms_BatSysWorkMode_==2">
  253. pcs充电模式
  254. </view>
  255. <view v-if="uidatasdata.bms_BatSysWorkMode_==3">
  256. 欧标充电模式
  257. </view>
  258. </view>
  259. </view>
  260. <view class="parameter_zheng11">
  261. <view class="parameter_zheng12">
  262. 电池系统状态
  263. </view>
  264. <view class="parameter_Batterystate">
  265. <!-- {{uidatasdata.bms_BatSysState==0.00?'无效':'有效'}} -->
  266. <view v-if="uidatasdata.bms_BatSysState==0">
  267. 初始化
  268. </view>
  269. <view v-if="uidatasdata.bms_BatSysState==1">
  270. 未上高压
  271. </view>
  272. <view v-if="uidatasdata.bms_BatSysState==2">
  273. 上高压中
  274. </view>
  275. <view v-if="uidatasdata.bms_BatSysState==3">
  276. 已上高压
  277. </view>
  278. <view v-if="uidatasdata.bms_BatSysState==4">
  279. 下高压中
  280. </view>
  281. <view v-if="uidatasdata.bms_BatSysState==5">
  282. 故障
  283. </view>
  284. </view>
  285. </view>
  286. <view class="parameter_zheng11">
  287. <view class="parameter_zheng12">
  288. 充电状态
  289. </view>
  290. <view class="parameter_Batterystate">
  291. <!-- {{uidatasdata.bms_ChargeStatus==0.00?'无效':'有效'}} -->
  292. <view v-if="uidatasdata.bms_ChargeStatus==0">
  293. 未充电
  294. </view>
  295. <view v-if="uidatasdata.bms_ChargeStatus==1">
  296. 充电中
  297. </view>
  298. <view v-if="uidatasdata.bms_ChargeStatus==2">
  299. 充电故障
  300. </view>
  301. <view v-if="uidatasdata.bms_ChargeStatus==3">
  302. 充满
  303. </view>
  304. <view v-if="uidatasdata.bms_ChargeStatus==4">
  305. 充电停止
  306. </view>
  307. <view v-if="uidatasdata.bms_ChargeStatus==5">
  308. 保留
  309. </view>
  310. </view>
  311. </view>
  312. </view>
  313. <view class="parameter_zheng2">
  314. <view class="parameter_zheng11">
  315. <view class="parameter_zheng12">
  316. 充电连接状态
  317. </view>
  318. <view class="parameter_Batterystate" v-if="uidatasdata.bms_ChgLinkSt==1.00">
  319. 快充连接
  320. </view>
  321. <view class="parameter_Batterystate" v-else>
  322. 无连接
  323. </view>
  324. </view>
  325. <view class="parameter_zheng11">
  326. <view class="parameter_zheng12">
  327. 电池故障等级
  328. </view>
  329. <view class="parameter_Batterystate">
  330. <!-- {{uidatasdata.bms_BatteryFaultLevl==0.00?'无故障':'有效'}} -->
  331. <view v-if="uidatasdata.bms_BatteryFaultLevl==0">
  332. 无故障
  333. </view>
  334. <view v-if="uidatasdata.bms_BatteryFaultLevl==1">
  335. 1级告警
  336. </view>
  337. <view v-if="uidatasdata.bms_BatteryFaultLevl==2">
  338. 2级告警
  339. </view>
  340. <view v-if="uidatasdata.bms_BatteryFaultLevl==3">
  341. 3级告警
  342. </view>
  343. </view>
  344. </view>
  345. </view>
  346. </view>
  347. <view class="parameter_box" v-if="segmented==3">
  348. <view class="parameter_zheng10">
  349. <view class="parameter_zheng11">
  350. <view class="parameter_zheng12">
  351. 交流累计充电电量
  352. </view>
  353. <view class="parameter_zheng13">
  354. {{uidatasdata.PCSACChargeEnergy}} <text class="parameter_zheng14">kWh</text>
  355. </view>
  356. </view>
  357. <view class="parameter_zheng11">
  358. <view class="parameter_zheng12">
  359. 直流累计充电电量
  360. </view>
  361. <view class="parameter_zheng13">
  362. {{uidatasdata.PCSDCDisChargeEnergy}} <text class="parameter_zheng14">kWh</text>
  363. </view>
  364. </view>
  365. </view>
  366. </view>
  367. <view class="parameter_box" v-if="segmented==4">
  368. <view class="parameter_zheng1">
  369. <view class="parameter_zheng11">
  370. <view class="parameter_zheng12">
  371. 工作模式
  372. </view>
  373. <view class="parameter_Batterystate">
  374. <!-- {{uidatasdata.TMS_Status_TMS_WORK_MODE}} <text class="parameter_zheng14">kW</text> -->
  375. <!-- {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} -->
  376. <view v-if="uidatasdata.TMS_Status_TMS_WORK_MODE==0">
  377. 关机模式
  378. </view>
  379. <view v-if="uidatasdata.TMS_Status_TMS_WORK_MODE==1">
  380. 制冷模式
  381. </view>
  382. <view v-if="uidatasdata.TMS_Status_TMS_WORK_MODE==2">
  383. 自热模式
  384. </view>
  385. <view v-if="uidatasdata.TMS_Status_TMS_WORK_MODE==3">
  386. 自循环模式
  387. </view>
  388. </view>
  389. </view>
  390. <view class="parameter_zheng11">
  391. <view class="parameter_zheng12">
  392. 出水温度
  393. </view>
  394. <view class="parameter_zheng13">
  395. {{uidatasdata.TMS_Status_TMS_WATEROUT_TEMP}} <text class="parameter_zheng14">℃</text>
  396. </view>
  397. </view>
  398. <view class="parameter_zheng11">
  399. <view class="parameter_zheng12">
  400. 需求功率
  401. </view>
  402. <view class="parameter_zheng13">
  403. {{uidatasdata.TMS_Status_TMS_POWER_REQ}} <text class="parameter_zheng14">kW</text>
  404. </view>
  405. </view>
  406. </view>
  407. <view class="parameter_zheng2">
  408. <view class="parameter_zheng11">
  409. <view class="parameter_zheng12">
  410. 高压继电器状态
  411. </view>
  412. <view class="parameter_Batterystate">
  413. <!-- {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} -->
  414. <view v-if="uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0">
  415. 断开状态
  416. </view>
  417. <view v-if="uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==1">
  418. 闭合状态
  419. </view>
  420. </view>
  421. </view>
  422. <view class="parameter_zheng11">
  423. <view class="parameter_zheng12">
  424. 入水温度
  425. </view>
  426. <view class="parameter_zheng13">
  427. {{uidatasdata.TMS_Status_TMS_WATERIN_TEMP}} <text class="parameter_zheng14">℃</text>
  428. </view>
  429. </view>
  430. <view class="parameter_zheng11">
  431. <view class="parameter_zheng12">
  432. 故障等级
  433. </view>
  434. <view class="parameter_Batterystate">
  435. <!-- {{uidatasdata.TMS_Status_TMS_ERR_LEVEL==0.00?'无效':'有效'}} -->
  436. <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==0">
  437. 无故障
  438. </view>
  439. <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==1">
  440. 1级故障
  441. </view>
  442. <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==2">
  443. 2级故障
  444. </view>
  445. <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==3">
  446. 3级故障
  447. </view>
  448. </view>
  449. </view>
  450. </view>
  451. </view>
  452. <view class="parameter_zheng3">
  453. <view v-if="uidatasdata.SysControl_RunCmd==1" class="parameter_zheng31">
  454. <view class="parameter_zheng32ccc">
  455. 开启
  456. </view>
  457. </view>
  458. <view v-else class="parameter_zheng31" @click="dialogToggle">
  459. <view class="parameter_zheng32">
  460. 开启
  461. </view>
  462. </view>
  463. <view class="parameter_zheng31" v-if="uidatasdata.SysControl_RunCmd==0">
  464. <view class="parameter_zheng32ccc">
  465. 停止
  466. </view>
  467. </view>
  468. <view class="parameter_zheng31" v-else @click="onstopit">
  469. <view class="parameter_zheng33">
  470. 停止
  471. </view>
  472. </view>
  473. </view>
  474. </view>
  475. <view class="parameter_home">
  476. <view class="parameter_home1" @click="onreturn">
  477. <image src="../../static/home.png" mode=""></image><text
  478. class="parameter_hometext">返回模式选择</text>
  479. </view>
  480. <view class="parameter_home2">
  481. <image src="../../static/home1.png" mode=""></image>
  482. <text class="parameter_home3" v-for="(item,index) in faultsdata" :key="index"> {{item["CONTENT"]}}</text>
  483. </view>
  484. </view>
  485. </view>
  486. </view>
  487. <uni-popup ref="alertDialog" @maskClick="dialogClose">
  488. <uni-popup-dialog :mode="modeinput" placeholder="请输入内容" v-model="value" :type="successtype"
  489. cancelText="取消返回" :confirmText="confirmText" :title="title" :content="content" @confirm="dialogConfirm"
  490. @close="dialogClose"></uni-popup-dialog>
  491. </uni-popup>
  492. </view>
  493. </template>
  494. <script>
  495. import Gauge from "../../uni_modules/jerry-gauge/index.js";
  496. import {getuidatas,getfaultsList,control} from "../../api/api.js";
  497. import {getTime} from "../../utils/index.js";
  498. export default {
  499. data() {
  500. return {
  501. successtype: 'success',
  502. confirmText: '确认启动',
  503. title: '你确定要开启该设备吗?',
  504. content: '启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!',
  505. value: '',
  506. modeinput: '',
  507. segmented: 1,
  508. uidatasdata:{},
  509. uidatas:'',
  510. formatTimeid:'',
  511. formattedTime:getTime('yyyy年MM月dd日 hh:mm:ss'),
  512. faultsdata:[]
  513. }
  514. },
  515. onLoad() {
  516. },
  517. mounted() {
  518. this.formatTimeid = setInterval(() => {
  519. const customFormat = 'yyyy年MM月dd日 hh:mm:ss';
  520. this.formattedTime = getTime(customFormat);
  521. }, 1000);
  522. this.onfaultsList();
  523. this.onfaultsdata();
  524. setTimeout(() => {
  525. let SOC = (this.uidatasdata.SOC*1).toFixed(0)
  526. new Gauge({
  527. canvasId: "canvas2",
  528. value: SOC,
  529. lineWidth: 20,
  530. progressColor: ["#B0D0FF", "#5B8FF9"],
  531. valueColor: "blue",
  532. });
  533. }, 500); // 10秒后隐藏消息
  534. },
  535. beforeUnmount(){
  536. clearInterval(this.uidatas);
  537. clearInterval(this.formatTimeid);
  538. },
  539. methods: {
  540. onfaultsList(){
  541. let data ={
  542. ID: "3224a3eb-2375-4dfc-99ce-b182edd30996",
  543. page: 1,
  544. rows: 10000,
  545. }
  546. getuidatas(data).then(data => {
  547. if(data.status=='ok'){
  548. if(!data.data){
  549. this.uidatas = setTimeout(() => {
  550. this.onfaultsList();
  551. }, 1000); // 10秒后隐藏消息
  552. }
  553. this.uidatasdata = data.data.reduce((obj, item) => {
  554. let a = item.module;
  555. let b = item[a];
  556. let numericValue = parseFloat(b); // 转换为数字
  557. let roundedValue =''
  558. if(item.id=="BatCellVPeak_ValMaxCellVoltage"||
  559. item.id=="BatSysLimitVal_MaxCellTemperatureLimit"||
  560. item.id=="BatCellVPeak_ValMinCellVoltage"||
  561. item.id=="CellTemperatureLimitsStatus_MinTemp"
  562. ){
  563. roundedValue = isNaN(numericValue) ? b : numericValue.toFixed(3);
  564. }else{
  565. roundedValue = isNaN(numericValue) ? b : numericValue.toFixed(2);
  566. }
  567. return { ...obj, [item.id]: roundedValue };
  568. }, {});
  569. console.log(this.uidatasdata);
  570. this.uidatas =setTimeout(() => {
  571. this.onfaultsList();
  572. }, 1000); // 10秒后隐藏消息
  573. }else{
  574. this.uidatasdata={}
  575. this.uidatas =setTimeout(() => {
  576. this.onfaultsList();
  577. }, 1000); // 10秒后隐藏消息
  578. }
  579. }).catch(error => {
  580. this.uidatasdata={}
  581. this.uidatas =setTimeout(() => {
  582. this.onfaultsList();
  583. }, 1000); // 10秒后隐藏消息
  584. });
  585. },
  586. onfaultsdata(){
  587. let data ={
  588. page:1,
  589. rows:1,
  590. device: '',
  591. starttime: '',
  592. endtime: '',
  593. rt: 1,
  594. type:''
  595. }
  596. getfaultsList(data).then(res => {
  597. console.log(res);
  598. if(res.status=='ok'){
  599. this.faultsdata= res.data.list
  600. }else{
  601. }
  602. });
  603. },
  604. // 返回首页
  605. onreturn() {
  606. uni.redirectTo({
  607. url: '/pages/index/index'
  608. });
  609. },
  610. // 启动设备弹窗
  611. dialogToggle() {
  612. this.modeinput = 'base'
  613. this.successtype = 'success'
  614. this.confirmText = '确认启动'
  615. this.title = '你确定要开启该设备吗?'
  616. this.content = '启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!'
  617. this.$refs.alertDialog.open()
  618. },
  619. onstopit() {
  620. this.modeinput = 'base'
  621. this.successtype = 'error'
  622. this.confirmText = '确认停止'
  623. this.title = '你确定要停止该设备吗?'
  624. this.content = '设备完全停止后,方能进行后续操作,否则可能危及生命安全!'
  625. this.$refs.alertDialog.open()
  626. },
  627. // 确认弹窗
  628. dialogConfirm() {
  629. let _this =this
  630. let data = {
  631. id: "c35c4db0-113f-442a-9e26-728489265fdb",
  632. issaveinitvalue:false,
  633. value: this.confirmText=='确认启动'?'1':'0'
  634. }
  635. control(data).then(data => {
  636. // console.log(data);
  637. if (data.status == 'ok') {
  638. uni.showToast({
  639. title:'操作成功',
  640. icon: 'none',
  641. duration: 2000, // 显示时长,单位为毫秒
  642. });
  643. } else {
  644. uni.showToast({
  645. title: '操作失败',
  646. icon: 'none', // 使用 'none' 图标来表示失败
  647. duration: 2000, // 显示时长,单位为毫秒
  648. });
  649. }
  650. });
  651. },
  652. dialogClose() {
  653. console.log(this.value);
  654. this.$refs.alertDialog.close()
  655. },
  656. ontap(e) {
  657. console.log(e);
  658. this.segmented = e;
  659. }
  660. }
  661. }
  662. </script>
  663. <style scoped>
  664. .content {
  665. width: 100%;
  666. height: 100vh;
  667. opacity: 1;
  668. background: linear-gradient(180deg, rgba(215, 230, 245, 0) 0%, rgba(196, 229, 255, 1) 100%);
  669. box-sizing: border-box;
  670. }
  671. .top {
  672. width: 100%;
  673. height: 100px;
  674. display: flex;
  675. align-items: center;
  676. justify-content: space-between;
  677. background-size: 100% 100%;
  678. background-repeat: no-repeat;
  679. box-sizing: border-box;
  680. background-color: #fff;
  681. padding: 0px 46px;
  682. }
  683. .top_logo {
  684. width: 426px;
  685. height: 68px;
  686. }
  687. .tite {
  688. width: 277px;
  689. height: 48px;
  690. }
  691. .time {
  692. text-align: right;
  693. }
  694. .time_top {
  695. font-size: 17px;
  696. }
  697. .time_bottom {
  698. display: flex;
  699. font-size: 17px;
  700. justify-content: space-between;
  701. }
  702. .time_bottom1 {
  703. display: flex;
  704. }
  705. .time_state {
  706. font-size: 17px;
  707. font-weight: 600;
  708. color: rgba(22, 68, 144, 1);
  709. }
  710. .time_state1 {
  711. font-size: 17px;
  712. font-weight: 600;
  713. color: rgba(217, 22, 22, 1);
  714. }
  715. .parameter {
  716. width: 100%;
  717. padding-bottom: 20px;
  718. display: flex;
  719. padding: 20px 20px;
  720. box-sizing: border-box;
  721. }
  722. .parameter_left {
  723. width: 262.85px;
  724. height: 630px;
  725. opacity: 1;
  726. border-radius: 24.47px;
  727. background: linear-gradient(180deg, rgba(42, 150, 212, 0.1) 0%, rgba(42, 146, 209, 0) 100%);
  728. border: 2.94px solid rgba(242, 248, 252, 1);
  729. display: flex;
  730. flex-direction: column;
  731. align-items: center;
  732. padding: 20rpx 0px;
  733. }
  734. .parameter_left1 {
  735. width: 100%;
  736. height: 158px;
  737. box-sizing: border-box;
  738. display: flex;
  739. flex-direction: column;
  740. justify-content: space-between;
  741. align-items: center;
  742. padding-bottom: 16px;
  743. }
  744. .canvas {
  745. width: 180px;
  746. margin: 8px auto auto auto;
  747. }
  748. .parameter_canvas {
  749. width: 100%;
  750. display: flex;
  751. justify-content: space-around;
  752. box-sizing: border-box;
  753. box-sizing: border-box;
  754. margin-top: 8px;
  755. }
  756. .parameter_canvas1 {
  757. margin-left: -20px;
  758. }
  759. .parameter_canvas2 {
  760. margin-right: -20px;
  761. }
  762. .parameter_leftdian1 {
  763. width: 97.9px;
  764. height: 97.9px;
  765. opacity: 1;
  766. }
  767. .parameter_lef2 {
  768. width: 100%;
  769. height: 210px;
  770. display: flex;
  771. justify-content: center;
  772. align-items: center;
  773. background-image: url("../../static/heng.png");
  774. background-size: auto 100%;
  775. background-repeat: no-repeat;
  776. background-position: center center;
  777. margin: 10px 0px;
  778. image {
  779. width: 100px;
  780. height: 100px;
  781. margin-top: -10px;
  782. }
  783. }
  784. .parameter_leftche {
  785. width: 115.52px;
  786. height: 78.32px;
  787. opacity: 1;
  788. }
  789. .parameter_leftche1 {
  790. width: 77px;
  791. height: 81px;
  792. opacity: 1;
  793. }
  794. .parameter_leftche2 {
  795. width: 77px;
  796. height: 62px;
  797. }
  798. .parameter_leftview {
  799. font-size: 19.58px;
  800. font-weight: 400;
  801. letter-spacing: 0px;
  802. line-height: 28.35px;
  803. color: rgba(0, 0, 0, 1);
  804. margin-top: 8px;
  805. }
  806. .parameter_right {
  807. flex: 1;
  808. margin-left: 10px;
  809. display: flex;
  810. flex-direction: column;
  811. justify-content: space-between;
  812. }
  813. .parameter_righttop {
  814. width: 100%;
  815. }
  816. .parameter_1 {
  817. display: flex;
  818. justify-content: space-between;
  819. }
  820. .parameter_2 {
  821. width: 339.21px;
  822. display: flex;
  823. flex-direction: column;
  824. justify-content: space-between;
  825. margin-right: 16px;
  826. }
  827. .parameter_3 {
  828. width: 339.21px;
  829. display: flex;
  830. align-items: center;
  831. justify-content: space-between;
  832. padding: 12px 20px;
  833. box-sizing: border-box;
  834. border-radius: 9.79px;
  835. background: linear-gradient(180deg, rgba(93, 189, 245, 0.15) 0%, rgba(31, 141, 209, 0.15) 100%);
  836. image {
  837. width: 7.83px;
  838. height: 7.83px;
  839. margin-right: 6px;
  840. }
  841. }
  842. .parameter_31 {
  843. width: 339.21px;
  844. display: flex;
  845. align-items: center;
  846. justify-content: space-between;
  847. padding: 3px 20px;
  848. box-sizing: border-box;
  849. border-radius: 9.79px;
  850. background: linear-gradient(180deg, rgba(93, 189, 245, 0.15) 0%, rgba(31, 141, 209, 0.15) 100%);
  851. image {
  852. width: 7.83px;
  853. height: 7.83px;
  854. margin-right: 6px;
  855. }
  856. }
  857. .parameter_4 {
  858. /** 文本1 */
  859. font-size: 23.5px;
  860. font-weight: 700;
  861. color: rgba(38, 38, 38, 1);
  862. display: flex;
  863. align-items: center;
  864. }
  865. .parameter_5 {
  866. font-size: 24.47px;
  867. font-weight: 700;
  868. color: rgba(217, 22, 22, 1);
  869. }
  870. .parameter_51 {
  871. font-size: 24.47px;
  872. font-weight: 700;
  873. color: rgba(7, 123, 67, 1);
  874. }
  875. .parameter_shan{
  876. display: flex;
  877. align-items: center;
  878. justify-content: space-around;
  879. width: 220px;
  880. height: 130px;
  881. /* opacity: 0.15; */
  882. border-radius: 9.79px;
  883. margin-right: 16px;
  884. background: linear-gradient(180deg, rgba(93, 189, 245, 0.15) 0%, rgba(31, 141, 209, 0.15) 100%);
  885. image {
  886. width: 22px;
  887. height: 37.2px;
  888. }
  889. }
  890. .parameter_SOC {
  891. display: flex;
  892. align-items: center;
  893. justify-content: space-around;
  894. width: 220px;
  895. height: 130px;
  896. /* opacity: 0.15; */
  897. border-radius: 9.79px;
  898. margin-right: 16px;
  899. background: linear-gradient(180deg, rgba(240, 209, 137, 0.15) 0%, rgba(186, 141, 56, 0.15) 100%);
  900. image {
  901. width: 37.2px;
  902. height: 37.2px;
  903. }
  904. }
  905. .parameter_state {
  906. display: flex;
  907. align-items: center;
  908. justify-content: space-around;
  909. width: 220px;
  910. height: 130px;
  911. /* opacity: 0.15; */
  912. border-radius: 9.79px;
  913. background: linear-gradient(180deg, rgba(93, 149, 245, 0.15) 0%, rgba(41, 71, 204, 0.15) 100%);
  914. image {
  915. width: 37.2px;
  916. height: 37.2px;
  917. }
  918. }
  919. .parameter_Battery {
  920. display: flex;
  921. align-items: center;
  922. justify-content: space-around;
  923. width: 220px;
  924. height: 130px;
  925. /* opacity: 0.15; */
  926. margin-right: 16px;
  927. border-radius: 9.79px;
  928. background: linear-gradient(180deg, rgba(133, 242, 133, 0.15)0%, rgba(82, 209, 75, 0.15)100%);
  929. image {
  930. width: 37.2px;
  931. height: 37.2px;
  932. }
  933. }
  934. .parameter_SOCright {
  935. display: flex;
  936. flex-direction: column;
  937. }
  938. .parameter_SOCright1 {
  939. font-size: 23.5px;
  940. font-weight: 700;
  941. letter-spacing: 0px;
  942. line-height: 32.24px;
  943. color: rgba(38, 38, 38, 1);
  944. text-align: right;
  945. }
  946. .parameter_SOCright2 {
  947. font-size: 29.37px;
  948. font-weight: 700;
  949. color: rgba(186, 141, 56, 1);
  950. }
  951. .parameter_Batterystate {
  952. font-size: 23.5px;
  953. font-weight: 500;
  954. color: rgba(38, 38, 38, 1);
  955. text-align: right;
  956. }
  957. .parameter_tap {
  958. width: 100%;
  959. display: flex;
  960. margin-top: 18px;
  961. }
  962. .parameter_tap1 {
  963. flex: 1;
  964. height: 55.8px;
  965. opacity: 1;
  966. background: linear-gradient(180deg, rgba(30, 131, 189, 1) 0%, rgba(69, 168, 230, 0.92) 100%);
  967. box-shadow: inset 0px 0px 9.79px rgba(0, 0, 0, 0.1);
  968. display: flex;
  969. align-items: center;
  970. justify-content: center;
  971. font-size: 23.5px;
  972. font-weight: 500;
  973. color: rgba(255, 255, 255, 1);
  974. }
  975. .parameter_tap2 {
  976. flex: 1;
  977. height: 55.8px;
  978. opacity: 1;
  979. background: rgba(242, 242, 242, 1);
  980. box-shadow: inset 0px 0px 9.79px rgba(0, 0, 0, 0.1);
  981. display: flex;
  982. align-items: center;
  983. justify-content: center;
  984. font-size: 23.5px;
  985. font-weight: 500;
  986. }
  987. .parameter_zheng {
  988. width: 100%;
  989. height: 313px;
  990. background-image: url("../../static/z16.png");
  991. background-size: 100% 100%;
  992. margin-top: 10px;
  993. padding: 20px 0px;
  994. display: flex;
  995. }
  996. .parameter_zheng1 {
  997. width: 387px;
  998. height: 100%;
  999. border-right: 0.49px solid rgba(0, 0, 0, 1);
  1000. display: flex;
  1001. flex-direction: column;
  1002. justify-content: space-between;
  1003. }
  1004. .parameter_zheng11 {
  1005. display: flex;
  1006. padding: 0px 20px;
  1007. justify-content: space-between;
  1008. }
  1009. .parameter_zheng12 {
  1010. font-size: 23.5px;
  1011. font-weight: 400;
  1012. color: rgba(0, 0, 0, 1);
  1013. }
  1014. .parameter_zheng13 {
  1015. font-size: 29.37px;
  1016. font-weight: 700;
  1017. color: rgba(20, 105, 201, 1);
  1018. }
  1019. .parameter_zheng14 {
  1020. font-size: 23.5px;
  1021. font-weight: 400;
  1022. color: rgba(0, 0, 0, 1);
  1023. }
  1024. .parameter_zheng2 {
  1025. width: 387px;
  1026. height: 100%;
  1027. border-right: 0.49px solid rgba(0, 0, 0, 1);
  1028. display: flex;
  1029. flex-direction: column;
  1030. justify-content: space-between;
  1031. }
  1032. .parameter_zheng3 {
  1033. flex: 1;
  1034. height: 100%;
  1035. display: flex;
  1036. flex-direction: column;
  1037. align-items: center;
  1038. justify-content: space-around;
  1039. }
  1040. .parameter_zheng31 {
  1041. width: 75px;
  1042. height: 75px;
  1043. background-image: url("../../static/y4.png");
  1044. background-size: 100% 100%;
  1045. display: flex;
  1046. align-items: center;
  1047. justify-content: center;
  1048. }
  1049. .parameter_zheng32 {
  1050. width: 66px;
  1051. height: 66px;
  1052. background-image: url("../../static/y1.png");
  1053. background-size: 100% 100%;
  1054. display: flex;
  1055. align-items: center;
  1056. justify-content: center;
  1057. font-size: 19.58px;
  1058. font-weight: 700;
  1059. color: rgba(255, 255, 255, 1);
  1060. }
  1061. .parameter_zheng32ccc {
  1062. width: 66px;
  1063. height: 66px;
  1064. /* background-image: url("../../static/y1.png"); */
  1065. background-color: #cccccc;
  1066. background-size: 100% 100%;
  1067. display: flex;
  1068. align-items: center;
  1069. justify-content: center;
  1070. font-size: 19.58px;
  1071. font-weight: 700;
  1072. color: rgba(255, 255, 255, 1);
  1073. border-radius: 100%;
  1074. }
  1075. .parameter_zheng33 {
  1076. width: 66px;
  1077. height: 66px;
  1078. background-image: url("../../static/y6.png");
  1079. background-size: 100% 100%;
  1080. display: flex;
  1081. align-items: center;
  1082. justify-content: center;
  1083. font-size: 19px;
  1084. font-weight: 700;
  1085. color: rgba(255, 255, 255, 1);
  1086. }
  1087. .parameter_zheng34 {
  1088. width: 66px;
  1089. height: 66px;
  1090. background-image: url("../../static/y8.png");
  1091. background-size: 100% 100%;
  1092. font-size: 18px;
  1093. font-weight: 700;
  1094. color: rgba(255, 255, 255, 1);
  1095. display: flex;
  1096. flex-direction: column;
  1097. align-items: center;
  1098. justify-content: center;
  1099. }
  1100. .parameter_home {
  1101. width: 100%;
  1102. display: flex;
  1103. margin-top: 0px;
  1104. justify-content: space-between;
  1105. }
  1106. .parameter_home1 {
  1107. display: flex;
  1108. align-items: center;
  1109. image {
  1110. width: 32.8px;
  1111. height: 32.31px;
  1112. margin-right: 10px;
  1113. }
  1114. }
  1115. .parameter_hometext {
  1116. font-size: 19.58px;
  1117. font-weight: 400;
  1118. color: rgba(0, 0, 0, 1);
  1119. }
  1120. .parameter_home2 {
  1121. width: 636.33px;
  1122. height: 39.16px;
  1123. opacity: 0.8;
  1124. border-radius: 0.98px;
  1125. background: rgba(242, 242, 242, 1);
  1126. border: 0.49px solid rgba(161, 161, 161, 1);
  1127. box-shadow: inset 0px 0px 9.79px rgba(0, 0, 0, 0.1);
  1128. display: flex;
  1129. align-items: center;
  1130. padding: 0px 10px;
  1131. box-sizing: border-box;
  1132. image {
  1133. width: 26.92px;
  1134. height: 29.86px;
  1135. }
  1136. }
  1137. .parameter_home3 {
  1138. font-size: 17.62px;
  1139. font-weight: 400;
  1140. color: rgba(0, 0, 0, 1);
  1141. margin-left: 10px;
  1142. }
  1143. .uni-dialog-title-text {
  1144. font-size: 70.89px !important;
  1145. font-weight: 500;
  1146. color: rgba(5, 5, 5, 1);
  1147. }
  1148. .parameter_box{
  1149. display: flex;
  1150. }
  1151. .parameter_zheng10{
  1152. width: 687px;
  1153. height: 100%;
  1154. border-right: 0.49px solid rgba(0, 0, 0, 1);
  1155. display: flex;
  1156. flex-direction: column;
  1157. justify-content: space-around;
  1158. }
  1159. </style>