8 changed files with 35 additions and 762 deletions
@ -1,202 +0,0 @@ |
|||
<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> |
@ -1,119 +0,0 @@ |
|||
<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> |
@ -1,153 +0,0 @@ |
|||
<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> |
|||
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> |
@ -1,266 +0,0 @@ |
|||
<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/reservation/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