// 添加/修改授权
<template>
  <el-dialog
    title="下载开发文档"
    width="600px"
    :visible.sync="visible"
    :destroy-on-close="false"
    :close-on-click-modal="false"
  >
    <div class="flex item" v-for="(item, index) in docList" :key="index">
      <div>
        <el-button
          type="primary"
          @click="downloadDoc(item.path)"
          class="btn"
          size="small"
          >下载</el-button
        >
      </div>
      <div class="right">
        <div class="tit">{{ item.tit }}</div>
        <div>{{ item.smallTit }}</div>
      </div>
    </div>
  </el-dialog>
</template>

<script>
import { add } from "@/api/auth";
import { purchaserList } from "@/api/configuration";
import { typeList, authAdd } from "@/api/tripartiteApi";
export default {
  data() {
    return {
      visible: false,
      submitLoading: false,
      docList: [
        {
          tit: "自然人⻛险评分查询接口",
          smallTit: "允许查询用户是否有前科、吸毒、逃犯等违法犯罪记录",
          path: "/static/用户风险查询接口.pdf",
        },
        {
          tit: "流动人口自主申报",
          smallTit: "可以通过该接口上报流动人口的信息至公安",
          path: "/static/流动人口自主申报.pdf",
        },
        {
          tit: "公安网用户信息查询",
          smallTit: "可以通过身份证号补全该用户的姓名、照片等信息",
          path: "/static/公安网用户信息查询.pdf",
        },
      ],
    };
  },
  created() {
    // this.purchaserList();
  },
  methods: {
    open(obj) {
      this.visible = true;
      this.submitLoading = false;
    },
    // purchaserList() {
    //   purchaserList().then((res) => {
    //     this.docList = res.data;
    //   });
    // },

    downloadDoc(e) {
      window.location.href =
        process.env.VUE_APP_BASE_API + e;
    },
  },
};
</script>

<style scoped>
.flex {
  display: flex;
  justify-content: left;
}
.item {
  margin-bottom: 18px;
}
.right {
  margin-left: 15px;
  color: #909399;
  font-size: 14px;
  line-height: 30px;
}
.tit {
  font-weight: 500;
  color: #333333;
  font-size: 18px;
}
/* .btn{
  margin-top: 8px;
} */
</style>
