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

应用构建优化

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