Commit e3673625 authored by krysent's avatar krysent

看板样式优化

parent e59ed0ec
...@@ -109,6 +109,9 @@ export default (props) => { ...@@ -109,6 +109,9 @@ export default (props) => {
}, },
}, },
], ],
tooltip: {
show: true,
}
}; };
}, [data]); }, [data]);
......
...@@ -15,6 +15,11 @@ const statusBgc = function (state) { ...@@ -15,6 +15,11 @@ const statusBgc = function (state) {
} }
}; };
const styleObj = {
width: "100%",
height: "100%",
};
export default (props) => { export default (props) => {
const { title, headTitle, data } = props; const { title, headTitle, data } = props;
...@@ -30,15 +35,15 @@ export default (props) => { ...@@ -30,15 +35,15 @@ export default (props) => {
]; ];
configArr.push(arr); configArr.push(arr);
}); });
if (configArr.length < 6) { // if (configArr.length < 5) {
let l = 6 - configArr.length; // let l = 5 - configArr.length;
const newArr = Array.from({ length: l }, () => new Array(4).fill(" ")); // const newArr = Array.from({ length: l }, () => new Array(4).fill(" "));
console.log(newArr); // console.log(newArr);
newArr.forEach((it) => { // newArr.forEach((it) => {
configArr.push(it); // configArr.push(it);
}); // });
console.log(configArr); // console.log(configArr);
} // }
} else if (title === "待出库任务") { } else if (title === "待出库任务") {
data?.forEach((it) => { data?.forEach((it) => {
let arr = [ let arr = [
...@@ -50,15 +55,15 @@ export default (props) => { ...@@ -50,15 +55,15 @@ export default (props) => {
]; ];
configArr.push(arr); configArr.push(arr);
}); });
if (configArr.length < 6) { // if (configArr.length < 5) {
let l = 6 - configArr.length; // let l = 5 - configArr.length;
const newArr = Array.from({ length: l }, () => new Array(5).fill(" ")); // const newArr = Array.from({ length: l }, () => new Array(5).fill(" "));
console.log(newArr); // console.log(newArr);
newArr.forEach((it) => { // newArr.forEach((it) => {
configArr.push(it); // configArr.push(it);
}); // });
console.log(configArr); // console.log(configArr);
} // }
} else if (title === "库存统计") { } else if (title === "库存统计") {
data?.forEach((it) => { data?.forEach((it) => {
let arr = [ let arr = [
...@@ -70,19 +75,22 @@ export default (props) => { ...@@ -70,19 +75,22 @@ export default (props) => {
]; ];
configArr.push(arr); configArr.push(arr);
}); });
if (configArr.length < 6) { // if (configArr.length < 5) {
let l = 6 - configArr.length; // let l = 5 - configArr.length;
const newArr = Array.from({ length: l }, () => new Array(5).fill(" ")); // const newArr = Array.from({ length: l }, () => new Array(5).fill(" "));
console.log(newArr); // console.log(newArr);
newArr.forEach((it) => { // newArr.forEach((it) => {
configArr.push(it); // configArr.push(it);
}); // });
console.log(configArr); // console.log(configArr);
} // }
} }
return { return {
data: configArr, data: configArr,
rowNum: 5,
hoverPause: configArr?.length > 5 ? true : false,
align: ["center"],
}; };
}, [data, title]); }, [data, title]);
...@@ -96,14 +104,15 @@ export default (props) => { ...@@ -96,14 +104,15 @@ export default (props) => {
return <span key={i}>{it}</span>; return <span key={i}>{it}</span>;
})} })}
</div> </div>
<ScrollBoard {data.length === 0 ? (
align={["center"]} <div style={{ width: "100%", height: "auto",color:'#ffffff80',textAlign:'center',marginTop:'20%' }}>暂无数据</div>
config={config} ) : (
style={statusBgc(title)} <ScrollBoard
// rowNum={config?.data?.length >= 5 ? 5 : config?.data?.length} config={config}
rowNum={5} style={statusBgc(title)}
// hoverPause={false} // rowNum={config?.data?.length >= 5 ? 5 : config?.data?.length}
/> />
)}
</div> </div>
</> </>
); );
......
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