Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wms
Project
Project
Details
Activity
Releases
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
wuhao
wms
Commits
e3673625
Commit
e3673625
authored
Aug 31, 2023
by
krysent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
看板样式优化
parent
e59ed0ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
35 deletions
+47
-35
Charts.jsx
src/pages/Storeboard/Charts.jsx
+3
-0
DataTable.jsx
src/pages/Storeboard/DataTable.jsx
+44
-35
No files found.
src/pages/Storeboard/Charts.jsx
View file @
e3673625
...
...
@@ -109,6 +109,9 @@ export default (props) => {
},
},
],
tooltip
:
{
show
:
true
,
}
};
},
[
data
]);
...
...
src/pages/Storeboard/DataTable.jsx
View file @
e3673625
...
...
@@ -15,6 +15,11 @@ const statusBgc = function (state) {
}
};
const
styleObj
=
{
width
:
"100%"
,
height
:
"100%"
,
};
export
default
(
props
)
=>
{
const
{
title
,
headTitle
,
data
}
=
props
;
...
...
@@ -30,15 +35,15 @@ export default (props) => {
];
configArr
.
push
(
arr
);
});
if
(
configArr
.
length
<
6
)
{
let
l
=
6
-
configArr
.
length
;
const
newArr
=
Array
.
from
({
length
:
l
},
()
=>
new
Array
(
4
).
fill
(
" "
));
console
.
log
(
newArr
);
newArr
.
forEach
((
it
)
=>
{
configArr
.
push
(
it
);
});
console
.
log
(
configArr
);
}
// if (configArr.length < 5
) {
// let l = 5
- configArr.length;
//
const newArr = Array.from({ length: l }, () => new Array(4).fill(" "));
//
console.log(newArr);
//
newArr.forEach((it) => {
//
configArr.push(it);
//
});
//
console.log(configArr);
//
}
}
else
if
(
title
===
"待出库任务"
)
{
data
?.
forEach
((
it
)
=>
{
let
arr
=
[
...
...
@@ -50,15 +55,15 @@ export default (props) => {
];
configArr
.
push
(
arr
);
});
if
(
configArr
.
length
<
6
)
{
let
l
=
6
-
configArr
.
length
;
const
newArr
=
Array
.
from
({
length
:
l
},
()
=>
new
Array
(
5
).
fill
(
" "
));
console
.
log
(
newArr
);
newArr
.
forEach
((
it
)
=>
{
configArr
.
push
(
it
);
});
console
.
log
(
configArr
);
}
// if (configArr.length < 5
) {
// let l = 5
- configArr.length;
//
const newArr = Array.from({ length: l }, () => new Array(5).fill(" "));
//
console.log(newArr);
//
newArr.forEach((it) => {
//
configArr.push(it);
//
});
//
console.log(configArr);
//
}
}
else
if
(
title
===
"库存统计"
)
{
data
?.
forEach
((
it
)
=>
{
let
arr
=
[
...
...
@@ -70,19 +75,22 @@ export default (props) => {
];
configArr
.
push
(
arr
);
});
if
(
configArr
.
length
<
6
)
{
let
l
=
6
-
configArr
.
length
;
const
newArr
=
Array
.
from
({
length
:
l
},
()
=>
new
Array
(
5
).
fill
(
" "
));
console
.
log
(
newArr
);
newArr
.
forEach
((
it
)
=>
{
configArr
.
push
(
it
);
});
console
.
log
(
configArr
);
}
// if (configArr.length < 5
) {
// let l = 5
- configArr.length;
//
const newArr = Array.from({ length: l }, () => new Array(5).fill(" "));
//
console.log(newArr);
//
newArr.forEach((it) => {
//
configArr.push(it);
//
});
//
console.log(configArr);
//
}
}
return
{
data
:
configArr
,
rowNum
:
5
,
hoverPause
:
configArr
?.
length
>
5
?
true
:
false
,
align
:
[
"center"
],
};
},
[
data
,
title
]);
...
...
@@ -96,14 +104,15 @@ export default (props) => {
return
<
span
key=
{
i
}
>
{
it
}
</
span
>;
})
}
</
div
>
<
ScrollBoard
align=
{
[
"center"
]
}
config=
{
config
}
style=
{
statusBgc
(
title
)
}
// rowNum={config?.data?.length >= 5 ? 5 : config?.data?.length}
rowNum=
{
5
}
// hoverPause={false}
/>
{
data
.
length
===
0
?
(
<
div
style=
{
{
width
:
"100%"
,
height
:
"auto"
,
color
:
'#ffffff80'
,
textAlign
:
'center'
,
marginTop
:
'20%'
}
}
>
暂无数据
</
div
>
)
:
(
<
ScrollBoard
config=
{
config
}
style=
{
statusBgc
(
title
)
}
// rowNum=
{
config
?
.
data
?
.
length
>
= 5 ? 5 : config?.data?.length}
/
>
)
}
</
div
>
</>
);
...
...
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