修改新增页面得问题

This commit is contained in:
gyj
2024-01-31 16:04:35 +08:00
parent 6f95f2df93
commit 3a611ed1c5
3 changed files with 64 additions and 16 deletions
+35 -11
View File
@@ -192,7 +192,7 @@
</el-col>
<el-col :span="24">
<el-form-item label="选择机构或自然人" prop="affiliate.organizeFlag">
<el-radio-group v-model="formData.affiliate.organizeFlag">
<el-radio-group v-model="formData.affiliate.organizeFlag" @change="clearValidate">
<el-radio :label="0">自然人</el-radio>
<el-radio :label="1">机构</el-radio>
</el-radio-group>
@@ -729,11 +729,37 @@ export default {
deep: true,
handler(val) {
this.getTemplateFn();
if (val.id && val.flag == 2) {
this.modelFlag = true;
this.title = "修改案件";
this.caseApplicationSelectByIdFn(val.id);
} else if (!val.id && val.flag == 2) {
// if (val.id && !val.flag) {
// this.modelFlag = true;
// this.title = "修改案件";
// this.caseApplicationSelectByIdFn(val.id);
// } else if (!val.id && !val.flag) {
// this.modelFlag = false;
// this.title = "新增案件";
// this.formData = {
// affiliate: {
// organizeFlag:0,
// respondentSex: 0,
// },
// columnValueList: [],
// caseAttachList: [],
// };
// } else if (val.id && val.flag == 1) {
// this.modelFlag = true;
// this.title = "案件详情";
// this.caseApplicationSelectByIdFn(val.id);
// }
if(val.id){
if(val.flag==1){
this.modelFlag = true;
this.title = "案件详情";
this.caseApplicationSelectByIdFn(val.id);
}else{
this.modelFlag = true;
this.title = "修改案件";
this.caseApplicationSelectByIdFn(val.id);
}
}else{
this.modelFlag = false;
this.title = "新增案件";
this.formData = {
@@ -744,10 +770,6 @@ export default {
columnValueList: [],
caseAttachList: [],
};
} else if (val.id && val.flag == 1) {
this.modelFlag = true;
this.title = "案件详情";
this.caseApplicationSelectByIdFn(val.id);
}
},
},
@@ -758,7 +780,6 @@ export default {
},
},
created() {
console.log(this.formData,"000000000000000000")
},
methods: {
/** 根据案件id获取对应信息 */
@@ -853,6 +874,9 @@ export default {
}
});
},
clearValidate(){
this.$refs["ruleForm"].clearValidate()
},
cancel() {
this.$emit("cancelCaseAdd");
},