Commit 752c769b authored by 徐一鸣's avatar 徐一鸣

应用构建fixed

parent 73cc6d5b
<template>
<div class="image_detail">
<apass-dialog ref="listdialog" :title="title" width="1200px">
<apass-dialog ref="listdialog" :title="title" width="1400px">
<template slot="content">
<div class="apass_table">
<el-table :data="imageData">
<el-table-column width="20"></el-table-column>
<el-table-column label="版本号" width="120" align="left">
<el-table-column label="版本号" align="left">
<template slot-scope="scope">
{{ scope.row.name }}
</template>
......@@ -15,7 +15,7 @@
{{ scope.row.author }}
</template>
</el-table-column>
<el-table-column label="镜像地址" align="left">
<el-table-column label="镜像地址" width="400" align="left">
<template slot-scope="scope">
{{ scope.row.image_url }}
</template>
......@@ -30,7 +30,7 @@
{{ getSize(scope.row.size) }}
</template>
</el-table-column>
<el-table-column label="漏洞" align="center">
<el-table-column label="漏洞" width="100" align="center">
<template slot-scope="scope">
<image-bugs
v-if="scope.row.scan_overview"
......
......@@ -397,39 +397,47 @@ export default {
}
},
imageUploadChange(file) {
if (file.raw.type !== "application/x-tar") {
/* if (file.raw.type !== "application/x-tar") {
this.$message.error("镜像文件只能是 TAR 格式!");
this.image_info.file = "";
this.$refs.step1_upload.clearFiles();
} else { */
this.image_info.file = file;
this.$refs.step1_upload_item.clearValidate();
// }
},
imageUploadSuccess(response) {
if (response.success == 1) {
this.$message({
message: `上传镜像成功`,
type: "success",
});
this.image_info.image_name = "";
this.image_info.tag = "";
this.image_info.file = "";
this.$refs.step1_upload.clearFiles();
this.step1UplaodLoading = false;
this.image_datas = [];
this.image_page = 1;
this.initImageList();
} else {
this.image_info.file = file;
this.$refs.step1_upload_item.clearValidate();
this.$message({
message: response.errMsg || `上传镜像失败`,
type: "warning",
});
this.step1UplaodLoading = false;
}
},
imageUploadSuccess(response) {
imageUploadError() {
this.$message({
message: `上传镜像成功`,
type: "success",
message: `上传镜像失败`,
type: "warning",
});
this.image_info.image_name = "";
this.image_info.tag = "";
this.image_info.file = "";
this.$refs.step1_upload.clearFiles();
this.step1UplaodLoading = false;
this.image_datas = [];
this.image_page = 1;
this.initImageList();
},
imageUploadRemove() {
this.image_info.file = "";
},
imageUploadError(response) {
this.$message({
message: `上传失败`,
type: "warning",
});
this.step1UplaodLoading = false;
},
submitImage(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
......@@ -540,18 +548,27 @@ export default {
this.deploy_info.file = "";
},
deployUploadSuccess(response) {
this.$message({
message: `提交成功`,
type: "success",
});
this.submitLoading = false;
this.$router.push("/yygl/2/0");
if (response.success == 1) {
this.$message({
message: `提交成功`,
type: "success",
});
this.submitLoading = false;
this.$router.push("/yygl/2/0");
} else {
this.$message({
message: response.errMsg || `提交失败`,
type: "warning",
});
this.submitLoading = false;
}
},
deployUploadError() {
this.$message({
message: `提交失败`,
type: "warning",
});
this.submitLoading = false;
},
sunbmitAction(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