diff --git a/pages.json b/pages.json
index a9290f3..f8b6a3c 100644
--- a/pages.json
+++ b/pages.json
@@ -176,6 +176,15 @@
// "navigationBarTextStyle": "white"
}
},
+ {
+ "path": "pages/views/shengchan/ribaoshuju/rbsjLsxq",
+ "style": {
+ // "navigationStyle": "custom"
+ "navigationBarTitleText": "历史详情",
+ "enablePullDownRefresh": false,
+ "navigationBarTextStyle": "white"
+ }
+ },
{
"path": "pages/userlist/index",
"style": {
diff --git a/pages/product/NatrueGas/index.vue b/pages/product/NatrueGas/index.vue
deleted file mode 100644
index c3d2a27..0000000
--- a/pages/product/NatrueGas/index.vue
+++ /dev/null
@@ -1,444 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {{ item.gas }}
-
- 当日量:
- {{ item.dailyVolume }}
- 年累计:
- {{ item.yearVolume }}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/product/index.vue b/pages/product/index.vue
deleted file mode 100644
index 2526a18..0000000
--- a/pages/product/index.vue
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
- 生产经营数据
-
-
-
-
-
-
-
-
diff --git a/pages/views/renliziyuan/renyuanxinxi/tongji.vue b/pages/views/renliziyuan/renyuanxinxi/tongji.vue
index d16d0d2..5b20670 100644
--- a/pages/views/renliziyuan/renyuanxinxi/tongji.vue
+++ b/pages/views/renliziyuan/renyuanxinxi/tongji.vue
@@ -6,8 +6,7 @@
-
+
@@ -72,7 +71,7 @@
- 详情
+ 详情
@@ -83,295 +82,290 @@
\ No newline at end of file
+/* 内容样式 */
+.dataStyle {
+ max-font-size: 14px;
+ /* 最大字体限制 */
+ min-font-size: 10px;
+ /* 最小字体限制 */
+ font-size: 12px;
+ color: #00007f;
+ line-height: 30px;
+ height: 30px;
+ font-weight: 500;
+ text-align: center;
+ vertical-align: middle;
+ border-bottom: 1px solid #919191;
+ border-left: 1px solid #919191;
+ text-overflow: ellipsis;
+}
+
diff --git a/pages/views/shengchan/ribaoshuju/rbsjLsxq.vue b/pages/views/shengchan/ribaoshuju/rbsjLsxq.vue
new file mode 100644
index 0000000..bb12a63
--- /dev/null
+++ b/pages/views/shengchan/ribaoshuju/rbsjLsxq.vue
@@ -0,0 +1,239 @@
+
+
+
+
+
+
+
+
+
+
+
+ 最大值: {{ dataStats.max }}
+ 最小值: {{ dataStats.min }}
+ 平均值: {{ dataStats.average }}
+
+
+
+
+
+
+
+ {{ index + 1 }}
+ {{ item.unit }}
+ {{ item.rqDate }}
+
+ {{ item.rq }}
+
+
+
+
+ 暂无相关数据
+
+
+
+
+
+
+
+
diff --git a/pages/views/shengchan/ribaoshuju/trqRbsj.vue b/pages/views/shengchan/ribaoshuju/trqRbsj.vue
index 345c1e9..a24c5a0 100644
--- a/pages/views/shengchan/ribaoshuju/trqRbsj.vue
+++ b/pages/views/shengchan/ribaoshuju/trqRbsj.vue
@@ -1,6 +1,11 @@
-
+
+
+
+
+
+ 全年时间进度:{{ timePercent }}%
@@ -14,6 +19,12 @@
年累计
{{ item.yearVolume || '-' }}
+
+
+
+
+ {{ item.yearPerCent }}%
+
@@ -25,424 +36,476 @@
-
-
-
-
-
+
+
+
+
-
- {{ index }}
+
+ {{ index + 1 }}
{{ item.unit }}
{{ formatNumber(item.rq) }}
-
- {{ formatNumber(item.totalGas) }}
{{ formatNumber(item.yearVolume) }}
+ 历史
-
- 暂无相关数据
-
-
-
+ 暂无相关数据
+
+
-
\ No newline at end of file
diff --git a/pages/views/shengchan/ribaoshuju/yyRbsj.vue b/pages/views/shengchan/ribaoshuju/yyRbsj.vue
index eea775c..8ada7a8 100644
--- a/pages/views/shengchan/ribaoshuju/yyRbsj.vue
+++ b/pages/views/shengchan/ribaoshuju/yyRbsj.vue
@@ -18,6 +18,19 @@
年累计
{{ item.nl || '-' }}
+
+
+
+
+
+ {{ item.yearPerCent }}%
+
@@ -36,13 +49,13 @@
序号
名称
日油量
- 月累计
- 年累计
+ 月累计
+ 年累计
+ 操作
-
+
{{ index }}
{{ item.dw }}
@@ -52,275 +65,305 @@
{{ formatNumber(item.nl) }}
+ 历史
-
- 暂无相关数据
-
+ 暂无相关数据
-
\ No newline at end of file
+}
+.progress-item {
+ margin-bottom: 20px;
+}
+
+.progress-bar {
+ position: relative;
+ height: 20px;
+ background: #f0f0f0;
+ border-radius: 10px;
+ overflow: hidden;
+}
+
+.progress {
+ height: 100%;
+ transition: all 0.3s;
+}
+
+.progress-text {
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+ color: red; /* 保持红色 */
+ font-size: 12px;
+ font-weight: bold;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* 提升可读性 */
+}
+
diff --git a/utils/dateTime.js b/utils/dateTime.js
index 9095266..f614bbe 100644
--- a/utils/dateTime.js
+++ b/utils/dateTime.js
@@ -52,8 +52,67 @@ function getDateAfterDays(date, days) {
return newDate;
}
+function getDateAfterMonths(date, months) {
+ const newDate = new Date(date);
+ const originalDate = date.getDate();
+
+ // 保存原始年月日
+ const originalYear = date.getFullYear();
+ const originalMonth = date.getMonth();
+
+ // 计算目标年月
+ const totalMonths = originalMonth + months;
+ const expectedYear = originalYear + Math.floor(totalMonths / 12);
+ const expectedMonth = totalMonths % 12;
+
+ // 尝试设置新月份
+ newDate.setMonth(totalMonths);
+
+ // 处理月末边界情况
+ if (
+ newDate.getFullYear() !== expectedYear ||
+ newDate.getMonth() !== expectedMonth
+ ) {
+ // 当设置月份失败时(如1月31日设置到2月)
+ // 设置为目标月份的最后一天
+ newDate.setFullYear(expectedYear, expectedMonth + 1, 0);
+ } else if (newDate.getDate() !== originalDate) {
+ // 当日期自动变化时(如1月30日设置到2月)
+ // 同样设置为目标月份的最后一天
+ newDate.setDate(0);
+ }
+
+ return newDate;
+}
+
+
+//计算当前日期占全年的进度数据
+// 示例用法
+// console.log(getYearProgress()); // 输出如 "35.42%"
+function getYearProgress() {
+ const now = new Date(); // 当前时间
+ const year = now.getFullYear();
+
+ // 关键时间点
+ const yearStart = new Date(year, 0, 1); // 当年1月1日
+ const nextYearStart = new Date(year + 1, 0, 1); // 下一年1月1日
+
+ // 计算时间差(毫秒)
+ const totalMs = nextYearStart - yearStart; // 全年总时长
+ const passedMs = now - yearStart; // 已过时长
+
+ // 计算百分比(保留2位小数)
+ const progress = ((passedMs / totalMs) * 100).toFixed(2);
+
+ return parseFloat(progress);
+}
+
+
+
export {
formatDate,
getDateAfterDays,
- getDaysDifference
+ getDaysDifference,
+ getDateAfterMonths,
+ getYearProgress
}
\ No newline at end of file