6c87480f by zhaoqian

新建幢单元页面换成table样式表单

1 parent e19e379f
......@@ -10,4 +10,15 @@ export function getLpbMenuTree (data) {
zrzbsm:data
},
})
}
/**
* 新增幢单元接口信息
*/
export function insertZdyInfo (data) {
return request({
url: 'system/qjZdy/insertQjZdy',
method: 'post',
data:data
})
}
\ No newline at end of file
......
......@@ -52,6 +52,8 @@
</template>
<script>
import {insertZdyInfo} from "../../../../api/lpb"
export default {
name: "index",
components: {},
......@@ -89,10 +91,19 @@
}
},
methods:{
submitForm(formName) {
submitForm(formName,bsm) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert('submit!');
insertZdyInfo(this.form).then((res)=>{
if(res.code===200){
this.$message.success("保存成功!")
//更新树结构数据
this.$parent.$parent.getLpbMenuTree(bsm);
//关闭弹框
this.$parent.$parent.closeDaialog()
}
return true;
})
} else {
console.log('error submit!!');
return false;
......