Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
visualDataServer
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
standardized
visualDataServer
Commits
c53182c4
Commit
c53182c4
authored
Nov 11, 2021
by
lixinming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://123.207.147.179:8888/standardized/visualDataServer
parents
3a9c6255
d34fd983
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
excelEnter.ts
src/cal/excelEnter.ts
+20
-1
main.ts
src/main.ts
+4
-1
No files found.
src/cal/excelEnter.ts
View file @
c53182c4
...
@@ -108,11 +108,30 @@ export function planarArrBecomeStringListData(dataList, titleInY = false) {
...
@@ -108,11 +108,30 @@ export function planarArrBecomeStringListData(dataList, titleInY = false) {
* @param dataList 数据列表 格式 [[标题1, 标题2, 标题3],[a的value1, a的value2, a的value3],[b的value1, b的value2, b的value3]] or
* @param dataList 数据列表 格式 [[标题1, 标题2, 标题3],[a的value1, a的value2, a的value3],[b的value1, b的value2, b的value3]] or
* [[标题1, 标题2, 标题3, 标题4],[a的value1, a的value2, a的value3],[b的value1, b的value2, b的value3]]
* [[标题1, 标题2, 标题3, 标题4],[a的value1, a的value2, a的value3],[b的value1, b的value2, b的value3]]
* @param headerInx
* @param headerInx
* @returns
* @returns
返回 [{key:"a", values:[a的value1, a的value2, a的value3] }, {key:"b", values:[b的value1, b的value2, b的value3] }]
*/
*/
export
function
planarArrBecomeListData
(
dataList
,
headerInx
?)
{
export
function
planarArrBecomeListData
(
dataList
,
headerInx
?)
{
//todo
//todo
let
result
=
[];
let
dataTitle
=
dataList
[
0
];
for
(
let
i
=
1
;
i
<=
dataList
.
length
;
i
++
)
{
let
dataValue
=
{};
let
ValueData
=
[];
let
keyData
=
dataTitle
[
i
-
1
];
for
(
let
x
=
0
;
x
<
dataList
[
i
].
length
;
x
++
){
ValueData
.
push
(
dataList
[
i
][
x
]);
}
dataValue
=
{
key
:
keyData
,
values
:
ValueData
};
result
.
push
(
dataValue
);
}
return
result
;
//
}
}
...
...
src/main.ts
View file @
c53182c4
import
{
planarArrBecomeListData
}
from
"./cal/excelEnter"
;
import
{
getData
}
from
"./data/interface/getOnceInterfaceData"
;
import
{
getData
}
from
"./data/interface/getOnceInterfaceData"
;
import
{
getPort
}
from
"./serverConfig"
;
import
{
getPort
}
from
"./serverConfig"
;
...
@@ -8,7 +9,8 @@ async function lanuch() {
...
@@ -8,7 +9,8 @@ async function lanuch() {
}
}
function
test
()
{
function
test
()
{
getData
()
let
dataList
=
[[
'a'
,
'b'
],[
'a的value1'
,
'a的value2'
,
'a的value3'
],[
'b的value1'
,
'b的value2'
,
'b的value3'
]];
planarArrBecomeListData
(
dataList
);
}
}
lanuch
();
lanuch
();
\ 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