Commit 683fdb8d authored by krysent's avatar krysent

看板

parent 2a7dfd38
...@@ -12,8 +12,8 @@ export default { ...@@ -12,8 +12,8 @@ export default {
"/srwms/": { "/srwms/": {
// 要代理的地址 // 要代理的地址
// target: "http://192.168.40.18/wms/", //39:28040 18/wms/ // target: "http://192.168.40.18/wms/", //39:28040 18/wms/
target: "http://192.168.40.203:28040", //39:28040 18/wms/ dj // target: "http://192.168.40.203:28040", //39:28040 18/wms/ dj
// target: "http://192.168.40.117:28040", //39:28040 18/wms/ jf target: "http://192.168.40.117:28040", //39:28040 18/wms/ jf
// target: "http://192.168.40.108:28040", //39:28040 18/wms/ jf // target: "http://192.168.40.108:28040", //39:28040 18/wms/ jf
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
......
public/img/table4.png

17.1 KB | W: | H:

public/img/table4.png

2.37 KB | W: | H:

public/img/table4.png
public/img/table4.png
public/img/table4.png
public/img/table4.png
  • 2-up
  • Swipe
  • Onion skin
public/img/table5.png

14.2 KB | W: | H:

public/img/table5.png

2.75 KB | W: | H:

public/img/table5.png
public/img/table5.png
public/img/table5.png
public/img/table5.png
  • 2-up
  • Swipe
  • Onion skin
.tag_view .tags_container {
position: absolute;
top: 0px;
left: 0px;
z-index: 20;
width: 100%;
height: 36px;
}
.child {
position: relative;
height: calc(100vh - 98px);
overflow: hidden;
}
.child .contianbox {
height: 100%;
overflow: auto;
overflow-x: hidden;
}
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
} }
html, html,
body, body,
#root { #root {
...@@ -19,6 +20,7 @@ body, ...@@ -19,6 +20,7 @@ body,
.colorWeak { .colorWeak {
filter: invert(80%); filter: invert(80%);
} }
.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed { .ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
left: unset; left: unset;
} }
...@@ -42,12 +44,15 @@ ol { ...@@ -42,12 +44,15 @@ ol {
.ant-table { .ant-table {
width: 100%; width: 100%;
overflow-x: auto; overflow-x: auto;
&-thead > tr,
&-tbody > tr { &-thead>tr,
> th, &-tbody>tr {
> td {
>th,
>td {
white-space: pre; white-space: pre;
> span {
>span {
display: block; display: block;
} }
} }
...@@ -56,8 +61,9 @@ ol { ...@@ -56,8 +61,9 @@ ol {
} }
// Compatible with IE11 // Compatible with IE11
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) { @media screen and(-ms-high-contrast: active),
body .ant-design-pro > .ant-layout { (-ms-high-contrast: none) {
body .ant-design-pro>.ant-layout {
min-height: 100vh; min-height: 100vh;
} }
} }
...@@ -83,10 +89,12 @@ ol { ...@@ -83,10 +89,12 @@ ol {
.ant-card-body { .ant-card-body {
padding: 12px !important; padding: 12px !important;
} }
.ant-card-head { .ant-card-head {
padding: 0 20px !important; padding: 0 20px !important;
} }
} }
.ant-drawer-content { .ant-drawer-content {
overflow-x: hidden !important; overflow-x: hidden !important;
} }
...@@ -96,6 +104,7 @@ ol { ...@@ -96,6 +104,7 @@ ol {
padding: 0 !important; padding: 0 !important;
} }
} }
.ant-pro-table-list-toolbar-container { .ant-pro-table-list-toolbar-container {
padding: 0px !important; padding: 0px !important;
padding-bottom: 8px !important; padding-bottom: 8px !important;
...@@ -108,12 +117,14 @@ ol { ...@@ -108,12 +117,14 @@ ol {
justify-content: space-between !important; justify-content: space-between !important;
padding: 10px 0 10px 0 !important; padding: 10px 0 10px 0 !important;
} }
.ant-pro-form-login-container { .ant-pro-form-login-container {
height: auto !important; height: auto !important;
margin-top: -10vh; margin-top: -10vh;
padding: 0 !important; padding: 0 !important;
background: transparent !important; background: transparent !important;
} }
.ant-pro-form-login-main { .ant-pro-form-login-main {
margin-top: 30px !important; margin-top: 30px !important;
} }
...@@ -125,42 +136,51 @@ pre { ...@@ -125,42 +136,51 @@ pre {
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important; "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
white-space: pre-wrap !important; white-space: pre-wrap !important;
} }
.gongyiStep { .gongyiStep {
height: 100%; height: 100%;
.ant-steps-item-title { .ant-steps-item-title {
width: 100% !important; width: 100% !important;
} }
} }
.center { .center {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.spread { .spread {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
} }
.columns { .columns {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.specialpropertiesCard { .specialpropertiesCard {
.ant-card-body { .ant-card-body {
padding: 5px !important; padding: 5px !important;
} }
} }
.oneText { .oneText {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.ant-picker-cell-inner { .ant-picker-cell-inner {
display: flex !important; display: flex !important;
justify-content: center; justify-content: center;
.ant-picker-calendar-date-content { .ant-picker-calendar-date-content {
flex: 1 !important; flex: 1 !important;
} }
...@@ -170,16 +190,17 @@ pre { ...@@ -170,16 +190,17 @@ pre {
.ant-tabs-nav { .ant-tabs-nav {
padding: 0 16px; padding: 0 16px;
} }
.ant-tabs-content-holder { .ant-tabs-content-holder {
max-height: 520px; max-height: 520px;
padding: 0 16px; padding: 0 16px;
overflow-y: auto; overflow-y: auto;
} }
} }
.ant-input[disabled], .ant-input[disabled],
.ant-picker-input > input[disabled], .ant-picker-input>input[disabled],
.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector,
.ant-select-selector,
.ant-select-disabled.ant-select-multiple .ant-select-selection-item { .ant-select-disabled.ant-select-multiple .ant-select-selection-item {
color: rgba(0, 0, 0, 0.85) !important; color: rgba(0, 0, 0, 0.85) !important;
} }
...@@ -191,6 +212,7 @@ pre { ...@@ -191,6 +212,7 @@ pre {
} }
} }
} }
.row-dragging { .row-dragging {
z-index: 999999999999; z-index: 999999999999;
background: #fafafa; background: #fafafa;
...@@ -204,6 +226,7 @@ pre { ...@@ -204,6 +226,7 @@ pre {
.row-dragging .drag-visible { .row-dragging .drag-visible {
visibility: visible; visibility: visible;
} }
//reset end //reset end
.img { .img {
...@@ -213,21 +236,26 @@ pre { ...@@ -213,21 +236,26 @@ pre {
background-position: center; background-position: center;
background-size: cover; background-size: cover;
} }
.cover { .cover {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: rgba(0, 0, 0, 0.8); background-color: rgba(0, 0, 0, 0.8);
img { img {
width: 30%; width: 30%;
margin: 30px 0 0 30px; margin: 30px 0 0 30px;
} }
} }
.ant-pro-form-login-desc { .ant-pro-form-login-desc {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
.ant-layout-footer { .ant-layout-footer {
background-color: transparent !important; background-color: transparent !important;
.ant-pro-global-footer { .ant-pro-global-footer {
margin: 0 !important; margin: 0 !important;
padding: 0 !important; padding: 0 !important;
...@@ -238,62 +266,79 @@ pre { ...@@ -238,62 +266,79 @@ pre {
.ant-tabs-nav-wrap { .ant-tabs-nav-wrap {
display: inline-block !important; display: inline-block !important;
} }
.ant-tabs-tab-active { .ant-tabs-tab-active {
font-size: 16px !important; font-size: 16px !important;
} }
.ant-layout-footer { .ant-layout-footer {
background-color: #23394a !important; background-color: #23394a !important;
.ant-pro-global-footer { .ant-pro-global-footer {
margin: 0 0 20px 0 !important; margin: 0 0 20px 0 !important;
padding: 0 !important; padding: 0 !important;
* { * {
color: rgba(255, 255, 255, 0.6) !important; color: rgba(255, 255, 255, 0.6) !important;
} }
.ant-pro-global-footer-copyright { .ant-pro-global-footer-copyright {
color: rgba(255, 255, 255, 0.3) !important; color: rgba(255, 255, 255, 0.3) !important;
} }
} }
} }
.ant-input-affix-wrapper { .ant-input-affix-wrapper {
background-color: rgba(255, 255, 255, 0.3) !important; background-color: rgba(255, 255, 255, 0.3) !important;
border: none !important; border: none !important;
input { input {
color: #fff !important; color: #fff !important;
background-color: rgba(255, 255, 255, 0) !important; background-color: rgba(255, 255, 255, 0) !important;
} }
} }
.ant-select-selector { .ant-select-selector {
background-color: rgba(255, 255, 255, 0.3) !important; background-color: rgba(255, 255, 255, 0.3) !important;
border: none !important; border: none !important;
input { input {
color: #fff !important; color: #fff !important;
background-color: rgba(255, 255, 255, 0) !important; background-color: rgba(255, 255, 255, 0) !important;
} }
} }
.ant-input { .ant-input {
color: #fff !important; color: #fff !important;
background-color: rgba(255, 255, 255, 0.3) !important; background-color: rgba(255, 255, 255, 0.3) !important;
border: none !important; border: none !important;
} }
.ant-select-selection-item { .ant-select-selection-item {
color: #fff !important; color: #fff !important;
} }
.anticon-close-circle { .anticon-close-circle {
color: #fff !important; color: #fff !important;
} }
.anticon { .anticon {
color: #fff !important; color: #fff !important;
} }
.ant-select-clear { .ant-select-clear {
background-color: transparent !important; background-color: transparent !important;
} }
.ant-select-selection-item-content, .ant-select-selection-item-content,
.ant-select-selection-item-remove { .ant-select-selection-item-remove {
color: #000 !important; color: #000 !important;
.anticon { .anticon {
color: #000 !important; color: #000 !important;
} }
} }
.ant-select-selection-overflow { .ant-select-selection-overflow {
display: flex !important; display: flex !important;
flex-wrap: nowrap !important; flex-wrap: nowrap !important;
...@@ -306,38 +351,48 @@ pre { ...@@ -306,38 +351,48 @@ pre {
font-weight: normal !important; font-weight: normal !important;
} }
} }
.ant-layout-header { .ant-layout-header {
transition: all 200ms !important; transition: all 200ms !important;
transition-timing-function: ease-out !important; transition-timing-function: ease-out !important;
} }
.ant-pro-global-header { .ant-pro-global-header {
padding-left: 6px !important; padding-left: 6px !important;
} }
table { table {
min-width: calc(100% - 6px) !important; min-width: calc(100% - 6px) !important;
} }
.ant-drawer-open { .ant-drawer-open {
transform: none !important; transform: none !important;
} }
.ant-pro-table-list-toolbar { .ant-pro-table-list-toolbar {
overflow: hidden !important; overflow: hidden !important;
} }
.ant-select-selector { .ant-select-selector {
overflow: hidden !important; overflow: hidden !important;
} }
.ant-breadcrumb { .ant-breadcrumb {
span { span {
> span { >span {
max-width: 600px !important; max-width: 600px !important;
} }
} }
} }
.ant-tree .ant-tree-treenode { .ant-tree .ant-tree-treenode {
width: 100%; width: 100%;
> span:last-child {
>span:last-child {
flex: 1; flex: 1;
} }
} }
.ant-input-number-affix-wrapper, .ant-input-number-affix-wrapper,
.ant-input-number { .ant-input-number {
width: 100% !important; width: 100% !important;
...@@ -350,6 +405,7 @@ table { ...@@ -350,6 +405,7 @@ table {
} }
@media print { @media print {
html, html,
body { body {
height: initial !important; height: initial !important;
...@@ -365,20 +421,25 @@ table { ...@@ -365,20 +421,25 @@ table {
page-break-after: always; page-break-after: always;
} }
} }
.ant-pro-card-body { .ant-pro-card-body {
padding: 12px !important; padding: 12px !important;
} }
.ant-pagination.ant-pagination-mini .ant-pagination-options-size-changer { .ant-pagination.ant-pagination-mini .ant-pagination-options-size-changer {
max-width: 100px !important; max-width: 100px !important;
} }
.ant-pagination-options { .ant-pagination-options {
display: flex !important; display: flex !important;
min-width: 210px !important; min-width: 210px !important;
} }
#large { #large {
.header { .header {
background-color: transparent !important; background-color: transparent !important;
} }
.header-item, .header-item,
.ceil { .ceil {
height: auto !important; height: auto !important;
...@@ -390,16 +451,20 @@ table { ...@@ -390,16 +451,20 @@ table {
word-break: break-all !important; word-break: break-all !important;
border: #000 1px solid !important; border: #000 1px solid !important;
} }
.header-item{
.header-item {
font-weight: bolder !important; font-weight: bolder !important;
} }
.header-item + .header-item {
.header-item+.header-item {
margin-left: -1px !important; margin-left: -1px !important;
} }
.ceil { .ceil {
margin-top: -1px; margin-top: -1px;
} }
.ceil + .ceil {
.ceil+.ceil {
margin-left: -1px !important; margin-left: -1px !important;
} }
...@@ -409,6 +474,7 @@ table { ...@@ -409,6 +474,7 @@ table {
line-height: 1 !important; line-height: 1 !important;
background-color: transparent !important; background-color: transparent !important;
} }
* { * {
overflow: visible !important; overflow: visible !important;
font-size: 20px !important; font-size: 20px !important;
...@@ -416,3 +482,26 @@ table { ...@@ -416,3 +482,26 @@ table {
word-break: break-all !important; word-break: break-all !important;
} }
} }
// .ant-pro-basicLayout {
// height: 100% !important;
// section {
// height: 100% !important;
// >div {
// height: 100% !important;
// main {
// height: 100% !important;
// >div:last-child {
// height: 800px!important;
// width: 100%;
// }
// }
// }
// }
// }
\ No newline at end of file
...@@ -20,17 +20,32 @@ export default (props) => { ...@@ -20,17 +20,32 @@ export default (props) => {
return { return {
grid: { grid: {
top: 25, top: 40,
left: 35, left: 38,
bottom: 28, bottom: 60,
right: 15, right: 14,
}, },
xAxis: { xAxis: {
type: "category", type: "category",
data: xData, data: xData,
splitLine: {
show: false,
},
axisLabel: {
interval: 0, //如果设置为 1,表示『隔一个标签显示一个标签』,如果值为 2,表示隔两个标签显示一个标签,以此类推。
rotate: "45", // 刻度标签旋转的角度,在类目轴的类目标签显示不下的时候可以通过旋转防止标签之间重叠。
},
}, },
yAxis: { yAxis: {
type: "value", type: "value",
splitLine: {
show: false,
},
name: title === "出入库单数量" ? "条" : "kg",
nameTextStyle: {
padding:[0,26,0,0]
}
}, },
series: [ series: [
{ {
...@@ -89,7 +104,7 @@ export default (props) => { ...@@ -89,7 +104,7 @@ export default (props) => {
return ( return (
<> <>
<div className="data-content"> <div className="data-content" style={{ position: "relative" }}>
<div className="content-header">{title}</div> <div className="content-header">{title}</div>
<div className="content-charts"> <div className="content-charts">
<ReactECharts <ReactECharts
...@@ -97,6 +112,30 @@ export default (props) => { ...@@ -97,6 +112,30 @@ export default (props) => {
style={{ height: "100%", width: "100%" }} style={{ height: "100%", width: "100%" }}
/> />
</div> </div>
<div
style={{
position: "absolute",
display: "flex",
top: 3,
right: 10,
}}
className="statuslogo"
>
<div>
<div
style={{ backgroundColor: "#F36B50" }}
className="statustitle"
></div>
入库
</div>
<div>
<div
style={{ backgroundColor: "#17D8DC" }}
className="statustitle"
></div>
出库
</div>
</div>
</div> </div>
</> </>
); );
......
...@@ -2,18 +2,22 @@ import { ScrollBoard } from "@jiaminghi/data-view-react"; ...@@ -2,18 +2,22 @@ import { ScrollBoard } from "@jiaminghi/data-view-react";
import React, { useState, useEffect } from "react"; import React, { useState, useEffect } from "react";
import line4_bg from "../../../public/img/table4.png"; import line4_bg from "../../../public/img/table4.png";
import line5_bg from "../../../public/img/table5.png"; import line5_bg from "../../../public/img/table5.png";
import line5long_bg from "../../../public/img/table5_long.png";
import { useMemo } from "react"; import { useMemo } from "react";
const statusBgc = function (state) { const statusBgc = function (state) {
if (state === 4) { if (state === "待入库任务") {
return { width: "100%", "--bgUrl--": `url(${line4_bg})` }; return { width: "100%", "--bgUrl--": `url(${line4_bg})` };
} else if (state === 5) { } else if (state === "待出库任务") {
return { width: "100%", "--bgUrl--": `url(${line5long_bg})` };
} else if (state === "库存统计") {
return { width: "100%", "--bgUrl--": `url(${line5_bg})` }; return { width: "100%", "--bgUrl--": `url(${line5_bg})` };
} }
}; };
export default (props) => { export default (props) => {
const { title, headTitle, data } = props; const { title, headTitle, data } = props;
const config = useMemo(() => { const config = useMemo(() => {
let configArr = []; let configArr = [];
if (title === "待入库任务") { if (title === "待入库任务") {
...@@ -26,6 +30,15 @@ export default (props) => { ...@@ -26,6 +30,15 @@ export default (props) => {
]; ];
configArr.push(arr); 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);
}
} else if (title === "待出库任务") { } else if (title === "待出库任务") {
data?.forEach((it) => { data?.forEach((it) => {
let arr = [ let arr = [
...@@ -37,6 +50,15 @@ export default (props) => { ...@@ -37,6 +50,15 @@ export default (props) => {
]; ];
configArr.push(arr); 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);
}
} else if (title === "库存统计") { } else if (title === "库存统计") {
data?.forEach((it) => { data?.forEach((it) => {
let arr = [ let arr = [
...@@ -48,12 +70,23 @@ export default (props) => { ...@@ -48,12 +70,23 @@ export default (props) => {
]; ];
configArr.push(arr); 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);
}
} }
return { return {
data: configArr, data: configArr,
}; };
}, [data, title]); }, [data, title]);
console.log(config?.data?.length);
return ( return (
<> <>
<div className="data-content"> <div className="data-content">
...@@ -66,8 +99,10 @@ export default (props) => { ...@@ -66,8 +99,10 @@ export default (props) => {
<ScrollBoard <ScrollBoard
align={["center"]} align={["center"]}
config={config} config={config}
style={statusBgc(headTitle?.length)} style={statusBgc(title)}
rowNum={"7"} // rowNum={config?.data?.length >= 5 ? 5 : config?.data?.length}
rowNum={5}
// hoverPause={false}
/> />
</div> </div>
</> </>
......
...@@ -43,11 +43,11 @@ export default ({ data }) => { ...@@ -43,11 +43,11 @@ export default ({ data }) => {
const rgbChange = function (status) { const rgbChange = function (status) {
if (status == "0") { if (status == "0") {
return "gray"; return "#9E9E9E";
} else if (status == "1") { } else if (status == "1") {
return "green"; return "#7FBB24";
} else if (status == "2") { } else if (status == "2") {
return "#00bbf2"; return "#489AFF";
} }
}; };
return ( return (
...@@ -191,14 +191,14 @@ export default ({ data }) => { ...@@ -191,14 +191,14 @@ export default ({ data }) => {
</div> </div>
<div> <div>
<div <div
style={{ backgroundColor: "#00bbf2" }} style={{ backgroundColor: "#489AFF" }}
className="statustitle" className="statustitle"
></div> ></div>
占用 占用
</div> </div>
<div> <div>
<div <div
style={{ backgroundColor: "gray" }} style={{ backgroundColor: "#9E9E9E" }}
className="statustitle" className="statustitle"
></div> ></div>
不可用 不可用
......
.kb-container { .kb-container {
width: 100%; width: 100%;
height: 100%; height: calc(100vh - 98px) !important;
background-color: rgba(26, 32, 44); background-color: rgba(26, 32, 44);
} }
.kb-container header { .kb-container header {
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
flex-direction: row; flex-direction: row;
} }
.kb-container .kb-content .Left { .kb-container .kb-content .Left {
flex: 1; width: 33.33%;
} }
.kb-container .kb-content .Left .unit { .kb-container .kb-content .Left .unit {
flex: 1; flex: 1;
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
.kb-container .kb-content .Right { .kb-container .kb-content .Right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%;
} }
.kb-container .kb-content .unit { .kb-container .kb-content .unit {
background-color: rgba(49, 60, 77, 0.8); background-color: rgba(49, 60, 77, 0.8);
...@@ -157,11 +158,15 @@ ...@@ -157,11 +158,15 @@
background-size: 100% 100%; background-size: 100% 100%;
height: calc(100% - 80px); height: calc(100% - 80px);
background-color: transparent; background-color: transparent;
border-radius: 15px; }
.kb-container .dv-scroll-board .row {
width: 100%;
height: 100%;
} }
.kb-container .dv-scroll-board .row-item { .kb-container .dv-scroll-board .row-item {
background-color: transparent !important; background-color: transparent !important;
text-align: center; text-align: center;
width: 100%;
} }
.kb-container .realTime { .kb-container .realTime {
background: linear-gradient(0deg, rgba(0, 0, 0, 0.51), rgba(0, 0, 0, 0.51)), linear-gradient(176deg, #77F7F7 -1054%, rgba(145, 143, 220, 0.94) 128%, #313C4D 1124%); background: linear-gradient(0deg, rgba(0, 0, 0, 0.51), rgba(0, 0, 0, 0.51)), linear-gradient(176deg, #77F7F7 -1054%, rgba(145, 143, 220, 0.94) 128%, #313C4D 1124%);
...@@ -185,7 +190,7 @@ ...@@ -185,7 +190,7 @@
margin-right: 10px; margin-right: 10px;
} }
.kb-container .realTime .realTime-content span { .kb-container .realTime .realTime-content span {
color: #00bbf2; color: #1FDBDB;
font-size: 25px; font-size: 25px;
font-weight: 600; font-weight: 600;
} }
...@@ -193,7 +198,7 @@ ...@@ -193,7 +198,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
height: calc(100% - 32px); height: calc(100% - 32px);
padding: 12px 0 24px 0; padding: 12px 12px 24px 12px;
} }
.kb-container .jk-content .jk-content-unit { .kb-container .jk-content .jk-content-unit {
flex: 1; flex: 1;
...@@ -217,6 +222,8 @@ ...@@ -217,6 +222,8 @@
flex: 1; flex: 1;
height: auto; height: auto;
align-self: center; align-self: center;
font-size: 16px;
padding-top: 6px;
} }
.kb-container .jk-content .jk-content-unit .jk-statusBottom { .kb-container .jk-content .jk-content-unit .jk-statusBottom {
width: 100%; width: 100%;
...@@ -283,8 +290,8 @@ ...@@ -283,8 +290,8 @@
align-items: center; align-items: center;
} }
.kb-container .statustitle { .kb-container .statustitle {
width: 18px; width: 16px;
height: 18px; height: 13px;
border-radius: 4px; border-radius: 2px;
margin-right: 3px; margin-right: 3px;
} }
...@@ -5,7 +5,7 @@ import io from "socket.io-client"; ...@@ -5,7 +5,7 @@ import io from "socket.io-client";
import Krjk from "./Krjk"; import Krjk from "./Krjk";
import Kwxx from "./Kwxx"; import Kwxx from "./Kwxx";
import { FullscreenOutlined, FullscreenExitOutlined } from "@ant-design/icons"; import { FullscreenOutlined, FullscreenExitOutlined } from "@ant-design/icons";
import { useFullscreen, useRequest } from "ahooks"; import { useFullscreen, useRequest, useAsyncEffect } from "ahooks";
import Charts from "./Charts"; import Charts from "./Charts";
import Clock from "./Clock"; import Clock from "./Clock";
import { import {
...@@ -42,7 +42,13 @@ export default (second) => { ...@@ -42,7 +42,13 @@ export default (second) => {
const [realNum, setnum] = useState(""); // const [realNum, setnum] = useState(""); //
const [monitor, setMonitor] = useState([]); // const [monitor, setMonitor] = useState([]); //
const [stautsnum, setstautsnum] = useState(); // const [stautsnum, setstautsnum] = useState(); //
const [divSize, setdivSize] = useState({
width: "100%",
height: "100%",
});
const [common, setcommon] = useState(new Date());
const [socketType, setsocketType] = useState("");
useEffect(() => { useEffect(() => {
socket = io(websocketUrl, { socket = io(websocketUrl, {
reconnectionDelay: 4000, reconnectionDelay: 4000,
...@@ -54,12 +60,18 @@ export default (second) => { ...@@ -54,12 +60,18 @@ export default (second) => {
// connect to socketIO server // connect to socketIO server
socket.connect(); socket.connect();
socket.on("message", (data) => { socket.on("message", (data) => {
console.log(data); console.log("socketIO", data);
setsocketType(data?.wsMsgModel);
}); });
}, []);
}, []);
useAsyncEffect(() => {
if (!isFullscreen) {
setcommon(new Date());
}
}, [isFullscreen]);
// getInstoreData // getInstoreData
useRequest(getInstoreData, { const InstoreDataFetch = useRequest(getInstoreData, {
manual: false, manual: false,
onSuccess: (result, params) => { onSuccess: (result, params) => {
console.log(result); console.log(result);
...@@ -72,7 +84,7 @@ export default (second) => { ...@@ -72,7 +84,7 @@ export default (second) => {
}); });
// getOutstoreData // getOutstoreData
useRequest(getOutstoreData, { const OutstoreDataFetch = useRequest(getOutstoreData, {
manual: false, manual: false,
onSuccess: (result, params) => { onSuccess: (result, params) => {
console.log(result); console.log(result);
...@@ -85,7 +97,7 @@ export default (second) => { ...@@ -85,7 +97,7 @@ export default (second) => {
}, },
}); });
// getStationStatistics // getStationStatistics
useRequest(getStationStatistics, { const StationStatisticsFetch = useRequest(getStationStatistics, {
manual: false, manual: false,
onSuccess: (result, params) => { onSuccess: (result, params) => {
console.log(result); console.log(result);
...@@ -97,7 +109,7 @@ export default (second) => { ...@@ -97,7 +109,7 @@ export default (second) => {
}, },
}); });
// getInOutstoreNum // getInOutstoreNum
useRequest(getInOutstoreNum, { const InOutstoreNumFetch = useRequest(getInOutstoreNum, {
manual: false, manual: false,
onSuccess: (result, params) => { onSuccess: (result, params) => {
console.log(result); console.log(result);
...@@ -109,7 +121,7 @@ export default (second) => { ...@@ -109,7 +121,7 @@ export default (second) => {
}, },
}); });
// getInOutstoreWeight // getInOutstoreWeight
useRequest(getInOutstoreWeight, { const InOutstoreWeightFetch = useRequest(getInOutstoreWeight, {
manual: false, manual: false,
onSuccess: (result, params) => { onSuccess: (result, params) => {
console.log(result); console.log(result);
...@@ -121,7 +133,7 @@ export default (second) => { ...@@ -121,7 +133,7 @@ export default (second) => {
}, },
}); });
// getInOutstoreWeight // getInOutstoreWeight
useRequest(queryRealityWeight, { const RealityWeightFetch = useRequest(queryRealityWeight, {
manual: false, manual: false,
onSuccess: (result, params) => { onSuccess: (result, params) => {
console.log(result); console.log(result);
...@@ -133,7 +145,7 @@ export default (second) => { ...@@ -133,7 +145,7 @@ export default (second) => {
}, },
}); });
// queryMonitor // queryMonitor
useRequest(queryMonitor, { const queryMonitorFetch = useRequest(queryMonitor, {
manual: false, manual: false,
onSuccess: (result, params) => { onSuccess: (result, params) => {
console.log(result); console.log(result);
...@@ -145,7 +157,7 @@ export default (second) => { ...@@ -145,7 +157,7 @@ export default (second) => {
}, },
}); });
// queryMonitor // queryMonitor
useRequest(queryStore, { const queryStoreFetch = useRequest(queryStore, {
manual: false, manual: false,
onSuccess: (result, params) => { onSuccess: (result, params) => {
setstautsnum(result); setstautsnum(result);
...@@ -156,9 +168,40 @@ export default (second) => { ...@@ -156,9 +168,40 @@ export default (second) => {
}, },
}); });
useEffect(() => {
switch (socketType) {
case "INDEX_BOARD_INSTORE":
InstoreDataFetch.run();
break;
case "INDEX_BOARD_OUTSTORE":
OutstoreDataFetch.run();
break;
case "INDEX_BOARD_MONITOR":
queryMonitorFetch.run();
break;
case "INDEX_BOARD_STORE":
queryStoreFetch.run();
break;
case "INDEX_BOARD_INVENTORYSTATISTICS":
StationStatisticsFetch.run();
break;
case "INDEX_BOARD_INOUTSTORENUM":
InOutstoreNumFetch.run();
break;
case "INDEX_BOARD_INOUTSTOREWEIGHT":
InOutstoreWeightFetch.run();
break;
case "INDEX_BOARD_REALITYWEIGHT":
RealityWeightFetch.run();
break;
default:
return;
}
}, [socketType]);
return ( return (
<> <>
<div className="kb-container" ref={ref}> <div key={common} className="kb-container" ref={ref}>
<header> <header>
<div className="kb-time"> <div className="kb-time">
<Clock /> <Clock />
...@@ -254,7 +297,7 @@ export default (second) => { ...@@ -254,7 +297,7 @@ export default (second) => {
<span>{realNum ?? "--"}</span> <span>{realNum ?? "--"}</span>
</div> </div>
<span <span
style={{ color: "#1FDBDB", fontSize: 24, fontWeight: 600 }} style={{ color: "#00bbf2", fontSize: 24, fontWeight: 600 }}
> >
KG KG
</span> </span>
......
.kb-container { .kb-container {
width: 100%; width: 100%;
height: 100%; height: calc(100vh - 98px) !important;
background-color: rgba(26, 32, 44); background-color: rgba(26, 32, 44);
header { header {
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
flex-direction: row; flex-direction: row;
.Left { .Left {
flex: 1; width: 33.33%;
.unit { .unit {
flex: 1; flex: 1;
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
.Right { .Right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%;
} }
.unit { .unit {
...@@ -202,11 +202,17 @@ ...@@ -202,11 +202,17 @@
background-size: 100% 100%; background-size: 100% 100%;
height: calc(100% - 80px); height: calc(100% - 80px);
background-color: transparent; background-color: transparent;
border-radius: 15px;
// border-radius: 15px;
.row {
width: 100%;
height: 100%;
}
.row-item { .row-item {
background-color: transparent !important; background-color: transparent !important;
text-align: center; text-align: center;
width: 100%;
} }
} }
...@@ -220,7 +226,7 @@ ...@@ -220,7 +226,7 @@
align-items: center; align-items: center;
margin: auto; margin: auto;
justify-self: center; justify-self: center;
} }
.realTime-content { .realTime-content {
...@@ -232,8 +238,9 @@ ...@@ -232,8 +238,9 @@
text-align: center; text-align: center;
line-height: 70px; line-height: 70px;
margin-right: 10px; margin-right: 10px;
span { span {
color: #00bbf2; color: #1FDBDB;
font-size: 25px; font-size: 25px;
font-weight: 600; font-weight: 600;
} }
...@@ -244,7 +251,7 @@ ...@@ -244,7 +251,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
height: calc(100% - 32px); height: calc(100% - 32px);
padding: 12px 0 24px 0; padding: 12px 12px 24px 12px;
.jk-content-unit { .jk-content-unit {
flex: 1; flex: 1;
...@@ -268,7 +275,8 @@ ...@@ -268,7 +275,8 @@
flex: 1; flex: 1;
height: auto; height: auto;
align-self: center; align-self: center;
font-size: 16px;
padding-top: 6px;
} }
} }
} }
...@@ -364,9 +372,9 @@ ...@@ -364,9 +372,9 @@
} }
.statustitle { .statustitle {
width: 18px; width: 16px;
height: 18px; height: 13px;
border-radius: 4px; border-radius: 2px;
margin-right: 3px; margin-right: 3px;
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment