diff --git a/src/components/app-list/app-card.vue b/src/components/app-list/app-card.vue index 32fab12b8984ec665aa5c3daee70ba3bc642305d..09fcf286d8294b3d98e5f067cad50fa28991b56c 100644 --- a/src/components/app-list/app-card.vue +++ b/src/components/app-list/app-card.vue @@ -24,7 +24,10 @@ 上线时间: - +

diff --git a/src/pages/workbench/fwgl/fwglList.vue b/src/pages/workbench/fwgl/fwglList.vue index b0e2a4d25ee98042c75fdb98eb73490befd7d227..0a1edcdedf9d1be3338c7079500c3e15639b93f4 100644 --- a/src/pages/workbench/fwgl/fwglList.vue +++ b/src/pages/workbench/fwgl/fwglList.vue @@ -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", }, { diff --git a/src/pages/workbench/yygl/yyglList.vue b/src/pages/workbench/yygl/yyglList.vue index daad7dc23e8450ff5749fabf4806044d862c74d6..3a074a8b5393f2397099b75cc837923900aac0c0 100644 --- a/src/pages/workbench/yygl/yyglList.vue +++ b/src/pages/workbench/yygl/yyglList.vue @@ -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;