<template>
  <div id="basicParameters">
    <el-button @click="status = 1" :type="status === 1 ? 'primary' : ''"
      >营销</el-button
    >
    <el-button @click="status = 2" :type="status === 2 ? 'primary' : ''"
      >资源</el-button
    >
    <div v-if="status === 1">
      <div class="infoBox">
        <div class="he">订单</div>
        <el-button
          style="margin: 10px"
          v-for="(item, index) in list1"
          :key="index"
        @click="jumpPage(item)"
          >{{ item.title }}</el-button
        >
      </div>
    </div>
    <div v-if="status === 2">
        <div class="infoBox">
        <div class="he">课程</div>
        <el-button
          style="margin: 10px"
          v-for="(item, index) in list2"
          :key="index"
          @click="jumpPage(item)"
          >{{ item.title }}</el-button
        >
      </div>
      <div class="infoBox">
        <div class="he">题库</div>
        <el-button
          style="margin: 10px"
          v-for="(item, index) in list3"
          :key="index"
          @click="jumpPage(item)"
          >{{ item.title }}</el-button
        >
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      status: 1,
      list1: [
        {
          title: "支付通道",
          url: "paymentChannel",
        },
        {
          title: "收款方",
          url: "beneficiary",
        },
        {
          title: "渠道来源",
          url: "channelSource",
        },
        {
          title: "到访分校",
          url: "visitCampus",
        },
        {
          title: "服务模式",
          url: "serviceModel",
        },
        {
          title: "供应方",
          url: "supplier",
        },
        {
          title: "收费性质",
          url: "natureCharge",
        },
        {
          title: "费用类型",
          url: "typesFee",
        },
      ],
      list2: [
        {
          title: "教育类型",
          url: "educationType",
        },
        {
          title: "项目类型",
          url: "projectType",
        },
        {
          title: "业务层次",
          url: "businessLevel",
        },
        {
          title: "院校",
          url: "colleges",
        },
        {
          title: "专业",
          url: "professional",
        },
        {
          title: "科目/类目",
          url: "suject",
        },
        {
          title: "考期",
          url: "testPeriod",
        },
        {
          title: "报读地区",
          url: "enrollmentArea",
        },
        {
          title: "证书",
          url: "certificate",
        },
        {
          title: "标签",
          url: "label",
        },
      ],
      list3: [
        {
          title: "题目类型",
          url: "questionType",
        },
        {
          title: "试卷类型",
          url: "papers",
        },
      ],
    };
  },
  methods: {
      jumpPage(item){
          console.log(item.url)
          this.$router.push({
              path: item.url
          })
      },
  },
};
</script>

<style lang="less" scoped>
.infoBox {
  border-radius: 8px;
  border: 1px solid #a4a4a4;
  width: 300px;
  overflow: hidden;
  margin: 20px 0px;
  .he {
    height: 40px;
    line-height: 40px;
    background-color: #eee;
    text-align: center;
  }
}
</style>
