Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
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
胡宝山
template_vue
Commits
4319c15f
Commit
4319c15f
authored
Dec 01, 2023
by
W_Y
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图
parent
98e7c597
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
178 additions
and
35 deletions
+178
-35
index.js
src/api/controlPlatform/index.js
+18
-0
controlDown.png
src/assets/image/controlDown.png
+0
-0
control.vue
src/views/controlPlatform/control.vue
+160
-35
No files found.
src/api/controlPlatform/index.js
View file @
4319c15f
...
...
@@ -35,3 +35,21 @@ export function findCountIdByPtype1CreateDate(query) {
params
:
query
})
}
// 比例
export
function
findMoM
(
query
)
{
return
request
({
url
:
'/WeHomePage/findMoM'
,
method
:
'get'
,
params
:
query
})
}
// 总接口
export
function
findControl
(
query
)
{
return
request
({
url
:
'/WeHomePage/findControl'
,
method
:
'get'
,
params
:
query
})
}
src/assets/image/controlDown.png
View replaced file @
98e7c597
View file @
4319c15f
265 Bytes
|
W:
|
H:
3.11 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/views/controlPlatform/control.vue
View file @
4319c15f
...
...
@@ -5,74 +5,92 @@
<el-row>
<el-col
:span=
"6"
>
<div>
<div
class=
"topTitle"
>
本月
注册用户
量
</div>
<div
class=
"topTitle"
>
本月
化学品入库记录数
量
</div>
<div
class=
"TopBody"
>
<div>
<img
class=
"span_image"
src=
"@/assets/image/controlIcon.png"
>
</div>
<div>
20
</div>
<div>
{{
this
.
hxNum
}}
</div>
</div>
<div
class=
"TopFooter"
>
<div
style=
"display: inline-block"
>
月
</div>
<div
style=
"display: inline-block"
>
<img
style=
"color: red"
class=
"arrows"
src=
"@/assets/image/controlUp.png"
>
<img
style=
"color: red"
class=
"arrows"
src=
"@/assets/image/controlUp.png"
v-if=
"num1 >= 0"
>
<img
style=
"color: red"
class=
"arrows"
src=
"@/assets/image/controlDown.png"
v-else
>
</div>
<div
v-if=
"num1 >= 0"
style=
"color: #DC1919; display: inline-block"
>
{{
num1
}}
%
</div>
<div
v-else
style=
"color: #27dc19; display: inline-block"
>
{{
-
num1
}}
%
</div>
<div
style=
"color: #DC1919; display: inline-block"
>
20%
</div>
</div>
</div>
</el-col>
<el-col
:span=
"6"
>
<div>
<div
class=
"topTitle"
>
本月
实名用户量(新增)
</div>
<div
class=
"topTitle"
>
本月
化学品错误记录数量
</div>
<div
class=
"TopBody"
>
<div>
<img
class=
"span_image"
src=
"@/assets/image/controlIcon2.png"
>
</div>
<div>
10
</div>
<div>
{{
this
.
hxErrorNum
}}
</div>
</div>
<div
class=
"TopFooter"
>
<div
style=
"display: inline-block"
>
月
</div>
<div
style=
"display: inline-block"
>
<img
style=
"color: red"
class=
"arrows"
src=
"@/assets/image/controlUp.png"
>
<img
style=
"color: red"
class=
"arrows"
src=
"@/assets/image/controlUp.png"
v-if=
"num2 >= 0"
>
<img
style=
"color: red"
class=
"arrows"
src=
"@/assets/image/controlDown.png"
v-else
>
</div>
<div
v-if=
"num2 >= 0"
style=
"color: #DC1919; display: inline-block"
>
{{
num2
}}
%
</div>
<div
v-else
style=
"color: #27dc19; display: inline-block"
>
{{
-
num2
}}
%
</div>
<div
style=
"color: #DC1919; display: inline-block"
>
3%
</div>
</div>
</div>
</el-col>
<el-col
:span=
"6"
>
<div>
<div
class=
"topTitle"
>
本月
用户量(新增)
</div>
<div
class=
"topTitle"
>
本月
网板入库记录数量
</div>
<div
class=
"TopBody"
>
<div>
<img
class=
"span_image"
src=
"@/assets/image/controlIcon3.png"
>
</div>
<div>
10
</div>
<div>
{{
this
.
wbNum
}}
</div>
</div>
<div
class=
"TopFooter"
>
<div
style=
"display: inline-block"
>
月
</div>
<div
style=
"display: inline-block"
>
<img
style=
"color: red"
class=
"arrows"
src=
"@/assets/image/controlUp.png"
>
<img
style=
"color: red"
class=
"arrows"
src=
"@/assets/image/controlUp.png"
v-if=
"num3 >= 0"
>
<img
style=
"color: red"
class=
"arrows"
src=
"@/assets/image/controlDown.png"
v-else
>
</div>
<div
v-if=
"num3 >= 0"
style=
"color: #DC1919; display: inline-block"
>
{{
num3
}}
%
</div>
<div
v-else
style=
"color: #27dc19; display: inline-block"
>
{{
-
num3
}}
%
</div>
<div
style=
"color: #DC1919;display: inline-block"
>
3%
</div>
</div>
</div>
</el-col>
<el-col
:span=
"6"
>
<div>
<div
class=
"topTitle"
>
本月申请量(新增)
</div>
<div
class=
"topTitle"
>
网板实时在库数量
</div>
<div
class=
"TopBody"
>
<div>
<img
class=
"span_image"
src=
"@/assets/image/controlIcon4.png"
>
</div>
<div>
2
</div>
</div>
<div
class=
"TopFooter"
>
<div
style=
"display: inline-block"
>
月
</div>
<div
style=
"display: inline-block"
>
<img
style=
"color: red"
class=
"arrows"
src=
"@/assets/image/controlUp.png"
>
</div>
<div
style=
"color: #DC1919;display: inline-block"
>
1%
</div>
<div>
{{
this
.
realTime
}}
</div>
</div>
<!--
<div
class=
"TopFooter"
>
-->
<!--
<div
style=
"display: inline-block"
>
月
</div>
-->
<!--
<div
style=
"display: inline-block"
>
-->
<!--
<img
style=
"color: red"
class=
"arrows"
src=
"@/assets/image/controlUp.png"
>
-->
<!--
</div>
-->
<!--
<div
style=
"color: #DC1919;display: inline-block"
>
1%
</div>
-->
<!--
</div>
-->
</div>
</el-col>
</el-row>
...
...
@@ -156,9 +174,7 @@
<
script
>
import
*
as
echarts
from
'echarts'
import
judgeLeaveMessage
from
'svg-sprite-loader/examples/custom-runtime-generator/build/main'
// import { controlData } from './apis'
// import { judgeLeaveMessage } from '@/views/judgeMessageManage/apis'
import
{
findCountIdByUpdateDate
,
findCountIdByFqYy
,
findCountIdByPtype
,
findCountIdByPtype1CreateDate
}
from
'@/api/controlPlatform'
import
{
findCountIdByUpdateDate
,
findCountIdByFqYy
,
findCountIdByPtype
,
findCountIdByPtype1CreateDate
,
findMoM
,
findControl
}
from
'@/api/controlPlatform'
export
default
{
name
:
'Control'
,
...
...
@@ -194,6 +210,20 @@ export default {
value
:
''
,
name
:
''
}],
// 化学本月入库数量
hxNum
:
0
,
// 化学上月入库数量
lastHxNum
:
0
,
// 化学本月错误数量
hxErrorNum
:
0
,
// 化学上月错误数量
lastHxErrorNum
:
0
,
// 网版板月入库数量
wbNum
:
0
,
// 网板上月入库数量
lastWbNum
:
0
,
// 实时数量
realTime
:
0
,
isShow
:
true
,
isShow2
:
false
,
judgeMessageData
:
0
,
...
...
@@ -262,6 +292,20 @@ export default {
]
}
},
computed
:
{
num1
()
{
if
(
this
.
lastHxNum
===
0
)
return
0
return
Math
.
ceil
((
this
.
hxNum
-
this
.
lastHxNum
)
/
this
.
lastHxNum
*
100
)
/
100
},
num2
()
{
if
(
this
.
lastHxErrorNum
===
0
)
return
0
return
Math
.
ceil
((
this
.
hxErrorNum
-
this
.
lastHxErrorNum
)
/
this
.
lastHxErrorNum
*
100
)
/
100
},
num3
()
{
if
(
this
.
lastWbNum
===
0
)
return
0
return
Math
.
ceil
((
this
.
wbNum
-
this
.
lastWbNum
)
/
this
.
lastWbNum
*
100
)
/
100
}
},
mounted
()
{
this
.
handleGetCauseNum
()
this
.
handleGetJudgeMessage
()
...
...
@@ -272,7 +316,9 @@ export default {
this
.
handleGetJudgeMessageData
()
this
.
handleGetStatisticsData
()
this
.
startInterval
()
this
.
getUpdateList
()
// this.getUpdateList()
// this.getMom()
// this.getAll()
// 通过监听内容部分的宽度让图表resize
var
elementResizeDetectorMaker
=
require
(
'element-resize-detector'
)
var
erd
=
elementResizeDetectorMaker
()
...
...
@@ -327,18 +373,20 @@ export default {
methods
:
{
// 开始循环调用
startInterval
()
{
this
.
getSumUpdateList
()
// 先立刻执行一次
this
.
getSumList
()
this
.
getPtypeList
()
this
.
getUpdateList
()
// this.getSumUpdateList() // 先立刻执行一次
// this.getSumList()
// this.getPtypeList()
// this.getUpdateList()
this
.
getAll
()
this
.
intervalId
=
setInterval
(()
=>
{
if
(
this
.
stopTimer
===
true
)
{
clearInterval
(
this
.
intervalId
)
}
else
{
this
.
getSumUpdateList
()
this
.
getSumList
()
this
.
getPtypeList
()
this
.
getUpdateList
()
// this.getSumUpdateList()
// this.getSumList()
// this.getPtypeList()
// this.getUpdateList()
this
.
getAll
()
}
},
3000
)
// 间隔 2 秒调用一次,根据实际需求调整间隔时间
},
...
...
@@ -388,7 +436,6 @@ export default {
// 饼图2
getUpdateList
()
{
findCountIdByPtype1CreateDate
().
then
(
res
=>
{
console
.
log
(
'---res---'
,
res
)
this
.
PtypeList1
=
[]
const
renamedData1
=
res
.
data
.
map
(
item
=>
({
...
item
,
...
...
@@ -396,10 +443,88 @@ export default {
value
:
item
.
sum
}))
this
.
PtypeList1
=
renamedData1
console
.
log
(
'this.PtypeList1'
,
this
.
PtypeList1
)
this
.
updateVisitorData1
()
})
},
getMom
()
{
findMoM
().
then
(
res
=>
{
// 本月化学数量
this
.
hxNum
=
res
.
data
.
num1ThisMonth
// 化学上月入库数量
this
.
lastHxNum
=
res
.
data
.
num1LastMonth
// 化学本月错误数量
this
.
hxErrorNum
=
res
.
data
.
num2ThisMonth
// 化学上月错误数量
this
.
lastHxErrorNum
=
res
.
data
.
num2LastMonth
// 网版板月入库数量
this
.
wbNum
=
res
.
data
.
num3ThisMonth
// 网板上月入库数量
this
.
lastWbNum
=
res
.
data
.
num3LastMonth
// 实时数量
this
.
realTime
=
res
.
data
.
num3All
})
},
// 总图
getAll
()
{
findControl
().
then
(
res
=>
{
console
.
log
(
'----全部数据----'
,
res
)
// 折线图
this
.
sumUpdateList
=
res
.
data
.
findCountIdByUpdateDate
this
.
numList
=
[]
this
.
dataList
=
[]
this
.
sumUpdateList
.
forEach
(
item
=>
{
this
.
numList
.
push
(
item
.
sum
)
this
.
dataList
.
push
(
item
.
time
)
})
this
.
updateRegistrationTime
()
// 柱状图
this
.
sumFqYyList
=
res
.
data
.
findCountIdByFqYy
this
.
YyList
=
[]
this
.
FqNumList
=
[]
this
.
sumFqYyList
.
forEach
(
item
=>
{
this
.
YyList
.
push
(
item
.
fq_yy
)
this
.
FqNumList
.
push
(
item
.
sum
)
})
this
.
updateChartsLeaveMessage
()
// 饼图1
this
.
PtypeList
=
[]
const
renamedData
=
res
.
data
.
findCountIdByPtype
.
map
(
item
=>
({
...
item
,
name
:
item
.
ptype
===
'1'
?
'设备库'
:
(
item
.
ptype
===
'2'
?
'工序库'
:
item
.
ptype
),
value
:
item
.
sum
}))
this
.
PtypeList
=
renamedData
this
.
updateVisitorData
()
})
// 饼图2
this
.
PtypeList1
=
[]
const
renamedData1
=
res
.
data
.
findCountIdByPtype1CreateDate
.
map
(
item
=>
({
...
item
,
name
:
item
.
time
,
value
:
item
.
sum
}))
this
.
PtypeList1
=
renamedData1
this
.
updateVisitorData1
()
// 月同比
// 本月化学数量
this
.
hxNum
=
res
.
data
.
findMoM
.
num1ThisMonth
// 化学上月入库数量
this
.
lastHxNum
=
res
.
data
.
findMoM
.
num1LastMonth
// 化学本月错误数量
this
.
hxErrorNum
=
res
.
data
.
findMoM
.
num2ThisMonth
// 化学上月错误数量
this
.
lastHxErrorNum
=
res
.
data
.
findMoM
.
num2LastMonth
// 网版板月入库数量
this
.
wbNum
=
res
.
data
.
findMoM
.
num3ThisMonth
// 网板上月入库数量
this
.
lastWbNum
=
res
.
data
.
findMoM
.
num3LastMonth
// 实时数量
this
.
realTime
=
res
.
data
.
findMoM
.
num3All
},
handleClick
(
row
)
{
this
.
$router
.
push
({
path
:
'/sf/message/messageBack'
,
...
...
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