view.vue
7.1 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<template>
<div v-if="show">
<el-dialog v-model="show" width="80%" title="查看详情" @close="close">
<el-table v-loading="loading" border :data="list" style="width: 100%">
<el-table-column label="序号" align="center" type="index" width="55" />
<el-table-column
label="会员编号"
align="center"
prop="memCode"
min-width="130"
:show-overflow-tooltip="true"
/>
<el-table-column
label="团体会员名称"
align="center"
prop=""
min-width="170"
>
<template #default="scope">
<div class="con" :class="{'bg':scope.row.oldName!==scope.row.newName}">
<div class=""><span>{{ scope.row.oldName }}</span></div>
<div v-if="scope.row.oldName!==scope.row.newName" class="">变更为 <span>{{ scope.row.newName }}</span></div>
</div>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- label="性别"-->
<!-- align="center"-->
<!-- prop=""-->
<!-- min-width="130"-->
<!-- >-->
<!-- <template #default="scope">-->
<!-- <div class="con" :class="{'bg':scope.row.oldSex!==scope.row.newSex}">-->
<!-- <div><span>{{ scope.row.oldSex==0?'男':'女' }}</span></div>-->
<!-- <div v-if="scope.row.oldSex!==scope.row.newSex">变更为 <span>{{ scope.row.newSex==0?'男':'女' }}</span></div>-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="证件类型"-->
<!-- align="center"-->
<!-- prop=""-->
<!-- min-width="180"-->
<!-- >-->
<!-- <template #default="scope">-->
<!-- <div class="con" :class="{'bg':scope.row.oldIdcType!==scope.row.newIdcType}">-->
<!-- <div><span>{{ cardType[scope.row.oldIdcType].label }}</span></div>-->
<!-- <div v-if="scope.row.oldIdcType!==scope.row.newIdcType">变更为 <span>{{ cardType[scope.row.newIdcType].label }}</span></div>-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="证件号"-->
<!-- align="center"-->
<!-- prop=""-->
<!-- min-width="260"-->
<!-- >-->
<!-- <template #default="scope">-->
<!-- <div class="con" :class="{'bg':scope.row.oldIdcCode!==scope.row.newIdcCode}">-->
<!-- <div><span>{{ scope.row.oldIdcCode }}</span></div>-->
<!-- <div v-if="scope.row.oldIdcCode!==scope.row.newIdcCode">变更为 <span>{{ scope.row.newIdcCode }}</span></div>-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="会员状态"-->
<!-- align="center"-->
<!-- prop=""-->
<!-- min-width="100"-->
<!-- >-->
<!-- <template #default="props">-->
<!-- <div v-if="props.row.personCertStage==0">-->
<!-- 新会员-->
<!-- </div>-->
<!-- <div v-if="props.row.personCertStage==1">-->
<!-- 待提交-->
<!-- </div>-->
<!-- <div v-if="props.row.personCertStage==2">-->
<!-- 缴费中-->
<!-- </div>-->
<!-- <div v-if="props.row.personCertStage==3">-->
<!-- 正常-->
<!-- </div>-->
<!-- <div v-if="props.row.personCertStage==4">-->
<!-- 过期-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="出生日期"-->
<!-- align="center"-->
<!-- prop=""-->
<!-- min-width="220"-->
<!-- >-->
<!-- <template #default="scope">-->
<!-- <div class="con" :class="{'bg':scope.row.oldBirth!==scope.row.newBirth}">-->
<!-- <div><span>{{ parseTime(scope.row.oldBirth, '{y}-{m}-{d}') }}</span></div>-->
<!-- <div v-if="scope.row.oldBirth!==scope.row.newBirth">变更为 <span>{{ parseTime(scope.row.newBirth, '{y}-{m}-{d}') }}</span></div>-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
label="附件"
align="center"
prop=""
min-width="120"
>
<template #default="scope">
<el-button v-if="scope.row.fileUrl" size="small" type="text" @click="handleDownload(scope.row,'fileUrl')">下载</el-button>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- label="所属道馆"-->
<!-- align="center"-->
<!-- prop="memName"-->
<!-- min-width="100"-->
<!-- :show-overflow-tooltip="true"-->
<!-- />-->
</el-table>
<el-link v-show="false" ref="linkRef" :href="fillImgUrl(url)" :underline="false" target="_blank" />
</el-dialog>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { getCurrentInstance } from '@vue/runtime-core'
import { infoList } from '@/api/groupMember/addAlteration'
const show = ref(false)
const rangeId = ref()
const list = ref([])
const queryParams = ref({})
const loading = ref(false)
const total = ref(0)
const url = ref()
const { proxy } = getCurrentInstance()
const cardType = ref([
{ label: '身份证', value: '0' },
{ label: '港澳台通行证 ', value: '1' },
{ label: '中国护照', value: '2' },
{ label: '外国护照', value: '3' },
{ label: '其它', value: '4' },
{ label: '户口本', value: '5' }
])
function open(row) {
queryParams.value = {
pageNum: 1,
pageSize: 9999
}
show.value = true
queryParams.value.rangeId = rangeId.value = row
getList()
}
async function getList() {
loading.value = true
const res = await infoList(queryParams.value)
if (res.code == 200) {
list.value = res.rows
list.value.forEach(item => {
item.fileUrl = JSON.parse(item.fileUrl)
})
total.value = res.total
loading.value = false
console.log(list.value)
}
}
function handleDownload(row) {
url.value = row.fileUrl?.[0]?.url
proxy.$refs['linkRef'].$el.click()
}
function close() {
show.value = false
list.value = []
}
defineExpose({
open
})
</script>
<style lang="scss" scoped>
.con{
padding: 2px;
border-radius: 2px;
//text-align: center;
span{
margin-left: 5px;
}
}
.bg{
color: #d51515;
}
</style>