修复标签语法错误
This commit is contained in:
@@ -55,138 +55,7 @@
|
|||||||
|
|
||||||
<!-- 手术等级 -->
|
<!-- 手术等级 -->
|
||||||
<el-table-column label="手术等级" align="center" prop="surgeryLevel_dictText" width="100" />
|
<el-table-column label="手术等级" align="center" prop="surgeryLevel_dictText" width="100" />
|
||||||
|
|
||||||
<!-- 手术室确认时间 -->
|
|
||||||
<el-table-column label="手术室确认时间" align="center" prop="confirmTime" width="180">
|
|
||||||
<template #default="scope">
|
|
||||||
{{ scope.row.confirmTime ? parseTime(scope.row.confirmTime, '{y}-{m}-{d} {h}:{i}:{s}') : '-' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<!-- 操作列 -->
|
|
||||||
<el-table-column label="操作" align="center" width="150" fixed="right">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
link
|
|
||||||
size="small"
|
|
||||||
@click="handleView(scope.row)"
|
|
||||||
>
|
|
||||||
查看
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
link
|
|
||||||
size="small"
|
|
||||||
@click="handleEdit(scope.row)"
|
|
||||||
:disabled="scope.row.status !== '0'"
|
|
||||||
>
|
|
||||||
修改
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { ref, onMounted } from 'vue'
|
|
||||||
import { getSurgeryApplicationList, addSurgeryApplication, updateSurgeryApplication } from '@/api/doctorstation/surgery'
|
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
||||||
|
|
||||||
const loading = ref(true)
|
|
||||||
const surgeryList = ref([])
|
|
||||||
|
|
||||||
// 查询手术申请列表
|
|
||||||
const getList = async () => {
|
|
||||||
try {
|
|
||||||
loading.value = true
|
|
||||||
const response = await getSurgeryApplicationList()
|
|
||||||
surgeryList.value = response.data || []
|
|
||||||
} catch (error) {
|
|
||||||
console.warn('获取手术申请列表失败', error)
|
|
||||||
surgeryList.value = []
|
|
||||||
} finally {
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增手术申请
|
|
||||||
const handleAdd = () => {
|
|
||||||
// 跳转到新增页面或打开新增弹窗
|
|
||||||
// 这里需要根据实际路由配置调整
|
|
||||||
openSurgeryDialog()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 编辑手术申请
|
|
||||||
const handleEdit = (row) => {
|
|
||||||
if(row.status !== '0') {
|
|
||||||
ElMessage.warning('该申请已提交,无法修改')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
openSurgeryDialog(row)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查看手术申请详情
|
|
||||||
const handleView = (row) => {
|
|
||||||
openSurgeryDialog(row, true)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 刷新列表
|
|
||||||
const handleRefresh = () => {
|
|
||||||
getList()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 打开手术申请对话框
|
|
||||||
const openSurgeryDialog = (row, isView = false) => {
|
|
||||||
// 这里需要引入具体的对话框组件或跳转到详情页
|
|
||||||
// 示例代码,具体实现需要根据项目实际情况调整
|
|
||||||
console.log('打开手术申请对话框', row, isView)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取行样式
|
|
||||||
const getRowClassName = ({ row }) => {
|
|
||||||
if (row.status === '1') {
|
|
||||||
return 'success-row'
|
|
||||||
} else if (row.status === '2') {
|
|
||||||
return 'warning-row'
|
|
||||||
}
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
getList()
|
|
||||||
})
|
|
||||||
|
|
||||||
// 暴露方法给父组件调用,用于提交后刷新列表
|
|
||||||
defineExpose({
|
|
||||||
refreshList: getList
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.surgery-application-container {
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-operation-bar {
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add-button,
|
|
||||||
.refresh-button {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 表格行状态样式 */
|
|
||||||
::v-deep(.success-row) {
|
|
||||||
background-color: #f0f9ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep(.warning-row) {
|
|
||||||
background-color: #fff7e6;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<el-table-column label="手术室确认时间" align="center" prop="operatingRoomConfirmTime" width="180">
|
<el-table-column label="手术室确认时间" align="center" prop="operatingRoomConfirmTime" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.operatingRoomConfirmTime ? parseTime(scope.row.operatingRoomConfirmTime, '{y}-{m}-{d} {h}:{i}:{s}') : '-' }}
|
{{ scope.row.operatingRoomConfirmTime ? parseTime(scope.row.operatingRoomConfirmTime, '{y}-{m}-{d} {h}:{i}:{s}') : '-' }}
|
||||||
@@ -612,6 +481,7 @@ defineExpose({
|
|||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<script setup name="SurgeryApplication">
|
<script setup name="SurgeryApplication">
|
||||||
import { getCurrentInstance, ref, computed, watch, onMounted } from 'vue'
|
import { getCurrentInstance, ref, computed, watch, onMounted } from 'vue'
|
||||||
|
|||||||
Reference in New Issue
Block a user