装备配置率配置问题修改
This commit is contained in:
parent
f1fc46c340
commit
22fa800d60
|
|
@ -302,7 +302,8 @@ export function updateConfiguration(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/material-mall/deptConfig/updateConfiguration',
|
url: '/material-mall/deptConfig/updateConfiguration',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data,
|
||||||
|
timeout: 100000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="center-box">
|
<div class="center-box">
|
||||||
<TitleBox titleText="工程在用装备情况" @handleMore="handleMore" style="margin-bottom: 10px" />
|
<TitleBox titleText="工程在用装备情况" @handleMore="handleMore" style="margin-bottom: 10px"/>
|
||||||
|
|
||||||
<el-select
|
<el-select
|
||||||
class="select-box"
|
class="select-box"
|
||||||
|
|
@ -14,20 +14,20 @@
|
||||||
@change="changeProCode"
|
@change="changeProCode"
|
||||||
style="width: 316px"
|
style="width: 316px"
|
||||||
>
|
>
|
||||||
<el-option v-for="(item, index) in options" :key="index" :label="item.label" :value="item.value" />
|
<el-option v-for="(item, index) in options" :key="index" :label="item.label" :value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<div class="topView">
|
<div class="topView">
|
||||||
<div style="height: 100%; display: flex; align-items: center; justify-content: space-between">
|
<div style="height: 100%; display: flex; align-items: center; justify-content: space-between">
|
||||||
<div class="topTab" :class="{ active: tabIndex == 0 }" @click="changTab(0)">线路</div>
|
<div class="topTab" :class="{ active: tabIndex == '线路' }" @click="changTab('线路')">线路</div>
|
||||||
<div class="topTab" :class="{ active: tabIndex == 2 }" @click="changTab(2)">变电</div>
|
<div class="topTab" :class="{ active: tabIndex == '变电' }" @click="changTab('变电')">变电</div>
|
||||||
<div class="topTab" :class="{ active: tabIndex == 1 }" @click="changTab(1)">电缆</div>
|
<div class="topTab" :class="{ active: tabIndex == '电缆' }" @click="changTab('电缆')">电缆</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="num-view">
|
<div class="num-view">
|
||||||
<div class="num-item">
|
<div class="num-item">
|
||||||
<div>项目数</div>
|
<div>项目数</div>
|
||||||
<div class="num">{{ equipNum }} <span class="unit-text">个</span></div>
|
<div class="num">{{ proNum }} <span class="unit-text">个</span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="num-item">
|
<div class="num-item">
|
||||||
<div>在用装备数</div>
|
<div>在用装备数</div>
|
||||||
|
|
@ -41,35 +41,35 @@
|
||||||
<table cellspacing="0" cellpadding="8" style="width: 100%; text-align: center; font-size: 14px">
|
<table cellspacing="0" cellpadding="8" style="width: 100%; text-align: center; font-size: 14px">
|
||||||
<!-- 双层表头 -->
|
<!-- 双层表头 -->
|
||||||
<thead>
|
<thead>
|
||||||
<!-- 第一行:跨列合并 -->
|
<!-- 第一行:跨列合并 -->
|
||||||
<tr>
|
<tr>
|
||||||
<th>排名</th>
|
<th>排名</th>
|
||||||
<th style="width: 260px">工程名称</th>
|
<th style="width: 260px">工程名称</th>
|
||||||
<th>在用装备数(台)</th>
|
<th>在用装备数(台)</th>
|
||||||
<th>规模(拆单公里)</th>
|
<th>规模(拆单公里)</th>
|
||||||
<th>百公里线路装备使用情况</th>
|
<th>百公里线路装备使用情况</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<!-- 表体:使用 v-for 渲染数据 -->
|
<!-- 表体:使用 v-for 渲染数据 -->
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(row, index) in tableData" :key="index" class="row-sty" :style="rowStyle(index)">
|
<tr v-for="(row, index) in tableData" :key="index" class="row-sty" :style="rowStyle(index)">
|
||||||
<td class="index-num" style="width: 50px" :style="indexStyle(index)">NO0{{ index + 1 }}</td>
|
<td class="index-num" style="width: 50px" :style="indexStyle(index)">NO0{{ index + 1 }}</td>
|
||||||
<td style="width: 260px; text-align: left">
|
<td style="width: 260px; text-align: left">
|
||||||
<span class="pro-name" :title="row.projectName">
|
<span class="pro-name" :title="row.projectName">
|
||||||
{{ row.projectName }}
|
{{ row.projectName }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="num" style="width: 140px">{{ row.inUser }}</td>
|
<td class="num" style="width: 140px">{{ row.inUser }}</td>
|
||||||
<td class="num" style="width: 140px">{{ row.scale }}</td>
|
<td class="num" style="width: 140px">{{ row.scale }}</td>
|
||||||
<td class="num" style="width: 190px">{{ row.usage }}</td>
|
<td class="num" style="width: 190px">{{ row.usage }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<el-empty v-if="tableData.length == 0" :image-size="110" description="暂无数据"></el-empty>
|
<el-empty v-if="tableData.length == 0" :image-size="110" description="暂无数据"></el-empty>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ProEquipMore ref="proEquipMore" />
|
<ProEquipMore ref="proEquipMore"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -91,8 +91,8 @@ export default {
|
||||||
options: [],
|
options: [],
|
||||||
proNum: 0,
|
proNum: 0,
|
||||||
equipNum: 0,
|
equipNum: 0,
|
||||||
tabIndex: 0,
|
tabIndex: '线路',
|
||||||
tableData: [],
|
tableData: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -113,7 +113,7 @@ export default {
|
||||||
try {
|
try {
|
||||||
const params = {
|
const params = {
|
||||||
type: this.tabIndex,
|
type: this.tabIndex,
|
||||||
proCode: this.proCode,
|
proCode: this.proCode
|
||||||
}
|
}
|
||||||
const res = await getEquipmentUseApi(params)
|
const res = await getEquipmentUseApi(params)
|
||||||
this.tableData = res.data.equipmentUse || []
|
this.tableData = res.data.equipmentUse || []
|
||||||
|
|
@ -156,7 +156,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
background,
|
background,
|
||||||
height: '40px', // 👈 统一行高
|
height: '40px', // 👈 统一行高
|
||||||
borderRadius: '5px',
|
borderRadius: '5px'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
indexStyle(index) {
|
indexStyle(index) {
|
||||||
|
|
@ -172,10 +172,10 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
color,
|
color
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -194,17 +194,20 @@ export default {
|
||||||
font-family: OPPOSans;
|
font-family: OPPOSans;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.unit-text {
|
.unit-text {
|
||||||
font-family: Microsoft YaHei, Microsoft YaHei;
|
font-family: Microsoft YaHei, Microsoft YaHei;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.index-num {
|
.index-num {
|
||||||
font-family: Microsoft YaHei, Microsoft YaHei;
|
font-family: Microsoft YaHei, Microsoft YaHei;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pro-name {
|
.pro-name {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
max-width: 260px;
|
max-width: 260px;
|
||||||
|
|
@ -215,18 +218,22 @@ export default {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row-sty {
|
.row-sty {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin-bottom: 7px;
|
margin-bottom: 7px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
border-collapse: separate;
|
border-collapse: separate;
|
||||||
border-spacing: 0 7px;
|
border-spacing: 0 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
background-clip: padding-box;
|
background-clip: padding-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
td:first-child {
|
td:first-child {
|
||||||
border-top-left-radius: 5px;
|
border-top-left-radius: 5px;
|
||||||
border-bottom-left-radius: 5px;
|
border-bottom-left-radius: 5px;
|
||||||
|
|
@ -251,6 +258,7 @@ td:last-child {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
background: #2cbab2;
|
background: #2cbab2;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
|
||||||
|
|
@ -376,8 +376,8 @@ export default {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('导出失败:', err)
|
console.error('更新失败:', err)
|
||||||
this.$message.error('导出失败,请稍后重试')
|
this.$message.error('更新失败,请稍后重试')
|
||||||
} finally {
|
} finally {
|
||||||
this.$loading().close()
|
this.$loading().close()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue