|
|
@@ -68,7 +68,7 @@
|
|
|
</el-form>
|
|
|
</ContentWrap>
|
|
|
|
|
|
- <!-- 新增数据统计区域 -->
|
|
|
+ <!-- 数据统计区域 -->
|
|
|
<ContentWrap class="mb-15px">
|
|
|
<div class="statistics-container">
|
|
|
<div class="stat-item" :style="{ color: totalColor }">
|
|
|
@@ -89,6 +89,14 @@
|
|
|
{{ statistics.unFilled || '-' }}
|
|
|
</span>
|
|
|
</div>
|
|
|
+ <div class="stat-item" :style="{ color: '#0099CC' }">
|
|
|
+ <span>累计注水量(方):</span>
|
|
|
+ <span>{{ statistics.totalWaterInjection || '-' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="stat-item" :style="{ color: '#FF9900' }">
|
|
|
+ <span>累计注气量(万方):</span>
|
|
|
+ <span>{{ statistics.totalGasInjection || '-' }}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</ContentWrap>
|
|
|
|
|
|
@@ -291,8 +299,11 @@ const rootDeptId = ref(157)
|
|
|
const statistics = ref({
|
|
|
total: '-',
|
|
|
filled: '-',
|
|
|
- unFilled: '-'
|
|
|
+ unFilled: '-',
|
|
|
+ totalWaterInjection: '-', // 新增累计注水量
|
|
|
+ totalGasInjection: '-' // 新增累计注气量
|
|
|
})
|
|
|
+
|
|
|
const totalColor = '#00DD99'
|
|
|
const filledColor = '#0055BB'
|
|
|
const unFilledColor = '#FF5500'
|
|
|
@@ -302,6 +313,12 @@ const tableRef = ref()
|
|
|
// 表格容器引用
|
|
|
const tableContainerRef = ref()
|
|
|
|
|
|
+// 工作量统计相关变量
|
|
|
+const workloadStatistics = ref({
|
|
|
+ totalWaterInjection: '-',
|
|
|
+ totalGasInjection: '-'
|
|
|
+})
|
|
|
+
|
|
|
// 列宽度配置
|
|
|
const columnWidths = ref({
|
|
|
deptName: '120px',
|
|
|
@@ -431,6 +448,9 @@ const getList = async () => {
|
|
|
// 获取统计数据
|
|
|
await getStatistics()
|
|
|
|
|
|
+ // 获取工作量统计数据
|
|
|
+ await getWorkloadStatistics()
|
|
|
+
|
|
|
// 获取数据后计算列宽
|
|
|
nextTick(() => {
|
|
|
calculateColumnWidths();
|
|
|
@@ -617,6 +637,33 @@ const calculateColumnWidths = () => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+// 获取工作量统计数据的方法
|
|
|
+const getWorkloadStatistics = async () => {
|
|
|
+ // 重置工作量统计数据
|
|
|
+ statistics.value.totalWaterInjection = '-'
|
|
|
+ statistics.value.totalGasInjection = '-'
|
|
|
+
|
|
|
+ try {
|
|
|
+ const res = await IotRhDailyReportApi.totalWorkload(queryParams)
|
|
|
+
|
|
|
+ // 处理工作量统计数据
|
|
|
+ if (res) {
|
|
|
+ // 累计注水量直接显示,单位:方
|
|
|
+ statistics.value.totalWaterInjection = res.totalWaterInjection || '-'
|
|
|
+
|
|
|
+ // 累计注气量需要转换:方 -> 万方 (除以10000)
|
|
|
+ if (res.totalGasInjection) {
|
|
|
+ const gasInjection = parseFloat(res.totalGasInjection)
|
|
|
+ statistics.value.totalGasInjection = (gasInjection / 10000).toFixed(2)
|
|
|
+ } else {
|
|
|
+ statistics.value.totalGasInjection = '-'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取工作量统计数据失败', error)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/** 搜索按钮操作 */
|
|
|
const handleQuery = () => {
|
|
|
queryParams.pageNo = 1
|
|
|
@@ -628,6 +675,8 @@ const resetQuery = () => {
|
|
|
queryFormRef.value.resetFields()
|
|
|
// 重置后需要重新获取统计数据
|
|
|
getStatistics()
|
|
|
+ // 重新获取工作量统计数据
|
|
|
+ getWorkloadStatistics()
|
|
|
handleQuery()
|
|
|
}
|
|
|
|
|
|
@@ -828,7 +877,7 @@ watch(list, () => {
|
|
|
.statistics-container {
|
|
|
display: flex;
|
|
|
justify-content: space-around;
|
|
|
- padding: 15px 0;
|
|
|
+ padding: 10px 0;
|
|
|
}
|
|
|
|
|
|
.stat-item {
|
|
|
@@ -836,5 +885,11 @@ watch(list, () => {
|
|
|
text-align: center;
|
|
|
font-size: 16px;
|
|
|
font-weight: 500;
|
|
|
+ min-width: 0; /* 防止内容溢出 */
|
|
|
+}
|
|
|
+
|
|
|
+/* 确保统计项内容不换行 */
|
|
|
+.stat-item span {
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
|
</style>
|