bonus-ui/src/views/screen/gwScreen/components/right/ProEquipSituationList.vue

394 lines
9.8 KiB
Vue
Raw Normal View History

2025-11-19 18:08:59 +08:00
<template>
<div class="table-style">
<div class="title-tip">
2025-12-02 10:46:12 +08:00
<div class="small_title">工程在用装备情况</div>
2025-11-19 18:08:59 +08:00
<div class="more more-warp">
2025-11-26 15:15:16 +08:00
<!-- <div>
2025-12-02 10:46:12 +08:00
<el-select
v-model="proCodeList"
placeholder=""
clearable
multiple
collapse-tags
filterable
size="mini"
:popper-append-to-body="false"
@change="changeProCode"
style="width: 180px"
>
<el-option v-for="(item, index) in options" :key="index" :label="item.label" :value="item.value" />
2025-11-19 18:08:59 +08:00
</el-select>
2025-11-26 15:15:16 +08:00
</div> -->
2025-12-02 10:46:12 +08:00
<div style="margin-left: 50px" @click="openDialog">更多 ></div>
2025-11-19 18:08:59 +08:00
</div>
</div>
<div>
<div class="topView">
2025-12-02 10:46:12 +08:00
<div
style="
width: 25%;
height: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
"
>
2025-11-19 18:08:59 +08:00
<div :class="tabIndex == 0 ? 'topTab1 fs-24 active1' : 'topTab1 fs-24'" @click="changTab(0)">线路</div>
<div :class="tabIndex == 2 ? 'topTab2 fs-24 active2' : 'topTab2 fs-24'" @click="changTab(2)">变电</div>
<div :class="tabIndex == 1 ? 'topTab3 fs-24 active3' : 'topTab3 fs-24'" @click="changTab(1)">电缆</div>
</div>
<div>
<el-row :gutter="20">
2025-12-02 10:46:12 +08:00
<el-col :span="12" :offset="0" style="width: 170px">
2025-11-19 18:08:59 +08:00
<div style="display: flex; text-align: center">
<img src="../../img/icon3.png" class="icon" />
<div>
<div style="color: #ccc; font-size: 12px; margin-top: 10px">项目数</div>
2025-12-02 10:46:12 +08:00
<div class="num-y" style="font-size: 16px; font-weight: 800">{{ proNum }}</div>
2025-11-19 18:08:59 +08:00
</div>
</div>
</el-col>
2025-12-02 10:46:12 +08:00
<el-col :span="12" :offset="0" style="width: 190px">
2025-11-19 18:08:59 +08:00
<div style="display: flex; text-align: center">
<img src="../../img/icon1.png" class="icon" />
<div>
<div style="color: #ccc; font-size: 12px; margin-top: 10px">在用装备数</div>
2025-12-02 10:46:12 +08:00
<div class="num-y" style="font-size: 16px; font-weight: 800">{{ equipNum }}</div>
2025-11-19 18:08:59 +08:00
</div>
</div>
</el-col>
</el-row>
</div>
</div>
</div>
<div class="table-list scroll-container">
<table cellspacing="0" cellpadding="8" style="width: 100%; border-collapse: collapse; text-align: center">
<!-- 双层表头 -->
<thead>
<!-- 第一行跨列合并 -->
<tr>
<th>排名</th>
<th>工程名称</th>
<th>在用装备数</th>
<th>规模拆单公里</th>
2025-11-20 10:08:35 +08:00
<!-- <th>百公里线路装备使用情况</th> -->
2025-11-19 18:08:59 +08:00
</tr>
</thead>
<!-- 表体使用 v-for 渲染数据 -->
<tbody>
<tr v-for="(row, index) in tableData" :key="index">
2025-12-02 10:46:12 +08:00
<td class="index-num num" style="width: 60px">{{ index + 1 }}</td>
2025-11-19 18:08:59 +08:00
<td style="width: 200px">{{ row.projectName }}</td>
2025-12-02 10:46:12 +08:00
<td class="num" style="width: 120px">{{ row.inUser }}</td>
<td class="num">{{ row.scale }}</td>
<!-- <td class="num">{{ row.usage }}</td> -->
2025-11-19 18:08:59 +08:00
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
2025-12-02 10:46:12 +08:00
import { getEquipmentUseApi, getVoltageLevelApi } from '@/api/wsScreen'
2025-11-19 18:08:59 +08:00
import { getUseProjectListAPI } from '@/api/EquipmentLedger/equ-out'
export default {
data() {
return {
2025-12-02 10:46:12 +08:00
proCodeList: [],
2025-11-19 18:08:59 +08:00
proCode: '',
options: [],
proNum: 0,
equipNum: 0,
tabIndex: 0,
2025-11-20 10:08:35 +08:00
tableData: [
{
projectName: '埇桥-萧砀|回500千伏线路工程',
inUser: '82',
scale: '172',
},
{
projectName: '石岗-施桥110kV线路工程',
inUser: '18',
scale: '55.6',
},
{
projectName: '换流站-金牛500kV线路工程',
inUser: '18',
scale: '55.6',
},
{
projectName: '汤庄-平圩500kV线路工程',
inUser: '18',
scale: '55.6',
},
{
projectName: '魏武-木兰n入祝集变电站220kV线路工程',
inUser: '18',
scale: '55.6',
},
],
2025-11-19 18:08:59 +08:00
}
},
created() {
2025-11-20 10:08:35 +08:00
// this.getProList()
// this.getList()
2025-11-19 18:08:59 +08:00
},
methods: {
changTab(type) {
this.tabIndex = type
this.getList()
},
async getList() {
try {
const params = {
type: this.tabIndex,
2025-11-20 10:08:35 +08:00
proCode: this.proCode,
2025-11-19 18:08:59 +08:00
}
const res = await getEquipmentUseApi(params)
this.tableData = res.data.equipmentUse || []
this.proNum = res.data.proNum || 0
this.equipNum = res.data.equipmentNum || 0
} catch (error) {}
},
async getProList() {
try {
2025-12-02 10:46:12 +08:00
const res = await getVoltageLevelApi()
2025-11-19 18:08:59 +08:00
this.options = res.data
} catch (error) {
console.log('🚀 ~ error:', error)
}
},
2025-12-02 10:46:12 +08:00
changeProCode(val) {
this.proCode = val.length > 0 ? val.join(',') : ''
this.getList()
},
2025-11-19 18:08:59 +08:00
openDialog() {
this.$emit('openDialog')
},
},
}
</script>
<style lang="scss" scoped>
.table-style {
height: 350px;
}
.scroll-container {
width: 100%;
overflow: auto;
/* 隐藏滚动条轨迹 */
-ms-overflow-style: none; /* IE / Edge */
scrollbar-width: none; /* Firefox */
}
/* Chrome / Safari */
.scroll-container::-webkit-scrollbar {
width: 0; /* 或者直接隐藏 */
height: 0;
background: transparent; /* 背景透明 */
}
2025-12-02 10:46:12 +08:00
.num {
font-size: 20px;
font-weight: 800;
font-family: 'DIN';
}
.num-y {
margin-left: 20px;
font-weight: 800;
font-family: 'DIN';
background: linear-gradient(180deg, #fff 25.81%, #fdf277 77.42%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.index-num {
background: linear-gradient(180deg, #fff 19.35%, #5dcbfe 77.42%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
2025-11-19 18:08:59 +08:00
.title-tip {
display: flex;
justify-content: space-between;
padding-top: 10px;
padding-left: 45px;
font-family: DS-TITLE;
.title-text {
2025-12-02 10:46:12 +08:00
background: linear-gradient(180deg, #fff 19.35%, #5dcbfe 77.42%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
2025-11-19 18:08:59 +08:00
}
.more {
margin-right: 20px;
2025-12-02 10:46:12 +08:00
color: #5b99ad;
2025-11-19 18:08:59 +08:00
cursor: pointer;
2025-12-02 10:46:12 +08:00
font-weight: 400;
2025-11-19 18:08:59 +08:00
font-family: '';
2025-12-02 10:46:12 +08:00
font-size: 12px;
/* 清除背景渐变相关属性 */
background: none;
background-clip: unset;
-webkit-background-clip: unset;
-webkit-text-fill-color: #5b99ad;
}
.small_title {
margin-left: 10px;
font-size: 20px;
font-weight: 500;
background: linear-gradient(180deg, #fff 19.35%, #5dcbfe 77.42%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
2025-11-19 18:08:59 +08:00
}
.more-warp {
display: flex;
align-items: center;
}
2025-12-02 10:46:12 +08:00
2025-11-19 18:08:59 +08:00
}
.table-list {
margin-top: -20px;
height: 238px;
overflow: auto;
}
.topView {
width: 100%;
height: 16%;
display: flex;
justify-content: space-between;
align-items: center;
}
.fs-24 {
margin-top: 10px;
font-size: 15px;
padding: 5px;
cursor: pointer;
}
.topTab1 {
width: 33%;
height: 80%;
color: #45adf1;
background-image: url('../../../../../assets/cityScreen/tab11.png');
background-repeat: no-repeat;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
}
.topTab2 {
width: 33%;
height: 80%;
color: #45adf1;
background-image: url('../../../../../assets/cityScreen/tab21.png');
background-repeat: no-repeat;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
}
.topTab3 {
width: 33%;
height: 80%;
color: #45adf1;
background-image: url('../../img/tab31.png');
background-repeat: no-repeat;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
}
.active1 {
background-image: url('../../img/tab12.png');
}
.active2 {
background-image: url('../../img/tab22.png');
}
.active3 {
background-image: url('../../img/tab32.png');
}
table {
border-collapse: collapse;
width: 100%;
2025-11-23 15:06:49 +08:00
font-family: 'Alibaba-PuHuiTi-Regular';
2025-11-19 18:08:59 +08:00
font-size: 11px;
}
th,
td {
padding: 10px;
text-align: center;
}
th {
font-weight: bold;
}
// 第一行背景
thead {
background-image: url('../../img/tableHeader.png');
background-size: 100% 100%;
2025-12-02 10:46:12 +08:00
color: #7bbbf8;
2025-11-19 18:08:59 +08:00
}
tbody tr {
background-image: url('../../img/tableTr.png');
background-size: 100% 100%;
}
tbody tr:hover {
background-image: url('../../img/table-hover.png');
cursor: pointer;
}
::v-deep .el-select .el-input__inner {
2025-12-02 10:46:12 +08:00
background-color: #0a3362 !important ;
color: #0c1837 !important;
}
::v-deep .el-select-dropdown {
background-color: #0a3362 !important;
/* left: -300px !important;
width: 400px !important;
height: 180px !important;
border: 1px solid #0c1837 !important;
overflow: hidden; */
}
::v-deep .el-scrollbar {
/* height: 184px !important; */
background-color: #0c1837 !important;
}
::v-deep .el-select-dropdown__item {
color: #0c1837 !important;
}
::v-deep .el-select-dropdown__item.hover,
.el-select-dropdown__item:hover {
background: #0c1837 !important;
}
::v-deep .el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
background: #0c1837 !important;
}
::v-deep .el-select__tags {
flex-wrap: nowrap !important;
}
::v-deep .el-select__tags .el-tag {
background-color: #28406c !important;
color: #0c1837 !important; // 标签内文字颜色设置为 #0c1837
}
::v-deep .el-select__tags .el-tag__close {
color: #0c1837 !important; // 标签关闭按钮颜色也设置为 #0c1837
2025-11-19 18:08:59 +08:00
}
</style>