工艺流程
This commit is contained in:
parent
2485e29ba2
commit
bd41a573cd
@ -167,7 +167,7 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="序号" prop="orderNum">
|
<el-form-item label="序号" prop="orderNum">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
:min="1"
|
:min="0"
|
||||||
v-model="form.orderNum"
|
v-model="form.orderNum"
|
||||||
placeholder="请输入序号"
|
placeholder="请输入序号"
|
||||||
/>
|
/>
|
||||||
@ -535,6 +535,7 @@ export default {
|
|||||||
code: null,
|
code: null,
|
||||||
},
|
},
|
||||||
machineryList: [],
|
machineryList: [],
|
||||||
|
formArr: "",
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
routeId: [
|
routeId: [
|
||||||
@ -825,6 +826,7 @@ export default {
|
|||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
console.log(row);
|
console.log(row);
|
||||||
this.reset();
|
this.reset();
|
||||||
|
this.formArr = row.orderNum;
|
||||||
const recordId = row.recordId || this.ids;
|
const recordId = row.recordId || this.ids;
|
||||||
getRouteprocess(recordId).then((response) => {
|
getRouteprocess(recordId).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
@ -849,35 +851,68 @@ export default {
|
|||||||
this.fileList.push(name);
|
this.fileList.push(name);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
process() {
|
||||||
|
const queryParamsArr = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10000,
|
||||||
|
routeId: this.routeId,
|
||||||
|
};
|
||||||
|
listRouteprocess(queryParamsArr).then((response) => {
|
||||||
|
const dataAfterThree = [];
|
||||||
|
response.rows.forEach((item, index) => {
|
||||||
|
dataAfterThree.push(item);
|
||||||
|
});
|
||||||
|
const mappedArray = [];
|
||||||
|
for (let i = 1; i <= dataAfterThree.length; i++) {
|
||||||
|
mappedArray[i] = dataAfterThree[i - 1];
|
||||||
|
}
|
||||||
|
mappedArray.forEach((item, index) => {
|
||||||
|
item.orderNum = index;
|
||||||
|
updateRouteprocess(item).then((response) => {
|
||||||
|
this.getList();
|
||||||
|
updateRouteprocess(item).then((response) => {
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.recordId != null) {
|
if (this.form.recordId != null) {
|
||||||
|
if (this.form.orderNum < this.formArr) {
|
||||||
|
this.form.orderNum = this.form.orderNum - 1;
|
||||||
|
}
|
||||||
updateRouteprocess(this.form).then((response) => {
|
updateRouteprocess(this.form).then((response) => {
|
||||||
|
this.process();
|
||||||
|
this.getList();
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
this.form.orderNum = this.form.orderNum - 1;
|
||||||
addRouteprocess(this.form).then((response) => {
|
addRouteprocess(this.form).then((response) => {
|
||||||
|
this.process();
|
||||||
|
this.getList();
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let aa = { routeId: this.form.routeId, orderNum: this.form.orderNum };
|
// let aa = { routeId: this.form.routeId, orderNum: this.form.orderNum };
|
||||||
listRouteprocessTwo(aa).then((resp) => {
|
// listRouteprocessTwo(aa).then((resp) => {
|
||||||
resp.data.forEach((item) => {
|
// resp.data.forEach((item) => {
|
||||||
getRouteprocess(item.recordId).then((response) => {
|
// getRouteprocess(item.recordId).then((response) => {
|
||||||
const { originalName, ...newObj } = response.data;
|
// const { originalName, ...newObj } = response.data;
|
||||||
updateRouteprocess(newObj).then(() => {
|
// updateRouteprocess(newObj).then(() => {});
|
||||||
this.getList();
|
// });
|
||||||
});
|
// });
|
||||||
});
|
// this.getList();
|
||||||
});
|
// });
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -890,6 +925,7 @@ export default {
|
|||||||
return delRouteprocess(recordIds);
|
return delRouteprocess(recordIds);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
this.process();
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
|
@ -671,11 +671,15 @@ export default {
|
|||||||
// .get("http://192.168.50.191:8077/manage/task/execute?ids=" + routeId)
|
// .get("http://192.168.50.191:8077/manage/task/execute?ids=" + routeId)
|
||||||
// .get("http://127.0.0.1:8077/manage/task/execute?ids=" + routeId)
|
// .get("http://127.0.0.1:8077/manage/task/execute?ids=" + routeId)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.data.code === 200) {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("执行成功");
|
this.$message({
|
||||||
|
showClose: true,
|
||||||
|
message: "执行成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.data.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -694,11 +698,15 @@ export default {
|
|||||||
// .get("http://192.168.50.191:8077/manage/task/suspension?id=" + routeId)
|
// .get("http://192.168.50.191:8077/manage/task/suspension?id=" + routeId)
|
||||||
// .get("http://127.0.0.1:8077/manage/task/suspension?id=" + routeId)
|
// .get("http://127.0.0.1:8077/manage/task/suspension?id=" + routeId)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.data.code === 200) {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("已暂停");
|
this.$message({
|
||||||
|
showClose: true,
|
||||||
|
message: "已暂停",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.data.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user