Browse Source

1、高级筛选枚举下拉类型、时间类型转换

2、cellClassName
noToken
安虹睿 1 year ago
parent
commit
7d5466f57a
  1. 22
      PC/InterFace.Dash/src/components/searchOverall/index.vue
  2. 7
      PC/InterFace.Dash/src/components/umyTable/index.vue
  3. 50
      PC/UI.WinIn.FasterZ.Job/src/components/searchOverall/index.vue
  4. 7
      PC/UI.WinIn.FasterZ.Job/src/components/umyTable/index.vue
  5. 22
      PC/UI.WinIn.FasterZ.Store/src/components/searchOverall/index.vue
  6. 7
      PC/UI.WinIn.FasterZ.Store/src/components/umyTable/index.vue

22
PC/InterFace.Dash/src/components/searchOverall/index.vue

@ -95,7 +95,7 @@
:rules="rules && rules.value ? rules.value : []" :rules="rules && rules.value ? rules.value : []"
> >
<el-select <el-select
v-if="Object.keys(inputOrSelect(item.column)).length > 0" v-if="inputOrSelect(item.column)"
v-model="item.value" v-model="item.value"
placeholder="请选择内容" placeholder="请选择内容"
:disabled="item.column == '' || item.hide ? true : false" :disabled="item.column == '' || item.hide ? true : false"
@ -104,9 +104,7 @@
clearable clearable
> >
<el-option <el-option
v-for="item in $staticOptions[ v-for="item in inputOrSelect(item.column)"
inputOrSelect(item.column).filters
]()"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value=" :value="
@ -119,7 +117,7 @@
</el-select> </el-select>
<!-- 日期时间 --> <!-- 日期时间 -->
<el-date-picker <el-date-picker
v-else-if="getColumnType(item.column) == 'dateTime'" v-else-if="getColumnType(item.column) == 'datetime'"
type="datetime" type="datetime"
v-model="item.value" v-model="item.value"
:placeholder="'选择日期时间'" :placeholder="'选择日期时间'"
@ -461,8 +459,8 @@
getColumnType(val) { getColumnType(val) {
var columnsType = this.tableColumns.filter(item => item.prop == val) var columnsType = this.tableColumns.filter(item => item.prop == val)
if (columnsType.length > 0) { if (columnsType.length > 0) {
if (columnsType[0].type) { if (columnsType[0].apiBaseType) {
return columnsType[0].type return columnsType[0].apiBaseType
} }
} else { } else {
return '' return ''
@ -503,19 +501,15 @@
}, },
// moreListinputselect // moreListinputselect
inputOrSelect(val) { inputOrSelect(val) {
let data let data = null
if (val) { if (val) {
this.tableColumns.forEach((key) => { this.tableColumns.forEach((key) => {
if (val == key.prop) { if (val == key.prop) {
if (key.filters) { if (key.enums_list && key.enums_list.length > 0) {
data = key data = key.enums_list
} else {
data = {}
} }
} }
}) })
} else {
data = {}
} }
return data return data
}, },

7
PC/InterFace.Dash/src/components/umyTable/index.vue

@ -12,6 +12,7 @@
:border="tableBorder" :border="tableBorder"
style="width: 100%" style="width: 100%"
:cell-style="cellStyle" :cell-style="cellStyle"
:cell-class-name="cellClassName"
use-virtual use-virtual
:height="uTableHeight" :height="uTableHeight"
header-row-class-name="uTableHeader" header-row-class-name="uTableHeader"
@ -316,6 +317,12 @@ export default {
return Function; return Function;
} }
}, },
cellClassName: {
type: Function,
default: () => {
return Function;
}
},
// app-main100% // app-main100%
setUTableHeight: { setUTableHeight: {
type: Number, type: Number,

50
PC/UI.WinIn.FasterZ.Job/src/components/searchOverall/index.vue

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

7
PC/UI.WinIn.FasterZ.Job/src/components/umyTable/index.vue

@ -12,6 +12,7 @@
:border="tableBorder" :border="tableBorder"
style="width: 100%" style="width: 100%"
:cell-style="cellStyle" :cell-style="cellStyle"
:cell-class-name="cellClassName"
use-virtual use-virtual
:height="uTableHeight" :height="uTableHeight"
header-row-class-name="uTableHeader" header-row-class-name="uTableHeader"
@ -316,6 +317,12 @@ export default {
return Function; return Function;
} }
}, },
cellClassName: {
type: Function,
default: () => {
return Function;
}
},
// app-main100% // app-main100%
setUTableHeight: { setUTableHeight: {
type: Number, type: Number,

22
PC/UI.WinIn.FasterZ.Store/src/components/searchOverall/index.vue

@ -95,7 +95,7 @@
:rules="rules && rules.value ? rules.value : []" :rules="rules && rules.value ? rules.value : []"
> >
<el-select <el-select
v-if="Object.keys(inputOrSelect(item.column)).length > 0" v-if="inputOrSelect(item.column)"
v-model="item.value" v-model="item.value"
placeholder="请选择内容" placeholder="请选择内容"
:disabled="item.column == '' || item.hide ? true : false" :disabled="item.column == '' || item.hide ? true : false"
@ -104,9 +104,7 @@
clearable clearable
> >
<el-option <el-option
v-for="item in $staticOptions[ v-for="item in inputOrSelect(item.column)"
inputOrSelect(item.column).filters
]()"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value=" :value="
@ -119,7 +117,7 @@
</el-select> </el-select>
<!-- 日期时间 --> <!-- 日期时间 -->
<el-date-picker <el-date-picker
v-else-if="getColumnType(item.column) == 'dateTime'" v-else-if="getColumnType(item.column) == 'datetime'"
type="datetime" type="datetime"
v-model="item.value" v-model="item.value"
:placeholder="'选择日期时间'" :placeholder="'选择日期时间'"
@ -461,8 +459,8 @@
getColumnType(val) { getColumnType(val) {
var columnsType = this.tableColumns.filter(item => item.prop == val) var columnsType = this.tableColumns.filter(item => item.prop == val)
if (columnsType.length > 0) { if (columnsType.length > 0) {
if (columnsType[0].type) { if (columnsType[0].apiBaseType) {
return columnsType[0].type return columnsType[0].apiBaseType
} }
} else { } else {
return '' return ''
@ -503,19 +501,15 @@
}, },
// moreListinputselect // moreListinputselect
inputOrSelect(val) { inputOrSelect(val) {
let data let data = null
if (val) { if (val) {
this.tableColumns.forEach((key) => { this.tableColumns.forEach((key) => {
if (val == key.prop) { if (val == key.prop) {
if (key.filters) { if (key.enums_list && key.enums_list.length > 0) {
data = key data = key.enums_list
} else {
data = {}
} }
} }
}) })
} else {
data = {}
} }
return data return data
}, },

7
PC/UI.WinIn.FasterZ.Store/src/components/umyTable/index.vue

@ -12,6 +12,7 @@
:border="tableBorder" :border="tableBorder"
style="width: 100%" style="width: 100%"
:cell-style="cellStyle" :cell-style="cellStyle"
:cell-class-name="cellClassName"
use-virtual use-virtual
:height="uTableHeight" :height="uTableHeight"
header-row-class-name="uTableHeader" header-row-class-name="uTableHeader"
@ -316,6 +317,12 @@ export default {
return Function; return Function;
} }
}, },
cellClassName: {
type: Function,
default: () => {
return Function;
}
},
// app-main100% // app-main100%
setUTableHeight: { setUTableHeight: {
type: Number, type: Number,

Loading…
Cancel
Save