Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
EMUAFactory
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mayinghao
EMUAFactory
Commits
11a6712e
Commit
11a6712e
authored
Jun 24, 2025
by
mayinghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加状态提示label,回车绑定,刷新页面
parent
a2a75ef0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
main.py
main.py
+33
-1
No files found.
main.py
View file @
11a6712e
...
...
@@ -9,6 +9,7 @@ import requests
import
json
import
datetime
import
oss2
import
time
import
json
from
oss2
import
SizedFileAdapter
,
determine_part_size
...
...
@@ -81,6 +82,7 @@ class OrderDetail(QMainWindow):
self
.
counter
=
0
self
.
status_info
=
""
# 主窗口部件和布局
central_widget
=
QWidget
()
...
...
@@ -234,6 +236,11 @@ class OrderDetail(QMainWindow):
if
value
[
1
]
==
100
:
data
=
self
.
progress_widgets
[
value
[
0
]]
data
[
"widget"
]
.
deleteLater
()
time_str
=
time
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
,
time
.
localtime
())
info_append
=
f
"{time_str} {value[2]}上传成功
\n
"
self
.
status_info
+=
info_append
self
.
file_label
.
setText
(
self
.
status_info
)
else
:
self
.
progress_bars
[
value
[
0
]]
.
setValue
(
value
[
1
])
...
...
@@ -355,7 +362,10 @@ class OrderDetail(QMainWindow):
response
=
requests
.
post
(
callback_url
,
data
=
datas
)
res
=
response
.
json
()
if
res
[
"obj"
]
==
"保存成功"
:
self
.
file_label
.
setText
(
"回调成功"
)
time_str
=
time
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
,
time
.
localtime
())
info_append
=
f
"{time_str} {filename}上传成功
\n
"
self
.
status_info
+=
info_append
self
.
file_label
.
setText
(
self
.
status_info
)
class
DeviceTableModel
(
QAbstractTableModel
):
...
...
@@ -479,11 +489,16 @@ class EqipInfoWindow(QMainWindow):
# 页码选择
self
.
page_num_label
=
QLabel
(
"选择页码"
)
self
.
page_list_combo
=
QComboBox
()
self
.
page_list_combo
.
setFixedSize
(
80
,
20
)
self
.
filter_layout
.
addWidget
(
self
.
filter_label
)
self
.
filter_layout
.
addWidget
(
self
.
brand_combo
)
self
.
filter_layout
.
addWidget
(
self
.
page_num_label
)
self
.
filter_layout
.
addWidget
(
self
.
page_list_combo
)
self
.
filter_layout
.
addStretch
()
self
.
refresh_button
=
QPushButton
(
"刷新页面"
)
self
.
refresh_button
.
setContentsMargins
(
0
,
0
,
60
,
0
)
self
.
filter_layout
.
addWidget
(
self
.
refresh_button
)
self
.
refresh_button
.
clicked
.
connect
(
lambda
:
(
self
.
update_page_info
(
1
),
self
.
page_list_combo
.
setCurrentIndex
(
0
)))
main_layout
.
addLayout
(
self
.
filter_layout
)
# 获取所有品牌并去重,添加"所有品牌"选项
brands
=
list
(
set
(
device
[
2
]
for
device
in
self
.
devices
))
...
...
@@ -512,9 +527,16 @@ class EqipInfoWindow(QMainWindow):
for
row
in
range
(
len
(
self
.
devices
)):
self
.
add_operation_buttons
(
row
)
# 布局
main_layout
.
addWidget
(
self
.
table_view
)
self
.
status_label
=
QLabel
()
main_layout
.
addWidget
(
self
.
status_label
)
time_str
=
time
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
,
time
.
localtime
())
info_append
=
f
"{time_str} 第1页
\n
"
self
.
status_label
.
setText
(
info_append
)
self
.
setCentralWidget
(
central_widget
)
self
.
show
()
# 更新列表信息
...
...
@@ -552,6 +574,10 @@ class EqipInfoWindow(QMainWindow):
self
.
devices
=
result
self
.
model
=
DeviceTableModel
(
self
.
devices
,
self
.
headers
)
self
.
table_view
.
setModel
(
self
.
model
)
time_str
=
time
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
,
time
.
localtime
())
info_append
=
f
"{time_str} 第{page_num}页
\n
"
self
.
status_label
.
setText
(
info_append
)
# 更新品牌列表
brands
=
list
(
set
(
device
[
2
]
for
device
in
self
.
devices
))
...
...
@@ -703,6 +729,12 @@ class LoginWindow(QMainWindow):
self
.
order_info_page
=
None
self
.
show
()
def
keyPressEvent
(
self
,
event
):
if
event
.
key
()
==
Qt
.
Key_Return
or
event
.
key
()
==
Qt
.
Key_Enter
:
self
.
login_in
()
else
:
super
()
.
keyPressEvent
(
event
)
def
login_in
(
self
):
account
=
self
.
ui
.
lineEdit_l_username
.
text
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment