2024-12-30 18:07:53 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="company-card">
|
|
|
|
|
<div class="company-info">
|
2024-12-30 18:14:06 +08:00
|
|
|
<div>
|
|
|
|
|
<el-avatar
|
2024-12-31 17:49:45 +08:00
|
|
|
size="large"
|
2024-12-30 18:14:06 +08:00
|
|
|
src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2024-12-31 17:49:45 +08:00
|
|
|
<div style="flex: 1; padding-left: 14px">
|
|
|
|
|
<div class="company-title">
|
|
|
|
|
<span> {{ companyInfo.deptName }} </span>
|
|
|
|
|
<el-tag type="success" effect="dark" size="mini">
|
|
|
|
|
启用中
|
|
|
|
|
</el-tag>
|
2024-12-30 18:07:53 +08:00
|
|
|
</div>
|
|
|
|
|
|
2024-12-31 17:49:45 +08:00
|
|
|
<p> {{ companyInfo.remark }} </p>
|
2024-12-30 18:07:53 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-12-30 18:14:06 +08:00
|
|
|
<div class="items-card">
|
2024-12-31 17:49:45 +08:00
|
|
|
<div
|
|
|
|
|
:key="index"
|
|
|
|
|
class="items-center"
|
|
|
|
|
v-for="(item, index) in userList"
|
|
|
|
|
>
|
|
|
|
|
<div>{{ item.title_name }}</div>
|
|
|
|
|
<div>{{ item.count }}</div>
|
2024-12-30 18:07:53 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-12-30 18:14:06 +08:00
|
|
|
<div class="items-card">
|
2024-12-31 17:49:45 +08:00
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
:key="index"
|
|
|
|
|
:icon="item.icon"
|
|
|
|
|
v-for="(item, index) in btnList"
|
|
|
|
|
@click="onClickButton(item.type)"
|
|
|
|
|
>
|
|
|
|
|
{{ item.btn_name }}
|
|
|
|
|
</el-button>
|
2024-12-30 18:07:53 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-12-31 17:49:45 +08:00
|
|
|
export default {
|
|
|
|
|
props: {
|
|
|
|
|
companyInfo: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: () => {},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
userList: [
|
|
|
|
|
{ title_name: '用户', count: 20 },
|
|
|
|
|
{ title_name: '项目', count: 20 },
|
|
|
|
|
{ title_name: '设备', count: 20 },
|
|
|
|
|
],
|
|
|
|
|
btnList: [
|
|
|
|
|
{ btn_name: '详情', icon: 'el-icon-chat-dot-round', type: 1 },
|
|
|
|
|
{ btn_name: '编辑', icon: 'el-icon-edit', type: 2 },
|
|
|
|
|
{ btn_name: '注销', icon: 'el-icon-delete', type: 3 },
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
onClickButton(type) {
|
|
|
|
|
if (type === 1 || type === 2) {
|
|
|
|
|
this.$emit('openAddForm', type)
|
|
|
|
|
} else {
|
|
|
|
|
this.$modal
|
|
|
|
|
.confirm('是否确认注销')
|
|
|
|
|
.then(() => {})
|
|
|
|
|
.catch(() => {})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
2024-12-30 18:07:53 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.company-card {
|
2024-12-30 18:14:06 +08:00
|
|
|
padding: 12px 10px;
|
|
|
|
|
border-radius: 6px;
|
2024-12-31 17:49:45 +08:00
|
|
|
background-color: #f7f8fc;
|
|
|
|
|
|
2024-12-30 18:07:53 +08:00
|
|
|
.company-info {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2024-12-30 18:14:06 +08:00
|
|
|
|
2024-12-31 17:49:45 +08:00
|
|
|
.company-title {
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
& span:first-child {
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
p {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: #abafb3;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-30 18:14:06 +08:00
|
|
|
.items-card {
|
|
|
|
|
margin-top: 16px;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-around;
|
2024-12-31 17:49:45 +08:00
|
|
|
color: #454545;
|
2024-12-30 18:14:06 +08:00
|
|
|
|
|
|
|
|
.items-center {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
2024-12-31 17:49:45 +08:00
|
|
|
|
|
|
|
|
& div:last-child {
|
|
|
|
|
margin-top: 14px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
2024-12-30 18:14:06 +08:00
|
|
|
}
|
|
|
|
|
}
|
2024-12-30 18:07:53 +08:00
|
|
|
}
|
|
|
|
|
</style>
|