|
@ -1,12 +1,15 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="descriptions-table"> |
|
|
<div class="descriptions-table"> |
|
|
<el-descriptions class="margin-top" :column="1" border :content-style="rowCenter" :label-style="labelRowCenter"> |
|
|
<el-descriptions class="margin-top" :column="1" border :content-style="rowCenter" :label-style="labelRowCenter" |
|
|
<el-descriptions-item :label="item.label" v-for="(item,index) in certificationData" :key="(item,index)"> |
|
|
v-for="(item, index) in certificationData" :key="(item, index)"> |
|
|
{{item.val}} |
|
|
<el-descriptions-item :label="itemTable.label" v-for="(itemTable, indexTable) in item" |
|
|
|
|
|
:key="(itemTable, indexTable)"> |
|
|
|
|
|
{{ itemTable.val }} |
|
|
</el-descriptions-item> |
|
|
</el-descriptions-item> |
|
|
</el-descriptions> |
|
|
</el-descriptions> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { listByEid } from "@/api/enterpriseInformation" |
|
|
import { listByEid } from "@/api/enterpriseInformation" |
|
|
export default { |
|
|
export default { |
|
@ -23,7 +26,31 @@ export default { |
|
|
// certificationName: "", |
|
|
// certificationName: "", |
|
|
|
|
|
|
|
|
// }] |
|
|
// }] |
|
|
certificationData: [{ |
|
|
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: "企业名称", |
|
|
label: "企业名称", |
|
|
code: "enterpriseName", |
|
|
code: "enterpriseName", |
|
|
val: "" |
|
|
val: "" |
|
@ -56,37 +83,28 @@ export default { |
|
|
code: "validityPeriod", |
|
|
code: "validityPeriod", |
|
|
val: "" |
|
|
val: "" |
|
|
}] |
|
|
}] |
|
|
} |
|
|
obj[0].val = item.enterpriseName || "-" |
|
|
}, |
|
|
obj[1].val = item.qualificationCategory || "-" |
|
|
mounted() { |
|
|
for (let key in item) { |
|
|
this.enterpriseId = this.$route.query.enterpriseId |
|
|
obj.forEach(itemObj => { |
|
|
this.getListByEid() |
|
|
if (itemObj.code !== "enterpriseName" && itemObj.code !== "qualificationCategory" && itemObj.code == key) { |
|
|
}, |
|
|
itemObj.val = item[key] || "-" |
|
|
methods: { |
|
|
|
|
|
getListByEid() { |
|
|
|
|
|
listByEid(this.enterpriseId).then(res => { |
|
|
|
|
|
if (res.data.data.length > 0) { |
|
|
|
|
|
this.certificationData[0].val = res.data.data[0].enterpriseName || "-" |
|
|
|
|
|
this.certificationData[1].val = res.data.data[0].qualificationCategory || "-" |
|
|
|
|
|
if (res.data.data[0].children.length > 0) { |
|
|
|
|
|
for (let key in res.data.data[0].children[0]) { |
|
|
|
|
|
this.certificationData.forEach(item => { |
|
|
|
|
|
if (item.code !== "enterpriseName" && item.code !== "qualificationCategory" && item.code == key){ |
|
|
|
|
|
item.val=res.data.data[0].children[0][key] || "-" |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
return obj |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
<style lang="less" scoped> |
|
|
.descriptions-table { |
|
|
.descriptions-table { |
|
|
min-height: 600px; |
|
|
min-height: 600px; |
|
|
|
|
|
|
|
|
/deep/.el-descriptions { |
|
|
/deep/.el-descriptions { |
|
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
|
|
|
|
.el-descriptions-item__cell { |
|
|
.el-descriptions-item__cell { |
|
|
padding: 11px 10px; |
|
|
padding: 11px 10px; |
|
|
font-size: 16px; |
|
|
font-size: 16px; |
|
|