From a23284da4c83c9588bf41c65c05acd19ac962e76 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 25 Apr 2024 11:56:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=89=B4=E6=9D=83=E7=94=A8=E6=88=B7sst-?= =?UTF-8?q?sd=E8=BE=93=E5=85=A5=E9=99=90=E5=88=B61-3=EF=BC=8Csd=E8=A1=A5?= =?UTF-8?q?=E9=9B=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/neUser/sub/index.vue | 63 +++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/src/views/neUser/sub/index.vue b/src/views/neUser/sub/index.vue index b8e2358a..42103c7d 100644 --- a/src/views/neUser/sub/index.vue +++ b/src/views/neUser/sub/index.vue @@ -493,10 +493,7 @@ const modalStateFrom = Form.useForm( */ function transformData(data: any) { let transformedData = data.map((item: any) => { - if ( - !item.sst || - !item.smallRows.every((smallRow: any) => smallRow.dnn) - ) { + if (!item.sst || !item.smallRows.every((smallRow: any) => smallRow.dnn)) { message.error({ content: `${t('views.neUser.sub.smDataArrTip')}`, duration: 3, @@ -504,7 +501,7 @@ function transformData(data: any) { throw new Error('sst, sd, and all dnn are required fields'); } - let sstSd = item.sd?item.sst + '-' + item.sd:item.sst; + let sstSd = item.sd ? item.sst + '-' + item.sd.padStart(6, '0') : item.sst; let smallRowData = item.smallRows .map((smallRow: any) => { let parts = [smallRow.dnn]; @@ -536,7 +533,9 @@ function transformFormData(data: any) { let json: any = { id: bigIDFlag++, sst: item.split('&')[0].split('-')[0], - sd: item.split('&')[0].split('-')[1]?item.split('&')[0].split('-')[1]:'', + sd: item.split('&')[0].split('-')[1] + ? item.split('&')[0].split('-')[1] + : '', smallRows: [], }; item @@ -1543,17 +1542,21 @@ onMounted(() => { name="row.sst" :label-col="{ span: 5 }" > - - - - - - - - - - - - +
+ + - + +
@@ -2068,17 +2071,21 @@ onMounted(() => { - - - - - - - - - - - - +
+ + - + +