<template>
  <div class="page">
    <el-card>
      <el-tabs v-model="activeName">
        <el-tab-pane label="基本信息" name="baseinfo">
          <show v-if="activeName == 'baseinfo'" ref="baseinfoshow" />
        </el-tab-pane>
   
        <el-tab-pane label="申请材料" v-if="matterId!=null" name="datumn">
          <datum-list v-if="activeName == 'datumn'" ref="datumlist" />
        </el-tab-pane>
        <el-tab-pane label="受理条件" v-if="matterId!=null" name="accept">
          <accept-list v-if="activeName == 'accept'" ref="acceptlist" />
        </el-tab-pane>
        <el-tab-pane label="办理流程" v-if="matterId!=null" name="flowlimit">
          <flowlimit-list
            v-if="activeName == 'flowlimit'"
            ref="flowlimitlist"
          />
        </el-tab-pane>
        <el-tab-pane label="收费标准" v-if="matterId!=null" name="charges">
          <charges-show v-if="activeName == 'charges'" ref="chargesshow" />
           </el-tab-pane>
        <el-tab-pane label="设定依据" v-if="matterId!=null" name="setbase">
          <setbase-list v-if="activeName == 'setbase'" ref="setbaselist" />
        </el-tab-pane>
        <el-tab-pane label="中介服务" v-if="matterId!=null" name="intermediary">
          <intermediary-list
            v-if="activeName == 'intermediary'"
            ref="intermediarylist"
          />
        </el-tab-pane>

        <el-tab-pane label="常见问题" v-if="matterId!=null" name="question">
          <question-list v-if="activeName == 'question'" ref="questionlist" />
        </el-tab-pane>
      </el-tabs>
    </el-card>
  </div>
</template>
<script>
import show from "./show";
import datumList from "./datum/list";
import acceptList from "./accept/list";
import flowlimitList from "./flowlimit/list";
import chargesShow from "./charges/show";
import setbaseList from "./setbase/list";
import intermediaryList from "./intermediary/list";
import questionList from "./question/list";

export default {
  name: "matter",

  components: {
    show,
    datumList,
    acceptList,
    flowlimitList,
    chargesShow,
    setbaseList,
    intermediaryList,
    questionList
  },
  data() {
    return {
      matterId:null,
      show: true,
      urls: {
        currUrl: "/matter/add",
        saveUrl: "/matter/save",
      },
      picView: "",
      // 选中选项卡的 name
      activeName: "baseinfo",
      form: {},
      toString: [],
    };
  },
 created() {
    this.matterId = this.$route.query && this.$route.query.matterId;
    console.log("matterId:"+this.matterId)

  },
  methods: {
    beforeGetUrl(data) {
      // data.currUrl="/device/ext/add"
      //   data.addUrl="/device/ext/add"
      //   data.editUrl="/device/ext/edit"
      //   data.saveUrl="/device/ext/save"
      //   data.viewUrl="/device/ext/view"
      return data;
    },
    /** 关闭按钮 */
    close() {
      this.$router.go(-1);
    },
    reset() {
      this.form = {};
      //this.resetForm("form");
    },
  },
  mounted() {},
};
</script>
