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
d34fd983
Commit
d34fd983
authored
Nov 11, 2021
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
c4922630
Hide 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 @
d34fd983
...
...
@@ -107,11 +107,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
* [[标题1, 标题2, 标题3, 标题4],[a的value1, a的value2, a的value3],[b的value1, b的value2, b的value3]]
* @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
?)
{
//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
;
//
}
//todo ====
...
...
src/main.ts
View file @
d34fd983
import
{
planarArrBecomeListData
}
from
"./cal/excelEnter"
;
import
{
getData
}
from
"./data/interface/getOnceInterfaceData"
;
import
{
getPort
}
from
"./serverConfig"
;
...
...
@@ -8,7 +9,8 @@ async function lanuch() {
}
function
test
()
{
getData
()
let
dataList
=
[[
'a'
,
'b'
],[
'a的value1'
,
'a的value2'
,
'a的value3'
],[
'b的value1'
,
'b的value2'
,
'b的value3'
]];
planarArrBecomeListData
(
dataList
);
}
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