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