Commit 9537cd15 authored by 盖献康's avatar 盖献康

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

parent 78857d76
......@@ -80,28 +80,31 @@
</el-form>
<el-row :gutter="10" class="mb8" style="margin: 0 0 20px 1px">
<el-button
id="select-all"
v-hasPermi="['business:check:export']"
class="fourWordswhiteBtn"
size="mini"
@click="selectAll()"
@click="selectAll('select-all')"
>
<svg-icon style="margin-right: 1px" icon-class="shuaixuan_icon_quanbu" />
选择全部
</el-button>
<el-button
id="reverse-select"
v-hasPermi="['business:check:export']"
class="fourWordswhiteBtn"
size="mini"
@click="reverseSelect()"
@click="reverseSelect('reverse-select')"
>
<svg-icon style="margin-right: 1px" icon-class="shuaixuan_icon_fanxiang" />
反向选择
</el-button>
<el-button
id="bulk-export"
v-hasPermi="['business:check:export']"
class="fourWordswhiteBtn"
size="mini"
@click="handleExport()"
@click="handleExport('bulk-export')"
>
<svg-icon style="margin-right: 1px" icon-class="shaixuan_icon_daochu" />
批量导出
......@@ -115,19 +118,21 @@
>检查项目
</el-button>
<el-button
id="reset-query"
style="position: relative; float: right;"
class="resetBtn"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
@click="resetQuery('reset-query')"
>重置
</el-button>
<el-button
id="handle-query"
style="position: relative; float: right;"
class="queryBtn"
icon="el-icon-search"
size="mini"
@click="handleQuery"
@click="handleQuery('handle-query')"
>查询
</el-button>
</el-row>
......@@ -694,7 +699,8 @@ export default {
* @param selection 已选择内容
* @param all 是否永远进行全选操作
*/
async selectAll(selection = [], all = true) {
async selectAll(buttonId, selection = [], all = true) {
document.getElementById(buttonId).blur()
if (this.manageList.length !== selection.length && !all) {
this.effectTableSelect([])
} else {
......@@ -711,8 +717,9 @@ export default {
this.$refs.table.store.updateAllSelected()
this.$refs.table.$emit('selection-change', data)
},
reverseSelect() {
reverseSelect(buttonId) {
this.changeTableSelect(this.ids)
document.getElementById(buttonId).blur()
},
/**
* 改变table选择项
......@@ -820,9 +827,10 @@ export default {
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
handleQuery(buttonId) {
this.queryParams.pageNum = 1
this.getList()
document.getElementById(buttonId).blur()
},
/** 立即预约 */
handleSubscribe(row) {
......@@ -907,7 +915,8 @@ export default {
})
},
/** 重置按钮操作 */
resetQuery() {
resetQuery(buttonId) {
document.getElementById(buttonId).blur()
this.resetForm('queryForm')
this.sortColumn = ''
this.queryParams.orderByColumn = null
......@@ -979,7 +988,7 @@ export default {
})
},
/** 导出按钮操作 */
handleExport() {
handleExport(buttonId) {
if (this.ids.length !== 0) {
if (this.queryParams.orderByColumn === null) {
this.queryParams.orderByColumn = 'c.create_time'
......@@ -995,9 +1004,10 @@ export default {
this.download('business/check/export', exportTable, `检查管理-${this.exportFormatTime(new Date())}.xlsx`).then(res => {
this.$refs.table.clearSelection()
})
document.getElementById(buttonId).blur()
} else {
this.$modal.msgWarning('请选择至少一条数据导出')
return
return document.getElementById(buttonId).blur()
}
},
// 导出格式化
......
......@@ -51,27 +51,30 @@
</el-form>
<el-row :gutter="10" class="mb8" style="margin: 0 0 20px 1px">
<el-button
id="select-all"
v-hasPermi="['business:manage:export']"
class="fourWordswhiteBtn"
@click="selectAll()"
@click="selectAll('select-all')"
>
<svg-icon style="margin-right: 1px;" icon-class="shuaixuan_icon_quanbu" />
选择全部
</el-button>
<el-button
id="reverse-select"
v-hasPermi="['business:manage:export']"
class="fourWordswhiteBtn"
size="mini"
@click="reverseSelect(treatmentList)"
@click="reverseSelect('reverse-select', treatmentList)"
>
<svg-icon style="margin-right: 1px;" icon-class="shuaixuan_icon_fanxiang" />
反向选择
</el-button>
<el-button
id="bulk-export"
v-hasPermi="['business:manage:export']"
class="fourWordswhiteBtn"
size="mini"
@click="handleExport"
@click="handleExport('bulk-export')"
>
<svg-icon style="margin-right: 1px;" icon-class="shaixuan_icon_daochu" />
批量导出
......@@ -85,19 +88,21 @@
>治疗项目
</el-button>
<el-button
id="reset-query"
style="position: relative; float: right;"
class="resetBtn"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
@click="resetQuery('reset-query')"
>重置
</el-button>
<el-button
id="handle-query"
style="position: relative; float: right;"
class="queryBtn"
icon="el-icon-search"
size="mini"
@click="handleQuery"
@click="handleQuery('handle-query')"
>查询
</el-button>
</el-row>
......@@ -687,7 +692,8 @@ export default {
* @param selection 已选择内容
* @param all 是否永远进行全选操作
*/
async selectAll(selection = [], all = true) {
async selectAll(buttonId, selection = [], all = true) {
document.getElementById(buttonId).blur()
if (this.treatmentList.length !== selection.length && !all) {
this.effectTableSelect([])
} else {
......@@ -714,8 +720,9 @@ export default {
this.effectTableSelect(data)
},
// 反向选择
reverseSelect() {
reverseSelect(buttonId) {
this.changeTableSelect(this.ids)
document.getElementById(buttonId).blur()
},
// 治疗项目下拉框
getTreatmentDropdown() {
......@@ -853,9 +860,10 @@ export default {
})
},
/** 搜索按钮操作 */
handleQuery() {
handleQuery(buttonId) {
this.queryParams.pageNum = 1
this.getList()
document.getElementById(buttonId).blur()
},
/** 分配诊室 */
handleSubscribe(row) {
......@@ -867,7 +875,8 @@ export default {
this.getAppointmentRecord()
},
/** 重置按钮操作 */
resetQuery() {
resetQuery(buttonId) {
document.getElementById(buttonId).blur()
this.treatStartTimeQu = ''
this.sortedColumn = ''
this.queryParams = {
......@@ -915,7 +924,7 @@ export default {
})
},
/** 导出按钮操作 */
handleExport() {
handleExport(buttonId) {
if (this.ids.length !== 0) {
const exportTable = {
orderByColumn: this.queryParams.orderByColumn,
......@@ -927,9 +936,10 @@ export default {
this.download('business/treat/export', exportTable, `治疗管理-${this.exportFormatTime(new Date())}.xlsx`).then(res => {
this.$refs.table.clearSelection()
})
document.getElementById(buttonId).blur()
} else {
this.$modal.msgWarning('请选择至少一条数据导出')
return
return document.getElementById(buttonId).blur()
}
},
// 导出格式化
......
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