leveView.vue
1.65 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
<template>
<div>
<el-dialog v-model="show" width="600" :title="type=='olLevel'||type=='level'?'级位详情':'段位详情'" @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="type=='olLevel'||type=='level'?'级位':'段位'"
align="center"
prop="level"
min-width="100"
:show-overflow-tooltip="true"
>
<template #default="scope">
<div>{{ szToHz(scope.row.level) }}{{ type=='olLevel'||type=='level'?'级':'段' }}</div>
</template>
</el-table-column>
<el-table-column
label="证书编号"
align="center"
prop="certCode"
min-width="170"
/>
</el-table>
</el-dialog>
</div>
</template>
<script setup>
import { ref } from 'vue'
const show = ref(false)
const list = ref([])
const loading = ref(false)
import { szToHz } from '@/utils/ruoyi'
const type = ref()
function openView(row, val) {
type.value = val
if (val == 'level')list.value = row.personInfo.jiList
if (val == 'olLevel')list.value = row.oldPersonInfo.jiList
if (val == 'duan')list.value = row.personInfo.duanList
if (val == 'olDuan')list.value = row.oldPersonInfo.duanList
show.value = true
console.log(list.value)
}
function close() {
show.value = false
list.value = []
}
defineExpose({
openView
})
</script>
<style lang="scss" scoped>
.con{
padding: 2px;
border-radius: 2px;
//text-align: center;
span{
margin-left: 5px;
}
}
.bg{
color: #d51515;
}
</style>