0422
This commit is contained in:
parent
0a6a9ed729
commit
f74be9578a
|
@ -282,6 +282,7 @@
|
||||||
is_save:false,
|
is_save:false,
|
||||||
require:false,
|
require:false,
|
||||||
testokFalse:false,
|
testokFalse:false,
|
||||||
|
index:'1',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
@ -669,6 +670,7 @@
|
||||||
//提交检查项目
|
//提交检查项目
|
||||||
submitfield(isSubmit) {
|
submitfield(isSubmit) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.index = isSubmit;
|
||||||
let drawArr = that.formData.filter(item=>{
|
let drawArr = that.formData.filter(item=>{
|
||||||
return item.field_type==='draw';
|
return item.field_type==='draw';
|
||||||
});
|
});
|
||||||
|
@ -687,17 +689,16 @@
|
||||||
let key = drawArr[0].field_key;
|
let key = drawArr[0].field_key;
|
||||||
that.imgUrl=res.data.path;
|
that.imgUrl=res.data.path;
|
||||||
that.checkForm[key] = res.data.path;
|
that.checkForm[key] = res.data.path;
|
||||||
that.fieldData(isSubmit);
|
that.fieldData();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
that.fieldData(isSubmit);
|
that.fieldData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fieldData(isSubmit){
|
fieldData(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.field = []; //检查项目
|
that.field = []; //检查项目
|
||||||
let submit = isSubmit=='1'?false:true;
|
|
||||||
that.formData.forEach((item) => {
|
that.formData.forEach((item) => {
|
||||||
let field_value;
|
let field_value;
|
||||||
if(item.field_type==='int'){
|
if(item.field_type==='int'){
|
||||||
|
@ -717,7 +718,7 @@
|
||||||
that.testrecord.record_data = that.field;//检查项列表
|
that.testrecord.record_data = that.field;//检查项列表
|
||||||
that.testrecord.is_testok = that.is_testok;//检查表检查结果
|
that.testrecord.is_testok = that.is_testok;//检查表检查结果
|
||||||
that.testrecord.id = that.recordId;//记录id
|
that.testrecord.id = that.recordId;//记录id
|
||||||
if(submit){//提交
|
if(that.index==='2'){//提交
|
||||||
this.$emit('recordSubmit',that.testrecord);
|
this.$emit('recordSubmit',that.testrecord);
|
||||||
}else {//保存
|
}else {//保存
|
||||||
this.$emit('recordSave',that.testrecord);
|
this.$emit('recordSave',that.testrecord);
|
||||||
|
|
|
@ -374,6 +374,7 @@
|
||||||
is_testok:true,
|
is_testok:true,
|
||||||
testokTrue:true,
|
testokTrue:true,
|
||||||
testokFalse:false,
|
testokFalse:false,
|
||||||
|
index:'1',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
@ -765,6 +766,7 @@
|
||||||
//提交检查项目
|
//提交检查项目
|
||||||
submitfield(isSubmit) {
|
submitfield(isSubmit) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.index = isSubmit;
|
||||||
let drawArr = that.formData.filter(item=>{
|
let drawArr = that.formData.filter(item=>{
|
||||||
return item.field_type==='draw';
|
return item.field_type==='draw';
|
||||||
});
|
});
|
||||||
|
@ -787,14 +789,12 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
that.fieldData(isSubmit);
|
that.fieldData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fieldData(isSubmit){
|
fieldData(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.field = []; //检查项目
|
that.field = []; //检查项目
|
||||||
// debugger;
|
|
||||||
let submit = isSubmit=='1'?false:true;
|
|
||||||
that.formData.forEach((item) => {
|
that.formData.forEach((item) => {
|
||||||
let field_value = null;
|
let field_value = null;
|
||||||
if(item.field_type==='int'){
|
if(item.field_type==='int'){
|
||||||
|
@ -816,7 +816,7 @@
|
||||||
that.testrecord.id = that.recordId;
|
that.testrecord.id = that.recordId;
|
||||||
// debugger;
|
// debugger;
|
||||||
// if(submit&&that.isMidTesting!==true){//提交
|
// if(submit&&that.isMidTesting!==true){//提交
|
||||||
if(submit){//提交
|
if(that.index==='2'){//提交
|
||||||
this.$emit('recordSubmit',that.testrecord);
|
this.$emit('recordSubmit',that.testrecord);
|
||||||
}else {//保存
|
}else {//保存
|
||||||
this.$emit('recordSave',that.testrecord);
|
this.$emit('recordSave',that.testrecord);
|
||||||
|
|
Loading…
Reference in New Issue