3.27修改入参及数据获取字段变更

This commit is contained in:
2026-03-30 08:49:16 +08:00
parent 9b0a768216
commit b05d42cfc8
18 changed files with 84 additions and 44 deletions

View File

@@ -12,9 +12,9 @@ VUE_APP_TITLE = 洛玻集团驾驶舱
# 杨姗姗 # 杨姗姗
# VUE_APP_BASE_API = 'http://172.16.20.218:7070' # VUE_APP_BASE_API = 'http://172.16.20.218:7070'
# 小田 # 小田
# VUE_APP_BASE_API = 'http://172.16.19.232:7070' VUE_APP_BASE_API = 'http://172.16.19.232:7070'
# 测试 # 测试
VUE_APP_BASE_API = 'http://192.168.0.35:8080' # VUE_APP_BASE_API = 'http://192.168.0.35:8080'
# 路由懒加载 # 路由懒加载

View File

@@ -90,7 +90,7 @@
</el-upload> </el-upload>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button> <el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button> <el-button @click="cancelBtn"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</Container> </Container>
@@ -512,6 +512,10 @@ export default {
this.$message.error('上传失败!') this.$message.error('上传失败!')
} }
}, },
cancelBtn() {
this.upload.open = false
this.$refs.upload.clearFiles();
}
} }
} }
</script> </script>

View File

@@ -77,7 +77,7 @@ font-style: normal;">指标详情</div>
</el-upload> </el-upload>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button> <el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button> <el-button @click="cancelBtn"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</Container> </Container>
@@ -387,6 +387,10 @@ export default {
console.error('文件上传出错:', error) console.error('文件上传出错:', error)
this.$message.error('上传失败!') this.$message.error('上传失败!')
} }
},
cancelBtn(){
this.upload.open = false
this.$refs.upload.clearFiles();
} }
} }
} }

View File

@@ -189,23 +189,23 @@ export default {
startTime: this.dateData.startTime, startTime: this.dateData.startTime,
endTime: this.dateData.endTime, endTime: this.dateData.endTime,
trendName: '原料' + this.meterialName + this.trendName, trendName: '原料' + this.meterialName + this.trendName,
analysisObject: ['原料' + this.meterialName], analysisObject: [this.meterialName],
levelId: this.factory, levelId: this.factory,
}; };
// 调用接口 // 调用接口
getSingleMaterialAnalysis(requestParams).then((res) => { getSingleMaterialAnalysis(requestParams).then((res) => {
this.monData = res.data.currentMonthData.find(item => { this.monData = res.data.currentMonthData.find(item => {
return item.name === '原料' + this.meterialName; return item.name === this.meterialName + '成本';
}); });
this.totalData = res.data.totalMonthData.find(item => { this.totalData = res.data.totalMonthData.find(item => {
return item.name === '原料' + this.meterialName; return item.name === this.meterialName + '成本';
}); });
this.relatedData = { this.relatedData = {
relatedMon: res.data.currentMonthData.filter(item => { relatedMon: res.data.currentMonthData.filter(item => {
return item.name !== '原料' + this.meterialName; return item.name !== this.meterialName + '成本';
}), // 兜底月度数据 }), // 兜底月度数据
relatedTotal: res.data.totalMonthData.filter(item => { relatedTotal: res.data.totalMonthData.filter(item => {
return item.name !== '原料' + this.meterialName; return item.name !== this.meterialName + '成本';
}) // 兜底累计数据 }) // 兜底累计数据
} }
this.trend = res.data.dataTrend this.trend = res.data.dataTrend

View File

@@ -108,7 +108,7 @@ export default {
totalData: {}, totalData: {},
trend: [], trend: [],
relatedData: {}, relatedData: {},
trendName: '原片原料成本', trendName: '原片原料',
// monthRelatedData: [], // monthRelatedData: [],
// totalRelatedData: [], // totalRelatedData: [],
}; };

View File

@@ -39,7 +39,7 @@
grid-template-columns: 1624px; grid-template-columns: 1624px;
"> ">
<!-- <monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" /> --> <!-- <monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" /> -->
<relateSingleFuelCostAnalysis :relatedData="relatedData" :title="'相关指标分析'" /> <relateSingleFuelCostAnalysis :fuelName='fuelName' :relatedData="relatedData" :title="'相关指标分析'" />
</div> </div>
</div> </div>
@@ -213,7 +213,7 @@ export default {
// index: this.index, // index: this.index,
// sort: 1, // sort: 1,
trendName: this.trendName, trendName: this.trendName,
analysisObject: [this.fuelName + '成本'], analysisObject: [this.fuelName],
// paramList: ['制造成本', '财务费用', '销售费用', '管理费用', '运费'], // paramList: ['制造成本', '财务费用', '销售费用', '管理费用', '运费'],
levelId: this.factory, levelId: this.factory,
// baseId: Number(this.factory), // baseId: Number(this.factory),

View File

@@ -211,7 +211,7 @@ export default {
// index: this.index, // index: this.index,
// sort: 1, // sort: 1,
trendName: this.trendName, trendName: this.trendName,
analysisObject: [this.fuelName + '成本'], analysisObject: [this.fuelName],
// paramList: ['制造成本', '财务费用', '销售费用', '管理费用', '运费'], // paramList: ['制造成本', '财务费用', '销售费用', '管理费用', '运费'],
levelId: this.factory, levelId: this.factory,
// baseId: Number(this.factory), // baseId: Number(this.factory),

View File

@@ -90,6 +90,7 @@ export default {
const salesData = { const salesData = {
allPlaceNames: this.locations, allPlaceNames: this.locations,
unit:'元/㎡',
series: [ series: [
// 1. 完成率(折线图) // 1. 完成率(折线图)
{ {

View File

@@ -35,7 +35,7 @@
<div class="dropdown-options" v-if="isDropdownShow"> <div class="dropdown-options" v-if="isDropdownShow">
<div class="dropdown-option" v-for="(item, index) in profitOptions" :key="index" <div class="dropdown-option" v-for="(item, index) in profitOptions" :key="index"
@click.stop="selectProfit(item)"> @click.stop="selectProfit(item)">
{{ item }} {{ item.name }}
</div> </div>
</div> </div>
</div> </div>
@@ -61,12 +61,22 @@ export default {
return { return {
isDropdownShow: false, isDropdownShow: false,
selectedProfit: '天然气', // 选中的名称初始为null selectedProfit: '天然气', // 选中的名称初始为null
profitOptions: [ profitOptions: [{
'天然气', name: '天然气',
'LNG液化天然气', unit:'元/㎡',
'重油', },
'水', {
] name: 'LNG液化天然气',
unit:'元/㎡',
},
{
name: '重油',
unit:'元/㎡',
},
{
name: '水',
unit:'元/㎡',
}],
}; };
}, },
computed: { computed: {
@@ -88,6 +98,7 @@ export default {
const salesData = { const salesData = {
allPlaceNames: this.locations, allPlaceNames: this.locations,
unit:'元/㎡',
series: [ series: [
// 1. 完成率(折线图) // 1. 完成率(折线图)
{ {
@@ -246,9 +257,10 @@ export default {
}, },
methods: { methods: {
selectProfit(item) { selectProfit(item) {
this.selectedProfit = item; this.selectedProfit = item.name;
this.unit = item.unit;
this.isDropdownShow = false; this.isDropdownShow = false;
this.$emit('handleGetItemData', item) this.$emit('handleGetItemData', item.name)
} }
}, },
}; };

View File

@@ -60,9 +60,9 @@ export default {
data() { data() {
return { return {
isDropdownShow: false, isDropdownShow: false,
selectedProfit: '原片原料成本', // 选中的名称初始为null selectedProfit: '原片原料', // 选中的名称初始为null
profitOptions: [ profitOptions: [
'原片原料成本', '原片原料',
'硅砂', '硅砂',
'海砂', '海砂',
'纯碱', '纯碱',
@@ -90,6 +90,7 @@ export default {
const salesData = { const salesData = {
allPlaceNames: this.locations, allPlaceNames: this.locations,
unit:'元/㎡',
series: [ series: [
// 1. 完成率(折线图) // 1. 完成率(折线图)
{ {

View File

@@ -87,6 +87,7 @@ export default {
const salesData = { const salesData = {
allPlaceNames: this.locations, allPlaceNames: this.locations,
unit:'元/㎡',
series: [ series: [
// 1. 完成率(折线图) // 1. 完成率(折线图)
{ {

View File

@@ -35,7 +35,7 @@
<div class="dropdown-options" v-if="isDropdownShow"> <div class="dropdown-options" v-if="isDropdownShow">
<div class="dropdown-option" v-for="(item, index) in profitOptions" :key="index" <div class="dropdown-option" v-for="(item, index) in profitOptions" :key="index"
@click.stop="selectProfit(item)"> @click.stop="selectProfit(item)">
{{ item }} {{ item.name }}
</div> </div>
</div> </div>
</div> </div>
@@ -61,12 +61,23 @@ export default {
return { return {
isDropdownShow: false, isDropdownShow: false,
selectedProfit: '采购单价', // 选中的名称初始为null selectedProfit: '采购单价', // 选中的名称初始为null
profitOptions: [ profitOptions: [{
'采购单价', name: '采购单价',
'产量', unit: '元/吨'
'单耗', },
'消耗量', {
] name: '产量',
unit: '吨'
},
{
name: '单耗',
unit: 'kg/㎡'
},
{
name: '消耗量',
unit: '吨'
}],
unit:'元/吨',
}; };
}, },
computed: { computed: {
@@ -88,6 +99,7 @@ export default {
const salesData = { const salesData = {
allPlaceNames: this.locations, allPlaceNames: this.locations,
unit:this.unit,
series: [ series: [
// 1. 完成率(折线图) // 1. 完成率(折线图)
{ {
@@ -247,9 +259,10 @@ export default {
methods: { methods: {
selectProfit(item) { selectProfit(item) {
console.log('aaaaaa',item) console.log('aaaaaa',item)
this.selectedProfit = item; this.selectedProfit = item.name;
this.isDropdownShow = false; this.isDropdownShow = false;
this.$emit('handleGetItemData', item) this.$emit('handleGetItemData', item.name)
this.unit = item.unit;
} }
}, },
}; };

View File

@@ -5,7 +5,7 @@
<div class="kpi-content" style="padding: 14px 16px; display: flex; width: 100%;"> <div class="kpi-content" style="padding: 14px 16px; display: flex; width: 100%;">
<!-- 新增topItem 专属包裹容器统一控制样式和布局原有行内样式不变 --> <!-- 新增topItem 专属包裹容器统一控制样式和布局原有行内样式不变 -->
<div class="topItem-container" style="display: flex; gap: 8px;"> <div class="topItem-container" style="display: flex; gap: 8px;">
<div class="dashboard left" @click="handleDashboardClick('备品丶机物料')"> <div class="dashboard left" @click="handleDashboardClick('备件、机物料')">
<div class="title"> <div class="title">
备件机物料·/ 备件机物料·/
</div> </div>
@@ -76,7 +76,7 @@ export default {
computed: { computed: {
// 1. 备件丶机物料数据:精准筛选对应名称数据,兜底值统一 // 1. 备件丶机物料数据:精准筛选对应名称数据,兜底值统一
sparePartsData() { sparePartsData() {
return this.relatedData.find(item => (item.name || '').includes('备品丶机物料')) || { return this.relatedData.find(item => (item.name || '').includes('备件、机物料')) || {
targetValue: 0, targetValue: 0,
value: 0, value: 0,
completed: 0, completed: 0,

View File

@@ -7,28 +7,28 @@
<div class="topItem-container" style="display: flex; gap: 8px;"> <div class="topItem-container" style="display: flex; gap: 8px;">
<!-- 天然气组件绑定对应筛选数据点击传递物料名和路由 --> <!-- 天然气组件绑定对应筛选数据点击传递物料名和路由 -->
<div class="dashboard left" @click="handleDashboardClick('天然气', 'singleCombustible')"> <div class="dashboard left" @click="handleDashboardClick('天然气', 'singleCombustible')">
<div class="title">天然气·/</div> <div class="title">天然气·/</div>
<div class="line"> <div class="line">
<operatingSingleBar :detailData="naturalGasData"></operatingSingleBar> <operatingSingleBar :detailData="naturalGasData"></operatingSingleBar>
</div> </div>
</div> </div>
<!-- LNG液化天然气组件绑定对应筛选数据 --> <!-- LNG液化天然气组件绑定对应筛选数据 -->
<div class="dashboard right" @click="handleDashboardClick('LNG液化天然气', 'singleCombustible')"> <div class="dashboard right" @click="handleDashboardClick('LNG液化天然气', 'singleCombustible')">
<div class="title">LNG液化天然气·/</div> <div class="title">LNG液化天然气·/</div>
<div class="line"> <div class="line">
<operatingSingleBar :detailData="lngData"></operatingSingleBar> <operatingSingleBar :detailData="lngData"></operatingSingleBar>
</div> </div>
</div> </div>
<!-- 重油组件绑定对应筛选数据 --> <!-- 重油组件绑定对应筛选数据 -->
<div class="dashboard right" @click="handleDashboardClick('重油', 'singleCombustible')"> <div class="dashboard right" @click="handleDashboardClick('重油', 'singleCombustible')">
<div class="title">重油·/</div> <div class="title">重油·/</div>
<div class="line"> <div class="line">
<operatingSingleBar :detailData="heavyOilData"></operatingSingleBar> <operatingSingleBar :detailData="heavyOilData"></operatingSingleBar>
</div> </div>
</div> </div>
<!-- 水组件绑定对应筛选数据 --> <!-- 水组件绑定对应筛选数据 -->
<div class="dashboard right" @click="handleDashboardClick('水', 'singleCombustible')"> <div class="dashboard right" @click="handleDashboardClick('水', 'singleCombustible')">
<div class="title">·/</div> <div class="title">·/</div>
<div class="line"> <div class="line">
<operatingSingleBar :detailData="waterData"></operatingSingleBar> <operatingSingleBar :detailData="waterData"></operatingSingleBar>
</div> </div>

View File

@@ -110,7 +110,7 @@ export default {
}, },
// 2. 备件丶机物料数据:精准筛选 // 2. 备件丶机物料数据:精准筛选
sparePartsData() { sparePartsData() {
return this.activeData.find(item => (item.name || '').includes('备品丶机物料')) || { return this.activeData.find(item => (item.name || '').includes('备件、机物料')) || {
targetValue: 0, targetValue: 0,
value: 0, value: 0,
completed: 0, completed: 0,

View File

@@ -8,7 +8,7 @@
<div class="topItem-container" style="display: flex; gap: 8px;"> <div class="topItem-container" style="display: flex; gap: 8px;">
<div class="dashboard left"> <div class="dashboard left">
<div class="title"> <div class="title">
采购单价·/ 采购单价·{{fuelName=='天然气'||fuelName=='LNG液化天然气'||fuelName=='水'?'元/m³':'万元'}}
</div> </div>
<div class="line"> <div class="line">
<!-- 绑定对应数据新增数据绑定样式不变 --> <!-- 绑定对应数据新增数据绑定样式不变 -->
@@ -83,6 +83,10 @@ export default {
type: String, type: String,
default: '' // 默认空字符串,保持原有配置 default: '' // 默认空字符串,保持原有配置
}, },
fuelName:{
type: String,
default: ''
}
}, },
data() { data() {
return { return {

View File

@@ -24,7 +24,7 @@
</div> </div>
<div class="dashboard right"> <div class="dashboard right">
<div class="title"> <div class="title">
单耗· 单耗·kg/
</div> </div>
<div class="line"> <div class="line">
<operatingSingleBar :detailData="unitHaoData"></operatingSingleBar> <operatingSingleBar :detailData="unitHaoData"></operatingSingleBar>

View File

@@ -5,7 +5,7 @@
<div class="kpi-content" style="padding: 14px 16px; display: flex; width: 100%;"> <div class="kpi-content" style="padding: 14px 16px; display: flex; width: 100%;">
<!-- 新增topItem 专属包裹容器统一控制样式和布局原有行内样式不变 --> <!-- 新增topItem 专属包裹容器统一控制样式和布局原有行内样式不变 -->
<div class="topItem-container" style="display: flex; gap: 8px;"> <div class="topItem-container" style="display: flex; gap: 8px;">
<div class="dashboard left" @click="handleDashboardClick('备品丶机物料')"> <div class="dashboard left" @click="handleDashboardClick('备件、机物料')">
<div class="title"> <div class="title">
备件机物料·/ 备件机物料·/
</div> </div>
@@ -76,7 +76,7 @@ export default {
computed: { computed: {
// 1. 备件丶机物料数据:精准筛选对应名称数据,兜底值统一 // 1. 备件丶机物料数据:精准筛选对应名称数据,兜底值统一
sparePartsData() { sparePartsData() {
return this.relatedData.find(item => (item.name || '').includes('备品丶机物料')) || { return this.relatedData.find(item => (item.name || '').includes('备件、机物料')) || {
targetValue: 0, targetValue: 0,
value: 0, value: 0,
completed: 0, completed: 0,