新建幢单元页面换成table样式表单
Showing
2 changed files
with
24 additions
and
2 deletions
... | @@ -10,4 +10,15 @@ export function getLpbMenuTree (data) { | ... | @@ -10,4 +10,15 @@ export function getLpbMenuTree (data) { |
10 | zrzbsm:data | 10 | zrzbsm:data |
11 | }, | 11 | }, |
12 | }) | 12 | }) |
13 | } | ||
14 | |||
15 | /** | ||
16 | * 新增幢单元接口信息 | ||
17 | */ | ||
18 | export function insertZdyInfo (data) { | ||
19 | return request({ | ||
20 | url: 'system/qjZdy/insertQjZdy', | ||
21 | method: 'post', | ||
22 | data:data | ||
23 | }) | ||
13 | } | 24 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -52,6 +52,8 @@ | ... | @@ -52,6 +52,8 @@ |
52 | </template> | 52 | </template> |
53 | 53 | ||
54 | <script> | 54 | <script> |
55 | |||
56 | import {insertZdyInfo} from "../../../../api/lpb" | ||
55 | export default { | 57 | export default { |
56 | name: "index", | 58 | name: "index", |
57 | components: {}, | 59 | components: {}, |
... | @@ -89,10 +91,19 @@ | ... | @@ -89,10 +91,19 @@ |
89 | } | 91 | } |
90 | }, | 92 | }, |
91 | methods:{ | 93 | methods:{ |
92 | submitForm(formName) { | 94 | submitForm(formName,bsm) { |
93 | this.$refs[formName].validate((valid) => { | 95 | this.$refs[formName].validate((valid) => { |
94 | if (valid) { | 96 | if (valid) { |
95 | alert('submit!'); | 97 | insertZdyInfo(this.form).then((res)=>{ |
98 | if(res.code===200){ | ||
99 | this.$message.success("保存成功!") | ||
100 | //更新树结构数据 | ||
101 | this.$parent.$parent.getLpbMenuTree(bsm); | ||
102 | //关闭弹框 | ||
103 | this.$parent.$parent.closeDaialog() | ||
104 | } | ||
105 | return true; | ||
106 | }) | ||
96 | } else { | 107 | } else { |
97 | console.log('error submit!!'); | 108 | console.log('error submit!!'); |
98 | return false; | 109 | return false; | ... | ... |
-
Please register or sign in to post a comment