From 8edef770ce2c664ceeb2988804b7efaed7a3f841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=93=E8=B1=86=E8=B1=86?= <3346088772@qq.comcd> Date: Tue, 9 Jan 2024 17:59:42 +0800 Subject: [PATCH] =?UTF-8?q?AGV=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/dv/route/index.vue | 67 +- src/views/mes/dv/siteConfiguration/index.vue | 52 +- src/views/mes/pro/proroute/routeprocess.vue | 619 ++++++++++++++----- 3 files changed, 505 insertions(+), 233 deletions(-) diff --git a/src/views/mes/dv/route/index.vue b/src/views/mes/dv/route/index.vue index 6273f97..77cb9f4 100644 --- a/src/views/mes/dv/route/index.vue +++ b/src/views/mes/dv/route/index.vue @@ -111,20 +111,8 @@ label="AGV线路编码" width="120" align="center" - key="lineCode" prop="lineCode" - v-if="1" - > - - + /> @@ -213,19 +201,18 @@ - + @@ -300,14 +287,7 @@ export default { //车间选项 workshopOptions: [], // 表单参数 - form: { - proAgvlineId: "", - lineCode: "", - lineName: "", - workshopId: "", - enableFlag: "Y", - remark: "", - }, + form: {}, whetherEnabled: [ { value: "Y", @@ -323,7 +303,7 @@ export default { lineCode: [ { required: true, message: "AGV线路编码不能为空", trigger: "blur" }, ], - workshopName: [ + workshopId: [ { required: true, message: "所属车间不能为空", trigger: "blur" }, ], lineName: [ @@ -356,18 +336,20 @@ export default { }, // 取消按钮 cancel() { - this.open = false; this.reset(); + this.getList(); + this.open = false; }, // 表单重置 reset() { this.form = { - proAgvlineId: "", - lineCode: "", - lineName: "", - workshopId: "", + subjectId: null, + proAgvlineId: null, + lineCode: null, + lineName: null, + workshopId: null, enableFlag: "Y", - remark: "", + remark: null, }; this.autoGenFlag = true; this.resetForm("form"); @@ -399,12 +381,6 @@ export default { this.form.lineCode = response.data.lineCode; }); }, - //选择车间 - handleAccompanyId(val) { - this.form.workshopCode = val.workshopCode; - this.form.workshopName = val.workshopName; - this.form.workshopId = val.workshopId; - }, /** 修改按钮操作 */ handleUpdate(row) { console.log(row); @@ -413,7 +389,7 @@ export default { this.form = row; this.form.subjectId = row.proAgvlineId; this.open = true; - this.title = "修改代码"; + this.title = "修改AGV线路"; }, /** 提交按钮 */ submitForm() { @@ -449,19 +425,6 @@ export default { }, /** 删除按钮操作 */ handleDelete(row) { - // console.log(row); - // const subjectIds = row.proAgvlineId || this.id; - // this.$modal - // .confirm("是否确认删除当前的数据项?") - // .then(function () { - // return deleteProAgvline(subjectIds); - // }) - // .then(() => { - // this.getList(); - // this.$modal.msgSuccess("删除成功"); - // }) - // .catch(() => {}); - deleteProAgvline({ proAgvlineId: row.proAgvlineId }).then((response) => { this.$modal .confirm("是否确认删除当前的数据项?") diff --git a/src/views/mes/dv/siteConfiguration/index.vue b/src/views/mes/dv/siteConfiguration/index.vue index 8d329c7..1d62d4c 100644 --- a/src/views/mes/dv/siteConfiguration/index.vue +++ b/src/views/mes/dv/siteConfiguration/index.vue @@ -126,7 +126,7 @@ - + @@ -213,19 +211,18 @@ - + @@ -294,7 +291,7 @@ export default { showSearch: true, // 总条数 total: 0, - // 设备点检保养项目表格数据 + // 列表 dvsubjectList: [], // 弹出层标题 title: "", @@ -311,11 +308,11 @@ export default { workshopOptions: [], // 表单参数 form: { - proAgvlineId: "", + proAgvsiteId: "", siteCode: "", siteName: "", agvlineId: "", - lineName: "", + agvlineName: "", enableFlag: "Y", remark: "", }, @@ -334,7 +331,7 @@ export default { siteCode: [ { required: true, message: "AGV站点编码不能为空", trigger: "blur" }, ], - lineName: [ + agvlineId: [ { required: true, message: "所属线路不能为空", trigger: "blur" }, ], siteName: [ @@ -367,19 +364,21 @@ export default { }, // 取消按钮 cancel() { - this.open = false; this.reset(); + this.getList(); + this.open = false; }, // 表单重置 reset() { this.form = { - proAgvlineId: "", - siteCode: "", - siteName: "", - agvlineId: "", + subjectId: null, + proAgvsiteId: null, + siteCode: null, + siteName: null, + agvlineId: null, enableFlag: "Y", - remark: "", - lineName: "", + remark: null, + agvlineName: null, }; this.autoGenFlag = true; this.resetForm("form"); @@ -396,7 +395,7 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { - this.id = selection.map((item) => item.proAgvlineId); + this.id = selection.map((item) => item.proAgvsiteId); this.single = selection.length !== 1; this.multiple = !selection.length; }, @@ -405,27 +404,21 @@ export default { this.reset(); this.getWorkshops(); this.open = true; - this.title = "新增AGV线路"; + this.title = "新增AGV站点"; findSiteCode().then((response) => { console.log(response); this.form.siteCode = response.data.siteCode; }); }, - //选择线路 - handleAccompanyId(val) { - console.log(val); - this.form.lineName = val.lineName; - this.form.agvlineId = val.proAgvlineId; - }, /** 修改按钮操作 */ handleUpdate(row) { console.log(row); this.reset(); this.getWorkshops(); this.form = row; - this.form.subjectId = row.proAgvlineId; + this.form.subjectId = row.proAgvsiteId; this.open = true; - this.title = "修改代码"; + this.title = "修改AGV站点"; }, /** 提交按钮 */ submitForm() { @@ -461,7 +454,8 @@ export default { }, /** 删除按钮操作 */ handleDelete(row) { - deleteProAgvsite({ proAgvlineId: row.proAgvlineId }).then((response) => { + console.log(row); + deleteProAgvsite({ proAgvsiteId: row.proAgvsiteId }).then((response) => { this.$modal .confirm("是否确认删除当前的数据项?") .then(() => { diff --git a/src/views/mes/pro/proroute/routeprocess.vue b/src/views/mes/pro/proroute/routeprocess.vue index e74c185..b8ddf89 100644 --- a/src/views/mes/pro/proroute/routeprocess.vue +++ b/src/views/mes/pro/proroute/routeprocess.vue @@ -1,6 +1,6 @@