123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- <!-- -->
- <template>
- <div class="author" :class="{ downMode }" v-if="data">
- <div class="content">
- <!-- <div class="check-item" @click="checkOptions(checkData1, index)" v-for="(i, index) in checkData1.options">
- <div class="item">
- <ui-icon :type="checkData1.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
- <span>{{ i.title }}</span>
- <div v-if="i.id == 1 || i.id == 4" class="input-box" style="flex: 1">
- <input type="text" />
- </div>
- </div>
- </div> -->
- <div class="check-item" @click="checkOptions(checkData1, index)" v-for="(i, index) in checkData1.options">
- <div class="item">
- <ui-icon :type="data.oneOptions.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
- <span>{{ i.title }}</span>
- <div class="input-box" style="flex: 1">
- <input v-model="data.oneOptions.value" />
- <div class="content-box left">{{ data.oneOptions.value }}</div>
- </div>
- </div>
- </div>
- <div class="item" style="margin-bottom: 20px">
- <span>受托人:</span>
- <div class="input-box">
- <input style="width: 100%" v-model="data.authorByName" />
- <div class="content-box">{{ data.authorByName }}</div>
- </div>
- <span>代理权限为:</span>
- </div>
- <div class="check-item" @click="checkOptions(checkData, index)" v-for="(i, index) in checkData.options">
- <div class="item" :style="i.id == 3 ? '' : 'display: inline-block'">
- <ui-icon :type="data.options.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
- <span>{{ i.title }}</span>
- <div v-if="i.id == 3" class="input-box" style="flex: 1">
- <input v-model="data.options.value" />
- <div class="content-box left">{{ data.options.value }}</div>
- </div>
- </div>
- </div>
- <div class="item" style="margin-top: 200px">
- <span style="padding-left: 20px">委托人(签名):</span>
- <div style="flex: 1">
- <input v-model="data.authorSign" />
- <div class="content-box left" style="border:none;">{{ data.authorSign }}</div>
- </div>
- </div>
- <div class="item" style="margin-top: 100px">
- <span>受委托人(签名):</span>
- <div style="flex: 1">
- <input v-model="data.authorBySign" />
- <div class="content-box left" style="border:none;">{{ data.authorBySign }}</div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script setup>
- import { reactive, ref, toRefs, onBeforeMount, onMounted } from "vue";
- import { tables } from "@/store/tables";
- import { tablesInfo, setData } from "../data";
- const props = defineProps({
- downMode: { type: Boolean, default: false },
- isDownloadShow: { type: Boolean, default: false },
- });
- const data = ref(null);
- // const checkOneOptions = (item, index) => {
- // item.check = item.options[index].id;
- // data.value["oneOptions"].check = item.check;
- // };
- const checkOptions = (item, index) => {
- item.check = item.options[index].id;
- data.value[item.type].check = item.check;
- };
- const checkData1 = ref({
- check: 0,
- type: "oneOptions",
- options: [
- {
- id: 1,
- title: "...",
- },
- ],
- });
- const checkData = ref({
- type: "options",
- check: 0,
- options: [
- {
- id: 1,
- title: "一般代理。即代理为参与诉讼、调解,提供法律帮助。",
- },
- {
- id: 2,
- title: "特别授权,代为起诉,陈述事实,参加辩论和调解,代为提出、承认、放弃或变更赔偿请求, 提起反诉或上诉,签收法律文书。",
- },
- {
- id: 3,
- title: "...",
- },
- ],
- });
- const saveHandler = () => {
- return { type: "authorTwo", data: data.value };
- };
- defineExpose({ saveHandler, data });
- onMounted(() => {
- if (props.isDownloadShow) {
- } else {
- setData("authorTwo");
- }
- if (tablesInfo.authorTwo) {
- data.value = tablesInfo.authorTwo;
- }
- // if (tablesInfo.authorOne) {
- // console.error(tablesInfo);
- // data.value.oneOptions = tablesInfo.authorOne.options;
- // }
- });
- </script>
- <style lang="scss" scoped>
- .content-box {
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- border-bottom: 1px solid #000;
- padding: 0 10px;
- box-sizing: border-box;
- &.left {
- justify-content: flex-start;
- }
- }
- div[contenteditable] {
- outline: none;
- }
- .input-box {
- input {
- width: 100%;
- height: 100%;
- border-bottom: 1px solid #000;
- padding: 0 10px;
- box-sizing: border-box;
- }
- }
- .author {
- color: #000;
- width: 100%;
- height: 100%;
- // font-family: sr, st;
- font-family: SimHei-Regular, SimHei;
- font-size: 24px;
- font-weight: 400;
- .content-box {
- display: none;
- }
- &.downMode {
- input {
- display: none;
- }
- .content-box {
- display: flex;
- }
- }
- .title {
- text-align: center;
- margin-bottom: 70px;
- }
- .content {
- .item {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: flex-start;
- // margin-bottom: 20px;
- }
- .check-item {
- margin-bottom: 30px;
- .item {
- display: flex;
- align-items: center;
- justify-content: flex-start;
- span {
- line-height: 30px;
- }
- }
- }
- }
- }
- </style>
|