diff --git a/src/components/image-detail.vue b/src/components/image-detail.vue
index 33eca3458be7b84db1f5af34c9595fa491b43ae7..1dd4c6960bb4c72f821a2f8396d21153a0a6c143 100644
--- a/src/components/image-detail.vue
+++ b/src/components/image-detail.vue
@@ -127,6 +127,7 @@ export default {
type: "success",
});
this.getImageDetail();
+ this.$emit("refresh");
} else {
this.$message({
message: `删除失败`,
diff --git a/src/pages/workbench/app_build.vue b/src/pages/workbench/app_build.vue
index 70c0ecd48206c8e626f5f4403e8f283a5d7daae9..232b5d1f1cf6098efd778ca0d7cbca3c89507e7d 100644
--- a/src/pages/workbench/app_build.vue
+++ b/src/pages/workbench/app_build.vue
@@ -268,7 +268,10 @@
完成
-
+
@@ -451,7 +454,6 @@ export default {
message: `提交成功`,
type: "success",
});
- this.step2Loading = false;
this.step = 2;
this.app_id = response.data;
@@ -463,8 +465,9 @@ export default {
message: response.errMsg || `提交失败`,
type: "warning",
});
- this.step2Loading = false;
}
+
+ this.step2Loading = false;
},
deployUploadError() {
this.$message({
@@ -530,19 +533,17 @@ export default {
});
this.image_info.image_name = "";
this.image_info.tag = "";
- this.image_info.file = "";
- this.$refs.step1_upload.clearFiles();
- this.addImageLoading = false;
- this.image_datas = [];
- this.image_page = 1;
- this.initImageList();
+ this.refreshImageList();
} else {
this.$message({
message: response.errMsg || `上传镜像失败`,
type: "warning",
});
- this.addImageLoading = false;
}
+
+ this.image_info.file = "";
+ this.$refs.step1_upload.clearFiles();
+ this.addImageLoading = false;
},
imageUploadError() {
this.$message({
@@ -569,16 +570,14 @@ export default {
this.dialogInfo.msg = "是否删除该镜像?";
this.dialogInfo.submit = () => {
this.$http
- .delete(`/apaas/hubApi/image/del/${item.name}`)
+ .delete(`/apaas/hubApi/image/del/${item.name}?app_id=${this.app_id}`)
.then((response) => {
if (response.data.success == 1) {
this.$message({
message: `删除成功`,
type: "success",
});
- this.image_datas = [];
- this.image_page = 1;
- this.initImageList();
+ this.refreshImageList();
} else {
this.$message({
message: `删除失败`,
@@ -599,7 +598,7 @@ export default {
showImageDetail(item) {
this.$refs.imageDetail.showDialog({
...item,
- app_id: this.app_id
+ app_id: this.app_id,
});
},
stepsDone() {
@@ -607,13 +606,16 @@ export default {
},
deployAction() {
// 跳转至应用详情进行部署操作
- this.$router.push(
- `/yygl/0/0/detail/${this.app_id}`
- );
+ this.$router.push(`/yygl/0/0/detail/${this.app_id}`);
},
backToList() {
this.$router.push(`/yygl/0/0`);
},
+ refreshImageList() {
+ this.image_datas = [];
+ this.image_page = 1;
+ this.initImageList();
+ },
},
mounted() {
this.getYwlys();
diff --git a/src/pages/workbench/yygl/app_detail.vue b/src/pages/workbench/yygl/app_detail.vue
index a3160637d462f8d21494ff333738c22275526b08..8e7f0dabda6f126f460f7310286dd452829e132f 100644
--- a/src/pages/workbench/yygl/app_detail.vue
+++ b/src/pages/workbench/yygl/app_detail.vue
@@ -57,11 +57,10 @@
:data="image_arr"
:padding-left="60"
>
- 加载中...
-
+
+ 加载中...
+
+
没有更多了
@@ -198,7 +197,7 @@
ref="myConfirm"
:confirmOptions="tipsOptions"
>
-
+
@@ -488,12 +487,11 @@ export default {
this.$message.error("上传失败");
},
load_data() {
- console.log(2222);
this.asynLoad = false;
if (5 * this.now_page < this.total) {
this.now_page = this.now_page + 1;
this.get_image_list();
- } else {
+ } else if (this.total > 0) {
this.image_noMore = true;
}
},
@@ -530,13 +528,11 @@ export default {
},
delete_data(name) {
this.$http
- .delete(`/apaas/hubApi/image/del/${name}`)
+ .delete(`/apaas/hubApi/image/del/${name}?app_id=${this.$route.params.id}`)
.then((response) => {
if (response.data.success == 1) {
this.$message.success("删除成功");
- this.now_page = 1;
- this.image_arr = [];
- this.get_image_list();
+ this.refreshImageList();
} else {
this.$message.error("删除失败");
}
@@ -786,6 +782,11 @@ export default {
})
.catch(function(response) {});
},
+ refreshImageList() {
+ this.now_page = 1;
+ this.image_arr = [];
+ this.get_image_list();
+ }
},
};