4e32d787 by 任超

构筑物

1 parent 4c2cd994
import request from '@/utils/request'
import SERVER from './config'
class kttGzw {
//构筑物
async getKttGzwById (bsmSjsb) {
return request({
url: SERVER.SERVERAPI + '/rest/reg/KttGzw/detail',
method: 'get',
params: {
bsmSjsb: bsmSjsb
}
})
}
//修改构筑物
async updateKttGzw (data) {
return request({
url: SERVER.SERVERAPI + '/rest/reg/KttGzw/edit',
method: 'post',
data
})
}
}
export default new kttGzw()
\ No newline at end of file
......@@ -123,7 +123,7 @@
</template>
<script>
// 构筑物
import business from '@/api/business'
import kttGzw from '@/api/kttGzw'
import ruleMixin from '@/mixins/ruleMixin.js'
export default {
mixins: [ruleMixin],
......@@ -157,7 +157,7 @@ export default {
methods: {
async featchData () {
try {
let { result: res } = await business.getKttGzwById(this.bsmSjsb)
let { result: res } = await kttGzw.getKttGzwById(this.bsmSjsb)
this.ruleForm = res
//this.featchRule()
} catch (error) {
......@@ -167,7 +167,7 @@ export default {
handleUpdateForm () {
return new Promise(async (resolve) => {
try {
let res = await business.updateKttGzw(this.ruleForm)
let res = await kttGzw.updateKttGzw(this.ruleForm)
// this.$refs['formList'].resetFields();
resolve(res.code)
} catch (error) {
......