<template>
  <div class="titleBox">
    <div class="title">犯罪预测管理</div>
  </div>
  <div class="content">
    <!-- 附件： -->
    <!-- <el-button type="primary" @click="DownloadFn">下载</el-button> -->
    <el-upload class="avatar-uploader" :headers="headers" action="/mosty-api/mosty-yjzl/tbFzyc/importData"
      :show-file-list="false" :file-list="fileList" :on-success="handleAvatarSuccess"
      :before-upload="beforeAvatarUpload" list-type="picture-card">
      <img v-if="imageUrl" :src="imageUrl" class="avatar" />
      <el-icon v-else class="avatar-uploader-icon">
        <Plus />
      </el-icon>
    </el-upload>
  </div>
</template>
<script setup>
import { ref } from 'vue';
import Axios from 'axios';
import { download } from "@/utils/request";
import { qcckPost, qcckGet, qcckPut, qcckDelete } from "@/api/qcckApi.js";
let token = localStorage.getItem('token') // 要保证取到
const fileList = ref([]);
const headers = ref({ token })
const beforeAvatarUpload = (file) => {
}
const DownloadFn = () => {
  download(
    "/mosty-api/mosty-yjzl/tbFzyc/exportData",
    {},
    `犯罪预测网格导出.xlsx`,
  );
}
</script>
<style lang="scss" scoped>
.content {
  text-align: center;
  margin-top: 10%;
}

.el-button--primary {
  margin-top: 20px;
  display: block;
}
</style>