From 80374b7993594821108891c5babb2aa34cbc09c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Wed, 22 Feb 2023 09:49:14 +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/poser/index.vue | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/views/system/poser/index.vue b/src/views/system/poser/index.vue index fecea9c..d109e56 100644 --- a/src/views/system/poser/index.vue +++ b/src/views/system/poser/index.vue @@ -940,10 +940,13 @@ export default { obj.pictureUrlList.push(e.posterPictureUrl); }); } - console.log(this.deletNewImgs,'---------------------------------') - updatePicture({pictureUrlList:this.deletNewImgs}).then((res) => { + console.log(this.deletNewImgs) + if(obj.pictureUrlList.length>0){ + updatePicture({pictureUrlList:this.deletNewImgs}).then((res) => { this.open = false; }); + } + this.nurseItemquery.nurseStationId = null; this.imgs = { pictureUrlList: [] }; @@ -1028,17 +1031,15 @@ export default { if (valid) { if (this.form.id != null) { updatePoser(this.form).then((response) => { - // var obj = { pictureUrlList: [] }; - var obj = { pictureUrlList: [] }; - if (this.form.posterPictureUrlLists) { - this.form.posterPictureUrlLists.forEach((e) => { - obj.pictureUrlList.push(e.posterPictureUrl); - }); - } - updatePicture(obj).then((res) => { - this.open = false; - console.log('是否删除') - }); + // var obj = { pictureUrlList: [] }; + // if (this.form.posterPictureUrlLists) { + // this.form.posterPictureUrlLists.forEach((e) => { + // obj.pictureUrlList.push(e.posterPictureUrl); + // }); + // } + // updatePicture({pictureUrlList:this.deletNewImgs}).then((res) => { + // this.open = false; + // }); this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); @@ -1046,6 +1047,8 @@ export default { } else { if (this.form.poserSort) { this.form.poserSort = parseInt(this.form.poserSort); + }else{ + this.form.poserSort=null } addPoser(this.form).then((response) => { this.$modal.msgSuccess("新增成功");