移动储能车V1版本
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

index.vue 32KB

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