NEZ-1351 fix:ser详情界面搜索时有选项框的内容,无法通过键盘进行删除,点击删除键后,鼠标光标无法选中输入框
This commit is contained in:
@@ -227,7 +227,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<!-- 最开始的input框-->
|
<!-- 最开始的input框-->
|
||||||
<li class="select_input" v-if="change_sreach_show">
|
<li class="select_input" v-if="change_sreach_show">
|
||||||
<input type="text" @click="read_input" v-model="no_condition" @keyup="enter_one" id="one-input" @keydown="clear_search_list" :placeholder="placeholder">
|
<input type="text" @click="read_input" v-model="no_condition" @keyup="enter_one" :id="'one-input' + position" @keydown="clear_search_list" :placeholder="placeholder">
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
@@ -456,7 +456,10 @@ export default {
|
|||||||
defaultItem: {},
|
defaultItem: {},
|
||||||
defaultValue: {},
|
defaultValue: {},
|
||||||
inTransform: {},
|
inTransform: {},
|
||||||
position: {},
|
position: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
single: {},
|
single: {},
|
||||||
showHistory: {
|
showHistory: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -528,7 +531,9 @@ export default {
|
|||||||
this.change_sreach_show = true
|
this.change_sreach_show = true
|
||||||
this.input_list = false
|
this.input_list = false
|
||||||
const _this = this
|
const _this = this
|
||||||
setTimeout('document.getElementById("one-input").focus()', 500)
|
setTimeout(() => {
|
||||||
|
document.getElementById('one-input' + this.position).focus()
|
||||||
|
}, 500)
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
_this.getHeight()
|
_this.getHeight()
|
||||||
})
|
})
|
||||||
@@ -700,7 +705,9 @@ export default {
|
|||||||
this.change_sreach_show = true
|
this.change_sreach_show = true
|
||||||
this.input_list = false
|
this.input_list = false
|
||||||
const _this = this
|
const _this = this
|
||||||
setTimeout('document.getElementById("one-input").focus()', 500)
|
setTimeout(() => {
|
||||||
|
document.getElementById('one-input' + this.position).focus()
|
||||||
|
}, 500)
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
_this.getHeight()
|
_this.getHeight()
|
||||||
})
|
})
|
||||||
@@ -719,7 +726,9 @@ export default {
|
|||||||
this.change_sreach_show = true
|
this.change_sreach_show = true
|
||||||
this.input_list = false
|
this.input_list = false
|
||||||
const _this = this
|
const _this = this
|
||||||
setTimeout('document.getElementById("one-input").focus()', 500)
|
setTimeout(() => {
|
||||||
|
document.getElementById('one-input' + this.position).focus()
|
||||||
|
}, 500)
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
_this.getHeight()
|
_this.getHeight()
|
||||||
})
|
})
|
||||||
@@ -1053,6 +1062,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// input框监听是按删除还是回车
|
// input框监听是按删除还是回车
|
||||||
enter (val, e) {
|
enter (val, e) {
|
||||||
|
console.log(val, e)
|
||||||
const keyCode = window.event ? e.keyCode : e.which
|
const keyCode = window.event ? e.keyCode : e.which
|
||||||
if (val == 'ID' && keyCode == 13) {
|
if (val == 'ID' && keyCode == 13) {
|
||||||
const id = /^[0-9]*$/
|
const id = /^[0-9]*$/
|
||||||
@@ -1078,12 +1088,17 @@ export default {
|
|||||||
})
|
})
|
||||||
this.select_list.splice(this.sreach_num, 1)
|
this.select_list.splice(this.sreach_num, 1)
|
||||||
this.change_sreach_show = true
|
this.change_sreach_show = true
|
||||||
setTimeout('document.getElementById("one-input").focus()', 500)
|
setTimeout(() => {
|
||||||
|
document.getElementById('one-input' + this.position).focus()
|
||||||
|
}, 500)
|
||||||
this.input_list = false
|
this.input_list = false
|
||||||
this.delBool = false
|
this.delBool = false
|
||||||
|
} else if (this.searchMsg.searchLabelList.find(key => this.select_list[this.sreach_num].label == key.label).readonly) {
|
||||||
|
this.input_sreach = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
console.log(this.searchMsg.searchLabelList.find(key => this.select_list[this.sreach_num].label == key.label))
|
||||||
if (keyCode == 8) {
|
if (keyCode == 8) {
|
||||||
if (this.delcriteriaBool || !this.input_sreach) {
|
if (this.delcriteriaBool || !this.input_sreach) {
|
||||||
this.searchMsg.searchLabelList.forEach((val, k) => {
|
this.searchMsg.searchLabelList.forEach((val, k) => {
|
||||||
@@ -1094,7 +1109,9 @@ export default {
|
|||||||
})
|
})
|
||||||
this.select_list.splice(this.sreach_num, 1)
|
this.select_list.splice(this.sreach_num, 1)
|
||||||
this.change_sreach_show = true
|
this.change_sreach_show = true
|
||||||
setTimeout('document.getElementById("one-input").focus()', 500)
|
setTimeout(() => {
|
||||||
|
document.getElementById('one-input' + this.position).focus()
|
||||||
|
}, 500)
|
||||||
this.input_list = false
|
this.input_list = false
|
||||||
this.delcriteriaBool = false
|
this.delcriteriaBool = false
|
||||||
} else if (this.searchMsg.searchLabelList.find(key => this.select_list[this.sreach_num].label == key.label).readonly) {
|
} else if (this.searchMsg.searchLabelList.find(key => this.select_list[this.sreach_num].label == key.label).readonly) {
|
||||||
@@ -1111,7 +1128,9 @@ export default {
|
|||||||
if (this.select_list[this.sreach_num].type !== 'select') {
|
if (this.select_list[this.sreach_num].type !== 'select') {
|
||||||
if (this.input_sreach !== '') {
|
if (this.input_sreach !== '') {
|
||||||
this.zhezhao_click()
|
this.zhezhao_click()
|
||||||
setTimeout('document.getElementById("one-input").focus()', 500)
|
setTimeout(() => {
|
||||||
|
document.getElementById('one-input' + this.position).focus()
|
||||||
|
}, 500)
|
||||||
this.input_list = false
|
this.input_list = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1301,7 +1320,9 @@ export default {
|
|||||||
this.no_condition = ''
|
this.no_condition = ''
|
||||||
this.sreach_num = this.select_list.length
|
this.sreach_num = this.select_list.length
|
||||||
}
|
}
|
||||||
setTimeout('document.getElementById("one-input").focus()', 500)
|
setTimeout(() => {
|
||||||
|
document.getElementById('one-input' + this.position).focus()
|
||||||
|
}, 500)
|
||||||
this.input_list = !this.input_list
|
this.input_list = !this.input_list
|
||||||
const _this = this
|
const _this = this
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user