<template>
  <div class="poolAdd">
    <h2>{{ title }}</h2>
    <poolForm ref="poolForm" :type="type" :id="id"></poolForm>
  </div>
</template>
<script>
import poolForm from "../components/poolForm";
import {
  listPool,
  getPool,
  delPool,
  addPool,
  updatePool,
} from "@/api/invest/pool";

export default {
  name: "investPoolAdd",
  dicts: ["project_group"],
  components: { poolForm },
  data() {
    return {
      type: "1",
      id: this.$route.query.id,
      title: "新增项目",
    };
  },
  mounted() {
    this.type = "1";
    if (this.$route.query.id) {
      this.id = this.$route.query.id;
      this.title = "修改项目";
    } else {
      this.id = null;
      this.title = "新增项目";
    }
  },
  methods: {},
};
</script>
<style lang="scss" scoped>
.poolAdd {
  h2 {
    margin-left: 30px;
  }
}
</style>