center_page.py 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. #!/usr/bin/env python
  2. # -*- encoding: utf-8 -*-
  3. import os
  4. from ui.own.frame_theme import MyFrame
  5. from ui.own.palette_theme import set_edt_bg
  6. from utils.qt import QtWidgets, QtGui, QIcon, QPixmap, Qt, QColor
  7. from utils.resource import resource_path
  8. from utils.globalvar import SD
  9. class CenterPage(QtWidgets.QWidget):
  10. def __init__(self, parent=None):
  11. super(CenterPage, self).__init__(parent)
  12. self.initUI()
  13. def initUI(self):
  14. self.verticalLayout = QtWidgets.QVBoxLayout(self)
  15. self.verticalLayout.setContentsMargins(0, 0, 0, 0)
  16. self.verticalLayout.setSpacing(0)
  17. # 设置参数
  18. self.center_widget = MyFrame(self)
  19. self.center_layout = QtWidgets.QVBoxLayout(self.center_widget)
  20. self.center_layout.setContentsMargins(0, 0, 0, 0)
  21. self.center_layout.setSpacing(0)
  22. self.center_groupbox = QtWidgets.QGroupBox(self.center_widget)
  23. self.center_groupbox.setTitle("告警信息" if SD.SYSTEM_LANGUAGE == 0 else "Warn")
  24. self.center_groupbox_layout = QtWidgets.QHBoxLayout(self.center_groupbox)
  25. self.center_qscrollarea = QtWidgets.QScrollArea(self.center_groupbox)
  26. self.center_qscrollarea.setWidgetResizable(True)
  27. self.center_groupbox_layout.addWidget(self.center_qscrollarea,9)
  28. self.center_qwidget = QtWidgets.QWidget()
  29. self.center_qscrollarea.setWidget(self.center_qwidget)
  30. self.center_qscrollarea_layout = QtWidgets.QGridLayout(self.center_qwidget)
  31. self.center_qscrollarea_layout.setObjectName("scrollLayout")
  32. self.center_qscrollarea_layout.setContentsMargins(0, 0, 0, 0)
  33. self.center_qscrollarea_layout.setSpacing(0)
  34. self.over_cell_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  35. self.over_cell_warn.setText("单体过压告警" if SD.SYSTEM_LANGUAGE == 0 else "Warn")
  36. self.over_cell_warn.setAlignment(Qt.AlignCenter)
  37. self.over_cell_warn.setReadOnly(True)
  38. set_edt_bg(self.over_cell_warn, QColor(Qt.gray))
  39. self.center_qscrollarea_layout.addWidget(self.over_cell_warn, 0, 0, 1, 1)
  40. self.under_cell_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  41. self.under_cell_warn.setText("单体欠压告警")
  42. self.under_cell_warn.setAlignment(Qt.AlignCenter)
  43. self.under_cell_warn.setReadOnly(True)
  44. set_edt_bg(self.under_cell_warn, QColor(Qt.gray))
  45. self.center_qscrollarea_layout.addWidget(self.under_cell_warn, 0, 1, 1, 1)
  46. self.hv_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  47. self.hv_warn.setText("总压过压告警")
  48. self.hv_warn.setAlignment(Qt.AlignCenter)
  49. self.hv_warn.setReadOnly(True)
  50. set_edt_bg(self.hv_warn, QColor(Qt.gray))
  51. self.center_qscrollarea_layout.addWidget(self.hv_warn, 0, 2, 1, 1)
  52. self.lv_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  53. self.lv_warn.setText("总压欠压告警")
  54. self.lv_warn.setAlignment(Qt.AlignCenter)
  55. self.lv_warn.setReadOnly(True)
  56. set_edt_bg(self.lv_warn, QColor(Qt.gray))
  57. self.center_qscrollarea_layout.addWidget(self.lv_warn, 0, 3, 1, 1)
  58. self.chg_lt_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  59. self.chg_lt_warn.setText("充电低温告警")
  60. self.chg_lt_warn.setAlignment(Qt.AlignCenter)
  61. self.chg_lt_warn.setReadOnly(True)
  62. set_edt_bg(self.chg_lt_warn, QColor(Qt.gray))
  63. self.center_qscrollarea_layout.addWidget(self.chg_lt_warn, 0, 4, 1, 1)
  64. self.chg_ht_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  65. self.chg_ht_warn.setText("充电高温告警")
  66. self.chg_ht_warn.setAlignment(Qt.AlignCenter)
  67. self.chg_ht_warn.setReadOnly(True)
  68. set_edt_bg(self.chg_ht_warn, QColor(Qt.gray))
  69. self.center_qscrollarea_layout.addWidget(self.chg_ht_warn, 0, 5, 1, 1)
  70. self.dchg_ht_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  71. self.dchg_ht_warn.setText("放电高温告警")
  72. self.dchg_ht_warn.setAlignment(Qt.AlignCenter)
  73. self.dchg_ht_warn.setReadOnly(True)
  74. set_edt_bg(self.dchg_ht_warn, QColor(Qt.gray))
  75. self.center_qscrollarea_layout.addWidget(self.dchg_ht_warn, 0, 6, 1, 1)
  76. self.dchg_lt_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  77. self.dchg_lt_warn.setText("放电低温告警")
  78. self.dchg_lt_warn.setAlignment(Qt.AlignCenter)
  79. self.dchg_lt_warn.setReadOnly(True)
  80. set_edt_bg(self.dchg_lt_warn, QColor(Qt.gray))
  81. self.center_qscrollarea_layout.addWidget(self.dchg_lt_warn, 0, 7, 1, 1)
  82. self.chg_hcur_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  83. self.chg_hcur_warn.setText("充电过流告警")
  84. self.chg_hcur_warn.setAlignment(Qt.AlignCenter)
  85. self.chg_hcur_warn.setReadOnly(True)
  86. set_edt_bg(self.chg_hcur_warn, QColor(Qt.gray))
  87. self.center_qscrollarea_layout.addWidget(self.chg_hcur_warn, 0, 8, 1, 1)
  88. self.dchg_hcur_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  89. self.dchg_hcur_warn.setText("放电过流告警")
  90. self.dchg_hcur_warn.setAlignment(Qt.AlignCenter)
  91. self.dchg_hcur_warn.setReadOnly(True)
  92. set_edt_bg(self.dchg_hcur_warn, QColor(Qt.gray))
  93. self.center_qscrollarea_layout.addWidget(self.dchg_hcur_warn, 0, 9, 1, 1)
  94. self.diff_cell_temp_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  95. self.diff_cell_temp_warn.setText("单体温差告警")
  96. self.diff_cell_temp_warn.setAlignment(Qt.AlignCenter)
  97. self.diff_cell_temp_warn.setReadOnly(True)
  98. set_edt_bg(self.diff_cell_temp_warn, QColor(Qt.gray))
  99. self.center_qscrollarea_layout.addWidget(self.diff_cell_temp_warn, 1, 0, 1, 1)
  100. self.diff_cell_vol_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  101. self.diff_cell_vol_warn.setText("单体压差告警")
  102. self.diff_cell_vol_warn.setAlignment(Qt.AlignCenter)
  103. self.diff_cell_vol_warn.setReadOnly(True)
  104. set_edt_bg(self.diff_cell_vol_warn, QColor(Qt.gray))
  105. self.center_qscrollarea_layout.addWidget(self.diff_cell_vol_warn, 1, 1, 1, 1)
  106. self.against_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  107. self.against_warn.setText("绝缘过低告警")
  108. self.against_warn.setAlignment(Qt.AlignCenter)
  109. self.against_warn.setReadOnly(True)
  110. set_edt_bg(self.against_warn, QColor(Qt.gray))
  111. self.center_qscrollarea_layout.addWidget(self.against_warn, 1, 2, 1, 1)
  112. self.p_against_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  113. self.p_against_warn.setText("正极绝缘过低告警")
  114. self.p_against_warn.setAlignment(Qt.AlignCenter)
  115. self.p_against_warn.setReadOnly(True)
  116. set_edt_bg(self.p_against_warn, QColor(Qt.gray))
  117. self.center_qscrollarea_layout.addWidget(self.p_against_warn, 1, 3, 1, 1)
  118. self.n_against_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  119. self.n_against_warn.setText("负极绝缘过低告警")
  120. self.n_against_warn.setAlignment(Qt.AlignCenter)
  121. self.n_against_warn.setReadOnly(True)
  122. set_edt_bg(self.n_against_warn, QColor(Qt.gray))
  123. self.center_qscrollarea_layout.addWidget(self.n_against_warn, 1, 4, 1, 1)
  124. self.against_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  125. self.against_fault.setText("绝缘监测故障")
  126. self.against_fault.setAlignment(Qt.AlignCenter)
  127. self.against_fault.setReadOnly(True)
  128. set_edt_bg(self.against_fault, QColor(Qt.gray))
  129. self.center_qscrollarea_layout.addWidget(self.against_fault, 1, 5, 1, 1)
  130. self.vol_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  131. self.vol_fault.setText("总压检测故障")
  132. self.vol_fault.setAlignment(Qt.AlignCenter)
  133. self.vol_fault.setReadOnly(True)
  134. set_edt_bg(self.vol_fault, QColor(Qt.gray))
  135. self.center_qscrollarea_layout.addWidget(self.vol_fault, 1, 6, 1, 1)
  136. self.cur_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  137. self.cur_fault.setText("电流检测故障")
  138. self.cur_fault.setAlignment(Qt.AlignCenter)
  139. self.cur_fault.setReadOnly(True)
  140. set_edt_bg(self.cur_fault, QColor(Qt.gray))
  141. self.center_qscrollarea_layout.addWidget(self.cur_fault, 1, 7, 1, 1)
  142. self.ccu_control_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  143. self.ccu_control_fault.setText("总控通讯故障")
  144. self.ccu_control_fault.setAlignment(Qt.AlignCenter)
  145. self.ccu_control_fault.setReadOnly(True)
  146. set_edt_bg(self.ccu_control_fault, QColor(Qt.gray))
  147. self.center_qscrollarea_layout.addWidget(self.ccu_control_fault, 1, 8, 1, 1)
  148. self.bmu_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  149. self.bmu_fault.setText("BMU通讯故障")
  150. self.bmu_fault.setAlignment(Qt.AlignCenter)
  151. self.bmu_fault.setReadOnly(True)
  152. set_edt_bg(self.bmu_fault, QColor(Qt.gray))
  153. self.center_qscrollarea_layout.addWidget(self.bmu_fault, 1, 9, 1, 1)
  154. self.stop_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  155. self.stop_fault.setText("急停")
  156. self.stop_fault.setAlignment(Qt.AlignCenter)
  157. self.stop_fault.setReadOnly(True)
  158. set_edt_bg(self.stop_fault, QColor(Qt.gray))
  159. self.center_qscrollarea_layout.addWidget(self.stop_fault, 2, 0, 1, 1)
  160. self.ntc_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  161. self.ntc_fault.setText("NTC故障")
  162. self.ntc_fault.setAlignment(Qt.AlignCenter)
  163. self.ntc_fault.setReadOnly(True)
  164. set_edt_bg(self.ntc_fault, QColor(Qt.gray))
  165. self.center_qscrollarea_layout.addWidget(self.ntc_fault, 2, 1, 1, 1)
  166. self.afe_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  167. self.afe_fault.setText("AFE失效")
  168. self.afe_fault.setAlignment(Qt.AlignCenter)
  169. self.afe_fault.setReadOnly(True)
  170. set_edt_bg(self.afe_fault, QColor(Qt.gray))
  171. self.center_qscrollarea_layout.addWidget(self.afe_fault, 2, 2, 1, 1)
  172. self.p_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  173. self.p_fault.setText("主正接触器故障")
  174. self.p_fault.setAlignment(Qt.AlignCenter)
  175. self.p_fault.setReadOnly(True)
  176. set_edt_bg(self.p_fault, QColor(Qt.gray))
  177. self.center_qscrollarea_layout.addWidget(self.p_fault, 2, 3, 1, 1)
  178. self.n_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  179. self.n_fault.setText("主负接触器故障")
  180. self.n_fault.setAlignment(Qt.AlignCenter)
  181. self.n_fault.setReadOnly(True)
  182. set_edt_bg(self.n_fault, QColor(Qt.gray))
  183. self.center_qscrollarea_layout.addWidget(self.n_fault, 2, 4, 1, 1)
  184. self.pre_chg_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  185. self.pre_chg_fault.setText("预充故障")
  186. self.pre_chg_fault.setAlignment(Qt.AlignCenter)
  187. self.pre_chg_fault.setReadOnly(True)
  188. set_edt_bg(self.pre_chg_fault, QColor(Qt.gray))
  189. self.center_qscrollarea_layout.addWidget(self.pre_chg_fault, 2, 5, 1, 1)
  190. self.center_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  191. self.center_fault.setText("中间接触器故障")
  192. self.center_fault.setAlignment(Qt.AlignCenter)
  193. self.center_fault.setReadOnly(True)
  194. set_edt_bg(self.center_fault, QColor(Qt.gray))
  195. self.center_qscrollarea_layout.addWidget(self.center_fault, 2, 6, 1, 1)
  196. self.dlq_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  197. self.dlq_fault.setText("断路器反馈故障")
  198. self.dlq_fault.setAlignment(Qt.AlignCenter)
  199. self.dlq_fault.setReadOnly(True)
  200. set_edt_bg(self.dlq_fault, QColor(Qt.gray))
  201. self.center_qscrollarea_layout.addWidget(self.dlq_fault, 2, 7, 1, 1)
  202. self.rdq_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  203. self.rdq_fault.setText("熔断器故障")
  204. self.rdq_fault.setAlignment(Qt.AlignCenter)
  205. self.rdq_fault.setReadOnly(True)
  206. set_edt_bg(self.rdq_fault, QColor(Qt.gray))
  207. self.center_qscrollarea_layout.addWidget(self.rdq_fault, 2, 8, 1, 1)
  208. self.cell_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  209. self.cell_fault.setText("电芯故障")
  210. self.cell_fault.setAlignment(Qt.AlignCenter)
  211. self.cell_fault.setReadOnly(True)
  212. set_edt_bg(self.cell_fault, QColor(Qt.gray))
  213. self.mos_ht_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  214. self.mos_ht_warn.setText("MOS温度过高告警")
  215. self.mos_ht_warn.setAlignment(Qt.AlignCenter)
  216. self.mos_ht_warn.setReadOnly(True)
  217. set_edt_bg(self.mos_ht_warn, QColor(Qt.gray))
  218. self.center_qscrollarea_layout.addWidget(self.mos_ht_warn, 3, 0, 1, 1)
  219. self.jz_ht_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  220. self.jz_ht_warn.setText("极柱温度过高告警")
  221. self.jz_ht_warn.setAlignment(Qt.AlignCenter)
  222. self.jz_ht_warn.setReadOnly(True)
  223. set_edt_bg(self.jz_ht_warn, QColor(Qt.gray))
  224. self.center_qscrollarea_layout.addWidget(self.jz_ht_warn, 3, 1, 1, 1)
  225. self.ccu_ht_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  226. self.ccu_ht_warn.setText("主控检测温度过高")
  227. self.ccu_ht_warn.setAlignment(Qt.AlignCenter)
  228. self.ccu_ht_warn.setReadOnly(True)
  229. set_edt_bg(self.ccu_ht_warn, QColor(Qt.gray))
  230. self.center_qscrollarea_layout.addWidget(self.ccu_ht_warn, 3, 2, 1, 1)
  231. self.fan_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  232. self.fan_fault.setText("风扇控制失效")
  233. self.fan_fault.setAlignment(Qt.AlignCenter)
  234. self.fan_fault.setReadOnly(True)
  235. set_edt_bg(self.fan_fault, QColor(Qt.gray))
  236. self.center_qscrollarea_layout.addWidget(self.fan_fault, 3, 3, 1, 1)
  237. self.temp_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  238. self.temp_fault.setText("热失控故障")
  239. self.temp_fault.setAlignment(Qt.AlignCenter)
  240. self.temp_fault.setReadOnly(True)
  241. set_edt_bg(self.temp_fault, QColor(Qt.gray))
  242. self.temp_up_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  243. self.temp_up_fault.setText("温升过高故障")
  244. self.temp_up_fault.setAlignment(Qt.AlignCenter)
  245. self.temp_up_fault.setReadOnly(True)
  246. set_edt_bg(self.temp_up_fault, QColor(Qt.gray))
  247. self.center_qscrollarea_layout.addWidget(self.temp_up_fault, 3, 5, 1, 1)
  248. self.cell_single_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  249. self.cell_single_fault.setText("单体断线故障")
  250. self.cell_single_fault.setAlignment(Qt.AlignCenter)
  251. self.cell_single_fault.setReadOnly(True)
  252. set_edt_bg(self.cell_single_fault, QColor(Qt.gray))
  253. self.ccu_hard_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  254. self.ccu_hard_fault.setText("主控硬件故障")
  255. self.ccu_hard_fault.setAlignment(Qt.AlignCenter)
  256. self.ccu_hard_fault.setReadOnly(True)
  257. set_edt_bg(self.ccu_hard_fault, QColor(Qt.gray))
  258. self.ccu_start_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  259. self.ccu_start_fault.setText("主控初始化故障")
  260. self.ccu_start_fault.setAlignment(Qt.AlignCenter)
  261. self.ccu_start_fault.setReadOnly(True)
  262. set_edt_bg(self.ccu_start_fault, QColor(Qt.gray))
  263. self.eeprom_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  264. self.eeprom_fault.setText("EEPROM故障")
  265. self.eeprom_fault.setAlignment(Qt.AlignCenter)
  266. self.eeprom_fault.setReadOnly(True)
  267. set_edt_bg(self.eeprom_fault, QColor(Qt.gray))
  268. self.soc_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  269. self.soc_fault.setText("SOC过低故障")
  270. self.soc_fault.setAlignment(Qt.AlignCenter)
  271. self.soc_fault.setReadOnly(True)
  272. set_edt_bg(self.soc_fault, QColor(Qt.gray))
  273. self.ccu_diff_vol_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  274. self.ccu_diff_vol_fault.setText("簇间压差故障")
  275. self.ccu_diff_vol_fault.setAlignment(Qt.AlignCenter)
  276. self.ccu_diff_vol_fault.setReadOnly(True)
  277. set_edt_bg(self.ccu_diff_vol_fault, QColor(Qt.gray))
  278. self.center_qscrollarea_layout.addWidget(self.ccu_diff_vol_fault, 4, 1, 1, 1)
  279. self.pcs_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  280. self.pcs_fault.setText("PCS通讯故障")
  281. self.pcs_fault.setAlignment(Qt.AlignCenter)
  282. self.pcs_fault.setReadOnly(True)
  283. set_edt_bg(self.pcs_fault, QColor(Qt.gray))
  284. self.jump_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  285. self.jump_fault.setText("跳机故障")
  286. self.jump_fault.setAlignment(Qt.AlignCenter)
  287. self.jump_fault.setReadOnly(True)
  288. set_edt_bg(self.jump_fault, QColor(Qt.gray))
  289. self.center_qscrollarea_layout.addWidget(self.jump_fault, 4, 3, 1, 1)
  290. self.chg_mos_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  291. self.chg_mos_fault.setText("充电MOS故障")
  292. self.chg_mos_fault.setAlignment(Qt.AlignCenter)
  293. self.chg_mos_fault.setReadOnly(True)
  294. set_edt_bg(self.chg_mos_fault, QColor(Qt.gray))
  295. self.dchg_mos_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  296. self.dchg_mos_fault.setText("放电MOS故障")
  297. self.dchg_mos_fault.setAlignment(Qt.AlignCenter)
  298. self.dchg_mos_fault.setReadOnly(True)
  299. set_edt_bg(self.dchg_mos_fault, QColor(Qt.gray))
  300. if SD.CCU_TYPE == 1:
  301. self.chg_mos_fault.setHidden(True)
  302. self.dchg_mos_fault.setHidden(True)
  303. self.center_qscrollarea_layout.addWidget(self.cell_fault, 2, 9, 1, 1)
  304. self.center_qscrollarea_layout.addWidget(self.temp_fault, 3, 4, 1, 1)
  305. self.center_qscrollarea_layout.addWidget(self.temp_up_fault, 3, 5, 1, 1)
  306. self.center_qscrollarea_layout.addWidget(self.cell_single_fault, 3, 6, 1, 1)
  307. self.center_qscrollarea_layout.addWidget(self.ccu_hard_fault, 3, 7, 1, 1)
  308. self.center_qscrollarea_layout.addWidget(self.ccu_start_fault, 3, 8, 1, 1)
  309. self.center_qscrollarea_layout.addWidget(self.eeprom_fault, 3, 9, 1, 1)
  310. self.center_qscrollarea_layout.addWidget(self.soc_fault, 4, 0, 1, 1)
  311. self.center_qscrollarea_layout.addWidget(self.pcs_fault, 4, 2, 1, 1)
  312. else:
  313. self.jump_fault.setHidden(True)
  314. self.ccu_diff_vol_fault.setHidden(True)
  315. self.center_qscrollarea_layout.addWidget(self.mos_ht_warn, 1, 8, 1, 1)
  316. self.center_qscrollarea_layout.addWidget(self.temp_up_fault, 1, 9, 1, 1)
  317. self.center_qscrollarea_layout.addWidget(self.pre_chg_fault, 2, 3, 1, 1)
  318. self.center_qscrollarea_layout.addWidget(self.chg_mos_fault, 2, 4, 1, 1)
  319. self.center_qscrollarea_layout.addWidget(self.dchg_mos_fault, 2, 5, 1, 1)
  320. self.center_qscrollarea_layout.addWidget(self.temp_fault, 2, 6, 1, 1)
  321. self.center_qscrollarea_layout.addWidget(self.cell_single_fault, 2, 7, 1, 1)
  322. self.center_qscrollarea_layout.addWidget(self.ccu_hard_fault, 2, 8, 1, 1)
  323. self.center_qscrollarea_layout.addWidget(self.ccu_start_fault, 2, 9, 1, 1)
  324. self.center_qscrollarea_layout.addWidget(self.eeprom_fault, 3, 0, 1, 1)
  325. self.center_qscrollarea_layout.addWidget(self.cell_fault, 3, 1, 1, 1)
  326. self.center_qscrollarea_layout.addWidget(self.soc_fault, 3, 2, 1, 1)
  327. self.center_qscrollarea_layout.addWidget(self.pcs_fault, 3, 3, 1, 1)
  328. self.center_right_widget = QtWidgets.QWidget(self.center_groupbox)
  329. self.center_right_layout = QtWidgets.QGridLayout(self.center_right_widget)
  330. self.normal = QtWidgets.QLineEdit(self.center_qscrollarea)
  331. self.normal.setAlignment(Qt.AlignCenter)
  332. self.normal.setReadOnly(True)
  333. set_edt_bg(self.normal, QColor(Qt.gray))
  334. self.center_right_layout.addWidget(self.normal, 0, 0, 1, 1)
  335. self.lb_normal = QtWidgets.QLabel(self.center_qscrollarea)
  336. self.lb_normal.setAlignment(Qt.AlignCenter)
  337. self.lb_normal.setText("正常")
  338. self.center_right_layout.addWidget(self.lb_normal, 0, 1, 1, 1)
  339. self.third = QtWidgets.QLineEdit(self.center_qscrollarea)
  340. self.third.setAlignment(Qt.AlignCenter)
  341. self.third.setReadOnly(True)
  342. set_edt_bg(self.third, QColor(Qt.yellow))
  343. self.center_right_layout.addWidget(self.third, 1, 0, 1, 1)
  344. self.lb_third = QtWidgets.QLabel(self.center_qscrollarea)
  345. self.lb_third.setAlignment(Qt.AlignCenter)
  346. self.lb_third.setText("三级告警")
  347. self.center_right_layout.addWidget(self.lb_third, 1, 1, 1, 1)
  348. self.second = QtWidgets.QLineEdit(self.center_qscrollarea)
  349. self.second.setAlignment(Qt.AlignCenter)
  350. self.second.setReadOnly(True)
  351. set_edt_bg(self.second, QColor(Qt.magenta))
  352. self.center_right_layout.addWidget(self.second, 2, 0, 1, 1)
  353. self.lb_second = QtWidgets.QLabel(self.center_qscrollarea)
  354. self.lb_second.setAlignment(Qt.AlignCenter)
  355. self.lb_second.setText("二级告警")
  356. self.center_right_layout.addWidget(self.lb_second, 2, 1, 1, 1)
  357. self.first = QtWidgets.QLineEdit(self.center_qscrollarea)
  358. self.first.setAlignment(Qt.AlignCenter)
  359. self.first.setReadOnly(True)
  360. set_edt_bg(self.first, QColor(Qt.red))
  361. self.center_right_layout.addWidget(self.first, 3, 0, 1, 1)
  362. self.lb_first = QtWidgets.QLabel(self.center_qscrollarea)
  363. self.lb_first.setAlignment(Qt.AlignCenter)
  364. self.lb_first.setText("一级告警/故障")
  365. self.center_right_layout.addWidget(self.lb_first, 3, 1, 1, 1)
  366. self.center_groupbox_layout.addWidget(self.center_right_widget, 1)
  367. self.center_layout.addWidget(self.center_groupbox)
  368. self.verticalLayout.addWidget(self.center_widget)