Commit e3673625 authored by krysent's avatar krysent

看板样式优化

parent e59ed0ec
......@@ -109,6 +109,9 @@ export default (props) => {
},
},
],
tooltip: {
show: true,
}
};
}, [data]);
......
......@@ -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>
</>
);
......
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