12 changed files with 2575 additions and 17 deletions
			
			
		| @ -0,0 +1,326 @@ | |||
| <template> | |||
|   <el-dialog | |||
|     title="号源管理" | |||
|     :visible.sync="dialogVisible" | |||
|     width="70%" | |||
|     :before-close="handleClose" | |||
|   > | |||
|     <div> | |||
|       <el-button type="primary" icon="el-icon-plus" size="small">新增</el-button> | |||
|       <el-table | |||
|         :data="tableData" | |||
|         border | |||
|         style="width: 100%" | |||
|       > | |||
|         <el-table-column | |||
|           :resizable="false" | |||
|           prop="projectName" | |||
|           label="检查项目" | |||
|           width="150" | |||
|         /> | |||
|         <el-table-column | |||
|           :resizable="false" | |||
|           prop="Mon" | |||
|           label="周一" | |||
|           align="center" | |||
|         > | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             label="上午" | |||
|             align="center" | |||
|             label-class-name="checkFont" | |||
|             width="50" | |||
|           > | |||
|             <template slot-scope="scope"> | |||
|               <input class="checkTime" type="checkbox" :ischecked="scope.row.MonTime"> | |||
|             </template> | |||
|           </el-table-column> | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             label="下午" | |||
|             align="center" | |||
|             label-class-name="checkFont" | |||
|             width="50" | |||
|           > | |||
|             <template slot-scope="scope"> | |||
|               <input class="checkTime" type="checkbox" :ischecked="scope.row.MonTime"> | |||
|             </template> | |||
|           </el-table-column> | |||
|         </el-table-column> | |||
|         <el-table-column | |||
|           :resizable="false" | |||
|           prop="Tues" | |||
|           label="周二" | |||
|           align="center" | |||
|         > | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             label="上午" | |||
|             align="center" | |||
|             label-class-name="checkFont" | |||
|             width="50" | |||
|           > | |||
|             <template slot-scope="scope"> | |||
|               <input class="checkTime" type="checkbox" :ischecked="scope.row.TuesTime"> | |||
|             </template> | |||
|           </el-table-column> | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             label="下午" | |||
|             align="center" | |||
|             label-class-name="checkFont" | |||
|             width="50" | |||
|           > | |||
|             <template slot-scope="scope"> | |||
|               <input class="checkTime" type="checkbox" :ischecked="scope.row.TuesTime"> | |||
|             </template> | |||
|           </el-table-column> | |||
|         </el-table-column> | |||
|         <el-table-column | |||
|           :resizable="false" | |||
|           prop="Wed" | |||
|           label="周三" | |||
|           align="center" | |||
|         > | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             label="上午" | |||
|             align="center" | |||
|             label-class-name="checkFont" | |||
|             width="50" | |||
|           > | |||
|             <template slot-scope="scope"> | |||
|               <input class="checkTime" type="checkbox" :ischecked="scope.row.WedTime"> | |||
|             </template> | |||
|           </el-table-column> | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             label="下午" | |||
|             align="center" | |||
|             label-class-name="checkFont" | |||
|             width="50" | |||
|           > | |||
|             <template slot-scope="scope"> | |||
|               <input class="checkTime" type="checkbox" :ischecked="scope.row.WedTime"> | |||
|             </template> | |||
|           </el-table-column> | |||
|           <template slot-scope="scope"> | |||
|             <input class="checkTime" type="checkbox" :ischecked="scope.row.WedTime"> | |||
|           </template> | |||
|         </el-table-column> | |||
|         <el-table-column | |||
|           :resizable="false" | |||
|           prop="Thur" | |||
|           label="周四" | |||
|           align="center" | |||
|         > | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             label="上午" | |||
|             align="center" | |||
|             label-class-name="checkFont" | |||
|             width="50" | |||
|           /> | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             label="下午" | |||
|             align="center" | |||
|             label-class-name="checkFont" | |||
|             width="50" | |||
|           /> | |||
|           <template slot-scope="scope"> | |||
|             <input class="checkTime" type="checkbox" :ischecked="scope.row.ThurTime"> | |||
|           </template> | |||
|         </el-table-column> | |||
|         <el-table-column | |||
|           :resizable="false" | |||
|           prop="Fri" | |||
|           label="周五" | |||
|           align="center" | |||
|         > | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             label="上午" | |||
|             align="center" | |||
|             label-class-name="checkFont" | |||
|             width="50" | |||
|           /> | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             label="下午" | |||
|             align="center" | |||
|             label-class-name="checkFont" | |||
|             width="50" | |||
|           /> | |||
|           <template slot-scope="scope"> | |||
|             <input class="checkTime" type="checkbox" :ischecked="scope.row.FriTime"> | |||
|           </template> | |||
|         </el-table-column> | |||
|         <el-table-column | |||
|           :resizable="false" | |||
|           prop="Sat" | |||
|           label="周六" | |||
|           align="center" | |||
|         > | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             label="上午" | |||
|             align="center" | |||
|             label-class-name="checkFont" | |||
|             width="50" | |||
|           /> | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             label="下午" | |||
|             align="center" | |||
|             label-class-name="checkFont" | |||
|             width="50" | |||
|           /> | |||
|           <template slot-scope="scope"> | |||
|             <input class="checkTime" type="checkbox" :ischecked="scope.row.SatTime"> | |||
|           </template> | |||
|         </el-table-column> | |||
|         <el-table-column | |||
|           :resizable="false" | |||
|           prop="Sun" | |||
|           label="周日" | |||
|           align="center" | |||
|         > | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             label="上午" | |||
|             align="center" | |||
|             label-class-name="checkFont" | |||
|             width="50" | |||
|           /> | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             label="下午" | |||
|             align="center" | |||
|             label-class-name="checkFont" | |||
|             width="50" | |||
|           /> | |||
|           <template slot-scope="scope"> | |||
|             <input class="checkTime" type="checkbox" :ischecked="scope.row.SunTime"> | |||
|           </template> | |||
|         </el-table-column> | |||
|         <el-table-column | |||
|           :resizable="false" | |||
|           prop="Sun" | |||
|           label="上班时间" | |||
|           align="center" | |||
|         > | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             prop="Sun" | |||
|             label="上午" | |||
|             align="center" | |||
|           /> | |||
|           <template slot-scope="scope"> | |||
|             <input class="checkTime" type="checkbox" :ischecked="scope.row.SunTime"> | |||
|           </template> | |||
|         </el-table-column> | |||
|         <el-table-column | |||
|           :resizable="false" | |||
|           prop="Sun" | |||
|           label="上班时间" | |||
|           align="center" | |||
|         > | |||
|           <el-table-column | |||
|             :resizable="false" | |||
|             prop="Sun" | |||
|             label="下午" | |||
|             align="center" | |||
|           /> | |||
|           <template slot-scope="scope"> | |||
|             <input class="checkTime" type="checkbox" :ischecked="scope.row.SunTime"> | |||
|           </template> | |||
|         </el-table-column> | |||
|         <el-table-column | |||
|           :resizable="false" | |||
|           prop="Sun" | |||
|           label="时间间隔" | |||
|           align="center" | |||
|         > | |||
|           <template slot-scope="scope"> | |||
|             <input class="checkTime" type="checkbox" :ischecked="scope.row.SunTime"> | |||
|           </template> | |||
|         </el-table-column> | |||
|         <el-table-column | |||
|           :resizable="false" | |||
|           prop="Sun" | |||
|           label="人数上限" | |||
|           align="center" | |||
|         > | |||
|           <template slot-scope="scope"> | |||
|             <input class="checkTime" type="checkbox" :ischecked="scope.row.SunTime"> | |||
|           </template> | |||
|         </el-table-column> | |||
|         <el-table-column | |||
|           :resizable="false" | |||
|           prop="Sun" | |||
|           label="操作" | |||
|           align="center" | |||
|         > | |||
|           <template slot-scope="scope"> | |||
|             <input class="checkTime" type="checkbox" :ischecked="scope.row.SunTime"> | |||
|           </template> | |||
|         </el-table-column> | |||
|       </el-table> | |||
|     </div> | |||
|   </el-dialog> | |||
| </template> | |||
| 
 | |||
| <script> | |||
| export default { | |||
|   name: 'NumberManage', | |||
|   props: { | |||
|     isShow: { | |||
|       type: Boolean, | |||
|       default: false | |||
|     } | |||
|   }, | |||
|   data() { | |||
|     return { | |||
|       dialogVisible: false, | |||
|       tableData: [ | |||
|         { | |||
|           projectName: '视诱发电位', | |||
|           MonTime: false, | |||
|           TuesTime: false, | |||
|           WedTime: false, | |||
|           ThurTime: false, | |||
|           FriTime: false, | |||
|           SatTime: false, | |||
|           SunTime: false | |||
|         }, { | |||
|           projectName: '电脑视野计检查', | |||
|           MonTime: false, | |||
|           TuesTime: false, | |||
|           WedTime: false, | |||
|           ThurTime: false, | |||
|           FriTime: false, | |||
|           SatTime: false, | |||
|           SunTime: false | |||
|         } | |||
|       ] | |||
|     } | |||
|   }, | |||
|   watch: { | |||
|     isShow(val) { | |||
|       this.dialogVisible = val | |||
|     } | |||
|   }, | |||
|   methods: { | |||
|     handleClose() { | |||
|       this.$emit('close', false) | |||
|     } | |||
|   } | |||
| } | |||
| </script> | |||
| 
 | |||
| <style lang="scss" scoped> | |||
| ::v-deep .checkFont{ | |||
|   font-size: 12px !important; | |||
| } | |||
| </style> | |||
| @ -0,0 +1,202 @@ | |||
| <template> | |||
|   <el-dialog | |||
|     class="add-schedule" | |||
|     :visible.sync="visible" | |||
|     width="40%" | |||
|     :title="dataForm.title" | |||
|     @close="closeDialog" | |||
|   > | |||
|     <el-form ref="dataForm" :model="dataForm" :rules="dataRule"> | |||
|       <el-form-item label="选择患者:" label-width="90px" prop="patientName"> | |||
|         <el-select | |||
|           v-model="dataForm.patientName" | |||
|           filterable | |||
|           placeholder="请输入关键词或选择患者" | |||
|         > | |||
|           <el-option | |||
|             v-for="item in patientList" | |||
|             :key="item.id" | |||
|             :label="item.patientName" | |||
|             :value="item.patientName" | |||
|             @click.native="optionsChange(item)" | |||
|           /> | |||
|         </el-select> | |||
|       </el-form-item> | |||
|       <el-form-item label="医生:" label-width="90px" prop="doctorName"> | |||
|         <el-input v-model="dataForm.doctorName" disabled /> | |||
|       </el-form-item> | |||
|       <el-form-item label="术式:" label-width="90px" prop="operaName"> | |||
|         <el-input v-model="dataForm.operaName" disabled /> | |||
|       </el-form-item> | |||
|       <el-form-item label="手术时间:" label-width="90px" prop="operaTime"> | |||
|         <el-date-picker | |||
|           v-model="dataForm.operaTime" | |||
|           type="datetime" | |||
|           placeholder="选择手术时间" | |||
|           default-time="09:00:00" | |||
|           @change="pickerChange" | |||
|         /> | |||
|       </el-form-item> | |||
|       <el-form-item label="眼别:" label-width="90px"> | |||
|         <el-radio-group v-model="dataForm.eyeType" size="medium"> | |||
|           <el-radio-button label="OD">OD</el-radio-button> | |||
|           <el-radio-button label="OS">OS</el-radio-button> | |||
|           <el-radio-button label="双眼">双眼</el-radio-button> | |||
|         </el-radio-group> | |||
|       </el-form-item> | |||
|     </el-form> | |||
|     <template slot="footer"> | |||
|       <el-button @click="visible = false">{{ $t('cancel') }}</el-button> | |||
|       <el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> | |||
|     </template> | |||
|   </el-dialog> | |||
| </template> | |||
| 
 | |||
| <script> | |||
| import debounce from 'lodash/debounce' | |||
| export default { | |||
|   props: { | |||
|     patientTypeList: { | |||
|       type: Array, | |||
|       default: () => [] | |||
|     } | |||
|   }, | |||
|   data() { | |||
|     return { | |||
|       visible: false, | |||
|       dataForm: { | |||
|         doctorCode: '', | |||
|         doctorName: '', | |||
|         eyeType: 'OD', | |||
|         operaName: '', | |||
|         operaTime: '', | |||
|         patientCentreId: '', | |||
|         patientIdNumber: '', | |||
|         patientName: '', | |||
|         patientId: '' | |||
|       }, | |||
|       params: {}, | |||
|       patientList: [], | |||
|       timeout: null | |||
|     } | |||
|   }, | |||
|   computed: { | |||
|     dataRule() { | |||
|       return { | |||
|         patientName: [ | |||
|           { required: true, message: '请选择患者', trigger: 'change' } | |||
|         ], | |||
|         operaTime: [ | |||
|           { required: true, message: '请选择手术时间', trigger: 'change' } | |||
|         ] | |||
|       } | |||
|     } | |||
|   }, | |||
|   methods: { | |||
|     init() { | |||
|       this.visible = true | |||
|       this.$nextTick(() => { | |||
|         this.$refs.dataForm.resetFields() // 重置表单 | |||
|         this.getPatientList() | |||
|       }) | |||
|     }, | |||
|     // 获取信息 | |||
|     getInfo() { | |||
|       this.$http.get(`/patient/manage/${this.params.patientCentreId}/${this.params.patientIdNumber}`).then(({ data: res }) => { | |||
|         if (res.code !== 0) { | |||
|           return this.$message.error(res.msg) | |||
|         } | |||
|         this.dataForm = { | |||
|           ...this.dataForm, | |||
|           ...res.data | |||
|         } | |||
|       }).catch(() => {}) | |||
|     }, | |||
|     // 患者选择发生改变时 | |||
|     optionsChange(value) { | |||
|       this.dataForm.patientCentreId = value.patientCentreId | |||
|       this.dataForm.patientIdNumber = value.patientIdNumber | |||
|       this.dataForm.patientId = value.patientId | |||
|     }, | |||
|     // 获取患者列表 | |||
|     async getPatientList(query) { | |||
|       const { data: res } = await this.$http.get('/opera/schedule/getPatientList', { | |||
|         params: { | |||
|           patientName: query | |||
|         } | |||
|       }) | |||
|       if (res.code === 0) { | |||
|         this.patientList = res.data | |||
|       } else { | |||
|         this.$message.error(res.msg) | |||
|       } | |||
|     }, | |||
|     // 时间选择 | |||
|     pickerChange(value) { | |||
|       this.dataForm.operaTime = this.$moment(value).format('YYYY-MM-DD kk:mm:ss') | |||
|     }, | |||
|     // 表单提交 | |||
|     dataFormSubmitHandle: debounce(function() { | |||
|       if (this.dataForm.title === 'HIS引入') { | |||
|         // this.$parent.HisAddVisible = false | |||
|       } | |||
|       this.$refs.dataForm.validate((valid) => { | |||
|         if (!valid) { | |||
|           return false | |||
|         } | |||
|         this.$http[!this.dataForm.id ? 'post' : 'put']('/opera/schedule', this.dataForm).then(({ data: res }) => { | |||
|           if (res.code !== 0) { | |||
|             return this.$message.error(res.msg) | |||
|           } | |||
|           this.$message({ | |||
|             message: this.$t('prompt.success'), | |||
|             type: 'success', | |||
|             duration: 500, | |||
|             onClose: () => { | |||
|               this.visible = false | |||
|               this.$emit('getScheduleList') | |||
|             } | |||
|           }) | |||
|         }).catch(() => {}) | |||
|       }) | |||
|     }, 1000, { leading: true, trailing: false }), | |||
|     // 关闭弹框 | |||
|     closeDialog() { | |||
|       this.$emit('closeDialog') | |||
|     } | |||
|   } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| .add-schedule { | |||
|   .cycle-display { | |||
|     .el-form-item__content { | |||
|       display: flex; | |||
|     } | |||
|     .el-input-number { | |||
|       width: 100px; | |||
|       margin-right: 16px; | |||
|     } | |||
|   } | |||
| } | |||
| 
 | |||
| </style> | |||
| <style lang="scss"> | |||
| .add-schedule { | |||
|   .el-dialog__header { | |||
|     margin-bottom:12px | |||
|   } | |||
|     .el-dialog__body { | |||
|         padding-right: 30px; | |||
|     } | |||
|     .formItemOne .el-form-item__content { | |||
|       display: flex; | |||
|     } | |||
|     .el-date-editor.el-input, .el-date-editor.el-input__inner { | |||
|       width: 100%; | |||
|     } | |||
|     .el-select{ | |||
|       width: 100%; | |||
|     } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,990 @@ | |||
| <template> | |||
|   <div v-loading="pageLoading" class="doctor-schedule"> | |||
|     <div class="date-head" :class="title=='plus' ? '' : 'data-head-fixed'"> | |||
|       <div class="date-head-right"> | |||
|         <el-button-group style="margin-right:10px;"> | |||
|           <el-button plain icon="el-icon-arrow-left" size="small" @click="weekPre">上周</el-button> | |||
|           <el-button plain size="small" @click="weekNext">下周<i class="el-icon-arrow-right el-icon--right" /> | |||
|           </el-button> | |||
|         </el-button-group> | |||
|         <span>选择日期:</span> | |||
|         <el-date-picker | |||
|           v-model="newDate" | |||
|           class="right-pick-btn" | |||
|           :clearable="false" | |||
|           type="date" | |||
|           size="small" | |||
|           placeholder="按日期查询" | |||
|           @change="pickDateChange" | |||
|         /> | |||
|         <el-button v-if="title !=='plus'" type="primary" size="small" class="margin-left-10" @click="allPtClick">{{ sortName }}</el-button> | |||
|       </div> | |||
|     </div> | |||
|     <div class="doctor-schedule-content"> | |||
|       <el-row class="weeks"> | |||
|         <el-col v-if="title !=='plus' && sortName==='保存设置'" :span="1" class="moren">设为默认</el-col> | |||
|         <el-col :span="title ==='plus' && sortName==='批量设置' ? 3 : 2" class="doctor-list-text">医生列表</el-col> | |||
|         <el-col | |||
|           v-for="(day, index) in days" | |||
|           :key="index" | |||
|           :span="3" | |||
|           class="date-item" | |||
|           :class="{selected: index == tabIndex}" | |||
|           @click="pick(day, index)" | |||
|         > | |||
|           <!--本月--> | |||
|           <div class="date-day"> | |||
|             <span class="hidden-sm-and-down">{{ day | dateFormat }}</span> | |||
|             <p>{{ day | getWeekFormat }}</p> | |||
|           </div> | |||
|           <div class="morning-after"> | |||
|             <span>上午</span> | |||
|             <span>下午</span> | |||
|           </div> | |||
|         </el-col> | |||
|       </el-row> | |||
|       <div class="scroll-list"> | |||
|         <el-row v-for="(item,index) in doctorList" :key="index" :gutter="10" class="content"> | |||
|           <el-col v-if="title !=='plus' && sortName==='保存设置'" :span="1" class="moren"> | |||
|             <el-switch :value="item.isDefault===1 ? true : false" @change="switchChange(index,$event)" /> | |||
|           </el-col> | |||
|           <el-col :span="title ==='plus' && sortName==='批量设置' ? 3 : 2" class="doctor-name"> | |||
|             <div class="doctorList"> | |||
|               <div class="list"> | |||
|                 <!-- <div class="list-img"> | |||
|                   <img src="@/assets/img/avatar.png" alt=""> | |||
|                 </div> --> | |||
|                 <p>{{ item.doctorName }}</p> | |||
|               </div> | |||
|             </div> | |||
|           </el-col> | |||
|           <el-col v-for="(weekInfoItem,weekInfoIndex) in item.weekInfo" :key="weekInfoIndex" :span="3"> | |||
|             <div class="surplu-num"> | |||
|               <div v-show="sortName==='保存设置'" class="surplu-num-morning"> | |||
|                 <div class="morning"> | |||
|                   <el-input v-model="weekInfoItem.morning.numSourceTotal" placeholder="" @change="changeInput($event,index,weekInfoIndex,'morning')" /> | |||
|                 </div> | |||
|               </div> | |||
|               <div v-show="sortName==='批量排台'" class="surplu-num-morning"> | |||
|                 <!-- 上午预定后 --> | |||
|                 <div | |||
|                   v-show="selectedShow && weekInfoItem.date == rowListObj.operaDate && rowListObj.mainDoctorName == item.doctorName && rowListObj.morOrAft===1" | |||
|                   class="morning-top" | |||
|                   @mouseover.stop="mouseoverHandle(index,weekInfoIndex,weekInfoItem,'morning')" | |||
|                   @mouseout="mouseoutHandle" | |||
|                 > | |||
|                   <p>{{ rowListObj.morOrAft===1 ? '上午' : '下午' }}</p> | |||
|                   <p>{{ rowListObj.operaTime }}</p> | |||
|                 </div> | |||
|                 <div | |||
|                   slot="reference" | |||
|                   class="morning" | |||
|                   :class="weekInfoItem.morning.surplusNum<=0 ? 'morningAfterClass' :'' " | |||
|                   @mouseover.stop="mouseoverHandle(index,weekInfoIndex,weekInfoItem,'morning')" | |||
|                   @mouseout="mouseoutHandle" | |||
|                 > | |||
|                   <p v-show="weekInfoItem.morning.numSourceTotal<=0" class="none">无</p> | |||
|                   <div | |||
|                     v-show="weekInfoItem.morning.numSourceTotal>0 && (weekInfoItem.morning.numSourceTotal == weekInfoItem.morning.orderNum)" | |||
|                     class="yue-man" | |||
|                   > | |||
|                     <p>约满</p> | |||
|                     <p>{{ weekInfoItem.morning.orderNum }} / {{ weekInfoItem.morning.numSourceTotal }}</p> | |||
|                   </div> | |||
|                   <div | |||
|                     v-show="weekInfoItem.morning.numSourceTotal>0 && (weekInfoItem.morning.numSourceTotal > weekInfoItem.morning.orderNum) " | |||
|                     class="yi-yue" | |||
|                   > | |||
|                     <p>已约</p> | |||
|                     <p>{{ weekInfoItem.morning.orderNum }} / {{ weekInfoItem.morning.numSourceTotal }}</p> | |||
|                   </div> | |||
|                   <!-- 判断上午号是否有剩余加号显示,暂时不用:v-show="currentIndex===index && currentWeekIndex===weekInfoIndex && mouseMoveIsShow && showMorningAfterText==='morning' && weekInfoItem.morning.surplusNum>0" --> | |||
|                   <div | |||
|                     v-show="currentIndex===index && currentWeekIndex===weekInfoIndex && mouseMoveIsShow && showMorningAfterText==='morning' && title !=='plus'" | |||
|                     class="show-plus-one" | |||
|                   > | |||
|                     <p @click="numberMangeClick(item,weekInfoItem,1,'排台详情')">详情</p> | |||
|                     <p @click="numberMangeClick(item,weekInfoItem,1,'排台管理')">排台管理</p> | |||
|                   </div> | |||
|                   <div | |||
|                     v-show="currentIndex===index && currentWeekIndex===weekInfoIndex && mouseMoveIsShow && showMorningAfterText==='morning'&& title =='plus'" | |||
|                     class="show-plus-two" | |||
|                   > | |||
|                     <i class="el-icon-plus" @click="setOperaTImeClick(item,weekInfoItem,1,'设置时间')" /> | |||
|                   </div> | |||
|                 </div> | |||
|               </div> | |||
|               <div v-show="sortName==='保存设置'" class="surplu-num-after"> | |||
|                 <div class="after"> | |||
|                   <el-input v-model="weekInfoItem.after.numSourceTotal" placeholder="" @change="changeInput($event,index,weekInfoIndex,'after')" /> | |||
|                 </div> | |||
|               </div> | |||
|               <div v-show="sortName==='批量排台'" class="surplu-num-after"> | |||
|                 <!-- 下午预定后 --> | |||
|                 <div | |||
|                   v-show="selectedShow && weekInfoItem.date == rowListObj.operaDate && rowListObj.mainDoctorName == item.doctorName && rowListObj.morOrAft===2" | |||
|                   class="after-top" | |||
|                   @mouseover.stop="mouseoverHandle(index,weekInfoIndex,weekInfoItem,'after')" | |||
|                   @mouseout="mouseoutHandle" | |||
|                 > | |||
|                   <p>{{ rowListObj.morOrAft===1 ? '上午':'下午' }}</p> | |||
|                   <p>{{ rowListObj.operaTime }}</p> | |||
|                 </div> | |||
|                 <!-- 下午 --> | |||
|                 <div | |||
|                   slot="reference" | |||
|                   class="after" | |||
|                   :class="weekInfoItem.after.surplusNum<=0 ? 'morningAfterClass' :'' " | |||
|                   @mouseover.stop="mouseoverHandle(index,weekInfoIndex,weekInfoItem,'after')" | |||
|                   @mouseout="mouseoutHandle" | |||
|                 > | |||
|                   <p v-show="weekInfoItem.after.numSourceTotal<=0" class="none">无</p> | |||
|                   <div | |||
|                     v-show="weekInfoItem.after.numSourceTotal>0 && (weekInfoItem.after.numSourceTotal == weekInfoItem.after.orderNum)" | |||
|                     class="yue-man" | |||
|                   > | |||
|                     <p>约满</p> | |||
|                     <p>{{ weekInfoItem.after.orderNum }} / {{ weekInfoItem.after.numSourceTotal }}</p> | |||
|                   </div> | |||
|                   <div | |||
|                     v-show="weekInfoItem.after.numSourceTotal>0 && (weekInfoItem.after.numSourceTotal > weekInfoItem.after.orderNum) " | |||
|                     class="yi-yue" | |||
|                   > | |||
|                     <p>已约</p> | |||
|                     <p>{{ weekInfoItem.after.orderNum }} / {{ weekInfoItem.after.numSourceTotal }}</p> | |||
|                   </div> | |||
|                   <!-- 判断下午好是否有剩余加号显示,暂时不用:v-show="currentIndex===index && currentWeekIndex===weekInfoIndex && mouseMoveIsShow && showMorningAfterText==='after' && weekInfoItem.after.surplusNum>0 --> | |||
|                   <div | |||
|                     v-show="currentIndex===index && currentWeekIndex===weekInfoIndex && mouseMoveIsShow && showMorningAfterText==='after' && title !=='plus'" | |||
|                     class="show-plus-one" | |||
|                   > | |||
|                     <p @click="numberMangeClick(item,weekInfoItem,2,'排台详情')">详情</p> | |||
|                     <p @click="numberMangeClick(item,weekInfoItem,2,'排台管理')">排台管理</p> | |||
|                   </div> | |||
|                   <div | |||
|                     v-show="currentIndex===index && currentWeekIndex===weekInfoIndex && mouseMoveIsShow && showMorningAfterText==='after' && title =='plus'" | |||
|                     class="show-plus-two" | |||
|                   > | |||
|                     <i class="el-icon-plus" @click="setOperaTImeClick(item,weekInfoItem,2,'设置时间')" /> | |||
|                   </div> | |||
|                 </div> | |||
|               </div> | |||
| 
 | |||
|             </div> | |||
|           </el-col> | |||
|         </el-row> | |||
|       </div> | |||
|     </div> | |||
|     <!-- 新增预约 --> | |||
|     <add-schedule | |||
|       v-if="addScheduleVisible" | |||
|       ref="addScheduleRef" | |||
|       @closeDialog="addScheduleVisible=false" | |||
|       @getScheduleList="getScheduleList" | |||
|     /> | |||
|     <numberDetailManage | |||
|       v-if="numberManageVisible" | |||
|       ref="numberManageRef" | |||
|       :source-flag="sourceFlag" | |||
|       @closeDialog="numberManageVisible=false" | |||
|       @getScheduleList="getScheduleList" | |||
|       @rowList="rowList" | |||
|     /> | |||
|     <setOperaTime | |||
|       v-if="setOperaTimeVisible" | |||
|       ref="setOperaTimeRef" | |||
|       :source-flag="sourceFlag" | |||
|       @closeDialog="setOperaTimeVisible=false" | |||
|       @getScheduleList="getScheduleList" | |||
|       @rowList="rowList" | |||
|     /> | |||
|     <operationDetail | |||
|       v-if="operationDetailVisible" | |||
|       ref="operationDetailRef" | |||
|       @closeDialog="operationDetailVisible=false" | |||
|     /> | |||
|   </div> | |||
| </template> | |||
| 
 | |||
| <script> | |||
| import moment from 'moment' | |||
| import addSchedule from './add-schedule.vue' | |||
| import _ from 'lodash' | |||
| import { dateFilterTwo } from '@/filters/index.js' | |||
| import NumberDetailManage from '@/page-subspecialty/views/modules/nurseManagement/schedule/number-detail-manage.vue' | |||
| import SetOperaTime from '@/page-subspecialty/views/modules/nurseManagement/schedule/setOperaTime.vue' | |||
| /* eslint-disable */ | |||
| export default { | |||
|   props: { | |||
|     dateValue: { | |||
|       type: String, | |||
|       default: moment(new Date()).format("YYYY-MM-DD") | |||
|     }, | |||
|     timeValue: { | |||
|       type: String, | |||
|       default: "00:00" | |||
|     }, | |||
|     title: { | |||
|       type: String, | |||
|       default: '' | |||
|     }, | |||
|     titleButton: { | |||
|       type: String, | |||
|       default: '' | |||
|     }, | |||
|     // 号源标识 1:手术号源 2:检查号源  type----- 1:手术日程,2:术前核查 | |||
|     sourceFlag: { | |||
|       type: Number, | |||
|       default: null | |||
|     }, | |||
|   }, | |||
|   components: { | |||
|     SetOperaTime, | |||
|     NumberDetailManage, | |||
|     addSchedule, | |||
|   }, | |||
|   data() { | |||
|     return { | |||
|       pageLoading:false, | |||
|       currentYear: 1970, // 年份 | |||
|       currentMonth: 1, // 月份 | |||
|       currentDay: 1, // 日期 | |||
|       currentWeek: 1, // 星期 | |||
|       days: [], | |||
|       value1: "", | |||
|       tabIndex: null, | |||
|       newDate: moment(new Date()).format("YYYY-MM-DD"), | |||
|       tabTimeIndex: 4, | |||
|       times: [ | |||
|         { time: "00:00:00~06:00:00", label: "00:00~06:00" }, | |||
|         { time: "06:00:00~12:00:00", label: "06:00~12:00" }, | |||
|         { time: "12:00:00~18:00:00", label: "12:00~18:00" }, | |||
|         { time: "18:00:00~24:00:00", label: "18:00~24:00" }, | |||
|         { time: "00:00:00~24:00:00", label: "今日全部" } | |||
|       ], | |||
|       numberManageVisible: false, | |||
|       setOperaTimeVisible:false, | |||
|       operationDetailVisible: false, | |||
|       mouseMoveIsShow: false, | |||
|       currentIndex: null, | |||
|       currentWeekIndex: null, | |||
|       showMorningAfterText: '', | |||
|       addScheduleVisible: false, | |||
|       selectedShow: false, | |||
|       doctorList:[], | |||
|       doctorList1: [{ | |||
|         doctorCode: "liucan", | |||
|         doctorName: "刘灿", | |||
|         weekInfo: [{ | |||
|           after: { | |||
|             numSourceTotal: 0, | |||
|             orderNum: 10, | |||
|             scheduledPatients: [], | |||
|           }, | |||
|           morning: { | |||
|             numSourceTotal: 0, | |||
|             orderNum: 5, | |||
|             scheduledPatients: [], | |||
|           }, | |||
|           date: "2023-04-03", | |||
|           weekName: "周一", | |||
|         },{ | |||
|           after: { | |||
|             numSourceTotal: 0, | |||
|             orderNum: 0, | |||
|             scheduledPatients: [], | |||
|           }, | |||
|           morning: { | |||
|             numSourceTotal: 0, | |||
|             orderNum: 0, | |||
|             scheduledPatients: [], | |||
|           }, | |||
|           date: "2023-04-04", | |||
|           weekName: "周二", | |||
|         },{ | |||
|           after: { | |||
|             numSourceTotal: 0, | |||
|             orderNum: 0, | |||
|             scheduledPatients: [], | |||
|           }, | |||
|           morning: { | |||
|             numSourceTotal: 0, | |||
|             orderNum: 0, | |||
|             scheduledPatients: [], | |||
|           }, | |||
|           date: "2023-04-05", | |||
|           weekName: "周三", | |||
|         },{ | |||
|           after: { | |||
|             numSourceTotal: 0, | |||
|             orderNum: 0, | |||
|             scheduledPatients: [], | |||
|           }, | |||
|           morning: { | |||
|             numSourceTotal: 0, | |||
|             orderNum: 0, | |||
|             scheduledPatients: [], | |||
|           }, | |||
|           date: "2023-04-06", | |||
|           weekName: "周四", | |||
|         },{ | |||
|           after: { | |||
|             numSourceTotal: 10, | |||
|             orderNum: 0, | |||
|             scheduledPatients: [], | |||
|           }, | |||
|           morning: { | |||
|             numSourceTotal: 10, | |||
|             orderNum: 0, | |||
|             scheduledPatients: [], | |||
|           }, | |||
|           date: "2023-04-07", | |||
|           weekName: "周五", | |||
|         },{ | |||
|           after: { | |||
|             numSourceTotal: 0, | |||
|             orderNum: 0, | |||
|             scheduledPatients: [], | |||
|           }, | |||
|           morning: { | |||
|             numSourceTotal: 0, | |||
|             orderNum: 0, | |||
|             scheduledPatients: [], | |||
|           }, | |||
|           date: "2023-04-08", | |||
|           weekName: "周六", | |||
|         },{ | |||
|           after: { | |||
|             numSourceTotal: 0, | |||
|             orderNum: 0, | |||
|             scheduledPatients: [], | |||
|           }, | |||
|           morning: { | |||
|             numSourceTotal: 0, | |||
|             orderNum: 0, | |||
|             scheduledPatients: [], | |||
|           }, | |||
|           date: "2023-04-09", | |||
|           weekName: "周日", | |||
|         }] | |||
|       }], | |||
|       patientList: [], | |||
|       rowListObj: {}, | |||
|       operaTypeList: [], | |||
|       sortName:'批量排台' | |||
|     }; | |||
|   }, | |||
|   filters: { | |||
|     dateFormat(date) { | |||
|       return moment(date).format("YYYY-MM-DD"); | |||
|     }, | |||
|     getWeekFormat(date) { | |||
|       const weeksObj = { | |||
|         1: "周一", | |||
|         2: "周二", | |||
|         3: "周三", | |||
|         4: "周四", | |||
|         5: "周五", | |||
|         6: "周六", | |||
|         7: "周日" | |||
|       }; | |||
|       let weekNumber = moment(date).isoWeekday(); | |||
|       // console.log(weekNumber); | |||
|       return weeksObj[weekNumber]; | |||
|     } | |||
|   }, | |||
| 
 | |||
|   mounted() { | |||
|     const index = _.findIndex(this.days, function (o) { | |||
|       // console.log('o: ', o.getDate()); | |||
|       // console.log('new Date().getDate(): ', new Date().getDate()); | |||
|       return o.getDate() === new Date().getDate(); | |||
|     }); | |||
|     console.log("index: ", index); | |||
|     this.tabIndex = index; | |||
|   }, | |||
| 
 | |||
|   created() { | |||
|     this.initData(null); | |||
|     this.getScheduleList() | |||
|   }, | |||
| 
 | |||
|   methods: { | |||
|     changeInput(e,index,weekInfoIndex,morOrAft) { | |||
|       // console.log(typeof Number(e)); | |||
|       // console.log(e); | |||
|       var pattern = /^[0-9][0-9]*$/ | |||
|       var regex=/^[0]+/ | |||
|       this.doctorList[index].weekInfo[weekInfoIndex][morOrAft].numSourceTotal = e.replace(regex,""); | |||
|       if (!pattern.test(e)) { | |||
|          this.$message({ | |||
|           message: '只能输入正整数哦', | |||
|           type: 'warning' | |||
|         }) | |||
|         this.doctorList[index].weekInfo[weekInfoIndex][morOrAft].numSourceTotal = 0 | |||
|       } | |||
|     }, | |||
|     // 获取手术日程 | |||
|     async getScheduleList() { | |||
|      this.pageLoading = true | |||
|       const { data: res } = await this.$http.get('/opera/schedule', { | |||
|         params: { | |||
|           searchDate: this.newDate, | |||
|         } | |||
|       }) | |||
|       if (res.code === 0) { | |||
|         this.pageLoading = false | |||
|         this.doctorList = res.data | |||
|       } else { | |||
|         this.pageLoading = false | |||
|         this.$message.error(res.msg) | |||
|       } | |||
|     }, | |||
|     // 批量排台 | |||
|     allPtClick() { | |||
|       if(this.sortName === '批量排台') { | |||
|         this.sortName = '保存设置' | |||
|         this.getBatchNumSet() | |||
|       } else { | |||
|         this.sortName = '批量排台' | |||
|         this.batchNumSave() | |||
|       } | |||
|     }, | |||
|     // 批量排台获取 | |||
|     async getBatchNumSet() { | |||
|         const loading = this.$loading({ | |||
|           lock: true, | |||
|           text: '加载中请稍等...', | |||
|           spinner: 'el-icon-loading', | |||
|           background: 'rgba(255, 255, 255, 0.7)' | |||
|         }) | |||
|         const { data: res } = await this.$http.get('/num/source/set/getBatchNumSet', { | |||
|         params: { | |||
|           searchDate: this.newDate, | |||
|         } | |||
|       }) | |||
|       if (res.code === 0) { | |||
|         loading.close() | |||
|         this.doctorList = res.data | |||
|       } else { | |||
|         loading.close() | |||
|         this.$message.error(res.msg) | |||
|       } | |||
|     }, | |||
|     // 批量保存 | |||
|     async batchNumSave() { | |||
|       const loading = this.$loading({ | |||
|           lock: true, | |||
|           text: '保存中请稍等...', | |||
|           spinner: 'el-icon-loading', | |||
|           background: 'rgba(255, 255, 255, 0.7)' | |||
|         }) | |||
|       const {data:res} = await this.$http.post('num/source/set/batchNumSet',{ | |||
|         dtoList:this.doctorList, | |||
|         searchDate:this.newDate | |||
|       }) | |||
|       if(res.code===0) { | |||
|         loading.close() | |||
|         this.$message({ | |||
|           message: '保存成功', | |||
|           type: 'success' | |||
|         }); | |||
|       } else { | |||
|         loading.close() | |||
|         this.$message.error(res.msg) | |||
|       } | |||
|     }, | |||
|     // 选择时间的传参 | |||
|     rowList(rowList) { | |||
|       console.log(rowList); | |||
|       this.rowListObj = rowList | |||
|       this.$emit('rowList', rowList) | |||
|       this.selectedShow = true | |||
|     }, | |||
|     formatDate(year, month, day) { | |||
|       const y = year; | |||
|       let m = month; | |||
|       if (m < 10) m = `0${m}`; | |||
|       let d = day; | |||
|       if (d < 10) d = `0${d}`; | |||
|       return `${y}-${m}-${d}`; | |||
|     }, | |||
|     // 日期改变时 | |||
|     pickDateChange(date) { | |||
|       let that = this; | |||
|       that.newDate = moment(date).format("YYYY-MM-DD"); | |||
|       that.$emit("dateValue", that.newDate); | |||
|       console.log("this.newDate: ", that.newDate); | |||
|       that.initData(that.newDate); | |||
|       const index = _.findIndex(that.days, function (o) { | |||
|         return o.getDate() === new Date(that.newDate).getDate(); | |||
|       }); | |||
|       this.sortName === '批量排台' ? this.getScheduleList() : this.getBatchNumSet() | |||
|       // console.log("index: ", index); | |||
|       this.tabIndex = index; | |||
|     }, | |||
|     initData(cur) { | |||
|       let date = ""; | |||
|       if (cur) { | |||
|         date = new Date(cur); | |||
|       } else { | |||
|         date = new Date(); | |||
|       } | |||
|       this.currentDay = date.getDate(); // 今日日期 几号 | |||
|       this.currentYear = date.getFullYear(); // 当前年份 | |||
|       this.currentMonth = date.getMonth() + 1; // 当前月份 | |||
|       this.currentWeek = date.getDay(); // 1...6,0  // 星期几 | |||
|       if (this.currentWeek === 0) { | |||
|         this.currentWeek = 7; | |||
|       } | |||
|       const str = this.formatDate( | |||
|         this.currentYear, | |||
|         this.currentMonth, | |||
|         this.currentDay | |||
|       ); // 今日日期 年-月-日 | |||
|       this.days.length = 0; | |||
|       // 今天是周日,放在第一行第7个位置,前面6个 这里默认显示一周,如果需要显示一个月,则第二个循环为 i<= 35- this.currentWeek | |||
|       /* eslint-disabled */ | |||
|       // 今天 | |||
|       for (let i = this.currentWeek - 1; i >= 0; i -= 1) { | |||
|         const d = new Date(str); | |||
|         d.setDate(d.getDate() - i); | |||
|         // console.log(y:" + d.getDate()) | |||
|         // console.log('d: ', d); | |||
|         this.days.push(d); | |||
|       } | |||
|       // 这个星期 | |||
|       for (let i = 1; i <= 7 - this.currentWeek; i += 1) { | |||
|         const d = new Date(str); | |||
|         d.setDate(d.getDate() + i); | |||
|         this.days.push(d); | |||
|         // console.log('d1: ', d); | |||
|       } | |||
| 
 | |||
|     }, | |||
| 
 | |||
|     // 上个星期 | |||
|     weekPre() { | |||
|       const d = this.days[0]; // 如果当期日期是7号或者小于7号 | |||
|       d.setDate(d.getDate() - 7); | |||
|       this.initData(d); | |||
|       this.newDate = dateFilterTwo(this.days[0]) | |||
|       this.sortName === '批量排台' ? this.getScheduleList() : this.getBatchNumSet() | |||
|     }, | |||
| 
 | |||
|     // 下个星期 | |||
|     weekNext() { | |||
|       const d = this.days[6]; // 如果当期日期是7号或者小于7号 | |||
|       d.setDate(d.getDate() + 7); | |||
|       this.initData(d); | |||
|       this.newDate = dateFilterTwo(this.days[0]) | |||
|       this.sortName === '批量排台' ? this.getScheduleList() : this.getBatchNumSet() | |||
|     }, | |||
|     // 上一個月  传入当前年份和月份 | |||
|     pickPre(year, month) { | |||
|       const d = new Date(this.formatDate(year, month, 1)); | |||
|       d.setDate(0); | |||
|       this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1)); | |||
|     }, | |||
| 
 | |||
|     // 下一個月  传入当前年份和月份 | |||
|     pickNext(year, month) { | |||
|       const d = new Date(this.formatDate(year, month, 1)); | |||
|       d.setDate(35); | |||
|       this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1)); | |||
|     }, | |||
| 
 | |||
|     // 当前选择日期 | |||
|     pick(date, index) { | |||
|       this.newDate = moment(date).format("YYYY-MM-DD"); | |||
|       this.$emit("dateValue", this.newDate); | |||
|       // console.log("index: ", index); | |||
|       this.tabIndex = index; | |||
|       // alert( | |||
|       //   this.formatDate(date.getFullYear(), date.getMonth() + 1, date.getDate()) | |||
|       // ); | |||
|     }, | |||
|     pickTime(time, index) { | |||
|       // console.log('time: ', time); | |||
|       let timeArr = []; | |||
|       timeArr.push(_.split(time.time, "~")); | |||
|       // console.log("timeArr: ", timeArr); | |||
|       this.$emit("timeValue", _.join(timeArr), ""); | |||
|       // console.log("index: ", index); | |||
|       this.tabTimeIndex = index; | |||
|       // alert( | |||
|       //   this.formatDate(date.getFullYear(), date.getMonth() + 1, date.getDate()) | |||
|       // ); | |||
|     }, | |||
|     // 鼠标移入 | |||
|     mouseoverHandle(index, weekInfoIndex, weekInfoItem, showMorningAfterText) { | |||
|       // console.log(weekInfoItem[showMorningAfterText]); | |||
|       let numSourceTotal = weekInfoItem[showMorningAfterText].numSourceTotal | |||
|       let orderNum = weekInfoItem[showMorningAfterText].orderNum | |||
|       this.currentIndex = index | |||
|       this.currentWeekIndex = weekInfoIndex | |||
|       this.showMorningAfterText = showMorningAfterText | |||
| 
 | |||
|       this.mouseMoveIsShow = this.title == 'plus' ? (numSourceTotal > 0 && numSourceTotal !== orderNum ? true : false) : true | |||
|     }, | |||
|     // 鼠标移出 | |||
|     mouseoutHandle() { | |||
|       this.currentIndex = null | |||
|       this.currentWeekIndex = null | |||
|       this.showMorningAfterText = '' | |||
|       this.mouseMoveIsShow = false | |||
|     }, | |||
|     // 默认开关 | |||
|     switchChange(index,e) { | |||
|       console.log(index,e); | |||
|       this.doctorList[index].isDefault = e ? 1 : 0 | |||
|     }, | |||
|     // 新增日程安排 | |||
|     addPatientHandle(item, weekInfoItem, flag) { | |||
|       // console.log(weekInfoItem); | |||
|       this.addScheduleVisible = true | |||
|       this.$nextTick(() => { | |||
|         this.$refs.addScheduleRef.dataForm.title = '预约医生' | |||
|         this.$refs.addScheduleRef.dataForm.doctorName = item.doctorName | |||
|         this.$refs.addScheduleRef.dataForm.doctorCode = item.doctorCode | |||
|         this.$refs.addScheduleRef.dataForm.operaName = item.expertise | |||
|         this.$refs.addScheduleRef.dataForm.operaTime = flag === 'morning' ? weekInfoItem.date + ' 07:30:00' : weekInfoItem.date + ' 14:00:00' | |||
|         this.$refs.addScheduleRef.params = item | |||
|         this.$refs.addScheduleRef.init() | |||
|       }) | |||
|     }, | |||
|     // 单选 | |||
|     handleCurrentChange(val) { | |||
|       this.currentRow = val; | |||
|     }, | |||
|     // 号源管理 | |||
|     async numberMangeClick(item, weekInfoItem, morOrAft, title) { | |||
|       this.numberMangeClickFun(item, weekInfoItem, morOrAft, title) | |||
|       // if (this.title === 'plus' && this.titleButton !== '选择核查日期') { | |||
|       //   // 选择医生时判断医生有没有手术权限 | |||
|       //   const { data: res } = await this.$http.post('/num/source/authorDoctor', { | |||
|       //     doctorCode: item.doctorCode, | |||
|       //     operaVOList: this.operaTypeList | |||
|       //   }) | |||
|       //   if (res.code === 0) { | |||
|       //     this.numberMangeClickFun(item, weekInfoItem, morOrAft, title) | |||
|       //   } else { | |||
|       //     this.$message.error(res.msg) | |||
|       //   } | |||
|       // } else { | |||
|       //   this.numberMangeClickFun(item, weekInfoItem, morOrAft, title) | |||
|       // } | |||
| 
 | |||
|     }, | |||
|     numberMangeClickFun(item, weekInfoItem, morOrAft, title) { | |||
|       this.numberManageVisible = true | |||
|       this.$nextTick(() => { | |||
|         console.log(weekInfoItem.date); | |||
|         this.$refs.numberManageRef.mainDoctorName = item.doctorName | |||
|         this.$refs.numberManageRef.weekName = weekInfoItem.weekName | |||
|         this.$refs.numberManageRef.morOrAft = morOrAft | |||
|         this.$refs.numberManageRef.title = title | |||
|         this.$refs.numberManageRef.dataForm.doctorCode = item.doctorCode | |||
|         this.$refs.numberManageRef.dataForm.operaDate = weekInfoItem.date | |||
|         this.$refs.numberManageRef.init() | |||
|       }) | |||
|     }, | |||
|     // 设置时间 | |||
|     setOperaTImeClick(item, weekInfoItem, morOrAft, title) { | |||
|       // 判断时间是否过时 | |||
|       const time = morOrAft=== 1 ? '13:30:00' : '21:00:00' | |||
|       const operaDateTime = weekInfoItem.date + ' ' +  time | |||
|       // 时间 | |||
|       const operaTime = new Date(operaDateTime) | |||
|       // 现在时间 | |||
|       const nowTime = new Date() | |||
|       console.log(operaTime); | |||
|       console.log(nowTime); | |||
|       if (operaTime > nowTime) { | |||
|           this.setOperaTimeVisible=true | |||
|           this.$nextTick(() => { | |||
|             // 如果日期相同,医生相同,时间段相同再回显时间 | |||
|             if(this.rowListObj.operaDate===weekInfoItem.date && this.rowListObj.mainDoctorName === item.doctorName && this.rowListObj.morOrAft===morOrAft) { | |||
|               this.$refs.setOperaTimeRef.dataForm.operaTime = this.rowListObj.operaTime | |||
|             } | |||
|             this.$refs.setOperaTimeRef.dataForm.mainDoctorName = item.doctorName | |||
|             this.$refs.setOperaTimeRef.weekName = weekInfoItem.weekName | |||
|             this.$refs.setOperaTimeRef.morOrAft = morOrAft | |||
|             this.$refs.setOperaTimeRef.title = title | |||
|             this.$refs.setOperaTimeRef.dataForm.mainDoctorCode = item.doctorCode | |||
|             this.$refs.setOperaTimeRef.dataForm.operaDate = weekInfoItem.date | |||
|              | |||
|             this.$refs.setOperaTimeRef.init() | |||
|           }) | |||
|       } else { | |||
|         this.$message({ | |||
|           message: '时间已过时,不可设置', | |||
|           type: 'warning' | |||
|         }) | |||
|       } | |||
|       // console.log(this.rowListObj); | |||
|       | |||
|     }, | |||
|   } | |||
| }; | |||
| </script> | |||
| 
 | |||
| <style lang="scss" scoped> | |||
| .doctor-schedule { | |||
|   font-size: 14px; | |||
|   margin-top: 15px; | |||
|   .date-head { | |||
|     display: flex; | |||
|     justify-content: space-between; | |||
|     align-items: center; | |||
|     padding-bottom: 10px; | |||
|     .date-head-left { | |||
|       font-size: 16px; | |||
|     } | |||
|   } | |||
|   .data-head-fixed { | |||
|     padding: 10px 16px 0 16px; | |||
|     position: fixed; | |||
|     top: 60px; | |||
|     right: 20px; | |||
|     z-index: 0; | |||
|   } | |||
|   .doctor-schedule-content { | |||
|     background: #f7f9fd; | |||
|     padding: 10px 0; | |||
|     .weeks { | |||
|       display: flex; | |||
|       padding-bottom: 10px; | |||
|       border-bottom: 1px solid #e2ebf9; | |||
|       color: #88939d; | |||
|       .doctor-list-text,.moren { | |||
|         display: flex; | |||
|         justify-content: center; | |||
|         align-items: center; | |||
|         width: 5%; | |||
|         text-align: center; | |||
|       } | |||
|       .date-day { | |||
|         text-align: center; | |||
|         margin-bottom: 10px; | |||
|       } | |||
|       .morning-after { | |||
|         display: flex; | |||
|         justify-content: space-around; | |||
|       } | |||
|       .date-item { | |||
|         cursor: pointer; | |||
|         padding: 5px 10px; | |||
|         border-right: none; | |||
|         list-style: none; | |||
|         flex: 1; | |||
|         text-align: center; | |||
|         &:hover { | |||
|           background: #dff0d8; | |||
|         } | |||
|         &:active { | |||
|           background: #dff0d8; | |||
|         } | |||
|       } | |||
|     } | |||
|     .scroll-list { | |||
|       height: calc(100vh - 50px - 220px); | |||
|       overflow-y: auto; | |||
|       overflow-x: hidden; | |||
|       .doctor-name { | |||
|         width: 5%; | |||
|       } | |||
|     } | |||
|     .content { | |||
|       border-bottom: 1px solid #e2ebf9; | |||
|       padding: 16px 0; | |||
|       display: flex; | |||
|       align-items: center; | |||
|       justify-content: space-between; | |||
|       .doctorList { | |||
|         text-align: center; | |||
|         .list { | |||
|           display: flex; | |||
|           flex-direction: column; | |||
|           align-items: center; | |||
|           justify-content: center; | |||
|         } | |||
|         .list-img { | |||
|           width: 64px; | |||
|           height: 64px; | |||
|           border-radius: 50%; | |||
|           overflow: hidden; | |||
|           img { | |||
|             width: 64px; | |||
|             height: 64px; | |||
|           } | |||
|         } | |||
|       } | |||
|       .surplu-num { | |||
|         display: flex; | |||
|         justify-content: center; | |||
|         .surplu-num-morning, | |||
|         .surplu-num-after { | |||
|           width: 45%; | |||
|           height: 60px; | |||
|           position: relative; | |||
|         } | |||
|         .morning-top, | |||
|         .after-top { | |||
|           position: absolute; | |||
|           width: 100%; | |||
|           height: 100%; | |||
|           border-radius: 3px; | |||
|           display: flex; | |||
|           flex-direction: column; | |||
|           justify-content: center; | |||
|           align-items: center; | |||
|           z-index: 1; | |||
|           background: #1b5bfb; | |||
|           color: #fff; | |||
|         } | |||
|         .morning, | |||
|         .after { | |||
|           position: relative; | |||
|           color: #88939d; | |||
|           width: 100%; | |||
|           height: 100%; | |||
|           border-radius: 3px; | |||
|           background: #fff; | |||
|           overflow: hidden; | |||
|           .yue-man, | |||
|           .yi-yue, | |||
|           .none { | |||
|             width: 100%; | |||
|             height: 100%; | |||
|             display: flex; | |||
|             flex-direction: column; | |||
|             align-items: center; | |||
|             justify-content: center; | |||
|             font-size: 14px; | |||
|             p:nth-child(1) { | |||
|               color: #88939d; | |||
|             } | |||
|             p:nth-child(2) { | |||
|               font-weight: 700; | |||
|             } | |||
|           } | |||
|           .yue-man { | |||
|             border-top: 2px solid #f40000; | |||
|             p:nth-child(2) { | |||
|               color: #f40000; | |||
|             } | |||
|           } | |||
|           .yi-yue { | |||
|             border-top: 2px solid #00bb61; | |||
|             p:nth-child(2) { | |||
|               color: #00bb61; | |||
|             } | |||
|           } | |||
|           .none { | |||
|             border-top: 2px solid #e1e1e1; | |||
|           } | |||
|         } | |||
|         .after, | |||
|         .after-top { | |||
|           margin-left: 6px; | |||
|         } | |||
|         .morningAfterClass { | |||
|           border-top: 2px solid #e1e1e1; | |||
|           background: #fcfdfe; | |||
|         } | |||
|         .morning:hover, | |||
|         .after:hover { | |||
|           box-shadow: 0px 0px 16px rgba(8, 115, 215, 0.24); | |||
|         } | |||
|         .show-plus-one:hover { | |||
|           border-top: 2px solid #1b5bfb !important; | |||
|         } | |||
|         .show-plus-one, | |||
|         .show-plus-two { | |||
|           width: 100%; | |||
|           height: 100%; | |||
|           background: #fff; | |||
|           position: absolute; | |||
|           left: 0; | |||
|           top: 0; | |||
|           z-index: 999; | |||
|           text-align: center; | |||
|         } | |||
|         .show-plus-one { | |||
|           font-size: 12px; | |||
|           p { | |||
|             height: 50%; | |||
|             display: flex; | |||
|             align-items: center; | |||
|             justify-content: center; | |||
|             color: #1e79ff; | |||
|             cursor: pointer; | |||
|           } | |||
|           p:nth-child(1) { | |||
|             border-bottom: 1px solid #f1f1f1; | |||
|           } | |||
|         } | |||
|         .show-plus-two { | |||
|           font-size: 24px; | |||
|           display: flex; | |||
|           align-items: center; | |||
|           justify-content: center; | |||
|           cursor: pointer; | |||
|         } | |||
|       } | |||
|     } | |||
|     .content:nth-last-child(1) { | |||
|       border-bottom: 0; | |||
|     } | |||
|   } | |||
| 
 | |||
|   .time-range { | |||
|     display: flex; | |||
|     justify-content: space-around; | |||
|     align-items: center; | |||
|     padding: 10px 0; | |||
|     span { | |||
|       cursor: pointer; | |||
|       padding-bottom: 5px; | |||
|       border-bottom: 3px solid #fff; | |||
|       &:hover { | |||
|         border-bottom: 3px solid rgb(151, 198, 245); | |||
|       } | |||
|     } | |||
|   } | |||
| } | |||
| .today-item { | |||
|   cursor: pointer; | |||
|   line-height: 45px; | |||
| } | |||
| .selected { | |||
|   box-sizing: border-box; | |||
| } | |||
| .item-wrapper { | |||
|   display: flex; | |||
|   justify-content: center; | |||
|   align-items: center; | |||
|   flex-direction: column; | |||
| } | |||
| .doctor-list-text, | |||
| .prev-btn, | |||
| .next-btn { | |||
|   cursor: pointer; | |||
|   display: flex; | |||
|   justify-content: center; | |||
|   align-items: center; | |||
|   .fa-icon { | |||
|     font-size: 18px; | |||
|   } | |||
| } | |||
| </style> | |||
| <style lang="scss"> | |||
| .surplu-num { | |||
|     .el-input__inner { | |||
|       text-align: center; | |||
|       height: 60px; | |||
|       line-height: 60px; | |||
|     } | |||
|   } | |||
| </style> | |||
| @ -0,0 +1,119 @@ | |||
| <template> | |||
|   <el-dialog class="edit-operation" :visible.sync="visible" title="修改" append-to-body @close="closeDialog"> | |||
|     <el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="auto" @keyup.enter.native="dataFormSubmitHandle()"> | |||
|       <div class="head"> | |||
|         <span>姓名:{{ patientInfo.patientName ? patientInfo.patientName : '-' }}</span> | |||
|         <span>性别:{{ patientInfo.patientSex ? patientInfo.patientSex : '-' }}</span> | |||
|         <span>年龄:{{ patientInfo.patientAge ? patientInfo.patientAge : '-' }}</span> | |||
|         <span>已约日期:{{ patientInfo.appointmentDate ? patientInfo.appointmentDate : '-' }}</span> | |||
|         <span>已约时间:{{ patientInfo.appointmentTime ? patientInfo.appointmentTime.substr(0, 5) : '-' }}</span> | |||
|       </div> | |||
|       <el-form-item label="修改时间:" prop="operaTime"> | |||
|         <el-time-select | |||
|           v-model="dataForm.operaTime" | |||
|           placeholder="请设置时间" | |||
|           :picker-options="dataForm.morOrAft === 1 ? { | |||
|             start: '07:30', | |||
|             step: '00:15', | |||
|             end: '13:30' | |||
|           } : { | |||
|             start: '14:00', | |||
|             step: '00:15', | |||
|             end: '21:00' | |||
|           }" | |||
|         /> | |||
|       </el-form-item> | |||
|     </el-form> | |||
|     <template slot="footer"> | |||
|       <el-button @click="visible = false">{{ $t('cancel') }}</el-button> | |||
|       <el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> | |||
|     </template> | |||
|   </el-dialog> | |||
| </template> | |||
| 
 | |||
| <script> | |||
| export default { | |||
|   props: { | |||
|   }, | |||
|   data() { | |||
|     return { | |||
|       visible: false, | |||
|       menuList: [], | |||
|       tempMenuIdList: [], | |||
|       dataForm: { | |||
|         operaTime: '', | |||
|         morOrAft: '' | |||
|       }, | |||
|       patientInfo: { | |||
|         patientAge: '', | |||
|         patientName: '', | |||
|         patientSex: '' | |||
|       } | |||
|     } | |||
|   }, | |||
|   computed: { | |||
|     dataRule() { | |||
|       return { | |||
|         operaTime: [ | |||
|           { required: true, message: '请选择预约时间', trigger: 'blur' } | |||
|         ] | |||
|       } | |||
|     } | |||
|   }, | |||
|   methods: { | |||
|     init() { | |||
|       this.visible = true | |||
|       this.$nextTick(() => { | |||
|         console.log(this.dataForm) | |||
|       }) | |||
|     }, | |||
|     // 表单提交 | |||
|     dataFormSubmitHandle() { | |||
|       this.$refs.dataForm.validate((valid) => { | |||
|         if (!valid) { | |||
|           return false | |||
|         } | |||
|         this.$http.post('/num/source/updateNumSourceTime', { | |||
|           appointmentTime: this.dataForm.operaTime + ':00', | |||
|           numSourceId: this.patientInfo.numSourceId | |||
|         }).then(({ data: res }) => { | |||
|           if (res.code !== 0) { | |||
|             return this.$message.error(res.msg) | |||
|           } | |||
|           this.$message({ | |||
|             message: this.$t('prompt.success'), | |||
|             type: 'success', | |||
|             duration: 500, | |||
|             onClose: () => { | |||
|               this.visible = false | |||
|               this.$emit('getPatientList') | |||
|             } | |||
|           }) | |||
|         }).catch(() => {}) | |||
|       }) | |||
|     }, | |||
|     closeDialog() { | |||
|       this.$emit('closeDialog') | |||
|     } | |||
|   } | |||
| } | |||
| </script> | |||
| <style lang="scss"> | |||
| .edit-operation{ | |||
|   .head { | |||
|     font-size: 14px; | |||
|     padding: 10px; | |||
|     margin: 4px 0 30px 0; | |||
|     background: #eff4ff; | |||
|     border: 1px solid #c5d5fe; | |||
|     display: flex; | |||
|     justify-content: space-between; | |||
|   } | |||
|   .el-dialog__header { | |||
|     margin-bottom:12px | |||
|   } | |||
|   .el-date-editor.el-input, .el-date-editor.el-input__inner { | |||
|     width: 100%; | |||
|   } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,62 @@ | |||
| <template> | |||
|   <div class="schedule-date"> | |||
|     <div class="tab-content"> | |||
|       <el-tabs> | |||
|         <el-tab-pane> | |||
|           <!-- <svg-icon icon-class="icon-no-scheduled" style="font-size:13px;" /> --> | |||
|           <span slot="label" class="no-schedule-tab"><i class="el-icon-scissors" /> 手术医生日程</span> | |||
|           <!-- 号源标识 1:手术号源 2:检查号源 --> | |||
|           <doctorSchedule title="newAddNUm" /> | |||
|         </el-tab-pane> | |||
|         <!-- <el-tab-pane label="待审核"> | |||
|           <span slot="label" class="no-schedule-tab"><i class="el-icon-reading" /> 检查医生日程</span>> | |||
|           <doctorSchedule :source-flag="2" title="newAddNUm" /> | |||
|         </el-tab-pane> --> | |||
|       </el-tabs> | |||
|     </div> | |||
|   </div> | |||
| </template> | |||
| 
 | |||
| <script> | |||
| /* eslint-disable */ | |||
| import DoctorSchedule from "@/page-subspecialty/views/modules/nurseManagement/schedule/doctor-schedule.vue"; | |||
| 
 | |||
| export default { | |||
|   components: { | |||
|     DoctorSchedule | |||
|   }, | |||
|   data() { | |||
|     return { | |||
|     }; | |||
|   }, | |||
| 
 | |||
|   created() { | |||
|   }, | |||
| 
 | |||
|   methods: { | |||
|   } | |||
| }; | |||
| </script> | |||
| 
 | |||
| <style lang="scss" scoped> | |||
| .schedule-date { | |||
|   font-size: 14px; | |||
|   .tab-content { | |||
|     background: #fff; | |||
| 
 | |||
|   } | |||
|   | |||
| } | |||
| 
 | |||
| </style> | |||
| <style lang="scss"> | |||
| .schedule-date { | |||
|   .el-tabs__nav-wrap::after { | |||
|     height: 0; | |||
|   } | |||
|   .el-tabs__header { | |||
|     padding: 0 10px; | |||
|     margin: 0; | |||
|   } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,413 @@ | |||
| <template> | |||
|   <el-dialog top="30px" class="number-manage" append-to-body :visible.sync="visible" width="70%" :title="title" @close="closeDialog"> | |||
|     <div class="number-manage-head"> | |||
|       <div class="head-content"> | |||
|         <span class="head-content-left"> | |||
|           <span>医生姓名:</span> | |||
|           <span>{{ doctorName }}</span> | |||
|         </span> | |||
|         <span class="head-content-right"> | |||
|           <span>排台日期:</span> | |||
|           <span>{{ dataForm.operaDate }}</span> | |||
|           <span>{{ weekName }}</span> | |||
|           <span>{{ morOrAft===1 ? '上午' : '下午' }}</span> | |||
|         </span> | |||
|       </div> | |||
|     </div> | |||
|     <el-form v-if="title !=='排台详情'" ref="dataForm" :model="dataForm" :rules="dataRule" class="form-content"> | |||
|       <div class="form-one"> | |||
|         <el-form-item label="总数:" prop="total" label-width="70px" class="total-form"> | |||
|           <el-input-number | |||
|             v-model="dataForm.total" | |||
|             controls-position="right" | |||
|             :min="1" | |||
|           /> | |||
|         </el-form-item> | |||
|       </div> | |||
|       <div class="button" @click="creatNumberClick">生成预约号</div> | |||
|     </el-form> | |||
|     <div class="number-list"> | |||
|       <el-table | |||
|         ref="multipleTable" | |||
|         class="number-table" | |||
|         :highlight-current-row="title !=='排台管理' ? true : false" | |||
|         :data="dataList" | |||
|         tooltip-effect="dark" | |||
|         style="width: 100%" | |||
|         :height="title==='排台管理' ? '300px' : '450px'" | |||
|         :row-class-name="tableRowClassName" | |||
|         @row-click="rowClick" | |||
|         @selection-change="handleSelectionChange" | |||
|       > | |||
|         <el-table-column v-if="title !=='排台详情'" type="selection" width="55" /> | |||
|         <el-table-column type="index" label="序号" /> | |||
|         <el-table-column prop="appointmentDate" label="预约日期" align="center" /> | |||
|         <el-table-column label="时间段" align="center"> | |||
|           <template slot-scope="scope">{{ scope.row.morOrAft===1 ? '上午' : '下午' }}</template> | |||
|         </el-table-column> | |||
|         <el-table-column label="预约时间" align="center"> | |||
|           <template slot-scope="scope">{{ scope.row.appointmentTime ? scope.row.appointmentTime.substr(0, 5) : '-' }}</template> | |||
|         </el-table-column> | |||
|         <template v-if="title=='排台详情'"> | |||
|           <el-table-column | |||
|             prop="patientName" | |||
|             label="姓名" | |||
|           > | |||
|             <template slot-scope="scope">{{ scope.row.patientName ? scope.row.patientName : '-' }}</template> | |||
|           </el-table-column> | |||
|           <el-table-column | |||
|             prop="patientSex" | |||
|             label="性别" | |||
|           > | |||
|             <template slot-scope="scope">{{ scope.row.patientSex ? scope.row.patientSex : '-' }}</template> | |||
|           </el-table-column> | |||
|           <el-table-column | |||
|             prop="patientAge" | |||
|             label="年龄" | |||
|           > | |||
|             <template slot-scope="scope">{{ scope.row.patientSex ? scope.row.patientAge : '-' }}</template> | |||
|           </el-table-column> | |||
|         </template> | |||
|         <!-- 状态 0:可用,1:已预约,2:已过时 --> | |||
|         <el-table-column label="号源状态" prop="status" header-align="center" align="center"> | |||
|           <template slot-scope="scope"> | |||
|             <div v-show="scope.row.status == 0"> | |||
|               <span class="circle-status circle-blue" /> | |||
|               <span>可用</span> | |||
|             </div> | |||
|             <div v-show="scope.row.status == 1"> | |||
|               <span class="circle-status circle-green" /> | |||
|               <span>已预约</span> | |||
|             </div> | |||
|             <div v-show="scope.row.status == 2"> | |||
|               <span class="circle-status circle-red" /> | |||
|               <span>已过时</span> | |||
|             </div> | |||
|           </template> | |||
|         </el-table-column> | |||
| 
 | |||
|         <el-table-column prop="operation" label="操作" header-align="center" align="center"> | |||
|           <template slot-scope="scope"> | |||
|             <!-- 号源状态 0 可用 1 已预约 2 过时 --> | |||
|             <span | |||
|               v-if="title==='排台详情' && scope.row.status=== 1 && new Date(scope.row.appointmentDate + ' ' + (morOrAft=== 1 ? '12:00:00' : '20:00:00') ) > new Date()" | |||
|               style="color: #1890ff; padding-right: 8px" | |||
|               class="operation-details" | |||
|               @click="editHandle(scope.row,'修改')" | |||
|             >修改</span> | |||
|             <span | |||
|               v-if="title==='排台管理' && scope.row.status ===0 && new Date(scope.row.appointmentDate + ' ' + (morOrAft=== 1 ? '12:00:00' : '20:00:00') ) > new Date()" | |||
|               style="color: #fd4d4f; padding-right: 8px" | |||
|               class="operation-details" | |||
|               @click="deleteHandle(scope.row)" | |||
|             >删除</span> | |||
|             <span | |||
|               v-if="(title==='排台管理' && scope.row.status ===1) || | |||
|                 (title==='排台详情' && scope.row.status ===0) || | |||
|                 scope.row.status ===2 || | |||
|                 new Date(scope.row.appointmentDate + ' ' + (morOrAft=== 1 ? '12:00:00' : '20:00:00') ) < new Date()" | |||
|             >无</span> | |||
|           </template> | |||
|         </el-table-column> | |||
|       </el-table> | |||
|     </div> | |||
|     <template v-if="title !=='排台详情'" slot="footer"> | |||
|       <div> | |||
|         <el-button v-if="title==='排台管理' && dataList.length>0" type="danger" plain @click="batchDeleteClick">批量删除</el-button> | |||
|       </div> | |||
|       <div> | |||
|         <el-button @click="visible = false">关闭</el-button> | |||
|       </div> | |||
|     </template> | |||
|     <editOperation | |||
|       v-if="editOperationVisible" | |||
|       ref="editOperationRef" | |||
|       @closeDialog="editOperationVisible=false" | |||
|       @getPatientList="getPatientList" | |||
|     /> | |||
|   </el-dialog> | |||
| </template> | |||
| 
 | |||
| <script> | |||
| import EditOperation from '@/page-subspecialty/views/modules/nurseManagement/schedule/edit-operation.vue' | |||
| 
 | |||
| export default { | |||
|   components: { EditOperation }, | |||
|   props: { | |||
|     patientTypeList: { | |||
|       type: Array, | |||
|       default: () => [] | |||
|     } | |||
|   }, | |||
|   data() { | |||
|     return { | |||
|       visible: false, | |||
|       morOrAft: '', // 上下午 | |||
|       weekName: '', // 星期几 | |||
|       title: '', | |||
|       doctorName: '', | |||
|       dataForm: { | |||
|         operaDate: '', // 预约日期(年月日) | |||
|         doctorCode: '', // 医生工号 | |||
|         morOrAft: '', | |||
|         total: '' // 总数 | |||
|       }, | |||
|       dataList: [], | |||
|       currentTableList: [], | |||
|       currentTableId: [], | |||
|       rowListObj: {}, | |||
|       editOperationVisible: false | |||
|     } | |||
|   }, | |||
|   computed: { | |||
|     dataRule() { | |||
|       return { | |||
|         startNum: [ | |||
|           { required: true, message: '请输入起始号', trigger: 'change' } | |||
|         ], | |||
|         total: [ | |||
|           { required: true, message: '请输入总数', trigger: 'change' } | |||
|         ], | |||
|         startTime: [ | |||
|           { required: true, message: '请选择开始时间', trigger: 'change' } | |||
|         ], | |||
|         interval: [ | |||
|           { required: true, message: '请输入间隔时间', trigger: 'change' } | |||
|         ] | |||
|       } | |||
|     } | |||
|   }, | |||
|   methods: { | |||
|     init() { | |||
|       this.visible = true | |||
|       this.$nextTick(() => { | |||
|         this.$refs.dataForm ? this.$refs.dataForm.resetFields() : '' // 重置表单 | |||
|         this.dataForm.morOrAft = this.morOrAft | |||
|         this.title === '排台详情' ? this.getPatientList() : this.getSourceList() | |||
|       }) | |||
|     }, | |||
|     // 获取预约患者详情 | |||
|     async getPatientList() { | |||
|       const { data: res } = await this.$http.get('/opera/schedule/getScheduleInfo', { | |||
|         params: { | |||
|           doctorCode: this.dataForm.doctorCode, // 医生工号 | |||
|           morOrAft: this.morOrAft, // morOrAft --1:上午,2:下午 | |||
|           searchDate: this.dataForm.operaDate // 搜索日期 | |||
|         } | |||
|       }) | |||
|       if (res.code === 0) { | |||
|         this.dataList = res.data | |||
|       } else { | |||
|         this.$message.error(res.msg) | |||
|       } | |||
|     }, | |||
|     // 生成预约号 | |||
|     async creatNumberClick() { | |||
|       const time = this.morOrAft === 1 ? '12:00:00' : '20:00:00' | |||
|       const operaDateTime = this.dataForm.operaDate + ' ' + time | |||
|       // 时间 | |||
|       const operaTime = new Date(operaDateTime) | |||
|       // 现在时间 | |||
|       const nowTime = new Date() | |||
|       if (operaTime > nowTime) { | |||
|         const { data: res } = await this.$http.post('/num/source/createNumSource', this.dataForm) | |||
|         if (res.code === 0) { | |||
|           this.getSourceList() | |||
|         } else { | |||
|           this.$message.error(res.msg) | |||
|         } | |||
|       } else { | |||
|         this.$message({ | |||
|           message: '当前日期已过时,不可生成号源', | |||
|           type: 'warning' | |||
|         }) | |||
|       } | |||
|     }, | |||
|     // 获取排台管理列表 | |||
|     async getSourceList() { | |||
|       const { data: res } = await this.$http.get('/num/source/getList', { | |||
|         params: { | |||
|           doctorCode: this.dataForm.doctorCode, // 医生工号 | |||
|           morOrAft: this.morOrAft, // morOrAft --1:上午,2:下午 | |||
|           searchDate: this.dataForm.operaDate // 搜索日期 | |||
|         } | |||
|       }) | |||
|       if (res.code === 0) { | |||
|         this.dataList = res.data | |||
|         // 选中哪一行 | |||
|         this.dataList.forEach((item, index) => { | |||
|           if (this.rowListObj.id === item.id) { | |||
|             this.rowListObj.operaTime && this.$refs.multipleTable ? this.$refs.multipleTable.setCurrentRow(this.dataList[index]) : '' | |||
|           } | |||
|         }) | |||
|       } else { | |||
|         this.$message.error(res.msg) | |||
|       } | |||
|     }, | |||
|     // 表格批量选择 | |||
|     handleSelectionChange(val) { | |||
|       // console.log(val) | |||
|       this.currentTableList = val | |||
|       this.currentTableId = [] | |||
|       this.currentTableList.forEach(item => { | |||
|         this.currentTableId.push(item.id) | |||
|       }) | |||
|       console.log(this.currentTableId) | |||
|     }, | |||
|     // 点击行 | |||
|     rowClick(val) { | |||
|       console.log('点击rowClick', val) | |||
|       this.rowListObj = val | |||
|     }, | |||
|     // 把每一行的索引放进row | |||
|     tableRowClassName({ row, rowIndex }) { | |||
|       row.index = rowIndex | |||
|     }, | |||
|     // 修改 | |||
|     editHandle(scopeRow) { | |||
|       this.editOperationVisible = true | |||
|       this.$nextTick(() => { | |||
|         this.$refs.editOperationRef.dataForm.operaTime = scopeRow.appointmentTime.substr(0, 5) | |||
|         this.$refs.editOperationRef.dataForm.morOrAft = scopeRow.morOrAft | |||
|         this.$refs.editOperationRef.patientInfo = scopeRow | |||
| 
 | |||
|         this.$refs.editOperationRef.init() | |||
|       }) | |||
|     }, | |||
|     // 删除 | |||
|     async deleteHandle(scopeRow) { | |||
|       this.deleteClickFun([scopeRow.id]) | |||
|     }, | |||
|     // 批量删除 | |||
|     batchDeleteClick() { | |||
|       if (this.currentTableId.length > 0) { | |||
|         this.deleteClickFun(this.currentTableId) | |||
|       } else { | |||
|         this.$message({ | |||
|           message: '请选择删除项', | |||
|           type: 'warning' | |||
|         }) | |||
|       } | |||
|     }, | |||
|     // 删除--保存过的预约号 | |||
|     deleteClickFun(id) { | |||
|       this.$confirmFun('您确定要删除吗?').then(async() => { | |||
|         const { data: res } = await this.$http({ | |||
|           url: '/num/source', | |||
|           method: 'delete', | |||
|           data: id | |||
|         }) | |||
|         if (res.code === 0) { | |||
|           this.$message({ | |||
|             message: '删除成功', | |||
|             type: 'success' | |||
|           }) | |||
|           this.getSourceList() | |||
|         } else { | |||
|           this.$message.error(res.msg) | |||
|         } | |||
|       }) | |||
|     }, | |||
|     // 关闭弹框 | |||
|     closeDialog() { | |||
|       this.$emit('closeDialog') | |||
|       this.$emit('getScheduleList') | |||
|     } | |||
|   } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| .number-manage { | |||
|   .number-manage-head { | |||
|     border-bottom: 1px dashed #d6d6d6; | |||
|   } | |||
|   .head-content { | |||
|     font-size: 14px; | |||
|     padding: 10px; | |||
|     margin: 4px 0 12px 0; | |||
|     background: #eff4ff; | |||
|     border: 1px solid #c5d5fe; | |||
|     display: flex; | |||
|     justify-content: space-between; | |||
|     .head-content-left, | |||
|     .head-content-right { | |||
|       span { | |||
|         padding-right: 6px; | |||
|       } | |||
|       span:nth-child(1) { | |||
|         font-weight: 700; | |||
|       } | |||
|     } | |||
|   } | |||
|   .form-two { | |||
|     margin-left: 16px; | |||
|   } | |||
|   .operation-details { | |||
|     cursor: pointer; | |||
|   } | |||
| } | |||
| </style> | |||
| <style lang="scss"> | |||
| .number-manage { | |||
|   .el-input { | |||
|     width: auto; | |||
|   } | |||
|   .el-form-item { | |||
|     margin-bottom: 12px; | |||
|   } | |||
|   .el-form-item__content { | |||
|     display: flex; | |||
|   } | |||
|   .form-content { | |||
|     display: flex; | |||
|     align-items: center; | |||
|     justify-content: space-between; | |||
|     padding: 10px 0; | |||
|     border-bottom: 1px dashed #d6d6d6; | |||
|   } | |||
|   .total-form, | |||
|   .time-form { | |||
|     margin-bottom: 0; | |||
|   } | |||
|   .button { | |||
|     border: 1px solid #1b6de6; | |||
|     padding: 10px 10px; | |||
|     color: #1b6de6; | |||
|     cursor: pointer; | |||
|     width: 150px; | |||
|     text-align: center; | |||
|     border-radius: 6px; | |||
|   } | |||
|   .button:hover { | |||
|     background: #1b6de6; | |||
|     color: #fff; | |||
|   } | |||
|   .number-table { | |||
|     margin-top: 8px; | |||
|   } | |||
|   .el-table-column--selection .cell { | |||
|     padding-left: 10px; | |||
|   } | |||
|   .el-input-group { | |||
|     width: 80%; | |||
|   } | |||
|   .el-date-editor.el-input, .el-date-editor.el-input__inner { | |||
|     // width: 80%; | |||
|   } | |||
| 
 | |||
|   .el-table__body tr.current-row>td.el-table__cell { | |||
|     color: #fff; | |||
|     background: #1b6de6; | |||
|   } | |||
|   .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf { | |||
|     border: none; | |||
|   } | |||
|   .el-dialog__footer { | |||
|     display: flex; | |||
|     justify-content: space-between; | |||
|     align-items: center; | |||
|     padding-bottom: 10px; | |||
|   } | |||
| 
 | |||
| } | |||
| </style> | |||
| @ -0,0 +1,154 @@ | |||
| <template> | |||
|   <el-dialog append-to-body class="operation-detail" :visible.sync="visible" width="50%" :title="title"> | |||
|     <div class="operation-detail-head"> | |||
|       <div class="head-content"> | |||
|         <span class="head-content-left"> | |||
|           <span>医生姓名:</span> | |||
|           <span>刘灿</span> | |||
|         </span> | |||
|         <span class="head-content-right"> | |||
|           <span>预约日期:</span> | |||
|           <span>2022-12-24</span> | |||
|           <span>周二</span> | |||
|           <span>上午</span> | |||
|         </span> | |||
|       </div> | |||
| 
 | |||
|     </div> | |||
|     <div class="number-list"> | |||
|       <el-table | |||
|         ref="multipleTable" | |||
|         class="number-table" | |||
|         highlight-current-row | |||
|         :data="dataList" | |||
|         tooltip-effect="dark" | |||
|         style="width: 100%" | |||
|         @current-change="handleCurrentChange" | |||
|       > | |||
|         <el-table-column | |||
|           prop="name" | |||
|           label="预约号" | |||
|         /> | |||
| 
 | |||
|         <el-table-column | |||
|           label="预约时间" | |||
|         > | |||
|           <template slot-scope="scope">123</template> | |||
|         </el-table-column> | |||
|         <template v-if="title=='预约详情'"> | |||
|           <el-table-column | |||
|             prop="name" | |||
|             label="姓名" | |||
|           /> | |||
|           <el-table-column | |||
|             prop="name" | |||
|             label="性别" | |||
|           /> | |||
|           <el-table-column | |||
|             prop="name" | |||
|             label="年龄" | |||
|           /> | |||
|         </template> | |||
| 
 | |||
|         <el-table-column v-if="title=='选择时间'" label="手术状态" prop="status" header-align="center" align="center"> | |||
|           <template slot-scope="scope"> | |||
|             <div v-show="scope.row.status == 0"> | |||
|               <span class="circle-status circle-green" /> | |||
|               <span>已预约</span> | |||
|             </div> | |||
|             <div v-show="scope.row.status == 1"> | |||
|               <span class="circle-status circle-blue" /> | |||
|               <span>可用</span> | |||
|             </div> | |||
|           </template> | |||
|         </el-table-column> | |||
|       </el-table> | |||
|     </div> | |||
|     <template v-if="title==='选择时间'" slot="footer"> | |||
|       <el-button @click="visible = false">{{ $t('cancel') }}</el-button> | |||
|       <el-button type="primary" @click="dataFormSubmitHandle()">确定</el-button> | |||
|     </template> | |||
|   </el-dialog> | |||
| </template> | |||
| 
 | |||
| <script> | |||
| import debounce from 'lodash/debounce' | |||
| export default { | |||
|   props: { | |||
|   }, | |||
|   data() { | |||
|     return { | |||
|       visible: false, | |||
|       title: '', | |||
|       dataList: [], | |||
|       currentTableList: [] | |||
|     } | |||
|   }, | |||
|   computed: { | |||
|     dataRule() { | |||
|       return { | |||
|       } | |||
|     } | |||
|   }, | |||
|   methods: { | |||
|     init() { | |||
|       this.visible = true | |||
|       this.$nextTick(() => { | |||
|       }) | |||
|     }, | |||
|     handleCurrentChange() {}, | |||
|     // 获取信息 | |||
|     getInfo() { | |||
|       this.$http.get(`/patient/manage/${this.params.patientCentreId}/${this.params.patientIdNumber}`).then(({ data: res }) => { | |||
|         if (res.code !== 0) { | |||
|           return this.$message.error(res.msg) | |||
|         } | |||
|         this.dataForm = { | |||
|           ...this.dataForm, | |||
|           ...res.data | |||
|         } | |||
|       }).catch(() => { }) | |||
|     } | |||
|   } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| .operation-detail { | |||
|   .operation-detail-head { | |||
|   } | |||
|   .head-content { | |||
|     font-size: 14px; | |||
|     padding: 10px; | |||
|     margin: 4px 0 12px 0; | |||
|     background: #eff4ff; | |||
|     border: 1px solid #c5d5fe; | |||
|     display: flex; | |||
|     justify-content: space-between; | |||
|     .head-content-left,.head-content-right { | |||
|       span:nth-child(1) { | |||
|         font-weight: 700; | |||
|       } | |||
|     } | |||
|     .head-content-right { | |||
|       span:nth-child(3),span:nth-child(4) { | |||
|         padding-left: 10px; | |||
|       } | |||
|     } | |||
|   } | |||
| } | |||
| </style> | |||
| <style lang="scss"> | |||
| .operation-detail { | |||
| 
 | |||
|   .el-table-column--selection .cell { | |||
|     padding-left: 10px; | |||
|   } | |||
|   .el-table__body tr.current-row>td.el-table__cell { | |||
|     color: #fff; | |||
|     background: #1e79ff; | |||
|   } | |||
|   .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf { | |||
|     border: none; | |||
|   } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,266 @@ | |||
| <template> | |||
|   <el-dialog top="30px" class="setoperaTime" append-to-body :visible.sync="visible" width="50%" :title="title" @close="closeDialog"> | |||
| 
 | |||
|     <div class="flex-6"> | |||
|       <div class="setoperaTime-left"> | |||
|         <el-table | |||
|           ref="multipleTable" | |||
|           class="number-table" | |||
|           :highlight-current-row="true" | |||
|           :data="dataList" | |||
|           tooltip-effect="dark" | |||
|           style="width: 100%" | |||
|           :height="'450px'" | |||
|         > | |||
|           <el-table-column type="index" label="序号" align="center" /> | |||
|           <el-table-column label="已约患者" align="center"> | |||
|             <template slot-scope="scope">{{ scope.row.patientName }}</template> | |||
|           </el-table-column> | |||
|           <el-table-column label="预约时间" align="center"> | |||
|             <template slot-scope="scope"> | |||
|               {{ scope.row.operaTime ? scope.row.operaTime.substr(0, 5) : '-' }} | |||
|             </template> | |||
|           </el-table-column> | |||
|         </el-table> | |||
|       </div> | |||
|       <div class="setoperaTime-right"> | |||
|         <div class="head-content"> | |||
|           <div class="head-content-left"> | |||
|             <span>医生姓名:</span> | |||
|             <span>{{ dataForm.mainDoctorName }}</span> | |||
|           </div> | |||
|           <div class="head-content-right"> | |||
|             <span>排台日期:</span> | |||
|             <span>{{ dataForm.operaDate }}</span> | |||
|             <span>{{ weekName }}</span> | |||
|             <span>{{ morOrAft===1 ? '上午' : '下午' }}</span> | |||
|           </div> | |||
|         </div> | |||
|         <div class="margin-top-20"> | |||
|           <p class="margin-bottom-10">设置手术时间:</p> | |||
|           <el-time-select | |||
|             v-model="dataForm.operaTime" | |||
|             placeholder="请设置时间" | |||
|             :picker-options="morOrAft === 1 ? { | |||
|               start: '07:30', | |||
|               step: '00:15', | |||
|               end: '13:30' | |||
|             } : { | |||
|               start: '14:00', | |||
|               step: '00:15', | |||
|               end: '21:00' | |||
|             }" | |||
|           /> | |||
|         </div> | |||
|       </div> | |||
|     </div> | |||
|     <template slot="footer"> | |||
|       <div> | |||
|         <el-button @click="visible = false">关闭</el-button> | |||
|         <el-button type="primary" @click="timeSureClick()">确定</el-button> | |||
|       </div> | |||
|     </template> | |||
|     <editOperation | |||
|       v-if="editOperationVisible" | |||
|       ref="editOperationRef" | |||
|       @closeDialog="editOperationVisible=false" | |||
|       @refreshDataList="getSourceList()" | |||
|       @editSourceListParams="editSourceListParams" | |||
|     /> | |||
|   </el-dialog> | |||
| </template> | |||
| 
 | |||
| <script> | |||
| import viewModule from '@/mixins/view-module' | |||
| import EditOperation from '@/page-subspecialty/views/modules/nurseManagement/schedule/edit-operation.vue' | |||
| export default { | |||
|   components: { EditOperation }, | |||
|   mixins: [viewModule], | |||
|   props: { | |||
|     patientTypeList: { | |||
|       type: Array, | |||
|       default: () => [] | |||
|     } | |||
|   }, | |||
|   data() { | |||
|     return { | |||
|       visible: false, | |||
|       morOrAft: '', // 上下午 | |||
|       weekName: '', // 星期几 | |||
|       title: '', | |||
|       dataForm: { | |||
|         operaDate: '', // 预约日期(年月日) | |||
|         operaTime: '', | |||
|         mainDoctorCode: '', // 医生工号 | |||
|         morOrAft: '', | |||
|         total: '' // 总数 | |||
|       }, | |||
|       dataList: [], | |||
|       rowListObj: {}, | |||
|       currentTableList: [], | |||
|       currentTableId: [], | |||
|       saveButtonShow: false, | |||
|       editOperationVisible: false | |||
|     } | |||
|   }, | |||
|   computed: { | |||
|     dataRule() { | |||
|       return { | |||
|         startTime: [ | |||
|           { required: true, message: '请选择开始时间', trigger: 'change' } | |||
|         ] | |||
|       } | |||
|     } | |||
|   }, | |||
|   methods: { | |||
|     init() { | |||
|       this.visible = true | |||
|       this.$nextTick(() => { | |||
|         this.saveButtonShow = false | |||
|         this.$refs.dataForm ? this.$refs.dataForm.resetFields() : '' // 重置表单 | |||
|         this.dataForm.morOrAft = this.morOrAft | |||
|         this.getPatientList() | |||
|       }) | |||
|     }, | |||
|     // 获取预约患者详情 | |||
|     async getPatientList() { | |||
|       const { data: res } = await this.$http.get('/opera/getOperaPatientList', { | |||
|         params: { | |||
|           doctorCode: this.dataForm.mainDoctorCode, // 医生工号 | |||
|           morOrAft: this.morOrAft, // morOrAft --1:上午,2:下午 | |||
|           searchDate: this.dataForm.operaDate // 搜索日期 | |||
|         } | |||
|       }) | |||
|       if (res.code === 0) { | |||
|         this.dataList = res.data | |||
|       } else { | |||
|         this.$message.error(res.msg) | |||
|       } | |||
|     }, | |||
|     // 设置时间确认 | |||
|     timeSureClick() { | |||
|       const operaDateTime = this.dataForm.operaDate + ' ' + this.dataForm.operaTime + ':00' | |||
|       // 时间 | |||
|       const operaTime = new Date(operaDateTime) | |||
|       // 现在时间 | |||
|       const nowTime = new Date() | |||
|       if (operaTime > nowTime) { | |||
|         const index = this.dataList.findIndex(item => item.operaTime.substr(0, 5) === this.dataForm.operaTime) | |||
|         if (index === -1) { | |||
|           this.$emit('rowList', this.dataForm) | |||
|           this.visible = false | |||
|         } else { | |||
|           this.$message({ | |||
|             message: '有时间重复,请重新设置', | |||
|             type: 'warning' | |||
|           }) | |||
|         } | |||
|       } else { | |||
|         this.$message({ | |||
|           message: '时间已过时,请从新设置', | |||
|           type: 'warning' | |||
|         }) | |||
|       } | |||
|     }, | |||
|     // 关闭弹框 | |||
|     closeDialog() { | |||
|       this.$emit('closeDialog') | |||
|       this.$emit('getScheduleList') | |||
|     } | |||
|   } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| .setoperaTime { | |||
|   .setoperaTime-left { | |||
|     width: 250px; | |||
|   } | |||
|   .setoperaTime-right { | |||
|     flex: 1; | |||
|     margin-left: 20px; | |||
|   } | |||
|   .head-content { | |||
|     font-size: 14px; | |||
|     padding: 10px; | |||
|     margin: 4px 0 12px 0; | |||
|     background: #eff4ff; | |||
|     border: 1px solid #c5d5fe; | |||
|     .head-content-left, | |||
|     .head-content-right { | |||
|       span { | |||
|         padding-right: 6px; | |||
|       } | |||
|       span:nth-child(1) { | |||
|         font-weight: 700; | |||
|       } | |||
|     } | |||
|   } | |||
|   .form-two { | |||
|     margin-left: 16px; | |||
|   } | |||
|   .operation-details { | |||
|     cursor: pointer; | |||
|   } | |||
| } | |||
| </style> | |||
| <style lang="scss"> | |||
| .setoperaTime { | |||
|   .el-input { | |||
|     width: auto; | |||
|   } | |||
|   .el-form-item { | |||
|     margin-bottom: 12px; | |||
|   } | |||
|   .el-form-item__content { | |||
|     display: flex; | |||
|   } | |||
|   .form-content { | |||
|     display: flex; | |||
|     align-items: center; | |||
|     justify-content: space-between; | |||
|     padding: 10px 0; | |||
|     border-bottom: 1px dashed #d6d6d6; | |||
|   } | |||
|   .total-form, | |||
|   .time-form { | |||
|     margin-bottom: 0; | |||
|   } | |||
|   .button { | |||
|     border: 1px solid #1b6de6; | |||
|     padding: 10px 10px; | |||
|     color: #1b6de6; | |||
|     cursor: pointer; | |||
|     width: 150px; | |||
|     text-align: center; | |||
|     border-radius: 6px; | |||
|   } | |||
|   .button:hover { | |||
|     background: #1b6de6; | |||
|     color: #fff; | |||
|   } | |||
|   .number-table { | |||
|     margin-top: 8px; | |||
|   } | |||
|   .el-table-column--selection .cell { | |||
|     padding-left: 10px; | |||
|   } | |||
|   .el-input-group { | |||
|     width: 80%; | |||
|   } | |||
|   .el-date-editor.el-input, .el-date-editor.el-input__inner { | |||
|     width: 100%; | |||
|   } | |||
| 
 | |||
|   .el-table__body tr.current-row>td.el-table__cell { | |||
|     color: #fff; | |||
|     background: #1b6de6; | |||
|   } | |||
|   .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf { | |||
|     border: none; | |||
|   } | |||
|   .el-dialog__footer { | |||
|     padding-bottom: 10px; | |||
|   } | |||
| 
 | |||
| } | |||
| </style> | |||
					Loading…
					
					
				
		Reference in new issue