You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
122 lines
3.6 KiB
122 lines
3.6 KiB
<template>
|
|
<div class="descriptions-table">
|
|
<el-descriptions class="margin-top" :column="1" border :content-style="rowCenter" :label-style="labelRowCenter"
|
|
v-for="(item, index) in certificationData" :key="(item, index)">
|
|
<el-descriptions-item :label="itemTable.label" v-for="(itemTable, indexTable) in item"
|
|
:key="(itemTable, indexTable)">
|
|
{{ itemTable.val }}
|
|
</el-descriptions-item>
|
|
</el-descriptions>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { listByEid } from "@/api/enterpriseInformation"
|
|
export default {
|
|
data() {
|
|
return {
|
|
rowCenter: {
|
|
'borderColor': '#DADCE3'
|
|
},
|
|
labelRowCenter: {
|
|
'borderColor': '#DADCE3'
|
|
},
|
|
enterpriseId: "",
|
|
// certificationList: [{
|
|
// certificationName: "",
|
|
|
|
// }]
|
|
certificationData: []
|
|
}
|
|
},
|
|
mounted() {
|
|
this.enterpriseId = this.$route.query.enterpriseId
|
|
this.getListByEid()
|
|
},
|
|
methods: {
|
|
getListByEid() {
|
|
listByEid(this.enterpriseId).then(res => {
|
|
if (res.data.data.length > 0) {
|
|
let dataList = []
|
|
res.data.data.forEach(item => {
|
|
if (item.children && item.children.length > 0) {
|
|
dataList.push(...item.children)
|
|
}
|
|
})
|
|
dataList.forEach(item => {
|
|
this.certificationData.push(this.toVal(item))
|
|
})
|
|
}
|
|
})
|
|
},
|
|
toVal(item) {
|
|
let obj = [{
|
|
label: "企业名称",
|
|
code: "enterpriseName",
|
|
val: ""
|
|
}, {
|
|
label: "资质类别",
|
|
code: "qualificationCategory",
|
|
val: ""
|
|
}, {
|
|
label: "资质专业类别",
|
|
code: "professionalCategory",
|
|
val: ""
|
|
}, {
|
|
label: "资质等级名称",
|
|
code: "level",
|
|
val: ""
|
|
}, {
|
|
label: "资质证书号",
|
|
code: "certificateNo",
|
|
val: ""
|
|
}, {
|
|
label: "资质证书核发机关",
|
|
code: "issuedBy",
|
|
val: ""
|
|
}, {
|
|
label: "资质证书核发日期",
|
|
code: "issuanceDate",
|
|
val: ""
|
|
}, {
|
|
label: "有效到期日期",
|
|
code: "validityPeriod",
|
|
val: ""
|
|
}]
|
|
obj[0].val = item.enterpriseName || "-"
|
|
obj[1].val = item.qualificationCategory || "-"
|
|
for (let key in item) {
|
|
obj.forEach(itemObj => {
|
|
if (itemObj.code !== "enterpriseName" && itemObj.code !== "qualificationCategory" && itemObj.code == key) {
|
|
itemObj.val = item[key] || "-"
|
|
}
|
|
})
|
|
}
|
|
return obj
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.descriptions-table {
|
|
min-height: 600px;
|
|
|
|
/deep/.el-descriptions {
|
|
margin-bottom: 20px;
|
|
|
|
.el-descriptions-item__cell {
|
|
padding: 11px 10px;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.el-descriptions-item__label {
|
|
background: #EBF4FE;
|
|
width: 240px;
|
|
font-weight: 600;
|
|
color: #005EB7;
|
|
padding-left: 21px;
|
|
}
|
|
}
|
|
}
|
|
</style>
|