zhouwenxuan
2024-02-27 eb5d50f5ce1ddc9c32ca54276952e68d0f132e0e
src/views/safetyReview/projectManage/components/rateConclusion.vue
@@ -23,18 +23,20 @@
      <el-row :gutter="30">
        <el-col :span="18">
          <el-form-item>
            <el-upload accept="image/*,.pdf,.doc,.docx,.xlsx,.xls"
                       :action="state.uploadUrl"
                       :disabled="state.disabled"
                       :headers="state.header"
                       method="post"
                       :on-success="handleAvatarSuccess"
                       :on-exceed="showTip"
                       v-model:file-list="state.fileList"
                       :on-remove="handleRemove"
                       :data="state.uploadData"
                       :on-preview="handlePreview"
                       :limit='1'
            <el-upload
                v-if="state.formData.isReviseManual === 1"
                accept="image/*,.pdf,.doc,.docx,.xlsx,.xls"
                 :action="state.uploadUrl"
                 :disabled="state.disabled"
                 :headers="state.header"
                 method="post"
                 :on-success="handleAvatarSuccess"
                 :on-exceed="showTip"
                 v-model:file-list="state.fileList"
                 :on-remove="handleRemove"
                 :data="state.uploadData"
                 :on-preview="handlePreview"
                 :limit='1'
            >
              <el-button type="primary">附件上传</el-button>
              <template #tip>
@@ -175,17 +177,18 @@
const handleAvatarSuccess = (res) => {
  if(res.code === 200){
    getProcessFiles()
    console.log("if",state.fileList)
    // ElMessage({
    //   type: 'success',
    //   message: '文件上传成功'
    // })
    ElMessage({
      type: 'success',
      message: '文件上传成功'
    })
  }else {
    state.fileList.splice(state.fileList.indexOf(uploadFile),1)
    ElMessage({
      type: 'warning',
      message: '文件上传失败'
      message: res.message
    })
  }
}
const handlePreview = (file) => {
  let path = "";