From b55b89857756f8f80cc8e58323d75d9acb586a63 Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Tue, 8 Oct 2024 09:01:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=87=AA=E6=B5=8Bbug=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/health/medicineBasic/index.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/views/health/medicineBasic/index.vue b/src/views/health/medicineBasic/index.vue index 37dde08..c808ac1 100644 --- a/src/views/health/medicineBasic/index.vue +++ b/src/views/health/medicineBasic/index.vue @@ -214,6 +214,7 @@ const title = ref('') const operateList = ref([ { id: 'view', icon: 'View', title: '查看', hasPermi: ['health:medicineBasic:query'] }, { id: 'edit', icon: 'Edit', title: '修改', hasPermi: ['health:medicineBasic:edit'] }, + { id: 'copy', icon: 'Link', title: '复制', hasPermi: ['health:marRecord:edit'] }, { id: 'delete', icon: 'Delete', title: '删除', hasPermi: ['health:medicineBasic:remove'] } ]) const data = reactive({ @@ -258,6 +259,9 @@ const handleOperate = (operate, row) => { case 'delete': handleDelete(row) break + case 'copy': + handleCopy(row) + break default: break } @@ -275,6 +279,18 @@ function getList() { }) } +/** 复制按钮操作 */ +function handleCopy(row) { + reset() + const _id = row.id || ids.value + getMedicineBasic(_id).then((response) => { + form.value = response.data + form.value.id = null + open.value = true + title.value = '复制药品基础信息' + }) +} + // 取消按钮 function cancel() { open.value = false