<template>

  <el-form inline :form="data" :label-width="'150px'" label-position="right">
    <limitLevel
      :rule="data"
      :moIndex="mo_index"
    ></limitLevel>
  </el-form>
</template>

<script>
export default {
   components: {
        limitLevel
    },
  created() {
    console.log(1111);
    self = this;
    this.data=this.rule

    console.log(this.rule)
  },
  methods: {
    submitAns(data, label, all_data, index) {
            let ans = null;
            if (data) {
                ans = deepClone(data);
            }
            console.log(this.rule);
            this.$emit('submitAns', data, label, all_data, this.moIndex);
        }
  },
  data() {
    return {
      mo_index: 0,
      data:[],
      rule: [
        {
          type: "select",
          name: "wr1",
          label: "问题块根-问题1",
          ans: null,
          child: null,
          content: [
            {
              value: "wr11",
              label: "问题块根-问题1-答案1",
              children: [
                {
                  type: "select",
                  name: "w11",
                  label: "问题块1-问题1",
                  ans: null,
                  child: null,
                  content: [
                    {
                      value: "w11",
                      label: "问题块1-问题1-答案1",
                      children: [
                        {
                          type: "end",
                        },
                      ],
                    },
                    {
                      value: "w11",
                      label: "问题块1-问题1-答案2",
                      children: [
                        {
                          type: "select",
                          name: "wa1",
                          label: "问题块a-问题1",
                          ans: null,
                          child: null,
                          content: [
                            {
                              value: "wa11",
                              label: "问题块a-问题1-答案1",
                              children: null,
                            },
                            {
                              value: "wa11",
                              label: "问题块a-问题1-答案2",
                              children: null,
                            },
                          ],
                        },
                        {
                          type: "select",
                          name: "wa2",
                          label: "问题块a-问题2",
                          ans: null,
                          child: null,
                          content: [
                            {
                              value: "问题块a-问题2-答案1",
                              label: "wa21",
                              children: null,
                            },
                            {
                              value: "问题块a-问题2-答案1",
                              label: "wa22",
                              children: null,
                            },
                          ],
                        },
                        {
                          type: "end",
                        },
                      ],
                    },
                  ],
                },
              ],
            },
            {
              value: "wr12",
              label: "问题块根-问题1-答案2",
              children: [
                {
                  type: "select",
                  name: "wb1",
                  label: "问题块b-问题1",
                  ans: null,
                  child: null,
                  content: [
                    {
                      value: "wb11",
                      label: "问题块b-问题1-答案1",
                      children: [
                        {
                          type: "textarea",
                          name: "wb111",
                          label: "问题块b1-问题1",
                          ans: null,
                          child: null,
                        },
                        {
                          type: "end",
                        },
                      ],
                    },
                    {
                      value: "wb12",
                      label: "问题块b-问题1-答案2",
                      children: [
                        {
                          type: "daterange",
                          label: "问题块b2-问题1",
                          name: "wb121",
                          ans: null,
                          child: null,
                        },
                      ],
                    },
                    {
                      value: "wb13",
                      label: "问题块b-问题1-答案3",
                      children: [
                        {
                          type: "end",
                        },
                      ],
                    },
                  ],
                },
              ],
            },
          ],
        },
      ],
      text: "11",
      form: "22",
      table: "",
    };
  },
};
</script>


<style lang="less">
</style>