|  | @@ -9,12 +9,14 @@
 | 
											
												
													
														|  |        label-width="68px"
 |  |        label-width="68px"
 | 
											
												
													
														|  |      >
 |  |      >
 | 
											
												
													
														|  |        <el-form-item label="行政区">
 |  |        <el-form-item label="行政区">
 | 
											
												
													
														|  | -        <el-input
 |  | +        <!-- <el-col :span="4"> -->
 | 
											
												
													
														|  | -          v-model="queryParams.xzqdm"
 |  | +          <treeselect
 | 
											
												
													
														|  | -          placeholder="请输入名称"
 |  | +            v-model="form.xzqdm"
 | 
											
												
													
														|  | -          clearable
 |  | +            :options="deptOptions"
 | 
											
												
													
														|  | -          @keyup.enter.native="handleQuery"
 |  | +            :normalizer="normalizer"
 | 
											
												
											
												
											
												
											
												
											
												
											
												
													
														|  | 
 |  | +            placeholder="选择行政区"
 | 
											
												
													
														|  |          />
 |  |          />
 | 
											
												
													
														|  | 
 |  | +      <!-- </el-col> -->
 | 
											
												
													
														|  |        </el-form-item>
 |  |        </el-form-item>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        <el-form-item label="活动时间">
 |  |        <el-form-item label="活动时间">
 | 
											
										
											
												
													
														|  | @@ -62,7 +64,14 @@
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      <el-row :gutter="10" class="mb8">
 |  |      <el-row :gutter="10" class="mb8">
 | 
											
												
													
														|  |        <el-col :span="1.5">
 |  |        <el-col :span="1.5">
 | 
											
												
													
														|  | -        <el-button type="primary" plain icon="el-icon-upload" @click="fileUploadHandle" size="mini">上传</el-button>
 |  | +        <el-button
 | 
											
												
											
												
													
														|  | 
 |  | +          type="primary"
 | 
											
												
													
														|  | 
 |  | +          plain
 | 
											
												
													
														|  | 
 |  | +          icon="el-icon-upload"
 | 
											
												
													
														|  | 
 |  | +          @click="fileUploadHandle"
 | 
											
												
													
														|  | 
 |  | +          size="mini"
 | 
											
												
													
														|  | 
 |  | +          >上传</el-button
 | 
											
												
													
														|  | 
 |  | +        >
 | 
											
												
													
														|  |        </el-col>
 |  |        </el-col>
 | 
											
												
													
														|  |        <!-- <el-col :span="1.5">
 |  |        <!-- <el-col :span="1.5">
 | 
											
												
													
														|  |          <el-button
 |  |          <el-button
 | 
											
										
											
												
													
														|  | @@ -257,8 +266,9 @@
 | 
											
												
													
														|  |          :limit="1"
 |  |          :limit="1"
 | 
											
												
													
														|  |          accept=".zip"
 |  |          accept=".zip"
 | 
											
												
													
														|  |          :file-list="fileList"
 |  |          :file-list="fileList"
 | 
											
												
													
														|  | -        :show-file-list=true
 |  | +        :show-file-list="true"
 | 
											
												
													
														|  | -        multiple>
 |  | +        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>
 | 
											
										
											
												
													
														|  | @@ -276,8 +286,12 @@ import {
 | 
											
												
													
														|  |    updatePcsj,
 |  |    updatePcsj,
 | 
											
												
													
														|  |    tiffUpload,
 |  |    tiffUpload,
 | 
											
												
													
														|  |  } from "@/api/supervise/pcsj";
 |  |  } from "@/api/supervise/pcsj";
 | 
											
												
													
														|  | 
 |  | +import { listDept } from "@/api/system/dept";
 | 
											
												
													
														|  | 
 |  | +import Treeselect from "@riophae/vue-treeselect";
 | 
											
												
													
														|  | 
 |  | +import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 | 
											
												
													
														|  |  export default {
 |  |  export default {
 | 
											
												
													
														|  |    name: "Pcsj",
 |  |    name: "Pcsj",
 | 
											
												
													
														|  | 
 |  | +  components: { Treeselect },
 | 
											
												
													
														|  |    data() {
 |  |    data() {
 | 
											
												
													
														|  |      return {
 |  |      return {
 | 
											
												
													
														|  |        // 遮罩层
 |  |        // 遮罩层
 | 
											
										
											
												
													
														|  | @@ -294,14 +308,14 @@ export default {
 | 
											
												
													
														|  |        total: 0,
 |  |        total: 0,
 | 
											
												
													
														|  |        // 监管批次数据表格数据
 |  |        // 监管批次数据表格数据
 | 
											
												
													
														|  |        pcsjList: [
 |  |        pcsjList: [
 | 
											
												
													
														|  | -        {
 |  | +        // {
 | 
											
												
													
														|  | -          name: "", //文件名称
 |  | +        //   name: "", //文件名称
 | 
											
												
													
														|  | -          xzqdm: "", //区县名称
 |  | +        //   xzqdm: "", //区县名称
 | 
											
												
													
														|  | -          spotsnumber: "", //图斑个数
 |  | +        //   spotsnumber: "", //图斑个数
 | 
											
												
													
														|  | -          spotsarea: "", //监测面积(亩)
 |  | +        //   spotsarea: "", //监测面积(亩)
 | 
											
												
													
														|  | -          spotssize: "", //文件大小
 |  | +        //   spotssize: "", //文件大小
 | 
											
												
													
														|  | -          filetime: "", //录入时间
 |  | +        //   filetime: "", //录入时间
 | 
											
												
													
														|  | -        },
 |  | +        // },
 | 
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
											
												
													
														|  |        ],
 |  |        ],
 | 
											
												
													
														|  |        // 弹出层标题
 |  |        // 弹出层标题
 | 
											
												
													
														|  |        title: "",
 |  |        title: "",
 | 
											
										
											
												
													
														|  | @@ -337,50 +351,47 @@ export default {
 | 
											
												
													
														|  |        rules: {},
 |  |        rules: {},
 | 
											
												
													
														|  |        fileList: [],
 |  |        fileList: [],
 | 
											
												
													
														|  |        fileUploadDiv: false, //文件上传弹窗
 |  |        fileUploadDiv: false, //文件上传弹窗
 | 
											
												
													
														|  | -      loading2:null,
 |  | +      loading2: null,
 | 
											
												
											
												
													
														|  |        uploadFileUrl: process.env.VUE_APP_BASE_API + "/file/uploadSpotZip",
 |  |        uploadFileUrl: process.env.VUE_APP_BASE_API + "/file/uploadSpotZip",
 | 
											
												
													
														|  | 
 |  | +      // 部门树选项
 | 
											
												
													
														|  | 
 |  | +      deptOptions: [],
 | 
											
												
													
														|  |      };
 |  |      };
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    created() {
 |  |    created() {
 | 
											
												
													
														|  |      this.getList();
 |  |      this.getList();
 | 
											
												
													
														|  | 
 |  | +    this.getDept();
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    methods: {
 |  |    methods: {
 | 
											
												
													
														|  | 
 |  | +    getDept() {
 | 
											
												
													
														|  | 
 |  | +      // 查询参数
 | 
											
												
													
														|  | 
 |  | +      let queryParams = {
 | 
											
												
													
														|  | 
 |  | +        deptName: undefined,
 | 
											
												
													
														|  | 
 |  | +        status: undefined,
 | 
											
												
													
														|  | 
 |  | +      };
 | 
											
												
													
														|  | 
 |  | +      listDept(queryParams).then((res) => {
 | 
											
												
													
														|  | 
 |  | +        this.deptOptions = this.handleTree(res.data, "deptId");
 | 
											
												
													
														|  | 
 |  | +        //  this.normalizer(res.data)
 | 
											
												
													
														|  | 
 |  | +        console.log(this.deptOptions, "responseresponse");
 | 
											
												
													
														|  | 
 |  | +      });
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  | 
 |  | +    handleChange() {},
 | 
											
												
													
														|  | 
 |  | +    /** 转换部门数据结构 */
 | 
											
												
													
														|  | 
 |  | +    normalizer(node) {
 | 
											
												
													
														|  | 
 |  | +      if (node.children && !node.children.length) {
 | 
											
												
													
														|  | 
 |  | +        delete node.children;
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  | 
 |  | +      return {
 | 
											
												
													
														|  | 
 |  | +        id: node.deptId,
 | 
											
												
													
														|  | 
 |  | +        label: node.deptName,
 | 
											
												
													
														|  | 
 |  | +        children: node.children,
 | 
											
												
													
														|  | 
 |  | +      };
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  |      fileUploadHandle() {
 |  |      fileUploadHandle() {
 | 
											
												
													
														|  |        console.log(this.uploadFileUrl);
 |  |        console.log(this.uploadFileUrl);
 | 
											
												
													
														|  | -      this.uploadFileUrl= this.uploadFileUrl;
 |  | +      this.uploadFileUrl = this.uploadFileUrl;
 | 
											
												
													
														|  | -      this.fileList=[];
 |  | +      this.fileList = [];
 | 
											
												
											
												
											
												
													
														|  |        this.fileUploadDiv = true;
 |  |        this.fileUploadDiv = true;
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  | -    //上传文件
 |  | 
 | 
											
												
													
														|  | -    handleChange(file, fileList) {
 |  | 
 | 
											
												
													
														|  | -      console.log("handleChange ****")
 |  | 
 | 
											
												
													
														|  | -     
 |  | 
 | 
											
												
													
														|  | -      // if (fileList.length > 0) {
 |  | 
 | 
											
												
													
														|  | -      //   this.fileList = [fileList[fileList.length - 1]]; //这一步,是展示最后一次选择文件
 |  | 
 | 
											
												
													
														|  | -      //   this.reset();
 |  | 
 | 
											
												
													
														|  | -      // }
 |  | 
 | 
											
												
													
														|  | -      // console.log(file, "filefile");
 |  | 
 | 
											
												
													
														|  | -      // const formdata = new FormData();
 |  | 
 | 
											
												
													
														|  | -      // formdata.append("file", file.raw);
 |  | 
 | 
											
												
													
														|  | -      // // this.loading2 = true;
 |  | 
 | 
											
												
													
														|  | -      // this.loading2 = this.$loading({
 |  | 
 | 
											
												
													
														|  | -      //   lock: true,
 |  | 
 | 
											
												
													
														|  | -      //   text: "文件上传中",
 |  | 
 | 
											
												
													
														|  | -      //   spinner: "el-icon-loading",
 |  | 
 | 
											
												
													
														|  | -      //   background: "rgba(0, 0, 0, 0.7)",
 |  | 
 | 
											
												
													
														|  | -      // });
 |  | 
 | 
											
												
													
														|  | -      // /file/uploadSpotZip
 |  | 
 | 
											
												
													
														|  | -      // process.env.VUE_APP_BASE_API + "/file/uploadSpotZip"
 |  | 
 | 
											
												
													
														|  | -      // tiffUpload(formdata).then((res) => {
 |  | 
 | 
											
												
													
														|  | -      //   if (res.success) {
 |  | 
 | 
											
												
													
														|  | -      //     // this.loading2 = false;
 |  | 
 | 
											
												
													
														|  | -      //     this.loading2.close();
 |  | 
 | 
											
												
													
														|  | -      //     this.fileUpload = false;
 |  | 
 | 
											
												
													
														|  | -      //     this.getList();
 |  | 
 | 
											
												
													
														|  | -      //     this.$message.success(res.message);
 |  | 
 | 
											
												
													
														|  | -      //   }
 |  | 
 | 
											
												
													
														|  | -      // });
 |  | 
 | 
											
												
													
														|  | -    },
 |  | 
 | 
											
												
													
														|  |      handleBeforeUpload(file) {
 |  |      handleBeforeUpload(file) {
 | 
											
												
													
														|  |        this.$modal.loading("正在上传文件,请稍候...");
 |  |        this.$modal.loading("正在上传文件,请稍候...");
 | 
											
												
													
														|  |        return true;
 |  |        return true;
 | 
											
										
											
												
													
														|  | @@ -390,10 +401,10 @@ export default {
 | 
											
												
													
														|  |        this.$modal.msgError("上传文件失败,请重试");
 |  |        this.$modal.msgError("上传文件失败,请重试");
 | 
											
												
													
														|  |        this.$modal.closeLoading();
 |  |        this.$modal.closeLoading();
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  | -     // 上传成功回调
 |  | +    // 上传成功回调
 | 
											
												
													
														|  | -     handleUploadSuccess(res, file) {
 |  | +    handleUploadSuccess(res, file) {
 | 
											
												
													
														|  | -      console.log("handleUploadSuccess")
 |  | +      console.log("handleUploadSuccess");
 | 
											
												
													
														|  | -      this.fileList=[];
 |  | +      this.fileList = [];
 | 
											
												
											
												
											
												
											
												
											
												
													
														|  |        this.fileUploadDiv = false;
 |  |        this.fileUploadDiv = false;
 | 
											
												
													
														|  |        this.$modal.closeLoading();
 |  |        this.$modal.closeLoading();
 | 
											
												
													
														|  |        this.$modal.msgSuccess(res.message);
 |  |        this.$modal.msgSuccess(res.message);
 | 
											
										
											
												
													
														|  | @@ -523,3 +534,12 @@ export default {
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |  };
 |  |  };
 | 
											
												
													
														|  |  </script>
 |  |  </script>
 | 
											
												
													
														|  | 
 |  | +<style lang="scss" scoped>
 | 
											
												
													
														|  | 
 |  | +::v-deep .el-form-item--medium .el-form-item__label{
 | 
											
												
													
														|  | 
 |  | +  font-size: 11px;
 | 
											
												
													
														|  | 
 |  | +}
 | 
											
												
													
														|  | 
 |  | +::v-deep .vue-treeselect{
 | 
											
												
													
														|  | 
 |  | +  display: table-caption !important;
 | 
											
												
													
														|  | 
 |  | +  width: 200px;
 | 
											
												
													
														|  | 
 |  | +}
 | 
											
												
													
														|  | 
 |  | +</style>
 |