author-two.vue 5.4 KB

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