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

应用构建优化

parent 5324c947
......@@ -205,7 +205,7 @@
fit="fill"
:list="logo"
@getNewList="getNewList"
:directory="hub"
directory="hub"
></upload-file>
</el-form-item>
<el-form-item label="所属组织:" prop="org">
......@@ -260,6 +260,13 @@
</div>
</app-build-step>
</app-build-steps>
<apass-dialog
ref="dialog"
:title="dialogInfo.title"
:msg="dialogInfo.msg"
:submit="dialogInfo.submit"
></apass-dialog>
</div>
</template>
......@@ -268,6 +275,7 @@ import appBuildSteps from "@/components/app-build-steps/app-build-steps";
import appBuildStep from "@/components/app-build-steps/app-build-step";
import apassTable from "@/components/apass-table";
import uploadFile from "@/components/upload_file";
import apassDialog from "@/components/apass-dialog";
export default {
components: {
......@@ -275,6 +283,7 @@ export default {
appBuildStep,
apassTable,
uploadFile,
apassDialog,
},
data: () => ({
step: 0,
......@@ -337,6 +346,11 @@ export default {
orgs: [],
logo: [],
submitLoading: false,
dialogInfo: {
title: "",
msg: "",
submit: null,
},
}),
methods: {
preStep() {
......@@ -417,17 +431,36 @@ export default {
});
},
deleteItem(item) {
this.dialogInfo.title = "";
this.dialogInfo.msg = "是否删除该镜像?";
this.dialogInfo.submit = () => {
this.$http
.delete(`/apaas/hubApi/image/del/${item.name}`)
.then((response) => {
// console.log("已删除" + item.name);
if (response.data.success == 1) {
this.$message({
message: `删除成功`,
type: "success",
});
this.image_datas = [];
this.image_page = 1;
this.initImageList();
} else {
this.$message({
message: `删除失败`,
type: "warning",
});
}
})
.catch((error) => {
console.log(error);
this.$message({
message: `删除失败`,
type: "warning",
});
});
};
this.$refs.dialog.show();
},
goToStep2(formName) {
this.$refs[formName].validate((valid) => {
......
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