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