diff --git a/src/components/SearchHigh/src/SearchHigh.vue b/src/components/SearchHigh/src/SearchHigh.vue index c56d4c149..95eeba3af 100644 --- a/src/components/SearchHigh/src/SearchHigh.vue +++ b/src/components/SearchHigh/src/SearchHigh.vue @@ -11,7 +11,7 @@
- + @@ -19,24 +19,24 @@
- + - + - + - + + range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 340px;margin-right: 20px;" @change="changeDateTimePicker($event, item,'daterange')" value-format="YYYY-MM-DD" format="YYYY/MM/DD" :disabled="item.disabled"/> + range-separator="-" start-placeholder="开始时间" end-placeholder="结束时间" style="width: 340px;" @change="changeDateTimePicker($event, item, 'datetimerange')" value-format="x" format="YYYY/MM/DD HH:mm:ss" :disabled="item.disabled"/>
,<,>=,<=,like,in,notIn,betweeen,isNull,isNotNull const formatMoreListActions = (val) => { if (val) { - // for(var i = 0; i < searchOption_high.value.length; i++) { - // if (val == searchOption_high[i].prop) { - // if (state.searchOption_high[i].filters) { - // return state.moreListOptions.action.filter(item => item.value == '==' || item.value == '!=') - // } else if (state.searchOption_high[i].type == 'dateTime') { - // return state.moreListOptions.action.filter(item => - // item.value == '==' || - // item.value == '!=' || - // item.value == '>' || - // item.value == '<' || - // item.value == '>=' || - // item.value == '<=' ) - // } else { - // return moreListOptions.value.action - // } - // } - // } + if(getInputType(val.column)=='datePicker'|| getInputType(val.column) == 'date'){ + return moreListOptions.value.action.filter(item => item.value == 'betweeen') + }else{ + return moreListOptions.value.action.filter(item => item.value != 'betweeen') + } } return moreListOptions.value.action } @@ -189,8 +177,23 @@ const moreListPush = () => { // 筛选条件改变重置其他项 const resetSelect = (val) => { - val.action = "==" - val.value = "" + if (getInputType(val.column) == 'datePicker' || getInputType(val.column) == 'date') { + val.action = 'betweeen' + val.value = "" + val.disabled = false + }else{ + val.action = '==' + val.value = "" + val.disabled = false + } +} +// 范围改变 +const actionSelect = (val)=>{ + if(val.action=='isNull'|| val.action == 'isNotNull'){ + val.disabled = true + }else{ + val.disabled = false + } } // 查询 重置按钮事件