| | |
| | | </el-col> |
| | | </el-row> |
| | | <!-- 批量添加任务弹窗 --> |
| | | <!-- 批量添加延续护理任务弹窗 --> |
| | | <el-dialog |
| | | title="批量添加延续护理" |
| | | :visible.sync="batchTaskVisible" |
| | | width="90%" |
| | | append-to-body |
| | | class="batch-dialog" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-row :gutter="20"> |
| | | <!-- 左侧:选中患者列表 --> |
| | | <el-col :span="12"> |
| | | <div class="batch-patient-section"> |
| | | <h4>选中患者({{ selectedPatients.length }}人)</h4> |
| | | <div class="section-header"> |
| | | <h4>选中患者</h4> |
| | | <span class="patient-count">{{ selectedPatients.length }}人</span> |
| | | </div> |
| | | <el-table |
| | | :data="selectedPatients" |
| | | border |
| | | style="width: 100%" |
| | | size="small" |
| | | :row-class-name="tableRowClassName" |
| | | :header-cell-style="{ background: '#F5F7FA', color: '#606266' }" |
| | | > |
| | | <el-table-column prop="patname" label="姓名" width="100" /> |
| | | <el-table-column prop="sex" label="性别" width="80"> |
| | | <el-table-column |
| | | prop="patname" |
| | | label="姓名" |
| | | width="100" |
| | | align="center" |
| | | /> |
| | | <el-table-column |
| | | prop="sex" |
| | | label="性别" |
| | | width="80" |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.sex === 1 ? "男" : "女" }} |
| | | <el-tag |
| | | size="small" |
| | | :type="scope.row.sex === 1 ? 'primary' : 'danger'" |
| | | > |
| | | {{ scope.row.sex === 1 ? "男" : "女" }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="出院时间" |
| | | label="入院时间" |
| | | align="center" |
| | | key="endtime" |
| | | prop="endtime" |
| | | key="starttime" |
| | | prop="starttime" |
| | | width="120" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatTime(scope.row.endtime) }}</span> |
| | | <span class="time-text">{{ |
| | | formatTime(scope.row.starttime) |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="inhospno" label="住院号" /> |
| | | <el-table-column prop="deptname" label="科室" /> |
| | | <el-table-column |
| | | prop="inhospno" |
| | | label="住院号" |
| | | width="120" |
| | | align="center" |
| | | /> |
| | | <el-table-column prop="deptname" label="科室" align="center" /> |
| | | <el-table-column |
| | | prop="leavehospitaldistrictname" |
| | | label="病区" |
| | | align="center" |
| | | /> |
| | | </el-table> |
| | | </div> |
| | | </el-col> |
| | |
| | | <!-- 右侧:任务列表 --> |
| | | <el-col :span="12"> |
| | | <div class="batch-task-section"> |
| | | <h4>任务列表(请选择1个任务)</h4> |
| | | <div class="section-header"> |
| | | <h4>延续护理任务</h4> |
| | | <div v-if="selectedTask" class="task-selected-hint selected"> |
| | | <i class="el-icon-success"></i> |
| | | <span>已选择:{{ selectedTask.taskName }}</span> |
| | | </div> |
| | | <div v-else class="task-selected-hint"> |
| | | <i class="el-icon-info"></i> |
| | | <span>请点击选择一个任务</span> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="taskList" |
| | | border |
| | | height="680" |
| | | style="width: 100%" |
| | | size="small" |
| | | @current-change="handleTaskSelectionChange" |
| | | highlight-current-row |
| | | :row-class-name="taskRowClassName" |
| | | :header-cell-style="{ background: '#F5F7FA', color: '#606266' }" |
| | | :current-row-key="selectedTask ? selectedTask.taskid : ''" |
| | | > |
| | | <el-table-column |
| | | label="任务名称" |
| | |
| | | key="taskName" |
| | | prop="taskName" |
| | | :show-overflow-tooltip="true" |
| | | width="180" |
| | | /> |
| | | |
| | | <el-table-column |
| | |
| | | prop="createTime" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatTime(scope.row.createTime) }}</span> |
| | | <span class="time-text">{{ |
| | | formatTime(scope.row.createTime) |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <template #empty> |
| | | <div class="empty-message"> |
| | | <i class="el-icon-warning"></i> |
| | | <span>患者科室无匹配服务</span> |
| | | <i class="el-icon-document"></i> |
| | | <span>暂无可用延续护理任务</span> |
| | | <span class="empty-tips">请联系管理员创建任务</span> |
| | | </div> |
| | | </template> |
| | | </el-table> |
| | |
| | | |
| | | <!-- 底部按钮 --> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="batchTaskVisible = false">取 消</el-button> |
| | | <el-button @click="batchTaskVisible = false" :disabled="batchLoading" |
| | | >取 消</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | :loading="batchLoading" |
| | | @click="submitBatchTask" |
| | | >创建任务</el-button |
| | | :disabled="!selectedTask || batchLoading" |
| | | > |
| | | {{ batchLoading ? "创建中..." : "创建延续护理任务" }} |
| | | </el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 用户导入对话框 --> |
| | |
| | | // 获取任务列表 |
| | | this.loadTaskList(deptcode); |
| | | }, |
| | | /** 表格行样式 */ |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if (rowIndex % 2 === 0) { |
| | | return "even-row"; |
| | | } else { |
| | | return "odd-row"; |
| | | } |
| | | }, |
| | | |
| | | /** 任务表格行样式 */ |
| | | taskRowClassName({ row, rowIndex }) { |
| | | if (rowIndex % 2 === 0) { |
| | | return "task-even-row"; |
| | | } else { |
| | | return "task-odd-row"; |
| | | } |
| | | }, |
| | | /** 加载任务列表 */ |
| | | loadTaskList(deptcode) { |
| | | this.batchLoading = true; |
| | |
| | | taskid: this.selectedTask.taskid, |
| | | type: this.selectedTask.type, |
| | | taskName: this.selectedTask.taskName, |
| | | serviceType: this.selectedTask.serviceType, |
| | | serviceType: 99, |
| | | preachform: this.selectedTask.preachform, |
| | | templateid: this.selectedTask.templateid, |
| | | libtemplateid: this.selectedTask.libtemplateid, |
| | | sendstate: 2, |
| | | continueFlag: 2, |
| | | ...patient, |
| | | sendname: patient.patname, |
| | | starttime: patient.starttime ? patient.starttime + " 00:00:00" : "", |
| | | endtime: patient.endtime ? patient.endtime + " 00:00:00" : "", |
| | | leavediagname: patient.leavediagname || patient.diagname || "", |
| | | age: patient.age || "", |
| | |
| | | .button-textsc { |
| | | color: #3664d9; |
| | | } |
| | | // 批量任务弹窗样式 |
| | | .batch-patient-section, |
| | | .batch-task-section { |
| | | h4 { |
| | | margin: 0 0 10px 0; |
| | | color: #606266; |
| | | font-size: 16px; |
| | | // 批量任务弹窗优化样式 |
| | | .batch-dialog { |
| | | .el-dialog__body { |
| | | padding: 20px 20px 10px; |
| | | } |
| | | |
| | | .el-dialog__header { |
| | | background: linear-gradient(135deg, #5788fe, #7aa1ff); |
| | | padding: 15px 20px; |
| | | |
| | | .el-dialog__title { |
| | | color: white; |
| | | font-weight: 600; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .el-dialog__headerbtn { |
| | | .el-dialog__close { |
| | | color: white; |
| | | font-size: 18px; |
| | | |
| | | &:hover { |
| | | color: #f0f0f0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 弹窗内容区域 |
| | | .batch-patient-section, |
| | | .batch-task-section { |
| | | h4 { |
| | | margin: 0 0 12px 0; |
| | | color: #333; |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | padding-left: 8px; |
| | | border-left: 4px solid #5788fe; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | &::before { |
| | | content: ""; |
| | | display: inline-block; |
| | | width: 6px; |
| | | height: 6px; |
| | | background-color: #5788fe; |
| | | border-radius: 50%; |
| | | margin-right: 8px; |
| | | } |
| | | } |
| | | |
| | | .section-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 12px; |
| | | |
| | | .patient-count { |
| | | color: #5788fe; |
| | | font-weight: 500; |
| | | background: #f0f5ff; |
| | | padding: 4px 12px; |
| | | border-radius: 12px; |
| | | font-size: 13px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 患者表格优化 |
| | | .batch-patient-section { |
| | | .el-table { |
| | | border: 1px solid #e8eaec; |
| | | border-radius: 6px; |
| | | overflow: hidden; |
| | | |
| | | .el-table__header-wrapper { |
| | | th { |
| | | background-color: #f5f7fa; |
| | | color: #606266; |
| | | font-weight: 600; |
| | | height: 40px; |
| | | } |
| | | } |
| | | |
| | | .el-table__body-wrapper { |
| | | tr:hover > td { |
| | | background-color: #f5f9ff; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 任务表格优化 |
| | | .batch-task-section { |
| | | .el-table { |
| | | border: 1px solid #e8eaec; |
| | | border-radius: 6px; |
| | | overflow: hidden; |
| | | |
| | | .el-table__header-wrapper { |
| | | th { |
| | | background-color: #f5f7fa; |
| | | color: #606266; |
| | | font-weight: 600; |
| | | height: 40px; |
| | | } |
| | | } |
| | | |
| | | .el-table__body-wrapper { |
| | | tr { |
| | | cursor: pointer; |
| | | transition: all 0.3s; |
| | | |
| | | &:hover > td { |
| | | background-color: #f5f9ff; |
| | | } |
| | | |
| | | // 选中行样式 |
| | | &.current-row { |
| | | td { |
| | | background-color: #e8f1ff !important; |
| | | border-left: 3px solid #5788fe; |
| | | |
| | | &:first-child { |
| | | border-left: none; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .selected-row { |
| | | position: relative; |
| | | |
| | | &::after { |
| | | content: "✓"; |
| | | position: absolute; |
| | | right: 10px; |
| | | top: 50%; |
| | | transform: translateY(-50%); |
| | | color: #5788fe; |
| | | font-weight: bold; |
| | | font-size: 16px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .el-table__empty-block { |
| | | min-height: 200px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 空状态优化 |
| | | .empty-message { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | padding: 20px; |
| | | padding: 40px 20px; |
| | | color: #909399; |
| | | |
| | | i { |
| | | font-size: 24px; |
| | | margin-bottom: 8px; |
| | | font-size: 48px; |
| | | margin-bottom: 12px; |
| | | color: #c0c4cc; |
| | | } |
| | | |
| | | span { |
| | | font-size: 14px; |
| | | color: #c0c4cc; |
| | | } |
| | | |
| | | .empty-tips { |
| | | margin-top: 8px; |
| | | font-size: 12px; |
| | | color: #dcdfe6; |
| | | } |
| | | } |
| | | |
| | | // 底部按钮区域 |
| | | .dialog-footer { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | padding-top: 20px; |
| | | border-top: 1px solid #ebeef5; |
| | | padding: 20px 0 0; |
| | | border-top: 1px solid #f0f0f0; |
| | | margin-top: 20px; |
| | | |
| | | .el-button { |
| | | min-width: 80px; |
| | | height: 36px; |
| | | border-radius: 4px; |
| | | font-size: 14px; |
| | | |
| | | &.el-button--default { |
| | | color: #666; |
| | | border-color: #dcdfe6; |
| | | |
| | | &:hover { |
| | | color: #5788fe; |
| | | border-color: #5788fe; |
| | | background-color: #f0f5ff; |
| | | } |
| | | } |
| | | |
| | | &.el-button--primary { |
| | | background: linear-gradient(135deg, #5788fe, #7aa1ff); |
| | | border-color: #5788fe; |
| | | |
| | | &:hover { |
| | | background: linear-gradient(135deg, #4a7cfe, #6b94ff); |
| | | border-color: #4a7cfe; |
| | | } |
| | | |
| | | &:active { |
| | | background: linear-gradient(135deg, #3d70fe, #5e87ff); |
| | | border-color: #3d70fe; |
| | | } |
| | | |
| | | &.is-loading { |
| | | position: relative; |
| | | pointer-events: none; |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: absolute; |
| | | right: 10px; |
| | | top: 50%; |
| | | transform: translateY(-50%); |
| | | width: 16px; |
| | | height: 16px; |
| | | border: 2px solid transparent; |
| | | border-top-color: white; |
| | | border-radius: 50%; |
| | | animation: loading-rotate 1s linear infinite; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 加载动画 |
| | | @keyframes loading-rotate { |
| | | 0% { |
| | | transform: translateY(-50%) rotate(0deg); |
| | | } |
| | | 100% { |
| | | transform: translateY(-50%) rotate(360deg); |
| | | } |
| | | } |
| | | |
| | | // 响应式调整 |
| | |
| | | .batch-task-section { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .el-row { |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .el-col-12 { |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | // 任务列表选中提示 |
| | | .task-selected-hint { |
| | | margin-top: 8px; |
| | | font-size: 12px; |
| | | color: #5788fe; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | i { |
| | | margin-right: 4px; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | &.selected { |
| | | color: #67c23a; |
| | | } |
| | | } |
| | | |
| | | // 弹窗滚动优化 |
| | | .el-dialog__wrapper { |
| | | .el-dialog { |
| | | border-radius: 8px; |
| | | overflow: hidden; |
| | | box-shadow: 0 4px 20px rgba(87, 136, 254, 0.1); |
| | | |
| | | .el-dialog__body { |
| | | max-height: 70vh; |
| | | overflow-y: auto; |
| | | |
| | | &::-webkit-scrollbar { |
| | | width: 6px; |
| | | } |
| | | |
| | | &::-webkit-scrollbar-track { |
| | | background: #f5f5f5; |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | &::-webkit-scrollbar-thumb { |
| | | background: #c0c4cc; |
| | | border-radius: 3px; |
| | | |
| | | &:hover { |
| | | background: #a0a4ab; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |