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

应用仓库列表接口调试

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