Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
motorCity
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
node_server
motorCity
Commits
281f12a3
Commit
281f12a3
authored
Mar 24, 2023
by
孙香冬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
04ae7899
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
21 deletions
+16
-21
大事记节点.xlsx
res/大事记节点.xlsx
+0
-0
dsj.ts
src/biz/dsj.ts
+6
-3
data.ts
src/biz/jgfwnl/data.ts
+2
-1
csfxData.ts
src/data/dataCenterInterface/csfxData.ts
+8
-17
No files found.
res/大事记节点.xlsx
View file @
281f12a3
No preview for this file type
src/biz/dsj.ts
View file @
281f12a3
...
...
@@ -10,13 +10,14 @@ export async function getData(req, res) {
let
result
=
[];
let
titleConfig
=
{
"节点名称"
:
"nodeName"
,
"重要等级"
:
"weightedGrade"
,
"标题内容"
:
"title"
,
"图片名称"
:
"titleImgUrl"
,
"是否有弹框"
:
"havePop"
,
"弹框视频/图片内容"
:
"popInfo"
,
"弹框内容"
:
"popDes"
,
};
let
index
=
1
;
list
.
valueList
.
forEach
(
info
=>
{
let
onceNode
=
{};
info
.
forEach
((
item
,
index
)
=>
{
...
...
@@ -30,6 +31,7 @@ export async function getData(req, res) {
}
onceNode
[
title
]
=
item
;
});
onceNode
[
"id"
]
=
index
;
onceNode
[
"title"
]
=
splitStr
(
onceNode
[
"title"
]);
onceNode
[
"titleImgUrl"
]
=
splitStr
(
onceNode
[
"titleImgUrl"
]);
for
(
let
i
=
0
;
i
<
onceNode
[
"titleImgUrl"
].
length
;
i
++
)
{
...
...
@@ -37,6 +39,7 @@ export async function getData(req, res) {
}
onceNode
[
"popDes"
]
=
splitDesStr
(
onceNode
[
"popDes"
]);
result
.
push
(
onceNode
);
index
++
;
});
res
.
send
({
"dsjList"
:
result
});
}
...
...
@@ -48,13 +51,13 @@ export function dsjNodeList(req, res) {
let
data
=
[];
tableData
.
valueList
.
forEach
(
info
=>
{
let
txt
=
info
[
0
];
if
(
info
[
3
]
!=
"是"
)
return
if
(
info
[
4
]
!=
"是"
)
return
``
if
(
!
ditinctMap
[
txt
])
ditinctMap
[
txt
]
=
1
;
else
ditinctMap
[
txt
]
+=
1
;
});
tableData
.
valueList
.
forEach
(
info
=>
{
let
txt
=
info
[
0
];
if
(
info
[
3
]
!=
"是"
)
return
if
(
info
[
4
]
!=
"是"
)
return
if
(
ditinctMap
[
txt
]
>
1
)
{
if
(
!
indexMap
[
txt
])
indexMap
[
txt
]
=
0
;
let
str
=
`
${
txt
}
_
${
indexMap
[
txt
]
+
1
}
`
...
...
src/biz/jgfwnl/data.ts
View file @
281f12a3
...
...
@@ -61,7 +61,8 @@ export async function getCSFX(req, res) {
let
ret
:
any
=
{};
let
企业测试自动驾驶比率
Info
=
await
getQytlzdjs
();
ret
[
"api5"
]
=
getListOutData
(
"企业脱离自动驾驶比率"
,
企业测试自动驾驶比率
Info
);
// ret["api5"] = getListOutData("企业脱离自动驾驶比率", 企业测试自动驾驶比率Info);
ret
[
"api5"
]
=
{
title
:
"企业脱离自动驾驶比率"
,
dataList
:
企业测试自动驾驶比率
Info
}
let
{
月度测试时长数据
,
月度测试时长功能数据
,
月度测试里程数据
,
月度测试里程功能数据
}
=
await
getYdcs
();
...
...
src/data/dataCenterInterface/csfxData.ts
View file @
281f12a3
...
...
@@ -76,40 +76,32 @@ export async function getQytlzdjs() {
enterpriseExitList
.
sort
(
(
a
,
b
)
=>
{
if
(
!
a
.
ratio
)
{
a
.
ratio
=
Math
.
ceil
((
a
.
exitCount
/
a
.
autoMileage
)
*
100
/
100
);
a
.
ratio
=
Math
.
floor
((
a
.
exitCount
/
a
.
autoMileage
)
*
100
);
if
(
a
.
exitCount
==
0
||
a
.
autoMileage
==
0
)
{
a
.
ratio
=
0
;
}
}
if
(
!
b
.
ratio
)
{
b
.
ratio
=
Math
.
ceil
((
b
.
exitCount
/
b
.
autoMileage
)
*
100
/
100
);
b
.
ratio
=
Math
.
floor
((
b
.
exitCount
/
b
.
autoMileage
)
*
100
);
if
(
b
.
exitCount
==
0
||
b
.
autoMileage
==
0
)
{
b
.
ratio
=
0
;
}
}
let
aRatio
=
a
.
ratio
;
let
bRatio
=
b
.
ratio
;
return
bRatio
-
a
Ratio
;
return
aRatio
-
b
Ratio
;
});
let
企业名称
data
=
[];
let
次数
data
=
[];
let
比率
data
=
[];
let
企业测试自动驾驶比率
=
[];
let
enterpriseExitListTop10
=
enterpriseExitList
.
slice
(
0
,
10
);
let
enterpriseExitListTop10
=
enterpriseExitList
.
slice
(
0
,
10
);
let
index
=
1
;
enterpriseExitListTop10
.
forEach
(
info
=>
{
let
{
autoMileage
,
enterpriseName
,
exitCount
,
ratio
}
=
info
;
企业名称
data
.
push
(
enterpriseName
);
次数
data
.
push
(
ratio
+
"次/公里"
);
比率
data
.
push
(
ratio
+
"%"
)
企业测试自动驾驶比率
.
push
({
key
:
"企业"
+
index
,
value
:
ratio
,
unit
:
"次/百公里"
});
index
++
;
});
let
企业测试自动驾驶比率
=
[
{
key
:
"企业名称"
,
values
:
企业名称
data
},
{
key
:
"次/公里"
,
values
:
次数
data
},
{
key
:
"比率"
,
values
:
比率
data
},
];
return
企业测试自动驾驶比率
;
}
\ No newline at end of file
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