Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bigScreen
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
mr-glass
bigScreen
Commits
028c7772
Commit
028c7772
authored
Aug 15, 2024
by
guoxuejian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
故障数量统计
parent
1c34c412
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
8 deletions
+89
-8
index.html
+89
-8
No files found.
index.html
View file @
028c7772
...
@@ -686,10 +686,11 @@
...
@@ -686,10 +686,11 @@
// 获取当前月份天数
// 获取当前月份天数
var
days
=
getDays
()[
0
]
-
getDays
()[
1
];
var
days
=
getDays
()[
0
]
-
getDays
()[
1
];
console
.
log
(
days
);
console
.
log
(
days
);
let
daysList
=
[
'逆变器'
,
'箱变'
,
'汇流箱'
]
let
daysList
=
[
'逆变器'
,
'箱变'
,
'汇流箱'
]
let
showDataList
=
Array
(
days
).
fill
(
0
)
let
showDataList
=
Array
(
days
).
fill
(
0
)
let
emergencyOption
=
{
let
emergencyOption
=
{
color
:
'#0079fe'
,
color
:
'#0079fe'
,
tooltip
:
{
tooltip
:
{
...
@@ -776,7 +777,7 @@
...
@@ -776,7 +777,7 @@
},
},
zlevel
:
2
,
zlevel
:
2
,
barWidth
:
'10%'
,
barWidth
:
'10%'
,
data
:
[
8
,
15
,
1
0
]
data
:
[
0
,
0
,
0
]
},
},
{
{
name
:
'紧急'
,
name
:
'紧急'
,
...
@@ -798,7 +799,7 @@
...
@@ -798,7 +799,7 @@
},
},
zlevel
:
2
,
zlevel
:
2
,
barGap
:
'100%'
,
barGap
:
'100%'
,
data
:
[
8
,
17
,
26
]
data
:
[
0
,
0
,
0
]
},
},
{
{
name
:
'一般'
,
name
:
'一般'
,
...
@@ -820,7 +821,7 @@
...
@@ -820,7 +821,7 @@
},
},
zlevel
:
2
,
zlevel
:
2
,
barGap
:
'100%'
,
barGap
:
'100%'
,
data
:
[
8
,
17
,
26
]
data
:
[
0
,
0
,
0
]
}
}
]
]
...
@@ -1290,6 +1291,12 @@
...
@@ -1290,6 +1291,12 @@
repairFinish
:
0
,
repairFinish
:
0
,
}
}
const
emergencyOptionData
=
{
'危机'
:
[
0
,
0
,
0
],
'紧急'
:
[
0
,
0
,
0
],
'一般'
:
[
0
,
0
,
0
]
}
function
uploadCompleteStatus
()
{
function
uploadCompleteStatus
()
{
loadDataStatus
.
uploadCompleteStatus
=
true
loadDataStatus
.
uploadCompleteStatus
=
true
$
.
ajax
({
$
.
ajax
({
...
@@ -1593,6 +1600,78 @@
...
@@ -1593,6 +1600,78 @@
});
});
}
}
function
updateRepairOrderCountDataWithLevel
()
{
loadDataStatus
.
updateRepairOrderCountDataWithLevel
=
true
$
.
ajax
({
type
:
"GET"
,
url
:
"/api/blade-repairRecord/repairRecord/getOrderTypeCount"
,
success
:
function
(
result
)
{
// [
// {
// "deviceType": "1",
// "count": 9,
// "alarmLevel": 7
// },
// {
// "deviceType": "3",
// "count": 2,
// "alarmLevel": 7
// },
// {
// "deviceType": "1",
// "count": 1,
// "alarmLevel": 8
// },
// {
// "deviceType": "1",
// "count": 1,
// "alarmLevel": 9
// }
// ]
// deviceType: 1 逆变器 3 箱变 0 汇流箱
// alarmLevel: 7 一般 8 紧急 9 危机
for
(
let
key
in
emergencyOptionData
)
{
emergencyOptionData
[
key
]
=
[
0
,
0
,
0
]
}
for
(
let
i
=
0
;
i
<
result
.
data
.
length
;
i
++
)
{
let
item
=
result
.
data
[
i
]
let
deviceType
=
item
.
deviceType
let
alarmLevel
=
item
.
alarmLevel
let
count
=
item
.
count
let
deviceIdnexMap
=
{
"1"
:
0
,
// 逆变器
"3"
:
1
,
// 箱变
"0"
:
2
,
// 汇流箱
}
let
alarmLevelIndexMap
=
{
// 7: 2,// 一般
// 8: 1,// 紧急
// 9: 0,// 危机
7
:
"一般"
,
// 2
8
:
"紧急"
,
// 1
9
:
"危机"
,
// 0
}
emergencyOptionData
[
alarmLevelIndexMap
[
alarmLevel
]][
deviceIdnexMap
[
deviceType
]]
=
count
}
console
.
log
(
'updateRepairOrderData'
,
result
);
// 3 random numbers for test
// emergencyOption["series"][0]["data"] = [Math.floor(Math.random() * 10), Math.floor(Math.random() * 10), Math.floor(Math.random() * 10)]
// emergencyOption["series"][1]["data"] = [Math.floor(Math.random() * 10), Math.floor(Math.random() * 10), Math.floor(Math.random() * 10)]
// emergencyOption["series"][2]["data"] = [Math.floor(Math.random() * 10), Math.floor(Math.random() * 10), Math.floor(Math.random() * 10)]
emergencyOption
[
"series"
][
0
][
"data"
]
=
emergencyOptionData
[
"危机"
]
emergencyOption
[
"series"
][
1
][
"data"
]
=
emergencyOptionData
[
"紧急"
]
emergencyOption
[
"series"
][
2
][
"data"
]
=
emergencyOptionData
[
"一般"
]
emergencyChart
.
setOption
(
emergencyOption
);
},
// 失败或者超时的回调函数
error
:
function
(
xhr
,
status
,
error
)
{
loadDataStatus
.
updateRepairOrderCountDataWithLevel
=
false
}
});
}
function
updateRepairDayOrderData
()
{
function
updateRepairDayOrderData
()
{
loadDataStatus
.
updateRepairDayOrderData
=
true
loadDataStatus
.
updateRepairDayOrderData
=
true
$
.
ajax
({
$
.
ajax
({
...
@@ -1623,8 +1702,6 @@
...
@@ -1623,8 +1702,6 @@
});
});
}
}
function
updateRepairWeekOrderData
()
{
function
updateRepairWeekOrderData
()
{
loadDataStatus
.
updateRepairWeekOrderData
=
true
loadDataStatus
.
updateRepairWeekOrderData
=
true
$
.
ajax
({
$
.
ajax
({
...
@@ -1649,8 +1726,6 @@
...
@@ -1649,8 +1726,6 @@
});
});
}
}
// 更新全部工单完成率
// 更新全部工单完成率
// api/blade-deviceAccount/deviceAccount/list?current=1&size=10
// api/blade-deviceAccount/deviceAccount/list?current=1&size=10
function
updateAllOrdersFinishedRateData
()
{
function
updateAllOrdersFinishedRateData
()
{
...
@@ -1693,6 +1768,7 @@
...
@@ -1693,6 +1768,7 @@
uploadDeviceAccountData
:
false
,
uploadDeviceAccountData
:
false
,
updateInspectionMonthOrderData
:
false
,
updateInspectionMonthOrderData
:
false
,
updateRepairMonthOrderData
:
false
,
updateRepairMonthOrderData
:
false
,
updateRepairOrderCountDataWithLevel
:
false
,
updateInspectionDayOrderData
:
false
,
updateInspectionDayOrderData
:
false
,
updateRepairDayOrderData
:
false
,
updateRepairDayOrderData
:
false
,
updateInspectionWeekOrderData
:
false
,
updateInspectionWeekOrderData
:
false
,
...
@@ -1712,6 +1788,8 @@
...
@@ -1712,6 +1788,8 @@
updateRepairMonthOrderData
();
updateRepairMonthOrderData
();
updateRepairOrderCountDataWithLevel
();
updateInspectionDayOrderData
();
updateInspectionDayOrderData
();
updateRepairDayOrderData
();
updateRepairDayOrderData
();
...
@@ -1751,6 +1829,9 @@
...
@@ -1751,6 +1829,9 @@
if
(
!
loadDataStatus
.
updateRepairMonthOrderData
)
{
if
(
!
loadDataStatus
.
updateRepairMonthOrderData
)
{
updateRepairMonthOrderData
()
updateRepairMonthOrderData
()
}
}
if
(
!
loadDataStatus
.
updateRepairOrderCountDataWithLevel
)
{
updateRepairOrderCountDataWithLevel
()
}
// updateRepairMonthOrderData();
// updateRepairMonthOrderData();
if
(
!
loadDataStatus
.
updateInspectionDayOrderData
)
{
if
(
!
loadDataStatus
.
updateInspectionDayOrderData
)
{
updateInspectionDayOrderData
()
updateInspectionDayOrderData
()
...
...
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