1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
| <template>
| <div class="user_cards">
| <h6>身份证(国徽面)</h6>
| <div class="imgs"><img
| :src="card_a || '../../static/image/noimage.jpg'"
| alt=""
| @click="appShowImage(card_a)"
| ></div>
| <h6>身份证(人像面)</h6>
| <div class="imgs"><img
| :src="card_b || '../../static/image/noimage.jpg'"
| alt=""
| @click="appShowImage(card_b)"
| ></div>
| <h6>户口本</h6>
| <div class="imgs" v-if="cards.lenght"><img
| :src="i || '../../static/image/noimage.jpg'"
| alt=""
| v-for="(i,j) in cards"
| :key="j+'-c'"
| @click="appShowImage(i,cards)"
| ></div>
| <div v-else class="imgs">
| <img src="../../../../static/image/noimage.jpg">
| </div>
| </div>
| </template>
|
| <script>
| export default {
| props: {
| item: {
| type: Object,
| default: () => {
| return {};
| },
| },
| door: {
| type: Object,
| default: () => {
| return {};
| },
| },
| },
| components: {},
| data() {
| return { val: "", card_a: "", card_b: "", cards: [] };
| },
| inject: ["appShowImage"],
| watch: {
| item: {
| handler() {
| this.setItem();
| },
| deep: true,
| },
| door: {
| handler(n) {
| if (n.r) {
| this.sub(n.t);
| }
| },
| deep: true,
| },
| },
| methods: {
| setItem() {
| // console.log(this.item);
| this.card_a = this.item.v.cardPhotoBack;
| this.card_b = this.item.v.cardPhotoFront;
| this.cards = (this.item.v.familyBook + "").split(",").filter((r) => {
| return r !== "";
| });
| },
| sub(type) {
| this.$store.dispatch("setFixed", {
| event: "del",
| type: type,
| time: Date.now(),
| });
| },
| },
| mounted() {
| this.setItem();
| },
| };
| </script>
| <style lang='less' scoped>
| .user_cards {
| h6 {
| font-weight: 400;
| padding: 10px 0;
| text-indent: 5px;
| }
| .imgs {
| display: flex;
| flex-wrap: wrap;
| img {
| width: 250px;
| height: 123px;
| margin: 0 5px 10px;
| border-radius: 5px;
| overflow: hidden;
| cursor: pointer;
| }
| }
| }
| </style>
|
|