From 71478d1da5ff484d635dcc1b980b5f4fd7e74d43 Mon Sep 17 00:00:00 2001 From: tangxuan <2233783319@qq.com> Date: Thu, 23 Mar 2023 23:07:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=B7=BB=E5=8A=A0=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/reagent/management/data/index.vue | 30 +++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/src/views/reagent/management/data/index.vue b/src/views/reagent/management/data/index.vue index b8d79d7..18a70fe 100644 --- a/src/views/reagent/management/data/index.vue +++ b/src/views/reagent/management/data/index.vue @@ -23,6 +23,7 @@ 查看流转记录 分配禁用用户 + 上传图片信息 @@ -818,7 +819,8 @@ export default { currentItem: {}, loadingImageList: false, focusing: false, - UPLOAD_URL: process.env.VUE_APP_BASE_API + '/api/drug/save_drug_img' + UPLOAD_URL: process.env.VUE_APP_BASE_API + '/api/drug/save_drug_img', + uploadImgData: {} } }, created() { @@ -893,6 +895,10 @@ export default { // 显示全部图片 handleShowImage(row) { this.currentItem = row + this.uploadImgData = { selected: JSON.stringify([{ + variety_id: row.variety_id, + medicament_id: row.medicament_id + }])} this.getImageList() this.dialogImageVisible = true }, @@ -1280,7 +1286,27 @@ export default { } ) } - } + }, + + // 多选条目批量上传图片信息 + multipleUploadImgs(){ + if (this.multipleSelection.length < 1) { + this.$message.warning('请选择至少一个试剂!') + return + } + var data = new Array() + this.multipleSelection.map(item => { + data.push({ + variety_id: item.variety_id, + medicament_id: item.medicament_id + }) + + }) + this.currentItem = this.multipleSelection[0] + this.getImageList() + this.uploadImgData = { selected: JSON.stringify(data)} + this.dialogImageVisible = true + }, } }