<template>
  <div class="excelHtnl">
    <div class="header">
      <div
        class="GoBack"
        @click="GoBack()"
      >
        返回上一级
      </div>
      <div>
        <el-button
          type="info"
          size="small"
        >设置输入框</el-button>
        <el-button
          type="info"
          size="small"
        >电签位置配置</el-button>
        <el-button
          type="success"
          size="small"
        >设置公式开放条件</el-button>
        <el-button
          type="primary"
          size="small"
        >编辑默认信息</el-button>
      </div>
    </div>
    <div class="excelBox">
      <div
        class='parent'
        id='parent'
      ></div>
      <div class="excelRight">
        <setInputTPT v-if="setUptype===0" />
        <electronicSignature v-if="setUptype===1" />
        <setFormula v-if="setUptype===2" />
        <editDefault v-if="setUptype===3" />
      </div>
    </div>
  </div>
</template>

<script>
import setInputTPT from './template/setInputTPT.vue'
import electronicSignature from './template/electronicSignature.vue'
import setFormula from './template/setFormula.vue'
import editDefault from './template/editDefault.vue'
let tem = localStorage.getItem('excelHtnl')
import Vue from 'vue'

var MyComponent = Vue.extend({

  data () {
    return {
    }
  },
  template: tem,
})
let component = new MyComponent().$mount()
export default {
  data () {
    return {
      setUptype: 3,//右侧显示的类型
    }
  },
  methods: {
    GoBack () {//返回上一级
      this.$emit('remove')
    },
  },
  mounted () {
    document.getElementById('parent').appendChild(component.$el);
  },
  components: {
    setInputTPT,
    electronicSignature,
    setFormula,
    editDefault
  }
}
</script>

<style lang="scss" scoped>
.excelHtnl {
  margin: 0 0 0 10px;
  background-color: #fff;
  box-sizing: border-box;
  padding: 0 20px 100px 20px;
  height: 100%;
  overflow: scroll;
  .header {
    display: flex;
    justify-content: space-between;
    height: 50px;
    align-items: center;
    .GoBack {
      color: rgba(0, 82, 216, 1);
      text-decoration: underline;
      font-family: SourceHanSansSC;
      cursor: pointer;
    }
  }
  .excelBox {
    margin-top: 10px;
    display: flex;
    justify-content: flex-start;
    .excelRight {
      flex-grow: 1;
      box-sizing: border-box;
      padding: 20px 0px 0px 30px;
    }
  }
}
</style>



 