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

应用管理列表联调

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