|
@@ -2,10 +2,10 @@ import { h } from 'vue';
|
|
import { BasicColumn } from '/@/components/Table';
|
|
import { BasicColumn } from '/@/components/Table';
|
|
import { render } from '/@/utils/common/renderUtils';
|
|
import { render } from '/@/utils/common/renderUtils';
|
|
|
|
|
|
-const renderNum = (num, weight, backArr?: boolean) => {
|
|
|
|
- let arr = [h('span', { style: { color: '#0085ff' } }, num)];
|
|
|
|
|
|
+const renderNum = (num, weight, backArr?: boolean, tag = 'div') => {
|
|
|
|
+ let arr = [h(tag, { style: { color: '#0085ff' } }, num)];
|
|
if (weight !== null) {
|
|
if (weight !== null) {
|
|
- arr.push(h('span', {}, '/' + weight.toFixed(2)));
|
|
|
|
|
|
+ arr.push(h(tag, {}, (tag === 'span' ? '/' : '') + weight.toFixed(2)));
|
|
}
|
|
}
|
|
if (backArr === true) {
|
|
if (backArr === true) {
|
|
return arr;
|
|
return arr;
|
|
@@ -20,8 +20,8 @@ const renderStrandCell = (num, lengthJsonStr) => {
|
|
console.log('lengthJson', lengthJson);
|
|
console.log('lengthJson', lengthJson);
|
|
const lengthKeys = Object.keys(lengthJson);
|
|
const lengthKeys = Object.keys(lengthJson);
|
|
if (lengthKeys.length) {
|
|
if (lengthKeys.length) {
|
|
- return h('div', { style: { textAlign: 'left' } }, [
|
|
|
|
- h('div', { style: { color: '#f50' } }, num),
|
|
|
|
|
|
+ return h('div', { style: { textAlign: 'left', padding: '20px 0 0' } }, [
|
|
|
|
+ h('div', { style: { color: '#f50', position: 'absolute', top: '0px' } }, num),
|
|
...lengthKeys.map((key) => {
|
|
...lengthKeys.map((key) => {
|
|
return h('div', {}, [h('span', {}, Number(key) / 1000 + ': '), h('span', { style: { color: '#0085ff' } }, lengthJson[key])]);
|
|
return h('div', {}, [h('span', {}, Number(key) / 1000 + ': '), h('span', { style: { color: '#0085ff' } }, lengthJson[key])]);
|
|
}),
|
|
}),
|
|
@@ -134,7 +134,7 @@ export const columns: BasicColumn[] = [
|
|
{
|
|
{
|
|
title: '棒一',
|
|
title: '棒一',
|
|
align: 'center',
|
|
align: 'center',
|
|
- width: 100,
|
|
|
|
|
|
+ width: 75,
|
|
dataIndex: 'directRolling',
|
|
dataIndex: 'directRolling',
|
|
customRender({ record }) {
|
|
customRender({ record }) {
|
|
const { hotSend, directRolling } = record;
|
|
const { hotSend, directRolling } = record;
|
|
@@ -156,7 +156,7 @@ export const columns: BasicColumn[] = [
|
|
{
|
|
{
|
|
title: '热装',
|
|
title: '热装',
|
|
align: 'center',
|
|
align: 'center',
|
|
- width: 100,
|
|
|
|
|
|
+ width: 75,
|
|
dataIndex: 'hotCharge',
|
|
dataIndex: 'hotCharge',
|
|
customRender({ record }) {
|
|
customRender({ record }) {
|
|
const { hotCharge } = record;
|
|
const { hotCharge } = record;
|
|
@@ -173,7 +173,7 @@ export const columns: BasicColumn[] = [
|
|
{
|
|
{
|
|
title: '堆垛',
|
|
title: '堆垛',
|
|
align: 'center',
|
|
align: 'center',
|
|
- width: 100,
|
|
|
|
|
|
+ width: 75,
|
|
dataIndex: 'stacking',
|
|
dataIndex: 'stacking',
|
|
customRender({ record }) {
|
|
customRender({ record }) {
|
|
const { stacking } = record;
|
|
const { stacking } = record;
|
|
@@ -200,7 +200,7 @@ export const columns: BasicColumn[] = [
|
|
let lengthCC: any[] = [];
|
|
let lengthCC: any[] = [];
|
|
Object.keys(obj).forEach((key) => {
|
|
Object.keys(obj).forEach((key) => {
|
|
// lengthCC.push(h('div', {}, key + ' : ' + obj[key].lengthTotalCount + ' / ' + obj[key].lengthTotalWeight.toFixed(2)));
|
|
// lengthCC.push(h('div', {}, key + ' : ' + obj[key].lengthTotalCount + ' / ' + obj[key].lengthTotalWeight.toFixed(2)));
|
|
- const lengthStlArr = renderNum(obj[key].lengthTotalCount, null, true) as any[];
|
|
|
|
|
|
+ const lengthStlArr = renderNum(obj[key].lengthTotalCount, null, true, 'span') as any[];
|
|
lengthCC.push(h('div', {}, [h('span', {}, Number(key) / 1000 + ': '), ...lengthStlArr]));
|
|
lengthCC.push(h('div', {}, [h('span', {}, Number(key) / 1000 + ': '), ...lengthStlArr]));
|
|
});
|
|
});
|
|
return h('div', { style: { fontSize: '12px', textAlign: 'left' } }, lengthCC);
|
|
return h('div', { style: { fontSize: '12px', textAlign: 'left' } }, lengthCC);
|
|
@@ -212,7 +212,7 @@ export const columns: BasicColumn[] = [
|
|
{
|
|
{
|
|
title: '总计',
|
|
title: '总计',
|
|
align: 'center',
|
|
align: 'center',
|
|
- width: 100,
|
|
|
|
|
|
+ width: 75,
|
|
dataIndex: 'totalInfo',
|
|
dataIndex: 'totalInfo',
|
|
customRender({ record }) {
|
|
customRender({ record }) {
|
|
try {
|
|
try {
|