From 319b2285081a9b748035e21e313679b71dd6067d Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 30 Dec 2021 17:13:32 +0800 Subject: [PATCH] 1230 --- hb_client/package.json | 1 + .../src/components/customForm/review.vue | 22 +- hb_client/src/views/dashboard/index.vue | 232 +++++++++++++++++- hb_client/src/views/wpm/need.vue | 6 +- 4 files changed, 238 insertions(+), 23 deletions(-) diff --git a/hb_client/package.json b/hb_client/package.json index 1ea5514..c429f8b 100644 --- a/hb_client/package.json +++ b/hb_client/package.json @@ -23,6 +23,7 @@ "d3": "^5.14.2", "dagre-d3": "^0.6.4", "dhtmlx-gantt": "^6.2.1", + "echarts": "^4.2.0-rc.2", "element-ui": "^2.15.5", "file-saver": "^2.0.2", "fuse.js": "^6.4.6", diff --git a/hb_client/src/components/customForm/review.vue b/hb_client/src/components/customForm/review.vue index 55a85b5..ef38722 100644 --- a/hb_client/src/components/customForm/review.vue +++ b/hb_client/src/components/customForm/review.vue @@ -282,14 +282,14 @@ that.formData.push(obj) }); that.formData=[...that.formData]; - debugger; - console.log(that.formData) + // debugger; + console.log(that.formData); //当前表的数据存储 for(let i=0;i { @@ -310,15 +310,15 @@ let imag= this.formData.filter(item => { return item.field_type === 'draw'; }); - that.img = 'http://47.95.0.242:2222'+imag[0].draw_template; + // that.img = 'http://47.95.0.242:2222'+imag[0].draw_template; /*let originImag= this.origins.filter(item => { return item.field_type === 'draw'; });*/ - that.originImg = new Image(); + /*that.originImg = new Image(); that.originImg.crossOrigin = ''; that.originImg = imag[0].origin_value; - +*/ listJudge.forEach(item => { let obj = new Object(); obj = item; @@ -786,14 +786,16 @@ fieldData(isSubmit){ let that = this; that.field = []; //检查项目 - debugger; + // debugger; let submit = isSubmit=='1'?false:true; that.formData.forEach((item) => { - let field_value = 0; + let field_value = null; if(item.field_type==='int'){ field_value = parseInt(that.checkForm[item.field_key]) }else if(item.field_type==='float'){ field_value = parseFloat(that.checkForm[item.field_key]) + }else{ + field_value = that.checkForm[item.field_key]; } that.field.push({ id: item.id, @@ -805,7 +807,7 @@ that.testrecord.record_data = that.field;//检查项列表 that.testrecord.is_testok = that.is_testok;//检查表检查结果 that.testrecord.id = that.recordId; - debugger; + // debugger; if(submit){//提交 this.$emit('recordSubmit',that.testrecord); }else {//保存 diff --git a/hb_client/src/views/dashboard/index.vue b/hb_client/src/views/dashboard/index.vue index 1a662f6..8a61f1e 100644 --- a/hb_client/src/views/dashboard/index.vue +++ b/hb_client/src/views/dashboard/index.vue @@ -1,6 +1,6 @@ diff --git a/hb_client/src/views/wpm/need.vue b/hb_client/src/views/wpm/need.vue index eb683c5..885df54 100644 --- a/hb_client/src/views/wpm/need.vue +++ b/hb_client/src/views/wpm/need.vue @@ -979,6 +979,7 @@ //点击记录里的检验 handleInspectionRecord(scope){ let that =this; + that.fieldList = []; that.recordVisible = false; that.recordId = scope.row.id; that.recordform = scope.row.form; @@ -1033,7 +1034,6 @@ obj.is_testok = null; for (let j = 0; j < originList.length; j++) { if (fieldList[i].field_key === originList[j].field_key) { - obj.id = originList[j].id; obj.is_testok = originList[j].is_testok; obj.field_value = originList[j].field_value; obj.origin_value = originList[j].field_value; @@ -1056,6 +1056,7 @@ //点击记录里的查看 handleRecordDetail(scope){ let that = this; + that.fieldList = []; that.recordVisible = false; that.recordId = scope.row.id; that.recordform = scope.row.form; @@ -1098,6 +1099,7 @@ //半产品复检 handleReview() { let that = this; + that.fieldList = []; testInit({ wproduct: this.wproduct,form: that.recordform}).then((response) => { if (response.data) { that.hasPicture = false; @@ -1111,7 +1113,6 @@ obj.is_testok = null; for (let j = 0; j < originList.length; j++) { if (fieldList[i].field_key === originList[j].field_key) { - obj.id = originList[j].id; obj.is_testok = originList[j].is_testok; obj.field_value = originList[j].field_value; obj.origin_value = originList[j].field_value; @@ -1136,6 +1137,7 @@ submitrecordform(index) { let that = this; this.outerVisible = false; + that.fieldList = []; if (that.recordform != "") { if(index==='1'){//非复检 testInit({ wproduct: that.wproduct,form: that.recordform}).then((response) => {