From ac2dd89df4122e049a4e494ef0fe8bf9107b0781 Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 21 Dec 2021 17:01:16 +0800 Subject: [PATCH] ganttchange --- hb_client/src/components/customForm/index.vue | 45 +++++++------------ .../src/components/customForm/review.vue | 22 ++++----- hb_client/src/views/pm/gantt.vue | 11 +++-- hb_client/src/views/wpm/need.vue | 17 ++++--- 4 files changed, 40 insertions(+), 55 deletions(-) diff --git a/hb_client/src/components/customForm/index.vue b/hb_client/src/components/customForm/index.vue index 6231f8f..9155cde 100644 --- a/hb_client/src/components/customForm/index.vue +++ b/hb_client/src/components/customForm/index.vue @@ -59,7 +59,6 @@ style="width: 100%" @change="keyChange($index,item.field_key)" /> - - - 说明:{{item.help_text}} - 合格 + 合格 不合格 @@ -137,20 +134,15 @@
标记
文字
回退
- +
保存
- - 检查合格 检查不合格 @@ -160,7 +152,6 @@ 提交 - @@ -202,6 +193,11 @@ formData.forEach(item => { let obj = new Object(); obj = item; + if(item.field_type === 'draw'){ + obj.is_testok = true; + }else{ + obj.is_testok = null; + } that.formData.push(obj) }); that.formData=[...formData]; @@ -270,10 +266,8 @@ }, methods:{ filterBlock(parent,rule,index,field_key){ - debugger; let that = this; if(parent!==''&&parent!==null&&parent!==undefined){ - debugger; if(rule!==''&&rule!==null&&rule!==undefined){ let reg = /\{(.+?)\}/g; //let str = rule.replace(temp,'').replace('$','');//=='有' @@ -515,7 +509,6 @@ if(v != '' && v != ' '){ this.imgData=ctx3.getImageData(0,0,canvas3.width,canvas3.height); let img = ctx3.getImageData(0,0,canvas3.width,canvas3.height); - // debugger; preDrawAry.push(img); ctx3.moveTo(oldX,oldY); ctx3.fillStyle="#e42343"; @@ -586,10 +579,7 @@ let formData = new FormData(); formData.append('file', file); upFile(formData).then((res) => { - debugger; - console.log(res); - that.imgUrl=res.data.field; - // console.log(res); + that.imgUrl=res.data.path; }) }, //base64ToFile @@ -632,7 +622,6 @@ //替换变量 a = a.replace(ky, 'yyy'); let yyy = "'"+that.checkForm[ky]+"'"; - // debugger; if(eval(eval( a))){ str += 'true'; }else{ @@ -684,8 +673,8 @@ upFile(formData).then((res) => { if(res){ let key = drawArr[0].field_key; - that.imgUrl=res.data.file; - that.checkForm[key] = res.data.file; + that.imgUrl=res.data.path; + that.checkForm[key] = res.data.path; that.fieldData(isSubmit); } }); @@ -698,14 +687,12 @@ that.field = []; //检查项目 let submit = isSubmit=='1'?false:true; that.formData.forEach((item) => { - if(!item.is_hidden){ - that.field.push({ - id: item.id, - field_value: that.checkForm[item.field_key], - is_testok: item.is_testok,//单项检查结果 - is_hidden: item.is_hidden - }); - } + that.field.push({ + id: item.id, + field_value: that.checkForm[item.field_key], + is_testok: item.is_testok,//单项检查结果 + is_hidden: item.is_hidden + }); }); that.testrecord.record_data = that.field;//检查项列表 that.testrecord.is_testok = that.is_testok;//检查表检查结果 diff --git a/hb_client/src/components/customForm/review.vue b/hb_client/src/components/customForm/review.vue index 78cadc0..23b69fb 100644 --- a/hb_client/src/components/customForm/review.vue +++ b/hb_client/src/components/customForm/review.vue @@ -677,10 +677,7 @@ let formData = new FormData(); formData.append('file', file); upFile(formData).then((res) => { - debugger; - console.log(res); - that.imgUrl=res.data.field; - // console.log(res); + that.imgUrl=res.data.path; }) }, //base64ToFile @@ -775,7 +772,7 @@ upFile(formData).then((res) => { if(res){ let key = drawArr[0].field_key; - that.imgUrl=res.data.file; + that.imgUrl=res.data.path; that.checkForm[key] = that.imgUrl; that.fieldData(); } @@ -789,14 +786,12 @@ that.field = []; //检查项目 let submit = isSubmit=='1'?false:true; that.formData.forEach((item) => { - if(!item.is_hidden){ - that.field.push({ - id: item.id, - field_value: that.checkForm[item.field_key], - is_testok: item.is_testok,//单项检查结果 - is_hidden: item.is_hidden - }); - } + that.field.push({ + id: item.id, + field_value: that.checkForm[item.field_key], + is_testok: item.is_testok,//单项检查结果 + is_hidden: item.is_hidden + }); }); // that.testrecord.form = that.formID;//检查表 that.testrecord.record_data = that.field;//检查项列表 @@ -804,7 +799,6 @@ // that.testrecord.wproduct = that.wproductId;//半成品ID // that.testrecord.is_submited = true; that.testrecord.id = that.recordId; - debugger; if(submit){//提交 this.$emit('recordSubmit',that.testrecord); }else {//保存 diff --git a/hb_client/src/views/pm/gantt.vue b/hb_client/src/views/pm/gantt.vue index 564d3b3..6c2b376 100644 --- a/hb_client/src/views/pm/gantt.vue +++ b/hb_client/src/views/pm/gantt.vue @@ -392,9 +392,14 @@ let that = this; getPlanGantt({}).then(res=>{ if(res.code===200){ - // debugger; - let arr =[]; - let list = res.data.results; + let arr =[],list=[]; + let li = res.data.results; + li.forEach((item,index)=>{ + if(index===1){ + list.push(item) + } + }); + // let list = res.data.results[1]; list.forEach(item => { if (!item.children || item.children.length < 1) { let startTime = new Date(item.start_date).getTime(); diff --git a/hb_client/src/views/wpm/need.vue b/hb_client/src/views/wpm/need.vue index 5d73c0f..47712ff 100644 --- a/hb_client/src/views/wpm/need.vue +++ b/hb_client/src/views/wpm/need.vue @@ -711,7 +711,7 @@ //点击检验:如果有一个直接进入,如果有多个表再进行选择 handleInspection(scope,index) { //调该物料对应的检查表 - debugger; + // debugger; let that = this; this.innerIndex = index; // this.outerVisible = true; @@ -761,7 +761,7 @@ }, //点击记录里的检验 handleInspectionRecord(scope){ - debugger; + // debugger; let that =this; that.recordVisible = false; that.recordId = scope.row.id; @@ -780,7 +780,7 @@ that.hasPicture = true; } getTestRecordItem(scope.row.id).then((res) => { - debugger; + // debugger; let arr = []; let fieldList = res.data.record_data; for(let i=0;i { if (response.data) { - debugger; + // debugger; that.hasPicture = false; that.recordId = response.data.id; that.formName = response.data.form_.name; @@ -868,7 +868,7 @@ //根据选择的表,渲染检查项目 submitrecordform(index) { - debugger; + // debugger; let that = this; this.outerVisible = false; if (that.recordform != "") { @@ -894,7 +894,7 @@ } }); }else if(index==='2'){//复检 - debugger; + // debugger; that.handleReview(); } } else this.$message.error("请选择检查表!"); @@ -953,14 +953,13 @@ }, //保存检查项目 recordSave(value) { - debugger; let that = this; let id = value.id; let params = {}; params.record_data = value.record_data; params.is_testok = value.is_testok; putTestRecordItem(id,params).then((res) => { - debugger; + // debugger; if (res.code >= 200) { that.recordVisible = false; that.limitedReview = false;