|
@@ -1,38 +1,59 @@
|
|
|
<template>
|
|
|
<div class="body">
|
|
|
- <div class="steps" v-for="(item, index) in opsArray" :key="index" @click="boxClick(item, index)">
|
|
|
- <div :class="item.opComplete
|
|
|
- ? 'stepBox stepBoxDisabled'
|
|
|
- : item.exists == true
|
|
|
+ <div
|
|
|
+ class="steps"
|
|
|
+ v-for="(item, index) in opsArray"
|
|
|
+ :key="index"
|
|
|
+ @click="boxClick(item, index)"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ :class="
|
|
|
+ item.exists == true
|
|
|
? selectStepIndex == index
|
|
|
? 'stepBox stepBoxHover'
|
|
|
: 'stepBox'
|
|
|
: 'stepBox stepExistsHover'
|
|
|
- ">
|
|
|
+ "
|
|
|
+ >
|
|
|
<div style="display: flex; align-items: center">
|
|
|
- <div :class="selectStepIndex == index
|
|
|
- ? 'stepIndex stepIndexHover'
|
|
|
- : 'stepIndex'
|
|
|
- ">
|
|
|
- <span :class="selectStepIndex == index
|
|
|
- ? 'indexText hoverTextColor'
|
|
|
- : 'indexText'
|
|
|
- ">{{ index + 1 }}</span>
|
|
|
+ <div
|
|
|
+ :class="
|
|
|
+ selectStepIndex == index
|
|
|
+ ? 'stepIndex stepIndexHover'
|
|
|
+ : 'stepIndex'
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ :class="
|
|
|
+ selectStepIndex == index
|
|
|
+ ? 'indexText hoverTextColor'
|
|
|
+ : 'indexText'
|
|
|
+ "
|
|
|
+ >{{ index + 1 }}</span
|
|
|
+ >
|
|
|
</div>
|
|
|
<div class="midTextBox">
|
|
|
- <div :class="selectStepIndex == index ? 'stepName stepNameHover' : 'stepName'
|
|
|
- ">
|
|
|
+ <div
|
|
|
+ :class="
|
|
|
+ selectStepIndex == index ? 'stepName stepNameHover' : 'stepName'
|
|
|
+ "
|
|
|
+ >
|
|
|
{{ item.operationName }}
|
|
|
</div>
|
|
|
- <div :class="selectStepIndex == index
|
|
|
- ? 'stepStation stepStationHover'
|
|
|
- : 'stepStation'
|
|
|
- ">
|
|
|
+ <div
|
|
|
+ :class="
|
|
|
+ selectStepIndex == index
|
|
|
+ ? 'stepStation stepStationHover'
|
|
|
+ : 'stepStation'
|
|
|
+ "
|
|
|
+ >
|
|
|
{{ item.operationCode }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div :class="selectStepIndex == index ? 'timeBox timeBoxHover' : 'timeBox'">
|
|
|
+ <div
|
|
|
+ :class="selectStepIndex == index ? 'timeBox timeBoxHover' : 'timeBox'"
|
|
|
+ >
|
|
|
{{ item.completeNum }}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -43,7 +64,12 @@
|
|
|
</div>
|
|
|
<el-empty v-if="!opsArray" description="暂无数据" />
|
|
|
<!-- 弹窗 -->
|
|
|
- <el-dialog v-model="centerDialogVisible" width="500" align-center style="border-radius: 16px">
|
|
|
+ <el-dialog
|
|
|
+ v-model="centerDialogVisible"
|
|
|
+ width="500"
|
|
|
+ align-center
|
|
|
+ style="border-radius: 16px"
|
|
|
+ >
|
|
|
<template #header>
|
|
|
<div class="titleText" style="text-align: center">通知</div>
|
|
|
</template>
|
|
@@ -63,21 +89,20 @@ import { useProcessStore } from "@/store";
|
|
|
import { emitter, EventsNames } from "@/utils/common";
|
|
|
import { getScan } from "@/api/process";
|
|
|
const store = useProcessStore();
|
|
|
+const selectSeqArray = inject("selectSeqArray");
|
|
|
+const ordersDataArray = inject("ordersDataArray");
|
|
|
const props = defineProps<{
|
|
|
opsArray?: object;
|
|
|
}>();
|
|
|
//步骤显示index
|
|
|
const router = useRouter();
|
|
|
const selectStepIndex = ref(null);
|
|
|
-const scanStatus = inject("scanStatus");
|
|
|
+const selectedOderStatus = inject("selectedOderStatus");
|
|
|
+const selectOrderIndex = inject("selectOrderIndex");
|
|
|
const centerDialogVisible = ref(false);
|
|
|
const emitFnc = () => {
|
|
|
emitter.emit(EventsNames.PROCESS_STEPOBJ, {
|
|
|
index: selectStepIndex.value,
|
|
|
- lastStatus:
|
|
|
- selectStepIndex.value == null || selectStepIndex.value == 0
|
|
|
- ? false
|
|
|
- : true,
|
|
|
});
|
|
|
};
|
|
|
emitter.on(EventsNames.PROCESS_STEPINDEX, (val: any) => {
|
|
@@ -95,13 +120,15 @@ emitter.on(EventsNames.PROCESS_REDER, () => {
|
|
|
// }
|
|
|
// };
|
|
|
const boxClick = (item, index) => {
|
|
|
- if (item.opComplete == true || item.exists != true) return;
|
|
|
+ if (item.exists != true) return;
|
|
|
+ selectSeqArray.value =
|
|
|
+ ordersDataArray.value[selectOrderIndex.value].ops[index].seqs;
|
|
|
store.odersData.operationId = item.operationId;
|
|
|
store.processInfo.operationCode = item.operationCode;
|
|
|
store.processInfo.operationName = item.operationName;
|
|
|
selectStepIndex.value = index;
|
|
|
emitFnc();
|
|
|
- centerDialogVisible.value = true;
|
|
|
+ // centerDialogVisible.value = true;
|
|
|
};
|
|
|
const getScanData = async () => {
|
|
|
try {
|
|
@@ -138,7 +165,7 @@ watch(
|
|
|
}
|
|
|
);
|
|
|
watch(
|
|
|
- () => scanStatus.value,
|
|
|
+ () => selectedOderStatus.value,
|
|
|
() => {
|
|
|
selectStepIndex.value = null;
|
|
|
}
|