|
|
@ -23,19 +23,19 @@ |
|
|
|
<!-- 数字输入框 --> |
|
|
|
<el-input-number v-else-if="getInputType(item.column) == 'inputNumber'" v-model="item.value" :precision="6" :disabled="item.disabled"/> |
|
|
|
<!-- 下拉框 --> |
|
|
|
<el-select v-else-if="getInputType(item.column) == 'select'" v-model="item.value" placeholder="请选择内容" :filterable="true" clearable :disabled="item.disabled"> |
|
|
|
<el-select v-else-if="getInputType(item.column) == 'select'" v-model="item.value1" placeholder="请选择内容" :filterable="true" clearable :disabled="item.disabled" :multiple="item.action=='in' || item.action=='notIn' ? true : false" collapse-tags collapse-tags-tooltip :key="item.action"> |
|
|
|
<el-option v-for="dict in initSelectOptions(item.column)" :key="dict.value" :label="dict.label" |
|
|
|
:value="dict.value" /> |
|
|
|
<!-- <el-option v-for="(op, index) in initSelectOptions(item.column)" :label="op[item.optionsLabel] || op.label" |
|
|
|
:value="op[item.optionsValue] || op.value" :key="index" /> --> |
|
|
|
</el-select> |
|
|
|
<!-- 时间 --> |
|
|
|
<el-time-picker v-else-if="getInputType(item.column) == 'time'" range-separator="-" start-placeholder="开始时间" end-placeholder="结束时间" v-model="item.time" style="width: calc(100% - 20px);margin-right: 10px;" :disabled="item.disabled"/> |
|
|
|
<el-time-picker v-else-if="getInputType(item.column) == 'time'" range-separator="-" start-placeholder="开始时间" end-placeholder="结束时间" v-model="item.value1" style="width: calc(100% - 20px);margin-right: 10px;" :disabled="item.disabled"/> |
|
|
|
<!-- 日期 --> |
|
|
|
<el-date-picker v-else-if="getInputType(item.column) == 'date'" v-model="item.time" type="daterange" |
|
|
|
<el-date-picker v-else-if="getInputType(item.column) == 'date'" v-model="item.value1" type="daterange" |
|
|
|
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" style="width: calc(100% - 20px);margin-right: 10px;" @change="changeDateTimePicker($event, item,'daterange')" value-format="YYYY-MM-DD" format="YYYY/MM/DD" :disabled="item.disabled"/> |
|
|
|
<!-- 日期时间 --> |
|
|
|
<el-date-picker v-else-if="getInputType(item.column) == 'datePicker'" v-model="item.time" type="datetimerange" |
|
|
|
<el-date-picker v-else-if="getInputType(item.column) == 'datePicker'" v-model="item.value1" type="datetimerange" |
|
|
|
range-separator="-" start-placeholder="开始时间" end-placeholder="结束时间" style="width: calc(100% - 20px);margin-right: 10px;" @change="changeDateTimePicker($event, item, 'datetimerange')" value-format="x" format="YYYY/MM/DD HH:mm:ss" :disabled="item.disabled"/> |
|
|
|
</div> |
|
|
|
<!-- 删除条件按钮 --> |
|
|
@ -178,7 +178,7 @@ const moreListPush = () => { |
|
|
|
column: '', |
|
|
|
action: "==", |
|
|
|
value: "", |
|
|
|
time:'' |
|
|
|
value1 :"" |
|
|
|
} |
|
|
|
moreListData.value.filters.push(data) |
|
|
|
} |
|
|
@ -187,13 +187,13 @@ const moreListPush = () => { |
|
|
|
const resetSelect = (val) => { |
|
|
|
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 |
|
|
|
} |
|
|
|
val.value1 = "" |
|
|
|
val.value = "" |
|
|
|
} |
|
|
|
// 范围改变 |
|
|
|
const actionSelect = (val)=>{ |
|
|
@ -202,6 +202,12 @@ const actionSelect = (val)=>{ |
|
|
|
}else{ |
|
|
|
val.disabled = false |
|
|
|
} |
|
|
|
val.value1 = undefined |
|
|
|
nextTick(()=>{ |
|
|
|
val.value1 =[] |
|
|
|
val.value = '' |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 查询 重置按钮事件 |
|
|
@ -209,11 +215,21 @@ const buttonBaseClick = (val) => { |
|
|
|
if (val == 'search') { // 查询 |
|
|
|
let data = [] |
|
|
|
moreListData.value.filters.forEach(item => { |
|
|
|
let obj = { |
|
|
|
let obj = {} |
|
|
|
if(item.value1&&item.value1.length>0){ |
|
|
|
obj = { |
|
|
|
column: item.column, |
|
|
|
action: item.action, |
|
|
|
value:Array.isArray(item.value1)?item.value1.join(','):item.value1, |
|
|
|
} |
|
|
|
}else{ |
|
|
|
obj = { |
|
|
|
column: item.column, |
|
|
|
action: item.action, |
|
|
|
value:item.value, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
data.push(obj) |
|
|
|
}) |
|
|
|
if (props.masterId){ |
|
|
|