Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dwsproject
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dws
dwsproject
Commits
b48c70c8
Commit
b48c70c8
authored
Jun 19, 2025
by
nningxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大屏菜单调整
parent
4d4e63aa
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
16 deletions
+60
-16
tht_project/controllers/big_screen.py
+10
-6
tht_project/static/html/big_screen/view/cook_process.html
+45
-5
tht_project/static/html/big_screen/view/expected_process.html
+0
-0
tht_project/views/big_screen.xml
+5
-5
No files found.
tht_project/controllers/big_screen.py
View file @
b48c70c8
...
...
@@ -65,13 +65,17 @@ class ResMesBigScreen(http.Controller):
def
common_dws_interface
(
self
,
body
=
None
,
url
=
''
,
cate
=
''
):
"""获取大屏数据"""
plant_name
=
body
.
get
(
"plant_name"
,
False
)
today
=
body
.
get
(
"today"
,
False
)
if
not
today
:
today
=
fields
.
Date
.
today
()
.
strftime
(
'
%
Y-
%
m-
%
d'
)
category_name
=
body
.
get
(
"category_name"
,
False
)
plant_name
=
body
.
get
(
"plant_name"
,
''
)
today
=
body
.
get
(
"today"
,
''
)
device_code_list
=
body
.
get
(
"device_code_list"
,
[])
# if not today:
# today = fields.Date.today().strftime('%Y-%m-%d')
category_name
=
body
.
get
(
"category_name"
,
''
)
# 构建查询条件
equipment_list
=
self
.
search_equipments
(
plant_name
=
plant_name
,
category_name
=
category_name
)
if
device_code_list
:
equipment_list
=
device_code_list
else
:
equipment_list
=
self
.
search_equipments
(
plant_name
=
plant_name
,
category_name
=
category_name
)
try
:
api_path
=
dws_platform_url
+
url
payload
=
{
...
...
tht_project/static/html/big_screen/view/cook_process.html
View file @
b48c70c8
...
...
@@ -364,6 +364,44 @@
})
})
},
requestSelfApi
(
url
,
config
=
{},
errorMessage
=
"操作失败,请稍后重试"
,
contentType
=
"application/json"
,
baseurl
=
"https://tht.dws.rokecloud.com"
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
url
)
reject
(
null
)
axios
({
method
:
"POST"
,
url
:
baseurl
+
url
,
data
:
config
,
headers
:
{
"Content-Type"
:
contentType
},
}).
then
((
result
)
=>
{
if
(
result
?.
data
?.
result
?.
success
||
result
?.
data
?.
result
?.
code
==
0
||
result
?.
data
?.
result
?.
state
==
"success"
||
result
?.
data
?.
code
==
0
)
{
resolve
(
result
.
data
)
}
else
if
(
result
?.
data
?.
result
?.
code
==
1
)
{
reject
(
result
.
data
.
result
.
message
)
}
else
if
(
result
?.
data
?.
result
?.
state
==
"error"
)
{
reject
(
result
.
data
.
result
.
megs
)
}
else
if
(
result
?.
data
?.
code
==
1
)
{
reject
(
result
.
data
.
message
)
}
else
if
(
!
result
?.
data
?.
result
?.
success
)
{
reject
(
result
.
data
.
result
.
msg
)
}
else
if
(
result
?.
data
?.
error
)
{
reject
(
result
.
data
.
error
.
message
)
}
}).
catch
((
error
)
=>
{
reject
(
errorMessage
)
})
})
},
// 接口请求Dws系统方法封装
requestDwsApi
(
url
,
...
...
@@ -403,11 +441,12 @@
useRatio
:
[]
// 设备资源利用率
}
// 查询烟熏机数据
await
this
.
request
DwsApi
(
'/public/device
/get_yanxunlu_data'
,
{
await
this
.
request
SelfApi
(
'
/get_yanxunlu_data'
,
{
"plant_name"
:
"蒸煮车间"
,
"category_name"
:
"烟熏炉"
"category_name"
:
"烟熏炉"
,
'today'
:
''
,
}).
then
(
result
=>
{
result
.
data
.
forEach
(
item
=>
{
result
.
result
.
data
.
forEach
(
item
=>
{
smudgingChance
.
xAxisData
.
push
(
item
.
device_name
)
smudgingChance
.
processTime
.
push
(
item
.
process
)
smudgingChance
.
temperatureX
.
push
(
item
.
temperatureX
)
...
...
@@ -415,9 +454,10 @@
})
}).
catch
(
error
=>
{
console
.
error
(
error
)
})
// 查询烟熏机设备资源利用率
await
this
.
request
DwsApi
(
'/public/device
/big_screen_today'
,
{
await
this
.
request
SelfApi
(
'
/big_screen_today'
,
{
"plant_name"
:
"蒸煮车间"
,
"category_name"
:
"烟熏炉"
"category_name"
:
"烟熏炉"
,
'today'
:
''
,
}).
then
(
result
=>
{
}).
catch
(
error
=>
{
console
.
error
(
error
)
})
setTimeout
(()
=>
{
...
...
tht_project/static/html/big_screen/view/expected_process.html
View file @
b48c70c8
This diff is collapsed.
Click to expand it.
tht_project/views/big_screen.xml
View file @
b48c70c8
...
...
@@ -13,16 +13,16 @@
<field
name=
"target"
>
current
</field>
</record>
<menuitem
id=
"roke_mes_equipment_kanban"
name=
"设备看板"
sequence=
"31"
parent=
"roke_mes_equipment.roke_mes_equipment_main_menu"
active=
"1"
/
>
<!-- <menuitem id="roke_mes_equipment_kanban" name="设备看板" sequence="31"-->
<!-- parent="roke_mes_equipment.roke_mes_equipment_main_menu"-->
<!-- active="1"/>--
>
<menuitem
id=
"roke_mes_expected_process"
name=
"预料看板"
sequence=
"10"
parent=
"tht_project.roke_mes_equipment_kanban"
action=
"action_expected_process"
active=
"1"
/>
<menuitem
id=
"roke_mes_cook_process"
name=
"成型工序"
sequence=
"20"
parent=
"tht_project.roke_mes_equipment_kanban"
action=
"action_cook_process"
active=
"1"
/>
...
...
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