|
|
@ -1,11 +1,11 @@ |
|
|
|
<template> |
|
|
|
<!-- 全面的筛选组件:初级普通筛选 + 高级筛选(按照配置来判断显示情况)--> |
|
|
|
<!-- todo:使用v-if每次重新赋值,与接口查询保持一致 --> |
|
|
|
<div |
|
|
|
<!-- 全面的筛选组件:初级普通筛选 + 高级筛选(按照配置来判断显示情况)--> |
|
|
|
<!-- todo:使用v-if每次重新赋值,与接口查询保持一致 --> |
|
|
|
<div |
|
|
|
class="searchOverallComponent" |
|
|
|
:style="{height:componentsHeight+'px',overflow:isShowMoreList ? 'unset' : 'hidden'}" |
|
|
|
v-show="isShow" |
|
|
|
> |
|
|
|
> |
|
|
|
<div |
|
|
|
class="border-outer" |
|
|
|
ref="searchOverallComponent_inner" |
|
|
@ -95,7 +95,7 @@ |
|
|
|
:rules="rules && rules.value ? rules.value : []" |
|
|
|
> |
|
|
|
<el-select |
|
|
|
v-if="Object.keys(inputOrSelect(item.column)).length > 0" |
|
|
|
v-if="inputOrSelect(item.column)" |
|
|
|
v-model="item.value" |
|
|
|
placeholder="请选择内容" |
|
|
|
:disabled="item.column == '' || item.hide ? true : false" |
|
|
@ -104,9 +104,7 @@ |
|
|
|
clearable |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in $staticOptions[ |
|
|
|
inputOrSelect(item.column).filters |
|
|
|
]()" |
|
|
|
v-for="item in inputOrSelect(item.column)" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value=" |
|
|
@ -119,7 +117,7 @@ |
|
|
|
</el-select> |
|
|
|
<!-- 日期时间 --> |
|
|
|
<el-date-picker |
|
|
|
v-else-if="getColumnType(item.column) == 'dateTime'" |
|
|
|
v-else-if="getColumnType(item.column) == 'datetime'" |
|
|
|
type="datetime" |
|
|
|
v-model="item.value" |
|
|
|
:placeholder="'选择日期时间'" |
|
|
@ -207,11 +205,11 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import searchPrimary from "@/components/searchPrimary" |
|
|
|
export default { |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import searchPrimary from "@/components/searchPrimary" |
|
|
|
export default { |
|
|
|
name:'searchOverallComponent', |
|
|
|
components: { |
|
|
|
searchPrimary, |
|
|
@ -461,8 +459,8 @@ export default { |
|
|
|
getColumnType(val) { |
|
|
|
var columnsType = this.tableColumns.filter(item => item.prop == val) |
|
|
|
if (columnsType.length > 0) { |
|
|
|
if (columnsType[0].type) { |
|
|
|
return columnsType[0].type |
|
|
|
if (columnsType[0].apiBaseType) { |
|
|
|
return columnsType[0].apiBaseType |
|
|
|
} |
|
|
|
} else { |
|
|
|
return '' |
|
|
@ -503,19 +501,15 @@ export default { |
|
|
|
}, |
|
|
|
// 设置moreList列表的内容项是input还是select |
|
|
|
inputOrSelect(val) { |
|
|
|
let data |
|
|
|
let data = null |
|
|
|
if (val) { |
|
|
|
this.tableColumns.forEach((key) => { |
|
|
|
if (val == key.prop) { |
|
|
|
if (key.filters) { |
|
|
|
data = key |
|
|
|
} else { |
|
|
|
data = {} |
|
|
|
if (key.enums_list && key.enums_list.length > 0) { |
|
|
|
data = key.enums_list |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
data = {} |
|
|
|
} |
|
|
|
return data |
|
|
|
}, |
|
|
@ -642,8 +636,8 @@ export default { |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
@import "./style/index.scss"; |
|
|
|
</style> |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
@import "./style/index.scss"; |
|
|
|
</style> |