Commit e1c7cc5a authored by 徐一鸣's avatar 徐一鸣

应用仓库列表接口调试

parent 8cbbee8f
......@@ -24,7 +24,10 @@
<i class="el-icon-time"></i>
<span>上线时间:</span>
</span>
<span class="text_clip" v-text="data.created"></span>
<span
class="text_clip"
v-text="data.created && data.created.substring(0, 10)"
></span>
</p>
</div>
</template>
......
......@@ -111,13 +111,11 @@ export default {
{
label: "服务领域",
prop: "sectors_name",
type: "",
align: "center",
},
{
label: "开放程度",
prop: "openness_name",
type: "",
align: "center",
},
{
......@@ -127,13 +125,15 @@ export default {
{
label: "注册发布时间",
prop: "create_time",
type: "",
getText(item) {
let create_time = item.create_time || "";
return create_time.substring(0, 10);
},
align: "center",
},
{
label: "服务类型",
prop: "data_service_type1_name",
type: "",
align: "center",
},
{
......@@ -414,6 +414,10 @@ export default {
{
label: "注册发布时间",
prop: "create_time",
getText(item) {
let create_time = item.create_time || "";
return create_time.substring(0, 10);
},
align: "center",
},
{
......@@ -675,6 +679,10 @@ export default {
{
label: "注册发布时间",
prop: "create_time",
getText(item) {
let create_time = item.create_time || "";
return create_time.substring(0, 10);
},
align: "center",
},
{
......
......@@ -58,10 +58,11 @@ export default {
listData: [],
dialogInfo: {
title: "",
message: "",
btnCancelText: "",
btnSubmitText: "",
item: null,
msg: "",
submit: null,
cancelText: "",
sunbmitText: "",
submit: null,
},
otherFilter1: [],
otherFilter2: [],
......@@ -581,34 +582,92 @@ export default {
console.log(error);
});
},
deploymentAction(item) {
console.log("deployment " + item.name);
},
deleteAction(item) {
/* if (this.cardType === 0) {
this.dialogInfo.title = "删除提示";
this.dialogInfo.msg =
"您需要先进行应用商店下架申请,应用处于下架状态时才能进行删除操作。";
this.dialogInfo.btnCancelText = "";
this.dialogInfo.btnSubmitText = "";
this.dialogInfo.confirmSubmit = () => {
console.log("deleteItem - " + item.name);
this.$refs.myConfirm.hideModel();
};
if (this.cardType === 0) {
if (item.online_state == 0) {
this.dialogInfo.title = "";
this.dialogInfo.msg = "是否删除该条应用?";
this.dialogInfo.cancelText = "";
this.dialogInfo.sunbmitText = "";
this.dialogInfo.submit = () => {
this.$http
.delete(`/apaas/hubApi/market/del/${item.app_id}`)
.then(({ data }) => {
if (data.success) {
this.$message({
message: `删除${item.app_name}成功.`,
type: "success",
});
this.initDatas(this.tempFliter);
} else {
this.$message({
message: `删除${item.app_name}失败.`,
type: "warning",
});
}
})
.catch((error) => {
this.$message({
message: `删除${item.app_name}失败.`,
type: "warning",
});
});
};
} else {
this.dialogInfo.title = "删除提示";
this.dialogInfo.msg =
"您需要先进行应用商店下架申请,应用处于下架状态时才能进行删除操作。";
this.dialogInfo.cancelText = "";
this.dialogInfo.sunbmitText = "";
this.dialogInfo.submit = () => {
if (item.up_deploy_status === 3) {
this.$message({
message: `${item.app_name}正在申请下架中.`,
type: "warning",
});
} else {
this.$http
.put(`/apaas/hubApi/market/deployStatus/${item.app_id}/3`)
.then(({ data }) => {
if (data.success) {
this.$message({
message: `申请下架${item.app_name}成功.`,
type: "success",
});
this.initDatas(this.tempFliter);
} else {
this.$message({
message: `申请下架${item.app_name}失败.`,
type: "warning",
});
}
})
.catch((error) => {
this.$message({
message: `申请下架${item.app_name}失败.`,
type: "warning",
});
});
}
};
}
} else if (this.cardType === 1) {
this.dialogInfo.title = "是否删除部署的应用";
this.dialogInfo.msg =
"该操作会导致正在调用该应用的用户被迫终止对应用的调用,删除前需向正在调用该应用的用户发送通知,自通知发送之日起,2日后应用将被删除。";
this.dialogInfo.btnCancelText = "";
this.dialogInfo.btnSubmitText = "发送通知";
this.dialogInfo.confirmSubmit = () => {
console.log("deleteItem - " + item.name);
this.$refs.myConfirm.hideModel();
this.dialogInfo.cancelText = "";
this.dialogInfo.sunbmitText = "发送通知";
this.dialogInfo.submit = () => {
console.log("deleteItem - " + item.app_name);
};
}
this.$refs.myConfirm.showModel(); */
this.$refs.dialog.show();
},
deploymentAction(item) {
console.log("deployment " + item.app_name);
console.log("一键部署功能设计中···");
}, // TODO: 一键部署功能设计中
changePageSize(value) {
this.pageSize = value;
this.currentPage = 1;
......
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