代码优化
Showing
2 changed files
with
9 additions
and
6 deletions
| ... | @@ -186,11 +186,11 @@ | ... | @@ -186,11 +186,11 @@ |
| 186 | created() { | 186 | created() { |
| 187 | }, | 187 | }, |
| 188 | methods: { | 188 | methods: { |
| 189 | currentChange: function (val) { | 189 | currentChange(val) { |
| 190 | this.queryData.pageNo = val; | 190 | this.queryData.pageNo = val; |
| 191 | this.getData(this.queryData); | 191 | this.getData(this.queryData); |
| 192 | }, | 192 | }, |
| 193 | reset: function () { | 193 | reset(){ |
| 194 | this.queryData = { | 194 | this.queryData = { |
| 195 | bdcdyh: "", | 195 | bdcdyh: "", |
| 196 | bdcqzh: "", | 196 | bdcqzh: "", |
| ... | @@ -204,23 +204,23 @@ | ... | @@ -204,23 +204,23 @@ |
| 204 | }; | 204 | }; |
| 205 | this.getData(this.queryData) | 205 | this.getData(this.queryData) |
| 206 | }, | 206 | }, |
| 207 | getData: function (data) { | 207 | getData(data){ |
| 208 | data['dylxs'] = this.dylxs; | 208 | data['dylxs'] = this.dylxs; |
| 209 | getSearchList(data).then(res => { | 209 | getSearchList(data).then(res => { |
| 210 | this.Data = res.result.records | 210 | this.Data = res.result.records |
| 211 | this.total = res.result.total; | 211 | this.total = res.result.total; |
| 212 | }) | 212 | }) |
| 213 | }, | 213 | }, |
| 214 | search: function () { | 214 | search(){ |
| 215 | this.getData(this.queryData) | 215 | this.getData(this.queryData) |
| 216 | }, | 216 | }, |
| 217 | addData: function (val) { | 217 | addData(val){ |
| 218 | this.$emit("getData", val) | 218 | this.$emit("getData", val) |
| 219 | if (this.isZdClose) { | 219 | if (this.isZdClose) { |
| 220 | this.close(); | 220 | this.close(); |
| 221 | } | 221 | } |
| 222 | }, | 222 | }, |
| 223 | close: function () { | 223 | close(){ |
| 224 | this.$emit('close') | 224 | this.$emit('close') |
| 225 | this.reset(); | 225 | this.reset(); |
| 226 | } | 226 | } | ... | ... |
-
Please register or sign in to post a comment