Commit f1862490 authored by 刘殿昕's avatar 刘殿昕

云资源字段自动添加,检测闭环,订单列表筛选

parent fa263aef
......@@ -127,7 +127,7 @@ export default {
buttonList.forEach((item) => {
item.state = false;
});
buttonList.unshift({ id: 0, name: "全部", state: false });
buttonList.unshift({ id: 0, name: "全部", state: true });
buttonList.push({ id: "cloud", name: "云资源", state: false });
buttonList.push({ id: "app", name: "应用镜像", state: false });
this.buttonList = buttonList;
......@@ -147,6 +147,12 @@ export default {
}
this.buttonList[0].state = !this.buttonList[0].state;
}
let i = this.buttonList.findIndex((item) => {
return item.state == true;
});
if (i == -1) {
this.buttonList[0].state = true;
}
this.pagination.page = 1;
this.getData();
},
......@@ -179,11 +185,7 @@ export default {
}
}
});
if (arr.length == 0) {
service = 1;
app = 1;
resource = 1;
}
// console.log(service, app, resource);
let params = {
select: this.search,
page: this.pagination.page,
......
......@@ -564,7 +564,7 @@
</div>
</el-tab-pane>
</el-tabs>
<div class="btn_footer">
<div class="btn_footer" v-if="!(activeName == 1 && !formShow)">
<el-button class="submit" @click="submitApp">提交申请</el-button>
</div>
</block-radius>
......@@ -1108,6 +1108,8 @@ export default {
this.dataDiskList.forEach((item, index) => {
item.name = `磁盘${index + 1}`;
});
this.form.link_man = paramsOld.apply_connect_username;
this.form.phone = paramsOld.apply_connect_mobile;
this.formShow = true;
} else {
this.formShow = false;
......
......@@ -199,7 +199,7 @@ export default {
});
this.loop = 0;
datas.nodeList.forEach((item) => {
this.checkClosedLoop(datas.linkList, item.id, end_id);
this.checkClosedLoop(datas.linkList, item.id, item.id, end_id);
});
datas.linkList.forEach((item) => {
if (start_id == item.endId) {
......@@ -235,28 +235,33 @@ export default {
return false;
} else if (this.loop != 0) {
this.$message({
message: "存在闭环",
message: "不能连接本节点之前的节点",
type: "warning",
});
} else {
return datas;
}
},
checkClosedLoop(arr, id, endding_id) {
// let self = this;
// arr.forEach((item) => {
// if (item.startId == id) {
// if (item.endId == endding_id) {
// return false;
// } else if (item.endId == id) {
// self.loop++;
// } else {
// this.checkClosedLoop(arr, item.endId, endding_id);
// }
// } else {
// return false;
// }
// });
checkClosedLoop(arr, now_id, id, endding_id) {
let self = this;
if (self.loop == 0) {
arr.forEach((item) => {
if (item.startId == now_id) {
if (item.endId == endding_id) {
return false;
} else if (item.endId == id) {
console.log("has loop");
self.loop++;
} else {
this.checkClosedLoop(arr, item.endId, id, endding_id);
}
} else {
return false;
}
});
} else {
return false;
}
},
backToList() {
this.$router.push("/progress/designer");
......
......@@ -184,7 +184,7 @@ export default {
});
this.loop = 0;
datas.nodeList.forEach((item) => {
this.checkClosedLoop(datas.linkList, item.id, end_id);
this.checkClosedLoop(datas.linkList, item.id, item.id, end_id);
});
datas.linkList.forEach((item) => {
if (start_id == item.endId) {
......@@ -220,28 +220,33 @@ export default {
return false;
} else if (this.loop != 0) {
this.$message({
message: "存在闭环",
message: "不能连接本节点之前的节点",
type: "warning",
});
} else {
return datas;
}
},
checkClosedLoop(arr, id, endding_id) {
// let self = this;
// arr.forEach((item) => {
// if (item.startId == id) {
// if (item.endId == endding_id) {
// return false;
// } else if (item.endId == id) {
// self.loop++;
// } else {
// this.checkClosedLoop(arr, item.endId, endding_id);
// }
// } else {
// return false;
// }
// });
checkClosedLoop(arr, now_id, id, endding_id) {
let self = this;
if (self.loop == 0) {
arr.forEach((item) => {
if (item.startId == now_id) {
if (item.endId == endding_id) {
return false;
} else if (item.endId == id) {
console.log("has loop");
self.loop++;
} else {
this.checkClosedLoop(arr, item.endId, id, endding_id);
}
} else {
return false;
}
});
} else {
return false;
}
},
backToList() {
this.$router.push("/progress/designer");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment