|
|
@ -30,6 +30,7 @@ |
|
|
|
<p class="w-[8rem]">操作员</p> |
|
|
|
<p>实验名称</p> |
|
|
|
</header> |
|
|
|
<main class="overflow-auto" style="max-height: calc(100vh - var(--headerHeight) - var(--footerHeight) - 120px)"> |
|
|
|
<div |
|
|
|
v-for="record in recordList" |
|
|
|
:key="record.id" |
|
|
@ -43,6 +44,7 @@ |
|
|
|
<p class="w-[10rem]">{{ record.name }}</p> |
|
|
|
<p class="text-primary underline leading-[3rem] text-sm px-2" @click.stop="onDetailClick(record)">详情</p> |
|
|
|
</div> |
|
|
|
</main> |
|
|
|
</section> |
|
|
|
|
|
|
|
<van-overlay v-if="showEditDialog" :show="true"> |
|
|
@ -62,6 +64,7 @@ import { deleteExperienceRecords, getExperienceRecords, type ExperienceRecord } |
|
|
|
import { showToast } from "vant"; |
|
|
|
import { useUserStore } from "@/stores/user"; |
|
|
|
import ExpeDetail from "./components/ExpeDetail.vue"; |
|
|
|
import { ElMessageBox } from "element-plus"; |
|
|
|
|
|
|
|
const userStore = useUserStore(); |
|
|
|
const showEditDialog = ref<boolean>(false); |
|
|
@ -102,6 +105,11 @@ function onSelectAll() { |
|
|
|
|
|
|
|
function onDeleteRecords() { |
|
|
|
if (selectedIds.value.length === 0) return; |
|
|
|
ElMessageBox.confirm("确定删除记录?", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
center: true, |
|
|
|
}).then(() => { |
|
|
|
deleteExperienceRecords(selectedIds.value.join(",")).then(res => { |
|
|
|
if (res.success) { |
|
|
|
selectedIds.value = []; |
|
|
@ -110,6 +118,7 @@ function onDeleteRecords() { |
|
|
|
showToast(res.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
function onDetailClick(item: ExperienceRecord) { |
|
|
|
recordForEdit.value = item; |
|
|
|