构筑物
Showing
2 changed files
with
27 additions
and
3 deletions
src/api/kttGzw.js
0 → 100644
1 | import request from '@/utils/request' | ||
2 | import SERVER from './config' | ||
3 | |||
4 | class kttGzw { | ||
5 | //构筑物 | ||
6 | async getKttGzwById (bsmSjsb) { | ||
7 | return request({ | ||
8 | url: SERVER.SERVERAPI + '/rest/reg/KttGzw/detail', | ||
9 | method: 'get', | ||
10 | params: { | ||
11 | bsmSjsb: bsmSjsb | ||
12 | } | ||
13 | }) | ||
14 | } | ||
15 | //修改构筑物 | ||
16 | async updateKttGzw (data) { | ||
17 | return request({ | ||
18 | url: SERVER.SERVERAPI + '/rest/reg/KttGzw/edit', | ||
19 | method: 'post', | ||
20 | data | ||
21 | }) | ||
22 | } | ||
23 | } | ||
24 | export default new kttGzw() | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -123,7 +123,7 @@ | ... | @@ -123,7 +123,7 @@ |
123 | </template> | 123 | </template> |
124 | <script> | 124 | <script> |
125 | // 构筑物 | 125 | // 构筑物 |
126 | import business from '@/api/business' | 126 | import kttGzw from '@/api/kttGzw' |
127 | import ruleMixin from '@/mixins/ruleMixin.js' | 127 | import ruleMixin from '@/mixins/ruleMixin.js' |
128 | export default { | 128 | export default { |
129 | mixins: [ruleMixin], | 129 | mixins: [ruleMixin], |
... | @@ -157,7 +157,7 @@ export default { | ... | @@ -157,7 +157,7 @@ export default { |
157 | methods: { | 157 | methods: { |
158 | async featchData () { | 158 | async featchData () { |
159 | try { | 159 | try { |
160 | let { result: res } = await business.getKttGzwById(this.bsmSjsb) | 160 | let { result: res } = await kttGzw.getKttGzwById(this.bsmSjsb) |
161 | this.ruleForm = res | 161 | this.ruleForm = res |
162 | //this.featchRule() | 162 | //this.featchRule() |
163 | } catch (error) { | 163 | } catch (error) { |
... | @@ -167,7 +167,7 @@ export default { | ... | @@ -167,7 +167,7 @@ export default { |
167 | handleUpdateForm () { | 167 | handleUpdateForm () { |
168 | return new Promise(async (resolve) => { | 168 | return new Promise(async (resolve) => { |
169 | try { | 169 | try { |
170 | let res = await business.updateKttGzw(this.ruleForm) | 170 | let res = await kttGzw.updateKttGzw(this.ruleForm) |
171 | // this.$refs['formList'].resetFields(); | 171 | // this.$refs['formList'].resetFields(); |
172 | resolve(res.code) | 172 | resolve(res.code) |
173 | } catch (error) { | 173 | } catch (error) { | ... | ... |
-
Please register or sign in to post a comment