detailItem.vue
5.31 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
<template>
<div>
<el-dialog title="详情" :visible.sync="detailsShow" width="1200px" append-to-body :before-close="handleClose">
<el-descriptions :column="2" border>
<el-descriptions-item label="单位简称" label-class-name="com-label" content-class-name="com-content">
{{ detailsItem.shortName }}
</el-descriptions-item>
<el-descriptions-item label="单位名称" label-class-name="com-label" content-class-name="com-content">
{{ detailsItem.companyName }}
</el-descriptions-item>
<el-descriptions-item label="单位负责人" label-class-name="com-label" content-class-name="com-content">
{{ detailsItem.leader }}
</el-descriptions-item>
<el-descriptions-item label="联系方式" label-class-name="com-label" content-class-name="com-content">
{{ detailsItem.leaderTel }}
</el-descriptions-item>
<el-descriptions-item label="法人姓名" label-class-name="com-label" content-class-name="com-content">
{{ detailsItem.legalPerson }}
</el-descriptions-item>
<el-descriptions-item label="法人联系方式" label-class-name="com-label" content-class-name="com-content">
{{ detailsItem.legalPersonTel }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="1" border>
<el-descriptions-item label="单位地址" label-class-name="com-label2" content-class-name="">
{{ detailsItem.address }}
</el-descriptions-item>
<el-descriptions-item :label="'运维名单' + detailsItem.personCnt + '人'" label-class-name="com-label2"
content-class-name="">
<template v-if="detailsItem.personInf !== null && detailsItem.personInf !== undefined">
<el-tag v-for="item in detailsItem.personInf.split(',')"
style="margin-right: 3px;margin-bottom: 3px;">{{
item.substring(item.lastIndexOf(":") + 1, item.length) }}</el-tag>
</template>
</el-descriptions-item>
<el-descriptions-item :label="'合同名单' + detailsItem.contractCnt + '个'" label-class-name="com-label2"
content-class-name="">
<template v-if="detailsItem.contractInf !== null && detailsItem.contractInf !== undefined">
<div v-for="item in detailsItem.contractInf.split(',')">
<el-tag style="margin-bottom: 3px;">
{{ item }}
</el-tag>
</div>
</template>
</el-descriptions-item>
</el-descriptions>
<h2>资质信息</h2>
<el-table :data="qualificationList" style="width: 100%">
<el-table-column prop="qualif_name" label="资质名称"> </el-table-column>
<el-table-column prop="qualif_level" label="资质等级" align="center" width="100"> </el-table-column>
<el-table-column prop="person_cnt" label="资质绑定人数" align="center" width="100">
<template slot-scope="scope">
<div
v-if="scope.row.person_cnt === null || scope.row.person_cnt == undefined || scope.row.person_cnt == ''">
0</div>
<div v-else>{{ scope.row.person_cnt }}</div>
</template>
</el-table-column>
<el-table-column prop="person_inf " label="资质绑定人员">
<template slot-scope="scope"
v-if="scope.row.person_inf !== null && scope.row.person_inf !== undefined">
<el-tag style="margin-right: 3px;" v-for="item in scope.row.person_inf.split(',')">{{ item
}}</el-tag>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import { companyQualif } from "@/api/resource/company";
import { watch } from "vue-demi";
export default {
props: {
detailsShow: {
type: Boolean
},
detailsItem: {
type: Object,
},
},
computed: {
showWatcher: function () {
// 在计算属性中可以监听到 props.count 的变化
return this.detailsShow;
}
},
watch: {
showWatcher: function (newVal, oldVal) {
if (newVal == true) {
this.getCompanyQualif();
}
},
},
created() {
},
data() {
return {
qualificationList: [],
}
},
methods: {
getCompanyQualif() {
companyQualif({ companyId: this.detailsItem.id }).then((res) => {
this.qualificationList = res.data;
})
},
handleClose() {
this.$emit('isOpen', false)
},
},
}
</script>
<style>
.com-label {
width: 200px;
}
.com-label2 {
width: 150px;
}
.com-content {
width: 600px;
}
</style>