Commit ebd898f1 authored by 高滢's avatar 高滢

住院管理

parent 9e02f302
...@@ -78,3 +78,11 @@ export function listWardSelect(query) { ...@@ -78,3 +78,11 @@ export function listWardSelect(query) {
}) })
} }
// 查询业务管理住院管理不分页
export function listInHospitalNoPage(query) {
return request({
url: '/business/hospital/listPage',
method: 'get',
params: query
})
}
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
<el-table-column label="病房号" min-width="80" prop="wardRuleId" align="center" show-overflow-tooltip /> <el-table-column label="病房号" min-width="80" prop="wardRuleId" align="center" show-overflow-tooltip />
<el-table-column label="当前状态" min-width="80" prop="chooseStatus" align="center" show-overflow-tooltip> <el-table-column label="当前状态" min-width="80" prop="chooseStatus" align="center" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-show="scope.row.chooseStatus==='0'" style="color:rgb(95,181,75) ">{{ wardStatusLabel(scope.row.chooseStatus) }}</span> <span v-if="scope.row.chooseStatus==='0'" style="color:rgb(95,181,75) ">{{ wardStatusLabel(scope.row.chooseStatus) }}</span>
<span v-show="scope.row.chooseStatus==='1'" style="color:red ">{{ wardStatusLabel(scope.row.chooseStatus) }}</span> <span v-else style="color:red ">{{ wardStatusLabel(scope.row.chooseStatus) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="宠物昵称" min-width="80" prop="petNickname" align="center" show-overflow-tooltip> <el-table-column label="宠物昵称" min-width="80" prop="petNickname" align="center" show-overflow-tooltip>
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
size="mini" size="mini"
style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(95,181,75);" style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(95,181,75);"
type="success" type="success"
:disabled="row.chooseStatus !== '0'"
@click="selectComlum(row)" @click="selectComlum(row)"
>选择 >选择
</el-button> </el-button>
...@@ -93,6 +94,7 @@ ...@@ -93,6 +94,7 @@
size="mini" size="mini"
style="width: 70px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(95,181,75);" style="width: 70px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(95,181,75);"
type="success" type="success"
:disabled="row.medicalRecordId===null"
@click="goMedical(row)" @click="goMedical(row)"
>查看病历 >查看病历
</el-button> </el-button>
...@@ -134,8 +136,10 @@ export default { ...@@ -134,8 +136,10 @@ export default {
}, },
data() { data() {
return { return {
chooseWardIs: false,
// 病房选择传参 // 病房选择传参
chooseWard: { chooseWard: {
wardId: '',
type: 0 type: 0
}, },
// 病房类型信息 // 病房类型信息
...@@ -186,7 +190,7 @@ export default { ...@@ -186,7 +190,7 @@ export default {
wardStatusLabel(value) { wardStatusLabel(value) {
if (value === '0') { if (value === '0') {
return '空闲' return '空闲'
} else if (value === '1') { } else {
return '占用' return '占用'
} }
}, },
...@@ -202,24 +206,29 @@ export default { ...@@ -202,24 +206,29 @@ export default {
} }
}, },
submitForm() { submitForm() {
this.chooseWard.admissionDate = this.inHospitalInfo.admissionDate if (this.chooseWardIs === false) {
this.chooseWard.bathe = this.inHospitalInfo.bathe this.$modal.msgWarning('请选择病房')
this.chooseWard.inHospitalId = this.inHospitalInfo.id } else {
this.chooseWard.status = '3' this.chooseWard.admissionDate = this.inHospitalInfo.admissionDate
this.chooseWard.petNickname = this.inHospitalInfo.petNickname this.chooseWard.bathe = this.inHospitalInfo.bathe
this.chooseWard.doctorName = this.inHospitalInfo.doctorName this.chooseWard.inHospitalId = this.inHospitalInfo.id
this.chooseWard.status = this.inHospitalInfo.status this.chooseWard.status = '3'
this.chooseWard.id = this.inHospitalInfo.hosDetailBos[this.inHospitalInfo.hosDetailBos.length - 1].id this.chooseWard.petNickname = this.inHospitalInfo.petNickname
console.log(this.chooseWard) this.chooseWard.doctorName = this.inHospitalInfo.doctorName
inHospitalWard(this.chooseWard).then(res => { this.chooseWard.status = this.inHospitalInfo.status
this.isShow = false this.chooseWard.id = this.inHospitalInfo.hosDetailBos[this.inHospitalInfo.hosDetailBos.length - 1].id
}) console.log(this.chooseWard)
inHospitalWard(this.chooseWard).then(res => {
this.$emit('wardModleClose', false)
})
}
}, },
goBack() { goBack() {
this.$emit('wardModleClose', false) this.$emit('wardModleClose', false)
}, },
// 获得表格所点击行的id // 获得表格所点击行的id
selectComlum(row) { selectComlum(row) {
this.chooseWardIs = true
this.chooseWard.wardType = row.wardType this.chooseWard.wardType = row.wardType
this.chooseWard.wardId = row.wardId this.chooseWard.wardId = row.wardId
this.chooseWard.wardRuleId = row.wardRuleId this.chooseWard.wardRuleId = row.wardRuleId
...@@ -236,8 +245,10 @@ export default { ...@@ -236,8 +245,10 @@ export default {
return row.id === this.highlightedRowId ? 'highlight' : '' // 根据 ID 判断是否为高亮行 return row.id === this.highlightedRowId ? 'highlight' : '' // 根据 ID 判断是否为高亮行
}, },
// 去病历页面 // 去病历页面
goMedical() { goMedical(row) {
this.$router.push({
name: 'MedicalDetail', params: { id: row.medicalRecordId }
})
}, },
closeModle() { closeModle() {
this.$emit('wardModleClose', false) this.$emit('wardModleClose', false)
......
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
submitForm: function() { submitForm: function() {
this.inHospitalInfo.status = '4' this.inHospitalInfo.status = '4'
updateHospital(this.inHospitalInfo).then( updateHospital(this.inHospitalInfo).then(
this.isShow = false this.$emit('disChargModleClose', false)
) )
} }
} }
......
...@@ -74,8 +74,8 @@ ...@@ -74,8 +74,8 @@
<el-table-column label="病房号" min-width="80" prop="wardRuleId" align="center" show-overflow-tooltip /> <el-table-column label="病房号" min-width="80" prop="wardRuleId" align="center" show-overflow-tooltip />
<el-table-column label="当前状态" min-width="80" prop="chooseStatus" align="center" show-overflow-tooltip> <el-table-column label="当前状态" min-width="80" prop="chooseStatus" align="center" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-show="scope.row.chooseStatus==='0'" style="color:rgb(95,181,75) ">{{ wardStatusLabel(scope.row.chooseStatus) }}</span> <span v-if="scope.row.chooseStatus==='0'" style="color:rgb(95,181,75) ">{{ wardStatusLabel(scope.row.chooseStatus) }}</span>
<span v-show="scope.row.chooseStatus==='1'" style="color:red ">{{ wardStatusLabel(scope.row.chooseStatus) }}</span> <span v-else style="color:red ">{{ wardStatusLabel(scope.row.chooseStatus) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="宠物昵称" min-width="80" prop="petNickname" align="center" show-overflow-tooltip> <el-table-column label="宠物昵称" min-width="80" prop="petNickname" align="center" show-overflow-tooltip>
...@@ -103,6 +103,7 @@ ...@@ -103,6 +103,7 @@
size="mini" size="mini"
style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(95,181,75);" style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(95,181,75);"
type="success" type="success"
:disabled="row.chooseStatus !== '0'"
@click="selectComlum(row)" @click="selectComlum(row)"
>选择 >选择
</el-button> </el-button>
...@@ -112,6 +113,7 @@ ...@@ -112,6 +113,7 @@
size="mini" size="mini"
style="width: 70px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(95,181,75);" style="width: 70px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(95,181,75);"
type="success" type="success"
:disabled="row.medicalRecordId===null"
@click="goMedical(row)" @click="goMedical(row)"
>查看病历 >查看病历
</el-button> </el-button>
...@@ -153,8 +155,10 @@ export default { ...@@ -153,8 +155,10 @@ export default {
}, },
data() { data() {
return { return {
chooseWardIs: false,
// 病房选择传参 // 病房选择传参
chooseWard: { chooseWard: {
wardId: '',
type: 0 type: 0
}, },
// 病房状态信息 // 病房状态信息
...@@ -190,7 +194,7 @@ export default { ...@@ -190,7 +194,7 @@ export default {
wardStatusLabel(value) { wardStatusLabel(value) {
if (value === '0') { if (value === '0') {
return '空闲' return '空闲'
} else if (value === '1') { } else {
return '占用' return '占用'
} }
}, },
...@@ -206,24 +210,29 @@ export default { ...@@ -206,24 +210,29 @@ export default {
} }
}, },
submitForm() { submitForm() {
this.chooseWard.admissionDate = this.inHospitalInfo.admissionDate if (this.chooseWardIs === false) {
this.chooseWard.bathe = this.inHospitalInfo.bathe this.$modal.msgWarning('请选择病房')
this.chooseWard.inHospitalId = this.inHospitalInfo.id } else {
this.chooseWard.status = '3' this.chooseWard.admissionDate = this.inHospitalInfo.admissionDate
this.chooseWard.petNickname = this.inHospitalInfo.petNickname this.chooseWard.bathe = this.inHospitalInfo.bathe
this.chooseWard.doctorName = this.inHospitalInfo.doctorName this.chooseWard.inHospitalId = this.inHospitalInfo.id
this.chooseWard.status = this.inHospitalInfo.status this.chooseWard.status = '3'
this.chooseWard.id = this.inHospitalInfo.hosDetailBos[this.inHospitalInfo.hosDetailBos.length - 1].id this.chooseWard.petNickname = this.inHospitalInfo.petNickname
console.log(this.chooseWard) this.chooseWard.doctorName = this.inHospitalInfo.doctorName
inHospitalWard(this.chooseWard).then(res => { this.chooseWard.status = this.inHospitalInfo.status
this.isShow = false this.chooseWard.id = this.inHospitalInfo.hosDetailBos[this.inHospitalInfo.hosDetailBos.length - 1].id
}) console.log(this.chooseWard)
inHospitalWard(this.chooseWard).then(res => {
this.$emit('admissionModleClose', false)
})
}
}, },
goBack() { goBack() {
this.$emit('admissionModleClose', false) this.$emit('admissionModleClose', false)
}, },
// 获得表格所点击行的id // 获得表格所点击行的id
selectComlum(row) { selectComlum(row) {
this.chooseWardIs = true
this.chooseWard.wardType = row.wardType this.chooseWard.wardType = row.wardType
this.chooseWard.wardId = row.wardId this.chooseWard.wardId = row.wardId
this.chooseWard.wardRuleId = row.wardRuleId this.chooseWard.wardRuleId = row.wardRuleId
...@@ -240,8 +249,10 @@ export default { ...@@ -240,8 +249,10 @@ export default {
return row.id === this.highlightedRowId ? 'highlight' : '' // 根据 ID 判断是否为高亮行 return row.id === this.highlightedRowId ? 'highlight' : '' // 根据 ID 判断是否为高亮行
}, },
// 去病历页面 // 去病历页面
goMedical() { goMedical(row) {
this.$router.push({
name: 'MedicalDetail', params: { id: row.medicalRecordId }
})
}, },
closeModle() { closeModle() {
this.$emit('admissionModleClose', false) this.$emit('admissionModleClose', false)
......
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
</template> </template>
<script> <script>
import { getHospital, listHospital, listWardSelect } from '@/api/business/inHospital' import { getHospital, listHospital, listInHospitalNoPage, listWardSelect } from '@/api/business/inHospital'
import HandlingAdmissions import HandlingAdmissions
from '@/views/service-management/hospitalization-management/components/handling-admissions.vue' from '@/views/service-management/hospitalization-management/components/handling-admissions.vue'
import HandleDischarge from '@/views/service-management/hospitalization-management/components/handle-discharge.vue' import HandleDischarge from '@/views/service-management/hospitalization-management/components/handle-discharge.vue'
...@@ -427,8 +427,8 @@ export default { ...@@ -427,8 +427,8 @@ export default {
*/ */
async changeTableSelect(notIncludeIds = []) { async changeTableSelect(notIncludeIds = []) {
// 获取反选的数据 // 获取反选的数据
// const { data } = await selectTreatAll({ notIncludeIds }) const { data } = await listInHospitalNoPage({ notIncludeIds })
// this.effectTableSelect(data) this.effectTableSelect(data)
}, },
// 反向选择 // 反向选择
reverseSelect() { reverseSelect() {
...@@ -438,11 +438,33 @@ export default { ...@@ -438,11 +438,33 @@ export default {
getRowKeys(row) { getRowKeys(row) {
return row.id return row.id
}, },
// 导出格式化
exportFormatTime(date) {
// 获取年月日
var year = date.getFullYear()
var month = date.getMonth() + 1 // 月份从0开始,需要加1
var day = date.getDate()
// 将年月日格式化为字符串
if (month < 10) {
month = '0' + month
}
if (day < 10) {
day = '0' + day
}
const formattedDate = year.toString() + month.toString() + day.toString()
return formattedDate
},
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('business/hospital/export', { if (this.ids.length !== 0) {
...this.queryParams const exportTable = {}
}, `hospital_${new Date().getTime()}.xlsx`) exportTable.inHospitalIds = this.ids
this.download('business/hospital/export', exportTable, `住院_${this.exportFormatTime(new Date())}.xlsx`).then(res => {
this.$refs.table.clearSelection()
})
} else {
this.$modal.msgWarning('请选择至少一条数据导出')
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment