wangting
2024-09-06 38f3a931edad42c5712c710a77f922259dfc64dd
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/upload-file.vue
@@ -2,7 +2,6 @@
  <el-dialog
    v-dialogDrag
    :close-on-click-modal="false"
    :destroy-on-close="true"
    :title="title"
    :visible.sync="visible"
    width="40%"
@@ -23,6 +22,7 @@
    </ul>
    <Divider left="30px" text="选择文件后会自动上传"></Divider>
    <el-upload
      :name="fileName"
      :action="fileUrl"
      :before-upload="beforeUpload"
      :data="fileData"
@@ -52,6 +52,10 @@
    fileType: {
      type: Array,
      default: () => []
    },
    fileName: {
      type: String,
      default: () => "file"
    },
    // 对话框头部名称
    title: {
@@ -121,11 +125,10 @@
    },
    // 文件上传成功
    onSuccess(resbonse) {
      console.log(resbonse);
      if (resbonse.code === 200) {
        this.$message.success("导入成功!");
        this.visible = false;
        this.$emit('updata');
        this.$emit('updata',resbonse);
      } else {
        this.$message.error(resbonse.msg);
      }