Browse Source

护士工作台相关页面

360view
bianyaqi 2 years ago
parent
commit
b833e23948
  1. 4
      public/index.html
  2. 26
      src/page-subspecialty/views/modules/nurseManagement/index.vue
  3. 326
      src/page-subspecialty/views/modules/nurseManagement/numberManage.vue
  4. 2
      src/page-subspecialty/views/modules/nurseManagement/nurseSchedule/index.vue
  5. 28
      src/page-subspecialty/views/modules/nurseManagement/orderPatientList.vue
  6. 202
      src/page-subspecialty/views/modules/nurseManagement/schedule/add-schedule.vue
  7. 990
      src/page-subspecialty/views/modules/nurseManagement/schedule/doctor-schedule.vue
  8. 119
      src/page-subspecialty/views/modules/nurseManagement/schedule/edit-operation.vue
  9. 62
      src/page-subspecialty/views/modules/nurseManagement/schedule/index.vue
  10. 413
      src/page-subspecialty/views/modules/nurseManagement/schedule/number-detail-manage.vue
  11. 154
      src/page-subspecialty/views/modules/nurseManagement/schedule/operation-detail.vue
  12. 266
      src/page-subspecialty/views/modules/nurseManagement/schedule/setOperaTime.vue

4
public/index.html

@ -39,8 +39,8 @@
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
<script>
//http://121.36.16.195:9002/huimu-admin/swagger-ui/index.html
// window.SITE_CONFIG['apiURL'] = 'http://47.110.224.240:8036/xiangan-crf';
window.SITE_CONFIG['apiURL'] = 'http://192.168.0.167:8036/xiangan-crf';
window.SITE_CONFIG['apiURL'] = 'http://47.110.224.240:8036/xiangan-crf';
// window.SITE_CONFIG['apiURL'] = 'http://192.168.0.167:8036/xiangan-crf';
</script>
<% } %>
<!-- 测试环境 -->

26
src/page-subspecialty/views/modules/nurseManagement/index.vue

@ -4,10 +4,12 @@
<el-button type="text" @click="ubmShow = true">UBM预约</el-button>
<el-button type="text" @click="addShow = true">新增</el-button>
<el-button type="text" @click="listShow = true">预约患者列表</el-button>
<re-dialog :is-show="isShow" @close="closeDialog" />
<u-b-m-order :is-show="ubmShow" @close="closeDialog" />
<add-project :is-show="addShow" @close="closeDialog" />
<order-patient-list :is-show="listShow" @close="closeDialog" />
<el-button type="text" @click="numberShow = true">号源管理</el-button>
<re-dialog :is-show="isShow" @close="closeDialog1" />
<u-b-m-order :is-show="ubmShow" @close="closeDialog2" />
<add-project :is-show="addShow" @close="closeDialog3" />
<order-patient-list :is-show="listShow" @addOrder="addOrder" @close="closeDialog4" />
<number-manage :is-show="numberShow" @close="closeDialog5" />
</div>
</template>
@ -16,24 +18,34 @@ import ReDialog from '@/page-subspecialty/views/modules/nurseManagement/reDialog
import UBMOrder from '@/page-subspecialty/views/modules/nurseManagement/UBMOrder.vue'
import AddProject from '@/page-subspecialty/views/modules/nurseManagement/addProject.vue'
import OrderPatientList from '@/page-subspecialty/views/modules/nurseManagement/orderPatientList.vue'
import NumberManage from '@/page-subspecialty/views/modules/nurseManagement/numberManage.vue'
export default {
name: 'NurseManagement',
components: { OrderPatientList, AddProject, UBMOrder, ReDialog },
components: { NumberManage, OrderPatientList, AddProject, UBMOrder, ReDialog },
data() {
return {
isShow: false,
ubmShow: false, // ubm
addShow: false,
listShow: false
listShow: false,
numberShow: false
}
},
methods: {
closeDialog(val) {
addOrder() {
this.ubmShow = true
},
closeDialog1(val) {
this.isShow = val
}, closeDialog2(val) {
this.ubmShow = val
}, closeDialog3(val) {
this.addShow = val
}, closeDialog4(val) {
this.listShow = val
}, closeDialog5(val) {
this.numberShow = val
}
}
}

326
src/page-subspecialty/views/modules/nurseManagement/numberManage.vue

@ -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>

2
src/page-subspecialty/views/modules/nurseManagement/dataManage/index.vue → src/page-subspecialty/views/modules/nurseManagement/nurseSchedule/index.vue

@ -4,7 +4,7 @@
<script>
export default {
name: 'Index'
name: 'NurseSchedule'
}
</script>

28
src/page-subspecialty/views/modules/nurseManagement/orderPatientList.vue

@ -17,18 +17,18 @@
</div>
<el-row>
<el-col style="margin: 8px" :span="11">
<el-button style="width: 100%" size="mini" icon="el-icon-plus" type="primary">新增预约</el-button>
<el-button style="width: 100%" size="mini" icon="el-icon-plus" type="primary" @click="addOrder">新增预约</el-button>
</el-col>
<el-col v-for="item in 5" :key="item" :span="11" class="patientBox">
<el-col v-for="item in 6" :key="item" :span="11" class="patientBox">
<div class="patient_left">
<div>09-10</div>
<div>lisi</div>
<div>nan</div>
<div style="margin-right: 8px;color: #1C76FD;">09-10</div>
<div style="margin-right: 8px">李四</div>
<div style="margin-right: 8px"></div>
<div>32</div>
</div>
<div class="patient_right">
<div>改约</div>
<div>删除</div>
<div class="edit">改约</div>
<div class="delete">删除</div>
</div>
</el-col>
</el-row>
@ -56,6 +56,9 @@ export default {
}
},
methods: {
addOrder() {
this.$emit('addOrder')
},
closeDialog(val) {
this.dialogVisible = val
this.$emit('close', false)
@ -90,5 +93,16 @@ export default {
.patient_right{
display: flex;
}
.edit{
cursor: pointer;
user-select: none;
color: #1C76FD;
}
.delete{
color: #FF4D4F;
cursor: pointer;
user-select: none;
margin-left: 8px;
}
}
</style>

202
src/page-subspecialty/views/modules/nurseManagement/schedule/add-schedule.vue

@ -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>

990
src/page-subspecialty/views/modules/nurseManagement/schedule/doctor-schedule.vue

@ -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;
// 76 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]; // 77
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]; // 77
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>

119
src/page-subspecialty/views/modules/nurseManagement/schedule/edit-operation.vue

@ -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>

62
src/page-subspecialty/views/modules/nurseManagement/schedule/index.vue

@ -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>

413
src/page-subspecialty/views/modules/nurseManagement/schedule/number-detail-manage.vue

@ -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>

154
src/page-subspecialty/views/modules/nurseManagement/schedule/operation-detail.vue

@ -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>

266
src/page-subspecialty/views/modules/nurseManagement/schedule/setOperaTime.vue

@ -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…
Cancel
Save