Commit ece50a3e by dqjdda

日期查询优化

parent 8e60664e
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="字段配置" name="second"> <el-tab-pane label="字段配置" name="second">
<el-form size="small" label-width="90px"> <el-form size="small" label-width="90px">
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;margin-bottom: 15px"> <el-table v-loading="loading" :data="data" :height="tableHeight" size="small" style="width: 100%;margin-bottom: 15px">
<el-table-column label="序号" width="80" align="center"> <el-table-column label="序号" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.$index + 1 }}</div> <div>{{ scope.$index + 1 }}</div>
...@@ -38,14 +38,44 @@ ...@@ -38,14 +38,44 @@
</el-table-column> </el-table-column>
<el-table-column prop="columnName" label="字段名称"/> <el-table-column prop="columnName" label="字段名称"/>
<el-table-column prop="columnType" label="字段类型"/> <el-table-column prop="columnType" label="字段类型"/>
<el-table-column prop="columnComment" label="字段标题"> <el-table-column prop="columnComment" label="字段描述">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="data[scope.$index].columnComment" class="edit-input"/> <el-input v-model="data[scope.$index].columnComment" size="mini" class="edit-input"/>
</template>
</el-table-column>
<el-table-column align="center" prop="columnShow" label="必填">
<template slot-scope="scope">
<el-switch
v-model="data[scope.$index].columnShow"
active-color="#409EFF"
inactive-color="#F56C6C"
active-value="true"
inactive-value="false"/>
</template>
</el-table-column>
<el-table-column align="center" prop="columnShow" label="表单">
<template slot-scope="scope">
<el-switch
v-model="data[scope.$index].columnShow"
active-color="#409EFF"
inactive-color="#F56C6C"
active-value="true"
inactive-value="false"/>
</template>
</el-table-column>
<el-table-column align="center" prop="columnShow" label="列表">
<template slot-scope="scope">
<el-switch
v-model="data[scope.$index].columnShow"
active-color="#409EFF"
inactive-color="#F56C6C"
active-value="true"
inactive-value="false"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="查询方式"> <el-table-column label="查询方式">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="data[scope.$index].columnQuery" class="edit-input" clearable placeholder="请选择"> <el-select v-model="data[scope.$index].columnQuery" class="edit-input" clearable size="mini" placeholder="请选择">
<el-option <el-option
label="模糊查询" label="模糊查询"
value="1"/> value="1"/>
...@@ -55,16 +85,16 @@ ...@@ -55,16 +85,16 @@
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="columnShow" label="列表显示"> <el-table-column label="关联字典">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip :content="scope.row.columnShow === 'true' ?'显示':'不显示'" placement="top"> <el-select v-model="data[scope.$index].columnQuery" class="edit-input" clearable size="mini" placeholder="请选择">
<el-switch <el-option
v-model="data[scope.$index].columnShow" label="模糊查询"
active-color="#13ce66" value="1"/>
inactive-color="#ff4949" <el-option
active-value="true" label="精确查询"
inactive-value="false"/> value="2"/>
</el-tooltip> </el-select>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -82,7 +112,7 @@ export default { ...@@ -82,7 +112,7 @@ export default {
mixins: [initData], mixins: [initData],
data() { data() {
return { return {
activeName: 'second', tableName: '', activeName: 'second', tableName: '', tableHeight: 550,
form: { author: '', pack: '', path: '', moduleName: '', cover: 'false', apiPath: '', prefix: '' }, form: { author: '', pack: '', path: '', moduleName: '', cover: 'false', apiPath: '', prefix: '' },
rules: { rules: {
author: [ author: [
...@@ -104,6 +134,7 @@ export default { ...@@ -104,6 +134,7 @@ export default {
} }
}, },
created() { created() {
this.tableHeight = document.documentElement.clientHeight - 260
this.tableName = this.$route.params.tableName this.tableName = this.$route.params.tableName
this.$nextTick(() => { this.$nextTick(() => {
this.init() this.init()
...@@ -143,7 +174,7 @@ export default { ...@@ -143,7 +174,7 @@ export default {
<style rel="stylesheet/scss" lang="scss"> <style rel="stylesheet/scss" lang="scss">
.edit-input { .edit-input {
.el-input__inner { .el-input__inner {
border: none; border: 1px solid #e5e6e7;
} }
} }
</style> </style>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<el-input v-model="query.value" clearable placeholder="请输入你要搜索的内容" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/> <el-input v-model="query.value" clearable placeholder="请输入你要搜索的内容" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-date-picker <el-date-picker
v-model="query.date" v-model="query.date"
:default-time="['00:00:00','23:59:59']"
type="daterange" type="daterange"
range-separator=":" range-separator=":"
class="el-range-editor--small filter-item" class="el-range-editor--small filter-item"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<el-input v-model="query.value" clearable placeholder="输入部门名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/> <el-input v-model="query.value" clearable placeholder="输入部门名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-date-picker <el-date-picker
v-model="query.date" v-model="query.date"
:default-time="['00:00:00','23:59:59']"
type="daterange" type="daterange"
range-separator=":" range-separator=":"
class="el-range-editor--small filter-item" class="el-range-editor--small filter-item"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<el-input v-model="query.value" clearable placeholder="输入岗位名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/> <el-input v-model="query.value" clearable placeholder="输入岗位名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-date-picker <el-date-picker
v-model="query.date" v-model="query.date"
:default-time="['00:00:00','23:59:59']"
type="daterange" type="daterange"
range-separator=":" range-separator=":"
class="el-range-editor--small filter-item" class="el-range-editor--small filter-item"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<el-input v-model="query.value" clearable placeholder="模糊搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/> <el-input v-model="query.value" clearable placeholder="模糊搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-date-picker <el-date-picker
v-model="query.date" v-model="query.date"
:default-time="['00:00:00','23:59:59']"
type="daterange" type="daterange"
range-separator=":" range-separator=":"
class="el-range-editor--small filter-item" class="el-range-editor--small filter-item"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<el-input v-model="query.value" clearable placeholder="输入名称或者描述搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/> <el-input v-model="query.value" clearable placeholder="输入名称或者描述搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-date-picker <el-date-picker
v-model="query.date" v-model="query.date"
:default-time="['00:00:00','23:59:59']"
type="daterange" type="daterange"
range-separator=":" range-separator=":"
class="el-range-editor--small filter-item" class="el-range-editor--small filter-item"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<el-input v-model="query.value" clearable placeholder="输入任务名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/> <el-input v-model="query.value" clearable placeholder="输入任务名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-date-picker <el-date-picker
v-model="query.date" v-model="query.date"
:default-time="['00:00:00','23:59:59']"
type="daterange" type="daterange"
range-separator=":" range-separator=":"
class="el-range-editor--small filter-item" class="el-range-editor--small filter-item"
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<el-input v-model="query.value" clearable placeholder="输入任务名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/> <el-input v-model="query.value" clearable placeholder="输入任务名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-date-picker <el-date-picker
v-model="query.date" v-model="query.date"
:default-time="['00:00:00','23:59:59']"
type="daterange" type="daterange"
range-separator=":" range-separator=":"
class="el-range-editor--small filter-item" class="el-range-editor--small filter-item"
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<el-input v-model="query.blurry" clearable placeholder="输入名称或者邮箱搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/> <el-input v-model="query.blurry" clearable placeholder="输入名称或者邮箱搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-date-picker <el-date-picker
v-model="query.date" v-model="query.date"
:default-time="['00:00:00','23:59:59']"
type="daterange" type="daterange"
range-separator=":" range-separator=":"
class="el-range-editor--small filter-item" class="el-range-editor--small filter-item"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<el-input v-model="query.filename" clearable placeholder="输入文件名" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/> <el-input v-model="query.filename" clearable placeholder="输入文件名" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-date-picker <el-date-picker
v-model="query.date" v-model="query.date"
:default-time="['00:00:00','23:59:59']"
type="daterange" type="daterange"
range-separator=":" range-separator=":"
class="el-range-editor--small filter-item" class="el-range-editor--small filter-item"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<el-input v-model="query.value" clearable placeholder="输入内容模糊搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/> <el-input v-model="query.value" clearable placeholder="输入内容模糊搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-date-picker <el-date-picker
v-model="query.date" v-model="query.date"
:default-time="['00:00:00','23:59:59']"
type="daterange" type="daterange"
range-separator=":" range-separator=":"
class="el-range-editor--small filter-item" class="el-range-editor--small filter-item"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<el-input v-model="query.value" clearable placeholder="输入文件名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/> <el-input v-model="query.value" clearable placeholder="输入文件名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-date-picker <el-date-picker
v-model="query.date" v-model="query.date"
:default-time="['00:00:00','23:59:59']"
type="daterange" type="daterange"
range-separator=":" range-separator=":"
class="el-range-editor--small filter-item" class="el-range-editor--small filter-item"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment