diff --git a/.env.dev b/.env.dev
index 1a3e9c4f..1f370043 100644
--- a/.env.dev
+++ b/.env.dev
@@ -15,6 +15,8 @@ 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://192.168.0.35:8080'
+# 闫阳
+# VUE_APP_BASE_API = 'http://172.16.19.131:7070'
# 路由懒加载
diff --git a/src/api/cockpit.js b/src/api/cockpit.js
index 0cbb0f5c..14b1c154 100644
--- a/src/api/cockpit.js
+++ b/src/api/cockpit.js
@@ -346,3 +346,38 @@ export function getDictListData(query) {
params: query,
});
}
+export function getAccountsReceivableData(data) {
+ return request({
+ url: "/lb/accounts-receivable/getGroupData",
+ method: "post",
+ data: data,
+ });
+}
+export function getInventoryData(data) {
+ return request({
+ url: "/lb/inventory/getGroupData",
+ method: "post",
+ data: data,
+ });
+}
+export function getElectricityCostAnalysisData(data) {
+ return request({
+ url: "/lb/electricity-cost-analysis/getGroupData",
+ method: "post",
+ data: data,
+ });
+}
+export function getDepreciationAnalysisData(data) {
+ return request({
+ url: "/lb/depreciation-analysis/getGroupData",
+ method: "post",
+ data: data,
+ });
+}
+export function getElectricityCostAnalysisFData(data) {
+ return request({
+ url: "/lb/electricity-cost-analysis/getFactoryData",
+ method: "post",
+ data: data,
+ });
+}
diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js
index e27c05ea..b9a50a33 100644
--- a/src/store/modules/permission.js
+++ b/src/store/modules/permission.js
@@ -96,6 +96,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
"/salesVolumeAnalysis",
'/procurementGainAnalysis',
'/fullCostAnalysis',
+ '/electricityCostAnalysis',
// '/expenseAnalysis',
"/cost", // cost 根路由
"/cost/profitImpactAnalysis", // cost 子菜单(完整路径)
diff --git a/src/views/home/accountsReceivable/accountsReceivable.vue b/src/views/home/accountsReceivable/accountsReceivable.vue
index 2b71b5ce..36d30d05 100644
--- a/src/views/home/accountsReceivable/accountsReceivable.vue
+++ b/src/views/home/accountsReceivable/accountsReceivable.vue
@@ -39,7 +39,7 @@ import { mapState } from "vuex";
import operatingLineChart from "../accountsReceivableComponents/operatingLineChart";
import operatingLineChartCumulative from "../accountsReceivableComponents/operatingLineChartCumulative.vue";
-import { getSalesRevenueGroupData } from '@/api/cockpit'
+import { getAccountsReceivableData } from '@/api/cockpit'
export default {
name: "AccountsReceivable",
components: {
@@ -59,6 +59,7 @@ export default {
selectDate:{},
monthData: {},
ytdData:{},
+ dateData: {},
};
},
@@ -132,15 +133,14 @@ export default {
// this.getData()
// },
getData() {
- getSalesRevenueGroupData({
+ getAccountsReceivableData({
startTime: this.dateData.startTime,
endTime: this.dateData.endTime,
sort: this.sort,
index: undefined,
factory: undefined
- // timeDim: obj.mode
}).then((res) => {
- console.log(res);
+ console.log('res==============================',res);
this.monthData= res.data.month
this.ytdData = res.data.ytd
diff --git a/src/views/home/components/CostsBottomBar.vue b/src/views/home/components/CostsBottomBar.vue
index 3351dfde..1f7d15da 100644
--- a/src/views/home/components/CostsBottomBar.vue
+++ b/src/views/home/components/CostsBottomBar.vue
@@ -87,11 +87,14 @@ export default {
// 如果没有 X 轴数据,则返回空数组
if (xAxisKeys.length === 0) {
- return [];
+ return {};
+ }
+ let obj = {
+ unit:'万元',
+ series:[]
}
-
// 遍历配置项,生成 series
- return Object.keys(this.chartConfig).map(key => {
+ obj.series = Object.keys(this.chartConfig).map(key => {
const config = this.chartConfig[key];
// 确保数据顺序和 X 轴一致
const dataValues = xAxisKeys.map(date => lineData[key] ? lineData[key].real[date] : 0);
@@ -114,6 +117,7 @@ export default {
data: dataValues
};
});
+ return obj;
}
},
methods: {}
diff --git a/src/views/home/components/baseTable.vue b/src/views/home/components/baseTable.vue
index 207ba09e..28df4767 100644
--- a/src/views/home/components/baseTable.vue
+++ b/src/views/home/components/baseTable.vue
@@ -11,8 +11,8 @@
@mouseleave.native="autoScroll(false)" v-loading="isLoading"
:header-cell-style="{ background: 'rgba(218, 226, 237, 1)', color: 'rgba(0, 0, 0, .6)',padding:'3px 2px'}" :row-style="setRowStyle"
:data="renderData" border style="width: 100%; background: transparent">
-
-
+
@@ -39,7 +39,7 @@ export default {
maxHeight: {
type: [Number, String], // 支持数字(如300)或字符串(如'300px')
required: false,
- default: 200 // 原固定值,作为默认 fallback
+ default: 200 // 原固定值,作为默认 fallback
},
tableData: {
type: Array,
diff --git a/src/views/home/components/budgetDetails.vue b/src/views/home/components/budgetDetails.vue
index c26983d9..3b895579 100644
--- a/src/views/home/components/budgetDetails.vue
+++ b/src/views/home/components/budgetDetails.vue
@@ -90,7 +90,7 @@
@@ -512,6 +512,10 @@ export default {
this.$message.error('上传失败!')
}
},
+ cancelBtn() {
+ this.upload.open = false
+ this.$refs.upload.clearFiles();
+ }
}
}
diff --git a/src/views/home/components/coreBottomBar.vue b/src/views/home/components/coreBottomBar.vue
index 7ad9aa2e..a34ca828 100644
--- a/src/views/home/components/coreBottomBar.vue
+++ b/src/views/home/components/coreBottomBar.vue
@@ -57,10 +57,10 @@ export default {
activeButton: 0,
// 定义按钮与 line 数据中 key 的映射关系
buttonToDataKey: [
- '单价',
- '净价',
- '销量',
- '双镀销量' // 注意:数据中的 key 是“双镀面板”,按钮显示的是“双镀产品”
+ {name:'单价',unit:'元/㎡'},
+ {name:'净价',unit:'元/㎡'},
+ {name:'销量',unit:'万㎡'},
+ {name:'双镀销量',unit:'万㎡'}
]
};
},
@@ -69,7 +69,7 @@ export default {
xAxisData() {
const lineData = this.line || {};
// 获取当前激活按钮对应的数据
- const currentDataKey = this.buttonToDataKey[this.activeButton];
+ const currentDataKey = this.buttonToDataKey[this.activeButton].name;
const currentIndicatorData = lineData[currentDataKey];
// 使用 'target' 的键作为 x 轴,如果 'target' 不存在,则使用 'real' 的键
@@ -83,19 +83,20 @@ export default {
// 根据激活按钮动态返回对应 series 数据
currentSeries() {
const lineData = this.line || {};
- const currentDataKey = this.buttonToDataKey[this.activeButton];
+ const currentDataKey = this.buttonToDataKey[this.activeButton].name;
const chartData = lineData[currentDataKey];
if (!chartData) {
- return [];
+ return {};
}
// 提取目标和实际数据的值,并确保顺序与 X 轴一致
const xAxisKeys = this.xAxisData;
const targetDataValues = xAxisKeys.map(date => chartData.target ? chartData.target[date] : 0);
const realDataValues = xAxisKeys.map(date => chartData.real ? chartData.real[date] : 0);
-
- return [
+ let obj = {
+ unit:this.buttonToDataKey[this.activeButton].unit,
+ series:[
{
name: '预算',
type: 'line',
@@ -136,7 +137,8 @@ export default {
},
data: realDataValues
}
- ];
+ ]}
+ return obj;
}
}
};
diff --git a/src/views/home/components/coreBottomLeft.vue b/src/views/home/components/coreBottomLeft.vue
index 62bf0a31..da118055 100644
--- a/src/views/home/components/coreBottomLeft.vue
+++ b/src/views/home/components/coreBottomLeft.vue
@@ -6,8 +6,8 @@
-
+
@@ -43,20 +43,13 @@ export default {
maintenanceTasks: [
{ id: 1, name: '纯碱', number: '1313,252', },
{ id: 2, name: '硅砂', number: '14,252', },
- { id: 2, name: '白云石', number: '23,252', },
- { id: 2, name: '石灰石', number: '34,421', },
- { id: 2, name: '氧化铝', number: '1,251.34', },
- { id: 2, name: '氢氧化铝', number: '14,252', },
-
- // { id: 2, eqName: '螺杆挤出', taskName: '例行维护', },
- // { id: 2, eqName: '螺杆挤出', taskName: '例行维护', },
- // { id: 2, eqName: '螺杆挤出', taskName: '例行维护', },
- // { id: 2, eqName: '螺杆挤出', taskName: '例行维护', },
- // { id: 2, eqName: '螺杆挤出', taskName: '例行维护', },
+ { id: 3, name: '白云石', number: '23,252', },
+ { id: 4, name: '石灰石', number: '34,421', },
+ { id: 5, name: '氧化铝', number: '1,251.34', },
+ { id: 6, name: '氢氧化铝', number: '14,252', }
],
tableProps: [
- // { prop: 'id', label: '序号', width: 50, align: 'center' },
{ prop: 'name', label: '物料', align: 'left' },
{ prop: 'number', label: '库存/吨', align: 'left' },
]
@@ -102,7 +95,7 @@ export default {
return {
id: index + 1, // id 从 1 开始自增
name: name, // 物料名称
- number: String(value) // 将数值转换为字符串,以匹配 "number" 字段
+ number: value ? String(value) : '-' // 将数值转换为字符串,以匹配 "number" 字段
};
});
}
diff --git a/src/views/home/components/coresBar.vue b/src/views/home/components/coresBar.vue
index e8572065..102977ad 100644
--- a/src/views/home/components/coresBar.vue
+++ b/src/views/home/components/coresBar.vue
@@ -1,5 +1,5 @@
-
+