Commit 47229f0e authored by 高滢's avatar 高滢

分配诊室

parent bc86ea23
...@@ -426,7 +426,7 @@ ...@@ -426,7 +426,7 @@
</el-table-column> </el-table-column>
<el-table-column align="left" label="治疗时长"> <el-table-column align="left" label="治疗时长">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.duration + 'h'|| '-' }}</span> <span>{{ minutesToHours(scope.row.duration)|| '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="userName" align="left" label="治疗负责人"> <el-table-column prop="userName" align="left" label="治疗负责人">
...@@ -737,6 +737,11 @@ export default { ...@@ -737,6 +737,11 @@ export default {
this.getUserNameList() this.getUserNameList()
}, },
methods: { methods: {
minutesToHours(minutes) {
var hours = Math.floor(minutes / 60) // 计算小时数
var remainingMinutes = minutes % 60 // 计算剩余的分钟数
return hours + '.' + remainingMinutes + 'h'
},
// 计算结束时间 // 计算结束时间
calculateEndTime() { calculateEndTime() {
if (this.reservationForm.startTime.length === 2 && this.reservationForm.duration) { if (this.reservationForm.startTime.length === 2 && this.reservationForm.duration) {
......
...@@ -289,7 +289,7 @@ ...@@ -289,7 +289,7 @@
</el-table-column> </el-table-column>
<el-table-column align="left" label="治疗时长"> <el-table-column align="left" label="治疗时长">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.duration + 'h'|| '-' }}</span> <span>{{ minutesToHours(scope.row.duration) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="userName" align="left" label="治疗负责人"> <el-table-column prop="userName" align="left" label="治疗负责人">
...@@ -574,6 +574,11 @@ export default { ...@@ -574,6 +574,11 @@ export default {
// this.getTreatmentDropdown() // this.getTreatmentDropdown()
}, },
methods: { methods: {
minutesToHours(minutes) {
var hours = Math.floor(minutes / 60) // 计算小时数
var remainingMinutes = minutes % 60 // 计算剩余的分钟数
return hours + '.' + remainingMinutes + 'h'
},
sTimeValid(rule, value, callback) { sTimeValid(rule, value, callback) {
if (this.startTime.length === 0) { if (this.startTime.length === 0) {
callback(new Error('请选择开始时间')) callback(new Error('请选择开始时间'))
......
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