| | |
| | | <template> |
| | | <ContentWrap> |
| | | <!-- 搜索工作栏 --> |
| | | <el-form |
| | | class="-mb-15px" |
| | | :model="queryParams" |
| | | ref="queryFormRef" |
| | | :inline="true" |
| | | label-width="80px" |
| | | > |
| | | <el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="80px"> |
| | | <el-form-item label="项目名称" prop="name"> |
| | | <el-input |
| | | v-model="queryParams.name" |
| | | placeholder="请输入检查项目名称" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | class="!w-240px" |
| | | /> |
| | | </el-form-item> |
| | | <el-input v-model="queryParams.name" placeholder="请输入检查项目名称" clearable @keyup.enter="handleQuery" |
| | | class="!w-240px" /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> |
| | | <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | @click="openForm('create')" |
| | | v-hasPermi="['ecg:check-type:create']" |
| | | > |
| | | <el-button @click="handleQuery"> |
| | | <Icon icon="ep:search" class="mr-5px" /> 搜索 |
| | | </el-button> |
| | | <el-button @click="resetQuery"> |
| | | <Icon icon="ep:refresh" class="mr-5px" /> 重置 |
| | | </el-button> |
| | | <el-button type="primary" plain @click="openForm('create')" v-hasPermi="['ecg:check-type:create']"> |
| | | <Icon icon="ep:plus" class="mr-5px" /> 新增 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | @click="handleExport" |
| | | :loading="exportLoading" |
| | | v-hasPermi="['ecg:check-type:export']" |
| | | > |
| | | <el-button type="success" plain @click="handleExport" :loading="exportLoading" |
| | | v-hasPermi="['ecg:check-type:export']"> |
| | | <Icon icon="ep:download" class="mr-5px" /> 导出 |
| | | </el-button> |
| | | </el-form-item> |
| | |
| | | <ContentWrap> |
| | | <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> |
| | | <!-- 需求9:不再显示数据库 id;改为显示**可编辑**的「排序序号」(越小越靠前) --> |
| | | <el-table-column label="排序序号" align="center" prop="sort" width="130px"> |
| | | <el-table-column label="序号" align="center" prop="sort" width="130px"> |
| | | <template #default="scope"> |
| | | <el-input-number |
| | | v-model="scope.row.sort" |
| | | :min="0" |
| | | :controls="false" |
| | | size="small" |
| | | style="width: 100%" |
| | | @change="handleSortChange(scope.row)" |
| | | /> |
| | | <el-input-number v-model="scope.row.sort" :min="0" :controls="false" size="small" style="width: 100%" |
| | | @change="handleSortChange(scope.row)" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="项目名称" align="center" prop="name" width="180px"/> |
| | | <el-table-column label="项目值" align="center" prop="value" /> |
| | | <el-table-column label="候诊人数" align="center" prop="readyNum" /> |
| | | <!-- <el-table-column label="创建时间" align="center" prop="createTime" :formatter="dateFormatter" width="180px />--> |
| | | <el-table-column label="需要设备领用" align="center" prop="needDevReady"> |
| | | <template #default="scope"> |
| | | {{scope.row.needDevReady === 0 ? "不需要":"需要"}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="叫号列" align="center" prop="callingColumn" /> |
| | | <el-table-column label="显示患者条码" align="center" prop="displayBarcode" /> |
| | | <el-table-column label="需要确费" align="center" prop="expenseRecognition" /> |
| | | <el-table-column label="时段预约人数" align="center" prop="timeslotBookNum" /> |
| | | <el-table-column label="时段预留人数" align="center" prop="timeslotReservedNum" /> |
| | | <el-table-column label="预约注意事项" align="center" prop="notes" /> |
| | | <el-table-column label="序号前缀" align="center" prop="seqPrefix" /> |
| | | <el-table-column label="亲和项目" align="center" prop="affinityCheckTypes" > |
| | | <el-table-column label="项目名称" align="center" prop="name" width="180px" /> |
| | | <el-table-column label="项目编码" align="center" prop="value" /> |
| | | <el-table-column label="亲和项目" align="center" prop="affinityCheckTypes"> |
| | | <template #default="scope"> |
| | | <div v-for="(checkType, subIndex) in scope.row.affinityCheckTypes" :key="subIndex"> |
| | | {{getCheckTypeName(checkType)}} |
| | | {{ getCheckTypeName(checkType) }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="创建时间" align="center" prop="createTime" :formatter="dateFormatter" width="180px />--> |
| | | <el-table-column label="设备领用" align="center" prop="needDevReady"> |
| | | <template #default="scope"> |
| | | {{ scope.row.needDevReady === 0 ? "不需要" : "需要" }} |
| | | </template> |
| | | </el-table-column> |
| | | <!-- 需求:库里存的是 0/1,直接渲染会显示数字,这里按中文展示(与上一列「设备领用」写法一致) --> |
| | | <el-table-column label="需要确费" align="center" prop="expenseRecognition"> |
| | | <template #default="scope"> |
| | | {{ scope.row.expenseRecognition === 1 ? "需要" : "不需要" }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="时段预约人数" align="center" prop="timeslotBookNum" /> |
| | | <el-table-column label="时段预留人数" align="center" prop="timeslotReservedNum" /> |
| | | <!-- 排队规则(check_type.seq_rule):库里是 0/1/2,按字典 ecg_seq_rule 显示中文; |
| | | 未配置(null) 时后端按「时段号」处理,这里显式提示,避免出现空白单元格 --> |
| | | <el-table-column label="排队规则" align="center" prop="seqRule"> |
| | | <template #default="scope"> |
| | | <span v-if="scope.row.seqRule === null || scope.row.seqRule === undefined">时段号(默认)</span> |
| | | <dict-tag v-else :type="DICT_TYPE.ECG_SEQ_RULE" :value="scope.row.seqRule" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="序号前缀" align="center" prop="seqPrefix" /> |
| | | <el-table-column label="候诊人数" align="center" prop="readyNum" /> |
| | | <el-table-column label="大屏显示列" align="center" prop="callingColumn" /> |
| | | <!-- <el-table-column label="患者条码" align="center" prop="displayBarcode" /> --> |
| | | <el-table-column label="注意事项" align="center" prop="notes" /> |
| | | <el-table-column label="操作" align="center" min-width="200px" fixed="right"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | @click="openQueueSequenceForm(scope.row)" |
| | | v-hasPermi="['ecg:check-type:update']" |
| | | > |
| | | 预约时段 |
| | | </el-button> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | @click="openForm('update', scope.row.id)" |
| | | v-hasPermi="['ecg:check-type:update']" |
| | | > |
| | | <el-button link type="primary" @click="openForm('update', scope.row.id)" |
| | | v-hasPermi="['ecg:check-type:update']"> |
| | | 编辑 |
| | | </el-button> |
| | | <el-button |
| | | link |
| | | type="danger" |
| | | @click="handleDelete(scope.row.id)" |
| | | v-hasPermi="['ecg:check-type:delete']" |
| | | > |
| | | <el-button link type="primary" @click="openQueueSequenceForm(scope.row)" |
| | | v-hasPermi="['ecg:check-type:update']"> |
| | | 预约时段 |
| | | </el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row.id)" v-hasPermi="['ecg:check-type:delete']"> |
| | | 删除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- 分页 --> |
| | | <Pagination |
| | | :total="total" |
| | | v-model:page="queryParams.pageNo" |
| | | v-model:limit="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | <Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize" |
| | | @pagination="getList" /> |
| | | </ContentWrap> |
| | | |
| | | <!-- 表单弹窗:添加/修改 --> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import {dateFormatter, dateFormatter2} from '@/utils/formatTime' |
| | | import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' |
| | | import download from '@/utils/download' |
| | | import { CheckTypeApi, CheckTypeVO } from '@/api/ecg/checktype' |
| | | import { DICT_TYPE } from '@/utils/dict' |
| | | import CheckTypeForm from './CheckTypeForm.vue' |
| | | import QueueSequenceForm from './QueueSequenceForm.vue' |
| | | import {useCheckTypeStore} from "@/store/modules/checkType"; |
| | | import {getCheckTypeName} from "../../../utils/checkTypeFormatter"; |
| | | import { useCheckTypeStore } from "@/store/modules/checkType"; |
| | | import { getCheckTypeName } from "../../../utils/checkTypeFormatter"; |
| | | |
| | | /** 检查项目 列表 */ |
| | | defineOptions({ name: 'CheckType' }) |
| | | |
| | | const message = useMessage() // 消息弹窗 |
| | | const { t } = useI18n() // 国际化 |
| | | |
| | | const checkTypeStore = useCheckTypeStore(); |
| | | |
| | | const loading = ref(true) // 列表的加载中 |
| | | const list = ref<CheckTypeVO[]>([]) // 列表的数据 |
| | | const total = ref(0) // 列表的总页数 |
| | |
| | | message.success(t('common.delSuccess')) |
| | | // 刷新列表 |
| | | await getList() |
| | | } catch {} |
| | | } catch { } |
| | | } |
| | | |
| | | /** 导出按钮操作 */ |