commit
20e3846343
@ -0,0 +1,224 @@
|
||||
<template>
|
||||
<div class="card_box">
|
||||
<div
|
||||
class="card_box_item"
|
||||
v-for="(i, index) in cardList"
|
||||
:key="index"
|
||||
@click="change_item(i)"
|
||||
>
|
||||
<!-- 盒子头部企业公司名 -->
|
||||
<div class="card_head" :title="i.companyName">
|
||||
{{ i.companyName }}
|
||||
</div>
|
||||
<!-- 企业图片展示区域 -->
|
||||
<div class="card_company">
|
||||
<img :src="i.picUrl" alt="" @error="setDefaultImage" />
|
||||
<!-- 企业类型标签 -->
|
||||
<div class="company_type">
|
||||
<div
|
||||
:class="{
|
||||
shewei: val == '剧毒' || val == '易制毒',
|
||||
zhongdian: val == '消防重点' || val == '所管消防',
|
||||
zhibao: val == '放射源' || val == '易制爆',
|
||||
zhian:
|
||||
val == '治安重点' || val == '创安单位' || val == '外资合资',
|
||||
}"
|
||||
v-for="(val, index) in i.companyTypes"
|
||||
:key="index"
|
||||
>
|
||||
{{ val }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 企业信息展示 -->
|
||||
<div class="card_text">
|
||||
<el-descriptions class="margin-top" :column="2">
|
||||
<el-descriptions-item label="企业员工"
|
||||
>{{ i.staffCount || 0 }} 人</el-descriptions-item
|
||||
>
|
||||
<el-descriptions-item label="是否有过处罚">
|
||||
<span v-if="i.caseCount == 13">是</span>
|
||||
<span v-else>否</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="企业安全责任人电话">{{
|
||||
i.emergencyContactPhone
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div class="address">
|
||||
<i class="el-icon-location-outline"></i>
|
||||
<span>{{ i.companyAddress }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import defaultImage from "@/assets/companyFile/default.png";
|
||||
export default {
|
||||
props: {
|
||||
// 公司相关详情数据
|
||||
cardList: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cardListArr: [],
|
||||
massage_title: "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
setDefaultImage(e) {
|
||||
// 加载失败默认图片
|
||||
e.target.src = defaultImage;
|
||||
},
|
||||
// 跳转公司详情页
|
||||
change_item(val) {
|
||||
sessionStorage.setItem("companyID", val.id);
|
||||
sessionStorage.setItem("companyName", val.companyName);
|
||||
this.$router.push({
|
||||
name: "archives",
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.card_box {
|
||||
width: 76vw;
|
||||
height: 58vh;
|
||||
margin-top: 2vh;
|
||||
margin-left: 12vw;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
.card_box_item {
|
||||
width: 17.5vw;
|
||||
height: 27vh;
|
||||
margin-top: 1vh;
|
||||
margin-left: 1.2vw;
|
||||
background: url("~@/assets/enterpriseArchives/cardBg.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
cursor: pointer;
|
||||
.card_head {
|
||||
width: 17.5vw;
|
||||
height: 4vh;
|
||||
background: url("~@/assets/enterpriseArchives/cardTitle.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
color: aliceblue;
|
||||
text-align: center;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
.card_company {
|
||||
width: 17.5vw;
|
||||
height: 15vh;
|
||||
position: relative;
|
||||
img {
|
||||
width: 17.5vw;
|
||||
height: 15vh;
|
||||
}
|
||||
.company_type {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
left: 10px;
|
||||
width: 16.4vw;
|
||||
bottom: 5px;
|
||||
background: #161325;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
.shewei {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
width: 60px;
|
||||
background: url("~@/assets/companyFile/编组 11991.png") no-repeat;
|
||||
padding: 0 5px;
|
||||
font-size: 14px;
|
||||
color: #b5ebff;
|
||||
letter-spacing: 0.44px;
|
||||
font-weight: 400;
|
||||
background-size: 100% 100%;
|
||||
margin-right: 5px;
|
||||
margin-bottom: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.zhongdian {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
width: 80px;
|
||||
background: url("~@/assets/companyFile/编组 11222221.png") no-repeat;
|
||||
padding: 0 5px;
|
||||
font-size: 14px;
|
||||
color: #e3deff;
|
||||
letter-spacing: 0.44px;
|
||||
font-weight: 400;
|
||||
background-size: 100% 100%;
|
||||
margin-right: 5px;
|
||||
margin-bottom: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.zhibao {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
width: 60px;
|
||||
background: url("~@/assets/companyFile/编组 11991备份 10.png")
|
||||
no-repeat;
|
||||
padding: 0 5px;
|
||||
font-size: 14px;
|
||||
color: #e3deff;
|
||||
letter-spacing: 0.44px;
|
||||
font-weight: 400;
|
||||
background-size: 100% 100%;
|
||||
margin-right: 5px;
|
||||
margin-bottom: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.zhian {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
width: 80px;
|
||||
background: url("~@/assets/companyFile/编组 11991备份 21.png")
|
||||
no-repeat;
|
||||
padding: 0 5px;
|
||||
font-size: 14px;
|
||||
color: #e3deff;
|
||||
letter-spacing: 0.44px;
|
||||
font-weight: 400;
|
||||
background-size: 100% 100%;
|
||||
margin-right: 5px;
|
||||
margin-bottom: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.card_text {
|
||||
margin-left: 0.5vw;
|
||||
width: 17vw;
|
||||
height: 8vh;
|
||||
color: #fff;
|
||||
.address {
|
||||
font-size: 14px;
|
||||
margin-top: 4px;
|
||||
height: 2vh;
|
||||
line-height: 2vh;
|
||||
}
|
||||
}
|
||||
::v-deep .el-descriptions {
|
||||
width: 80% !important;
|
||||
}
|
||||
::v-deep .el-descriptions__body {
|
||||
color: #fff;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
::v-deep .el-descriptions-item__cell {
|
||||
padding-bottom: 3px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue