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

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

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