Commit 810e74ed authored by 徐一鸣's avatar 徐一鸣

Merge branch 'xym' into dev

parents 9c0920b5 61a36a55
...@@ -78,12 +78,16 @@ export default { ...@@ -78,12 +78,16 @@ export default {
detailsUrl() { detailsUrl() {
let url = ""; let url = "";
if (this.level == 0 && this.type == 0) { if (this.type == 0) {
url = `/yygl/${this.level}/${this.type}/detail/`; url = `/yygl/${this.level}/${this.type}/detail/`;
} else if (this.level == 0 && this.type == 1) { } else if (this.type == 1) {
url = `/yygl/${this.level}/${this.type}/approvaldetail/`; url = `/yygl/${this.level}/${this.type}/deploydetail/`;
} else { } else {
url = `/yygl/${this.level}/${this.type}/detail/`; if (this.level === 0) {
url = `/yygl/${this.level}/${this.type}/applydetail/`;
} else {
url = `/yygl/${this.level}/${this.type}/approvaldetail/`;
}
} }
return url; return url;
...@@ -568,15 +572,15 @@ export default { ...@@ -568,15 +572,15 @@ export default {
actionList: [ actionList: [
{ {
label: "编辑", label: "编辑",
callback: _self.editItem callback: _self.editItem,
}, },
{ {
label: "下线", label: "下线",
callback: _self.offLine callback: _self.offLine,
}, },
{ {
label: "删除", label: "删除",
callback: _self.deleteItem callback: _self.deleteItem,
}, },
], ],
}, },
...@@ -818,6 +822,9 @@ export default { ...@@ -818,6 +822,9 @@ export default {
console.log(error); console.log(error);
}); });
}, },
showDialog() {
this.$refs.dialog.show();
}, // 唤醒弹窗
deleteAction(item) { deleteAction(item) {
if (this.cardType === 0) { if (this.cardType === 0) {
if (item.online_state == 0) { if (item.online_state == 0) {
...@@ -943,13 +950,73 @@ export default { ...@@ -943,13 +950,73 @@ export default {
console.log("delete --- " + item.id); console.log("delete --- " + item.id);
}, },
detailItem(item) { detailItem(item) {
this.$router.push(`${this.detailsUrl + item.app_id}`); this.$router.push(
`${this.detailsUrl + (this.type === 1 ? item.deploy_id : item.app.id)}`
);
}, },
soldUpItem(item) { soldUpItem(item) {
console.log(`上架${item.app_name}`); this.dialogInfo.title = "提示";
this.dialogInfo.msg = "确认上架此服务吗?";
this.dialogInfo.submit = () => {
console.log(`上架${item.app_name}`);
/* this.$http
.post(`/apaas/service/v3/service/manager/up`, {
id: item.id,
})
.then(({ data }) => {
if (data.success) {
this.$message({
message: data.errMsg,
type: "success",
});
this.init(this.tempFliter);
} else {
this.$message({
message: data.errMsg,
type: "warning",
});
}
})
.catch((error) => {
this.$message({
message: `上架${item.name}失败.`,
type: "warning",
});
}); */
};
this.showDialog();
}, },
soldOutItem(item) { soldOutItem(item) {
console.log(`下架${item.app_name}`); this.dialogInfo.title = "提示";
this.dialogInfo.msg = "确认下架此服务吗?";
this.dialogInfo.submit = () => {
console.log(`下架${item.app_name}`);
/* this.$http
.post(`/apaas/service/v3/service/manager/up`, {
id: item.id,
})
.then(({ data }) => {
if (data.success) {
this.$message({
message: data.errMsg,
type: "success",
});
this.init(this.tempFliter);
} else {
this.$message({
message: data.errMsg,
type: "warning",
});
}
})
.catch((error) => {
this.$message({
message: `下架${item.name}失败.`,
type: "warning",
});
}); */
};
this.showDialog();
}, },
editItem(item) { editItem(item) {
this.$router.push(`/yygl/${this.level}/${this.type}/edit/${item.id}`); this.$router.push(`/yygl/${this.level}/${this.type}/edit/${item.id}`);
......
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