|
@@ -1,17 +1,33 @@
|
|
<template>
|
|
<template>
|
|
<div class="body">
|
|
<div class="body">
|
|
- <div class="steps" v-for="(item, index) in opsArray" :key="index">
|
|
|
|
- <div class="stepBox">
|
|
|
|
|
|
+ <div class="steps" v-for="(item, index) in opsArray" :key="index" @click="boxClick(index)">
|
|
|
|
+ <div :class="selectStepIndex == index ? 'stepBox stepBoxHover' : 'stepBox'">
|
|
<div style="display: flex; align-items: center">
|
|
<div style="display: flex; align-items: center">
|
|
- <div class="stepIndex">
|
|
|
|
- <span class="indexText">{{ index + 1 }}</span>
|
|
|
|
|
|
+ <div :class="selectStepIndex == index
|
|
|
|
+ ? 'stepIndex stepIndexHover'
|
|
|
|
+ : 'stepIndex'
|
|
|
|
+ ">
|
|
|
|
+ <span :class="selectStepIndex == index
|
|
|
|
+ ? 'indexText hoverTextColor'
|
|
|
|
+ : 'indexText'
|
|
|
|
+ ">{{ index + 1 }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="midTextBox">
|
|
<div class="midTextBox">
|
|
- <div class="stepName">{{ item.operationName }}</div>
|
|
|
|
- <div class="stepStation">{{ item.operationCode }}</div>
|
|
|
|
|
|
+ <div :class="selectStepIndex == index ? 'stepName stepNameHover' : 'stepName'
|
|
|
|
+ ">
|
|
|
|
+ {{ item.operationName }}
|
|
|
|
+ </div>
|
|
|
|
+ <div :class="selectStepIndex == index
|
|
|
|
+ ? 'stepStation stepStationHover'
|
|
|
|
+ : 'stepStation'
|
|
|
|
+ ">
|
|
|
|
+ {{ item.operationCode }}
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="timeBox">{{ item.completeNum }}</div>
|
|
|
|
|
|
+ <div :class="selectStepIndex == index ? 'timeBox timeBoxHover' : 'timeBox'">
|
|
|
|
+ {{ item.completeNum }}
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="line" v-if="index != opsArray.length - 1"></div>
|
|
<div class="line" v-if="index != opsArray.length - 1"></div>
|
|
</div>
|
|
</div>
|
|
@@ -19,41 +35,14 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
-const array = [
|
|
|
|
- {
|
|
|
|
- name: "aaa",
|
|
|
|
- position: "装配工位",
|
|
|
|
- time: "10",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: "222",
|
|
|
|
- position: "装配工位",
|
|
|
|
- time: "14440",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: "222",
|
|
|
|
- position: "装配工位",
|
|
|
|
- time: "14440",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: "222",
|
|
|
|
- position: "装配工位",
|
|
|
|
- time: "14440",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: "222",
|
|
|
|
- position: "装配工位",
|
|
|
|
- time: "14440",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: "222",
|
|
|
|
- position: "装配工位",
|
|
|
|
- time: "14440",
|
|
|
|
- },
|
|
|
|
-];
|
|
|
|
defineProps<{
|
|
defineProps<{
|
|
opsArray?: object;
|
|
opsArray?: object;
|
|
|
|
+ selectStepIndex: number;
|
|
}>();
|
|
}>();
|
|
|
|
+const emit = defineEmits(["setstepindex"]);
|
|
|
|
+const boxClick = (index) => {
|
|
|
|
+ emit("setstepindex", index);
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -71,29 +60,33 @@ defineProps<{
|
|
box-shadow: 0px 1px 1px 1px #00000025;
|
|
box-shadow: 0px 1px 1px 1px #00000025;
|
|
}
|
|
}
|
|
|
|
|
|
-.stepBox:hover {
|
|
|
|
|
|
+.stepBoxHover {
|
|
box-shadow: 0px 0px 0px 0px;
|
|
box-shadow: 0px 0px 0px 0px;
|
|
background-color: $select-hover;
|
|
background-color: $select-hover;
|
|
|
|
+}
|
|
|
|
|
|
- .stepIndex {
|
|
|
|
- border-color: white;
|
|
|
|
-
|
|
|
|
- span {
|
|
|
|
- color: white;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+.stepIndexHover {
|
|
|
|
+ border-color: white !important;
|
|
|
|
|
|
- .stepName {
|
|
|
|
|
|
+ span {
|
|
color: white;
|
|
color: white;
|
|
}
|
|
}
|
|
|
|
+}
|
|
|
|
|
|
- .stepStation {
|
|
|
|
- color: white;
|
|
|
|
- }
|
|
|
|
|
|
+.stepNameHover {
|
|
|
|
+ color: white !important;
|
|
|
|
+}
|
|
|
|
|
|
- .timeBox {
|
|
|
|
- color: white;
|
|
|
|
- }
|
|
|
|
|
|
+.stepStationHover {
|
|
|
|
+ color: white !important;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.timeBoxHover {
|
|
|
|
+ color: white !important;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.hoverTextColor {
|
|
|
|
+ color: white !important;
|
|
}
|
|
}
|
|
|
|
|
|
.stepIndex {
|
|
.stepIndex {
|