under_page.py 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  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 UnderPage(QtWidgets.QWidget):
  10. def __init__(self, parent=None):
  11. super(UnderPage, 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.under_widget = MyFrame(self)
  19. self.under_layout = QtWidgets.QHBoxLayout(self.under_widget)
  20. self.under_layout.setContentsMargins(0, 0, 0, 0)
  21. self.under_layout.setSpacing(0)
  22. self.under_left_groupbox = QtWidgets.QGroupBox(self.under_widget)
  23. self.under_left_groupbox.setTitle("运行状态")
  24. self.under_left_groupbox_layout = QtWidgets.QGridLayout(self.under_left_groupbox)
  25. self.lb_status = QtWidgets.QLabel("(灰色:断开/状态不成立 绿色:闭合/状态成立 红色:禁止)")
  26. self.under_left_groupbox_layout.addWidget(self.lb_status, 0, 0, 1, 5)
  27. self.sys_status = QtWidgets.QLineEdit(self.under_left_groupbox)
  28. self.sys_status.setText("系统状态")
  29. self.sys_status.setAlignment(Qt.AlignCenter)
  30. self.sys_status.setReadOnly(True)
  31. set_edt_bg(self.sys_status, QColor("#99CC99"))
  32. self.under_left_groupbox_layout.addWidget(self.sys_status, 1, 0)
  33. # spacerItem1 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  34. # self.under_left_groupbox_layout.addItem(spacerItem1)
  35. self.sys_status_no = QtWidgets.QLineEdit(self.under_left_groupbox)
  36. self.sys_status_no.setText("低压上电")
  37. self.sys_status_no.setAlignment(Qt.AlignCenter)
  38. self.sys_status_no.setReadOnly(True)
  39. set_edt_bg(self.sys_status_no, QColor(Qt.gray))
  40. self.under_left_groupbox_layout.addWidget(self.sys_status_no, 1, 1)
  41. self.sys_status_high_no = QtWidgets.QLineEdit(self.under_left_groupbox)
  42. self.sys_status_high_no.setText("待机")
  43. self.sys_status_high_no.setAlignment(Qt.AlignCenter)
  44. self.sys_status_high_no.setReadOnly(True)
  45. set_edt_bg(self.sys_status_high_no, QColor(Qt.gray))
  46. self.under_left_groupbox_layout.addWidget(self.sys_status_high_no, 1, 2)
  47. # self.sys_status_high_no = QtWidgets.QLineEdit(self.under_left_groupbox)
  48. # self.sys_status_high_no.setText("高压待机")
  49. # self.sys_status_high_no.setAlignment(Qt.AlignCenter)
  50. # self.sys_status_high_no.setReadOnly(True)
  51. # set_edt_bg(self.sys_status_high_no, QColor(Qt.gray))
  52. # self.under_left_groupbox_layout.addWidget(self.sys_status_high_no, 1, 7, 1, 2)
  53. self.sys_status_chg = QtWidgets.QLineEdit(self.under_left_groupbox)
  54. self.sys_status_chg.setText("充电")
  55. self.sys_status_chg.setAlignment(Qt.AlignCenter)
  56. self.sys_status_chg.setReadOnly(True)
  57. set_edt_bg(self.sys_status_chg, QColor(Qt.gray))
  58. self.under_left_groupbox_layout.addWidget(self.sys_status_chg, 1, 3)
  59. self.sys_status_dchg = QtWidgets.QLineEdit(self.under_left_groupbox)
  60. self.sys_status_dchg.setText("放电")
  61. self.sys_status_dchg.setAlignment(Qt.AlignCenter)
  62. self.sys_status_dchg.setReadOnly(True)
  63. set_edt_bg(self.sys_status_dchg, QColor(Qt.gray))
  64. self.under_left_groupbox_layout.addWidget(self.sys_status_dchg, 1, 4)
  65. self.sys_status_stop = QtWidgets.QLineEdit(self.under_left_groupbox)
  66. self.sys_status_stop.setText("停机")
  67. self.sys_status_stop.setAlignment(Qt.AlignCenter)
  68. self.sys_status_stop.setReadOnly(True)
  69. set_edt_bg(self.sys_status_stop, QColor(Qt.gray))
  70. self.under_left_groupbox_layout.addWidget(self.sys_status_stop, 1, 5)
  71. self.sys_status_sleep = QtWidgets.QLineEdit(self.under_left_groupbox)
  72. self.sys_status_sleep.setText("休眠")
  73. self.sys_status_sleep.setAlignment(Qt.AlignCenter)
  74. self.sys_status_sleep.setReadOnly(True)
  75. set_edt_bg(self.sys_status_sleep, QColor(Qt.gray))
  76. self.under_left_groupbox_layout.addWidget(self.sys_status_sleep, 1, 6)
  77. # self.sys_status_nononono = QtWidgets.QLabel(" ")
  78. # self.under_left_groupbox_layout.addWidget(self.sys_status_nononono, 0, 9, 1, 1)
  79. # spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  80. # self.under_left_groupbox_layout.addItem(spacerItem2)
  81. # self.up_and_down = QtWidgets.QLineEdit(self.under_left_groupbox)
  82. # self.up_and_down.setText("指令")
  83. # self.up_and_down.setAlignment(Qt.AlignCenter)
  84. # self.up_and_down.setReadOnly(True)
  85. # set_edt_bg(self.up_and_down, QColor("#99CC99"))
  86. # self.under_left_groupbox_layout.addWidget(self.up_and_down, 2, 0, 1, 2)
  87. # spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  88. # self.under_left_groupbox_layout.addItem(spacerItem2)
  89. # self.sys_up = QtWidgets.QLineEdit(self.under_left_groupbox)
  90. # self.sys_up.setText("上电")
  91. # self.sys_up.setAlignment(Qt.AlignCenter)
  92. # self.sys_up.setReadOnly(True)
  93. # set_edt_bg(self.sys_up, QColor(Qt.gray))
  94. # self.under_left_groupbox_layout.addWidget(self.sys_up, 2, 3, 1, 3)
  95. # self.sys_down = QtWidgets.QLineEdit(self.under_left_groupbox)
  96. # self.sys_down.setText("下电")
  97. # self.sys_down.setAlignment(Qt.AlignCenter)
  98. # self.sys_down.setReadOnly(True)
  99. # set_edt_bg(self.sys_down, QColor(Qt.gray))
  100. # self.under_left_groupbox_layout.addWidget(self.sys_down, 2, 6, 1, 3)
  101. # spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  102. # self.under_left_groupbox_layout.addItem(spacerItem2)
  103. if SD.CCU_TYPE == 1:
  104. self.do_status = QtWidgets.QLineEdit(self.under_left_groupbox)
  105. self.do_status.setText("DO状态")
  106. self.do_status.setAlignment(Qt.AlignCenter)
  107. self.do_status.setReadOnly(True)
  108. set_edt_bg(self.do_status, QColor("#99CC99"))
  109. self.under_left_groupbox_layout.addWidget(self.do_status, 3, 0)
  110. spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  111. self.under_left_groupbox_layout.addItem(spacerItem2)
  112. self.do_1 = QtWidgets.QLineEdit(self.under_left_groupbox)
  113. self.do_1.setText("主正接触器")
  114. self.do_1.setAlignment(Qt.AlignCenter)
  115. self.do_1.setReadOnly(True)
  116. set_edt_bg(self.do_1, QColor(Qt.gray))
  117. self.under_left_groupbox_layout.addWidget(self.do_1, 3, 1)
  118. self.do_2 = QtWidgets.QLineEdit(self.under_left_groupbox)
  119. self.do_2.setText("主负接触器")
  120. self.do_2.setAlignment(Qt.AlignCenter)
  121. self.do_2.setReadOnly(True)
  122. set_edt_bg(self.do_2, QColor(Qt.gray))
  123. self.under_left_groupbox_layout.addWidget(self.do_2, 3, 2)
  124. self.do_3 = QtWidgets.QLineEdit(self.under_left_groupbox)
  125. self.do_3.setText("预充接触器")
  126. self.do_3.setAlignment(Qt.AlignCenter)
  127. self.do_3.setReadOnly(True)
  128. set_edt_bg(self.do_3, QColor(Qt.gray))
  129. self.under_left_groupbox_layout.addWidget(self.do_3, 3, 3)
  130. self.do_4 = QtWidgets.QLineEdit(self.under_left_groupbox)
  131. self.do_4.setText("中间接触器")
  132. self.do_4.setAlignment(Qt.AlignCenter)
  133. self.do_4.setReadOnly(True)
  134. set_edt_bg(self.do_4, QColor(Qt.gray))
  135. self.under_left_groupbox_layout.addWidget(self.do_4, 3, 4)
  136. self.do_5 = QtWidgets.QLineEdit(self.under_left_groupbox)
  137. self.do_5.setText("断路器控制")
  138. self.do_5.setAlignment(Qt.AlignCenter)
  139. self.do_5.setReadOnly(True)
  140. set_edt_bg(self.do_5, QColor(Qt.gray))
  141. self.under_left_groupbox_layout.addWidget(self.do_5, 4, 1)
  142. self.do_6 = QtWidgets.QLineEdit(self.under_left_groupbox)
  143. self.do_6.setText("DO6")
  144. self.do_6.setAlignment(Qt.AlignCenter)
  145. self.do_6.setReadOnly(True)
  146. set_edt_bg(self.do_6, QColor(Qt.gray))
  147. self.under_left_groupbox_layout.addWidget(self.do_6, 4, 2)
  148. self.do_7 = QtWidgets.QLineEdit(self.under_left_groupbox)
  149. self.do_7.setText("干接点1")
  150. self.do_7.setAlignment(Qt.AlignCenter)
  151. self.do_7.setReadOnly(True)
  152. set_edt_bg(self.do_7, QColor(Qt.gray))
  153. self.under_left_groupbox_layout.addWidget(self.do_7, 4, 3)
  154. self.do_8 = QtWidgets.QLineEdit(self.under_left_groupbox)
  155. self.do_8.setText("干接点2")
  156. self.do_8.setAlignment(Qt.AlignCenter)
  157. self.do_8.setReadOnly(True)
  158. set_edt_bg(self.do_8, QColor(Qt.gray))
  159. self.under_left_groupbox_layout.addWidget(self.do_8, 4, 4)
  160. self.di_status = QtWidgets.QLineEdit(self.under_left_groupbox)
  161. self.di_status.setText("DI状态")
  162. self.di_status.setAlignment(Qt.AlignCenter)
  163. self.di_status.setReadOnly(True)
  164. set_edt_bg(self.di_status, QColor("#99CC99"))
  165. self.under_left_groupbox_layout.addWidget(self.di_status, 5, 0)
  166. spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  167. self.under_left_groupbox_layout.addItem(spacerItem2)
  168. self.di_1 = QtWidgets.QLineEdit(self.under_left_groupbox)
  169. self.di_1.setText("DI1")
  170. self.di_1.setAlignment(Qt.AlignCenter)
  171. self.di_1.setReadOnly(True)
  172. set_edt_bg(self.di_1, QColor(Qt.gray))
  173. self.under_left_groupbox_layout.addWidget(self.di_1, 5, 1)
  174. self.di_2 = QtWidgets.QLineEdit(self.under_left_groupbox)
  175. self.di_2.setText("DI2")
  176. self.di_2.setAlignment(Qt.AlignCenter)
  177. self.di_2.setReadOnly(True)
  178. set_edt_bg(self.di_2, QColor(Qt.gray))
  179. self.under_left_groupbox_layout.addWidget(self.di_2, 5, 2)
  180. self.di_3 = QtWidgets.QLineEdit(self.under_left_groupbox)
  181. self.di_3.setText("DI3")
  182. self.di_3.setAlignment(Qt.AlignCenter)
  183. self.di_3.setReadOnly(True)
  184. set_edt_bg(self.di_3, QColor(Qt.gray))
  185. self.under_left_groupbox_layout.addWidget(self.di_3, 5, 3)
  186. self.di_4 = QtWidgets.QLineEdit(self.under_left_groupbox)
  187. self.di_4.setText("DI4")
  188. self.di_4.setAlignment(Qt.AlignCenter)
  189. self.di_4.setReadOnly(True)
  190. set_edt_bg(self.di_4, QColor(Qt.gray))
  191. self.under_left_groupbox_layout.addWidget(self.di_4, 5, 4)
  192. self.di_5 = QtWidgets.QLineEdit(self.under_left_groupbox)
  193. self.di_5.setText("DI5")
  194. self.di_5.setAlignment(Qt.AlignCenter)
  195. self.di_5.setReadOnly(True)
  196. set_edt_bg(self.di_5, QColor(Qt.gray))
  197. self.under_left_groupbox_layout.addWidget(self.di_5, 6, 1)
  198. self.di_6 = QtWidgets.QLineEdit(self.under_left_groupbox)
  199. self.di_6.setText("DI6")
  200. self.di_6.setAlignment(Qt.AlignCenter)
  201. self.di_6.setReadOnly(True)
  202. set_edt_bg(self.di_6, QColor(Qt.gray))
  203. self.under_left_groupbox_layout.addWidget(self.di_6, 6, 2)
  204. self.di_7 = QtWidgets.QLineEdit(self.under_left_groupbox)
  205. self.di_7.setText("DI7")
  206. self.di_7.setAlignment(Qt.AlignCenter)
  207. self.di_7.setReadOnly(True)
  208. set_edt_bg(self.di_7, QColor(Qt.gray))
  209. self.under_left_groupbox_layout.addWidget(self.di_7, 6, 3)
  210. self.di_8 = QtWidgets.QLineEdit(self.under_left_groupbox)
  211. self.di_8.setText("DI8")
  212. self.di_8.setAlignment(Qt.AlignCenter)
  213. self.di_8.setReadOnly(True)
  214. set_edt_bg(self.di_8, QColor(Qt.gray))
  215. self.under_left_groupbox_layout.addWidget(self.di_8, 6, 4)
  216. else:
  217. # self.sys_sleep = QtWidgets.QLineEdit(self.under_left_groupbox)
  218. # self.sys_sleep.setText("休眠")
  219. # self.sys_sleep.setAlignment(Qt.AlignCenter)
  220. # self.sys_sleep.setReadOnly(True)
  221. # set_edt_bg(self.sys_sleep, QColor(Qt.gray))
  222. # self.under_left_groupbox_layout.addWidget(self.sys_sleep, 2, 9, 1, 3)
  223. self.mos_status = QtWidgets.QLineEdit(self.under_left_groupbox)
  224. self.mos_status.setText("MOS状态")
  225. self.mos_status.setAlignment(Qt.AlignCenter)
  226. self.mos_status.setReadOnly(True)
  227. set_edt_bg(self.mos_status, QColor("#99CC99"))
  228. self.under_left_groupbox_layout.addWidget(self.mos_status, 3, 0)
  229. spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  230. self.under_left_groupbox_layout.addItem(spacerItem2)
  231. self.mos_chg = QtWidgets.QLineEdit(self.under_left_groupbox)
  232. self.mos_chg.setText("充电MOS")
  233. self.mos_chg.setAlignment(Qt.AlignCenter)
  234. self.mos_chg.setReadOnly(True)
  235. set_edt_bg(self.mos_chg, QColor(Qt.gray))
  236. self.under_left_groupbox_layout.addWidget(self.mos_chg, 3, 1)
  237. self.mos_dchg = QtWidgets.QLineEdit(self.under_left_groupbox)
  238. self.mos_dchg.setText("放电MOS")
  239. self.mos_dchg.setAlignment(Qt.AlignCenter)
  240. self.mos_dchg.setReadOnly(True)
  241. set_edt_bg(self.mos_dchg, QColor(Qt.gray))
  242. self.under_left_groupbox_layout.addWidget(self.mos_dchg, 3, 2)
  243. self.mos_pre = QtWidgets.QLineEdit(self.under_left_groupbox)
  244. self.mos_pre.setText("预充MOS")
  245. self.mos_pre.setAlignment(Qt.AlignCenter)
  246. self.mos_pre.setReadOnly(True)
  247. set_edt_bg(self.mos_pre, QColor(Qt.gray))
  248. self.under_left_groupbox_layout.addWidget(self.mos_pre, 3, 3)
  249. self.fjd_status = QtWidgets.QLineEdit(self.under_left_groupbox)
  250. self.fjd_status.setText("干接点状态")
  251. self.fjd_status.setAlignment(Qt.AlignCenter)
  252. self.fjd_status.setReadOnly(True)
  253. set_edt_bg(self.fjd_status, QColor("#99CC99"))
  254. self.under_left_groupbox_layout.addWidget(self.fjd_status, 5, 0)
  255. spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  256. self.under_left_groupbox_layout.addItem(spacerItem2)
  257. self.fjd_1 = QtWidgets.QLineEdit(self.under_left_groupbox)
  258. self.fjd_1.setText("干接点1")
  259. self.fjd_1.setAlignment(Qt.AlignCenter)
  260. self.fjd_1.setReadOnly(True)
  261. set_edt_bg(self.fjd_1, QColor(Qt.gray))
  262. self.under_left_groupbox_layout.addWidget(self.fjd_1, 5, 1)
  263. self.fjd_2 = QtWidgets.QLineEdit(self.under_left_groupbox)
  264. self.fjd_2.setText("干接点2")
  265. self.fjd_2.setAlignment(Qt.AlignCenter)
  266. self.fjd_2.setReadOnly(True)
  267. set_edt_bg(self.fjd_2, QColor(Qt.gray))
  268. self.under_left_groupbox_layout.addWidget(self.fjd_2, 5, 2)
  269. self.chd_dsg_status = QtWidgets.QLineEdit(self.under_left_groupbox)
  270. self.chd_dsg_status.setText("标志位")
  271. self.chd_dsg_status.setAlignment(Qt.AlignCenter)
  272. self.chd_dsg_status.setReadOnly(True)
  273. set_edt_bg(self.chd_dsg_status, QColor("#99CC99"))
  274. self.under_left_groupbox_layout.addWidget(self.chd_dsg_status, 7, 0)
  275. spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  276. self.under_left_groupbox_layout.addItem(spacerItem2)
  277. self.permit_chg = QtWidgets.QLineEdit(self.under_left_groupbox)
  278. self.permit_chg.setText("禁止充电")
  279. self.permit_chg.setAlignment(Qt.AlignCenter)
  280. self.permit_chg.setReadOnly(True)
  281. set_edt_bg(self.permit_chg, QColor(Qt.gray))
  282. self.under_left_groupbox_layout.addWidget(self.permit_chg, 7, 1)
  283. self.permit_dchg = QtWidgets.QLineEdit(self.under_left_groupbox)
  284. self.permit_dchg.setText("禁止放电")
  285. self.permit_dchg.setAlignment(Qt.AlignCenter)
  286. self.permit_dchg.setReadOnly(True)
  287. set_edt_bg(self.permit_dchg, QColor(Qt.gray))
  288. self.under_left_groupbox_layout.addWidget(self.permit_dchg, 7, 2)
  289. self.under_layout.addWidget(self.under_left_groupbox, 1)
  290. self.under_right_groupbox = QtWidgets.QGroupBox(self.under_widget)
  291. self.under_right_groupbox.setTitle("控制指令")
  292. self.under_right_groupbox_layout = QtWidgets.QGridLayout(self.under_right_groupbox)
  293. self.btn_up = QtWidgets.QPushButton("系统上电")
  294. self.under_right_groupbox_layout.addWidget(self.btn_up, 0, 0, 1, 2)
  295. self.btn_down = QtWidgets.QPushButton("系统下电")
  296. self.under_right_groupbox_layout.addWidget(self.btn_down, 0, 2, 1, 2)
  297. self.lb_snkz = QtWidgets.QLabel("使能控制")
  298. self.under_right_groupbox_layout.addWidget(self.lb_snkz, 0, 4, 1, 1)
  299. self.snkz_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  300. self.under_right_groupbox_layout.addWidget(self.snkz_check_box, 0, 5, 1, 1)
  301. self.lb_p = QtWidgets.QLabel("主正控制")
  302. self.p_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  303. self.lb_do7 = QtWidgets.QLabel("干接点1")
  304. self.do7_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  305. self.lb_n = QtWidgets.QLabel("主负控制")
  306. self.n_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  307. self.lb_do8 = QtWidgets.QLabel("干接点2")
  308. self.do8_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  309. self.lb_center = QtWidgets.QLabel("中间控制")
  310. self.center_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  311. self.lb_dlq = QtWidgets.QLabel("断路器控制")
  312. self.dlq_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  313. self.lb_do6 = QtWidgets.QLabel("DO6")
  314. self.do6_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  315. self.lb_chg_1 = QtWidgets.QLabel("充电控制")
  316. self.chg_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  317. self.lb_dchg_1 = QtWidgets.QLabel("放电控制")
  318. self.dchg_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  319. self.lb_gjd_1 = QtWidgets.QLabel("干接点1")
  320. self.gjd1_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  321. self.lb_gjd2_1 = QtWidgets.QLabel("干接点2")
  322. self.gjd2_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  323. if SD.CCU_TYPE == 1:
  324. self.chg_check_box.setHidden(True)
  325. self.dchg_check_box.setHidden(True)
  326. self.gjd1_check_box.setHidden(True)
  327. self.gjd2_check_box.setHidden(True)
  328. self.under_right_groupbox_layout.addWidget(self.lb_p, 1, 0, 1, 1)
  329. self.under_right_groupbox_layout.addWidget(self.p_check_box, 1, 1, 1, 1)
  330. self.under_right_groupbox_layout.addWidget(self.lb_n, 2, 0, 1, 1)
  331. self.under_right_groupbox_layout.addWidget(self.n_check_box, 2, 1, 1, 1)
  332. self.under_right_groupbox_layout.addWidget(self.lb_do7, 1, 3, 1, 1)
  333. self.under_right_groupbox_layout.addWidget(self.do7_check_box, 1, 4, 1, 1)
  334. self.under_right_groupbox_layout.addWidget(self.lb_do8, 2, 3, 1, 1)
  335. self.under_right_groupbox_layout.addWidget(self.do8_check_box, 2, 4, 1, 1)
  336. self.under_right_groupbox_layout.addWidget(self.lb_center, 4, 0, 1, 1)
  337. self.under_right_groupbox_layout.addWidget(self.center_check_box, 4, 1, 1, 1)
  338. self.under_right_groupbox_layout.addWidget(self.lb_dlq, 5, 0, 1, 1)
  339. self.under_right_groupbox_layout.addWidget(self.dlq_check_box, 5, 1, 1, 1)
  340. self.under_right_groupbox_layout.addWidget(self.lb_do6, 6, 0, 1, 1)
  341. self.under_right_groupbox_layout.addWidget(self.do6_check_box, 6, 1, 1, 1)
  342. else:
  343. self.p_check_box.setHidden(True)
  344. self.do7_check_box.setHidden(True)
  345. self.n_check_box.setHidden(True)
  346. self.do8_check_box.setHidden(True)
  347. self.center_check_box.setHidden(True)
  348. self.dlq_check_box.setHidden(True)
  349. self.do6_check_box.setHidden(True)
  350. self.under_right_groupbox_layout.addWidget(self.lb_chg_1, 1, 0, 1, 1)
  351. self.under_right_groupbox_layout.addWidget(self.chg_check_box, 1, 1, 1, 1)
  352. self.under_right_groupbox_layout.addWidget(self.lb_dchg_1, 2, 0, 1, 1)
  353. self.under_right_groupbox_layout.addWidget(self.dchg_check_box, 2, 1, 1, 1)
  354. self.under_right_groupbox_layout.addWidget(self.lb_gjd_1, 4, 0, 1, 1)
  355. self.under_right_groupbox_layout.addWidget(self.gjd1_check_box, 4, 1, 1, 1)
  356. self.under_right_groupbox_layout.addWidget(self.lb_gjd2_1, 5, 0, 1, 1)
  357. self.under_right_groupbox_layout.addWidget(self.gjd2_check_box, 5, 1, 1, 1)
  358. self.lb_fault = QtWidgets.QLabel("故障强制释放")
  359. self.under_right_groupbox_layout.addWidget(self.lb_fault, 1, 6, 1, 1)
  360. self.fault_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  361. self.under_right_groupbox_layout.addWidget(self.fault_check_box, 1, 7, 1, 1)
  362. self.lb_clear_balance = QtWidgets.QLabel("清空均衡时间")
  363. self.under_right_groupbox_layout.addWidget(self.lb_clear_balance, 1, 9, 1, 1)
  364. self.clear_balance_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  365. self.under_right_groupbox_layout.addWidget(self.clear_balance_check_box, 1, 10, 1, 1)
  366. self.lb_again = QtWidgets.QLabel("绝缘检测")
  367. self.under_right_groupbox_layout.addWidget(self.lb_again, 2, 6, 1, 1)
  368. self.again_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  369. self.under_right_groupbox_layout.addWidget(self.again_check_box, 2, 7, 1, 1)
  370. self.lb_fan = QtWidgets.QLabel("开启风扇")
  371. self.under_right_groupbox_layout.addWidget(self.lb_fan, 2, 9, 1, 1)
  372. self.fan_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  373. self.under_right_groupbox_layout.addWidget(self.fan_check_box, 2, 10, 1, 1)
  374. self.lb_pre = QtWidgets.QLabel("预充控制")
  375. self.under_right_groupbox_layout.addWidget(self.lb_pre, 3, 0, 1, 1)
  376. self.pre_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  377. self.under_right_groupbox_layout.addWidget(self.pre_check_box, 3, 1, 1, 1)
  378. self.lb_again_one = QtWidgets.QLabel("绝缘检测开启一次")
  379. self.under_right_groupbox_layout.addWidget(self.lb_again_one, 3, 6, 1, 1)
  380. self.again_one_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  381. self.under_right_groupbox_layout.addWidget(self.again_one_check_box, 3, 7, 1, 1)
  382. self.lb_chg = QtWidgets.QLabel("强制充电指令")
  383. self.under_right_groupbox_layout.addWidget(self.lb_chg, 4, 6, 1, 1)
  384. self.qiangzhi_chg_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  385. self.under_right_groupbox_layout.addWidget(self.qiangzhi_chg_check_box, 4, 7, 1, 1)
  386. self.lb_sleep = QtWidgets.QLabel("系统休眠指令")
  387. self.under_right_groupbox_layout.addWidget(self.lb_sleep, 5, 6, 1, 1)
  388. self.sleep_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  389. self.under_right_groupbox_layout.addWidget(self.sleep_check_box, 5, 7, 1, 1)
  390. self.lb_reset = QtWidgets.QLabel("系统复位指令")
  391. self.under_right_groupbox_layout.addWidget(self.lb_reset, 6, 6, 1, 1)
  392. self.reset_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  393. self.under_right_groupbox_layout.addWidget(self.reset_check_box, 6, 7, 1, 1)
  394. self.under_layout.addWidget(self.under_right_groupbox, 1)
  395. self.verticalLayout.addWidget(self.under_widget)