Commit 3e7873b3 authored by 徐一鸣's avatar 徐一鸣

应用管理列表联调

parent 6708a3a1
...@@ -415,7 +415,11 @@ export default { ...@@ -415,7 +415,11 @@ export default {
: _self.soldOutItem(item); : _self.soldOutItem(item);
}, },
disabledRule(item) { disabledRule(item) {
return item.online_state == 2; return (
item.online_state == 2 ||
item.up_deploy_status == 0 ||
item.up_deploy_status == 2
);
}, },
}, },
], ],
...@@ -428,13 +432,13 @@ export default { ...@@ -428,13 +432,13 @@ export default {
this.listHeader = [ this.listHeader = [
{ {
label: "应用名称", label: "应用名称",
prop: "app_name", prop: "deploy_name",
type: "button", type: "button",
callback: this.detailItem, callback: this.detailItem,
}, },
{ {
label: "应用版本", label: "应用版本",
prop: "version", prop: "app_version",
align: "center", align: "center",
}, },
{ {
...@@ -444,22 +448,22 @@ export default { ...@@ -444,22 +448,22 @@ export default {
}, },
{ {
label: "业务领域", label: "业务领域",
prop: "ywly_name", prop: "business_area_name",
align: "center", align: "center",
}, },
{ {
label: "上架区域", label: "上架区域",
prop: "address", prop: "upload_area",
align: "center", align: "center",
}, },
{ {
label: "部署时间", label: "部署时间",
prop: "address", prop: "created",
align: "center", align: "center",
}, },
{ {
label: "部署区域", label: "部署区域",
prop: "address", prop: "namespace",
align: "center", align: "center",
}, },
]; ];
...@@ -471,8 +475,6 @@ export default { ...@@ -471,8 +475,6 @@ export default {
{ {
label: "应用名称", label: "应用名称",
prop: "app_name", prop: "app_name",
type: "button",
callback: this.detailItem,
}, },
{ {
label: "应用版本", label: "应用版本",
...@@ -501,7 +503,7 @@ export default { ...@@ -501,7 +503,7 @@ export default {
}, },
{ {
label: "审批时间", label: "审批时间",
prop: "apply_date", prop: "time",
align: "center", align: "center",
}, },
{ {
...@@ -517,11 +519,17 @@ export default { ...@@ -517,11 +519,17 @@ export default {
actionList: [ actionList: [
{ {
label: "审批", label: "审批",
callback: this.approvalItem, disabledRule(item) {
return item.apply_status === "已审批";
},
callback: this.detailItem,
}, },
{ {
label: "删除", label: "删除",
class: "warn", class: "warn",
disabledRule(item) {
return item.apply_status === "待审批";
},
callback: this.deleteItem, callback: this.deleteItem,
}, },
], ],
...@@ -598,7 +606,7 @@ export default { ...@@ -598,7 +606,7 @@ export default {
}, },
{ {
label: "应用版本", label: "应用版本",
prop: "version", prop: "app_version",
align: "center", align: "center",
}, },
{ {
...@@ -608,12 +616,12 @@ export default { ...@@ -608,12 +616,12 @@ export default {
}, },
{ {
label: "业务领域", label: "业务领域",
prop: "ywly_name", prop: "business_area_name",
align: "center", align: "center",
}, },
{ {
label: "上架区域", label: "上架区域",
prop: "address", prop: "upload_area",
align: "center", align: "center",
}, },
{ {
...@@ -623,12 +631,12 @@ export default { ...@@ -623,12 +631,12 @@ export default {
}, },
{ {
label: "部署时间", label: "部署时间",
prop: "address", prop: "created",
align: "center", align: "center",
}, },
{ {
label: "部署区域", label: "部署区域",
prop: "address", prop: "namespace",
align: "center", align: "center",
}, },
]; ];
...@@ -640,8 +648,6 @@ export default { ...@@ -640,8 +648,6 @@ export default {
{ {
label: "应用名称", label: "应用名称",
prop: "app_name", prop: "app_name",
type: "button",
callback: this.detailItem,
}, },
{ {
label: "应用版本", label: "应用版本",
...@@ -670,7 +676,7 @@ export default { ...@@ -670,7 +676,7 @@ export default {
}, },
{ {
label: "审批时间", label: "审批时间",
prop: "apply_date", prop: "time",
align: "center", align: "center",
}, },
{ {
...@@ -686,11 +692,17 @@ export default { ...@@ -686,11 +692,17 @@ export default {
actionList: [ actionList: [
{ {
label: "审批", label: "审批",
callback: this.approvalItem, disabledRule(item) {
return item.apply_status === "已审批";
},
callback: this.detailItem,
}, },
{ {
label: "删除", label: "删除",
class: "warn", class: "warn",
disabledRule(item) {
return item.apply_status === "待审批";
},
callback: this.deleteItem, callback: this.deleteItem,
}, },
], ],
...@@ -933,7 +945,7 @@ export default { ...@@ -933,7 +945,7 @@ export default {
this.$refs.dialog.show(); this.$refs.dialog.show();
}, },
deploymentAction(item) { deploymentAction(item) {
console.log("deployment " + item.app_name); // console.log("deployment " + item.app_name);
console.log("一键部署功能设计中···"); console.log("一键部署功能设计中···");
}, // TODO: 一键部署功能设计中 }, // TODO: 一键部署功能设计中
changePageSize(value) { changePageSize(value) {
...@@ -943,12 +955,10 @@ export default { ...@@ -943,12 +955,10 @@ export default {
changeCurrentPage(value) { changeCurrentPage(value) {
this.currentPage = value; this.currentPage = value;
}, },
approvalItem(item) {
console.log("approval --- " + item.id);
},
deleteItem(item) { deleteItem(item) {
console.log("delete --- " + item.id); // console.log("delete --- " + item.id);
}, console.log("删除审批记录功能设计中");
}, // TODO: 删除审批记录功能设计中
detailItem(item) { detailItem(item) {
this.$router.push( this.$router.push(
`${this.detailsUrl + (this.type === 1 ? item.deploy_id : item.app_id)}` `${this.detailsUrl + (this.type === 1 ? item.deploy_id : item.app_id)}`
...@@ -958,31 +968,28 @@ export default { ...@@ -958,31 +968,28 @@ export default {
this.dialogInfo.title = "提示"; this.dialogInfo.title = "提示";
this.dialogInfo.msg = "确认上架此服务吗?"; this.dialogInfo.msg = "确认上架此服务吗?";
this.dialogInfo.submit = () => { this.dialogInfo.submit = () => {
console.log(`上架${item.app_name}`); this.$http
/* this.$http .put(`/apaas/hubApi/market/deployStatus/${item.app_id}/2`)
.post(`/apaas/service/v3/service/manager/up`, {
id: item.id,
})
.then(({ data }) => { .then(({ data }) => {
if (data.success) { if (data.success) {
this.$message({ this.$message({
message: data.errMsg, message: `上架${item.app_name}成功.`,
type: "success", type: "success",
}); });
this.init(this.tempFliter); this.initDatas(this.tempFliter);
} else { } else {
this.$message({ this.$message({
message: data.errMsg, message: `上架${item.app_name}失败.`,
type: "warning", type: "warning",
}); });
} }
}) })
.catch((error) => { .catch((error) => {
this.$message({ this.$message({
message: `上架${item.name}失败.`, message: `上架${item.app_name}失败.`,
type: "warning", type: "warning",
}); });
}); */ });
}; };
this.showDialog(); this.showDialog();
}, },
...@@ -990,31 +997,28 @@ export default { ...@@ -990,31 +997,28 @@ export default {
this.dialogInfo.title = "提示"; this.dialogInfo.title = "提示";
this.dialogInfo.msg = "确认下架此服务吗?"; this.dialogInfo.msg = "确认下架此服务吗?";
this.dialogInfo.submit = () => { this.dialogInfo.submit = () => {
console.log(`下架${item.app_name}`); this.$http
/* this.$http .put(`/apaas/hubApi/market/deployStatus/${item.app_id}/4`)
.post(`/apaas/service/v3/service/manager/up`, {
id: item.id,
})
.then(({ data }) => { .then(({ data }) => {
if (data.success) { if (data.success) {
this.$message({ this.$message({
message: data.errMsg, message: `下架${item.app_name}成功.`,
type: "success", type: "success",
}); });
this.init(this.tempFliter); this.initDatas(this.tempFliter);
} else { } else {
this.$message({ this.$message({
message: data.errMsg, message: `下架${item.app_name}失败.`,
type: "warning", type: "warning",
}); });
} }
}) })
.catch((error) => { .catch((error) => {
this.$message({ this.$message({
message: `下架${item.name}失败.`, message: `下架${item.app_name}失败.`,
type: "warning", type: "warning",
}); });
}); */ });
}; };
this.showDialog(); this.showDialog();
}, },
......
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