提交
This commit is contained in:
1 parent
eec61cb5dd
commit
195c4c0a34
13 files changed
+5601
-5412
No files matched your search
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_types_import_components_d_ts", "label": "components.d.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts", "source_location": "L1"}], "edges": [], "raw_calls": []}
|
||||
@@ -180,56 +180,50 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="260"
|
||||
min-width="420"
|
||||
fixed="right"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex; justify-content: center; gap: 8px">
|
||||
<template v-if="hasPrimaryCheckupActions(row)">
|
||||
<el-button
|
||||
v-if="canFillCheckupInfo(row)"
|
||||
class="btn-op-item primary"
|
||||
type="primary"
|
||||
@click="handleFill(row)"
|
||||
>
|
||||
<el-icon><Edit /></el-icon>填写体检信息
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="canMarkChecked(row)"
|
||||
class="btn-op-item primary"
|
||||
type="primary"
|
||||
@click="handleMarkChecked(row)"
|
||||
>
|
||||
<el-icon><CircleCheck /></el-icon>标记已体检
|
||||
</el-button>
|
||||
</template>
|
||||
<el-button v-else class="btn-op-item primary" @click="handleView(row)">
|
||||
<div class="checkup-op-actions">
|
||||
<el-button
|
||||
v-if="canFillCheckupInfo(row)"
|
||||
class="btn-op-item primary"
|
||||
type="primary"
|
||||
@click="handleFill(row)"
|
||||
>
|
||||
<el-icon><Edit /></el-icon>填写体检信息
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="canMarkChecked(row)"
|
||||
class="btn-op-item primary"
|
||||
type="primary"
|
||||
@click="handleMarkChecked(row)"
|
||||
>
|
||||
<el-icon><CircleCheck /></el-icon>标记已体检
|
||||
</el-button>
|
||||
<el-button
|
||||
:class="['btn-op-item', { primary: !hasPrimaryCheckupActions(row) }]"
|
||||
:type="hasPrimaryCheckupActions(row) ? undefined : 'primary'"
|
||||
@click="handleView(row)"
|
||||
>
|
||||
<el-icon><View /></el-icon>查看
|
||||
</el-button>
|
||||
<el-dropdown
|
||||
v-if="hasMoreCheckupActions(row)"
|
||||
trigger="hover"
|
||||
@command="(cmd) => handleDropdownCommand(cmd, row)"
|
||||
<el-button
|
||||
v-if="canEditReserve(row)"
|
||||
class="btn-op-item"
|
||||
@click="handleEditReserve(row)"
|
||||
>
|
||||
<el-button class="btn-op-item">
|
||||
<el-icon><More /></el-icon>
|
||||
</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item v-if="hasPrimaryCheckupActions(row)" command="view">
|
||||
<el-icon><View /></el-icon>查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="canEditReserve(row)" command="editReserve">
|
||||
<el-icon><EditPen /></el-icon>编辑预约信息
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="canEditActualCheckupInfo(row)" command="editActual">
|
||||
<el-icon><Edit /></el-icon>编辑体检信息
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<el-icon><EditPen /></el-icon>编辑预约信息
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="canEditActualCheckupInfo(row)"
|
||||
class="btn-op-item"
|
||||
@click="handleEditActual(row)"
|
||||
>
|
||||
<el-icon><Edit /></el-icon>编辑体检信息
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -287,8 +281,7 @@
|
||||
CircleCheck,
|
||||
Edit,
|
||||
EditPen,
|
||||
Calendar,
|
||||
More
|
||||
Calendar
|
||||
} from '@element-plus/icons-vue'
|
||||
import { fetchPilotCheckupList, fetchCheckupInstitutionList } from '@/api/admin'
|
||||
import { checkupStatusLabel, checkupStatusTagType, sexLabel } from '@/utils/status-tag-registry'
|
||||
@@ -402,28 +395,6 @@
|
||||
const hasPrimaryCheckupActions = (row: any) =>
|
||||
canFillCheckupInfo(row) || canMarkChecked(row)
|
||||
|
||||
/** 更多菜单是否展示 */
|
||||
const hasMoreCheckupActions = (row: any) => {
|
||||
if (hasPrimaryCheckupActions(row)) {
|
||||
return canEditReserve(row) || canMarkChecked(row)
|
||||
}
|
||||
return canEditReserve(row) || canEditActualCheckupInfo(row)
|
||||
}
|
||||
|
||||
const handleDropdownCommand = (command: string, row: any) => {
|
||||
switch (command) {
|
||||
case 'view':
|
||||
handleView(row)
|
||||
break
|
||||
case 'editReserve':
|
||||
handleEditReserve(row)
|
||||
break
|
||||
case 'editActual':
|
||||
handleEditActual(row)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
const handleFill = (row: any) => {
|
||||
currentCheckupId.value = row.id
|
||||
currentPatientName.value = row.patientName || ''
|
||||
@@ -497,3 +468,12 @@
|
||||
loadInstitutions()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.checkup-op-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user