style:高级查询
Showing
4 changed files
with
56 additions
and
27 deletions
src/views/ywbl/components/mixin/index.js
0 → 100644
1 | export default { | ||
2 | data () { | ||
3 | return { | ||
4 | isSearch: false, | ||
5 | searchList: [] | ||
6 | } | ||
7 | }, | ||
8 | methods: { | ||
9 | moreQueryClick () { | ||
10 | this.isSearch = true | ||
11 | }, | ||
12 | getSearch (val) { | ||
13 | let obj = { ywlymc: '业务来源', sqywmc: '申请业务名称', qlrmc: '权利人', ywrmc: '义务人', slsj: '受理时间' } | ||
14 | this.searchList = Object.entries(val).map((item) => { | ||
15 | const [name, value] = item | ||
16 | if (value) return { name: obj[name], value } | ||
17 | }).filter(Boolean) | ||
18 | }, | ||
19 | hanldeCleanAll () { | ||
20 | this.searchList = [] | ||
21 | } | ||
22 | } | ||
23 | } |
... | @@ -31,7 +31,8 @@ | ... | @@ -31,7 +31,8 @@ |
31 | </el-col> | 31 | </el-col> |
32 | <el-col :span="8"> | 32 | <el-col :span="8"> |
33 | <el-form-item label="受理时间" prop="slsj"> | 33 | <el-form-item label="受理时间" prop="slsj"> |
34 | <el-date-picker v-model="ruleForm.slsj" class="width100" type="date" placeholder="请选择日期" clearable> | 34 | <el-date-picker v-model="ruleForm.slsj" value-format="yyyy-MM-dd" class="width100" type="date" |
35 | placeholder="请选择日期" clearable> | ||
35 | </el-date-picker> | 36 | </el-date-picker> |
36 | </el-form-item> | 37 | </el-form-item> |
37 | </el-col> | 38 | </el-col> | ... | ... |
... | @@ -50,7 +50,8 @@ | ... | @@ -50,7 +50,8 @@ |
50 | <i class="el-icon-circle-close" @click="handelItem(index)"></i> | 50 | <i class="el-icon-circle-close" @click="handelItem(index)"></i> |
51 | </li> | 51 | </li> |
52 | </ul> | 52 | </ul> |
53 | <el-button class="clean-btn" type="text" v-if="searchList.length>0">清除全部</el-button> | 53 | <el-button class="clean-btn" type="text" v-if="searchList.length>0" @click.native="hanldeCleanAll">清除全部 |
54 | </el-button> | ||
54 | </el-row> | 55 | </el-row> |
55 | </el-form> | 56 | </el-form> |
56 | </div> | 57 | </div> |
... | @@ -60,25 +61,25 @@ | ... | @@ -60,25 +61,25 @@ |
60 | @p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data"> | 61 | @p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data"> |
61 | </lb-table> | 62 | </lb-table> |
62 | </div> | 63 | </div> |
63 | <searchBox v-model="isSearch" @getSearch="getSearch"></searchBox> | 64 | <searchBox v-model="isSearch" @getSearch="getSearch" /> |
64 | </div> | 65 | </div> |
65 | </template> | 66 | </template> |
66 | <script> | 67 | <script> |
67 | import { mapGetters } from 'vuex' | 68 | import { mapGetters } from 'vuex' |
68 | import searchBox from './search.vue' | 69 | import searchBox from '../components/search.vue' |
69 | import table from "@/utils/mixin/table"; | 70 | import table from "@/utils/mixin/table" |
70 | import { datas, sendThis } from "./dbxdata"; | 71 | import searchMin from "../components/mixin/index" |
72 | import { datas, sendThis } from "./dbxdata" | ||
71 | import { searchTaskToDo, deleteFlow } from "@/api/ywbl.js" | 73 | import { searchTaskToDo, deleteFlow } from "@/api/ywbl.js" |
72 | export default { | 74 | export default { |
73 | name: "dbx", | 75 | name: "dbx", |
74 | components: { searchBox }, | 76 | components: { searchBox }, |
75 | mixins: [table], | 77 | mixins: [table, searchMin], |
76 | computed: { | 78 | computed: { |
77 | ...mapGetters(['dictData']), | 79 | ...mapGetters(['dictData']), |
78 | }, | 80 | }, |
79 | data () { | 81 | data () { |
80 | return { | 82 | return { |
81 | isSearch: false, | ||
82 | queryForm: { | 83 | queryForm: { |
83 | ywly: "", | 84 | ywly: "", |
84 | qllx: "", | 85 | qllx: "", |
... | @@ -89,8 +90,7 @@ export default { | ... | @@ -89,8 +90,7 @@ export default { |
89 | total: 0, | 90 | total: 0, |
90 | columns: datas.columns(), | 91 | columns: datas.columns(), |
91 | data: [], | 92 | data: [], |
92 | }, | 93 | } |
93 | searchList: [] | ||
94 | } | 94 | } |
95 | }, | 95 | }, |
96 | mounted () { | 96 | mounted () { |
... | @@ -133,16 +133,7 @@ export default { | ... | @@ -133,16 +133,7 @@ export default { |
133 | queryClick () { | 133 | queryClick () { |
134 | this.fetchData() | 134 | this.fetchData() |
135 | }, | 135 | }, |
136 | getSearch (val) { | 136 | |
137 | let obj = { ywlymc: '业务来源', sqywmc: '申请业务名称', qlrmc: '权利人', ywrmc: '义务人', slsj: '受理时间' } | ||
138 | this.searchList = Object.entries(val).map((item) => { | ||
139 | const [name, value] = item | ||
140 | if (value) return { name: obj[name], value } | ||
141 | }).filter(Boolean) | ||
142 | }, | ||
143 | moreQueryClick () { | ||
144 | this.isSearch = true | ||
145 | }, | ||
146 | handelItem (index) { | 137 | handelItem (index) { |
147 | console.log(index); | 138 | console.log(index); |
148 | this.searchList.splice(index, 1) | 139 | this.searchList.splice(index, 1) | ... | ... |
... | @@ -42,26 +42,39 @@ | ... | @@ -42,26 +42,39 @@ |
42 | </el-form-item> | 42 | </el-form-item> |
43 | </el-col> | 43 | </el-col> |
44 | </el-row> | 44 | </el-row> |
45 | <el-row class="advanced-search"> | ||
46 | <span>高级搜索条件:</span> | ||
47 | <ul> | ||
48 | <li v-for="(item,index) in searchList" :key="index"> | ||
49 | {{item.name}}:{{item.value}} | ||
50 | <i class="el-icon-circle-close" @click="handelItem(index)"></i> | ||
51 | </li> | ||
52 | </ul> | ||
53 | <el-button class="clean-btn" type="text" v-if="searchList.length>0" @click.native="hanldeCleanAll">清除全部</el-button> | ||
54 | </el-row> | ||
45 | </el-form> | 55 | </el-form> |
46 | </div> | 56 | </div> |
47 | <!-- 表格 --> | 57 | <!-- 表格 --> |
48 | <div class="from-clues-content"> | 58 | <div class="from-clues-content"> |
49 | <lb-table :page-size="pageData.size" @sort-change="handleSort" border :current-page.sync="pageData.current" | 59 | <lb-table :page-size="pageData.size" :heightNum="300" @sort-change="handleSort" border |
50 | :total="pageData.total" @size-change="handleSizeChange" @p-current-change="handleCurrentChange" | 60 | :current-page.sync="pageData.current" :total="pageData.total" @size-change="handleSizeChange" |
51 | :column="tableData.columns" :data="tableData.data"> | 61 | @p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data"> |
52 | </lb-table> | 62 | </lb-table> |
53 | </div> | 63 | </div> |
64 | <searchBox v-model="isSearch" @getSearch="getSearch" /> | ||
54 | </div> | 65 | </div> |
55 | </template> | 66 | </template> |
56 | <script> | 67 | <script> |
57 | import { mapGetters } from 'vuex' | 68 | import { mapGetters } from 'vuex' |
58 | import table from "@/utils/mixin/table"; | 69 | import searchMin from "../components/mixin/index" |
59 | import { datas, sendThis } from "./ybxdata"; | 70 | import table from "@/utils/mixin/table" |
71 | import { datas, sendThis } from "./ybxdata" | ||
60 | import { searchTaskDone } from "@/api/ywbl.js" | 72 | import { searchTaskDone } from "@/api/ywbl.js" |
73 | import searchBox from '../components/search.vue' | ||
61 | export default { | 74 | export default { |
62 | name: "ybx", | 75 | name: "ybx", |
63 | components: {}, | 76 | components: { searchBox }, |
64 | mixins: [table], | 77 | mixins: [table, searchMin], |
65 | mounted () { | 78 | mounted () { |
66 | sendThis(this); | 79 | sendThis(this); |
67 | }, | 80 | }, |
... | @@ -70,6 +83,7 @@ export default { | ... | @@ -70,6 +83,7 @@ export default { |
70 | }, | 83 | }, |
71 | data () { | 84 | data () { |
72 | return { | 85 | return { |
86 | |||
73 | queryForm: { | 87 | queryForm: { |
74 | ywly: "", | 88 | ywly: "", |
75 | qllx: "", | 89 | qllx: "", | ... | ... |
-
Please register or sign in to post a comment