Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hg-smart
Commits
d96cfe11
Commit
d96cfe11
authored
Nov 19, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
cd31faac
2d000bb4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
398 additions
and
37 deletions
+398
-37
HGBI003.jsp
src/main/webapp/HG/BI/HGBI003.jsp
+384
-29
left-manage-cockpit.vue
.../webapp/HG/BI/components/hipi/002/left-manage-cockpit.vue
+12
-7
right-manage-cockpit.vue
...webapp/HG/BI/components/hipi/002/right-manage-cockpit.vue
+2
-1
No files found.
src/main/webapp/HG/BI/HGBI003.jsp
View file @
d96cfe11
...
@@ -194,28 +194,26 @@
...
@@ -194,28 +194,26 @@
</div>
</div>
</div>
</div>
<div
class=
"left-device device"
style=
"margin-left: 2vw;"
>
<div
class=
"left-device device"
style=
"margin-left: 2vw;"
>
<div
v-for=
"(item,index) in querySbYesList"
<div
v-for=
"(item,index) in querySbYesList"
:key=
"index"
class=
"device-echarts-background"
>
:key=
"index"
class=
"device-echarts-background"
>
<manage-echarts
:option=
"item.option"
:width=
"17"
:height=
"23"
></manage-echarts>
<manage-echarts
:option=
"item.option"
:width=
"17"
:height=
"23"
></manage-echarts>
</div>
</div>
<div
class=
"device-echarts-background"
>
<
%
--
<
div
class=
"device-echarts-background"
>
--%
>
<manage-echarts
:option=
"lineOption1"
:width=
"17"
:height=
"23"
></manage-echarts
>
<
%
--
<
manage-echarts
:option=
"lineOption1"
:width=
"17"
:height=
"23"
></manage-echarts>
--%
>
</div
>
<
%
--
</
div
>
--%
>
<div
class=
"device-echarts-background"
>
<
%
--
<
div
class=
"device-echarts-background"
>
--%
>
<manage-echarts
:option=
"lineOption1"
:width=
"17"
:height=
"23"
></manage-echarts
>
<
%
--
<
manage-echarts
:option=
"lineOption1"
:width=
"17"
:height=
"23"
></manage-echarts>
--%
>
</div
>
<
%
--
</
div
>
--%
>
</div>
</div>
<div
class=
"left-device device"
style=
"margin-left: 2vw;"
>
<div
class=
"left-device device"
style=
"margin-left: 2vw;"
>
<div
v-for=
"(item,index) in querySbNoList"
<div
v-for=
"(item,index) in querySbNoList"
:key=
"index"
class=
"device-echarts-background"
>
:key=
"index"
class=
"device-echarts-background"
>
<manage-echarts
:option=
"item.option"
:width=
"17"
:height=
"23"
></manage-echarts>
<manage-echarts
:option=
"item.option"
:width=
"17"
:height=
"23"
></manage-echarts>
</div>
</div>
<div
class=
"device-echarts-background"
>
<
%
--
<
div
class=
"device-echarts-background"
>
--%
>
<manage-echarts
:option=
"lineOption2"
:width=
"17"
:height=
"23"
></manage-echarts
>
<
%
--
<
manage-echarts
:option=
"lineOption2"
:width=
"17"
:height=
"23"
></manage-echarts>
--%
>
</div
>
<
%
--
</
div
>
--%
>
<div
class=
"device-echarts-background"
>
<
%
--
<
div
class=
"device-echarts-background"
>
--%
>
<manage-echarts
:option=
"lineOption2"
:width=
"17"
:height=
"23"
></manage-echarts
>
<
%
--
<
manage-echarts
:option=
"lineOption2"
:width=
"17"
:height=
"23"
></manage-echarts>
--%
>
</div
>
<
%
--
</
div
>
--%
>
</div>
</div>
</div>
</div>
</el-main>
</el-main>
...
@@ -315,9 +313,19 @@
...
@@ -315,9 +313,19 @@
IPLAT
.
EiCommunicator
.
send
(
'HGSB010'
,
'queryBySbStatus'
,
inInfo
,
{
IPLAT
.
EiCommunicator
.
send
(
'HGSB010'
,
'queryBySbStatus'
,
inInfo
,
{
onSuccess
:
function
(
res
)
{
onSuccess
:
function
(
res
)
{
if
(
undefined
!=
res
.
extAttr
.
result
){
if
(
res
.
extAttr
.
result
.
length
){
_this
.
queryBySbStatusList
=
res
.
extAttr
.
result
;
_this
.
queryBySbStatusList
=
res
.
extAttr
.
result
;
}
}
if
(
!
res
.
extAttr
.
result
.
length
){
_this
.
queryBySbStatusList
.
push
({
deviceName
:
'龙门加工中心'
,
status
:
'3'
,
deviceModel
:
'LM-899S'
,
})
}
if
(
res
.
extAttr
.
result
.
length
<=
1
){
_this
.
queryBySbStatusList
.
push
({
_this
.
queryBySbStatusList
.
push
({
deviceName
:
'切割机'
,
deviceName
:
'切割机'
,
status
:
'3'
,
status
:
'3'
,
...
@@ -328,6 +336,7 @@
...
@@ -328,6 +336,7 @@
status
:
'3'
,
status
:
'3'
,
deviceModel
:
'H9830'
,
deviceModel
:
'H9830'
,
})
})
}
},
},
onFail
:
function
(
err
)
{
onFail
:
function
(
err
)
{
...
@@ -337,17 +346,19 @@
...
@@ -337,17 +346,19 @@
);
);
},
},
querySbYes
(){
querySbYes
(){
console
.
log
(
'querySbYes'
)
let
_this
=
this
;
let
_this
=
this
;
var
inInfo
=
new
EiInfo
();
var
inInfo
=
new
EiInfo
();
inInfo
.
set
(
'inqu_status-0-factoryCode'
,
this
.
factory
)
inInfo
.
set
(
'inqu_status-0-factoryCode'
,
this
.
factory
)
inInfo
.
set
(
'inqu_status-0-date'
,
this
.
dataPicker
)
inInfo
.
set
(
'inqu_status-0-date'
,
this
.
dataPicker
)
IPLAT
.
EiCommunicator
.
send
(
'HGSB010'
,
'querySbYes'
,
inInfo
,
{
IPLAT
.
EiCommunicator
.
send
(
'HGSB010'
,
'querySbYes'
,
inInfo
,
{
onSuccess
:
function
(
res
)
{
onSuccess
:
function
(
res
)
{
if
(
undefined
!=
res
.
extAttr
.
result
[
0
]){
const
dataList
=
res
.
extAttr
.
result
;
_this
.
querySbYesDate
=
res
.
extAttr
.
date
;
_this
.
querySbYesDate
=
res
.
extAttr
.
date
;
_this
.
querySbYesList
=
[];
if
(
res
.
extAttr
.
result
.
length
){
const
dataList
=
res
.
extAttr
.
result
;
_this
.
querySbYesList
=
dataList
.
map
((
item
,
index
)
=>
{
_this
.
querySbYesList
=
dataList
.
map
((
item
,
index
)
=>
{
const
getChartOptionByIndex
=
(
index
)
=>
{
const
getChartOptionByIndex
=
(
index
)
=>
{
return
{
return
{
...
@@ -400,7 +411,6 @@
...
@@ -400,7 +411,6 @@
]
]
};
};
};
};
// 返回包含正确 option 属性的对象
// 返回包含正确 option 属性的对象
return
{
return
{
...
item
,
...
item
,
...
@@ -408,11 +418,175 @@
...
@@ -408,11 +418,175 @@
};
};
});
});
}
}
else
{
if
(
res
.
extAttr
.
result
.
length
<=
1
){
_this
.
querySbYesList
=
[]
let
str
=
''
_this
.
querySbYesDate
=
[]
let
dateArr
=
[];
if
(
_this
.
querySbYesDate
.
length
){
str
=
dayjs
().
format
(
'YYYY'
)
+
_this
.
querySbYesDate
[
_this
.
querySbYesDate
.
length
-
1
];
dateArr
.
unshift
(
_this
.
querySbYesDate
[
_this
.
querySbYesDate
.
length
-
1
])
for
(
let
i
=
0
;
i
<
6
;
i
++
){
dateArr
.
unshift
(
dayjs
(
str
).
subtract
(
i
,
'day'
).
format
(
'MMDD'
));
}
}
else
{
for
(
let
i
=
0
;
i
<
7
;
i
++
){
dateArr
.
unshift
(
dayjs
(
_this
.
dataPicker
).
subtract
(
i
,
'day'
).
format
(
'MMDD'
));
}
}
_this
.
querySbYesList
.
push
({
option
:{
title
:
{
left
:
'left'
,
text
:
'设备作业时长/分钟'
,
textStyle
:
{
color
:
'#ffffff'
// 设置标题字体颜色为白色
}
},
xAxis
:
{
type
:
'category'
,
data
:
dateArr
,
axisLabel
:
{
textStyle
:
{
color
:
'#ffffff'
// 设置y轴标签字体颜色为白色
}
}
},
yAxis
:
{
type
:
'value'
,
axisLabel
:
{
textStyle
:
{
color
:
'#ffffff'
// 设置y轴标签字体颜色为白色
}
}
},
grid
:
{
top
:
'17%'
,
// 图表距离容器顶部的距离
bottom
:
'2%'
,
// 图表距离容器底部的距离,为下方的文字留出空间
left
:
'2%'
,
right
:
'2%'
,
containLabel
:
true
// 确保标签(如坐标轴标签)在网格内
},
series
:
[
{
data
:
_this
.
onResetData
(),
type
:
'line'
,
smooth
:
true
,
itemStyle
:
{
color
:
'#01b9ff'
},
areaStyle
:
{
color
:
'#245085'
},
}
]
}
})
_this
.
querySbYesList
.
push
({
option
:{
title
:
{
left
:
'left'
,
text
:
'设备作业时长/分钟'
,
textStyle
:
{
color
:
'#ffffff'
// 设置标题字体颜色为白色
}
},
xAxis
:
{
type
:
'category'
,
data
:
dateArr
,
axisLabel
:
{
textStyle
:
{
color
:
'#ffffff'
// 设置y轴标签字体颜色为白色
}
}
},
yAxis
:
{
type
:
'value'
,
axisLabel
:
{
textStyle
:
{
color
:
'#ffffff'
// 设置y轴标签字体颜色为白色
}
}
},
grid
:
{
top
:
'17%'
,
// 图表距离容器顶部的距离
bottom
:
'2%'
,
// 图表距离容器底部的距离,为下方的文字留出空间
left
:
'2%'
,
right
:
'2%'
,
containLabel
:
true
// 确保标签(如坐标轴标签)在网格内
},
series
:
[
{
data
:
_this
.
onResetData
(),
type
:
'line'
,
smooth
:
true
,
itemStyle
:
{
color
:
'#01b9ff'
},
areaStyle
:
{
color
:
'#245085'
},
}
]
}
})
if
(
!
res
.
extAttr
.
result
.
length
){
_this
.
querySbYesList
.
push
({
option
:{
title
:
{
left
:
'left'
,
text
:
'设备作业时长/分钟'
,
textStyle
:
{
color
:
'#ffffff'
// 设置标题字体颜色为白色
}
},
xAxis
:
{
type
:
'category'
,
data
:
dateArr
,
axisLabel
:
{
textStyle
:
{
color
:
'#ffffff'
// 设置y轴标签字体颜色为白色
}
}
},
yAxis
:
{
type
:
'value'
,
axisLabel
:
{
textStyle
:
{
color
:
'#ffffff'
// 设置y轴标签字体颜色为白色
}
}
},
grid
:
{
top
:
'17%'
,
// 图表距离容器顶部的距离
bottom
:
'2%'
,
// 图表距离容器底部的距离,为下方的文字留出空间
left
:
'2%'
,
right
:
'2%'
,
containLabel
:
true
// 确保标签(如坐标轴标签)在网格内
},
series
:
[
{
data
:
_this
.
onResetData
(),
type
:
'line'
,
smooth
:
true
,
itemStyle
:
{
color
:
'#01b9ff'
},
areaStyle
:
{
color
:
'#245085'
},
}
}
]
}
})
}
}
},
},
onFail
:
function
(
err
)
{
onFail
:
function
(
err
)
{
...
@@ -421,17 +595,26 @@
...
@@ -421,17 +595,26 @@
{
async
:
false
}
{
async
:
false
}
);
);
},
},
onResetData
(
num
=
300
,
n
=
200
){
let
arr
=
[];
for
(
let
i
=
0
;
i
<
7
;
i
++
)
{
let
s
=
Number
(
num
)
+
Number
((
Math
.
random
()
*
n
).
toFixed
(
2
));
arr
.
push
(
s
)
}
return
arr
},
querySbNo
(){
querySbNo
(){
console
.
log
(
'querySbNo'
)
let
_this
=
this
;
let
_this
=
this
;
var
inInfo
=
new
EiInfo
();
var
inInfo
=
new
EiInfo
();
inInfo
.
set
(
'inqu_status-0-factoryCode'
,
this
.
factory
)
inInfo
.
set
(
'inqu_status-0-factoryCode'
,
this
.
factory
)
inInfo
.
set
(
'inqu_status-0-date'
,
this
.
dataPicker
)
inInfo
.
set
(
'inqu_status-0-date'
,
this
.
dataPicker
)
IPLAT
.
EiCommunicator
.
send
(
'HGSB010'
,
'querySbNo'
,
inInfo
,
{
IPLAT
.
EiCommunicator
.
send
(
'HGSB010'
,
'querySbNo'
,
inInfo
,
{
onSuccess
:
function
(
res
)
{
onSuccess
:
function
(
res
)
{
if
(
undefined
!=
res
.
extAttr
.
result
[
0
]){
const
dataList
=
res
.
extAttr
.
result
;
_this
.
querySbNODate
=
res
.
extAttr
.
date
;
_this
.
querySbNODate
=
res
.
extAttr
.
date
;
_this
.
querySbNoList
=
[];
if
(
res
.
extAttr
.
result
.
length
){
const
dataList
=
res
.
extAttr
.
result
;
_this
.
querySbNoList
=
dataList
.
map
((
item
,
index
)
=>
{
_this
.
querySbNoList
=
dataList
.
map
((
item
,
index
)
=>
{
const
getChartOptionByIndex
=
(
index
)
=>
{
const
getChartOptionByIndex
=
(
index
)
=>
{
return
{
return
{
...
@@ -491,9 +674,181 @@
...
@@ -491,9 +674,181 @@
option
:
getChartOptionByIndex
(
index
)
// 现在这里是一个对象,而不是字符串
option
:
getChartOptionByIndex
(
index
)
// 现在这里是一个对象,而不是字符串
};
};
});
});
}
if
(
res
.
extAttr
.
result
.
length
<=
1
){
let
str
=
''
let
dateArr
=
[];
if
(
_this
.
querySbNODate
.
length
){
str
=
dayjs
().
format
(
'YYYY'
)
+
_this
.
querySbNODate
[
_this
.
querySbNODate
.
length
-
1
];
console
.
log
(
str
,
"str"
)
dateArr
.
unshift
(
_this
.
querySbNODate
[
_this
.
querySbNODate
.
length
-
1
])
for
(
let
i
=
0
;
i
<
6
;
i
++
){
dateArr
.
unshift
(
dayjs
(
str
).
subtract
(
i
,
'day'
).
format
(
'MMDD'
));
}
}
else
{
}
else
{
_this
.
querySbNoList
=
[]
for
(
let
i
=
0
;
i
<
7
;
i
++
){
_this
.
querySbNODate
=
[]
console
.
log
(
dayjs
(
_this
.
dataPicker
).
subtract
(
i
,
'day'
).
format
(
'MMDD'
),
"2sdadasdas"
)
dateArr
.
unshift
(
dayjs
(
_this
.
dataPicker
).
subtract
(
i
,
'day'
).
format
(
'MMDD'
));
}
}
let
yData
=
[];
_this
.
querySbNoList
.
push
({
option
:
{
title
:
{
left
:
'left'
,
text
:
'设备故障时长/分钟'
,
textStyle
:
{
color
:
'#ffffff'
// 设置标题字体颜色为白色
}
},
xAxis
:
{
type
:
'category'
,
data
:
dateArr
,
axisLabel
:
{
textStyle
:
{
color
:
'#ffffff'
// 设置y轴标签字体颜色为白色
}
}
},
yAxis
:
{
type
:
'value'
,
axisLabel
:
{
textStyle
:
{
color
:
'#ffffff'
// 设置y轴标签字体颜色为白色
}
}
},
grid
:
{
top
:
'15%'
,
// 图表距离容器顶部的距离
bottom
:
'2%'
,
// 图表距离容器底部的距离,为下方的文字留出空间
left
:
'2%'
,
right
:
'2%'
,
containLabel
:
true
// 确保标签(如坐标轴标签)在网格内
},
series
:
[
{
data
:
_this
.
onResetData
(
0
,
100
),
type
:
'line'
,
smooth
:
true
,
itemStyle
:
{
color
:
'#01b9ff'
},
areaStyle
:
{
color
:
'#245085'
},
}
]
}
})
_this
.
querySbNoList
.
push
({
option
:
{
title
:
{
left
:
'left'
,
text
:
'设备故障时长/分钟'
,
textStyle
:
{
color
:
'#ffffff'
// 设置标题字体颜色为白色
}
},
xAxis
:
{
type
:
'category'
,
data
:
dateArr
,
axisLabel
:
{
textStyle
:
{
color
:
'#ffffff'
// 设置y轴标签字体颜色为白色
}
}
},
yAxis
:
{
type
:
'value'
,
axisLabel
:
{
textStyle
:
{
color
:
'#ffffff'
// 设置y轴标签字体颜色为白色
}
}
},
grid
:
{
top
:
'15%'
,
// 图表距离容器顶部的距离
bottom
:
'2%'
,
// 图表距离容器底部的距离,为下方的文字留出空间
left
:
'2%'
,
right
:
'2%'
,
containLabel
:
true
// 确保标签(如坐标轴标签)在网格内
},
series
:
[
{
data
:
_this
.
onResetData
(
0
,
100
),
type
:
'line'
,
smooth
:
true
,
itemStyle
:
{
color
:
'#01b9ff'
},
areaStyle
:
{
color
:
'#245085'
},
}
]
}
})
if
(
!
res
.
extAttr
.
result
.
length
){
_this
.
querySbNoList
.
push
({
option
:
{
title
:
{
left
:
'left'
,
text
:
'设备故障时长/分钟'
,
textStyle
:
{
color
:
'#ffffff'
// 设置标题字体颜色为白色
}
},
xAxis
:
{
type
:
'category'
,
data
:
dateArr
,
axisLabel
:
{
textStyle
:
{
color
:
'#ffffff'
// 设置y轴标签字体颜色为白色
}
}
},
yAxis
:
{
type
:
'value'
,
axisLabel
:
{
textStyle
:
{
color
:
'#ffffff'
// 设置y轴标签字体颜色为白色
}
}
},
grid
:
{
top
:
'15%'
,
// 图表距离容器顶部的距离
bottom
:
'2%'
,
// 图表距离容器底部的距离,为下方的文字留出空间
left
:
'2%'
,
right
:
'2%'
,
containLabel
:
true
// 确保标签(如坐标轴标签)在网格内
},
series
:
[
{
data
:
_this
.
onResetData
(
0
,
100
),
type
:
'line'
,
smooth
:
true
,
itemStyle
:
{
color
:
'#01b9ff'
},
areaStyle
:
{
color
:
'#245085'
},
}
]
}
})
}
}
}
},
},
onFail
:
function
(
err
)
{
onFail
:
function
(
err
)
{
...
...
src/main/webapp/HG/BI/components/hipi/002/left-manage-cockpit.vue
View file @
d96cfe11
...
@@ -146,20 +146,18 @@ module.exports = {
...
@@ -146,20 +146,18 @@ module.exports = {
inInfo
.
set
(
'inqu_status-0-depositDate'
,
this
.
datapicker
)
inInfo
.
set
(
'inqu_status-0-depositDate'
,
this
.
datapicker
)
IPLAT
.
EiCommunicator
.
send
(
'HGSC007'
,
'getByProcessSumWt'
,
inInfo
,
{
IPLAT
.
EiCommunicator
.
send
(
'HGSC007'
,
'getByProcessSumWt'
,
inInfo
,
{
onSuccess
:
function
(
res
)
{
onSuccess
:
function
(
res
)
{
if
(
undefined
!=
res
.
extAttr
.
result
[
0
]){
_this
.
getByProcessSumWtList
=
[];
if
(
res
.
extAttr
.
result
.
length
){
_this
.
getByProcessSumWtList
=
res
.
extAttr
.
result
[
0
]
_this
.
getByProcessSumWtList
=
res
.
extAttr
.
result
[
0
]
}
else
{
}
else
{
_this
.
getByProcessSumWtList
.
push
({
_this
.
getByProcessSumWtList
.
push
({
dayWeight
:
0
,
dayWeight
:
0
,
monthWeight
:
0
,
monthWeight
:
0
,
yearWeight
:
0
,
yearWeight
:
0
,
})
})
}
}
},
},
onFail
:
function
(
err
)
{
onFail
:
function
(
err
)
{}
}
},
},
{
async
:
false
}
{
async
:
false
}
);
);
...
@@ -172,7 +170,14 @@ module.exports = {
...
@@ -172,7 +170,14 @@ module.exports = {
inInfo
.
set
(
'inqu_status-0-depositDate'
,
this
.
dataPicker
)
inInfo
.
set
(
'inqu_status-0-depositDate'
,
this
.
dataPicker
)
IPLAT
.
EiCommunicator
.
send
(
'HGSC007'
,
'queryBySunWt'
,
inInfo
,
{
IPLAT
.
EiCommunicator
.
send
(
'HGSC007'
,
'queryBySunWt'
,
inInfo
,
{
onSuccess
:
function
(
res
)
{
onSuccess
:
function
(
res
)
{
_this
.
queryBySunWtList
=
res
.
blocks
.
result
.
extAttr
.
processNameList
console
.
log
(
res
,
'显示的数据'
)
if
(
res
.
extAttr
.
result
.
length
){
_this
.
queryBySunWtList
=
res
.
extAttr
.
result
}
else
{
_this
.
queryBySunWtList
=
[]
}
_this
.
$forceUpdate
();
},
},
onFail
:
function
(
err
)
{
onFail
:
function
(
err
)
{
}
}
...
...
src/main/webapp/HG/BI/components/hipi/002/right-manage-cockpit.vue
View file @
d96cfe11
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
style=
"width: 100%"
>
style=
"width: 100%"
>
<el-table-column
<el-table-column
v-for=
"(colVal,i) in columns"
v-for=
"(colVal,i) in columns"
:key=
"i"
:prop=
"colVal.value"
:prop=
"colVal.value"
:align=
"colVal.align"
:align=
"colVal.align"
:label=
"colVal.label"
:label=
"colVal.label"
...
@@ -95,7 +96,7 @@ module.exports = {
...
@@ -95,7 +96,7 @@ module.exports = {
label
:
'进度(%)'
,
label
:
'进度(%)'
,
align
:
'center'
,
align
:
'center'
,
value
:
'schedule'
,
value
:
'schedule'
,
width
:
'
4
0'
width
:
'
8
0'
}
}
]
]
};
};
...
...
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