zouyu
2023-11-20 87bea556df452a4f44ddb4e56dd3bf6b676cce11
	modified:   src/views/product/workbench/operation-task-pane.vue
modified: src/views/quality/exception/exception.vue
已修改2个文件
20 ■■■■ 文件已修改
src/views/product/workbench/operation-task-pane.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/exception/exception.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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) => {
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