31d2522b by yangwei

林权

1 parent a2caf275
1 import request from "@/utils/request";
2 import SERVER from "./config";
3
4 class qltQlLq {
5 // 林权
6 async getQltQlLqList(data) {
7 return request({
8 url: SERVER.SERVERAPI + "/rest/reg/QltQlLq/getDataPage",
9 method: "post",
10 data,
11 });
12 }
13 //林权
14 async getQltQlLqById(bsmSjsb) {
15 return request({
16 url: SERVER.SERVERAPI + "/rest/reg/QltQlLq/detail",
17 method: "get",
18 params: {
19 bsmSjsb: bsmSjsb,
20 },
21 });
22 }
23 //修改林权
24 async updateQltQlLq(data) {
25 return request({
26 url: SERVER.SERVERAPI + "/rest/reg/QltQlLq/edit",
27 method: "post",
28 data,
29 });
30 }
31 }
32 export default new qltQlLq();
...@@ -336,7 +336,7 @@ ...@@ -336,7 +336,7 @@
336 </template> 336 </template>
337 <script> 337 <script>
338 // 林权 338 // 林权
339 import business from '@/api/business' 339 import qltQlLq from '@/api/qltQlLq'
340 import ruleMixin from '@/mixins/ruleMixin.js' 340 import ruleMixin from '@/mixins/ruleMixin.js'
341 export default { 341 export default {
342 mixins: [ruleMixin], 342 mixins: [ruleMixin],
...@@ -387,7 +387,7 @@ export default { ...@@ -387,7 +387,7 @@ export default {
387 methods: { 387 methods: {
388 async featchData () { 388 async featchData () {
389 try { 389 try {
390 let { result: res } = await business.getQltQlLqById(this.bsmSjsb) 390 let { result: res } = await qltQlLq.getQltQlLqById(this.bsmSjsb)
391 this.ruleForm = res 391 this.ruleForm = res
392 //this.featchRule() 392 //this.featchRule()
393 } catch (error) { 393 } catch (error) {
...@@ -397,7 +397,7 @@ export default { ...@@ -397,7 +397,7 @@ export default {
397 handleUpdateForm () { 397 handleUpdateForm () {
398 return new Promise(async (resolve, reject) => { 398 return new Promise(async (resolve, reject) => {
399 try { 399 try {
400 let res = await business.updateQltQlLq(this.ruleForm) 400 let res = await qltQlLq.updateQltQlLq(this.ruleForm)
401 // this.$refs['formList'].resetFields(); 401 // this.$refs['formList'].resetFields();
402 resolve(res.code) 402 resolve(res.code)
403 } catch (error) { 403 } catch (error) {
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
63 <script> 63 <script>
64 // 林权 64 // 林权
65 import data from "./data" 65 import data from "./data"
66 import business from '@/api/business' 66 import qltQlLq from '@/api/qltQlLq'
67 import tableMixin from '@/mixins/tableMixin.js' 67 import tableMixin from '@/mixins/tableMixin.js'
68 import treeSelect from '@/components/treeSelect/index.vue' 68 import treeSelect from '@/components/treeSelect/index.vue'
69 export default { 69 export default {
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
126 try { 126 try {
127 this.form = Object.assign(this.form, this.formData) 127 this.form = Object.assign(this.form, this.formData)
128 let { result: { list, total, pages: pageSize, pageNum: current } 128 let { result: { list, total, pages: pageSize, pageNum: current }
129 } = await business.getQltQlLqList(this.form) 129 } = await qltQlLq.getQltQlLqList(this.form)
130 this.tableData.data = list 130 this.tableData.data = list
131 this.pageData = { 131 this.pageData = {
132 pageSize, 132 pageSize,
......