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

分配诊室

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