feat(add,modify):对接查询接口
Showing
3 changed files
with
76 additions
and
76 deletions
| 1 | <template> | 1 | <template> |
| 2 | <div class="main"> | 2 | <div class="main"> |
| 3 | <SearchHead @getSearchCondition="getData"></SearchHead> | 3 | <SearchHead @getSearchCondition="geQuerytData"></SearchHead> |
| 4 | <div class="dataGrid" ref="dataGrid"> | 4 | <div class="dataGrid" ref="dataGrid"> |
| 5 | <el-table | 5 | <el-table |
| 6 | :data="tableData" | 6 | :data="tableData" |
| ... | @@ -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,65 +43,65 @@ | ... | @@ -42,65 +43,65 @@ |
| 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 | import {getSearchList} from "../../../api/search"; |
| 48 | |||
| 49 | export default { | ||
| 47 | name: "", | 50 | name: "", |
| 48 | components: { SearchHead }, | 51 | components: {SearchHead}, |
| 49 | props: {}, | 52 | props: {}, |
| 50 | data() { | 53 | data() { |
| 51 | return { | 54 | return { |
| 55 | total: 0, | ||
| 56 | pageNo: 1, | ||
| 57 | pageSize: 10, | ||
| 58 | queryData: {}, | ||
| 52 | formData: { | 59 | formData: { |
| 53 | user: "", | 60 | user: "", |
| 54 | region: "", | 61 | region: "", |
| 55 | type: [], | 62 | type: [], |
| 56 | }, | 63 | }, |
| 57 | tableData: [ | 64 | tableData: [], |
| 58 | { | ||
| 59 | bdcdyh: "610101001001GB00001W", | ||
| 60 | xmmc: "万科集团万科城", | ||
| 61 | bdcqzh: "陕(2017)西安市不动产权第00000", | ||
| 62 | lx: "宗地", | ||
| 63 | qlr: "李子新", | ||
| 64 | zl: "灞桥-田家湾-咸宁东路,近浐河西路", | ||
| 65 | zrsj: "2020.09.07 ", | ||
| 66 | cjr: "李子新", | ||
| 67 | }, | ||
| 68 | ], | ||
| 69 | tableHeight: "", | 65 | tableHeight: "", |
| 70 | }; | 66 | }; |
| 71 | }, | 67 | }, |
| 72 | created() {}, | 68 | created() { |
| 69 | }, | ||
| 73 | mounted() { | 70 | mounted() { |
| 74 | for (let i = 0; i < 11; i++) { | 71 | this.getData({}) |
| 75 | let obj = { | ||
| 76 | bdcdyh: "610101001001GB00001W", | ||
| 77 | xmmc: "万科集团万科城", | ||
| 78 | bdcqzh: "陕(2017)西安市不动产权第00000", | ||
| 79 | lx: "自然幢", | ||
| 80 | qlr: "李子新", | ||
| 81 | zl: "灞桥-田家湾-咸宁东路,近浐河西路", | ||
| 82 | zrsj: "2020.09.07 ", | ||
| 83 | cjr: "李子新", | ||
| 84 | }; | ||
| 85 | this.tableData.push(obj); | ||
| 86 | } | ||
| 87 | this.tableHeight = this.$refs.dataGrid.offsetHeight - 68; | 72 | this.tableHeight = this.$refs.dataGrid.offsetHeight - 68; |
| 88 | }, | 73 | }, |
| 89 | methods: { | 74 | methods: { |
| 90 | onSubmit() {}, | 75 | handleCurrentChange(val) { |
| 91 | tableRowClassName({ row, rowIndex }) { | 76 | console.log(`当前页: ${val}`); |
| 77 | this.pageNo = val; | ||
| 78 | this.queryData.pageNo = val; | ||
| 79 | this.getData(this.queryData); | ||
| 80 | }, | ||
| 81 | getData(data) { | ||
| 82 | getSearchList(data).then(res => { | ||
| 83 | this.tableData = res.result.records | ||
| 84 | this.total = res.result.total | ||
| 85 | }) | ||
| 86 | }, | ||
| 87 | //获取子组件点击查询触发的事件 | ||
| 88 | geQuerytData(obj) { | ||
| 89 | this.queryData = obj | ||
| 90 | //将obj作为参数调用接口查询表格数据 | ||
| 91 | this.queryData['pageSize'] = this.pageSize | ||
| 92 | this.pageNo = 1 | ||
| 93 | this.queryData['pageNo'] = 1 | ||
| 94 | this.getData(this.queryData) | ||
| 95 | }, | ||
| 96 | onSubmit() { | ||
| 97 | }, | ||
| 98 | tableRowClassName({row, rowIndex}) { | ||
| 92 | if (rowIndex % 2 !== 0) { | 99 | if (rowIndex % 2 !== 0) { |
| 93 | return "even-row"; | 100 | return "even-row"; |
| 94 | } else { | 101 | } else { |
| 95 | return ""; | 102 | return ""; |
| 96 | } | 103 | } |
| 97 | }, | 104 | }, |
| 98 | |||
| 99 | //获取子组件点击查询触发的事件 | ||
| 100 | getData(obj) { | ||
| 101 | console.log(obj); | ||
| 102 | //将obj作为参数调用接口查询表格数据 | ||
| 103 | }, | ||
| 104 | //点击办理 | 105 | //点击办理 |
| 105 | handleClick(row) { | 106 | handleClick(row) { |
| 106 | let path = ""; | 107 | let path = ""; |
| ... | @@ -119,10 +120,10 @@ export default { | ... | @@ -119,10 +120,10 @@ export default { |
| 119 | }, | 120 | }, |
| 120 | computed: {}, | 121 | computed: {}, |
| 121 | watch: {}, | 122 | watch: {}, |
| 122 | }; | 123 | }; |
| 123 | </script> | 124 | </script> |
| 124 | <style scoped lang="less"> | 125 | <style scoped lang="less"> |
| 125 | .main { | 126 | .main { |
| 126 | width: 100%; | 127 | width: 100%; |
| 127 | height: 100%; | 128 | height: 100%; |
| 128 | box-sizing: border-box; | 129 | box-sizing: border-box; |
| ... | @@ -147,5 +148,5 @@ export default { | ... | @@ -147,5 +148,5 @@ export default { |
| 147 | padding: 18px 0; | 148 | padding: 18px 0; |
| 148 | } | 149 | } |
| 149 | } | 150 | } |
| 150 | } | 151 | } |
| 151 | </style> | 152 | </style> | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div class="main"> | 2 | <div class="main"> |
| 3 | <SearchHead @getSearchCondition="getData"></SearchHead> | 3 | <SearchHead @getSearchCondition="geQuerytData"></SearchHead> |
| 4 | <div class="dataGrid" ref="dataGrid"> | 4 | <div class="dataGrid" ref="dataGrid"> |
| 5 | <el-table | 5 | <el-table |
| 6 | :data="tableData" | 6 | :data="tableData" |
| ... | @@ -35,7 +35,8 @@ | ... | @@ -35,7 +35,8 @@ |
| 35 | </el-table-column> | 35 | </el-table-column> |
| 36 | </el-table> | 36 | </el-table> |
| 37 | <div class="pagination"> | 37 | <div class="pagination"> |
| 38 | <el-pagination background layout="prev, pager, next" :total="1000"> | 38 | <el-pagination background layout="prev, pager, next" :total="total" |
| 39 | :current-page="pageNo" @current-change="handleCurrentChange"> | ||
| 39 | </el-pagination> | 40 | </el-pagination> |
| 40 | </div> | 41 | </div> |
| 41 | </div> | 42 | </div> |
| ... | @@ -44,6 +45,7 @@ | ... | @@ -44,6 +45,7 @@ |
| 44 | 45 | ||
| 45 | <script> | 46 | <script> |
| 46 | import SearchHead from "../../../components/searchHead/searchHead"; | 47 | import SearchHead from "../../../components/searchHead/searchHead"; |
| 48 | import {getSearchList} from "../../../api/search"; | ||
| 47 | 49 | ||
| 48 | export default { | 50 | export default { |
| 49 | name: "", | 51 | name: "", |
| ... | @@ -51,45 +53,47 @@ | ... | @@ -51,45 +53,47 @@ |
| 51 | props: {}, | 53 | props: {}, |
| 52 | data() { | 54 | data() { |
| 53 | return { | 55 | return { |
| 56 | total: 0, | ||
| 57 | pageNo: 1, | ||
| 58 | pageSize: 10, | ||
| 54 | formData: { | 59 | formData: { |
| 55 | user: "", | 60 | user: "", |
| 56 | region: "", | 61 | region: "", |
| 57 | type: [], | 62 | type: [], |
| 58 | }, | 63 | }, |
| 59 | tableData: [ | 64 | queryData: {}, |
| 60 | { | 65 | tableData: [], |
| 61 | bdcdyh: "610101001001GB00001W", | ||
| 62 | xmmc: "万科集团万科城", | ||
| 63 | bdcqzh: "陕(2017)西安市不动产权第00000", | ||
| 64 | lx: "宗地", | ||
| 65 | qlr: "李子新", | ||
| 66 | zl: "灞桥-田家湾-咸宁东路,近浐河西路", | ||
| 67 | zrsj: "2020.09.07 ", | ||
| 68 | cjr: "李子新", | ||
| 69 | }, | ||
| 70 | ], | ||
| 71 | tableHeight: "", | 66 | tableHeight: "", |
| 72 | }; | 67 | }; |
| 73 | }, | 68 | }, |
| 74 | created() { | 69 | created() { |
| 75 | }, | 70 | }, |
| 76 | mounted() { | 71 | mounted() { |
| 77 | for (let i = 0; i < 11; i++) { | 72 | this.getData({}) |
| 78 | let obj = { | ||
| 79 | bdcdyh: "610101001001GB00001W", | ||
| 80 | xmmc: "万科集团万科城", | ||
| 81 | bdcqzh: "陕(2017)西安市不动产权第00000", | ||
| 82 | lx: "自然幢", | ||
| 83 | qlr: "李子新", | ||
| 84 | zl: "灞桥-田家湾-咸宁东路,近浐河西路", | ||
| 85 | zrsj: "2020.09.07 ", | ||
| 86 | cjr: "李子新", | ||
| 87 | }; | ||
| 88 | this.tableData.push(obj); | ||
| 89 | } | ||
| 90 | this.tableHeight = this.$refs.dataGrid.offsetHeight - 68; | 73 | this.tableHeight = this.$refs.dataGrid.offsetHeight - 68; |
| 91 | }, | 74 | }, |
| 92 | methods: { | 75 | methods: { |
| 76 | handleCurrentChange(val) { | ||
| 77 | console.log(`当前页: ${val}`); | ||
| 78 | this.pageNo = val; | ||
| 79 | this.queryData.pageNo = val; | ||
| 80 | this.getData(this.queryData); | ||
| 81 | }, | ||
| 82 | getData(data) { | ||
| 83 | getSearchList(data).then(res => { | ||
| 84 | this.tableData = res.result.records | ||
| 85 | this.total = res.result.total | ||
| 86 | }) | ||
| 87 | }, | ||
| 88 | //获取子组件点击查询触发的事件 | ||
| 89 | geQuerytData(obj) { | ||
| 90 | this.queryData = obj | ||
| 91 | //将obj作为参数调用接口查询表格数据 | ||
| 92 | this.queryData['pageSize'] = this.pageSize | ||
| 93 | this.pageNo = 1 | ||
| 94 | this.queryData['pageNo'] = 1 | ||
| 95 | this.getData(this.queryData) | ||
| 96 | }, | ||
| 93 | onSubmit() { | 97 | onSubmit() { |
| 94 | }, | 98 | }, |
| 95 | tableRowClassName({row, rowIndex}) { | 99 | tableRowClassName({row, rowIndex}) { |
| ... | @@ -99,11 +103,6 @@ | ... | @@ -99,11 +103,6 @@ |
| 99 | return ""; | 103 | return ""; |
| 100 | } | 104 | } |
| 101 | }, | 105 | }, |
| 102 | |||
| 103 | //获取子组件点击查询触发的事件 | ||
| 104 | getData(obj) { | ||
| 105 | console.log(obj); | ||
| 106 | }, | ||
| 107 | //点击办理 | 106 | //点击办理 |
| 108 | handleClick(row) { | 107 | handleClick(row) { |
| 109 | let path = ""; | 108 | let path = ""; | ... | ... |
| ... | @@ -386,7 +386,7 @@ export default { | ... | @@ -386,7 +386,7 @@ export default { |
| 386 | bhqkbsm: "", | 386 | bhqkbsm: "", |
| 387 | blc: "", | 387 | blc: "", |
| 388 | bz: "", | 388 | bz: "", |
| 389 | dcrq: "2020-10-22T09:07:38.644Z", | 389 | dcrq: "", |
| 390 | dcy: "", | 390 | dcy: "", |
| 391 | dcyj: "", | 391 | dcyj: "", |
| 392 | djh: "", | 392 | djh: "", | ... | ... |
-
Please register or sign in to post a comment