diff --git a/hb_client/src/views/mtm/materialdo.vue b/hb_client/src/views/mtm/materialdo.vue index 4cd5e83..49fd4c1 100644 --- a/hb_client/src/views/mtm/materialdo.vue +++ b/hb_client/src/views/mtm/materialdo.vue @@ -154,7 +154,7 @@ :title="tableForm.name" > { if (response.data) { - this.hasPicture = false; that.fieldList = response.data; - let list = response.data.results; + } + }); + getrffieldList({page:0,form:that.formID}).then((response) => { + if (response.data) { + this.hasPicture = false; + let list = response.data; + this.dialogFieldList= response.data; let arr = list.filter(item => { return item.field_type === 'draw' }); @@ -877,9 +883,6 @@ that.$set(that.checkForm, key, '') } that.dialogVisibleForm = true; - /* setTimeout(function () { - that.canvasInit(); - }, 500);*/ } }); that.fieldLists(); diff --git a/hb_client/src/views/mtm/step.vue b/hb_client/src/views/mtm/step.vue index c5d3838..1e29882 100644 --- a/hb_client/src/views/mtm/step.vue +++ b/hb_client/src/views/mtm/step.vue @@ -249,7 +249,7 @@ label-width="180px" label-position="right" > - + @@ -458,6 +458,7 @@ return { step: defaultstep, stepList: [], + dialogFieldList: [], productOptions: [], upHeaders: upHeaders(), upUrl: upUrl(), @@ -601,9 +602,14 @@ }, handleLook(scope) { this.dialogVisibleForm = true; - this.tableForm = Object.assign({}, scope.row); // copy obj + this.dialogFieldList = []; + this.tableForm = Object.assign({}, scope.row); this.formID = this.tableForm.id; - this.fieldLists(); + getrffieldList({page:0,form:this.formID}).then((response) => { + if (response.data) { + this.dialogFieldList = response.data; + } + }); }, checkPermission, //子工序列表 @@ -638,7 +644,6 @@ this.step.instruction = null; }, - handleFilter() { this.listQuery.page = 1; this.getList(); @@ -659,6 +664,7 @@ this.$refs["Form"].clearValidate(); }); }, + rowClick(row) { this.stepid = row.id; this.recordformLists(); @@ -673,6 +679,7 @@ this.$refs["Form"].clearValidate(); }); }, + handleDeleteStep(scope) { this.$confirm("确认删除?", "警告", { confirmButtonText: "确认", @@ -703,7 +710,6 @@ } }); } else { - console.log(this.step) createStep(this.step).then((res) => { if (res.code >= 200) { this.getList(); @@ -717,11 +723,12 @@ } }); }, + handleCurrentChange(row) { this.formID = row.id; this.fieldLists(); - }, + recordformLists() { this.listQueryrecordform.step = this.stepid; this.listQueryrecordform.type = 10; @@ -729,7 +736,6 @@ if (response.data) { this.recordformList = response.data; } - }); }, getFormList(){ @@ -737,18 +743,14 @@ if (response.data) { this.formList = response.data; } - }); }, fieldLists() { - this.listQueryfield.form = this.formID + this.listQueryfield.form = this.formID; getrffieldList(this.listQueryfield).then((response) => { if (response.data) { this.fieldList = response.data; - debugger; - console.log(this.fieldList) } - }); }, //新增记录表 @@ -762,7 +764,6 @@ }, //新增字段 handlefieldCreate() { - this.field_choice = ['']; this.field = Object.assign({}, defaultfield); this.dialogType1 = "new"; @@ -773,8 +774,6 @@ }, handleEdit(scope) { this.recordform = Object.assign({}, scope.row); // copy obj - debugger; - console.log(this.recordform); this.dialogType = "edit"; this.dialogVisible = true; this.$nextTick(() => { @@ -798,7 +797,7 @@ }) .then(async () => { await deleterecordform(scope.row.id); - this.recordformLists() + this.recordformLists(); this.$message.success("成功"); }) .catch((err) => { @@ -813,7 +812,7 @@ }) .then(async () => { await deleterffield(scope.row.id); - this.fieldLists() + this.fieldLists(); this.$message.success("成功"); }) .catch((err) => { @@ -834,11 +833,10 @@ } }); } else { - this.recordform.step = this.stepid - + this.recordform.step = this.stepid; createrecordform(this.recordform).then((res) => { if (res.code >= 200) { - this.recordformLists() + this.recordformLists(); this.dialogVisible = false; this.$message.success("成功"); } @@ -858,7 +856,7 @@ this.field.field_choice = this.field_choice; updaterffield(this.field.id, this.field).then((res) => { if (res.code >= 200) { - this.fieldLists() + this.fieldLists(); this.dialogVisible1 = false; this.$message.success("成功"); } @@ -868,7 +866,7 @@ this.field.field_choice = this.field_choice; createrffield(this.field).then((res) => { if (res.code >= 200) { - this.fieldLists() + this.fieldLists(); this.dialogVisible1 = false; this.$message.success("成功"); }