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

应用构建fixed

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