From 072cb0fee64ae1a08b0a843885448b25925960e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Fri, 7 Apr 2023 16:41:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/person/indexjs.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/views/system/person/indexjs.js b/src/views/system/person/indexjs.js index 557fb40..daad28d 100644 --- a/src/views/system/person/indexjs.js +++ b/src/views/system/person/indexjs.js @@ -226,7 +226,8 @@ export default { var obj = { certificateName: null, certificateUrl: null, - idd: this.idd + idd: this.idd, + sort: null, }; if (this.form.nurseStationPersonCertificateList.length == 5) { this.$message.error("最多只能5条"); @@ -373,7 +374,8 @@ export default { nurseStationPersonCertificateList: [{ certificateName: null, certificateUrl: null, - idd: this.idd + sort: null, + idd: this.idd, }] }; this.resetForm("form"); @@ -472,6 +474,7 @@ export default { var obj = { certificateName: null, certificateUrl: null, + sort: null, idd: this.idd }; if (this.form.nurseStationPersonCertificateList.length == 0) { @@ -498,6 +501,13 @@ export default { submitForm() { this.$refs["form"].validate((valid) => { if (valid) { + if (this.form.nurseStationPersonCertificateList.length > 0) { + this.form.nurseStationPersonCertificateList.forEach(e => { + if (!e.certificateName && !e.certificateUrl && !e.sort) { + this.form.nurseStationPersonCertificateList = this.form.nurseStationPersonCertificateList.filter(el => el != e) + } + }) + } if (this.form.id != null) { updatePerson(this.form).then((response) => { this.$modal.msgSuccess("修改成功");