|
@@ -312,15 +312,17 @@
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(maxValid => {
|
|
|
- this.$refs.forElFormItem.$refs["form"].validate(valid => {
|
|
|
- if (valid) {
|
|
|
- if(this.forPropsData.modelList[0]){
|
|
|
- this.dataProcessing('1');
|
|
|
- }else{
|
|
|
- this.dataProcessing('2');
|
|
|
- }
|
|
|
+ if (maxValid) {
|
|
|
+ if(this.forPropsData.modelList[0]){
|
|
|
+ this.$refs.forElFormItem.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.dataProcessing('1');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.dataProcessing('2');
|
|
|
}
|
|
|
- })
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
//处理数据并提交
|
|
@@ -336,7 +338,8 @@
|
|
|
code:this.newData.code,
|
|
|
state:this.newData.state,
|
|
|
remark:this.newData.remark,
|
|
|
- reservedField:type==1 ? (this.$refs.forElFormItem.formData?JSON.stringify(this.$refs.forElFormItem.formData):''):'',
|
|
|
+ reservedField:type==1?JSON.stringify(this.$refs.forElFormItem.formData):'',
|
|
|
+ // reservedField:type==1 ? (this.$refs.forElFormItem.formData?JSON.stringify(this.$refs.forElFormItem.formData):''):'',
|
|
|
};
|
|
|
//获取校区-楼栋-楼层数据
|
|
|
for(let i=0;i<self.treeOptions.length;i++){
|