feat:业务办理高级搜索
Showing
3 changed files
with
36 additions
and
48 deletions
... | @@ -10,6 +10,32 @@ export default { | ... | @@ -10,6 +10,32 @@ export default { |
10 | moreQueryClick () { | 10 | moreQueryClick () { |
11 | this.isSearch = true | 11 | this.isSearch = true |
12 | }, | 12 | }, |
13 | handleSelect (bs, mc, code) { | ||
14 | let that = this | ||
15 | this.dictData[bs].forEach(item => { | ||
16 | if (item.dcode == this.queryForm[code]) { | ||
17 | this.searchForm[mc] = item.dname | ||
18 | } | ||
19 | }) | ||
20 | }, | ||
21 | handelItem (item, index) { | ||
22 | let obj = { | ||
23 | ywlymc: 'ywly', | ||
24 | qllxmc: 'qllx', | ||
25 | djlxmc: 'djlx' | ||
26 | } | ||
27 | this.searchList.splice(index, 1) | ||
28 | if (obj[item.zdm]) { | ||
29 | this.queryForm[obj[item.zdm]] = '' | ||
30 | } else if (this.otherForm[[item.zdm]]) { | ||
31 | this.otherForm[[item.zdm]] = '' | ||
32 | } else { | ||
33 | this.queryForm[item.zdm] = '' | ||
34 | } | ||
35 | this.searchForm[item.zdm] = '' | ||
36 | this.iterationData() | ||
37 | this.queryClick() | ||
38 | }, | ||
13 | iterationData () { | 39 | iterationData () { |
14 | let obj = { | 40 | let obj = { |
15 | ywlymc: '业务来源', qllxmc: '权利类型', djlxmc: '登记类型', ywh: '业务号', sqywmc: '申请业务名称', | 41 | ywlymc: '业务来源', qllxmc: '权利类型', djlxmc: '登记类型', ywh: '业务号', sqywmc: '申请业务名称', | ... | ... |
... | @@ -114,14 +114,6 @@ export default { | ... | @@ -114,14 +114,6 @@ export default { |
114 | } | 114 | } |
115 | }, | 115 | }, |
116 | methods: { | 116 | methods: { |
117 | handleSelect (bs, mc, code) { | ||
118 | let that = this | ||
119 | this.dictData[bs].forEach(item => { | ||
120 | if (item.dcode == this.queryForm[code]) { | ||
121 | this.searchForm[mc] = item.dname | ||
122 | } | ||
123 | }) | ||
124 | }, | ||
125 | // 列表渲染接口 | 117 | // 列表渲染接口 |
126 | queryClick () { | 118 | queryClick () { |
127 | this.$startLoading() | 119 | this.$startLoading() |
... | @@ -139,30 +131,11 @@ export default { | ... | @@ -139,30 +131,11 @@ export default { |
139 | item.qlrmcStr = item.qlrmc ? String(item.qlrmc) : '' | 131 | item.qlrmcStr = item.qlrmc ? String(item.qlrmc) : '' |
140 | item.ywrmcStr = item.ywrmc ? String(item.ywrmc) : '' | 132 | item.ywrmcStr = item.ywrmc ? String(item.ywrmc) : '' |
141 | }) | 133 | }) |
142 | this.tableData.total = total; | 134 | this.tableData.total = total ? total : 0 |
143 | this.tableData.data = records ? records : [] | 135 | this.tableData.data = records ? records : [] |
144 | } | 136 | } |
145 | }) | 137 | }) |
146 | }, | 138 | }, |
147 | |||
148 | handelItem (item, index) { | ||
149 | let obj = { | ||
150 | ywlymc: 'ywly', | ||
151 | qllxmc: 'qllx', | ||
152 | djlxmc: 'djlx' | ||
153 | } | ||
154 | this.searchList.splice(index, 1) | ||
155 | if (obj[item.zdm]) { | ||
156 | this.queryForm[obj[item.zdm]] = '' | ||
157 | } else if (this.otherForm[[item.zdm]]) { | ||
158 | this.otherForm[[item.zdm]] = '' | ||
159 | } else { | ||
160 | this.queryForm[item.zdm] = '' | ||
161 | } | ||
162 | this.searchForm[item.zdm] = '' | ||
163 | this.iterationData() | ||
164 | this.queryClick() | ||
165 | }, | ||
166 | handleSort (val) { | 139 | handleSort (val) { |
167 | this.queryForm.sortField = val.prop | 140 | this.queryForm.sortField = val.prop |
168 | this.queryForm.sortOrder = val.order == "ascending" ? 'asc' : 'desc' | 141 | this.queryForm.sortOrder = val.order == "ascending" ? 'asc' : 'desc' | ... | ... |
... | @@ -50,7 +50,7 @@ | ... | @@ -50,7 +50,7 @@ |
50 | <ul> | 50 | <ul> |
51 | <li v-for="(item, index) in searchList" :key="index"> | 51 | <li v-for="(item, index) in searchList" :key="index"> |
52 | {{ item.name }}:{{ item.value }} | 52 | {{ item.name }}:{{ item.value }} |
53 | <i class="el-icon-circle-close" @click="handelItem(index)"></i> | 53 | <i class="el-icon-circle-close" @click="handelItem(item, index)"></i> |
54 | </li> | 54 | </li> |
55 | </ul> | 55 | </ul> |
56 | <el-button class="clean-btn" type="text" v-if="searchList.length > 0" @click.native="hanldeCleanAll">清除全部 | 56 | <el-button class="clean-btn" type="text" v-if="searchList.length > 0" @click.native="hanldeCleanAll">清除全部 |
... | @@ -60,9 +60,10 @@ | ... | @@ -60,9 +60,10 @@ |
60 | </div> | 60 | </div> |
61 | <!-- 表格 --> | 61 | <!-- 表格 --> |
62 | <div class="from-clues-content"> | 62 | <div class="from-clues-content"> |
63 | <lb-table :page-size="pageData.size" class="loadingtext" :heightNum="300" @sort-change="handleSort" border | 63 | <lb-table :page-size="pageData.size" class="loadingtext" @sort-change="handleSort" |
64 | :current-page.sync="pageData.current" :total="pageData.total" @size-change="handleSizeChange" | 64 | :current-page.sync="pageData.currentPage" :heightNum="290" :total="tableData.total" |
65 | @p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data"> | 65 | @size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns" |
66 | :data="tableData.data"> | ||
66 | </lb-table> | 67 | </lb-table> |
67 | </div> | 68 | </div> |
68 | <searchBox v-model="isSearch" @getSearch="getSearch" /> | 69 | <searchBox v-model="isSearch" @getSearch="getSearch" /> |
... | @@ -100,11 +101,6 @@ export default { | ... | @@ -100,11 +101,6 @@ export default { |
100 | djlxmc: '', | 101 | djlxmc: '', |
101 | ywh: '' | 102 | ywh: '' |
102 | }, | 103 | }, |
103 | pageData: { | ||
104 | current: 1, | ||
105 | size: 10, | ||
106 | total: 2, | ||
107 | }, | ||
108 | tableData: { | 104 | tableData: { |
109 | total: 0, | 105 | total: 0, |
110 | columns: datas.columns(), | 106 | columns: datas.columns(), |
... | @@ -113,30 +109,23 @@ export default { | ... | @@ -113,30 +109,23 @@ export default { |
113 | }; | 109 | }; |
114 | }, | 110 | }, |
115 | methods: { | 111 | methods: { |
116 | handleSelect (bs, mc, code) { | ||
117 | let that = this | ||
118 | this.dictData[bs].forEach(item => { | ||
119 | if (item.dcode == this.queryForm[code]) { | ||
120 | this.searchForm[mc] = item.dname | ||
121 | } | ||
122 | }) | ||
123 | }, | ||
124 | // 列表渲染接口 | 112 | // 列表渲染接口 |
125 | queryClick () { | 113 | queryClick () { |
126 | this.$startLoading() | 114 | this.$startLoading() |
127 | this.searchForm.ywh = this.queryForm.ywh | 115 | this.searchForm.ywh = this.queryForm.ywh |
116 | this.iterationData() | ||
128 | searchTaskDone({ ...this.queryForm, ...this.pageData }).then(res => { | 117 | searchTaskDone({ ...this.queryForm, ...this.pageData }).then(res => { |
129 | if (res.code === 200) { | ||
130 | this.$endLoading() | 118 | this.$endLoading() |
119 | if (res.code === 200) { | ||
131 | let { total, records } = res.result | 120 | let { total, records } = res.result |
132 | this.pageData.total = total; | ||
133 | records.forEach(item => { | 121 | records.forEach(item => { |
134 | item.qlrmc = item.qlrmc.join(',') | 122 | item.qlrmc = item.qlrmc.join(',') |
135 | item.ywh = item.ywh.join(',') | 123 | item.ywh = item.ywh.join(',') |
136 | item.zl = item.zl.join(',') | 124 | item.zl = item.zl.join(',') |
137 | item.outstepdate = item.outstepdate[0] | 125 | item.outstepdate = item.outstepdate[0] |
138 | }) | 126 | }) |
139 | this.tableData.data = records | 127 | this.tableData.total = total ? total : 0 |
128 | this.tableData.data = records ? records : [] | ||
140 | } | 129 | } |
141 | }) | 130 | }) |
142 | }, | 131 | }, | ... | ... |
-
Please register or sign in to post a comment