<!--申请入党-->
<template>
    <div class="body">
        <flow
            :flowDate="flowDate"
            @childData="getChildDate"
        />
  
    </div>
</template>
<script>
import Flow from "./components/Flow";

const drawerType = {
  node: 0,
  link: 1
};
import { fatherList, organizationsList } from "@/api/organizationList/index";
import { processFlow } from "@/api/process/index";
import { setTimeout } from "timers";

export default {
  components: { Flow },
  data() {
    return {
      treeList: [], //支部列表
      drawerType,
      dialogVisible: false,
      linkSetting: {
        desc: ""
      },
      organization_id: "",
      nodeSetting: {
        name: "",
        desc: ""
      },
      searchParams: {
        name: "", //支部名称
        zb_sj: "", //支部书记
        limit: 15, //每页显示条数
        page: 1 //当前页码
      }, //搜索框数据
      origin: [681, 465],
      flowDate: "",
      nodeList: [],
      linkList: [],
      childDate: ""
    };
  },
  created() {
    processFlow().then(res => {
      console.log(res.data[1].child, "数据流程");
      this.flowDate = res.data[1].child;
      sessionStorage.setItem("flowDate", JSON.stringify(res.data[1].child));
    }),
      fatherList().then(res => {
        console.log(res, "llllll");
        this.treeList = res.data;
      });
  },
  mounted() {
    processFlow().then(res => {
      console.log(res.data[1].child, "数据流程");
      this.flowDate = res.data[1].child;
    }),
      fatherList().then(res => {
        console.log(res, "llllll");
        this.treeList = res.data;
      });
  },
  methods: {
    getChildDate(v) {
      console.log(v, "子组件传递的数据");
        this.$router.push({ name: "applylist", query: { id: v.idx } });
    }
  }
};
</script>
<style lang="scss">
@import "@/assets/styles/content.scss";
</style>
