|
|
@@ -5,19 +5,9 @@
|
|
|
<span class="text">风险的识别与管控</span>
|
|
|
</div>
|
|
|
<div class="risk-identification__content">
|
|
|
- <div class="check-count">
|
|
|
- <span class="name">安全生产检查</span>
|
|
|
- <span class="value">{{ checkCount }}</span>
|
|
|
- </div>
|
|
|
- <div class="check-result">
|
|
|
- <div class="check-result__item">
|
|
|
- <span class="item-name">今日危险作业数</span>
|
|
|
- <span class="item-value">{{ hazardousWorkCount }}</span>
|
|
|
- </div>
|
|
|
- <div class="check-result__item">
|
|
|
- <span class="item-name">今日施工作业数</span>
|
|
|
- <span class="item-value">{{ constructionWorkCount }}</span>
|
|
|
- </div>
|
|
|
+ <div class="content-item" v-for="item in riskIdentificationContent" :key="item.name">
|
|
|
+ <span class="name">{{ item.name }}</span>
|
|
|
+ <span class="value">{{ item.value }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -27,15 +17,19 @@
|
|
|
import { onMounted, ref } from 'vue';
|
|
|
import { getRiskIdentification } from '@/api/institute-safety';
|
|
|
|
|
|
- const checkCount = ref<number>(0);
|
|
|
- const hazardousWorkCount = ref<number>(0);
|
|
|
- const constructionWorkCount = ref<number>(0);
|
|
|
+ interface RiskIdentificationContent {
|
|
|
+ name: string;
|
|
|
+ value: number;
|
|
|
+ }
|
|
|
+
|
|
|
+ const riskIdentificationContent = ref<RiskIdentificationContent[]>([]);
|
|
|
|
|
|
onMounted(() => {
|
|
|
getRiskIdentification().then((res) => {
|
|
|
- // checkCount.value = res.safeCheckCount;
|
|
|
- hazardousWorkCount.value = res.dangerNum;
|
|
|
- constructionWorkCount.value = res.constructionNum;
|
|
|
+ riskIdentificationContent.value = [
|
|
|
+ { name: '今日危险作业数', value: res.dangerNum },
|
|
|
+ { name: '今日施工作业数', value: res.constructionNum },
|
|
|
+ ];
|
|
|
});
|
|
|
});
|
|
|
</script>
|
|
|
@@ -62,60 +56,34 @@
|
|
|
}
|
|
|
|
|
|
.risk-identification__content {
|
|
|
- width: 310px;
|
|
|
- height: 140px;
|
|
|
- background: linear-gradient(90deg, #ebf3ff 0%, #fafcff 100%);
|
|
|
- border-radius: 4px;
|
|
|
- margin: 0 10px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ gap: 10px;
|
|
|
|
|
|
- .check-count {
|
|
|
+ .content-item {
|
|
|
+ width: 150px;
|
|
|
+ height: 72px;
|
|
|
+ background: linear-gradient(180deg, #eaefff 0%, #ffffff 100%);
|
|
|
+ border-radius: 4px;
|
|
|
+ padding: 12px 16px;
|
|
|
display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- padding: 14px 26px 14px 12px;
|
|
|
- border-bottom: 1px solid rgba(#979797, 0.11);
|
|
|
+ flex-direction: column;
|
|
|
+ gap: 2px;
|
|
|
|
|
|
.name {
|
|
|
- font-weight: 500;
|
|
|
- font-size: 16px;
|
|
|
- color: #333333;
|
|
|
- line-height: 22px;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #666666;
|
|
|
+ line-height: 20px;
|
|
|
}
|
|
|
|
|
|
.value {
|
|
|
font-family: DINAlternate;
|
|
|
font-weight: 600;
|
|
|
- font-size: 16px;
|
|
|
+ font-size: 22px;
|
|
|
color: #333333;
|
|
|
- line-height: 19px;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .check-result {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- padding: 20px 16px 19px 16px;
|
|
|
-
|
|
|
- .check-result__item {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- gap: 4px;
|
|
|
-
|
|
|
- .item-name {
|
|
|
- font-weight: 400;
|
|
|
- font-size: 14px;
|
|
|
- color: #666666;
|
|
|
- line-height: 20px;
|
|
|
- }
|
|
|
-
|
|
|
- .item-value {
|
|
|
- font-family: DINAlternate;
|
|
|
- font-weight: 600;
|
|
|
- font-size: 22px;
|
|
|
- color: #333333;
|
|
|
- line-height: 26px;
|
|
|
- }
|
|
|
+ line-height: 26px;
|
|
|
}
|
|
|
}
|
|
|
}
|