Commit ebd898f1 authored by 高滢's avatar 高滢

住院管理

parent 9e02f302
......@@ -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 @@
<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>
<template slot-scope="scope">
<span v-show="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-if="scope.row.chooseStatus==='0'" style="color:rgb(95,181,75) ">{{ wardStatusLabel(scope.row.chooseStatus) }}</span>
<span v-else style="color:red ">{{ wardStatusLabel(scope.row.chooseStatus) }}</span>
</template>
</el-table-column>
<el-table-column label="宠物昵称" min-width="80" prop="petNickname" align="center" show-overflow-tooltip>
......@@ -84,6 +84,7 @@
size="mini"
style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(95,181,75);"
type="success"
:disabled="row.chooseStatus !== '0'"
@click="selectComlum(row)"
>选择
</el-button>
......@@ -93,6 +94,7 @@
size="mini"
style="width: 70px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(95,181,75);"
type="success"
:disabled="row.medicalRecordId===null"
@click="goMedical(row)"
>查看病历
</el-button>
......@@ -134,8 +136,10 @@ export default {
},
data() {
return {
chooseWardIs: false,
// 病房选择传参
chooseWard: {
wardId: '',
type: 0
},
// 病房类型信息
......@@ -186,7 +190,7 @@ export default {
wardStatusLabel(value) {
if (value === '0') {
return '空闲'
} else if (value === '1') {
} else {
return '占用'
}
},
......@@ -202,6 +206,9 @@ export default {
}
},
submitForm() {
if (this.chooseWardIs === false) {
this.$modal.msgWarning('请选择病房')
} else {
this.chooseWard.admissionDate = this.inHospitalInfo.admissionDate
this.chooseWard.bathe = this.inHospitalInfo.bathe
this.chooseWard.inHospitalId = this.inHospitalInfo.id
......@@ -212,14 +219,16 @@ export default {
this.chooseWard.id = this.inHospitalInfo.hosDetailBos[this.inHospitalInfo.hosDetailBos.length - 1].id
console.log(this.chooseWard)
inHospitalWard(this.chooseWard).then(res => {
this.isShow = false
this.$emit('wardModleClose', false)
})
}
},
goBack() {
this.$emit('wardModleClose', false)
},
// 获得表格所点击行的id
selectComlum(row) {
this.chooseWardIs = true
this.chooseWard.wardType = row.wardType
this.chooseWard.wardId = row.wardId
this.chooseWard.wardRuleId = row.wardRuleId
......@@ -236,8 +245,10 @@ export default {
return row.id === this.highlightedRowId ? 'highlight' : '' // 根据 ID 判断是否为高亮行
},
// 去病历页面
goMedical() {
goMedical(row) {
this.$router.push({
name: 'MedicalDetail', params: { id: row.medicalRecordId }
})
},
closeModle() {
this.$emit('wardModleClose', false)
......
......@@ -102,7 +102,7 @@ export default {
submitForm: function() {
this.inHospitalInfo.status = '4'
updateHospital(this.inHospitalInfo).then(
this.isShow = false
this.$emit('disChargModleClose', false)
)
}
}
......
......@@ -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="chooseStatus" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span v-show="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-if="scope.row.chooseStatus==='0'" style="color:rgb(95,181,75) ">{{ wardStatusLabel(scope.row.chooseStatus) }}</span>
<span v-else style="color:red ">{{ wardStatusLabel(scope.row.chooseStatus) }}</span>
</template>
</el-table-column>
<el-table-column label="宠物昵称" min-width="80" prop="petNickname" align="center" show-overflow-tooltip>
......@@ -103,6 +103,7 @@
size="mini"
style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(95,181,75);"
type="success"
:disabled="row.chooseStatus !== '0'"
@click="selectComlum(row)"
>选择
</el-button>
......@@ -112,6 +113,7 @@
size="mini"
style="width: 70px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(95,181,75);"
type="success"
:disabled="row.medicalRecordId===null"
@click="goMedical(row)"
>查看病历
</el-button>
......@@ -153,8 +155,10 @@ export default {
},
data() {
return {
chooseWardIs: false,
// 病房选择传参
chooseWard: {
wardId: '',
type: 0
},
// 病房状态信息
......@@ -190,7 +194,7 @@ export default {
wardStatusLabel(value) {
if (value === '0') {
return '空闲'
} else if (value === '1') {
} else {
return '占用'
}
},
......@@ -206,6 +210,9 @@ export default {
}
},
submitForm() {
if (this.chooseWardIs === false) {
this.$modal.msgWarning('请选择病房')
} else {
this.chooseWard.admissionDate = this.inHospitalInfo.admissionDate
this.chooseWard.bathe = this.inHospitalInfo.bathe
this.chooseWard.inHospitalId = this.inHospitalInfo.id
......@@ -216,14 +223,16 @@ export default {
this.chooseWard.id = this.inHospitalInfo.hosDetailBos[this.inHospitalInfo.hosDetailBos.length - 1].id
console.log(this.chooseWard)
inHospitalWard(this.chooseWard).then(res => {
this.isShow = false
this.$emit('admissionModleClose', false)
})
}
},
goBack() {
this.$emit('admissionModleClose', false)
},
// 获得表格所点击行的id
selectComlum(row) {
this.chooseWardIs = true
this.chooseWard.wardType = row.wardType
this.chooseWard.wardId = row.wardId
this.chooseWard.wardRuleId = row.wardRuleId
......@@ -240,8 +249,10 @@ export default {
return row.id === this.highlightedRowId ? 'highlight' : '' // 根据 ID 判断是否为高亮行
},
// 去病历页面
goMedical() {
goMedical(row) {
this.$router.push({
name: 'MedicalDetail', params: { id: row.medicalRecordId }
})
},
closeModle() {
this.$emit('admissionModleClose', false)
......
......@@ -247,7 +247,7 @@
</template>
<script>
import { getHospital, listHospital, listWardSelect } from '@/api/business/inHospital'
import { getHospital, listHospital, listInHospitalNoPage, listWardSelect } from '@/api/business/inHospital'
import HandlingAdmissions
from '@/views/service-management/hospitalization-management/components/handling-admissions.vue'
import HandleDischarge from '@/views/service-management/hospitalization-management/components/handle-discharge.vue'
......@@ -427,8 +427,8 @@ export default {
*/
async changeTableSelect(notIncludeIds = []) {
// 获取反选的数据
// const { data } = await selectTreatAll({ notIncludeIds })
// this.effectTableSelect(data)
const { data } = await listInHospitalNoPage({ notIncludeIds })
this.effectTableSelect(data)
},
// 反向选择
reverseSelect() {
......@@ -438,11 +438,33 @@ export default {
getRowKeys(row) {
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() {
this.download('business/hospital/export', {
...this.queryParams
}, `hospital_${new Date().getTime()}.xlsx`)
if (this.ids.length !== 0) {
const exportTable = {}
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