dynamicExcel.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <div class="excelHtnl">
  3. <div class="header">
  4. <div
  5. class="GoBack"
  6. @click="GoBack()"
  7. >
  8. 返回上一级
  9. </div>
  10. <div>
  11. <el-button
  12. type="info"
  13. size="small"
  14. >设置输入框</el-button>
  15. <el-button
  16. type="info"
  17. size="small"
  18. >电签位置配置</el-button>
  19. <el-button
  20. type="success"
  21. size="small"
  22. >设置公式开放条件</el-button>
  23. <el-button
  24. type="primary"
  25. size="small"
  26. >编辑默认信息</el-button>
  27. </div>
  28. </div>
  29. <div class="excelBox">
  30. <div
  31. class='parent'
  32. id='parent'
  33. ></div>
  34. <div class="excelRight">
  35. <setInputTPT v-if="setUptype===0" />
  36. <electronicSignature v-if="setUptype===1" />
  37. <setFormula v-if="setUptype===2" />
  38. <editDefault v-if="setUptype===3" />
  39. </div>
  40. </div>
  41. </div>
  42. </template>
  43. <script>
  44. import setInputTPT from './template/setInputTPT.vue'
  45. import electronicSignature from './template/electronicSignature.vue'
  46. import setFormula from './template/setFormula.vue'
  47. import editDefault from './template/editDefault.vue'
  48. import Vue from 'vue'
  49. export default {
  50. data () {
  51. return {
  52. setUptype: 3,//右侧显示的类型1
  53. }
  54. },
  55. methods: {
  56. GoBack () {//返回上一级
  57. this.$emit('remove')
  58. },
  59. },
  60. mounted () {
  61. this.cop()
  62. },
  63. methods: {
  64. async cop () {
  65. var MyComponent = await Vue.extend({
  66. template: localStorage.getItem('excelHtml')
  67. })
  68. var component = new MyComponent().$mount()
  69. document.getElementById('parent').appendChild(component.$el);
  70. },
  71. },
  72. components: {
  73. setInputTPT,
  74. electronicSignature,
  75. setFormula,
  76. editDefault
  77. }
  78. }
  79. </script>
  80. <style lang="scss" scoped>
  81. .excelHtnl {
  82. margin: 0 0 0 10px;
  83. background-color: #fff;
  84. box-sizing: border-box;
  85. padding: 0 20px 100px 20px;
  86. height: 100%;
  87. overflow: scroll;
  88. .header {
  89. display: flex;
  90. justify-content: space-between;
  91. height: 50px;
  92. align-items: center;
  93. .GoBack {
  94. color: rgba(0, 82, 216, 1);
  95. text-decoration: underline;
  96. font-family: SourceHanSansSC;
  97. cursor: pointer;
  98. }
  99. }
  100. .excelBox {
  101. margin-top: 10px;
  102. display: flex;
  103. justify-content: flex-start;
  104. .excelRight {
  105. flex-grow: 1;
  106. box-sizing: border-box;
  107. padding: 20px 0px 0px 30px;
  108. }
  109. }
  110. }
  111. </style>