author-two.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <!-- -->
  2. <template>
  3. <div class="author" :class="{ downMode }" v-if="data">
  4. <div class="content">
  5. <!-- <div class="check-item" @click="checkOptions(checkData1, index)" v-for="(i, index) in checkData1.options">
  6. <div class="item">
  7. <ui-icon :type="checkData1.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
  8. <span>{{ i.title }}</span>
  9. <div v-if="i.id == 1 || i.id == 4" class="input-box" style="flex: 1">
  10. <input type="text" />
  11. </div>
  12. </div>
  13. </div> -->
  14. <div class="check-item" @click="checkOptions(checkData, index)" v-for="(i, index) in checkData.options">
  15. <div class="item" :style="i.id == 1 || i.id == 4 ? '' : 'display: inline-block'">
  16. <ui-icon :type="checkData.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
  17. <span>{{ i.title }}</span>
  18. <div v-if="i.id == 1 || i.id == 4" class="input-box" style="flex: 1">
  19. <input type="text" />
  20. </div>
  21. </div>
  22. </div>
  23. <div class="item" style="margin-top: 200px">
  24. <span style="padding-left: 20px">委托人(签名):</span>
  25. <div style="flex: 1">
  26. <input type="text" v-model="data.authorSign" />
  27. </div>
  28. </div>
  29. <div class="item" style="margin-top: 100px">
  30. <span>受委托人(签名):</span>
  31. <div style="flex: 1">
  32. <input type="text" v-model="data.authorBySign" />
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. </template>
  38. <script setup>
  39. import { reactive, ref, toRefs, onBeforeMount, onMounted } from "vue";
  40. import { tables } from "@/store/tables";
  41. import { tablesInfo, setData } from "../data";
  42. const props = defineProps({
  43. downMode: { type: Boolean, default: false },
  44. isDownloadShow: { type: Boolean, default: false },
  45. });
  46. const data = ref(null);
  47. const checkOptions = (item, index) => {
  48. item.check = item.options[index].id;
  49. data.value[item.type].check = item.check;
  50. };
  51. const checkData1 = ref({
  52. check: 0,
  53. options: [
  54. {
  55. id: 1,
  56. title: "...",
  57. },
  58. ],
  59. });
  60. const checkData = ref({
  61. check: 0,
  62. options: [
  63. {
  64. id: 1,
  65. title: "...",
  66. },
  67. {
  68. id: 2,
  69. title: "一般代理。即代理为参与诉讼、调解,提供法律帮助。",
  70. },
  71. {
  72. id: 3,
  73. title: "特别授权,代为起诉,陈述事实,参加辩论和调解,代为提出、承认、放弃或变更赔偿请求, 提起反诉或上诉,签收法律文书。",
  74. },
  75. {
  76. id: 4,
  77. title: "...",
  78. },
  79. ],
  80. });
  81. const saveHandler = () => {
  82. return { type: "author", data: data.value };
  83. };
  84. defineExpose({ saveHandler, data });
  85. onMounted(() => {
  86. if (props.isDownloadShow) {
  87. } else {
  88. setData("author");
  89. }
  90. if (tablesInfo.author) {
  91. data.value = tablesInfo.author;
  92. }
  93. });
  94. </script>
  95. <style lang="scss" scoped>
  96. .content-box {
  97. width: 100%;
  98. height: 100%;
  99. display: flex;
  100. align-items: center;
  101. justify-content: center;
  102. border-bottom: 1px solid #000;
  103. padding: 0 10px;
  104. box-sizing: border-box;
  105. &.left {
  106. justify-content: flex-start;
  107. }
  108. }
  109. div[contenteditable] {
  110. outline: none;
  111. }
  112. .input-box {
  113. input {
  114. width: 100%;
  115. height: 100%;
  116. border-bottom: 1px solid #000;
  117. padding: 0 10px;
  118. box-sizing: border-box;
  119. }
  120. }
  121. .author {
  122. color: #000;
  123. width: 100%;
  124. height: 100%;
  125. // font-family: sr, st;
  126. font-family: SimHei-Regular, SimHei;
  127. font-size: 24px;
  128. font-weight: 400;
  129. .content-box {
  130. display: none;
  131. }
  132. &.downMode {
  133. input {
  134. display: none;
  135. }
  136. .content-box {
  137. display: flex;
  138. }
  139. }
  140. .title {
  141. text-align: center;
  142. margin-bottom: 70px;
  143. }
  144. .content {
  145. .item {
  146. width: 100%;
  147. display: flex;
  148. align-items: center;
  149. justify-content: flex-start;
  150. // margin-bottom: 20px;
  151. }
  152. .check-item {
  153. margin-bottom: 30px;
  154. .item {
  155. display: flex;
  156. align-items: center;
  157. justify-content: flex-start;
  158. span {
  159. line-height: 30px;
  160. }
  161. }
  162. }
  163. }
  164. }
  165. </style>