| | |
| | | <div class="app-container"> |
| | | <!-- 搜索筛选区域 --> |
| | | <el-card class="filter-card"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | class="demo-form-inline" |
| | | > |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" class="demo-form-inline"> |
| | | <el-form-item label="姓名" prop="name"> |
| | | <el-input |
| | | v-model="queryParams.name" |
| | | placeholder="请输入患者姓名" |
| | | clearable |
| | | style="width: 200px" |
| | | /> |
| | | <el-input v-model="queryParams.name" placeholder="请输入患者姓名" clearable style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="上报医院" prop="caseNo"> |
| | | <el-input |
| | | v-model="queryParams.caseNo" |
| | | placeholder="请输入上报案例编号" |
| | | clearable |
| | | style="width: 200px" |
| | | /> |
| | | <el-input v-model="queryParams.caseNo" placeholder="请输入上报案例编号" clearable style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="上报状态" prop="reportStatus"> |
| | | <el-select |
| | | v-model="queryParams.reportStatus" |
| | | placeholder="请选择状态" |
| | | clearable |
| | | style="width: 200px" |
| | | > |
| | | <el-select v-model="queryParams.reportStatus" placeholder="请选择状态" clearable style="width: 200px"> |
| | | <el-option label="全部" value="" /> |
| | | <el-option label="已阅读" value="2" /> |
| | | <el-option label="已同意" value="3" /> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" @click="handleQuery" |
| | | >搜索</el-button |
| | | > |
| | | <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> |
| | | <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | | |
| | | <!-- 操作按钮区域 --> |
| | | <!-- 操作按钮区域 - 修改删除按钮的禁用条件 --> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | >删除</el-button |
| | | > |
| | | <el-button type="danger" plain icon="el-icon-delete" :disabled="multiple || hasApprovedSelected()" |
| | | @click="handleDelete"> |
| | | 删除 |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- 数据表格 --> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="caseList" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table v-loading="loading" :data="caseList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | |
| | | <el-table-column |
| | | label="编号" |
| | | align="center" |
| | | prop="caseNo" |
| | | width="150" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | label="姓名" |
| | | align="center" |
| | | prop="name" |
| | | width="100" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | label="上报状态" |
| | | align="center" |
| | | prop="reportStatus" |
| | | width="100" |
| | | > |
| | | <el-table-column label="编号" align="center" prop="caseNo" width="150" fixed /> |
| | | <el-table-column label="姓名" align="center" prop="name" width="100" fixed /> |
| | | <el-table-column label="上报状态" align="center" prop="reportStatus" width="100"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.reportStatus | statusFilter"> |
| | | {{ scope.row.reportStatus | statusTextFilter }} |
| | |
| | | <el-table-column label="年龄" align="center" prop="age" width="80" /> |
| | | <el-table-column label="血型" align="center" prop="bloodType" width="80"> |
| | | <template #default="scope"> |
| | | <dict-tag |
| | | :options="dict.type.sys_BloodType" |
| | | :value="scope.row.bloodType" |
| | | /> |
| | | <dict-tag :options="dict.type.sys_BloodType" :value="scope.row.bloodType" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="疾病诊断" |
| | | align="center" |
| | | prop="diagnosisname" |
| | | min-width="200" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="GCS评分" |
| | | align="center" |
| | | prop="gcsScore" |
| | | width="80" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="上报医院" |
| | | align="center" |
| | | prop="treatmenthospitalname" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | label="上报时间" |
| | | align="center" |
| | | prop="reporttime" |
| | | width="160" |
| | | /> |
| | | <el-table-column label="疾病诊断" align="center" prop="diagnosisname" min-width="200" show-overflow-tooltip /> |
| | | <el-table-column label="GCS评分" align="center" prop="gcsScore" width="80" show-overflow-tooltip /> |
| | | <el-table-column label="上报医院" align="center" prop="treatmenthospitalname" width="150" /> |
| | | <el-table-column label="上报时间" align="center" prop="reporttime" width="160" /> |
| | | <el-table-column label="操作" align="center" fixed="right" width="300"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-view" |
| | | @click="handleDetail(scope.row)" |
| | | >详情</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleEdit(scope.row)" |
| | | v-if=" |
| | | scope.row.reportStatus !== '3' && |
| | | scope.row.reportStatus !== '4' && |
| | | scope.row.delFlag == 0 |
| | | " |
| | | >编辑</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-check" |
| | | @click="handleApprove(scope.row)" |
| | | v-if="scope.row.reportStatus == '2' && scope.row.delFlag == 0" |
| | | >确认</el-button |
| | | > |
| | | <el-button size="mini" type="text" icon="el-icon-view" @click="handleDetail(scope.row)">详情</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-check" @click="handleApprove(scope.row)" |
| | | v-if="scope.row.reportStatus == '2' && scope.row.delFlag == 0">确认</el-button> |
| | | <!-- 移除转运按钮 --> |
| | | <el-button |
| | | v-if="scope.row.serviceTransport.length" |
| | | size="mini" |
| | | type="primary" |
| | | @click="goToTransportDetail(scope.row.name)" |
| | | >查看转运单</el-button |
| | | > |
| | | <el-button |
| | | v-if=" |
| | | scope.row.reportStatus == 3 && |
| | | !scope.row.serviceTransport.length && |
| | | scope.row.isTransport == 2 |
| | | " |
| | | size="mini" |
| | | type="success" |
| | | @click="Createatransferorder(scope.row)" |
| | | >创建转运单</el-button |
| | | > |
| | | <el-button v-if="scope.row.serviceTransport.length" size="mini" type="primary" |
| | | @click="goToTransportDetail(scope.row.name)">查看转运单</el-button> |
| | | <el-button v-if=" |
| | | scope.row.reportStatus == 3 && |
| | | !scope.row.serviceTransport.length && |
| | | scope.row.isTransport == 2 |
| | | " size="mini" type="success" @click="Createatransferorder(scope.row)">创建转运单</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <!-- 分页 --> |
| | | <pagination |
| | | v-show="total > 0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" /> |
| | | |
| | | <!-- 案例详情弹框 --> |
| | | <el-dialog |
| | | :title="detailTitle" |
| | | :visible.sync="detailOpen" |
| | | width="900px" |
| | | append-to-body |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-dialog :title="detailTitle" :visible.sync="detailOpen" width="900px" append-to-body |
| | | :close-on-click-modal="false"> |
| | | <case-detail :caseData="currentCase" @close="detailOpen = false" /> |
| | | </el-dialog> |
| | | |
| | | <!-- 确认弹框 --> |
| | | <el-dialog |
| | | title="案例确认" |
| | | :visible.sync="approveOpen" |
| | | width="80vw" |
| | | append-to-body |
| | | class="approve-dialog" |
| | | > |
| | | <el-dialog title="案例确认" :visible.sync="approveOpen" width="80vw" append-to-body class="approve-dialog"> |
| | | <!-- 使用 div 布局替代 el-container --> |
| | | <div class="approve-dialog-content"> |
| | | <!-- 左侧:案例详情 --> |
| | |
| | | |
| | | <!-- 右侧:确认表单 --> |
| | | <div class="approve-form-right"> |
| | | <el-form |
| | | ref="approveForm" |
| | | :model="approveForm" |
| | | :rules="approveRules" |
| | | label-width="100px" |
| | | > |
| | | <el-form ref="approveForm" :model="approveForm" :rules="approveRules" label-width="100px"> |
| | | <el-form-item label="确认结果" prop="approveResult"> |
| | | <el-radio-group |
| | | v-model="approveForm.approveResult" |
| | | @change="handleApproveResultChange" |
| | | > |
| | | <el-radio-group v-model="approveForm.approveResult" @change="handleApproveResultChange"> |
| | | <el-radio label="3">同意</el-radio> |
| | | <el-radio label="4">驳回</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | |
| | | <!-- 当选择"同意"时显示转运选项 --> |
| | | <el-form-item |
| | | v-if="approveForm.approveResult == '3'" |
| | | label="是否需要转运" |
| | | prop="isTransport" |
| | | > |
| | | <el-form-item v-if="approveForm.approveResult == '3'" label="是否需要转运" prop="isTransport"> |
| | | <el-radio-group v-model="approveForm.isTransport"> |
| | | <el-radio label="1">不需要</el-radio> |
| | | <el-radio label="2">需要</el-radio> |
| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="驳回意见" prop="confirmResult"> |
| | | <el-input |
| | | type="textarea" |
| | | v-model="approveForm.confirmResult" |
| | | placeholder="请输入详细的驳回意见" |
| | | :rows="6" |
| | | maxlength="500" |
| | | show-word-limit |
| | | /> |
| | | <el-input type="textarea" v-model="approveForm.confirmResult" placeholder="请输入详细的驳回意见" :rows="6" |
| | | maxlength="500" show-word-limit /> |
| | | </el-form-item> |
| | | </div> |
| | | |
| | | <!-- 当选择"同意"时显示确认意见 --> |
| | | <el-form-item |
| | | v-if="approveForm.approveResult == '3'" |
| | | label="确认意见" |
| | | prop="confirmResult" |
| | | > |
| | | <el-input |
| | | type="textarea" |
| | | v-model="approveForm.confirmResult" |
| | | placeholder="请输入确认意见" |
| | | :rows="6" |
| | | maxlength="500" |
| | | show-word-limit |
| | | /> |
| | | <el-form-item v-if="approveForm.approveResult == '3'" label="确认意见" prop="confirmResult"> |
| | | <el-input type="textarea" v-model="approveForm.confirmResult" placeholder="请输入确认意见" :rows="6" |
| | | maxlength="500" show-word-limit /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | </el-dialog> |
| | | |
| | | <!-- 新增/编辑案例弹框 --> |
| | | <el-dialog |
| | | :title="`${isEditing ? '编辑' : '新增'}案例`" |
| | | :visible.sync="editOpen" |
| | | width="68%" |
| | | append-to-body |
| | | :close-on-click-modal="false" |
| | | @close="handleEditClose" |
| | | > |
| | | <el-form |
| | | ref="editForm" |
| | | :model="editForm" |
| | | :rules="editRules" |
| | | label-width="120px" |
| | | > |
| | | <el-dialog :title="`${isEditing ? '编辑' : '新增'}案例`" :visible.sync="editOpen" width="68%" append-to-body |
| | | :close-on-click-modal="false" @close="handleEditClose"> |
| | | <el-form ref="editForm" :model="editForm" :rules="editRules" label-width="120px"> |
| | | <!-- 基本信息 --> |
| | | <el-card class="form-section" shadow="never"> |
| | | <div slot="header" class="section-header"> |
| | | <i |
| | | class="el-icon-user" |
| | | style="color: #409EFF; margin-right: 8px;" |
| | | ></i> |
| | | <i class="el-icon-user" style="color: #409EFF; margin-right: 8px;"></i> |
| | | <span>基本信息</span> |
| | | </div> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="案例编号" prop="caseNo"> |
| | | <el-input |
| | | v-model="editForm.caseNo" |
| | | placeholder="请输入案例编号" |
| | | /> |
| | | <el-input v-model="editForm.caseNo" placeholder="请输入案例编号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="患者姓名" prop="name"> |
| | | <el-input |
| | | v-model="editForm.name" |
| | | placeholder="请输入患者姓名" |
| | | /> |
| | | <el-input v-model="editForm.name" placeholder="请输入患者姓名" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="性别" prop="sex"> |
| | | <el-select |
| | | v-model="editForm.sex" |
| | | placeholder="请选择性别" |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="男" value="0" /> |
| | | <el-option label="女" value="1" /> |
| | | <el-select v-model="editForm.sex" placeholder="请选择性别" style="width: 100%"> |
| | | <el-option label="男" value="1" /> |
| | | <el-option label="女" value="2" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="年龄" prop="age"> |
| | | <el-input-number |
| | | v-model="editForm.age" |
| | | :min="0" |
| | | :max="120" |
| | | placeholder="请输入年龄" |
| | | style="width: 100%" |
| | | /> |
| | | <el-input-number v-model="editForm.age" :min="0" :max="120" placeholder="请输入年龄" style="width: 100%" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="年龄单位" prop="ageunit"> |
| | | <el-select |
| | | v-model="editForm.ageunit" |
| | | placeholder="请选择年龄单位" |
| | | style="width: 100%" |
| | | > |
| | | <el-select v-model="editForm.ageunit" placeholder="请选择年龄单位" style="width: 100%"> |
| | | <el-option label="岁" value="year" /> |
| | | <el-option label="月" value="month" /> |
| | | <el-option label="天" value="day" /> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="血型" prop="bloodType"> |
| | | <el-select |
| | | v-model="editForm.bloodType" |
| | | placeholder="请选择血型" |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="A型" :value="1" /> |
| | | <el-option label="B型" :value="2" /> |
| | | <el-option label="O型" :value="3" /> |
| | | <el-option label="AB型" :value="4" /> |
| | | <el-select v-model="editForm.bloodType" placeholder="请选择血型" style="width: 100%"> |
| | | <el-option label="A型" :value="'A型'" /> |
| | | <el-option label="B型" :value="'B型'" /> |
| | | <el-option label="O型" :value="'O型'" /> |
| | | <el-option label="AB型" :value="'AB型'" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="出生日期" prop="birthday"> |
| | | <el-date-picker |
| | | v-model="editForm.birthday" |
| | | type="date" |
| | | placeholder="选择出生日期" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 100%" |
| | | /> |
| | | <el-date-picker v-model="editForm.birthday" type="date" placeholder="选择出生日期" value-format="yyyy-MM-dd" |
| | | style="width: 100%" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="证件类型" prop="idcardtype"> |
| | | <el-select |
| | | v-model="editForm.idcardtype" |
| | | placeholder="请选择证件类型" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in dict.type.sys_IDType" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | <el-select v-model="editForm.idcardtype" placeholder="请选择证件类型" style="width: 100%"> |
| | | <el-option v-for="item in dict.type.sys_IDType" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="证件号码" prop="idcardno"> |
| | | <el-input |
| | | v-model="editForm.idcardno" |
| | | placeholder="请输入证件号码" |
| | | /> |
| | | <el-input v-model="editForm.idcardno" placeholder="请输入证件号码" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="国籍" prop="nationality"> |
| | | <el-input |
| | | v-model="editForm.nationality" |
| | | placeholder="请输入国籍" |
| | | /> |
| | | <el-input v-model="editForm.nationality" placeholder="请输入国籍" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="籍贯" prop="nativeplace"> |
| | | <el-input |
| | | v-model="editForm.nativeplace" |
| | | placeholder="请输入籍贯" |
| | | /> |
| | | <el-input v-model="editForm.nativeplace" placeholder="请输入籍贯" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="学历" prop="education"> |
| | | <el-input |
| | | v-model="editForm.education" |
| | | placeholder="请输入学历" |
| | | /> |
| | | <!-- <el-input v-model="editForm.education" placeholder="请输入学历" /> --> |
| | | <el-select v-model="editForm.education" placeholder="请选择学历类型" style="width: 100%"> |
| | | <el-option v-for="item in dict.type.sys_education" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="职业" prop="occupation"> |
| | | <el-input |
| | | v-model="editForm.occupation" |
| | | placeholder="请输入职业" |
| | | /> |
| | | <!-- <el-input v-model="editForm.occupation" placeholder="请输入职业" /> --> |
| | | <el-select v-model="editForm.occupation" placeholder="请选择职业类型" style="width: 100%"> |
| | | <el-option v-for="item in dict.type.sys_occupation" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系电话" prop="phone"> |
| | | <el-input |
| | | v-model="editForm.phone" |
| | | placeholder="请输入联系电话" |
| | | /> |
| | | <el-input v-model="editForm.phone" placeholder="请输入联系电话" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <!-- 地址信息 --> |
| | | <el-card class="form-section" shadow="never"> |
| | | <div slot="header" class="section-header"> |
| | | <i |
| | | class="el-icon-location-information" |
| | | style="color: #67C23A; margin-right: 8px;" |
| | | ></i> |
| | | <i class="el-icon-location-information" style="color: #67C23A; margin-right: 8px;"></i> |
| | | <span>地址信息</span> |
| | | </div> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="户籍地址省"> |
| | | <el-input |
| | | v-model="editForm.registerprovincename" |
| | | placeholder="请输入户籍地址省" |
| | | /> |
| | | <el-form-item label="现住地址" prop="residenceaddress"> |
| | | <li-area-select ref="residenceSelect" v-model="residenceAddress" |
| | | @change="handleResidenceAddressChange" /> |
| | | <el-input v-model="editForm.residenceaddress" placeholder="请输入详细地址" style="margin-top: 8px" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="户籍地址市"> |
| | | <el-input |
| | | v-model="editForm.registercityname" |
| | | placeholder="请输入户籍地址市" |
| | | /> |
| | | <el-form-item label="户籍地址" prop="registeraddress"> |
| | | <li-area-select ref="registerSelect" v-model="registerAddress" @change="handleRegisterAddressChange" /> |
| | | <el-input v-model="editForm.registeraddress" placeholder="请输入详细地址" style="margin-top: 8px" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="户籍街道"> |
| | | <el-input |
| | | v-model="editForm.registertownname" |
| | | placeholder="请输入户籍街道" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="户籍社区"> |
| | | <el-input |
| | | v-model="editForm.registercommunityname" |
| | | placeholder="请输入户籍社区" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-form-item label="户籍详细地址" prop="registeraddress"> |
| | | <el-input |
| | | v-model="editForm.registeraddress" |
| | | type="textarea" |
| | | :rows="2" |
| | | placeholder="请输入详细的户籍地址" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-divider>现住地址</el-divider> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="现住地址省"> |
| | | <el-input |
| | | v-model="editForm.residenceprovincename" |
| | | placeholder="请输入现住地址省" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="现住地址市/区"> |
| | | <el-input |
| | | v-model="editForm.residencecountyname" |
| | | placeholder="请输入现住地址市/区" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="现住地址街道"> |
| | | <el-input |
| | | v-model="editForm.residencetownname" |
| | | placeholder="请输入现住地址街道" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="现住地址社区"> |
| | | <el-input |
| | | v-model="editForm.residencecommunityname" |
| | | placeholder="请输入现住地址社区" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-form-item label="现住详细地址" prop="residenceaddress"> |
| | | <el-input |
| | | v-model="editForm.residenceaddress" |
| | | type="textarea" |
| | | :rows="2" |
| | | placeholder="请输入详细的现住地址" |
| | | /> |
| | | </el-form-item> |
| | | </el-card> |
| | | |
| | | <!-- 医疗信息 --> |
| | | <el-card class="form-section" shadow="never"> |
| | | <div slot="header" class="section-header"> |
| | | <i |
| | | class="el-icon-first-aid-kit" |
| | | style="color: #E6A23C; margin-right: 8px;" |
| | | ></i> |
| | | <i class="el-icon-first-aid-kit" style="color: #E6A23C; margin-right: 8px;"></i> |
| | | <span>医疗信息</span> |
| | | </div> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="疾病诊断" prop="diagnosisname"> |
| | | <el-input |
| | | v-model="editForm.diagnosisname" |
| | | placeholder="请输入疾病诊断名称" |
| | | /> |
| | | <el-input v-model="editForm.diagnosisname" placeholder="请输入疾病诊断名称" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="GCS评分" prop="gcsScore"> |
| | | <el-input |
| | | v-model="editForm.gcsScore" |
| | | placeholder="请输入GCS评分" |
| | | /> |
| | | <el-input v-model="editForm.gcsScore" placeholder="请输入GCS评分" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-form-item label="病情概况" prop="illnessoverview"> |
| | | <el-input |
| | | v-model="editForm.illnessoverview" |
| | | type="textarea" |
| | | :rows="3" |
| | | placeholder="请输入病情概况" |
| | | maxlength="500" |
| | | show-word-limit |
| | | /> |
| | | <el-input v-model="editForm.illnessoverview" type="textarea" :rows="3" placeholder="请输入病情概况" maxlength="500" |
| | | show-word-limit /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="病人状况" prop="patientstate"> |
| | | <el-input |
| | | v-model="editForm.patientstate" |
| | | type="textarea" |
| | | :rows="2" |
| | | placeholder="请输入病人状况" |
| | | maxlength="200" |
| | | show-word-limit |
| | | /> |
| | | <el-input v-model="editForm.patientstate" type="textarea" :rows="2" placeholder="请输入病人状况" maxlength="200" |
| | | show-word-limit /> |
| | | </el-form-item> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="传染病情况" prop="infectious"> |
| | | <el-checkbox-group v-model="editForm.infectious"> |
| | | <el-checkbox |
| | | v-for="item in dict.type.sys_Infectious" |
| | | :label="item.value" |
| | | :value="item.value" |
| | | >{{ item.label }}</el-checkbox |
| | | > |
| | | <el-checkbox v-for="item in dict.type.sys_Infectious" :label="item.value" :value="item.value">{{ |
| | | item.label }}</el-checkbox> |
| | | </el-checkbox-group> |
| | | <!-- <el-input |
| | | v-model="editForm.infectious" |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="传染病其他说明"> |
| | | <el-input |
| | | v-model="editForm.infectiousOther" |
| | | placeholder="请输入传染病其他说明" |
| | | /> |
| | | <el-input v-model="editForm.infectiousOther" placeholder="请输入传染病其他说明" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <!-- 医院信息 --> |
| | | <el-card class="form-section" shadow="never"> |
| | | <div slot="header" class="section-header"> |
| | | <i |
| | | class="el-icon-office-building" |
| | | style="color: #909399; margin-right: 8px;" |
| | | ></i> |
| | | <i class="el-icon-office-building" style="color: #909399; margin-right: 8px;"></i> |
| | | <span>医院信息</span> |
| | | </div> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ICU评估医生" prop="icuDoctor"> |
| | | <el-input |
| | | v-model="editForm.icuDoctor" |
| | | placeholder="请输入ICU评估医生" |
| | | /> |
| | | <el-input v-model="editForm.icuDoctor" placeholder="请输入ICU评估医生" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ICU医生电话" prop="icuDoctorPhone"> |
| | | <el-input |
| | | v-model="editForm.icuDoctorPhone" |
| | | placeholder="请输入ICU医生手机号" |
| | | /> |
| | | <el-input v-model="editForm.icuDoctorPhone" placeholder="请输入ICU医生手机号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="治疗医院" prop="treatmenthospitalname"> |
| | | <el-input |
| | | v-model="editForm.treatmenthospitalname" |
| | | placeholder="请输入治疗医院名称" |
| | | /> |
| | | <el-input v-model="editForm.treatmenthospitalname" placeholder="请输入治疗医院名称" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="治疗科室" prop="treatmentdeptname"> |
| | | <el-input |
| | | v-model="editForm.treatmentdeptname" |
| | | placeholder="请输入治疗科室名称" |
| | | /> |
| | | <el-input v-model="editForm.treatmentdeptname" placeholder="请输入治疗科室名称" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="住院号" prop="inpatientno"> |
| | | <el-input |
| | | v-model="editForm.inpatientno" |
| | | placeholder="请输入住院号" |
| | | /> |
| | | <el-input v-model="editForm.inpatientno" placeholder="请输入住院号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="部门名称" prop="deptName"> |
| | | <el-input |
| | | v-model="editForm.deptName" |
| | | placeholder="请输入部门名称" |
| | | /> |
| | | <el-input v-model="editForm.deptName" placeholder="请输入部门名称" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="部门编号" prop="deptNo"> |
| | | <el-input |
| | | v-model="editForm.deptNo" |
| | | placeholder="请输入部门编号" |
| | | /> |
| | | <el-input v-model="editForm.deptNo" placeholder="请输入部门编号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="上报医院" prop="toHospital"> |
| | | <el-input |
| | | v-model="editForm.toHospital" |
| | | placeholder="请输入上报的医院" |
| | | /> |
| | | <el-input v-model="editForm.toHospital" placeholder="请输入上报的医院" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <!-- 上报信息 --> |
| | | <el-card class="form-section" shadow="never"> |
| | | <div slot="header" class="section-header"> |
| | | <i |
| | | class="el-icon-s-data" |
| | | style="color: #F56C6C; margin-right: 8px;" |
| | | ></i> |
| | | <i class="el-icon-s-data" style="color: #F56C6C; margin-right: 8px;"></i> |
| | | <span>上报信息</span> |
| | | </div> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="报告者姓名" prop="infoName"> |
| | | <el-input |
| | | v-model="editForm.infoName" |
| | | placeholder="请输入报告者姓名" |
| | | /> |
| | | <el-input v-model="editForm.infoName" placeholder="请输入报告者姓名" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="报告者电话" prop="reporterphone"> |
| | | <el-input |
| | | v-model="editForm.phone" |
| | | placeholder="请输入报告者联系电话" |
| | | /> |
| | | <el-input v-model="editForm.phone" placeholder="请输入报告者联系电话" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="协调员姓名" prop="coordinatorName"> |
| | | <el-input |
| | | v-model="editForm.coordinatorName" |
| | | placeholder="请输入协调员姓名" |
| | | /> |
| | | <el-input v-model="editForm.coordinatorName" placeholder="请输入协调员姓名" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <!-- <el-col :span="12"> |
| | | <el-form-item label="协调员编号" prop="coordinatorNo"> |
| | | <el-input |
| | | v-model="editForm.coordinatorNo" |
| | | placeholder="请输入协调员编号" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | </el-row> |
| | | |
| | | <el-form-item label="上报状态" prop="reportStatus"> |
| | | <el-select |
| | | v-model="editForm.reportStatus" |
| | | placeholder="请选择上报状态" |
| | | style="width: 100%" |
| | | :disabled="isEditing" |
| | | > |
| | | <el-select v-model="editForm.reportStatus" placeholder="请选择上报状态" style="width: 100%" :disabled="isEditing"> |
| | | <el-option label="已上报" value="1" /> |
| | | <el-option label="已阅读" value="2" /> |
| | | <el-option label="已同意" value="3" /> |
| | |
| | | </el-card> |
| | | |
| | | <!-- 附件信息 --> |
| | | <el-card class="form-section" shadow="never"> |
| | | <div slot="header" class="section-header"> |
| | | <i |
| | | class="el-icon-folder" |
| | | style="color: #409EFF; margin-right: 8px;" |
| | | ></i> |
| | | <span>附件信息</span> |
| | | </div> |
| | | <el-card class="form-section" shadow="never"> |
| | | <div slot="header" class="section-header"> |
| | | <i class="el-icon-folder" style="color: #409EFF; margin-right: 8px;"></i> |
| | | <span>附件信息</span> |
| | | </div> |
| | | |
| | | <div class="attachment-section"> |
| | | <div class="attachment-header"> |
| | | <i class="el-icon-paperclip"></i> |
| | | <span class="attachment-title">附件上传</span> |
| | | <span class="attachment-tip" |
| | | >支持上传病历、检验报告等文件 (最多{{ |
| | | attachmentLimit |
| | | }}个)</span |
| | | <!-- 上传组件(直接放置,无分类选择) --> |
| | | <div class="upload-wrapper"> |
| | | <UploadAttachment |
| | | ref="uploadAttachment" |
| | | :file-list="attachmentFileList" |
| | | :limit="attachmentLimit" |
| | | :accept="attachmentAccept" |
| | | @change="handleAttachmentChange" |
| | | @upload-success="handleUploadSuccess" |
| | | @upload-error="handleUploadError" |
| | | @remove="handleAttachmentRemove" |
| | | /> |
| | | <div style="font-size:12px; color:#909399; margin-top:4px;"> |
| | | 当前上传分类:<el-tag size="small" type="info">{{ activeTab === '未分类' ? '未分类' : activeTab }}</el-tag> |
| | | (切换 Tab 可改变上传分类) |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 附件列表 - 分类Tab展示,支持修改分类 --> |
| | | <div class="attachment-list" v-if="editForm.annexfilesList && editForm.annexfilesList.length > 0"> |
| | | <el-tabs v-model="activeTab" type="border-card"> |
| | | <el-tab-pane |
| | | v-for="category in categories" |
| | | :key="category" |
| | | :label="category + '(' + getCategoryCount(category) + ')'" |
| | | :name="category" |
| | | > |
| | | <el-table :data="getCategoryFiles(category)" style="width: 100%" size="small" border> |
| | | <el-table-column label="文件名" min-width="180"> |
| | | <template #default="scope"> |
| | | <i class="el-icon-document" style="margin-right: 8px; color: #409EFF;"></i> |
| | | <span class="file-name">{{ scope.row.fileName }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- 可编辑分类下拉 --> |
| | | <el-table-column label="分类" width="150"> |
| | | <template #default="scope"> |
| | | <el-select |
| | | v-model="scope.row.fileType" |
| | | size="small" |
| | | @change="updateAttachmentCategory(scope.row, $event)" |
| | | placeholder="选择分类" |
| | | > |
| | | </div> |
| | | |
| | | <!-- 使用 UploadAttachment 组件 --> |
| | | <UploadAttachment |
| | | ref="uploadAttachment" |
| | | :file-list="attachmentFileList" |
| | | :limit="attachmentLimit" |
| | | :accept="attachmentAccept" |
| | | @change="handleAttachmentChange" |
| | | @upload-success="handleUploadSuccess" |
| | | @upload-error="handleUploadError" |
| | | @remove="handleAttachmentRemove" |
| | | /> |
| | | </div> |
| | | |
| | | <!-- 附件列表 --> |
| | | <div |
| | | class="attachment-list" |
| | | v-if="editForm.annexfilesList && editForm.annexfilesList.length > 0" |
| | | > |
| | | <div class="list-title"> |
| | | 已上传附件 ({{ editForm.annexfilesList.length }}) |
| | | </div> |
| | | <el-table |
| | | :data="editForm.annexfilesList" |
| | | style="width: 100%" |
| | | size="small" |
| | | border |
| | | > |
| | | <el-table-column label="文件名" min-width="200"> |
| | | <template #default="scope"> |
| | | <i |
| | | class="el-icon-document" |
| | | style="margin-right: 8px; color: #409EFF;" |
| | | ></i> |
| | | <span class="file-name">{{ scope.row.fileName }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="文件类型" width="100"> |
| | | <template #default="scope"> |
| | | <el-tag size="small">{{ |
| | | getFileType(scope.row.fileName) |
| | | }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="创建时间" width="160"> |
| | | <template #default="scope"> |
| | | <span>{{ formatDateTime(scope.row.createTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="备注" |
| | | min-width="150" |
| | | show-overflow-tooltip |
| | | > |
| | | <template #default="scope"> |
| | | <span>{{ scope.row.remart || "无" }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="200" fixed="right"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="primary" |
| | | @click="handlePreview(scope.row)" |
| | | > |
| | | 预览 |
| | | </el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="danger" |
| | | @click="handleRemoveAttachment(scope.$index)" |
| | | > |
| | | 删除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | <el-option label="登记表附件" value="登记表附件" /> |
| | | <el-option label="证件照" value="证件照" /> |
| | | <el-option label="疾病诊断治疗" value="疾病诊断治疗" /> |
| | | <el-option label="未分类" value="" /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="文件类型" width="100"> |
| | | <template #default="scope"> |
| | | <el-tag size="small">{{ getFileType(scope.row.fileName) }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="创建时间" width="160"> |
| | | <template #default="scope"> |
| | | <span>{{ formatDateTime(scope.row.createTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="备注" min-width="130" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <span>{{ scope.row.remart || "无" }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="180" fixed="right"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="primary" @click="handlePreview(scope.row)">预览</el-button> |
| | | <el-button size="mini" type="danger" @click="handleRemoveAttachmentByFile(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </el-card> |
| | | |
| | | <!-- 备注信息 --> |
| | | <el-card class="form-section" shadow="never"> |
| | | <div slot="header" class="section-header"> |
| | | <i |
| | | class="el-icon-edit" |
| | | style="color: #67C23A; margin-right: 8px;" |
| | | ></i> |
| | | <i class="el-icon-edit" style="color: #67C23A; margin-right: 8px;"></i> |
| | | <span>备注信息</span> |
| | | </div> |
| | | <el-form-item prop="remark"> |
| | | <el-input |
| | | v-model="editForm.remark" |
| | | type="textarea" |
| | | :rows="4" |
| | | placeholder="请输入备注信息" |
| | | maxlength="500" |
| | | show-word-limit |
| | | /> |
| | | <el-input v-model="editForm.remark" type="textarea" :rows="4" placeholder="请输入备注信息" maxlength="500" |
| | | show-word-limit /> |
| | | </el-form-item> |
| | | </el-card> |
| | | </el-form> |
| | | |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleEditClose">取消</el-button> |
| | | <el-button type="primary" :loading="saveLoading" @click="handleSave" |
| | | >保存</el-button |
| | | > |
| | | <el-button type="primary" :loading="saveLoading" @click="handleSave">保存</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 文件预览弹窗 --> |
| | | <FilePreviewDialog |
| | | :visible="previewVisible" |
| | | :file="currentPreviewFile" |
| | | @close="previewVisible = false" |
| | | @download="handleDownload" |
| | | /> |
| | | <FilePreviewDialog :visible="previewVisible" :file="currentPreviewFile" @close="previewVisible = false" |
| | | @download="handleDownload" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | donateEdit, |
| | | donateAdd |
| | | } from "@/api/businessApi/index"; |
| | | import LiAreaSelect from "@/components/Address"; |
| | | |
| | | import dayjs from "dayjs"; |
| | | |
| | | export default { |
| | | name: "CaseList", |
| | | components: { |
| | | CaseDetail, |
| | | LiAreaSelect, |
| | | UploadAttachment, |
| | | FilePreviewDialog |
| | | }, |
| | | dicts: ["sys_user_sex", "sys_BloodType", "sys_Infectious", "sys_IDType"], |
| | | dicts: [ |
| | | "sys_user_sex", |
| | | "sys_BloodType", |
| | | "sys_Infectious", |
| | | "sys_IDType", |
| | | "sys_education", |
| | | "sys_occupation" |
| | | ], |
| | | |
| | | data() { |
| | | const validateConfirmResult = (rule, value, callback) => { |
| | |
| | | saveLoading: false, |
| | | // 选中数组 |
| | | ids: [], |
| | | residenceAddress: {}, |
| | | registerAddress: {}, |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | currentCategory: "登记表附件", // 当前上传分类 |
| | | activeTab: "登记表附件", // 当前激活的Tab |
| | | presetCategories: ["登记表附件", "证件照", "疾病诊断治疗"], // 预设分类列表 |
| | | // 总条数 |
| | | total: 0, |
| | | // 案例表格数据 |
| | |
| | | approveResult: "3", |
| | | confirmResult: "", |
| | | rejectType: "", // 驳回原因 |
| | | isTransport: "1", // 是否需要转运 |
| | | isTransport: "", // 是否需要转运 |
| | | createTransport: false, // 是否需要创建转运单 |
| | | isDonate: "0" // 是否捐献,0-未捐献,1-已捐献 |
| | | }, |
| | |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | computed: { |
| | | // 获取所有存在的分类(按固定顺序),包含“未分类” |
| | | categories() { |
| | | // 固定返回所有预设分类 + 未分类,无论是否有文件 |
| | | return ['登记表附件', '证件照', '疾病诊断治疗', '未分类']; |
| | | } |
| | | }, |
| | | methods: { |
| | | /** 查询案例列表 */ |
| | | async getList() { |
| | |
| | | this.loading = false; |
| | | } |
| | | }, |
| | | handleResidenceAddressChange(address) { |
| | | this.editForm.residenceprovince = address.sheng; |
| | | this.editForm.residencecity = address.shi; |
| | | this.editForm.residencetown = address.qu; |
| | | }, |
| | | |
| | | handleRegisterAddressChange(address) { |
| | | console.log(this.registerAddress, "registerAddress11"); |
| | | |
| | | this.editForm.registerprovince = address.sheng; |
| | | this.editForm.registercity = address.shi; |
| | | this.editForm.registertown = address.qu; |
| | | }, |
| | | /** 确认结果变化处理 */ |
| | | handleApproveResultChange(value) { |
| | | if (value == "3") { |
| | |
| | | |
| | | /** 多选框选中数据 */ |
| | | handleSelectionChange(selection) { |
| | | console.log(selection, "22"); |
| | | |
| | | this.ids = selection.map(item => item.id); |
| | | console.log(this.ids, "33"); |
| | | |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | |
| | | async handleDetail(row) { |
| | | try { |
| | | this.currentCase = row; |
| | | |
| | | if (this.currentCase.registerprovincename) { |
| | | this.residenceAddress = { |
| | | sheng: this.currentCase.registerprovincename, |
| | | shi: this.currentCase.registercityname, |
| | | qu: this.currentCase.registertownname |
| | | }; |
| | | } |
| | | // 户籍地址 |
| | | if (this.currentCase.residenceprovincename) { |
| | | this.registerAddress = { |
| | | sheng: this.currentCase.residenceprovincename, |
| | | shi: this.currentCase.residencecountyname, |
| | | qu: this.currentCase.residencetownname |
| | | }; |
| | | } |
| | | // 如果状态是"已上报"(1),则更新为"已阅读"(2) |
| | | if (this.currentCase.reportStatus == "1") { |
| | | try { |
| | |
| | | this.detailOpen = true; |
| | | } |
| | | }, |
| | | |
| | | // 获取某分类的文件数量 |
| | | getCategoryCount(category) { |
| | | return this.editForm.annexfilesList.filter(item => { |
| | | const type = item.fileType || ""; |
| | | if (category === "未分类") { |
| | | return !this.presetCategories.includes(type); |
| | | } |
| | | return type === category; |
| | | }).length; |
| | | }, |
| | | // 获取某分类的文件列表 |
| | | getCategoryFiles(category) { |
| | | return this.editForm.annexfilesList.filter(item => { |
| | | const type = item.fileType || ""; |
| | | if (category === "未分类") { |
| | | return !this.presetCategories.includes(type); |
| | | } |
| | | return type === category; |
| | | }); |
| | | }, |
| | | // 更新附件分类(下拉修改时触发) |
| | | updateAttachmentCategory(row, newVal) { |
| | | const target = this.editForm.annexfilesList.find(item => item === row); |
| | | if (target) { |
| | | target.fileType = newVal; // 可能为空字符串 |
| | | // 同步更新 attachmentFileList |
| | | const fileItem = this.attachmentFileList.find(f => f.raw === row); |
| | | if (fileItem) { |
| | | fileItem.raw.fileType = newVal; |
| | | fileItem.fileType = newVal || "未分类"; |
| | | } |
| | | // 可选:如果当前激活的tab没有文件了,自动切换到第一个有文件的tab |
| | | const currentTabHasFiles = |
| | | this.getCategoryFiles(this.activeTab).length > 0; |
| | | if (!currentTabHasFiles) { |
| | | const firstCategory = this.categories[0]; |
| | | if (firstCategory) this.activeTab = firstCategory; |
| | | } |
| | | } |
| | | }, |
| | | // 按文件对象删除(用于表格中的删除按钮) |
| | | handleRemoveAttachmentByFile(file) { |
| | | const index = this.editForm.annexfilesList.findIndex( |
| | | item => item === file |
| | | ); |
| | | if (index > -1) { |
| | | this.editForm.annexfilesList.splice(index, 1); |
| | | // 同步删除 attachmentFileList |
| | | const fileIndex = this.attachmentFileList.findIndex( |
| | | f => f.raw === file || f.url === file.fileUrl |
| | | ); |
| | | if (fileIndex > -1) { |
| | | this.attachmentFileList.splice(fileIndex, 1); |
| | | } |
| | | this.$message.success("附件删除成功"); |
| | | } |
| | | }, |
| | | /** 编辑按钮操作 */ |
| | | async handleEdit(row) { |
| | | try { |
| | |
| | | if (response.code == 200 || response.data) { |
| | | this.isEditing = true; |
| | | const data = response.data || response; |
| | | |
| | | // 处理附件 |
| | | // 确保附件都有 fileType 字段,默认为空字符串 |
| | | if (data.annexfilesList) { |
| | | data.annexfilesList = data.annexfilesList.map(item => ({ |
| | | ...item, |
| | | fileType: item.fileType || "" |
| | | })); |
| | | this.attachmentFileList = this.parseAttachmentToFileList( |
| | | data.annexfilesList |
| | | ); |
| | | } else { |
| | | this.attachmentFileList = []; |
| | | } |
| | | |
| | | if (data.registerprovincename) { |
| | | this.residenceAddress = { |
| | | sheng: data.residenceprovincename, |
| | | shi: data.residencecountyname, |
| | | qu: data.residencetownname |
| | | }; |
| | | } |
| | | // 户籍地址 |
| | | if (data.residenceprovincename) { |
| | | this.registerAddress = { |
| | | sheng: data.registerprovincename, |
| | | shi: data.registercityname, |
| | | qu: data.registertownname |
| | | }; |
| | | } |
| | | this.currentCase = data; |
| | | this.editForm = { ...data }; |
| | | this.editForm.idcardtype = this.editForm.idcardtype.toString(); |
| | | this.editForm.idcardtype = this.editForm.idcardtype?.toString() ?? ""; |
| | | console.log(this.editForm.idcardtype); |
| | | this.editForm.infectious = this.editForm.infectious |
| | | .split(",") |
| | |
| | | this.$modal.msgError("获取记录失败"); |
| | | } |
| | | }, |
| | | |
| | | hasApprovedSelected() { |
| | | if (!this.ids || this.ids.length === 0) return false; |
| | | return this.caseList.some( |
| | | item => this.ids.includes(item.id) && item.reportStatus === "3" |
| | | ); |
| | | }, |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.isEditing = false; |
| | |
| | | // 驳回 |
| | | approveData.rejectType = this.approveForm.rejectType; |
| | | approveData.isTransport = "1"; // 驳回的案例不需要转运 |
| | | approveData.isDonate = "1"; // 驳回的案例标记为已捐献 |
| | | approveData.isDonate = "0"; // 驳回的案例标记为已捐献 |
| | | } |
| | | |
| | | // 保存案例确认信息 |
| | |
| | | } |
| | | }, |
| | | |
| | | /** 删除按钮操作 */ |
| | | /** 删除按钮操作 - 修改,增加已同意校验 */ |
| | | async handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | console.log(this.ids, "1"); |
| | | console.log(row, "2"); |
| | | |
| | | let ids = this.ids; |
| | | console.log(ids); |
| | | |
| | | const deleteItems = this.caseList.filter(item => ids.includes(item.id)); |
| | | |
| | | // 检查是否有已同意的案例 |
| | | const approvedItems = deleteItems.filter( |
| | | item => item.reportStatus === "3" |
| | | ); |
| | | if (approvedItems.length > 0) { |
| | | const names = approvedItems.map(item => item.caseNo).join(","); |
| | | this.$modal.msgWarning(`已同意的案例不可删除:${names}`); |
| | | return; |
| | | } |
| | | |
| | | try { |
| | | await this.$modal.confirm( |
| | | '是否确认删除案例编号为"' + ids + '"的数据项?' |
| | | '是否确认删除潜在捐献者为"' + ids.join(",") + '"的数据项?' |
| | | ); |
| | | await donateDel(ids); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | |
| | | // 逐个删除,一个案例调用一次删除接口 |
| | | let successCount = 0; |
| | | let failCount = 0; |
| | | let failIds = []; |
| | | |
| | | for (const id of ids) { |
| | | try { |
| | | await donateDel(id); |
| | | successCount++; |
| | | } catch (error) { |
| | | console.error(`删除ID ${id} 失败:`, error); |
| | | failCount++; |
| | | failIds.push(id); |
| | | } |
| | | } |
| | | |
| | | // 显示删除结果 |
| | | if (failCount === 0) { |
| | | this.$modal.msgSuccess(`成功删除 ${successCount} 个案例`); |
| | | } else { |
| | | this.$modal.msgWarning( |
| | | `成功删除 ${successCount} 个案例,${failCount} 个案例删除失败(ID: ${failIds.join( |
| | | "," |
| | | )})` |
| | | ); |
| | | } |
| | | |
| | | this.getList(); |
| | | } catch (error) { |
| | | if (error !== "cancel") { |
| | | console.error("删除失败:", error); |
| | | console.error("删除操作取消或失败:", error); |
| | | this.$modal.msgError("删除失败"); |
| | | } |
| | | } |
| | |
| | | |
| | | /** 附件转换 */ |
| | | parseAttachmentToFileList(attachments) { |
| | | if (!attachments || !Array.isArray(attachments)) return []; |
| | | return attachments.map((item, index) => ({ |
| | | uid: item.id || `attachment-${index}-${Date.now()}`, |
| | | name: item.fileName, |
| | | url: item.path || item.fileUrl, |
| | | status: "success", |
| | | raw: item |
| | | })); |
| | | }, |
| | | if (!attachments || !Array.isArray(attachments)) return []; |
| | | return attachments.map((item, index) => ({ |
| | | uid: item.id || `attachment-${index}-${Date.now()}`, |
| | | name: item.fileName, |
| | | url: item.path || item.fileUrl, |
| | | status: 'success', |
| | | raw: item, |
| | | fileType: item.fileType || '' // 空字符串表示未分类 |
| | | })); |
| | | } |
| | | , |
| | | |
| | | /** 附件变化处理 */ |
| | | handleAttachmentChange(fileList) { |
| | |
| | | |
| | | /** 附件上传成功处理 */ |
| | | handleUploadSuccess({ file, fileList, response }) { |
| | | if (response && response.code == 200) { |
| | | if (!this.editForm.annexfilesList) { |
| | | this.editForm.annexfilesList = []; |
| | | } |
| | | const attachmentObj = { |
| | | fileName: file.name, |
| | | path: response.data || file.url, |
| | | fileUrl: response.data || file.url, |
| | | type: this.getFileExtension(file.name), |
| | | createTime: dayjs().format("YYYY-MM-DD HH:mm:ss"), |
| | | remart: file.raw?.remart || "", |
| | | caseNo: this.editForm.caseNo |
| | | }; |
| | | |
| | | this.editForm.annexfilesList.push(attachmentObj); |
| | | this.$message.success("文件上传成功"); |
| | | } |
| | | }, |
| | | if (response && response.code == 200) { |
| | | if (!this.editForm.annexfilesList) { |
| | | this.editForm.annexfilesList = []; |
| | | } |
| | | // 根据当前激活的 Tab 决定分类(未分类 Tab 对应空字符串) |
| | | const category = this.activeTab === '未分类' ? '' : this.activeTab; |
| | | const attachmentObj = { |
| | | fileName: file.name, |
| | | path: response.data || file.url, |
| | | fileUrl: response.data || file.url, |
| | | type: this.getFileExtension(file.name), |
| | | createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), |
| | | remart: file.raw?.remart || '', |
| | | caseNo: this.editForm.caseNo, |
| | | fileType: category // 使用 activeTab 决定 |
| | | }; |
| | | this.editForm.annexfilesList.push(attachmentObj); |
| | | // 同步更新 attachmentFileList |
| | | this.attachmentFileList.push({ |
| | | uid: attachmentObj.path, |
| | | name: attachmentObj.fileName, |
| | | url: attachmentObj.path, |
| | | status: 'success', |
| | | raw: attachmentObj, |
| | | fileType: category |
| | | }); |
| | | this.$message.success('文件上传成功'); |
| | | } |
| | | }, |
| | | |
| | | /** 附件上传错误处理 */ |
| | | handleUploadError({ file, fileList, error }) { |
| | |
| | | requestData.infectious = requestData.infectious.join(","); |
| | | let response; |
| | | |
| | | requestData.isDonate = requestData.isDonate |
| | | ? requestData.isDonate |
| | | : "0"; |
| | | |
| | | if (this.isEditing) { |
| | | response = await donateEdit(requestData); |
| | | } else { |
| | |
| | | } |
| | | |
| | | /* 确认弹框样式 */ |
| | | .approve-dialog >>> .el-dialog__body { |
| | | .approve-dialog>>>.el-dialog__body { |
| | | padding: 0; |
| | | } |
| | | |
| | | .approve-detail-preview { |
| | | height: 100%; |
| | | } |
| | | |
| | | .approve-dialog-content { |
| | | display: flex; |
| | | height: 600px; /* 可以调整高度 */ |
| | | height: 600px; |
| | | /* 可以调整高度 */ |
| | | overflow: hidden; |
| | | } |
| | | |
| | |
| | | border-bottom: 1px solid #e4e7ed; |
| | | } |
| | | } |
| | | |
| | | /* 响应式设计 */ |
| | | @media (max-width: 1200px) { |
| | | .approve-dialog { |