|  | @@ -62,29 +62,7 @@
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      <el-row :gutter="10" class="mb8">
 |  |      <el-row :gutter="10" class="mb8">
 | 
											
												
													
														|  |        <el-col :span="1.5">
 |  |        <el-col :span="1.5">
 | 
											
												
													
														|  | -        <el-button @click="upload">上传</el-button>
 |  | +        <el-button type="primary" plain icon="el-icon-upload" @click="fileUploadHandle" size="mini">上传</el-button>
 | 
											
												
													
														|  | -        <!-- <el-upload
 |  | 
 | 
											
												
													
														|  | -          class="upload-demo"
 |  | 
 | 
											
												
													
														|  | -          :on-change="handleChange"
 |  | 
 | 
											
												
													
														|  | -          :auto-upload="false"
 |  | 
 | 
											
												
													
														|  | -          :show-file-list="false"
 |  | 
 | 
											
												
													
														|  | -          :file-list="fileList"
 |  | 
 | 
											
												
													
														|  | -          :limit="1"
 |  | 
 | 
											
												
													
														|  | -          accept=".zip"
 |  | 
 | 
											
												
													
														|  | -        >
 |  | 
 | 
											
												
													
														|  | -          <el-button class="upload-btn" icon="Upload" size="mini"
 |  | 
 | 
											
												
													
														|  | -            >上传</el-button
 |  | 
 | 
											
												
													
														|  | -          >
 |  | 
 | 
											
												
													
														|  | -        </el-upload>
 |  | 
 | 
											
												
													
														|  | -        <el-tooltip
 |  | 
 | 
											
												
													
														|  | -          v-if="fileList.length > 0"
 |  | 
 | 
											
												
													
														|  | -          :content="fileList[0].name"
 |  | 
 | 
											
												
													
														|  | -          placement="bottom-start"
 |  | 
 | 
											
												
													
														|  | -        >
 |  | 
 | 
											
												
													
														|  | -          <span class="title-item" style="display: inline-block; width: 100%">{{
 |  | 
 | 
											
												
													
														|  | -            fileList[0].name
 |  | 
 | 
											
												
													
														|  | -          }}</span>
 |  | 
 | 
											
												
													
														|  | -        </el-tooltip> -->
 |  | 
 | 
											
												
											
												
													
														|  |        </el-col>
 |  |        </el-col>
 | 
											
												
													
														|  |        <!-- <el-col :span="1.5">
 |  |        <!-- <el-col :span="1.5">
 | 
											
												
													
														|  |          <el-button
 |  |          <el-button
 | 
											
										
											
												
													
														|  | @@ -265,31 +243,22 @@
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      <el-dialog
 |  |      <el-dialog
 | 
											
												
													
														|  |        title="文件上传"
 |  |        title="文件上传"
 | 
											
												
													
														|  | -      :visible.sync="fileUpload"
 |  | +      :visible.sync="fileUploadDiv"
 | 
											
												
											
												
													
														|  |        width="400px"
 |  |        width="400px"
 | 
											
												
													
														|  |        append-to-body
 |  |        append-to-body
 | 
											
												
													
														|  |      >
 |  |      >
 | 
											
												
													
														|  | -      <!-- <el-upload
 |  | 
 | 
											
												
													
														|  | -        class="upload-demo"
 |  | 
 | 
											
												
													
														|  | -        :on-change="handleChange"
 |  | 
 | 
											
												
													
														|  | -        :auto-upload="false"
 |  | 
 | 
											
												
													
														|  | -        :show-file-list="false"
 |  | 
 | 
											
												
													
														|  | -        :file-list="fileList"
 |  | 
 | 
											
												
													
														|  | -        :limit="1"
 |  | 
 | 
											
												
													
														|  | -        accept=".zip"
 |  | 
 | 
											
												
													
														|  | -      >
 |  | 
 | 
											
												
													
														|  | -        <el-button class="upload-btn" icon="Upload" size="mini">上传</el-button>
 |  | 
 | 
											
												
													
														|  | -      </el-upload> -->
 |  | 
 | 
											
												
													
														|  |        <el-upload
 |  |        <el-upload
 | 
											
												
													
														|  |          class="upload-demo"
 |  |          class="upload-demo"
 | 
											
												
													
														|  |          drag
 |  |          drag
 | 
											
												
													
														|  | -        :on-change="handleChange"
 |  | +        :action="uploadFileUrl"
 | 
											
												
													
														|  | -        :auto-upload="false"
 |  | +        :before-upload="handleBeforeUpload"
 | 
											
												
													
														|  | -        :show-file-list="false"
 |  | +        :on-error="handleUploadError"
 | 
											
												
													
														|  | -        :file-list="fileList"
 |  | +        :on-success="handleUploadSuccess"
 | 
											
												
											
												
											
												
											
												
											
												
													
														|  |          :limit="1"
 |  |          :limit="1"
 | 
											
												
													
														|  |          accept=".zip"
 |  |          accept=".zip"
 | 
											
												
													
														|  | -      >
 |  | +        :file-list="fileList"
 | 
											
												
											
												
													
														|  | 
 |  | +        :show-file-list=true
 | 
											
												
													
														|  | 
 |  | +        multiple>
 | 
											
												
													
														|  |          <i class="el-icon-upload"></i>
 |  |          <i class="el-icon-upload"></i>
 | 
											
												
													
														|  |          <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
 |  |          <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
 | 
											
												
													
														|  |          <div class="el-upload__tip" slot="tip">只能上传zip文件</div>
 |  |          <div class="el-upload__tip" slot="tip">只能上传zip文件</div>
 | 
											
										
											
												
													
														|  | @@ -367,44 +336,68 @@ export default {
 | 
											
												
													
														|  |        // 表单校验
 |  |        // 表单校验
 | 
											
												
													
														|  |        rules: {},
 |  |        rules: {},
 | 
											
												
													
														|  |        fileList: [],
 |  |        fileList: [],
 | 
											
												
													
														|  | -      fileUpload: false, //文件上传弹窗
 |  | +      fileUploadDiv: false, //文件上传弹窗
 | 
											
												
											
												
													
														|  |        loading2:null,
 |  |        loading2:null,
 | 
											
												
													
														|  | 
 |  | +      uploadFileUrl: process.env.VUE_APP_BASE_API + "/file/uploadSpotZip",
 | 
											
												
													
														|  |      };
 |  |      };
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    created() {
 |  |    created() {
 | 
											
												
													
														|  |      this.getList();
 |  |      this.getList();
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    methods: {
 |  |    methods: {
 | 
											
												
													
														|  | -    upload() {
 |  | +    fileUploadHandle() {
 | 
											
												
													
														|  | -      this.fileUpload = true;
 |  | +      console.log(this.uploadFileUrl);
 | 
											
												
											
												
											
												
													
														|  | 
 |  | +      this.uploadFileUrl= this.uploadFileUrl;
 | 
											
												
													
														|  | 
 |  | +      this.fileList=[];
 | 
											
												
													
														|  | 
 |  | +      this.fileUploadDiv = true;
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      //上传文件
 |  |      //上传文件
 | 
											
												
													
														|  |      handleChange(file, fileList) {
 |  |      handleChange(file, fileList) {
 | 
											
												
													
														|  | -      console.log(111111);
 |  | +      console.log("handleChange ****")
 | 
											
												
													
														|  | -      if (fileList.length > 0) {
 |  | +     
 | 
											
												
													
														|  | -        this.fileList = [fileList[fileList.length - 1]]; //这一步,是展示最后一次选择文件
 |  | +      // if (fileList.length > 0) {
 | 
											
												
													
														|  | -        this.reset();
 |  | +      //   this.fileList = [fileList[fileList.length - 1]]; //这一步,是展示最后一次选择文件
 | 
											
												
													
														|  | -      }
 |  | +      //   this.reset();
 | 
											
												
													
														|  | -      console.log(file, "filefile");
 |  | +      // }
 | 
											
												
													
														|  | -      const formdata = new FormData();
 |  | +      // console.log(file, "filefile");
 | 
											
												
													
														|  | -      formdata.append("file", file.raw);
 |  | +      // const formdata = new FormData();
 | 
											
												
													
														|  | -      // this.loading2 = true;
 |  | +      // formdata.append("file", file.raw);
 | 
											
												
													
														|  | -      this.loading2 = this.$loading({
 |  | +      // // this.loading2 = true;
 | 
											
												
													
														|  | -        lock: true,
 |  | +      // this.loading2 = this.$loading({
 | 
											
												
													
														|  | -        text: "文件上传中",
 |  | +      //   lock: true,
 | 
											
												
													
														|  | -        spinner: "el-icon-loading",
 |  | +      //   text: "文件上传中",
 | 
											
												
													
														|  | -        background: "rgba(0, 0, 0, 0.7)",
 |  | +      //   spinner: "el-icon-loading",
 | 
											
												
													
														|  | -      });
 |  | +      //   background: "rgba(0, 0, 0, 0.7)",
 | 
											
												
													
														|  | -
 |  | +      // });
 | 
											
												
													
														|  | -      tiffUpload(formdata).then((res) => {
 |  | +      // /file/uploadSpotZip
 | 
											
												
													
														|  | -        if (res.success) {
 |  | +      // process.env.VUE_APP_BASE_API + "/file/uploadSpotZip"
 | 
											
												
													
														|  | -          // this.loading2 = false;
 |  | +      // tiffUpload(formdata).then((res) => {
 | 
											
												
													
														|  | -          this.loading2.close();
 |  | +      //   if (res.success) {
 | 
											
												
													
														|  | -          this.fileUpload = false;
 |  | +      //     // this.loading2 = false;
 | 
											
												
													
														|  | -          this.getList();
 |  | +      //     this.loading2.close();
 | 
											
												
													
														|  | -          this.$message.success(res.message);
 |  | +      //     this.fileUpload = false;
 | 
											
												
													
														|  | -        }
 |  | +      //     this.getList();
 | 
											
												
													
														|  | -      });
 |  | +      //     this.$message.success(res.message);
 | 
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
													
														|  | 
 |  | +      //   }
 | 
											
												
													
														|  | 
 |  | +      // });
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  | 
 |  | +    handleBeforeUpload(file) {
 | 
											
												
													
														|  | 
 |  | +      this.$modal.loading("正在上传文件,请稍候...");
 | 
											
												
													
														|  | 
 |  | +      return true;
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  | 
 |  | +    // 上传失败
 | 
											
												
													
														|  | 
 |  | +    handleUploadError(err) {
 | 
											
												
													
														|  | 
 |  | +      this.$modal.msgError("上传文件失败,请重试");
 | 
											
												
													
														|  | 
 |  | +      this.$modal.closeLoading();
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  | 
 |  | +     // 上传成功回调
 | 
											
												
													
														|  | 
 |  | +     handleUploadSuccess(res, file) {
 | 
											
												
													
														|  | 
 |  | +      console.log("handleUploadSuccess")
 | 
											
												
													
														|  | 
 |  | +      this.fileList=[];
 | 
											
												
													
														|  | 
 |  | +      this.fileUploadDiv = false;
 | 
											
												
													
														|  | 
 |  | +      this.$modal.closeLoading();
 | 
											
												
													
														|  | 
 |  | +      this.$modal.msgSuccess(res.message);
 | 
											
												
													
														|  | 
 |  | +      this.getList();
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      handleDownload(row) {
 |  |      handleDownload(row) {
 | 
											
												
													
														|  |        const zipfile = row.proxypath + ".zip";
 |  |        const zipfile = row.proxypath + ".zip";
 |