Commit 80102dc9 authored by 盖献康's avatar 盖献康

bug(68226) - 按钮点击触发后鼠标在移动到别的地方时,按钮被选中的样式应该恢复为初始状态 - 检查、治理

parent b0bdc54e
...@@ -306,12 +306,12 @@ ...@@ -306,12 +306,12 @@
<el-button <el-button
v-if="!isPlatRole && scope.row.deviceId !== null" v-if="!isPlatRole && scope.row.deviceId !== null"
v-hasPermi="['business:check:subscribe']" v-hasPermi="['business:check:subscribe']"
class="el-button--warning--solid--four" class="handle-subscribe el-button--warning--solid--four"
size="mini" size="mini"
type="warning" type="warning"
plain plain
disabled disabled
@click="handleSubscribe(scope.row)" @click="handleSubscribe(scope.row, 'handle-subscribe')"
> >
<svg-icon icon-class="liebiao_icon_shouquan" /> <svg-icon icon-class="liebiao_icon_shouquan" />
立即预约 立即预约
...@@ -319,12 +319,12 @@ ...@@ -319,12 +319,12 @@
<el-button <el-button
v-if="!isPlatRole && scope.row.deviceId === null" v-if="!isPlatRole && scope.row.deviceId === null"
v-hasPermi="['business:check:subscribe']" v-hasPermi="['business:check:subscribe']"
class="el-button--warning--solid--four" class="handle-subscribe el-button--warning--solid--four"
size="mini" size="mini"
type="warning" type="warning"
plain plain
:disabled="currentUser.userType === '2' && currentUser.name !== scope.row.doctorName" :disabled="currentUser.userType === '2' && currentUser.name !== scope.row.doctorName"
@click="handleSubscribe(scope.row)" @click="handleSubscribe(scope.row, 'handle-subscribe')"
> >
<svg-icon icon-class="liebiao_icon_shouquan" /> <svg-icon icon-class="liebiao_icon_shouquan" />
立即预约 立即预约
...@@ -428,22 +428,22 @@ ...@@ -428,22 +428,22 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="deviceQueryParams.isPrivate === '0'" v-if="deviceQueryParams.isPrivate === '0'"
class="el-button--success--solid--four" class="book-inside-now el-button--success--solid--four"
size="mini" size="mini"
type="success" type="success"
plain plain
:disabled="accordingToTime(scope.row.checkTime) || (parseInt(scope.row.price) > parseInt(currentHospital.currentBalance)) || currentHospital.currentBalance === 0 || currentHospital.currentBalance === null" :disabled="accordingToTime(scope.row.checkTime) || (parseInt(scope.row.price) > parseInt(currentHospital.currentBalance)) || currentHospital.currentBalance === 0 || currentHospital.currentBalance === null"
@click="handleSubscribeDevice(scope.row)" @click="handleSubscribeDevice(scope.row, 'book-inside-now')"
>立即预约 >立即预约
</el-button> </el-button>
<el-button <el-button
v-else v-else
size="mini" size="mini"
type="success" type="success"
class="el-button--success--solid--four" class="book-inside-now el-button--success--solid--four"
plain plain
:disabled="accordingToTime(scope.row.checkTime)" :disabled="accordingToTime(scope.row.checkTime)"
@click="handleSubscribeDevice(scope.row)" @click="handleSubscribeDevice(scope.row, 'book-inside-now')"
>立即预约 >立即预约
</el-button> </el-button>
</template> </template>
...@@ -833,7 +833,10 @@ export default { ...@@ -833,7 +833,10 @@ export default {
document.getElementById(buttonId).blur() document.getElementById(buttonId).blur()
}, },
/** 立即预约 */ /** 立即预约 */
handleSubscribe(row) { handleSubscribe(row, buttonId) {
Array.prototype.forEach.call(document.getElementsByClassName(buttonId),
element => element.blur()
)
this.open = true this.open = true
// 初始化,否则集合数据一直多 // 初始化,否则集合数据一直多
this.deviceQueryParams.checkTypeList = [] this.deviceQueryParams.checkTypeList = []
...@@ -869,7 +872,7 @@ export default { ...@@ -869,7 +872,7 @@ export default {
return year + '-' + month + '-' + day return year + '-' + month + '-' + day
}, },
/** 对话框立即预约设备 */ /** 对话框立即预约设备 */
handleSubscribeDevice(row) { handleSubscribeDevice(row, buttonId) {
console.log('点击里面的立即预约', row) console.log('点击里面的立即预约', row)
this.$confirm('立即预约此设备,是否确定', '提示', { this.$confirm('立即预约此设备,是否确定', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -904,6 +907,10 @@ export default { ...@@ -904,6 +907,10 @@ export default {
this.$modal.msgSuccess('预约设备成功') this.$modal.msgSuccess('预约设备成功')
} }
}) })
}).finally(() => {
Array.prototype.forEach.call(document.getElementsByClassName(buttonId),
element => element.blur()
)
}) })
}, },
/** 获取设备列表 */ /** 获取设备列表 */
......
...@@ -210,12 +210,12 @@ ...@@ -210,12 +210,12 @@
<el-button <el-button
v-if="scope.row.treatSchedule === '1' && (scope.row.payType === '1' || scope.row.payType === '2')" v-if="scope.row.treatSchedule === '1' && (scope.row.payType === '1' || scope.row.payType === '2')"
v-hasPermi="['business:treat:distribution']" v-hasPermi="['business:treat:distribution']"
class="el-button--warning--solid--four" class="handle-subscribe el-button--warning--solid--four"
type="warning" type="warning"
size="mini" size="mini"
:disabled="currentUser.userType === '2' && currentUser.name !== scope.row.doctorName" :disabled="currentUser.userType === '2' && currentUser.name !== scope.row.doctorName"
plain plain
@click="handleSubscribe(scope.row)" @click="handleSubscribe(scope.row, 'handle-subscribe')"
> >
<svg-icon icon-class="fenpeizhenshi1" /> <svg-icon icon-class="fenpeizhenshi1" />
分配诊室 分配诊室
...@@ -866,13 +866,16 @@ export default { ...@@ -866,13 +866,16 @@ export default {
document.getElementById(buttonId).blur() document.getElementById(buttonId).blur()
}, },
/** 分配诊室 */ /** 分配诊室 */
handleSubscribe(row) { handleSubscribe(row, buttonId) {
this.open = true this.open = true
console.log('点击立即预约', row) console.log('点击立即预约', row)
this.reservationForm.treatId = row.id this.reservationForm.treatId = row.id
this.getConsultList(row.treatItemsType) this.getConsultList(row.treatItemsType)
this.currentClinicUse = row.treatItemsType this.currentClinicUse = row.treatItemsType
this.getAppointmentRecord() this.getAppointmentRecord()
Array.prototype.forEach.call(document.getElementsByClassName(buttonId),
element => element.blur()
)
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery(buttonId) { resetQuery(buttonId) {
......
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