Browse Source

HL-5812 全局筛选切换筛选条件和操作符时,如切换后的筛选条件和原类型输入方式相同时保持数据输入字段内容不清空

hella_online_20240904
yufei_wang 2 months ago
parent
commit
722e5cda6b
  1. 14
      src/components/SearchHigh/src/SearchHigh.vue

14
src/components/SearchHigh/src/SearchHigh.vue

@ -245,6 +245,7 @@ const moreListPush = () => {
moreListData.value.filters.push(data) moreListData.value.filters.push(data)
} }
const lastestType = ref('')
// //
const resetSelect = (val) => { const resetSelect = (val) => {
if (getInputType(val.column) == 'datePicker' || getInputType(val.column) == 'date') { if (getInputType(val.column) == 'datePicker' || getInputType(val.column) == 'date') {
@ -254,8 +255,11 @@ const resetSelect = (val) => {
val.action = 'like' val.action = 'like'
val.disabled = false val.disabled = false
} }
if(lastestType.value&&lastestType.value!=getInputType(val.column)){
val.value1 = "" val.value1 = ""
val.value = "" val.value = ""
}
lastestType.value = getInputType(val.column)
} }
// //
const actionSelect = (val)=>{ const actionSelect = (val)=>{
@ -264,11 +268,11 @@ const actionSelect = (val)=>{
}else{ }else{
val.disabled = false val.disabled = false
} }
val.value1 = undefined // val.value1 = undefined
nextTick(()=>{ // nextTick(()=>{
val.value1 =[] // val.value1 =[]
val.value = '' // val.value = ''
}) // })
} }

Loading…
Cancel
Save