fix: 更换tag组件 & 增加点检确认校验
This commit is contained in:
parent
c6adf30b68
commit
e9995630a3
|
@ -120,8 +120,6 @@ const updateChart = () => {
|
|||
const itemEndTime = new Date(item.endTime).getTime();
|
||||
return itemEndTime >= startTime && itemStartTime <= endTime;
|
||||
});
|
||||
console.log("🚀 ~ updateChart ~ filteredData:", filteredData)
|
||||
|
||||
mappedData.value = mapDataToTimeline(filteredData, startTime, endTime);
|
||||
nextTick(() => {
|
||||
generateXTicks(startTime, endTime);
|
||||
|
@ -335,7 +333,6 @@ const generateGaps = (startTime, endTime) => {
|
|||
});
|
||||
}
|
||||
gaps.value = gapsArray;
|
||||
console.log("🚀 ~ generateGaps ~ gaps.value:", gaps.value)
|
||||
}
|
||||
|
||||
// 获取 X 轴刻度样式
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import axios from 'axios';
|
||||
|
||||
const service = axios.create({
|
||||
// baseURL: 'http://192.168.1.199:8080/api', // 办公室测试接口
|
||||
baseURL: 'http://39.105.9.124:8090/api', // 家用测试接口
|
||||
baseURL: 'http://192.168.1.199:8080/api', // 办公室测试接口
|
||||
// baseURL: 'http://39.105.9.124:8090/api', // 家用测试接口
|
||||
timeout: 5000, // 请求超时时间
|
||||
headers: {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
|
|
|
@ -79,7 +79,27 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="tag-panel">
|
||||
<IxChip class="left-chip"
|
||||
<el-tag class="left-chip" effect="dark"
|
||||
:style="{ 'background-color': processForm_uht.cleanStatus === '已碱洗' ? '#00BEDC' : '#6B6B7E' }"
|
||||
round>
|
||||
已碱洗
|
||||
</el-tag>
|
||||
<el-tag class="left-chip" effect="dark"
|
||||
:style="{ 'background-color': processForm_uht.cleanStatus === '已酸洗' ? '#00BEDC' : '#6B6B7E' }"
|
||||
round>
|
||||
已酸洗
|
||||
</el-tag>
|
||||
<el-tag class="left-chip" effect="dark"
|
||||
:style="{ 'background-color': processForm_uht.cleanStatus === '清洁状态' ? '#00BEDC' : '#6B6B7E' }"
|
||||
round>
|
||||
清洁状态
|
||||
</el-tag>
|
||||
<el-tag class="left-chip" effect="dark"
|
||||
:style="{ 'background-color': processForm_uht.cleanStatus === '无菌状态' ? '#00BEDC' : '#6B6B7E' }"
|
||||
round>
|
||||
无菌状态
|
||||
</el-tag>
|
||||
<!-- <IxChip class="left-chip"
|
||||
:background="processForm_uht.cleanStatus === '已碱洗' ? '#00BEDC' : '#6B6B7E'"
|
||||
chip-color="#000028" variant="custom">
|
||||
  已碱洗
|
||||
|
@ -98,7 +118,7 @@
|
|||
:background="processForm_uht.cleanStatus === '无菌状态' ? '#00BEDC' : '#6B6B7E'"
|
||||
chip-color="#000028" variant="custom">
|
||||
 无菌状态
|
||||
</IxChip>
|
||||
</IxChip> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -139,10 +159,27 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="tag-panel">
|
||||
<!-- <el-tag effect="dark" round>
|
||||
<el-tag class="left-chip" effect="dark"
|
||||
:style="{ 'background-color': processForm_pulp.cleanStatus === '已碱洗' ? '#00FFB9' : '#6B6B7E' }"
|
||||
round>
|
||||
已碱洗
|
||||
</el-tag> -->
|
||||
<IxChip class="left-chip" :background="processForm_pulp.cleanStatus === '已碱洗' ? '#00FFB9' : '#6B6B7E'" chip-color="#000028" variant="custom">
|
||||
</el-tag>
|
||||
<el-tag class="left-chip" effect="dark"
|
||||
:style="{ 'background-color': processForm_pulp.cleanStatus === '已酸洗' ? '#00FFB9' : '#6B6B7E' }"
|
||||
round>
|
||||
已酸洗
|
||||
</el-tag>
|
||||
<el-tag class="left-chip" effect="dark"
|
||||
:style="{ 'background-color': processForm_pulp.cleanStatus === '清洁状态' ? '#00FFB9' : '#6B6B7E' }"
|
||||
round>
|
||||
清洁状态
|
||||
</el-tag>
|
||||
<el-tag class="left-chip" effect="dark"
|
||||
:style="{ 'background-color': processForm_pulp.cleanStatus === '无菌状态' ? '#00FFB9' : '#6B6B7E' }"
|
||||
round>
|
||||
无菌状态
|
||||
</el-tag>
|
||||
<!-- <IxChip class="left-chip" :background="processForm_pulp.cleanStatus === '已碱洗' ? '#00FFB9' : '#6B6B7E'" chip-color="#000028" variant="custom">
|
||||
  已碱洗
|
||||
</IxChip>
|
||||
<IxChip class="left-chip" :background="processForm_pulp.cleanStatus === '已酸洗' ? '#00FFB9' : '#6B6B7E'" chip-color="#000028" variant="custom">
|
||||
|
@ -153,7 +190,7 @@
|
|||
</IxChip>
|
||||
<IxChip class="left-chip" :background="processForm_pulp.cleanStatus === '无菌状态' ? '#00FFB9' : '#6B6B7E'" chip-color="#000028" variant="custom">
|
||||
 无菌状态
|
||||
</IxChip>
|
||||
</IxChip> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -164,13 +201,26 @@
|
|||
<div class="flex-row">
|
||||
<h2 class="juice-title">果汁无菌罐</h2>
|
||||
<div class="tag-panel-2">
|
||||
<IxChip class="right-chip" :background="juiceTank.cleanStatus === '清洁状态' ? '#00FFB9' : '#6B6B7E'" chip-color="#000028" variant="custom"
|
||||
:style="{ cursor: 'default' }">
|
||||
<el-tag class="right-chip" effect="dark"
|
||||
:style="{ 'background-color': juiceTank.cleanStatus === '清洁状态' ? '#00FFB9' : '#6B6B7E'}"
|
||||
round>
|
||||
清洁状态
|
||||
</el-tag>
|
||||
<el-tag class="right-chip" effect="dark"
|
||||
:style="{ 'background-color': juiceTank.cleanStatus === '无菌状态' ? '#00FFB9' : '#6B6B7E'}"
|
||||
round>
|
||||
无菌状态
|
||||
</el-tag>
|
||||
<!-- <IxChip class="right-chip"
|
||||
:background="juiceTank.cleanStatus === '清洁状态' ? '#00FFB9' : '#6B6B7E'"
|
||||
chip-color="#000028" variant="custom" :style="{ cursor: 'default' }">
|
||||
  清洁状态
|
||||
</IxChip>
|
||||
<IxChip class="right-chip" :background="juiceTank.cleanStatus === '无菌状态' ? '#00FFB9' : '#6B6B7E'" chip-color="#000028" variant="custom">
|
||||
<IxChip class="right-chip"
|
||||
:background="juiceTank.cleanStatus === '无菌状态' ? '#00FFB9' : '#6B6B7E'"
|
||||
chip-color="#000028" variant="custom">
|
||||
  无菌状态
|
||||
</IxChip>
|
||||
</IxChip> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="spacing"></div>
|
||||
|
@ -198,12 +248,26 @@
|
|||
<div class="flex-row">
|
||||
<h2 class="juice-title">动态混合器</h2>
|
||||
<div class="tag-panel-2">
|
||||
<IxChip class="right-chip" :background="dynamicMixer.cleanStatus === '清洁状态' ? '#00FFB9' : '#6B6B7E'" chip-color="#000028" variant="custom">
|
||||
<el-tag class="right-chip" effect="dark"
|
||||
:style="{ 'background-color': dynamicMixer.cleanStatus === '清洁状态' ? '#00FFB9' : '#6B6B7E'}"
|
||||
round>
|
||||
清洁状态
|
||||
</el-tag>
|
||||
<el-tag class="right-chip" effect="dark"
|
||||
:style="{ 'background-color': dynamicMixer.cleanStatus === '无菌状态' ? '#00FFB9' : '#6B6B7E'}"
|
||||
round>
|
||||
无菌状态
|
||||
</el-tag>
|
||||
<!-- <IxChip class="right-chip"
|
||||
:background="dynamicMixer.cleanStatus === '清洁状态' ? '#00FFB9' : '#6B6B7E'"
|
||||
chip-color="#000028" variant="custom">
|
||||
  清洁状态
|
||||
</IxChip>
|
||||
<IxChip class="right-chip" :background="dynamicMixer.cleanStatus === '无菌状态' ? '#00FFB9' : '#6B6B7E'" chip-color="#000028" variant="custom">
|
||||
<IxChip class="right-chip"
|
||||
:background="dynamicMixer.cleanStatus === '无菌状态' ? '#00FFB9' : '#6B6B7E'"
|
||||
chip-color="#000028" variant="custom">
|
||||
  无菌状态
|
||||
</IxChip>
|
||||
</IxChip> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="spacing"></div>
|
||||
|
@ -238,12 +302,26 @@
|
|||
<div class="flex-row">
|
||||
<h2 class="juice-title">果肉无菌罐</h2>
|
||||
<div class="tag-panel-2">
|
||||
<IxChip class="right-chip" :background="pulpTank.cleanStatus === '清洁状态' ? '#00FFB9' : '#6B6B7E'" chip-color="#000028" variant="custom">
|
||||
<el-tag class="right-chip" effect="dark"
|
||||
:style="{ 'background-color': pulpTank.cleanStatus === '清洁状态' ? '#00FFB9' : '#6B6B7E'}"
|
||||
round>
|
||||
清洁状态
|
||||
</el-tag>
|
||||
<el-tag class="right-chip" effect="dark"
|
||||
:style="{ 'background-color': pulpTank.cleanStatus === '无菌状态' ? '#00FFB9' : '#6B6B7E'}"
|
||||
round>
|
||||
无菌状态
|
||||
</el-tag>
|
||||
<!-- <IxChip class="right-chip"
|
||||
:background="pulpTank.cleanStatus === '清洁状态' ? '#00FFB9' : '#6B6B7E'"
|
||||
chip-color="#000028" variant="custom">
|
||||
  清洁状态
|
||||
</IxChip>
|
||||
<IxChip class="right-chip" :background="pulpTank.cleanStatus === '无菌状态' ? '#00FFB9' : '#6B6B7E'" chip-color="#000028" variant="custom">
|
||||
<IxChip class="right-chip"
|
||||
:background="pulpTank.cleanStatus === '无菌状态' ? '#00FFB9' : '#6B6B7E'"
|
||||
chip-color="#000028" variant="custom">
|
||||
  无菌状态
|
||||
</IxChip>
|
||||
</IxChip> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="spacing"></div>
|
||||
|
@ -294,7 +372,8 @@
|
|||
<IxButton Outline class="btnStyle"> 流量:{{ productFlowRate }} </IxButton>
|
||||
<IxButton Outline class="btnStyle"> 配方:{{ formula }} </IxButton>
|
||||
<IxButton Outline class="btnStyle"> 持续时长:{{ duration }} </IxButton>
|
||||
<IxButton Outline id="triggerId" :disabled="currentStatus !== '停机'"> {{ selectedReason ? '停机原因:' + selectedReason : '请选择停机原因 ▲' }} </IxButton>
|
||||
<IxButton Outline id="triggerId" :disabled="currentStatus !== '停机'"> {{ selectedReason ? '停机原因:' +
|
||||
selectedReason : '请选择停机原因 ▲' }} </IxButton>
|
||||
<IxDropdown trigger="triggerId" class="drop-down">
|
||||
<IxDropdownHeader label="停机原因"></IxDropdownHeader>
|
||||
<IxDropdownItem v-for="reason in stopReasons" :key="reason" :label="reason"
|
||||
|
@ -422,7 +501,6 @@ const updateAlarmCount = () => {
|
|||
const updateCurrentInfo = (segment) => {
|
||||
id.value = segment.id;
|
||||
currentStatus.value = segment.deviceStatus;
|
||||
console.log("🚀 ~ updateCurrentInfo ~ currentStatus:", currentStatus.value); // 调试信息
|
||||
startTimeFormatted.value = formatTime(segment.beginTime);
|
||||
endTimeFormatted.value = formatTime(segment.endTime);
|
||||
duration.value = segment.duration;
|
||||
|
@ -523,7 +601,6 @@ const updateData = (processedData) => {
|
|||
juiceData.value = getDataByName(processedData, "果汁调配");
|
||||
pulpData.value = getDataByName(processedData, "果肉调配");
|
||||
uhtData.value = getDataByName(processedData, "果汁杀菌");
|
||||
console.log("🚀 ~ updateData ~ uhtData.value:", uhtData.value)
|
||||
pulpUHTData.value = getUHTDataByName(processedData, "果肉杀菌");
|
||||
juiceTankData.value = getUHTDataByName(processedData, "果汁无菌罐");
|
||||
pulpTankData.value = getUHTDataByName(processedData, "果肉无菌罐");
|
||||
|
@ -815,7 +892,6 @@ const fetchStatusColors = async () => {
|
|||
label: item.name,
|
||||
color: item.color
|
||||
}));
|
||||
console.log("🚀 ~ fetchStatusColors ~ statuses.value:", statuses.value)
|
||||
} else {
|
||||
console.error('Error fetching status colors:', response.message);
|
||||
}
|
||||
|
@ -1067,6 +1143,7 @@ onUnmounted(() => {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-left: 5rem;
|
||||
width: 28%;
|
||||
}
|
||||
|
||||
:deep(.ix-chip) {
|
||||
|
@ -1098,13 +1175,17 @@ onUnmounted(() => {
|
|||
margin: 0.5rem;
|
||||
width: 100%;
|
||||
pointer-events: none;
|
||||
border: none;
|
||||
color: #000028;
|
||||
}
|
||||
|
||||
/* 右侧 IxChip 样式 */
|
||||
.right-chip {
|
||||
margin: 0.5rem 0.5rem 0 0;
|
||||
width: 95%;
|
||||
width: 90%;
|
||||
pointer-events: none;
|
||||
color: #000028;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.tag-panel-2 {
|
||||
|
|
|
@ -165,6 +165,7 @@ const confirmedTimes = ref({});
|
|||
const hourCheckStatus = ref({});
|
||||
const hourCheckTime = ref({});
|
||||
const alarmId = ref({});
|
||||
const hourCheckValid = ref({});
|
||||
|
||||
const formatTime = (time) => {
|
||||
const date = new Date(time);
|
||||
|
@ -178,6 +179,14 @@ const handleInspection = (hour, index) => {
|
|||
selectedItemName.value = inspectionItems.value[index].label;
|
||||
selectedItemTime.value = hour;
|
||||
selectedItemIndex.value = index; // 保存当前索引
|
||||
|
||||
// 校验是否已经确认异常数据
|
||||
if (hourCheckValid.value[hour] !== 1) {
|
||||
console.log("🚀 ~ handleInspection ~ hourCheckValid.value[hour]:", hourCheckValid.value[hour])
|
||||
showWarningMessage('存在异常数据,无法执行点检操作!');
|
||||
return;
|
||||
}
|
||||
|
||||
showConfirmMessage('确认要执行点检操作吗?', async () => {
|
||||
await sharpConfirm(alarmId.value[hour], 'admin').then(() => {
|
||||
confirmedHours.value.push(selectedItemTime.value);
|
||||
|
@ -325,6 +334,7 @@ const fetchInspectionData = async () => {
|
|||
hourCheckStatus.value[recordTime] = record.hourCheckStatus;
|
||||
hourCheckTime.value[recordTime] = formatTime(record.hourCheckTime);
|
||||
alarmId.value[recordTime] = record.alarmId;
|
||||
hourCheckValid.value[recordTime] = record.hourCheckValid;
|
||||
|
||||
for (const [name, valueObj] of Object.entries(data)) {
|
||||
if (valueObj === null || valueObj.valule === null) continue; // 过滤掉值为 null 的属性
|
||||
|
|
Loading…
Reference in New Issue