From 87bea556df452a4f44ddb4e56dd3bf6b676cce11 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 20 十一月 2023 14:51:59 +0800
Subject: [PATCH] modified: src/views/product/workbench/operation-task-pane.vue modified: src/views/quality/exception/exception.vue
---
src/views/product/workbench/operation-task-pane.vue | 2 +-
src/views/quality/exception/exception.vue | 18 +++++++++++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/src/views/product/workbench/operation-task-pane.vue b/src/views/product/workbench/operation-task-pane.vue
index 7484173..ad56dea 100644
--- a/src/views/product/workbench/operation-task-pane.vue
+++ b/src/views/product/workbench/operation-task-pane.vue
@@ -728,7 +728,7 @@
break
}
}
- console.log(this.operationTasks)
+ // console.log(this.operationTasks)
// 鑻ュ綋鍓嶅伐鍗曞湪宸ュ崟鍒楄〃鏈鎵惧埌涓斿綋鍓嶅伐鍗曠姸鎬佷负宸插畬鎴愭垨宸插彇娑堟椂锛屽垯灏嗗綋鍓嶅伐鍗曢噸缃负绌哄苟鎶涘嚭浜嬩欢锛屽惁鍒欎笉绠�
if (isResetCurrOpertionTaskFlag) {
getOperationTaskById(taskId).then((res) => {
diff --git a/src/views/quality/exception/exception.vue b/src/views/quality/exception/exception.vue
index 1179697..9f502eb 100644
--- a/src/views/quality/exception/exception.vue
+++ b/src/views/quality/exception/exception.vue
@@ -31,8 +31,8 @@
action="/mes/exception/upload"
:headers="headers"
:before-upload="submitUpload"
- :on-preview="handlePreview"
:on-remove="handleRemove"
+ :on-preview="handlePreview"
:on-success="uploadSuccess"
:data="paramData"
:file-list="fileList"
@@ -41,7 +41,7 @@
>
<el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
<div slot="tip" class="el-upload__tip">
- 鍙兘涓婁紶jpg鍥剧墖锛屼笖涓嶈秴杩�2MB
+ 鍙兘涓婁紶jpg/png鍥剧墖锛屼笖涓嶈秴杩�5MB
</div>
</el-upload>
</el-col>
@@ -320,10 +320,22 @@
})
}
},
- submitUpload() {
+ submitUpload(file) {
console.info(this.currentRow && this.currentRow.id)
+ console.log(file);
if (this.currentRow && this.currentRow.id) {
+ const maxSize = 5 * 1024 *1024
+ let jpgType = 'image/jpeg'
+ let pngType = 'image/png'
+ if(file.type != jpgType && file.type != pngType){
+ this.$message.error('鍙兘涓婁紶.jpg/.png绫诲瀷鐨勫浘鐗�')
+ return false
+ }
+ if(file.szie > maxSize){
+ this.$message.error('鍥剧墖澶у皬涓嶈兘瓒呰繃5MB')
+ }
this.paramData.exceptionId = this.currentRow.id
+
} else {
this.$message.error('璇峰厛閫夋嫨鐢熶骇寮傚父璁板綍')
return false
--
Gitblit v1.9.3