Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kwell-mes
Project
Project
Details
Activity
Releases
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
gavelinfo
kwell-mes
Commits
18a34247
Commit
18a34247
authored
May 12, 2023
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KMES修改
parent
c2bb6c52
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
210 additions
and
42 deletions
+210
-42
api.js
gavel/src/main/resources/static/js/dashboard/api.js
+49
-0
echarts.js
gavel/src/main/resources/static/js/dashboard/echarts.js
+145
-31
first.html
.../main/resources/templates/views/kmes/dashboard/first.html
+16
-11
No files found.
gavel/src/main/resources/static/js/dashboard/api.js
View file @
18a34247
...
@@ -241,6 +241,55 @@
...
@@ -241,6 +241,55 @@
console
.
log
(
e
||
"请求失败"
)
console
.
log
(
e
||
"请求失败"
)
})
})
}
}
/* 日排除合格率 */
function
apisetRpcHglEchart1
(
chartHgl
,
isRcl
){
function
gethgl
(){
return
new
Promise
(
function
(
y
,
n
){
HTTP
.
post
(
"queryGpfkHgl"
,
{},
function
(
result
)
{
if
(
result
[
'success'
])
{
let
data
=
result
.
data
.
records
result
.
data
.
records
.
forEach
(
function
(
e
,
index
){
data
[
index
].
fkrq
=
new
Date
(
e
.
fkrq
).
toLocaleDateString
().
split
(
'/'
).
join
(
'-'
)
if
(
e
.
fksl
==
0
){
data
[
index
].
hgl
=
0
}
else
{
let
hgl
=
(
e
.
hgsl
/
e
.
fksl
)
*
100
hgl
=
hgl
.
toFixed
(
2
)
data
[
index
].
hgl
=
hgl
}
})
y
(
data
)
}
else
{
n
(
"请求失败"
)
}
});
})
}
gethgl
().
then
(
function
(
ye
){
HTTP
.
post
(
"queryWeekPcsl"
,
{},
function
(
result
)
{
if
(
result
[
'success'
])
{
let
data
=
result
.
data
.
records
data
.
forEach
(
function
(
e
,
index
){
data
[
index
].
jhrq
=
new
Date
(
e
.
pcrq
).
toLocaleDateString
().
split
(
'/'
).
join
(
'-'
)
})
if
(
isRcl
==
'rcl'
){
setRclHglEchart1
(
chartHgl
,
ye
,
data
)
}
else
{
setRpcHglEchart
(
chartHgl
,
ye
,
data
)
}
}
else
{
console
.
log
(
"请求失败"
)
}
});
}).
catch
(
function
(
e
){
console
.
log
(
e
||
"请求失败"
)
})
}
function
apiqueryWorkingWO
(){
function
apiqueryWorkingWO
(){
HTTP
.
post
(
"queryWorkingWO"
,
{},
function
(
result
)
{
HTTP
.
post
(
"queryWorkingWO"
,
{},
function
(
result
)
{
if
(
result
[
'success'
])
{
if
(
result
[
'success'
])
{
...
...
gavel/src/main/resources/static/js/dashboard/echarts.js
View file @
18a34247
...
@@ -2596,6 +2596,7 @@ function setRpcHglEchart(chart, apidata1, apidata2) {
...
@@ -2596,6 +2596,7 @@ function setRpcHglEchart(chart, apidata1, apidata2) {
hgllist
.
push
(
e
.
hgl
)
hgllist
.
push
(
e
.
hgl
)
})
})
apidata2
.
forEach
(
function
(
e
)
{
apidata2
.
forEach
(
function
(
e
)
{
console
.
log
(
e
.
jhrq
)
console
.
log
(
e
.
jhrq
)
datelist
.
push
(
e
.
jhrq
.
slice
(
5
))
datelist
.
push
(
e
.
jhrq
.
slice
(
5
))
...
@@ -2806,12 +2807,12 @@ function setRclHglEchart(chart, apidata1, apidata2) {
...
@@ -2806,12 +2807,12 @@ function setRclHglEchart(chart, apidata1, apidata2) {
// }
// }
// }
// }
// },
// },
legend
:
{
//
legend: {
data
:
[
'日产量'
,
'合格率
'
],
// data: ['日产量
'],
textStyle
:
{
//
textStyle: {
color
:
'white'
//
color: 'white'
}
//
}
},
//
},
grid
:
{
grid
:
{
left
:
'3%'
,
left
:
'3%'
,
right
:
'4%'
,
right
:
'4%'
,
...
@@ -2871,6 +2872,135 @@ function setRclHglEchart(chart, apidata1, apidata2) {
...
@@ -2871,6 +2872,135 @@ function setRclHglEchart(chart, apidata1, apidata2) {
formatter
:
'{value}'
formatter
:
'{value}'
}
}
},
},
// {
// type: 'value',
// name: '合格率',
// min: 0,
// max: 100,
// interval: 20,
// nameTextStyle: {
// color: "white"
// },
// splitLine: {
// show: false,
// },
// axisTick: {
// show: true,
// lineStyle: {
// color: 'white',
// }
// },
// axisLine: {
// show: true,
// lineStyle: {
// color: 'white',
// }
// },
// axisLabel: {
// show: true,
// color: 'white',
// formatter: '{value} %'
// }
// },
],
series
:
[{
name
:
'日产量'
,
type
:
'bar'
,
data
:
wglist
||
[
2.6
,
5.9
,
9.0
,
26.4
,
28.7
,
],
barWidth
:
30
,
itemStyle
:
{
normal
:
{
label
:
{
show
:
true
,
position
:
"top"
,
textStyle
:
{
color
:
"white"
,
}
}
}
}
},
// {
// name: '合格率',
// type: 'line',
// yAxisIndex: 1,
// data: hgllist || [20, 30, 90, 30, 29],
// itemStyle: {
// normal: {
// label: {
// show: true,
// position: "top",
// textStyle: {
// color: "orange",
// }
// }
// }
// }
// }
]
};
chart
.
setOption
(
ops
,
true
);
}
function
setRclHglEchart1
(
chart
,
apidata1
,
apidata2
)
{
let
datelist
=
[]
let
hgllist
=
[]
let
jslist
=
[]
let
wglist
=
[]
if
(
apidata1
&&
apidata2
)
{
apidata1
.
forEach
(
function
(
e
)
{
hgllist
.
push
(
e
.
hgl
)
})
console
.
log
(
hgllist
,
'_____________________________'
)
apidata2
.
forEach
(
function
(
e
)
{
datelist
.
push
(
e
.
jhrq
.
slice
(
5
))
jslist
.
push
(
e
.
jhsl
)
wglist
.
push
(
e
.
wgsl
)
})
}
var
ops
=
{
color
:
[
"#409eff"
,
"#55ff7f"
,
"#ffd03e"
],
grid
:
{
left
:
'3%'
,
right
:
'4%'
,
bottom
:
'3%'
,
containLabel
:
true
},
xAxis
:
[{
type
:
'category'
,
data
:
datelist
||
[
'Mon'
,
'Tue'
,
'Wed'
,
'Thu'
,
'Fri'
],
axisPointer
:
{
type
:
'shadow'
},
axisTick
:
{
show
:
true
,
lineStyle
:
{
color
:
"white"
}
},
axisLine
:
{
show
:
true
,
lineStyle
:
{
color
:
"white"
}
},
axisLabel
:
{
show
:
true
,
color
:
'white'
}
}],
yAxis
:
[
{
{
type
:
'value'
,
type
:
'value'
,
name
:
'合格率'
,
name
:
'合格率'
,
...
@@ -2902,40 +3032,21 @@ function setRclHglEchart(chart, apidata1, apidata2) {
...
@@ -2902,40 +3032,21 @@ function setRclHglEchart(chart, apidata1, apidata2) {
color
:
'white'
,
color
:
'white'
,
formatter
:
'{value} %'
formatter
:
'{value} %'
}
}
}],
series
:
[{
name
:
'日产量'
,
type
:
'bar'
,
data
:
wglist
||
[
2.6
,
5.9
,
9.0
,
26.4
,
28.7
,
],
barWidth
:
30
,
itemStyle
:
{
normal
:
{
label
:
{
show
:
true
,
position
:
"top"
,
textStyle
:
{
color
:
"white"
,
}
}
}
}
},
},
{
],
series
:
[{
name
:
'合格率'
,
name
:
'合格率'
,
type
:
'line'
,
type
:
'line'
,
yAxisIndex
:
1
,
//
yAxisIndex: 1,
data
:
hgllist
||
[
20
,
30
,
90
,
30
,
29
],
data
:
hgllist
||
[
20
,
30
,
90
,
30
,
29
],
barWidth
:
30
,
itemStyle
:
{
itemStyle
:
{
normal
:
{
normal
:
{
label
:
{
label
:
{
show
:
true
,
show
:
true
,
position
:
"top"
,
position
:
"top"
,
textStyle
:
{
textStyle
:
{
color
:
"
orang
e"
,
color
:
"
whit
e"
,
}
}
}
}
...
@@ -2945,9 +3056,12 @@ function setRclHglEchart(chart, apidata1, apidata2) {
...
@@ -2945,9 +3056,12 @@ function setRclHglEchart(chart, apidata1, apidata2) {
}
}
]
]
};
};
console
.
log
(
ops
)
chart
.
setOption
(
ops
,
true
);
chart
.
setOption
(
ops
,
true
);
}
}
// function setPieYChart(chart) {
// function setPieYChart(chart) {
// var ops= {
// var ops= {
// tooltip: {
// tooltip: {
...
...
gavel/src/main/resources/templates/views/kmes/dashboard/first.html
View file @
18a34247
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
<div
class=
"header-img"
></div>
<div
class=
"header-img"
></div>
</div>
</div>
<div
class=
"header-right fl"
style=
"line-height: 1.05rem;text-align:center;"
>
<div
class=
"header-right fl"
style=
"line-height: 1.05rem;text-align:center;"
>
<span>
温度:22°C
</span>
<span>
湿度:
12
%rh
</span>
<span>
温度:22°C
</span>
<span>
湿度:
55
%rh
</span>
</div>
</div>
<div
class=
"header-bottom fl"
></div>
<div
class=
"header-bottom fl"
></div>
...
@@ -339,14 +339,18 @@
...
@@ -339,14 +339,18 @@
</div>
</div>
</div>
</div>
<div
class=
"right-cen border"
style=
"height: 3.175rem;margin-bottom: .2rem;"
>
<div
class=
"right-cen border"
style=
"height: 3.175rem;margin-bottom: .2rem;"
>
<div
class=
"title"
>
在制品状态
</div>
<div
class=
"title"
>
合格率
</div>
<div
class=
"right-cen-cent"
>
<div
class=
"right-cen-cent"
>
<div
id=
"chartzzp"
class=
"allnav"
></div>
<div
id=
"chartzzp"
class=
"allnav"
></div>
</div>
</div>
<!-- <div class="title">合格率</div>
<div class="chat" style="height: 3.1rem;">
<div id="chartRpcdcsj1" class="allnav"></div>
</div> -->
</div>
</div>
<div
class=
"right-bottom rightTop border"
style=
"height: 3.8rem;"
>
<div
class=
"right-bottom rightTop border"
style=
"height: 3.8rem;"
>
<div
class=
"title"
>
日产量
&
合格率
</div>
<div
class=
"title"
>
日产量
</div>
<div
class=
"chat"
style=
"height: 3.1rem;"
>
<div
class=
"chat"
style=
"height: 3.1rem;"
>
<div
id=
"chartRpcdcsj"
class=
"allnav"
></div>
<div
id=
"chartRpcdcsj"
class=
"allnav"
></div>
</div>
</div>
...
@@ -389,26 +393,29 @@
...
@@ -389,26 +393,29 @@
});
});
// var myChartSdcl = echarts.init(document.getElementById('chartSdcl'));
// var myChartSdcl = echarts.init(document.getElementById('chartSdcl'));
var
chartRpcdcsj
=
echarts
.
init
(
document
.
getElementById
(
"chartRpcdcsj"
),
null
,
{
renderer
:
'svg'
});
var
chartRpcdcsj
=
echarts
.
init
(
document
.
getElementById
(
"chartRpcdcsj"
),
null
,
{
renderer
:
'svg'
});
var
chartRpcdcsj1
=
echarts
.
init
(
document
.
getElementById
(
"chartzzp"
),
null
,
{
renderer
:
'svg'
});
var
chartHgl
=
echarts
.
init
(
document
.
getElementById
(
"chartHgl"
),
null
,
{
renderer
:
'svg'
});
var
chartHgl
=
echarts
.
init
(
document
.
getElementById
(
"chartHgl"
),
null
,
{
renderer
:
'svg'
});
// var chartRjh=echarts.init(document.getElementById("chartRjh"),null, {renderer: 'svg'});
// var chartRjh=echarts.init(document.getElementById("chartRjh"),null, {renderer: 'svg'});
var
chartYjh
=
echarts
.
init
(
document
.
getElementById
(
"chartYjh"
),
null
,
{
renderer
:
'svg'
});
var
chartYjh
=
echarts
.
init
(
document
.
getElementById
(
"chartYjh"
),
null
,
{
renderer
:
'svg'
});
var
chartJdshCirle
=
echarts
.
init
(
document
.
getElementById
(
"chartJdshCirle"
),
null
,
{
renderer
:
'svg'
});
var
chartJdshCirle
=
echarts
.
init
(
document
.
getElementById
(
"chartJdshCirle"
),
null
,
{
renderer
:
'svg'
});
var
chartTzzp
=
echarts
.
init
(
document
.
getElementById
(
"chartzzp"
),
null
,
{
renderer
:
'svg'
});
//
var chartTzzp=echarts.init(document.getElementById("chartzzp"),null, {renderer: 'svg'});
setproduceEchart
(
chartTzzp
)
/* 在制品状态 */
// setproduceEchart(chartTzzp)
// oaechart(myChartSdcl); /*oa*/
// oaechart(myChartSdcl); /*oa*/
setRclHglEchart
(
chartRpcdcsj
);
/*日排产达成数据*/
setRclHglEchart
(
chartRpcdcsj
);
/*日排产达成数据*/
setRclHglEchart1
(
chartRpcdcsj1
);
// setHglEchart(chartHgl);/*合格率*/
// setHglEchart(chartHgl);/*合格率*/
// setPieDailyChart(chartRjh,80);
// setPieDailyChart(chartRjh,80);
setPieDailyChart
(
chartYjh
,
80
);
setPieDailyChart
(
chartYjh
,
80
);
setproduceEchart
(
chartTzzp
)
//
setproduceEchart(chartTzzp)
$
(
'.myscroll'
).
myScroll
({
$
(
'.myscroll'
).
myScroll
({
speed
:
60
,
//数值越大,速度越慢
speed
:
60
,
//数值越大,速度越慢
rowHeight
:
46
//li的高度
rowHeight
:
46
//li的高度
});
});
function
echartzsy
(){
function
echartzsy
(){
chartTzzp
.
resize
()
//
chartTzzp.resize()
// myChartSdcl.resize()
// myChartSdcl.resize()
chartRpcdcsj
.
resize
()
chartRpcdcsj
.
resize
()
chartRpcdcsj1
.
resize
()
chartHgl
.
resize
()
chartHgl
.
resize
()
// chartRjh.resize()
// chartRjh.resize()
chartYjh
.
resize
()
chartYjh
.
resize
()
...
@@ -419,11 +426,9 @@
...
@@ -419,11 +426,9 @@
apiqueryZscl
()
apiqueryZscl
()
apiqueryOA
()
apiqueryOA
()
apigetscts
(
$
(
"#aqscts"
))
apigetscts
(
$
(
"#aqscts"
))
apiCurProZtsl
(
chartTzzp
)
//
apiCurProZtsl(chartTzzp)
apisetRpcHglEchart
(
chartRpcdcsj
,
'rcl'
)
apisetRpcHglEchart
(
chartRpcdcsj
,
'rcl'
)
// apisetTimeProductionEchart(myChartSdcl)
apisetRpcHglEchart1
(
chartRpcdcsj1
,
'rcl'
)
// apisetDailyDataEchart(chartRpcdcsj)
// apisetPieDailyChart(chartRjh)
apisetPieDailyCharty
(
chartYjh
)
apisetPieDailyCharty
(
chartYjh
)
apisetHglEchart
(
chartHgl
)
apisetHglEchart
(
chartHgl
)
apiqueryWo
()
apiqueryWo
()
...
...
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