Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
server
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
changsanjiao
server
Commits
49a9cc01
Commit
49a9cc01
authored
Aug 24, 2022
by
孙香冬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
261c4065
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
130 additions
and
25 deletions
+130
-25
zhdy_zdwrqy.ts
src/biz/csjInterface/zhdy_zdwrqy.ts
+16
-23
zdwrqysc.ts
src/data/interface/zdwrqysc.ts
+113
-1
main.ts
src/main.ts
+1
-1
No files found.
src/biz/csjInterface/zhdy_zdwrqy.ts
View file @
49a9cc01
...
@@ -7,28 +7,9 @@ export async function getData(req, res) {
...
@@ -7,28 +7,9 @@ export async function getData(req, res) {
let
ret
:
any
=
{};
let
ret
:
any
=
{};
let
interfaceData
=
await
getZdwrqysc
();
let
interfaceData
=
await
getZdwrqysc
();
//重点污染企业撒点数据
let
pollutingCompaniesScatter
=
[
let
污染企业数据
dataAndUnit
=
objKeyReplace
(
interfaceData
.
pollutingInfo
);
{
ret
[
"api1"
]
=
getKeyValue
(
"污染企业数据"
,
污染企业数据
dataAndUnit
.
dataMap
,
污染企业数据
dataAndUnit
.
unitMap
,
false
,
false
);
townName
:
"朱家角镇"
,
latitudeAndLogitude
:
[
{
latitude
:
31.156845
,
longitude
:
121.133586
,
elevation
:
1.49
},
{
latitude
:
31.150417
,
longitude
:
121.106133
,
elevation
:
0.79
}
],
details
:
"朱家角镇,重点污染企业1家,污染企业生产指数均值1.49,其中上海朱家角污水处理工程建设有限公司污染企业指数高达1.49"
}
]
let
污染企业数据
ataAndUnit
=
objKeyReplace
(
interfaceData
.
pollutingInfo
);
ret
[
"api1"
]
=
getKeyValue
(
"污染企业数据"
,
污染企业数据
ataAndUnit
.
dataMap
,
污染企业数据
ataAndUnit
.
unitMap
,
false
,
false
);
ret
[
"api3"
]
=
getMoreYChartData
(
"各污染类型企业生产指数对比"
,
interfaceData
.
pollutionTypeInfo
,
false
,
{
"污染企业数"
:
"户"
})
ret
[
"api3"
]
=
getMoreYChartData
(
"各污染类型企业生产指数对比"
,
interfaceData
.
pollutionTypeInfo
,
false
,
{
"污染企业数"
:
"户"
})
...
@@ -44,7 +25,19 @@ export async function getData(req, res) {
...
@@ -44,7 +25,19 @@ export async function getData(req, res) {
let
污染企业生产数据
DataAndUnit
=
objKeyReplace
(
interfaceData
.
productionInfo
);
let
污染企业生产数据
DataAndUnit
=
objKeyReplace
(
interfaceData
.
productionInfo
);
ret
[
"api7"
]
=
getKeyValue
(
"污染企业生产数据"
,
污染企业生产数据
DataAndUnit
.
dataMap
,
污染企业生产数据
DataAndUnit
.
unitMap
,
false
,
false
);
ret
[
"api7"
]
=
getKeyValue
(
"污染企业生产数据"
,
污染企业生产数据
DataAndUnit
.
dataMap
,
污染企业生产数据
DataAndUnit
.
unitMap
,
false
,
false
);
// let 重点污染企业撒点数据DataAndUnit = interfaceData.pollutingCompaniesScatter;
let
重点污染企业撒点数据
DataAndUnit
=
interfaceData
.
pollutingCompaniesScatter
;
let
pollutingCompaniesScatter
=
[];
重点污染企业撒点数据
DataAndUnit
.
forEach
(
item
=>
{
let
{
townName
,
latitudeAndLongitude
,
details
}
=
item
;
let
latitudeAndLongitudeList
=
[];
latitudeAndLongitude
.
forEach
(
info
=>
{
let
{
latitude
,
longitude
,
elevation
}
=
info
;
elevation
=
Math
.
ceil
(
elevation
*
100
)
/
100
;
latitudeAndLongitudeList
.
push
({
latitude
,
longitude
,
elevation
:
elevation
});
})
pollutingCompaniesScatter
.
push
({
townName
,
latitudeAndLongitude
:
latitudeAndLongitudeList
,
details
});
})
ret
[
"api8"
]
=
{
title
:
"重点污染企业撒点数据"
,
dataList
:
pollutingCompaniesScatter
};
ret
[
"api8"
]
=
{
title
:
"重点污染企业撒点数据"
,
dataList
:
pollutingCompaniesScatter
};
ret
[
"apiarea"
]
=
getKeyStringValue
(
"范围数据"
,
interfaceData
.
rangeInfo
);
ret
[
"apiarea"
]
=
getKeyStringValue
(
"范围数据"
,
interfaceData
.
rangeInfo
);
...
...
src/data/interface/zdwrqysc.ts
View file @
49a9cc01
This diff is collapsed.
Click to expand it.
src/main.ts
View file @
49a9cc01
...
@@ -5,7 +5,7 @@ import { getPort } from "./serverConfig";
...
@@ -5,7 +5,7 @@ import { getPort } from "./serverConfig";
async
function
lanuch
()
{
async
function
lanuch
()
{
await
initInterfaceData
();
//
await initInterfaceData();
httpServer
.
createServer
(
getPort
());
httpServer
.
createServer
(
getPort
());
console
.
log
(
'This indicates that the server is started successfully.'
);
console
.
log
(
'This indicates that the server is started successfully.'
);
}
}
...
...
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