| | |
| | | :inline="true" |
| | | label-width="100px" |
| | | > |
| | | <el-form-item label="捐献者姓名" prop="donorName"> |
| | | <el-form-item label="捐献者姓名" prop="name"> |
| | | <el-input |
| | | v-model="queryParams.donorName" |
| | | v-model="queryParams.name" |
| | | placeholder="请输入捐献者姓名" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="所在医疗机构" prop="hospitalName"> |
| | | <el-form-item label="所在医疗机构" prop="treatmenthospitalname"> |
| | | <el-input |
| | | v-model="queryParams.hospitalName" |
| | | v-model="queryParams.treatmenthospitalname" |
| | | placeholder="请输入医疗机构" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="医疗组人员" prop="medicalStaff"> |
| | | <el-form-item label="协调员" prop="coordinatorName"> |
| | | <el-input |
| | | v-model="queryParams.medicalStaff" |
| | | placeholder="请输入医疗组人员" |
| | | v-model="queryParams.coordinatorName" |
| | | placeholder="请输入协调员姓名" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="患者状态" prop="patientStatus"> |
| | | <el-form-item label="患者状态" prop="recordstate"> |
| | | <el-select |
| | | v-model="queryParams.patientStatus" |
| | | placeholder="请选择患者状态" |
| | | v-model="queryParams.recordstate" |
| | | placeholder="请选择记录状态" |
| | | clearable |
| | | style="width: 200px" |
| | | > |
| | |
| | | <el-option label="未完成捐献" value="5" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="录入时间" prop="recordTimeRange"> |
| | | <el-form-item label="年龄范围" prop="ageRange"> |
| | | <el-input |
| | | v-model="queryParams.startAge" |
| | | placeholder="最小年龄" |
| | | clearable |
| | | style="width: 95px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | <span style="margin: 0 5px">-</span> |
| | | <el-input |
| | | v-model="queryParams.endAge" |
| | | placeholder="最大年龄" |
| | | clearable |
| | | style="width: 95px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="档案录入时间" prop="recordTimeRange"> |
| | | <el-date-picker |
| | | v-model="queryParams.recordTimeRange" |
| | | type="daterange" |
| | |
| | | <el-card class="tool-card"> |
| | | <el-row :gutter="10"> |
| | | <el-col :span="16"> |
| | | <!-- <el-button type="primary" icon="el-icon-plus" @click="handleCreate" |
| | | >新增维护</el-button |
| | | > --> |
| | | <el-button |
| | | type="success" |
| | | icon="el-icon-edit" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | >修改</el-button |
| | | > |
| | | <el-button |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | >删除</el-button |
| | | > |
| | | <el-button |
| | | type="warning" |
| | | icon="el-icon-download" |
| | |
| | | > |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column |
| | | label="案例编号" |
| | | label="住院号" |
| | | align="center" |
| | | prop="caseNo" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="潜在捐献者姓名" |
| | | label="捐献者编号" |
| | | align="center" |
| | | prop="donorName" |
| | | prop="donorno" |
| | | width="120" |
| | | /> |
| | | <el-table-column label="性别" align="center" prop="gender" width="80"> |
| | | <el-table-column |
| | | label="潜在捐献者姓名" |
| | | align="center" |
| | | prop="name" |
| | | width="120" |
| | | /> |
| | | <el-table-column label="性别" align="center" prop="sex" width="80"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag |
| | | :options="dict.type.sys_user_sex" |
| | | :value="parseInt(scope.row.gender)" |
| | | :value="scope.row.sex" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="年龄" align="center" prop="age" width="80" /> |
| | | <el-table-column |
| | | label="血型" |
| | | align="center" |
| | | prop="bloodtype" |
| | | width="80" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <dict-tag |
| | | :options="dict.type.sys_BloodType" |
| | | :value="scope.row.bloodtype" |
| | | /> </template |
| | | ></el-table-column> |
| | | <el-table-column |
| | | label="疾病诊断" |
| | | align="center" |
| | | prop="diagnosis" |
| | | prop="diagnosisname" |
| | | min-width="180" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="所在医疗机构" |
| | | label="首诊医疗机构" |
| | | align="center" |
| | | prop="hospitalName" |
| | | prop="treatmenthospitalname" |
| | | width="150" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="患者状态" |
| | | label="住院号" |
| | | align="center" |
| | | prop="patientStatus" |
| | | prop="inpatientno" |
| | | width="120" |
| | | /> |
| | | <!-- <el-table-column |
| | | label="记录状态" |
| | | align="center" |
| | | prop="recordstate" |
| | | width="120" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tag :type="statusFilter(scope.row.patientStatus)"> |
| | | {{ statusTextFilter(scope.row.patientStatus) }} |
| | | <el-tag :type="statusFilter(scope.row.recordstate)"> |
| | | {{ statusTextFilter(scope.row.recordstate) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | <el-table-column |
| | | label="入院时间" |
| | | label="协调员" |
| | | align="center" |
| | | prop="admissionTime" |
| | | prop="coordinatorName" |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | label="维护项目" |
| | | align="center" |
| | | prop="itemName" |
| | | width="120" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ |
| | | scope.row.admissionTime |
| | | ? parseTime(scope.row.admissionTime, "{y}-{m}-{d}") |
| | | : "-" |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="出院时间" |
| | | label="维护时间" |
| | | align="center" |
| | | prop="dischargeTime" |
| | | width="120" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ |
| | | scope.row.dischargeTime |
| | | ? parseTime(scope.row.dischargeTime, "{y}-{m}-{d}") |
| | | : "-" |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="最新培养结果" |
| | | align="center" |
| | | prop="latestCultureResult" |
| | | width="120" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tag |
| | | :type="scope.row.latestCultureResult === '阴性' ? 'success' : 'danger'" |
| | | effect="plain" |
| | | > |
| | | {{ scope.row.latestCultureResult || '未检测' }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="护理核查表录入时间" |
| | | align="center" |
| | | prop="lastRecordTime" |
| | | prop="itemTime" |
| | | width="140" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ |
| | | scope.row.lastRecordTime |
| | | ? parseTime(scope.row.lastRecordTime, "{y}-{m}-{d} {h}:{i}") |
| | | scope.row.itemTime |
| | | ? parseTime(scope.row.itemTime, "{y}-{m}-{d} {h}:{i}") |
| | | : "-" |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="协调员" |
| | | align="center" |
| | | prop="coordinator" |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | align="center" |
| | | width="180" |
| | | width="120" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | |
| | | @click.stop="handleView(scope.row)" |
| | | >详情</el-button |
| | | > |
| | | <!-- <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click.stop="handleRecord(scope.row)" |
| | | >录入核查</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-document" |
| | | @click.stop="handleRecordList(scope.row)" |
| | | >记录查询</el-button |
| | | > --> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listMaintenance, delMaintenance, exportMaintenance } from "./mockMaintenanceApi"; |
| | | import { maintainList } from "@/api/businessApi"; |
| | | import Pagination from "@/components/Pagination"; |
| | | |
| | | export default { |
| | | name: "MaintenanceList", |
| | | components: { Pagination }, |
| | | dicts: ["sys_user_sex"], |
| | | dicts: ["sys_user_sex",'sys_BloodType'], |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | donorName: undefined, |
| | | hospitalName: undefined, |
| | | medicalStaff: undefined, |
| | | patientStatus: undefined, |
| | | recordTimeRange: [] |
| | | name: undefined, // 捐献者姓名 |
| | | treatmenthospitalname: undefined, // 医疗机构名称 |
| | | coordinatorName: undefined, // 协调员姓名 |
| | | recordstate: undefined, // 记录状态 |
| | | startAge: undefined, // 开始年龄 |
| | | endAge: undefined, // 结束年龄 |
| | | caseNo: undefined, // 案例编号 |
| | | donorno: undefined, // 捐献者编号 |
| | | sex: undefined, // 性别 |
| | | bloodtype: undefined, // 血型 |
| | | diagnosisname: undefined, // 疾病诊断名称 |
| | | inpatientno: undefined, // 住院号 |
| | | recordTimeRange: [] // 时间范围 |
| | | } |
| | | }; |
| | | }, |
| | |
| | | // 状态过滤器 |
| | | statusFilter(status) { |
| | | const statusMap = { |
| | | "1": "primary", // DCD |
| | | "2": "warning", // DBD |
| | | "3": "info", // DBCD |
| | | "4": "success", // 已完成捐献 |
| | | "5": "danger" // 未完成捐献 |
| | | "1": "primary", // DCD |
| | | "2": "warning", // DBD |
| | | "3": "info", // DBCD |
| | | "4": "success", // 已完成捐献 |
| | | "5": "danger" // 未完成捐献 |
| | | }; |
| | | return statusMap[status] || "info"; |
| | | }, |
| | |
| | | // 查询供者维护列表 |
| | | getList() { |
| | | this.loading = true; |
| | | listMaintenance(this.queryParams) |
| | | |
| | | // 处理查询参数,过滤掉空值 |
| | | const params = this.cleanObject(this.queryParams); |
| | | |
| | | // 处理时间范围参数 |
| | | if (params.recordTimeRange && params.recordTimeRange.length === 2) { |
| | | params.startTime = params.recordTimeRange[0] + " 00:00:00"; |
| | | params.endTime = params.recordTimeRange[1] + " 23:59:59"; |
| | | delete params.recordTimeRange; |
| | | } |
| | | |
| | | // 删除分页参数中的空值 |
| | | delete params.pageNum; |
| | | delete params.pageSize; |
| | | |
| | | maintainList({ |
| | | pageNum: this.queryParams.pageNum, |
| | | pageSize: this.queryParams.pageSize, |
| | | ...params |
| | | }) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.maintenanceList = response.data.rows; |
| | | this.total = response.data.total; |
| | | this.maintenanceList = response.data; |
| | | this.total = response.total || 0; |
| | | |
| | | // 处理年龄显示 |
| | | this.maintenanceList.forEach(item => { |
| | | if (item.startAge !== undefined && item.endAge !== undefined) { |
| | | item.age = `${item.startAge}-${item.endAge}`; |
| | | } else if (item.startAge !== undefined) { |
| | | item.age = `${item.startAge}+`; |
| | | } else if (item.endAge !== undefined) { |
| | | item.age = `0-${item.endAge}`; |
| | | } else { |
| | | item.age = "-"; |
| | | } |
| | | }); |
| | | } else { |
| | | this.$message.error("获取数据失败"); |
| | | this.$message.error(response.msg || "获取数据失败"); |
| | | } |
| | | this.loading = false; |
| | | }) |
| | |
| | | this.$message.error("获取数据失败"); |
| | | }); |
| | | }, |
| | | // 清理对象中的空值 |
| | | cleanObject(obj) { |
| | | const cleaned = {}; |
| | | Object.keys(obj).forEach(key => { |
| | | if (obj[key] !== undefined && obj[key] !== null && obj[key] !== "") { |
| | | cleaned[key] = obj[key]; |
| | | } |
| | | }); |
| | | return cleaned; |
| | | }, |
| | | // 搜索按钮操作 |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | |
| | | }, |
| | | // 重置按钮操作 |
| | | resetQuery() { |
| | | this.$refs.queryForm.resetFields(); |
| | | this.handleQuery(); |
| | | this.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | name: undefined, |
| | | treatmenthospitalname: undefined, |
| | | coordinatorName: undefined, |
| | | recordstate: undefined, |
| | | startAge: undefined, |
| | | endAge: undefined, |
| | | caseNo: undefined, |
| | | donorno: undefined, |
| | | sex: undefined, |
| | | bloodtype: undefined, |
| | | diagnosisname: undefined, |
| | | inpatientno: undefined, |
| | | recordTimeRange: [] |
| | | }; |
| | | this.$nextTick(() => { |
| | | this.getList(); |
| | | }); |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | |
| | | handleRowClick(row) { |
| | | this.$router.push({ |
| | | path: "/case/maintainInfo", |
| | | query: { id: row.id } |
| | | query: { id: row.id, infoid: row.infoid } |
| | | }); |
| | | }, |
| | | // 查看详情 |
| | | handleView(row) { |
| | | this.$router.push({ |
| | | path: "/case/maintainInfo", |
| | | query: { id: row.id } |
| | | query: { id: row.id, infoid: row.infoid } |
| | | }); |
| | | }, |
| | | // 录入护理核查 |
| | | handleRecord(row) { |
| | | this.$router.push({ |
| | | path: "/case/maintenance/record", |
| | | query: { id: row.id, maintenanceId: row.maintenanceId } |
| | | }); |
| | | }, |
| | | // 查看记录列表 |
| | | handleRecordList(row) { |
| | | this.$router.push({ |
| | | path: "/case/maintenance/records", |
| | | query: { id: row.id, maintenanceId: row.maintenanceId } |
| | | }); |
| | | }, |
| | | // 新增按钮操作 |
| | | handleCreate() { |
| | | this.$router.push("/case/maintenance/add"); |
| | | }, |
| | | // 修改按钮操作 |
| | | handleUpdate() { |
| | | const id = this.ids[0]; |
| | | this.$router.push({ |
| | | path: "/case/maintenance/edit", |
| | | query: { id: id } |
| | | }); |
| | | }, |
| | | // 删除按钮操作 |
| | | handleDelete() { |
| | | const ids = this.ids; |
| | | this.$confirm("是否确认删除选中的数据项?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return delMaintenance(ids); |
| | | }) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功"); |
| | | this.getList(); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | // 导出按钮操作 |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | const queryParams = this.cleanObject(this.queryParams); |
| | | |
| | | this.$confirm("是否确认导出所有维护数据?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | |
| | | }) |
| | | .then(() => { |
| | | this.loading = true; |
| | | return exportMaintenance(queryParams); |
| | | }) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | // 这里需要调用导出接口,暂时用模拟成功 |
| | | setTimeout(() => { |
| | | this.$message.success("导出成功"); |
| | | } |
| | | this.loading = false; |
| | | this.loading = false; |
| | | }, 1000); |
| | | }) |
| | | .catch(() => { |
| | | this.loading = false; |
| | |
| | | const date = new Date(time); |
| | | if (pattern) { |
| | | return pattern.replace(/{(\w+)}/g, (match, p) => { |
| | | switch(p) { |
| | | case 'y': return date.getFullYear(); |
| | | case 'm': return (date.getMonth() + 1).toString().padStart(2, '0'); |
| | | case 'd': return date.getDate().toString().padStart(2, '0'); |
| | | case 'h': return date.getHours().toString().padStart(2, '0'); |
| | | case 'i': return date.getMinutes().toString().padStart(2, '0'); |
| | | default: return match; |
| | | switch (p) { |
| | | case "y": |
| | | return date.getFullYear(); |
| | | case "m": |
| | | return (date.getMonth() + 1).toString().padStart(2, "0"); |
| | | case "d": |
| | | return date |
| | | .getDate() |
| | | .toString() |
| | | .padStart(2, "0"); |
| | | case "h": |
| | | return date |
| | | .getHours() |
| | | .toString() |
| | | .padStart(2, "0"); |
| | | case "i": |
| | | return date |
| | | .getMinutes() |
| | | .toString() |
| | | .padStart(2, "0"); |
| | | default: |
| | | return match; |
| | | } |
| | | }); |
| | | } |
| | | return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, "0")}-${date.getDate().toString().padStart(2, "0")}`; |
| | | return `${date.getFullYear()}-${(date.getMonth() + 1) |
| | | .toString() |
| | | .padStart(2, "0")}-${date |
| | | .getDate() |
| | | .toString() |
| | | .padStart(2, "0")}`; |
| | | } |
| | | } |
| | | }; |