1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #!/usr/bin/env python
- # -*- encoding: utf-8 -*-
- from ui.own.frame_theme import MyFrame
- from utils.qt import QtWidgets, QtCore
- from utils.globalvar import SD
- class Record(MyFrame):
- def setupUi(self, Record):
- self.record = MyFrame(Record)
- self.record_layout = QtWidgets.QVBoxLayout(self.record)
- self.record_layout.setContentsMargins(0, 0, 0, 0)
- self.record_layout.setSpacing(0)
- self.record_widget = QtWidgets.QGroupBox("故障记录" if SD.SYSTEM_LANGUAGE == 0 else "Fault Record")
- self.record_box_layout = QtWidgets.QVBoxLayout(self.record_widget)
- self.record_table = QtWidgets.QTableWidget(self.record_widget)
- self.record_table.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
- self.record_table.setColumnCount(14)
- self.record_table.verticalHeader().setVisible(False)
- self.record_table.verticalHeader().setHighlightSections(True)
- self.record_table.verticalHeader().setSectionResizeMode(QtWidgets.QHeaderView.Stretch)
- self.record_table.horizontalHeader().setSectionResizeMode(QtWidgets.QHeaderView.Stretch)
- self.record_table.horizontalHeader().setSectionResizeMode(0, QtWidgets.QHeaderView.ResizeToContents)
- self.record_table.setHorizontalHeaderLabels(["序号", "记录时间", "告警等级", "系统状态", "故障代码", "总电压(V)", "总电流(A)", "SOC(%)", "最高单体电压", "最高单体电压编号", "最低单体电压", "最低单体电压编号", "断路器状态", "主正继电器状态"])
- # 时间戳 簇号 故障等级 簇电压 簇电流 簇SOC 簇SOH 簇单体V平均 簇单体Vmax单体号 簇单体Vmax 簇单体Vmin单体号 簇单体Vmin 簇单体T平均 簇单体Tmax单体号 簇单体Tmax 簇单体Tmin单体号 簇单体Tmin 主正接触器 主负接触器 预充接触器 断路器 干接点1 干接点2 最高单体SOC 最低单体SOC 平均单体SOC V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V60 V61 V62 V63 V64 V65 V66 V67 V68 V69 V70 V71 V72 V73 V74 V75 V76 V77 V78 V79 V80 V81 V82 V83 V84 V85 V86 V87 V88 V89 V90 V91 V92 V93 V94 V95 V96 V97 V98 V99 V100 V101 V102 V103 V104 V105 V106 V107 V108 V109 V110 V111 V112 V113 V114 V115 V116 V117 V118 V119 V120 V121 V122 V123 V124 V125 V126 V127 V128 V129 V130 V131 V132 V133 V134 V135 V136 V137 V138 V139 V140 V141 V142 V143 V144 V145 V146 V147 V148 V149 V150 V151 V152 V153 V154 V155 V156 V157 V158 V159 V160 V161 V162 V163 V164 V165 V166 V167 V168 V169 V170 V171 V172 V173 V174 V175 V176 V177 V178 V179 V180 V181 V182 V183 V184 V185 V186 V187 V188 V189 V190 V191 V192 V193 V194 V195 V196 V197 V198 V199 V200 V201 V202 V203 V204 V205 V206 V207 V208 V209 V210 V211 V212 V213 V214 V215 V216 V217 V218 V219 V220 V221 V222 V223 V224 V225 V226 V227 V228 V229 V230 V231 V232 V233 V234 V235 V236 V237 V238 V239 V240 V241 V242 V243 V244 V245 V246 V247 V248 V249 V250 V251 V252 V253 V254 V255 V256 V257 V258 V259 V260 V261 V262 V263 V264 V265 V266 V267 V268 V269 V270 V271 V272 V273 V274 V275 V276 V277 V278 V279 V280 V281 V282 V283 V284 V285 V286 V287 V288 V289 V290 V291 V292 V293 V294 V295 V296 V297 V298 V299 V300 V301 V302 V303 V304 V305 V306 V307 V308 V309 V310 V311 V312 V313 V314 V315 V316 V317 V318 V319 V320 V321 V322 V323 V324 V325 V326 V327 V328 V329 V330 V331 V332 V333 V334 V335 V336 V337 V338 V339 V340 V341 V342 V343 V344 V345 V346 V347 V348 V349 V350 V351 V352 V353 V354 V355 V356 V357 V358 V359 V360 V361 V362 V363 V364 V365 V366 V367 V368 V369 V370 V371 V372 V373 V374 V375 V376 V377 V378 V379 V380 V381 V382 V383 V384 V385 V386 V387 V388 V389 V390 V391 V392 V393 V394 V395 V396 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 T15 T16 T17 T18 T19 T20 T21 T22 T23 T24 T25 T26 T27 T28 T29 T30 T31 T32 T33 T34 T35 T36 T37 T38 T39 T40 T41 T42 T43 T44 T45 T46 T47 T48 T49 T50 T51 T52 T53 T54 T55 T56 T57 T58 T59 T60 T61 T62 T63 T64 T65 T66 T67 T68 T69 T70 T71 T72 T73 T74 T75 T76 T77 T78 T79 T80 T81 T82 T83 T84 T85 T86 T87 T88 T89 T90 T91 T92 T93 T94 T95 T96 T97 T98 T99 T100 T101 T102 T103 T104 T105 T106 T107 T108 T109 T110 T111 T112 T113 T114 T115 T116 T117 T118 T119 T120 T121 T122 T123 T124 T125 T126 T127 T128 T129 T130 T131 T132 T133 T134 T135 T136 T137 T138 T139 T140 T141 T142 T143 T144 T145 T146 T147 T148 T149 T150 T151 T152 T153 T154 T155 T156 T157 T158 T159 T160 T161 T162 T163 T164 T165 T166 T167 T168 T169 T170 T171 T172 T173 T174 T175 T176 T177 T178 T179 T180 T181 T182 T183 T184 T185 T186 T187 T188 T189 T190 T191 T192 T193 T194 T195 T196 T197 T198 T199 T200 T201 T202 T203 T204 T205 T206 T207 T208 T209 T210 T211 T212 T213 T214 T215 T216 T217 T218 T219 T220 T221 T222 T223 T224 T225 T226 T227 T228 T229 T230 T231 T232 T233 T234 T235 T236 T237 T238 T239 T240 T241 T242 T243 T244 T245 T246 T247 T248 T249 T250 T251 T252 T253 T254 T255 T256 T257 T258 T259 T260 T261 T262 T263 T264 T265 T266 T267 T268 T269 T270 T271 T272 T273 T274 T275 T276 T277 T278 T279 T280 T281 T282 T283 T284 T285 T286 T287 T288 T289 T290 T291 T292 T293 T294 T295 T296 T297 T298 T299 T300 T301 T302 T303 T304 T305 T306 T307 T308 T309 T310 T311 T312 T313 T314 T315 T316 T317 T318 T319 T320 T321 T322 T323 T324 T325 T326 T327 T328 T329 T330 T331 T332 T333 T334 T335 T336 T337 T338 T339 T340 T341 T342 T343 T344 T345 T346 T347 T348 T349 T350 T351 T352 T353 T354 T355 T356 T357 T358 T359 T360
- self.record_table.setRowCount(20)
- self.record_box_layout.addWidget(self.record_table)
- self.record_layout.addWidget(self.record_widget)
- self.record_table_widget = QtWidgets.QWidget(self.record)
- self.record_table_layout = QtWidgets.QHBoxLayout(self.record_table_widget)
- self.save_record = QtWidgets.QPushButton("运行数据保存")
- self.record_table_layout.addWidget(self.save_record)
- self.stop_record = QtWidgets.QPushButton("停止保存运行数据")
- self.stop_record.setDisabled(True)
- self.record_table_layout.addWidget(self.stop_record)
- spacerItem1 = QtWidgets.QSpacerItem(0, 40, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
- self.record_table_layout.addItem(spacerItem1)
- self.read_record = QtWidgets.QPushButton("故障记录读取")
- self.record_table_layout.addWidget(self.read_record)
- self.stop_read_record = QtWidgets.QPushButton("停止读取故障记录")
- self.record_table_layout.addWidget(self.stop_read_record)
- self.clear_record = QtWidgets.QPushButton("清除故障记录")
- self.record_table_layout.addWidget(self.clear_record)
- self.save_fault_record = QtWidgets.QPushButton("存储故障记录")
- self.record_table_layout.addWidget(self.save_fault_record)
- self.record_layout.addWidget(self.record_table_widget)
- QtCore.QMetaObject.connectSlotsByName(Record)
|