优化生产数据表格显示
This commit is contained in:
parent
87188cb3f9
commit
f7adf50bb3
@ -18,7 +18,7 @@ export default defineManifestConfig({
|
||||
appid: VITE_UNI_APPID,
|
||||
description: '',
|
||||
versionName: '2.0.0',
|
||||
versionCode: '20250604',
|
||||
versionCode: '20250605',
|
||||
transformPx: false,
|
||||
locale: VITE_FALLBACK_LOCALE, // 'zh-Hans'
|
||||
/* 5+App特有相关 */
|
||||
|
@ -3,7 +3,7 @@
|
||||
"appid": "__UNI__9F097F0",
|
||||
"description": "",
|
||||
"versionName": "2.0.0",
|
||||
"versionCode": "20250604",
|
||||
"versionCode": "20250605",
|
||||
"transformPx": false,
|
||||
"app-plus": {
|
||||
"usingComponents": true,
|
||||
|
@ -168,7 +168,12 @@
|
||||
},
|
||||
{
|
||||
"path": "pages/production/ribaoshuju/rbsjLsxq",
|
||||
"type": "page"
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "历史数据"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/production/ribaoshuju/trqRbsj",
|
||||
|
@ -99,7 +99,6 @@
|
||||
});
|
||||
|
||||
onHide(()=>{ //切换首页后,将生产切换为日本数据以清楚定时 by闵
|
||||
console.log(555555)
|
||||
current.value = 0;
|
||||
})
|
||||
|
||||
|
@ -1,5 +1,14 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: '历史数据',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<PageLayout :navbarShow="false">
|
||||
<PageLayout navTitle="历史数据">
|
||||
<view class="stats-container">
|
||||
<uni-title v-if="type === 'trq'" :title="name.unit + '天然气---单位(万方)'" color="blue" type="h2"></uni-title>
|
||||
<uni-title v-if="type === 'yy'" :title="name.dw + '原油---单位(吨)'" color="blue" type="h2"></uni-title>
|
||||
@ -18,54 +27,19 @@
|
||||
<view class="stats-item">最小值: {{ dataStats.min }}</view>
|
||||
<view class="stats-item">平均值: {{ dataStats.average }}</view>
|
||||
</view>
|
||||
|
||||
<wd-table :data="dataList" :height="800" v-if="type === 'trq'" :index="true">
|
||||
<wd-table-col prop="unit" label="名称" :width="screenWidth / 3" align="center"></wd-table-col>
|
||||
<wd-table-col prop="rqDate" label="日期" :width="screenWidth / 4" align="center"></wd-table-col>
|
||||
<wd-table-col prop="rq" label="日气量" :width="screenWidth / 5" align="center"></wd-table-col>
|
||||
</wd-table>
|
||||
|
||||
<view v-if="type === 'trq'" class="table-container">
|
||||
<!-- 表头 -->
|
||||
<view class="tr header">
|
||||
<view class="th1">序号</view>
|
||||
<view class="th">名称</view>
|
||||
<view class="th">日期</view>
|
||||
<view class="th">日气量</view>
|
||||
</view>
|
||||
<scroll-view scroll-Y="true" class="scroll-wrapper">
|
||||
<!-- 表格内容 -->
|
||||
<view class="tr" v-for="(item, index) in dataList" :key="index" :class="{ even: index % 2 === 0 }">
|
||||
<view class="td1">{{ index + 1 }}</view>
|
||||
<view class="td">{{ item.unit }}</view>
|
||||
<view class="td">{{ item.rqDate }}</view>
|
||||
<view class="td" :class="{ negative: item.rq < 0 }">
|
||||
{{ item.rq }}
|
||||
</view>
|
||||
</view>
|
||||
<wd-table :data="dataList" :height="800" v-if="type === 'yy'" :index="true">
|
||||
<wd-table-col prop="dw" label="名称" :width="screenWidth / 3" align="center"></wd-table-col>
|
||||
<wd-table-col prop="scrq" label="日期" :width="screenWidth / 4" align="center"></wd-table-col>
|
||||
<wd-table-col prop="rcwy" label="日油量" :width="screenWidth / 5" align="center"></wd-table-col>
|
||||
</wd-table>
|
||||
|
||||
<!-- 空数据提示 -->
|
||||
<view v-if="!dataList.length" class="empty">暂无相关数据</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view v-if="type === 'yy'" class="table-container">
|
||||
<!-- 表头 -->
|
||||
<view class="tr header">
|
||||
<view class="th1">序号</view>
|
||||
<view class="th">名称</view>
|
||||
<view class="th">日期</view>
|
||||
<view class="th">日油量</view>
|
||||
</view>
|
||||
<scroll-view scroll-Y="true" class="scroll-wrapper">
|
||||
<!-- 表格内容 -->
|
||||
<view class="tr" v-for="(item, index) in dataList" :key="index" :class="{ even: index % 2 === 0 }">
|
||||
<view class="td1">{{ index + 1 }}</view>
|
||||
<view class="td">{{ item.dw }}</view>
|
||||
<view class="td">{{ item.scrq }}</view>
|
||||
<view class="td" :class="{ negative: item.rcwy < 0 }">
|
||||
{{ item.rcwy }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 空数据提示 -->
|
||||
<view v-if="!dataList.length" class="empty">暂无相关数据</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</PageLayout>
|
||||
</template>
|
||||
@ -91,6 +65,11 @@
|
||||
max: 0,
|
||||
avg: 0
|
||||
});
|
||||
const screenWidth = ref(0)
|
||||
const calculateTableHeight = () => {
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
screenWidth.value = systemInfo.screenWidth;
|
||||
}
|
||||
const getJinriShengchansj = (tempDateRange) => {
|
||||
// console.log(tempDateRange);
|
||||
// 添加日期有效性检查
|
||||
@ -232,6 +211,11 @@
|
||||
onMounted(() => {
|
||||
// nextTick();
|
||||
// getJinriShengchansj(dateRange.value);
|
||||
calculateTableHeight();
|
||||
// 监听屏幕旋转变化
|
||||
uni.onWindowResize(() => {
|
||||
calculateTableHeight();
|
||||
});
|
||||
});
|
||||
|
||||
onLoad((options) => {
|
||||
@ -253,70 +237,6 @@
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.table-container {
|
||||
width: 100%;
|
||||
height: 40vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.scroll-wrapper {
|
||||
width: 100%;
|
||||
height: 35vh;
|
||||
}
|
||||
|
||||
.tr {
|
||||
display: flex;
|
||||
min-height: 14px;
|
||||
font-size: 12px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
}
|
||||
|
||||
.th,
|
||||
.td {
|
||||
flex: 1;
|
||||
min-width: 80px;
|
||||
padding: 10px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
height: 18px;
|
||||
vertical-align: middle;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.th1,
|
||||
.td1 {
|
||||
flex: 1;
|
||||
max-width: 40px;
|
||||
padding: 10px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
height: 14px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.th {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.td.negative {
|
||||
color: #ff4444;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.empty {
|
||||
padding: 40px;
|
||||
text-align: center;
|
||||
color: #888;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.stats-container {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
|
@ -48,42 +48,19 @@
|
||||
</view>
|
||||
</wd-popup>
|
||||
<!-- 数据弹窗 -->
|
||||
<wd-popup v-model="popup" position="bottom" background-color="#fff">
|
||||
<view class="popup-content">
|
||||
<view class="popup-header">
|
||||
<text class="title">{{ selectedGas }}数据详情 单位(万立方米)</text>
|
||||
<uni-icons type="closeempty" size="24" color="#666" @click="closePopup"></uni-icons>
|
||||
</view>
|
||||
|
||||
<view class="table">
|
||||
<!-- 表头 -->
|
||||
<view class="tr header">
|
||||
<view class="th1">序号</view>
|
||||
<view class="th">名称</view>
|
||||
<view class="th">日气量</view>
|
||||
<view class="th">年累计</view>
|
||||
<view class="th1">操作</view>
|
||||
</view>
|
||||
<scroll-view scroll-X="true" scroll-Y="true" class="table-container">
|
||||
<!-- 表格内容 -->
|
||||
<view class="tr" v-for="(item, index) in filteredData" :key="index"
|
||||
:class="{ even: index % 2 === 0 }">
|
||||
<view class="td1">{{ index + 1 }}</view>
|
||||
<view class="td">{{ item.unit }}</view>
|
||||
<view class="td" :class="{ negative: item.rq < 0 }">
|
||||
{{ formatNumber(item.rq) }}
|
||||
</view>
|
||||
<view class="td" :class="{ negative: item.yearVolume < 0 }">
|
||||
{{ formatNumber(item.yearVolume) }}
|
||||
</view>
|
||||
<view class="td1" style="color: red" @click="goHistory(item)">历史</view>
|
||||
</view>
|
||||
|
||||
<!-- 空数据提示 -->
|
||||
<view v-if="!filteredData.length" class="empty">暂无相关数据</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<wd-popup v-model="popup" position="bottom" closable custom-style="height: 400px;" @close="handleClose">
|
||||
<wd-cell-group :title="tableTitle">
|
||||
<wd-table :data="filteredData" :height="800">
|
||||
<wd-table-col prop="unit" label="名称" :width="screenWidth * 57 / 140 " align="center"></wd-table-col>
|
||||
<wd-table-col prop="rq" label="日气量" :width="screenWidth / 5" align="center"></wd-table-col>
|
||||
<wd-table-col prop="yearVolume" label="年累计" :width="screenWidth / 4" align="center"></wd-table-col>
|
||||
<wd-table-col prop="" label="操作" :width="screenWidth / 7" align="center">
|
||||
<template #value="{row}">
|
||||
<text style="color: red;" @click="goHistory(row)">历史</text>
|
||||
</template>
|
||||
</wd-table-col>
|
||||
</wd-table>
|
||||
</wd-cell-group>
|
||||
</wd-popup>
|
||||
</template>
|
||||
|
||||
@ -102,7 +79,7 @@
|
||||
const shishiArrSelect = ref([]);
|
||||
const shishiArrDisplay = ref(['气井气', '商品量', '站线综合输差']);
|
||||
const dataJinriUnit = ref([]);
|
||||
const selectedGas = ref('');
|
||||
const tableTitle = ref('')
|
||||
const filteredData = ref([]);
|
||||
const popup = ref(false);
|
||||
const popupSelect = ref(false);
|
||||
@ -117,12 +94,13 @@
|
||||
const splNdjs = ref(7220);
|
||||
const zhqNdjs = ref(300);
|
||||
const zhscNdjs = ref(50);
|
||||
|
||||
|
||||
|
||||
const screenWidth = ref(0)
|
||||
const handleClose = () => {
|
||||
popup.value = false
|
||||
}
|
||||
|
||||
// 点击卡片处理
|
||||
// const handleCardClick = (gas) => {
|
||||
// selectedGas.value = gas;
|
||||
// let queryParms = {};
|
||||
// filteredData.value = [];
|
||||
// queryParms.day = strDate.value;
|
||||
@ -173,19 +151,37 @@
|
||||
};
|
||||
|
||||
const handleCardClick = (gas) => {
|
||||
selectedGas.value = gas;
|
||||
tableTitle.value = gas + '数据详情 单位(万立方米)'
|
||||
filteredData.value = dataJinriSumUnit.value.filter((item) => item.gas === gas);
|
||||
filteredData.value = filteredData.value.map(item => {
|
||||
return {
|
||||
...item,
|
||||
rq: formatNumber(item.rq),
|
||||
yearVolume: formatNumber(item.yearVolume)
|
||||
}
|
||||
})
|
||||
popup.value = true;
|
||||
|
||||
};
|
||||
|
||||
// 关闭弹窗
|
||||
const closePopup = () => {
|
||||
popup.value = false;
|
||||
};
|
||||
|
||||
const calculateTableHeight = () => {
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
screenWidth.value = systemInfo.screenWidth;
|
||||
}
|
||||
onMounted(() => {
|
||||
getJinriTrqShengchansj();
|
||||
|
||||
getJinriShengchansj();
|
||||
|
||||
calculateTableHeight();
|
||||
// 监听屏幕旋转变化
|
||||
uni.onWindowResize(() => {
|
||||
calculateTableHeight();
|
||||
});
|
||||
});
|
||||
|
||||
// 数字格式化
|
||||
@ -202,7 +198,6 @@
|
||||
|
||||
// 自动计算综合输差
|
||||
function calcZhsc(tempArray) {
|
||||
console.log(tempArray)
|
||||
let totalJinqi = {
|
||||
gas: '总进气',
|
||||
dailyVolume: 0,
|
||||
@ -274,8 +269,6 @@
|
||||
tempArray.push(trqSpl);
|
||||
|
||||
return tempArray;
|
||||
|
||||
// console.log(composite);
|
||||
}
|
||||
|
||||
const getJinriTrqShengchansj = () => {
|
||||
@ -287,9 +280,7 @@
|
||||
}
|
||||
let queryParms = {};
|
||||
shishiArr.value = [];
|
||||
|
||||
queryParms.day = strDate.value;
|
||||
// // console.log(queryParms);
|
||||
queryJinriTrqShengchansj(queryParms).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(1, res);
|
||||
@ -301,13 +292,9 @@
|
||||
item.yearPerCent = calcPercent(item.yearPlan, item.yearVolume);
|
||||
}
|
||||
});
|
||||
console.log(2, temp);
|
||||
console.log(calcZhsc(temp))
|
||||
shishiArr.value = calcZhsc(temp);
|
||||
nextTick();
|
||||
onselectionchange();
|
||||
console.log(3, shishiArr.value);
|
||||
console.log(4, shishiArrSelect.value);
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -345,13 +332,10 @@
|
||||
dataJinriSumUnit.value = [];
|
||||
queryParms.rqDate = strDate.value;
|
||||
queryParms.pageSize = 100;
|
||||
// console.log(queryParms);
|
||||
queryJinriShengchansj(queryParms).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res);
|
||||
dataJinri.value = res.result.records;
|
||||
dataJinriSumUnit.value = sumByUnit(dataJinri.value); //包含gas unit rq cq totalGas
|
||||
console.log(dataJinriSumUnit.value);
|
||||
// // 使用 nextTick 等待 DOM 更新
|
||||
nextTick();
|
||||
getYearShengchansj(); //再获取今年以来的数据
|
||||
@ -364,15 +348,10 @@
|
||||
let queryParms = {};
|
||||
queryParms.yearStart = year;
|
||||
queryParms.yearEnd = year;
|
||||
|
||||
// // console.log(2, queryParms.value);
|
||||
queryYearShengchansj(queryParms).then((res) => {
|
||||
if (res.success) {
|
||||
try {
|
||||
// // console.log(res.result);
|
||||
let yearData = res.result[year];
|
||||
// console.log(dataJinriSumUnit.value.length, dataJinriSumUnit.value, yearData.length,
|
||||
// yearData);
|
||||
dataJinriSumUnit.value.forEach((item) => {
|
||||
yearData.forEach((itemYear) => {
|
||||
// // console.log(item, itemYear);
|
||||
@ -382,7 +361,6 @@
|
||||
});
|
||||
});
|
||||
dataJinriSum.value = sumByGas(dataJinriSumUnit.value);
|
||||
// console.log(dataJinriSum.value);
|
||||
shishiArr.value.forEach((item) => {
|
||||
dataJinriSum.value.forEach((itemjinri) => {
|
||||
if (item.gas === itemjinri.gas) {
|
||||
@ -399,7 +377,6 @@
|
||||
};
|
||||
|
||||
function sumByGas(records) {
|
||||
// console.log(records);
|
||||
const summaryMap = {};
|
||||
try {
|
||||
records.forEach((record) => {
|
||||
@ -574,88 +551,6 @@
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
padding: 30rpx;
|
||||
max-height: 40vh;
|
||||
}
|
||||
|
||||
.popup-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 30rpx;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 2rpx solid #eee;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.table-container {
|
||||
width: 100%;
|
||||
height: 30vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.table {
|
||||
min-width: 100%;
|
||||
border: 2rpx solid #e8e8e8;
|
||||
|
||||
.tr {
|
||||
display: flex;
|
||||
border-bottom: 2rpx solid #e8e8e8;
|
||||
|
||||
&.header {
|
||||
background-color: #fafafa;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
&.even {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
}
|
||||
|
||||
.th,
|
||||
.td {
|
||||
flex: 1;
|
||||
min-width: 80rpx;
|
||||
padding: 10rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
height: 30rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.th1,
|
||||
.td1 {
|
||||
flex: 1;
|
||||
max-width: 40rpx;
|
||||
padding: 10rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
height: 30rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.th {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.td.negative {
|
||||
color: #ff4444;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
padding: 40rpx;
|
||||
text-align: center;
|
||||
@ -664,7 +559,7 @@
|
||||
}
|
||||
|
||||
.card-item {
|
||||
flex: 1 1 200rpx; // 基础宽度300rpx,自动伸缩 selectedGas formatNumber
|
||||
flex: 1 1 200rpx; // 基础宽度300rpx,自动伸缩 formatNumber
|
||||
min-width: 240rpx;
|
||||
max-width: calc(50% - 10rpx); // 最大不超过容器一半(考虑间距)
|
||||
|
||||
@ -710,10 +605,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.progress-item {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
position: relative;
|
||||
height: 20px;
|
||||
|
@ -39,44 +39,20 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 数据弹窗 -->
|
||||
<wd-popup v-model="popup" position="bottom" background-color="#fff">
|
||||
<view class="popup-content">
|
||||
<view class="popup-header">
|
||||
<text class="title">原油数据详情 单位(吨)</text>
|
||||
<wd-icon name="closeempty" size="24" @click="closePopup"></wd-icon>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-X="true" scroll-Y="true" class="table-container">
|
||||
<view class="table">
|
||||
<!-- 表头 -->
|
||||
<view class="tr header">
|
||||
<view class="th1">序号</view>
|
||||
<view class="th">名称</view>
|
||||
<view class="th">日油量</view>
|
||||
<view class="th">月累计</view>
|
||||
<view class="th">年累计</view>
|
||||
<view class="th1">操作</view>
|
||||
</view>
|
||||
|
||||
<!-- 表格内容 -->
|
||||
<view class="tr" v-for="(item, index) in dataJinri" :key="index" :class="{ even: index % 2 === 0 }">
|
||||
<view class="td1">{{ index }}</view>
|
||||
<view class="td">{{ item.dw }}</view>
|
||||
<view class="td">
|
||||
{{ formatNumber(item.rcwy) }}
|
||||
</view>
|
||||
<view class="td">{{ formatNumber(item.yl) }}</view>
|
||||
<view class="td">
|
||||
{{ formatNumber(item.nl) }}
|
||||
</view>
|
||||
<view class="td1" style="color: red" @click="goHistory(item)">历史</view>
|
||||
</view>
|
||||
|
||||
<!-- 空数据提示 -->
|
||||
<view v-if="!dataJinri.length" class="empty">暂无相关数据</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<wd-popup v-model="popup" position="bottom" closable custom-style="height: 400px;" @close="handleClose">
|
||||
<wd-cell-group title="原油数据详情 单位(吨)">
|
||||
<wd-table :data="dataJinri" :height="800">
|
||||
<wd-table-col prop="dw" label="名称" :width="screenWidth * 29 / 140" align="center"></wd-table-col>
|
||||
<wd-table-col prop="rcwy" label="日油量" :width="screenWidth / 5" align="center"></wd-table-col>
|
||||
<wd-table-col prop="yl" label="月累计" :width="screenWidth / 5" align="center"></wd-table-col>
|
||||
<wd-table-col prop="nl" label="年累计" :width="screenWidth / 4" align="center"></wd-table-col>
|
||||
<wd-table-col prop="" label="操作" :width="screenWidth / 7" align="center">
|
||||
<template #value="{row}">
|
||||
<text style="color: red;" @click="goHistory(row)">历史</text>
|
||||
</template>
|
||||
</wd-table-col>
|
||||
</wd-table>
|
||||
</wd-cell-group>
|
||||
</wd-popup>
|
||||
</template>
|
||||
|
||||
@ -96,7 +72,7 @@
|
||||
yearPlan: '1500',
|
||||
yearPerCent: ''
|
||||
}]);
|
||||
|
||||
const screenWidth = ref(0)
|
||||
const dataJinri = ref([]);
|
||||
const dataJinriSum = ref([]);
|
||||
const popup = ref(false);
|
||||
@ -112,6 +88,11 @@
|
||||
onMounted(() => {
|
||||
getJinriYuanyouShengchansj();
|
||||
// getYearShengchansj();
|
||||
calculateTableHeight();
|
||||
// 监听屏幕旋转变化
|
||||
uni.onWindowResize(() => {
|
||||
calculateTableHeight();
|
||||
});
|
||||
});
|
||||
|
||||
const strDate = ref('');
|
||||
@ -120,12 +101,19 @@
|
||||
if (typeof num !== 'number') return '-';
|
||||
return num.toFixed(4).replace(/\.?0+$/, '');
|
||||
};
|
||||
const handleClose = () => {
|
||||
popup.value = false
|
||||
}
|
||||
|
||||
function goHistory(val) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/production/ribaoshuju/rbsjLsxq?data=' + JSON.stringify(val) + '&type=yy'
|
||||
});
|
||||
}
|
||||
const calculateTableHeight = () => {
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
screenWidth.value = systemInfo.screenWidth;
|
||||
}
|
||||
const getJinriYuanyouShengchansj = () => {
|
||||
const now = new Date();
|
||||
if (now.getHours() < 11) {
|
||||
@ -138,10 +126,8 @@
|
||||
dataJinriSum.value = [];
|
||||
queryParms.scrq = strDate.value;
|
||||
queryParms.pageSize = 100;
|
||||
// // console.log(queryParms);
|
||||
queryJinriYuanyouShengchansj(queryParms).then((res) => {
|
||||
if (res.success) {
|
||||
// // console.log(res);
|
||||
dataJinri.value = res.result.records;
|
||||
dataJinriSum.value = sumByOil(dataJinri.value); //包含gas unit rq cq totalGas
|
||||
// // console.log(dataJinriSum.value);
|
||||
@ -154,6 +140,15 @@
|
||||
item.yearPerCent = calcPercent(item.yearPlan, item.nl);
|
||||
});
|
||||
});
|
||||
|
||||
dataJinri.value = dataJinri.value.map(item => {
|
||||
return {
|
||||
...item,
|
||||
rcwy: formatNumber(item.rcwy),
|
||||
yl: formatNumber(item.yl),
|
||||
nl: formatNumber(item.nl)
|
||||
}
|
||||
})
|
||||
// getYearShengchansj(); //再获取今年以来的数据
|
||||
}
|
||||
});
|
||||
@ -247,93 +242,6 @@
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
padding: 30rpx;
|
||||
max-height: 70vh;
|
||||
}
|
||||
|
||||
.popup-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 30rpx;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 2rpx solid #eee;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.table-container {
|
||||
width: 100%;
|
||||
height: 30vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.table {
|
||||
min-width: 100%;
|
||||
border: 2rpx solid #e8e8e8;
|
||||
|
||||
.tr {
|
||||
display: flex;
|
||||
border-bottom: 2rpx solid #e8e8e8;
|
||||
|
||||
&.header {
|
||||
background-color: #fafafa;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
&.even {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
}
|
||||
|
||||
.th,
|
||||
.td {
|
||||
flex: 1;
|
||||
min-width: 80rpx;
|
||||
padding: 10rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.th1,
|
||||
.td1 {
|
||||
flex: 1;
|
||||
max-width: 40rpx;
|
||||
padding: 10rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
height: 30rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.th {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.td.negative {
|
||||
color: #ff4444;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
padding: 40rpx;
|
||||
text-align: center;
|
||||
color: #888;
|
||||
font-size: 16rpx;
|
||||
}
|
||||
|
||||
.card-item {
|
||||
flex: 1 1 200rpx; // 基础宽度300rpx,自动伸缩 selectedGas formatNumber
|
||||
min-width: 200rpx;
|
||||
@ -381,10 +289,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.progress-item {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
position: relative;
|
||||
height: 20px;
|
||||
|
@ -3,18 +3,5 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
queryJinriShengchansj,
|
||||
queryYearShengchansj,
|
||||
queryJinriTrqShengchansj
|
||||
} from '@/api/production';
|
||||
import {
|
||||
formatDate,
|
||||
getDateAfterDays
|
||||
} from '@/utils/dateTime';
|
||||
import trqSssjVue from './trqSssj';
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user