Compare commits

...

5 Commits

Author SHA1 Message Date
Zhao Zhao Shen ef2910286d refactor: 样式优化 2025-03-12 17:09:25 +08:00
Zhao Zhao Shen 37ef302124 refactor: 样式优化 2025-03-12 16:50:24 +08:00
Zhao Zhao Shen 1bf80ea3fe fix: 当前值获取异常修复 & refactor: 点检表样式调整 2025-03-12 15:51:40 +08:00
Zhao Zhao Shen 89163ce339 fix: 修改点检确认 2025-03-12 14:32:57 +08:00
Zhao Zhao Shen 0ca3e6ddfb feat: 增加千分位显示 2025-03-12 11:30:18 +08:00
5 changed files with 175 additions and 89 deletions

View File

@ -42,10 +42,11 @@ export function exportExcel(deviceId, inputTime, shift) {
}
// 报警相关接口
// 时间点确认点检,不传时间,默认当前时间
export function sharpConfirm(alarmId, confirmTime, checkUser) {
// 时间点确认点检,传递多个 alarmId
export function sharpConfirm(alarmIdList, confirmTime, checkUser) {
const alarmIdParams = alarmIdList.map(id => `alarmIdList=${id}`).join('&');
return request({
url: `/Check/sharpConfirm?alarmId=${alarmId}&checkUser=${checkUser}`,
url: `/Check/sharpConfirm?${alarmIdParams}&checkUser=${checkUser}`,
method: 'post'
});
}
@ -57,4 +58,12 @@ export function alarmReasonConfirm(data) {
method: 'post',
data
})
}
// 查询某一报警信息
export function getAlarmReason(alarmId, checkParamId) {
return request({
url: `Check/GetAlarmReason?alarmId=${alarmId}&checkParamId=${checkParamId}`,
method: 'get'
})
}

View File

@ -6,17 +6,17 @@
<div class="block">
<div class="flex-row">
<h2 class="juice-title">果汁调配</h2>
<span class="flow-label">累计流量{{ totalTrafficJuice }}</span>
<span class="flow-label">累计流量{{ formatNumberWithCommas(totalTrafficJuice) }}</span>
</div>
<div class="spacing"></div>
<div v-for="item in progressList" :key="item.name" class="juice-item"
:data-device-id="item?.deviceId"
@click="handleBlockClick(item?.deviceId, item.name, false)">
@click="handleBlockClick(item?.deviceId, item.aliasName, false)">
<span class="juice-name">{{ item.name }}</span>
<div class="progress-bar" style="cursor: pointer;">
<div class="progress"
:style="{ width: item.rate + '%', background: filterStatusColor(item.deviceStatus) }">
<span class="progress-text">{{ item.value }}</span>
<span class="progress-text">{{ formatNumberWithCommas(item.value) }}</span>
</div>
</div>
<img style="padding-left: 1rem;" v-if="item.rate < 10" src="@/assets/alarm.svg" />
@ -25,17 +25,17 @@
<div class="block">
<div class="flex-row">
<h2 class="juice-title">果肉调配</h2>
<span class="flow-label">累计流量{{ totalTrafficPulp }}</span>
<span class="flow-label">累计流量{{ formatNumberWithCommas(totalTrafficPulp) }}</span>
</div>
<div class="spacing"></div>
<div v-for="item in innerProgressList" :key="item.name" class="juice-item"
:data-device-id="item?.deviceId"
@click="handleBlockClick(item?.deviceId, item.name, false)">
@click="handleBlockClick(item?.deviceId, item.aliasName, false)">
<span class="juice-name">{{ item.name }}</span>
<div class="progress-bar" style="cursor: pointer;">
<div class="progress"
:style="{ width: item.rate + '%', background: filterStatusColor(item.deviceStatus) }">
<span class="progress-text">{{ item.value }}</span>
<span class="progress-text">{{ formatNumberWithCommas(item.value) }}</span>
</div>
</div>
<img style="padding-left: 1rem;" v-if="item.rate > 90" src="@/assets/alarm.svg" />
@ -67,11 +67,11 @@
<div class="info-panel" style="display: flex; justify-content: space-between;width: 25%">
<div class="info-row">
<span class="info-label">累计流量</span>
<span class="info-value">{{ processForm_uht.totalTraffic }}</span>
<span class="info-value">{{ formatNumberWithCommas(processForm_uht.totalTraffic) }}</span>
</div>
<div class="info-row">
<span class="info-label">产品流量</span>
<span class="info-value">{{ processForm_uht.productFlowRate }}</span>
<span class="info-value">{{ formatNumberWithCommas(processForm_uht.productFlowRate) }}</span>
</div>
<div class="info-row">
<span class="info-label">平衡温度</span>
@ -147,11 +147,11 @@
<div class="info-panel" style="display: flex; justify-content: space-between;width: 25%;">
<div class="info-row">
<span class="info-label">累计流量</span>
<span class="info-value">{{ processForm_pulp.totalTraffic }}</span>
<span class="info-value">{{ formatNumberWithCommas(processForm_pulp.totalTraffic) }}</span>
</div>
<div class="info-row">
<span class="info-label">产品流量</span>
<span class="info-value">{{ processForm_pulp.productFlowRate }}</span>
<span class="info-value">{{ formatNumberWithCommas(processForm_pulp.productFlowRate) }}</span>
</div>
<div class="info-row">
<span class="info-label">平衡温度</span>
@ -234,12 +234,12 @@
<div class="progress-bar">
<div class="progress"
:style="{ width: juiceTank.rate + '%', background: juiceTank.rate > 70 ? '#00D2A0' : juiceTank.rate > 50 ? '#FF9000' : juiceTank.rate > 30 ? '#FFD732' : '#FF0000' }">
<span class="progress-text">{{ juiceTank.liquidLevel }}</span>
<span class="progress-text">{{ formatNumberWithCommas(juiceTank.liquidLevel) }}</span>
</div>
</div>
</div>
<div class="info-item" style="padding: 1rem 0 0 0;">
<span class="info-label" :style="{ color: '#00FFB9' }">果汁流量{{ juiceTank.productFlowRate
<span class="info-label" :style="{ color: '#00FFB9' }">果汁流量{{ formatNumberWithCommas(juiceTank.productFlowRate)
}}</span>
</div>
</div>
@ -285,18 +285,18 @@
<div class="info-panel">
<div class="info-row">
<span class="info-label">当前液位</span>
<span class="info-value">{{ dynamicMixer.liquidLevel }}</span>
<span class="info-value">{{ formatNumberWithCommas(dynamicMixer.liquidLevel) }}</span>
</div>
<div class="info-row">
<span class="info-label">当前流量</span>
<span class="info-value">{{ dynamicMixer.productFlowRate }}</span>
<span class="info-value">{{ formatNumberWithCommas(dynamicMixer.productFlowRate) }}</span>
</div>
</div>
</div>
</div>
<div class="block">
<div class="info-item" style="padding: 0.5rem 0 0 0;">
<span class="info-label" :style="{ color: '#00FFB9' }">果肉流量{{ pulpTank.productFlowRate
<span class="info-label" :style="{ color: '#00FFB9' }">果肉流量{{ formatNumberWithCommas(pulpTank.productFlowRate)
}}</span>
</div>
<div class="flex-row">
@ -334,7 +334,7 @@
<div class="progress-bar">
<div class="progress"
:style="{ width: pulpTank.rate + '%', background: pulpTank.rate > 70 ? '#00D2A0' : pulpTank.rate > 50 ? '#FF9000' : pulpTank.rate > 30 ? '#FFD732' : '#FF0000' }">
<span class="progress-text">{{ pulpTank.liquidLevel }}</span>
<span class="progress-text">{{ formatNumberWithCommas(pulpTank.liquidLevel) }}</span>
</div>
</div>
</div>
@ -369,7 +369,7 @@
<IxButton Outline class="btnStyle"> 生产步骤{{ mixerStep }} </IxButton> <!-- 增加 step 字段显示 -->
<IxButton Outline class="btnStyle"> 开始时间{{ startTimeFormatted }} </IxButton>
<IxButton Outline class="btnStyle"> 结束时间{{ endTimeFormatted }} </IxButton>
<IxButton Outline class="btnStyle"> 流量{{ productFlowRate }} </IxButton>
<IxButton Outline class="btnStyle"> 流量{{ formatNumberWithCommas(productFlowRate) }} </IxButton>
<IxButton Outline class="btnStyle"> 配方{{ formula }} </IxButton>
<IxButton Outline class="btnStyle"> 持续时长{{ duration }} </IxButton>
<IxButton Outline id="triggerId" :disabled="currentStatus !== '停机'"> {{ selectedReason ? '停机原因:' +
@ -392,7 +392,7 @@
<IxButton Outline class="btnStyle"> 结束时间{{ endTimeFormatted }} </IxButton>
<IxButton Outline class="btnStyle"> 持续时长{{ duration }} </IxButton>
<IxButton Outline class="btnStyle"> 调配状态{{ blendStatus }} </IxButton>
<IxButton Outline class="btnStyle"> 罐重{{ capacity }} </IxButton>
<IxButton Outline class="btnStyle"> 罐重{{ formatNumberWithCommas(capacity) }} </IxButton>
</div>
</div>
</template>
@ -539,8 +539,7 @@ const processDataFromAPI = (apiData) => {
recordTime: item.recordTime,
data: {
id: item.data.id || 0,
weight: item.data.weight || 0,
capacity: item.data.capacity,
weight: item.data.weight || 0,
deviceStatus: item.data.deviceStatus || '',
cleanStatus: item.data.cleanStatus || '',
productFlowRate: item.data.productFlowRate || 0,
@ -548,7 +547,9 @@ const processDataFromAPI = (apiData) => {
formula: item.data.formula || '',
mixerStep: item.data.mixerStep || '',
temperature: item.data.temperature || 0,
liquidLevel: item.data.liquidLevel || 0
liquidLevel: item.data.liquidLevel || 0,
capacity: item.data.capacity,
aliasName: item.data.aliasName || '',
},
statusList: item.statusList || []
};
@ -614,7 +615,7 @@ const updateData = (processedData) => {
//
if (juiceData.value.deviceId) {
globalDeviceId.value = juiceData.value.deviceId;
currentTitle.value = juiceData.value.data[0].name;
currentTitle.value = juiceData.value.data[0].aliasName;
}
//
totalTrafficJuice.value = juiceData.value.totalTraffic.toFixed(2);
@ -623,6 +624,7 @@ const updateData = (processedData) => {
if (juiceData.value.data.length > 0) {
progressList.value = juiceData.value.data.map(item => ({
name: item.name,
aliasName: item.aliasName,
deviceId: item.deviceId,
deviceStatus: item.deviceStatus,
value: item.weight,
@ -632,6 +634,7 @@ const updateData = (processedData) => {
if (pulpData.value.data.length > 0) {
innerProgressList.value = pulpData.value.data.map(item => ({
name: item.name,
aliasName: item.aliasName,
deviceId: item.deviceId,
deviceStatus: item.deviceStatus,
value: item.weight,
@ -912,10 +915,10 @@ let autoUpdateInterval = null;
//
onMounted(async () => {
await fetchStatusColors(); //
await fetchData();
fetchGanttData();
fetchStopReason();
await fetchStatusColors(); //
fetchStopReason();
sendDataToParent();
const setupAutoUpdate = () => {
@ -967,7 +970,7 @@ onUnmounted(() => {
flex-direction: column;
align-items: center;
background: #000028;
height: 100vh;
height: calc(100vh - 4rem);
width: calc(100% + 1.5rem);
overflow: hidden;
color: white;
@ -980,7 +983,7 @@ onUnmounted(() => {
.upper-section {
display: flex;
width: 100%;
height: 60%;
height: 65%;
/* 调整高度 */
}

View File

@ -6,7 +6,7 @@
<p>提交原因</p>
</div>
<div class="spacing"></div>
<div class="form-body">
<div class="form-body">
<div class="item-chip-container">
<p>{{ itemName }}</p>
<IxChip class="chip" background="#FF2640" chip-color="#000028" variant="custom">
@ -29,13 +29,17 @@
<script setup>
import { ref, defineProps, defineEmits, onMounted } from 'vue';
import { IxButton, IxChip } from '@siemens/ix-vue';
import { getAlarmReason } from '@/api/inspection';
import moment from 'moment-timezone';
const props = defineProps({
itemName: String,
itemTime: String,
timezone: String,
currentStatus: String,
currentAlarmInfo: {
type: Object,
default: () => ({})
},
});
const reason = ref('');
@ -56,9 +60,11 @@ const handleSubmit = () => {
};
onMounted(() => {
if(props.currentStatus === '已处理') {
if (props.currentAlarmInfo.currentStatus === '已处理') {
//
reason.value = '已处理';
getAlarmReason(props.currentAlarmInfo.currentAlarmId, props.currentAlarmInfo.currentCheckParamId).then((res) => {
reason.value = res.data.check_text;
});
}
});
</script>
@ -79,17 +85,20 @@ onMounted(() => {
}
.form-validation-example {
background-color:#23233C;
background-color: #23233C;
padding: 2rem;
border-radius: 0.5rem;
width: 25rem; /* 设置表单宽度 */
width: 25rem;
/* 设置表单宽度 */
display: flex;
flex-direction: column;
border: 0.0625rem solid white; /* 增加白色边框 */
border: 0.0625rem solid white;
/* 增加白色边框 */
}
.form-header h5 {
color: #9898A8; /* 修改颜色 */
color: #9898A8;
/* 修改颜色 */
}
.form-body {
@ -118,32 +127,43 @@ onMounted(() => {
.form-header h5,
.form-body p,
.form-body label {
color: #9898A8; /* 修改颜色 */
text-align: left; /* 文字靠左对齐 */
font-size: 0.7rem; /* 字体大小为9px */
color: #9898A8;
/* 修改颜色 */
text-align: left;
/* 文字靠左对齐 */
font-size: 0.7rem;
/* 字体大小为9px */
}
.form-header p {
text-align: left; /* 文字靠左对齐 */
font-size: 0.875rem; /* 字体大小为12px */
text-align: left;
/* 文字靠左对齐 */
font-size: 0.875rem;
/* 字体大小为12px */
}
.item-chip-container {
display: flex;
align-items: center;
gap: 0.03125rem; /* 0.5px */
height: 100%; /* 确保容器高度 */
gap: 0.03125rem;
/* 0.5px */
height: 100%;
/* 确保容器高度 */
}
.item-chip-container p {
display: flex;
align-items: center; /* 上下居中 */
margin: 0; /* 移除默认外边距 */
line-height: 1; /* 确保行高 */
align-items: center;
/* 上下居中 */
margin: 0;
/* 移除默认外边距 */
line-height: 1;
/* 确保行高 */
}
.chip {
font-size: 0.7rem; /* 字体大小为9px */
font-size: 0.7rem;
/* 字体大小为9px */
}
</style>

View File

@ -26,7 +26,7 @@
<div class="header_right">
<!-- 设备列表按钮 -->
<span v-for="(item, index) in deviceList" :key="item.id">
<IxButton :outline="selectedDeviceId !== item.id" class="btn-style" @click="handleDeviceListChange(item.id)">
<IxButton :outline="selectedDeviceTypeId !== item.id" class="btn-style" @click="handleDeviceListChange(item.id)">
{{ item.name }}
</IxButton>
</span>
@ -52,7 +52,7 @@
<span class="header-row">参考值</span>
<span class="header-row">当前值</span>
<span class="header-row" v-for="hour in hours" :key="hour"
:style="{ backgroundColor: getDeviceNameById(selectedDeviceId) === '灌注机' ? '#00FFB9' : '#00E4FF', color: '#000028' }">
:style="{ backgroundColor: getDeviceNameById(selectedDeviceTypeId) === '灌注机' ? '#00FFB9' : '#00E4FF', color: '#000028' }">
{{ hour }}
</span>
</div>
@ -73,7 +73,7 @@
'alarm-cell': item.data[hour]?.checkStatus === 0
}"
@click="item.data[hour]?.checkStatus === 0 || item.data[hour]?.checkStatus === 1 ? handleAlarmInspection(hour, index, item.data[hour]?.checkStatus) : null">
{{ item.data[hour]?.value || '--' }}
{{ formatNumberWithCommas(item.data[hour]?.value) || '--' }}
</span>
</div>
</IxEventListItem>
@ -81,7 +81,7 @@
</div>
</div>
<!-- 点检表单 -->
<InspectionForm v-if="showForm" :itemName="selectedItemName" :itemTime="selectedItemTime" :timezone="timezone" :currentStatus="currentStatus" @close="showForm = false" @submit="(currentTime, reason) => handleFormSubmit(selectedItemIndex, reason)" />
<InspectionForm v-if="showForm" :itemName="selectedItemName" :itemTime="selectedItemTime" :timezone="timezone" :currentAlarmInfo="currentAlarmInfo" @close="showForm = false" @submit="(currentTime, reason) => handleFormSubmit(selectedItemIndex, reason)" />
</div>
</template>
@ -119,13 +119,15 @@ const status = ref('0'); // 确保 status 变量已定义
//
const deviceList = ref([]);
const selectedDeviceId = ref(null);
const selectedDeviceTypeId = ref(null);
const showForm = ref(false);
const selectedItemName = ref('');
const selectedItemTime = ref('');
const selectedItemIndex = ref(null);
const currentDeviceId = ref(null);
const selectedDate = ref(null);
const formatDate = (date) => {
@ -135,7 +137,17 @@ const formatDate = (date) => {
const day = d.getDate().toString().padStart(2, '0');
return `${year}/${month}/${day}`;
};
const currentStatus = ref('');
const formatNumberWithCommas = (number) => {
if (number === null || number === undefined) return '--';
return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
};
const currentAlarmInfo = ref({
currentStatus: '',
currentAlarmId: '',
currentCheckParamId: '',
});
const currentDate = formatDate(new Date());
@ -168,7 +180,7 @@ const confirmedTimes = ref({});
//
const hourCheckStatus = ref({});
const hourCheckTime = ref({});
const alarmId = ref({});
const alarmId = ref({}); // { [deviceId: string]: { [recordTime: string]: number } }
const hourCheckValid = ref({});
const formatTime = (time) => {
@ -178,28 +190,35 @@ const formatTime = (time) => {
return `${hours}:${minutes}`;
};
// handleAlarmConfirm
//
const handleInspection = (hour, index) => {
selectedItemName.value = inspectionItems.value[index].label;
selectedItemTime.value = hour;
selectedItemIndex.value = index; //
// ID
const currentAlarmIds = [];
//
if (hourCheckValid.value[hour] !== 1) {
console.log("🚀 ~ handleInspection ~ hourCheckValid.value[hour]:", hourCheckValid.value[hour])
showWarningMessage('存在设备异常,无法执行点检操作!');
return;
}
console.log("🚀 ~ handleInspection ~ inspectionItems.value:", inspectionItems.value)
// checkStatus0
if (inspectionItems.value.some(item => item.data[hour]?.checkStatus === 0)) {
showWarningMessage('存在报警数据未处理,无法执行点检操作!');
return;
}
// ID
Object.keys(alarmId.value).forEach(deviceId => {
if (alarmId.value[deviceId]?.[hour]) {
currentAlarmIds.push(alarmId.value[deviceId][hour]);
}
});
console.log("🚀 ~ handleInspection ~ currentAlarmIds:", currentAlarmIds)
showConfirmMessage('确认要执行点检操作吗?', async () => {
await sharpConfirm(alarmId.value[hour], 'admin').then(() => {
await sharpConfirm(currentAlarmIds, 'admin').then(() => {
confirmedHours.value.push(selectedItemTime.value);
confirmedTimes.value[selectedItemTime.value] = moment().tz(timezone).format('HH:mm');
hourCheckStatus.value[hour] = 1; //
@ -215,15 +234,24 @@ const handleAlarmInspection = (hour, index, status) => {
selectedItemName.value = inspectionItems.value[index].label;
selectedItemTime.value = hour;
selectedItemIndex.value = index; // selectedItemIndex
currentStatus.value = status === 0 ? '未处理' : '已处理';
// ID
currentDeviceId.value = inspectionItems.value[index].data[hour]?.deviceId;
currentAlarmInfo.value = {
currentStatus : status === 0 ? '未处理' : '已处理',
currentAlarmId: alarmId.value[currentDeviceId.value]?.[selectedItemTime.value],
currentCheckParamId: inspectionItems.value[index].data[hour]?.checkParamId
}
showForm.value = true;
};
//
const handleFormSubmit = async (index, reason) => {
await alarmReasonConfirm({
alarmId: alarmId.value[selectedItemTime.value],
checkParamId: inspectionItems.value[index].data[selectedItemTime.value].checkParamId,
alarmId: currentAlarmInfo.value.currentAlarmId, // alarmId.value[selectedItemTime.value],
checkParamId: currentAlarmInfo.value.currentCheckParamId,//inspectionItems.value[index].data[selectedItemTime.value]checkParamId,
alarmReason: reason,
checkUser: 'admin'
}).then(() => {
@ -272,7 +300,7 @@ const handleShiftChange = (event) => {
//
const handleDeviceListChange = (id) => {
selectedDeviceId.value = id;
selectedDeviceTypeId.value = id;
fetchInspectionData();
fetchCurrentValues();
};
@ -283,7 +311,7 @@ const fetchDeviceList = async () => {
const response = await getDeviceList();
if (response.code === 200) {
deviceList.value = response.data;
selectedDeviceId.value = deviceList.value[0].id; //
selectedDeviceTypeId.value = deviceList.value[0].id; //
} else {
showWarningMessage('获取设备列表失败!');
}
@ -295,16 +323,28 @@ const fetchDeviceList = async () => {
//
const fetchCurrentValues = async () => {
try {
const deviceId = selectedDeviceId.value; // ID
const deviceId = selectedDeviceTypeId.value; // ID
const dateValue = selectedDate.value || currentDate;
const response = await getInspectionCurrent(deviceId, dateValue);
const params = await getCheckParas(deviceId, dateValue);
if (response.data) {
const currentValues = response.data.data;
inspectionItems.value.forEach(item => {
item.current = currentValues?.[item.name] || '--'; // currentValues
const currentValueList = response.data;
console.log("🚀 ~ fetchCurrentValues ~ currentValueList:", currentValueList)
const currentValues = {};
currentValueList.forEach(item => {
// null
for (const [key, value] of Object.entries(item.data)) {
if (value !== null) {
currentValues[key] = value;
}
}
});
console.log("🚀 ~ fetchCurrentValues ~ currentValues:", currentValues)
inspectionItems.value.forEach(item => {
item.current = formatNumberWithCommas(currentValues?.[item.name]) || '--'; // currentValues
});
} else {
showWarningMessage('获取当前设备当前值失败!');
}
@ -335,19 +375,25 @@ const fetchCurrentValues = async () => {
//
const fetchInspectionData = async () => {
try {
const deviceId = selectedDeviceId.value; // ID
const deviceTypeId = selectedDeviceTypeId.value; // ID
const shiftValue = shift.value;
const dateValue = selectedDate.value || currentDate;
const response = await getInspectionData(deviceId, dateValue, shiftValue);
const response = await getInspectionData(deviceTypeId, dateValue, shiftValue);
if (response.data) {
const inspectionData = response.data;
const itemsMap = {};
inspectionData.forEach(record => {
const recordTime = record.recordTime;
const data = record.data;
const deviceId = record.deviceId;
hourCheckStatus.value[recordTime] = record.hourCheckStatus;
hourCheckTime.value[recordTime] = formatTime(record.hourCheckTime);
alarmId.value[recordTime] = record.alarmId;
if (!alarmId.value[deviceId]) {
alarmId.value[deviceId] = {} // ID
}
alarmId.value[deviceId][recordTime] = record.alarmId;
hourCheckValid.value[recordTime] = record.hourCheckValid;
for (const [name, valueObj] of Object.entries(data)) {
@ -367,7 +413,8 @@ const fetchInspectionData = async () => {
checkStatus: valueObj.checkStatus,
checkText: valueObj.checkText,
checkParamId: valueObj.checkParamId,
checkUser: valueObj.checkUser
checkUser: valueObj.checkUser,
deviceId: record.deviceId,
// hourCheckStatus: valueObj.hourCheckStatus,
// hourCheckTime: valueObj.hourCheckTime
};
@ -383,14 +430,17 @@ const fetchInspectionData = async () => {
};
//
const handleSearch = () => {
fetchInspectionData();
fetchCurrentValues();
const handleSearch = async () => {
try {
await Promise.all([fetchInspectionData(), fetchCurrentValues()]);
// showInfoMessage('');
} catch (error) {
showWarningMessage('数据刷新失败');
console.error('Error refreshing data:', error);
}
};
const handleExport = () => {
console.log("🚀 ~ handleExport ~ inspectionItems.value.some(item => Object.values(item.data).some(data => data.checkStatus === 0)):", inspectionItems.value.some(item => Object.values(item.data).some(data => data.checkStatus === 0)))
// inspectionItems.value
if (inspectionItems.value.some(item => Object.values(item.data).some(data => data.checkStatus === 0))) {
showWarningMessage('请先处理报警数据,再进行导出!');
@ -398,7 +448,7 @@ const handleExport = () => {
}
showInfoMessage('导出全部');
exportExcel(selectedDeviceId.value, selectedDate.value || currentDate, shift.value)
exportExcel(selectedDeviceTypeId.value, selectedDate.value || currentDate, shift.value)
.then((response) => {
if (response) {
//
@ -431,8 +481,7 @@ const getDeviceNameById = (id) => {
onMounted(async () => {
await fetchDeviceList();
fetchCurrentValues();
fetchInspectionData();
await handleSearch();
sendDataToParent();
// const setupAutoUpdate = () => {
@ -517,7 +566,7 @@ onMounted(async () => {
width: 100%;
height: 90%;
/* 修改为90%,使其高度铺满剩余部分 */
overflow-x: auto;
overflow-x: visible;
/* 添加水平滚动条 */
}
@ -525,7 +574,7 @@ onMounted(async () => {
display: flex;
flex-direction: column;
min-width: 100%;
overflow-x: auto;
overflow-x: visible;
/* 添加水平滚动条 */
position: relative; /* 添加此行以确保表头和数据在同一容器内滚动 */
}
@ -544,11 +593,15 @@ onMounted(async () => {
justify-content: space-around;
align-items: center;
flex: 1;
padding: 0 0 0 0.5rem;
position: sticky;
top: 0;
z-index: 2;
background-color: inherit; /* 添加此行以确保表头背景色一致 */
background-color: #000028; /* 添加此行以确保表头背景色一致 */
}
.table-row-1.fixed-row {
top: 40px;
z-index: 2;
}
.fixed-width {
@ -626,8 +679,9 @@ onMounted(async () => {
.fixed-row {
position: sticky;
top: 0;
background-color: inherit;
z-index: 1;
background-color: #000028;
z-index: 2;
margin-left: 1rem;
}
.highlight-cell {

View File

@ -410,7 +410,7 @@ ix-application {
display: flex;
flex-direction: column;
background: #000028;
min-height: 100vh;
height: calc(100vh - 4rem);
width: 100%;
overflow-x: hidden;
}