浏览代码

添加-上传文件提示

lfz 1 年之前
父节点
当前提交
1e043595ae
共有 1 个文件被更改,包括 40 次插入39 次删除
  1. 40 39
      src/views/GATHER/importFile.vue

+ 40 - 39
src/views/GATHER/importFile.vue

@@ -1,13 +1,14 @@
 <template>
+  <div>
+    <template>
+      <div class="tips-text">
+        <span class="tit">提示</span>
+        <p>1.请检查保税区名称是否一致或者统一!</p>
+        <p>2.上传前,请先检查excel文件内容的严谨性!</p>
+      </div>
+    </template>
     <div class="cmain" style="display: flex;justify-content: center;align-items: center;">
-      <el-upload
-        class="upload-demo"
-        drag
-        action="#"
-        :http-request="AvatarUpload"
-        multiple
-        :auto-upload="true"
-      >
+      <el-upload class="upload-demo" drag action="#" :http-request="AvatarUpload" multiple :auto-upload="true">
         <i class="el-icon-upload"></i>
         <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
       </el-upload>
@@ -15,43 +16,43 @@
         <el-button @click="$layer.close(layerid)">取 消</el-button>
       </div>
     </div>
-  </template>
+  </div>
+</template>
   
-  <script>
-  import { importUpload } from "@/api/portal/GARDENTRADEDATA/GARDENTRADEDATA.js";
-  export default {
-    data() {
-      return {};
+<script>
+import { importUpload } from "@/api/portal/GARDENTRADEDATA/GARDENTRADEDATA.js";
+export default {
+  data() {
+    return {};
+  },
+  props: {
+    layerid: {
+      type: String
     },
-    props:{
-      layerid: {
-        type: String
-      },
-      param: {
+    param: {
       type: Object,
       default: () => {
         return {};
       },
     },
+  },
+  methods: {
+    AvatarUpload(file) {
+      let formData = new FormData()
+      formData.append('file', file.file)
+      Object.keys(this.param).forEach(item => {
+        formData.append(item, this.param[item])
+      });
+      importUpload(formData).then(res => {
+        if (res.code == 200) {
+          this.$modal.msgSuccess(res.msg);
+          this.$parent.getList();
+          this.$layer.close(this.layerid);
+        }
+      })
     },
-    methods: {
-      AvatarUpload(file) {
-          let formData = new FormData()
-          formData.append('file',file.file)
-          Object.keys(this.param).forEach(item => {
-            formData.append(item, this.param[item])
-          });
-          importUpload(formData).then(res=>{
-              if(res.code == 200){
-                this.$modal.msgSuccess(res.msg);
-                this.$parent.getList();
-                this.$layer.close(this.layerid);
-              }
-          })
-      },
-    },
-  };
-  </script>
+  },
+};
+</script>
   
-  <style>
-  </style>
+<style></style>