diff --git a/hb_client/src/components/customForm/index.vue b/hb_client/src/components/customForm/index.vue index ad62842..238c0da 100644 --- a/hb_client/src/components/customForm/index.vue +++ b/hb_client/src/components/customForm/index.vue @@ -282,6 +282,7 @@ is_save:false, require:false, testokFalse:false, + index:'1', } }, methods:{ @@ -669,6 +670,7 @@ //提交检查项目 submitfield(isSubmit) { let that = this; + that.index = isSubmit; let drawArr = that.formData.filter(item=>{ return item.field_type==='draw'; }); @@ -687,17 +689,16 @@ let key = drawArr[0].field_key; that.imgUrl=res.data.path; that.checkForm[key] = res.data.path; - that.fieldData(isSubmit); + that.fieldData(); } }); }else{ - that.fieldData(isSubmit); + that.fieldData(); } }, - fieldData(isSubmit){ + fieldData(){ let that = this; that.field = []; //检查项目 - let submit = isSubmit=='1'?false:true; that.formData.forEach((item) => { let field_value; if(item.field_type==='int'){ @@ -717,7 +718,7 @@ that.testrecord.record_data = that.field;//检查项列表 that.testrecord.is_testok = that.is_testok;//检查表检查结果 that.testrecord.id = that.recordId;//记录id - if(submit){//提交 + if(that.index==='2'){//提交 this.$emit('recordSubmit',that.testrecord); }else {//保存 this.$emit('recordSave',that.testrecord); diff --git a/hb_client/src/components/customForm/review.vue b/hb_client/src/components/customForm/review.vue index 045344d..8fa0c79 100644 --- a/hb_client/src/components/customForm/review.vue +++ b/hb_client/src/components/customForm/review.vue @@ -374,6 +374,7 @@ is_testok:true, testokTrue:true, testokFalse:false, + index:'1', } }, methods:{ @@ -765,6 +766,7 @@ //提交检查项目 submitfield(isSubmit) { let that = this; + that.index = isSubmit; let drawArr = that.formData.filter(item=>{ return item.field_type==='draw'; }); @@ -787,14 +789,12 @@ } }); }else{ - that.fieldData(isSubmit); + that.fieldData(); } }, - fieldData(isSubmit){ + fieldData(){ let that = this; that.field = []; //检查项目 - // debugger; - let submit = isSubmit=='1'?false:true; that.formData.forEach((item) => { let field_value = null; if(item.field_type==='int'){ @@ -816,7 +816,7 @@ that.testrecord.id = that.recordId; // debugger; // if(submit&&that.isMidTesting!==true){//提交 - if(submit){//提交 + if(that.index==='2'){//提交 this.$emit('recordSubmit',that.testrecord); }else {//保存 this.$emit('recordSave',that.testrecord);