fix: 自测bug修复。

This commit is contained in:
tianyongbao
2024-10-08 09:01:38 +08:00
parent fe7b5b36a4
commit b55b898577

View File

@@ -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