feat(综合查询):对接接口,修改分页重置功能
Showing
3 changed files
with
104 additions
and
101 deletions
... | @@ -3,60 +3,60 @@ | ... | @@ -3,60 +3,60 @@ |
3 | <el-col :span="18"> | 3 | <el-col :span="18"> |
4 | <el-row> | 4 | <el-row> |
5 | <el-col :span="22"> | 5 | <el-col :span="22"> |
6 | <el-form :inline="true" :model="formData" class="demo-form-inline"> | 6 | <el-form :inline="true" class="demo-form-inline"> |
7 | <el-form-item label="宗地编码:"> | 7 | <el-form-item label="宗地编码:"> |
8 | <el-input v-model="formData.zdbm" placeholder="输入宗地编码"></el-input> | 8 | <el-input v-model="queryData.zddm" placeholder="输入宗地编码"></el-input> |
9 | </el-form-item> | 9 | </el-form-item> |
10 | <el-form-item label="坐落:"> | 10 | <el-form-item label="坐落:"> |
11 | <el-input v-model="formData.zl" placeholder="输入坐落地址"></el-input> | 11 | <el-input v-model="queryData.zl" placeholder="输入坐落地址"></el-input> |
12 | </el-form-item> | 12 | </el-form-item> |
13 | </el-form> | 13 | </el-form> |
14 | </el-col> | 14 | </el-col> |
15 | <el-col :span="2"> | 15 | <el-col :span="2"> |
16 | <el-button type="primary" @click="onSubmit">查询</el-button> | 16 | <el-button type="primary" @click="query">查询</el-button> |
17 | </el-col> | 17 | </el-col> |
18 | </el-row> | 18 | </el-row> |
19 | <el-row> | 19 | <el-row> |
20 | <el-col :span="22"> | 20 | <el-col :span="22"> |
21 | <el-form :inline="true" :model="formData" class="demo-form-inline"> | 21 | <el-form :inline="true" :model="queryData" class="demo-form-inline"> |
22 | <el-form-item label="不动产单元号:"> | 22 | <el-form-item label="不动产单元号:"> |
23 | <el-input | 23 | <el-input |
24 | v-model="formData.bdcdyh" | 24 | v-model="queryData.bdcdyh" |
25 | placeholder="输入不动产单元号" | 25 | placeholder="输入不动产单元号" |
26 | ></el-input> | 26 | ></el-input> |
27 | </el-form-item> | 27 | </el-form-item> |
28 | <el-form-item class="demo-form-inline" label="单元类型:"> | 28 | <el-form-item class="demo-form-inline" label="单元类型:"> |
29 | <el-checkbox-group v-model="formData.type"> | 29 | <el-checkbox-group v-model="queryData.dylxs"> |
30 | <el-checkbox label="宗地" name="type"></el-checkbox> | 30 | <el-checkbox label="zd" name="type">宗地</el-checkbox> |
31 | <el-checkbox label="自然幢" name="type"></el-checkbox> | 31 | <el-checkbox label="zrz" name="type">自然幢</el-checkbox> |
32 | <el-checkbox label="户" name="type"></el-checkbox> | 32 | <el-checkbox label="h" name="type">户</el-checkbox> |
33 | <el-checkbox label="构筑物" name="type"></el-checkbox> | 33 | <el-checkbox label="gzw" name="type">构筑物</el-checkbox> |
34 | <el-checkbox label="林权" name="type"></el-checkbox> | 34 | <el-checkbox label="lq" name="type">林权</el-checkbox> |
35 | <el-checkbox label="宗海" name="type"></el-checkbox> | 35 | <el-checkbox label="zh" name="type">宗海</el-checkbox> |
36 | </el-checkbox-group> | 36 | </el-checkbox-group> |
37 | </el-form-item> | 37 | </el-form-item> |
38 | </el-form> | 38 | </el-form> |
39 | </el-col> | 39 | </el-col> |
40 | <el-col :span="2"> | 40 | <el-col :span="2"> |
41 | <el-button type="warning" @click="onSubmit">重置</el-button> | 41 | <el-button type="warning" @click="reset">重置</el-button> |
42 | </el-col> | 42 | </el-col> |
43 | </el-row> | 43 | </el-row> |
44 | <el-row> | 44 | <el-row> |
45 | <el-col :span="22" v-show="ismore"> | 45 | <el-col :span="22" v-show="ismore"> |
46 | <el-form :inline="true" :model="formData" class="demo-form-inline"> | 46 | <el-form :inline="true" class="demo-form-inline"> |
47 | <el-form-item label="权利人名称:"> | 47 | <el-form-item label="权利人名称:"> |
48 | <el-input placeholder="输入权利人名称"></el-input> | 48 | <el-input placeholder="输入权利人名称" v-model="queryData.qlrmc"></el-input> |
49 | </el-form-item> | 49 | </el-form-item> |
50 | <el-form-item label="项目名称:"> | 50 | <el-form-item label="项目名称:"> |
51 | <el-input placeholder="输入项目名称"></el-input> | 51 | <el-input placeholder="输入项目名称" v-model="queryData.xmmc"></el-input> |
52 | </el-form-item> | 52 | </el-form-item> |
53 | <el-form-item label="不动产权证号:"> | 53 | <el-form-item label="不动产权证号:"> |
54 | <el-input placeholder="输入不动产权证号"></el-input> | 54 | <el-input placeholder="输入不动产权证号" v-model="queryData.bdcqzh"></el-input> |
55 | </el-form-item> | 55 | </el-form-item> |
56 | </el-form> | 56 | </el-form> |
57 | </el-col> | 57 | </el-col> |
58 | <el-col :span="2" :offset="offset"> | 58 | <el-col :span="2" :offset="offset"> |
59 | <el-button type="primary" class="moreSearchBtn" @click="more">更多查询 | 59 | <el-button type="primary" class="moreSearchBtn" @click="ismore=!ismore">更多查询 |
60 | </el-button> | 60 | </el-button> |
61 | </el-col> | 61 | </el-col> |
62 | </el-row> | 62 | </el-row> |
... | @@ -74,12 +74,16 @@ | ... | @@ -74,12 +74,16 @@ |
74 | return { | 74 | return { |
75 | offset: 22, | 75 | offset: 22, |
76 | ismore: false, | 76 | ismore: false, |
77 | formData: { | 77 | queryData: { |
78 | zdbm: "", | ||
79 | zl: "", | ||
80 | bdcdyh: "", | 78 | bdcdyh: "", |
81 | type: [], | 79 | bdcqzh: "", |
82 | }, | 80 | dylxs: [], |
81 | qlrmc: "", | ||
82 | qszt: "", | ||
83 | xmmc: "", | ||
84 | zddm: "", | ||
85 | zl: "" | ||
86 | } | ||
83 | }; | 87 | }; |
84 | }, | 88 | }, |
85 | created() { | 89 | created() { |
... | @@ -96,21 +100,37 @@ | ... | @@ -96,21 +100,37 @@ |
96 | mounted() { | 100 | mounted() { |
97 | }, | 101 | }, |
98 | methods: { | 102 | methods: { |
99 | more() { | 103 | reset() { |
100 | this.ismore = !this.ismore | 104 | this.queryData = { |
101 | if (this.ismore){ | 105 | bdcdyh: "", |
102 | this.offset=0 | 106 | bdcqzh: "", |
103 | } else { | 107 | dylxs: [], |
104 | this.offset=22 | 108 | qlrmc: "", |
105 | } | 109 | qszt: "", |
110 | xmmc: "", | ||
111 | zddm: "", | ||
112 | zl: "" | ||
113 | }; | ||
114 | this.query() | ||
106 | }, | 115 | }, |
107 | onSubmit() { | 116 | query() { |
108 | //子组件点击查询时将表单数据发送给父组件 | 117 | //子组件点击查询时将表单数据发送给父组件 |
109 | this.$emit("getSearchCondition", this.formData); | 118 | this.$emit("getSearchCondition", this.queryData); |
110 | }, | 119 | }, |
111 | }, | 120 | }, |
112 | computed: {}, | 121 | computed: {}, |
113 | watch: {}, | 122 | watch: { |
123 | "ismore": function (val) { | ||
124 | if (val) { | ||
125 | this.offset = 0 | ||
126 | } else { | ||
127 | this.offset = 22 | ||
128 | this.queryData.qlrmc = ""; | ||
129 | this.queryData.xmmc = ""; | ||
130 | this.queryData.bdcqzh = ""; | ||
131 | } | ||
132 | } | ||
133 | }, | ||
114 | }; | 134 | }; |
115 | </script> | 135 | </script> |
116 | <style scoped lang="less"> | 136 | <style scoped lang="less"> | ... | ... |
... | @@ -12,7 +12,8 @@ | ... | @@ -12,7 +12,8 @@ |
12 | <el-table-column label="操作" width="100"> | 12 | <el-table-column label="操作" width="100"> |
13 | <template slot-scope="scope"> | 13 | <template slot-scope="scope"> |
14 | <el-button @click="handleClick(scope.row)" type="text" size="small" | 14 | <el-button @click="handleClick(scope.row)" type="text" size="small" |
15 | >办理</el-button | 15 | >办理 |
16 | </el-button | ||
16 | > | 17 | > |
17 | <el-button type="text" size="small">定位</el-button> | 18 | <el-button type="text" size="small">定位</el-button> |
18 | </template> | 19 | </template> |
... | @@ -27,7 +28,7 @@ | ... | @@ -27,7 +28,7 @@ |
27 | </el-table-column> | 28 | </el-table-column> |
28 | <el-table-column prop="qlr" align="left" width="120" label="权利人"> | 29 | <el-table-column prop="qlr" align="left" width="120" label="权利人"> |
29 | </el-table-column> | 30 | </el-table-column> |
30 | <el-table-column prop="zl" align="left" label="坐落"> </el-table-column> | 31 | <el-table-column prop="zl" align="left" label="坐落"></el-table-column> |
31 | <el-table-column prop="zrsj" align="left" width="120" label="转入时间"> | 32 | <el-table-column prop="zrsj" align="left" width="120" label="转入时间"> |
32 | </el-table-column> | 33 | </el-table-column> |
33 | <el-table-column prop="cjr" align="left" width="120" label="创建人"> | 34 | <el-table-column prop="cjr" align="left" width="120" label="创建人"> |
... | @@ -42,10 +43,11 @@ | ... | @@ -42,10 +43,11 @@ |
42 | </template> | 43 | </template> |
43 | 44 | ||
44 | <script> | 45 | <script> |
45 | import SearchHead from "../../../components/searchHead/searchHead"; | 46 | import SearchHead from "../../../components/searchHead/searchHead"; |
46 | export default { | 47 | |
48 | export default { | ||
47 | name: "", | 49 | name: "", |
48 | components: { SearchHead }, | 50 | components: {SearchHead}, |
49 | props: {}, | 51 | props: {}, |
50 | data() { | 52 | data() { |
51 | return { | 53 | return { |
... | @@ -69,7 +71,8 @@ export default { | ... | @@ -69,7 +71,8 @@ export default { |
69 | tableHeight: "", | 71 | tableHeight: "", |
70 | }; | 72 | }; |
71 | }, | 73 | }, |
72 | created() {}, | 74 | created() { |
75 | }, | ||
73 | mounted() { | 76 | mounted() { |
74 | for (let i = 0; i < 11; i++) { | 77 | for (let i = 0; i < 11; i++) { |
75 | let obj = { | 78 | let obj = { |
... | @@ -87,8 +90,9 @@ export default { | ... | @@ -87,8 +90,9 @@ export default { |
87 | this.tableHeight = this.$refs.dataGrid.offsetHeight - 68; | 90 | this.tableHeight = this.$refs.dataGrid.offsetHeight - 68; |
88 | }, | 91 | }, |
89 | methods: { | 92 | methods: { |
90 | onSubmit() {}, | 93 | onSubmit() { |
91 | tableRowClassName({ row, rowIndex }) { | 94 | }, |
95 | tableRowClassName({row, rowIndex}) { | ||
92 | if (rowIndex % 2 !== 0) { | 96 | if (rowIndex % 2 !== 0) { |
93 | return "even-row"; | 97 | return "even-row"; |
94 | } else { | 98 | } else { |
... | @@ -99,7 +103,6 @@ export default { | ... | @@ -99,7 +103,6 @@ export default { |
99 | //获取子组件点击查询触发的事件 | 103 | //获取子组件点击查询触发的事件 |
100 | getData(obj) { | 104 | getData(obj) { |
101 | console.log(obj); | 105 | console.log(obj); |
102 | //将obj作为参数调用接口查询表格数据 | ||
103 | }, | 106 | }, |
104 | //点击办理 | 107 | //点击办理 |
105 | handleClick(row) { | 108 | handleClick(row) { |
... | @@ -119,10 +122,10 @@ export default { | ... | @@ -119,10 +122,10 @@ export default { |
119 | }, | 122 | }, |
120 | computed: {}, | 123 | computed: {}, |
121 | watch: {}, | 124 | watch: {}, |
122 | }; | 125 | }; |
123 | </script> | 126 | </script> |
124 | <style scoped lang="less"> | 127 | <style scoped lang="less"> |
125 | .main { | 128 | .main { |
126 | width: 100%; | 129 | width: 100%; |
127 | height: 100%; | 130 | height: 100%; |
128 | box-sizing: border-box; | 131 | box-sizing: border-box; |
... | @@ -143,9 +146,10 @@ export default { | ... | @@ -143,9 +146,10 @@ export default { |
143 | } | 146 | } |
144 | .dataGrid { | 147 | .dataGrid { |
145 | flex: 1; | 148 | flex: 1; |
149 | margin-top: 20px; | ||
146 | .pagination { | 150 | .pagination { |
147 | padding: 18px 0; | 151 | padding: 18px 0; |
148 | } | 152 | } |
149 | } | 153 | } |
150 | } | 154 | } |
151 | </style> | 155 | </style> | ... | ... |
... | @@ -12,7 +12,8 @@ | ... | @@ -12,7 +12,8 @@ |
12 | <el-table-column label="操作" width="100"> | 12 | <el-table-column label="操作" width="100"> |
13 | <template slot-scope="scope"> | 13 | <template slot-scope="scope"> |
14 | <el-button @click="handleClick(scope.row)" type="text" size="small" | 14 | <el-button @click="handleClick(scope.row)" type="text" size="small" |
15 | >办理</el-button | 15 | >办理 |
16 | </el-button | ||
16 | > | 17 | > |
17 | <el-button type="text" size="small">定位</el-button> | 18 | <el-button type="text" size="small">定位</el-button> |
18 | </template> | 19 | </template> |
... | @@ -27,14 +28,14 @@ | ... | @@ -27,14 +28,14 @@ |
27 | </el-table-column> | 28 | </el-table-column> |
28 | <el-table-column prop="qlr" align="left" width="120" label="权利人"> | 29 | <el-table-column prop="qlr" align="left" width="120" label="权利人"> |
29 | </el-table-column> | 30 | </el-table-column> |
30 | <el-table-column prop="zl" align="left" label="坐落"> </el-table-column> | 31 | <el-table-column prop="zl" align="left" label="坐落"></el-table-column> |
31 | <el-table-column prop="zrsj" align="left" width="120" label="转入时间"> | 32 | <el-table-column prop="zrsj" align="left" width="120" label="转入时间"> |
32 | </el-table-column> | 33 | </el-table-column> |
33 | <el-table-column prop="cjr" align="left" width="120" label="创建人"> | 34 | <el-table-column prop="cjr" align="left" width="120" label="创建人"> |
34 | </el-table-column> | 35 | </el-table-column> |
35 | </el-table> | 36 | </el-table> |
36 | <div class="pagination"> | 37 | <div class="pagination"> |
37 | <el-pagination background layout="prev, pager, next" :total="1000" | 38 | <el-pagination background layout="prev, pager, next" :total="total" |
38 | @current-change="handleCurrentChange" | 39 | @current-change="handleCurrentChange" |
39 | :current-page.sync="currentPage"> | 40 | :current-page.sync="currentPage"> |
40 | </el-pagination> | 41 | </el-pagination> |
... | @@ -44,55 +45,53 @@ | ... | @@ -44,55 +45,53 @@ |
44 | </template> | 45 | </template> |
45 | 46 | ||
46 | <script> | 47 | <script> |
47 | import SearchHead from "../../../components/searchHead/searchHead"; | 48 | import SearchHead from "../../../components/searchHead/searchHead"; |
48 | import {getSearchList} from "../../../api/search"; | 49 | import {getSearchList} from "../../../api/search"; |
49 | export default { | 50 | |
51 | export default { | ||
50 | name: "", | 52 | name: "", |
51 | components: { SearchHead }, | 53 | components: {SearchHead}, |
52 | props: {}, | 54 | props: {}, |
53 | data() { | 55 | data() { |
54 | return { | 56 | return { |
55 | pageNo:1, | 57 | total:0, |
56 | pageSize:10, | 58 | pageNo: 1, |
57 | zddm:'', | 59 | pageSize: 10, |
58 | zl:'', | ||
59 | bdcdyh:'', | ||
60 | dylx:'', | ||
61 | qlrmc:'', | ||
62 | xmmc:'', | ||
63 | bdcqzh:'', | ||
64 | formData: { | ||
65 | user: "", | ||
66 | region: "", | ||
67 | type: [], | ||
68 | }, | ||
69 | tableData: [], | 60 | tableData: [], |
70 | tableHeight: "", | 61 | tableHeight: "", |
71 | }; | 62 | }; |
72 | }, | 63 | }, |
73 | created() {}, | 64 | created() { |
65 | }, | ||
74 | mounted() { | 66 | mounted() { |
75 | this.loadList(); | 67 | this.getData({}) |
76 | this.tableHeight = this.$refs.dataGrid.offsetHeight - 68; | 68 | this.tableHeight = this.$refs.dataGrid.offsetHeight - 68; |
77 | }, | 69 | }, |
78 | methods: { | 70 | methods: { |
79 | onSubmit() {}, | 71 | onSubmit() { |
80 | tableRowClassName({ row, rowIndex }) { | 72 | }, |
73 | tableRowClassName({row, rowIndex}) { | ||
81 | if (rowIndex % 2 !== 0) { | 74 | if (rowIndex % 2 !== 0) { |
82 | return "even-row"; | 75 | return "even-row"; |
83 | } else { | 76 | } else { |
84 | return ""; | 77 | return ""; |
85 | } | 78 | } |
86 | }, | 79 | }, |
87 | handleCurrentChange(val){ | 80 | handleCurrentChange(val) { |
88 | console.log(`当前页: ${val}`); | 81 | console.log(`当前页: ${val}`); |
89 | this.pageNo=val; | 82 | this.pageNo = val; |
90 | this.loadList(); | 83 | this.getData({}); |
91 | }, | 84 | }, |
92 | //获取子组件点击查询触发的事件 | 85 | //获取子组件点击查询触发的事件 |
93 | getData(obj) { | 86 | getData(obj) { |
94 | console.log(obj); | 87 | console.log(obj); |
95 | //将obj作为参数调用接口查询表格数据 | 88 | //将obj作为参数调用接口查询表格数据 |
89 | obj['pageNo'] = this.pageNo | ||
90 | obj['pageSize'] = this.pageSize | ||
91 | getSearchList(obj).then(res => { | ||
92 | this.tableData = res.result.records | ||
93 | this.total=res.result.total | ||
94 | }) | ||
96 | }, | 95 | }, |
97 | //点击办理 | 96 | //点击办理 |
98 | handleClick(row) { | 97 | handleClick(row) { |
... | @@ -108,40 +107,20 @@ export default { | ... | @@ -108,40 +107,20 @@ export default { |
108 | break; | 107 | break; |
109 | } | 108 | } |
110 | this.$router.push({ | 109 | this.$router.push({ |
111 | path:path, | 110 | path: path, |
112 | query:{ | 111 | query: { |
113 | bsm:row.glbsm, | 112 | bsm: row.glbsm, |
114 | source:2 | 113 | source: 2 |
115 | } | 114 | } |
116 | }); | 115 | }); |
117 | }, | 116 | }, |
118 | loadList(){ | ||
119 | let params={ | ||
120 | zddm:this.zddm, | ||
121 | zl:this.zl, | ||
122 | bdcdyh:this.bdcdyh, | ||
123 | dylx:this.dylx, | ||
124 | qlrmc:this.qlrmc, | ||
125 | xmmc:this.xmmc, | ||
126 | bdcqzh:this.bdcqzh, | ||
127 | pageNo:this.pageNo, | ||
128 | pageSize:this.pageSize, | ||
129 | } | ||
130 | getSearchList(params).then((res)=>{ | ||
131 | console.log(res) | ||
132 | if(res.code===200){ | ||
133 | this.tableData=res.result.records; | ||
134 | console.log(this.tableData) | ||
135 | } | ||
136 | }) | ||
137 | } | ||
138 | }, | 117 | }, |
139 | computed: {}, | 118 | computed: {}, |
140 | watch: {}, | 119 | watch: {}, |
141 | }; | 120 | }; |
142 | </script> | 121 | </script> |
143 | <style scoped lang="less"> | 122 | <style scoped lang="less"> |
144 | .main { | 123 | .main { |
145 | width: 100%; | 124 | width: 100%; |
146 | height: 100%; | 125 | height: 100%; |
147 | box-sizing: border-box; | 126 | box-sizing: border-box; |
... | @@ -166,5 +145,5 @@ export default { | ... | @@ -166,5 +145,5 @@ export default { |
166 | padding: 18px 0; | 145 | padding: 18px 0; |
167 | } | 146 | } |
168 | } | 147 | } |
169 | } | 148 | } |
170 | </style> | 149 | </style> | ... | ... |
-
Please register or sign in to post a comment