装备配置率配置问题修改

This commit is contained in:
jiang 2026-02-03 14:24:54 +08:00
parent f1fc46c340
commit 22fa800d60
3 changed files with 42 additions and 33 deletions

View File

@ -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
}) })
} }

View File

@ -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>
@ -69,7 +69,7 @@
<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;

View File

@ -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()
} }