diff --git a/src/views/protection/protectionManage/index.vue b/src/views/protection/protectionManage/index.vue index e19e33f..255b37c 100644 --- a/src/views/protection/protectionManage/index.vue +++ b/src/views/protection/protectionManage/index.vue @@ -80,7 +80,7 @@ /> - +
-
将文件拖到此处,或点击上传
仅允许导入png、jpg、jpeg图片格式文件。
单个文件大小不超过10M
-
+
@@ -212,7 +212,7 @@ pageNum: 1, pageSize: 10, keyWord:null, - }, + }, // 表单参数 baseForm: { protectionId:"" @@ -227,7 +227,7 @@ bhdzList:[], kzzList:[], sbcsList:[], - + }; }, mounted(){ @@ -276,13 +276,13 @@ // 表单重置 reset() { this.baseForm = { - protectionId:"", - }; + protectionId:"", + }; }, /** 新增按钮操作 */ handleAdd() { this.reset(); - this.open = true; + this.open = true; this.fileList=[] this.checkUrlList=[] this.checkUrlNameList=[] @@ -297,7 +297,7 @@ this.checkUrlNameList=[] // this.fileList=[{url:this.baseForm.imgUrl}] // this.checkUrlList=[this.baseForm.imgUrl] - // this.checkUrlNameList=[this.baseForm.imgName] + // this.checkUrlNameList=[this.baseForm.imgName] }, //识别结果 handleView(row) { @@ -327,10 +327,15 @@ } editProdectionApi(params).then(response => { console.log("editProdectionApi",response); - this.getList(); - this.open = false; - this.$modal.msgSuccess("操作成功"); - return; + if(response.code==200){ + this.getList(); + this.open = false; + this.$modal.msgSuccess("操作成功"); + return; + }else{ + this.$modal.msgError(response.msg); + } + }); }, /** 删除按钮操作 */ @@ -392,9 +397,9 @@ }, // 上传之前 handleBeforeUpload(file) { - const isLt = file.size / 1024 / 1024 < 10 + const isLt = file.size / 1024 / 1024 < 20 if (!isLt) { - this.$modal.msgError(`图片大小不能超过 10 MB`) + this.$modal.msgError(`图片大小不能超过 20 MB`) return false } },