diff --git a/src/views/home/components/provincial/Bottom1-2.vue b/src/views/home/components/provincial/Bottom1-2.vue
index d885b6d0..65f0a86b 100644
--- a/src/views/home/components/provincial/Bottom1-2.vue
+++ b/src/views/home/components/provincial/Bottom1-2.vue
@@ -26,6 +26,7 @@
+
diff --git a/src/views/home/components/provincial/Center2.vue b/src/views/home/components/provincial/Center2.vue
index b6d3d933..b55f6646 100644
--- a/src/views/home/components/provincial/Center2.vue
+++ b/src/views/home/components/provincial/Center2.vue
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+
+
项目数
+
{{ equipNum }} 个
+
+
+
在用装备数
+
{{ equipNum }} 台
+
+
+
+
+
+
+
+
+
+
+
+ | 排名 |
+ 工程名称 |
+ 在用装备数(台) |
+ 规模(拆单公里) |
+ 百公里线路装备使用情况 |
+
+
+
+
+
+
+ | NO0{{ index + 1 }} |
+
+
+ {{ row.projectName }}
+
+ |
+ {{ row.inUser }} |
+ {{ row.scale }} |
+ {{ row.usage }} |
+
+
+
+
+
@@ -34,12 +86,43 @@ export default {
proCode: '',
proCodeList: [],
options: [],
+ proNum: 0,
+ equipNum: 0,
+ tabIndex: 0,
+ tableData: [],
}
},
mounted() {
+ this.getList()
this.getProList()
},
methods: {
+ changTab(type) {
+ if (this.tabIndex === type) {
+ return
+ }
+ this.tabIndex = type
+ console.log('🚀 ~ type:', type)
+ console.log('🚀 ~ this.tabIndex:', this.tabIndex)
+ this.getList()
+ },
+ async getList() {
+ try {
+ const params = {
+ type: this.tabIndex,
+ proCode: this.proCode,
+ }
+ const res = await getEquipmentUseApi(params)
+ this.tableData = res.data.equipmentUse || []
+ if (this.tableData.length > 5) {
+ this.tableData = this.tableData.slice(0, 5)
+ }
+ this.proNum = res.data.proNum || 0
+ this.equipNum = res.data.equipmentNum || 0
+ } catch (error) {
+ console.log('🚀 ~ error:', error)
+ }
+ },
async getProList() {
try {
const res = await getVoltageLevelApi()
@@ -50,12 +133,45 @@ export default {
},
changeProCode(val) {
this.proCode = val.length > 0 ? val.join(',') : ''
- // this.getList()
+ this.getList()
},
handleMore() {
console.log('🚀 ~ methods.handleMore:')
},
+ rowStyle(index) {
+ let background = ''
+ if (index === 0) {
+ background = 'linear-gradient(90deg, rgba(44,186,178,0.2) 0%, rgba(44,186,178,0) 100%)'
+ } else if (index === 1) {
+ background = 'linear-gradient( 90deg, rgba(78,172,255,0.2) 0%, rgba(78,172,255,0) 100%)'
+ } else if (index === 2) {
+ background = 'linear-gradient( 90deg, rgba(254,175,106,0.2) 0%, rgba(254,175,106,0) 100%)'
+ } else if (index === 3 || index === 4) {
+ background = 'linear-gradient( 90deg, rgba(219,196,95,0.2) 0%, rgba(219,196,95,0) 100%)'
+ }
+ return {
+ background,
+ height: '40px', // 👈 统一行高
+ borderRadius: '5px',
+ }
+ },
+ indexStyle(index) {
+ let color = '#333'
+ if (index === 0) {
+ color = '#2CBAB2' // 👈 第一名:青绿
+ } else if (index === 1) {
+ color = '#4EACFF' // 👈 第二名:蓝色
+ } else if (index === 2) {
+ color = '#FEAF6A' // 👈 第三名:橙色
+ } else if (index === 3 || index === 4) {
+ color = '#DBC45F' // 👈 第四/五名:金色
+ }
+
+ return {
+ color,
+ }
+ },
},
}
@@ -65,9 +181,94 @@ export default {
position: relative;
.select-box {
- position: relative;
- top: -31px;
- left: 400px;
+ position: absolute;
+ top: 3px;
+ right: 98px;
+ }
+}
+
+.num {
+ font-family: OPPOSans;
+ font-size: 16px;
+}
+.unit-text {
+ font-family: Microsoft YaHei, Microsoft YaHei;
+ font-weight: 400;
+ font-size: 12px;
+ color: #333;
+}
+.index-num {
+ font-family: Microsoft YaHei, Microsoft YaHei;
+ font-weight: bold;
+ font-size: 14px;
+}
+.pro-name {
+ display: inline-block;
+ max-width: 260px;
+ font-size: 14px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ text-align: left;
+ vertical-align: middle;
+}
+.row-sty {
+ height: 40px;
+ margin-bottom: 7px;
+ border-radius: 5px;
+}
+table {
+ border-collapse: separate;
+ border-spacing: 0 7px;
+}
+td {
+ background-clip: padding-box;
+}
+td:first-child {
+ border-top-left-radius: 5px;
+ border-bottom-left-radius: 5px;
+}
+
+td:last-child {
+ border-top-right-radius: 5px;
+ border-bottom-right-radius: 5px;
+}
+
+.topView {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ .topTab {
+ margin-right: 10px;
+ width: 60px;
+ height: 24px;
+ border-radius: 3px;
+ border: 1px solid #cccccc;
+ text-align: center;
+ cursor: pointer;
+ }
+ .active {
+ background: #2cbab2;
+ color: #fff;
+ }
+}
+
+.num-view {
+ display: flex;
+ align-items: center;
+
+ .num-item {
+ width: 196px;
+ height: 35px;
+ display: flex;
+ align-items: center;
+ justify-content: space-around;
+ margin-right: 18px;
+ font-size: 14px;
+ color: #333;
+ background: linear-gradient(90deg, rgba(78, 172, 255, 0.2) 0%, rgba(78, 172, 255, 0) 100%);
+ border-radius: 5px;
}
}
diff --git a/src/views/home/components/provincial/Top1.vue b/src/views/home/components/provincial/Top1.vue
index e1f7f8c2..0c5ae87c 100644
--- a/src/views/home/components/provincial/Top1.vue
+++ b/src/views/home/components/provincial/Top1.vue
@@ -54,7 +54,7 @@
-
线路装备
+
变电装备
装备数
{{ state2.num }} 台
@@ -77,7 +77,7 @@
-
线路装备
+
电缆装备
装备数
{{ state3.num }} 台