取消sd必填
This commit is contained in:
@@ -503,7 +503,6 @@ function transformData(data: any) {
|
|||||||
let transformedData = data.map((item: any) => {
|
let transformedData = data.map((item: any) => {
|
||||||
if (
|
if (
|
||||||
!item.sst ||
|
!item.sst ||
|
||||||
!item.sd ||
|
|
||||||
!item.smallRows.every((smallRow: any) => smallRow.dnn)
|
!item.smallRows.every((smallRow: any) => smallRow.dnn)
|
||||||
) {
|
) {
|
||||||
message.error({
|
message.error({
|
||||||
@@ -513,7 +512,7 @@ function transformData(data: any) {
|
|||||||
throw new Error('sst, sd, and all dnn are required fields');
|
throw new Error('sst, sd, and all dnn are required fields');
|
||||||
}
|
}
|
||||||
|
|
||||||
let sstSd = item.sst + '-' + item.sd;
|
let sstSd = item.sd?item.sst + '-' + item.sd:item.sst;
|
||||||
let smallRowData = item.smallRows
|
let smallRowData = item.smallRows
|
||||||
.map((smallRow: any) => {
|
.map((smallRow: any) => {
|
||||||
let parts = [smallRow.dnn];
|
let parts = [smallRow.dnn];
|
||||||
@@ -545,7 +544,7 @@ function transformFormData(data: any) {
|
|||||||
let json: any = {
|
let json: any = {
|
||||||
id: bigIDFlag++,
|
id: bigIDFlag++,
|
||||||
sst: item.split('&')[0].split('-')[0],
|
sst: item.split('&')[0].split('-')[0],
|
||||||
sd: item.split('&')[0].split('-')[1],
|
sd: item.split('&')[0].split('-')[1]?item.split('&')[0].split('-')[1]:'',
|
||||||
smallRows: [],
|
smallRows: [],
|
||||||
};
|
};
|
||||||
item
|
item
|
||||||
|
|||||||
Reference in New Issue
Block a user