From 6c2bb04912412a76699bf3700c201c01406f9743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com> Date: Wed, 11 Jan 2023 14:51:01 +0800 Subject: [PATCH] 1/11 --- src/views/main/PrintingNew/addForm.vue | 4 ++-- src/views/main/PrintingNew/editForm.vue | 21 +++++++++++++-------- src/views/main/PrintingNew/index.vue | 11 ++++++++--- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/views/main/PrintingNew/addForm.vue b/src/views/main/PrintingNew/addForm.vue index 2100651..c57091f 100644 --- a/src/views/main/PrintingNew/addForm.vue +++ b/src/views/main/PrintingNew/addForm.vue @@ -150,9 +150,9 @@ export default { values.cateName = cateName let cateCode = '' values.cateCode.forEach(item => { - cateCode ? (cateCode = `${cateCode},${item}`) : (cateCode = item) + cateCode = `${cateCode}[${item}]` }) - values.cateCode = `[${cateCode}]` + values.cateCode = cateCode for (const key in values) { if (typeof values[key] === 'object' && !(values[key] === null)) { values[key] = JSON.stringify(values[key]) diff --git a/src/views/main/PrintingNew/editForm.vue b/src/views/main/PrintingNew/editForm.vue index 9c45cbf..4469ffe 100644 --- a/src/views/main/PrintingNew/editForm.vue +++ b/src/views/main/PrintingNew/editForm.vue @@ -129,13 +129,18 @@ export default { this.id = record.id this.visible = true setTimeout(() => { + let cateCode = [] + record.cateCode.split('[').forEach(item => { + if (item) { + item.split(']').forEach(item2 => { + if (item2) { + cateCode.push(item2) + } + }) + } + }) this.form.setFieldsValue({ - cateCode: record.cateCode - ? record.cateCode - .split('[')[1] - .split(']')[0] - .split(',') - : null, + cateCode: record.cateCode ? cateCode : null, cateName: record.cateName, displayName: record.displayName, tenantId: record.tenantId, @@ -171,9 +176,9 @@ export default { values.cateName = cateName let cateCode = '' values.cateCode.forEach(item => { - cateCode ? (cateCode = `${cateCode},${item}`) : (cateCode = item) + cateCode = `${cateCode}[${item}]` }) - values.cateCode = `[${cateCode}]` + values.cateCode = cateCode for (const key in values) { console.log(key, 1) if (typeof values[key] === 'object' && !(values[key] === null)) { diff --git a/src/views/main/PrintingNew/index.vue b/src/views/main/PrintingNew/index.vue index 2cb198e..3aecbb2 100644 --- a/src/views/main/PrintingNew/index.vue +++ b/src/views/main/PrintingNew/index.vue @@ -15,6 +15,11 @@ + + + + + @@ -42,10 +47,10 @@ 查询 重置 - + @@ -558,7 +563,7 @@ button { .Open { } .Close { - min-height: 45px; + max-height: 50px; padding-bottom: 8px; overflow: hidden; }