From d64676473522e6d389947c9daf56a04ebbc390f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Tue, 28 Feb 2023 16:59:51 +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/certificate/index.vue | 28 ++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/views/system/certificate/index.vue b/src/views/system/certificate/index.vue index ff5a6e7..45c3b9b 100644 --- a/src/views/system/certificate/index.vue +++ b/src/views/system/certificate/index.vue @@ -357,6 +357,7 @@ import { updateCertificate, } from "@/api/system/certificate"; import stationAcatar from "../stationAvatar/index.vue"; +import { updatePicture } from "@/api/system/station"; export default { components: { stationAcatar }, name: "Certificate", @@ -387,6 +388,9 @@ export default { title: "", // 是否显示弹出层 open: false, + deletNewImgs:[], + objitem:[], + imgsurl: { pictureUrlList: [] }, innerVisible: false, hospitalPersonList: [], total2: 0, @@ -459,6 +463,10 @@ export default { }, //接收图片所属的item imgclassifyItem(item) { + let imgUrlData = JSON.parse(item); + // 存贮新上传的图片数组 + this.deletNewImgs.push(imgUrlData.certificateUrl); + this.objitem.push(imgUrlData.certificateUrl); console.log(item,'接受图片item') let items = JSON.parse(item); if (items.idd && !items.id) { @@ -471,7 +479,10 @@ export default { this.form.certificateUrl = items.certificateUrl; } }, - imgUrl(e) {}, + imgUrl(imgUrl) { + console.log(imgUrl) + + }, innerVisiblecancel() { this.innerVisible = false; }, @@ -514,7 +525,19 @@ export default { }, // 取消按钮 cancel() { - this.open = false; + var obj = { pictureUrlList: [] }; + if (this.form.certificateUrlList) { + this.form.certificateUrlList.forEach((e) => { + obj.pictureUrlList.push(e.certificateUrl); + }); + } + console.log("2222",this.deletNewImgs) + updatePicture({ pictureUrlList: this.deletNewImgs }).then(res => { + this.open = false; + }); + + this.imgsurl = { pictureUrlList: [] }; + this.reset(); }, // 表单重置 @@ -537,6 +560,7 @@ export default { updateBy: null, updateTime: null, }; + this.deletNewImgs=[]; this.resetForm("form"); }, /** 搜索按钮操作 */