Browse Source

反应板/小瓶样式调整

fixbug/style_0123
zhangjiming 7 months ago
parent
commit
43be65dfc9
  1. 2
      src/pages/Index/Regular/Consumables.vue
  2. 47
      src/pages/Index/components/Consumables/InfoBar.vue
  3. 4
      src/pages/Index/components/Consumables/MainComponent.vue
  4. 2
      src/pages/Index/components/Consumables/Plate.vue
  5. 31
      src/pages/Index/components/Consumables/SpttingPlates.vue
  6. 5
      src/store/modules/consumables.ts

2
src/pages/Index/Regular/Consumables.vue

@ -84,7 +84,7 @@
v-for="(item, idx) in consumableStore.consumableData?.littBottleGroup" v-for="(item, idx) in consumableStore.consumableData?.littBottleGroup"
:key="idx" :key="idx"
class="ball-grid" class="ball-grid"
:projectName="item.projShortName || ''"
:projectName="item.projName || ''"
:currentCount="item.num" :currentCount="item.num"
:totalBalls="25" :totalBalls="25"
:activatedBalls="item.num" :activatedBalls="item.num"

47
src/pages/Index/components/Consumables/InfoBar.vue

@ -1,11 +1,13 @@
<template> <template>
<div class="status-bar" v-if="currentCount">
<span class="project-name">{{ projectName }}</span>
<span class="project-count">{{ currentCount }}/{{ maxCount }}</span>
</div>
<div v-else class="status-bar">
<span class="project-name">{{ projectName }}</span>
<span class="project-count"></span>
<div :style="`width:${width}`">
<div class="status-bar" v-if="currentCount">
<span class="project-name">{{ projectName }}</span>
<span class="project-count">{{ currentCount }}/{{ maxCount }}</span>
</div>
<div v-else class="status-bar">
<span class="project-name">{{ projectName }}</span>
<span class="project-count"></span>
</div>
</div> </div>
</template> </template>
@ -26,6 +28,10 @@ const props = defineProps({
type: Number, type: Number,
default: 25, // 25 default: 25, // 25
}, },
width: {
type: String,
default: '120px',
},
}) })
// props // props
@ -34,25 +40,26 @@ const { projectName, currentCount, maxCount } = toRefs(props)
<style scoped> <style scoped>
.status-bar { .status-bar {
width: 100%;
display: flex; display: flex;
justify-content: space-around;
/* justify-content: space-between; */
align-items: center; align-items: center;
background-color: #808080; background-color: #808080;
font-size: 32px;
height: 32px;
}
.project-name {
font-weight: 700;
font-size: 22px; font-size: 22px;
font-weight: 600;
height: 30px;
color: #fff; color: #fff;
padding: 0 20px;
}
.project-name {
flex: 1 1 auto;
text-align: left;
margin-right: 12px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.project-count { .project-count {
font-weight: 700;
font-size: 22px;
color: #fff;
background-color: #808080;
flex: 0 0 auto;
margin-left: 10px;
} }
</style> </style>

4
src/pages/Index/components/Consumables/MainComponent.vue

@ -5,7 +5,7 @@
:activeColor="activeColor" :inUse="inUse"/> :activeColor="activeColor" :inUse="inUse"/>
<!-- 项目信息组件 --> <!-- 项目信息组件 -->
<InfoBar :projectName="projectName" :currentCount="currentCount" :maxCount="maxCount" />
<InfoBar :projectName="projectName" :currentCount="currentCount" :maxCount="maxCount" :width="gridWidth"/>
</div> </div>
</template> </template>
@ -62,7 +62,7 @@ const props = defineProps({
.combined-container { .combined-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
/* align-items: center; */
background-color: #555555; background-color: #555555;
border-radius: 10px; border-radius: 10px;
} }

2
src/pages/Index/components/Consumables/Plate.vue

@ -40,7 +40,7 @@ defineProps({
display: flex; display: flex;
flex-direction: row-reverse; flex-direction: row-reverse;
justify-content: space-between; justify-content: space-between;
gap: 0.5px;
gap: 2.5px;
width: 355px; width: 355px;
// height: 100%; // height: 100%;
background-color: #f0f0f0; background-color: #f0f0f0;

31
src/pages/Index/components/Consumables/SpttingPlates.vue

@ -15,9 +15,9 @@
<div class="sptting-plates"> <div class="sptting-plates">
<div class="card" v-for="i in 6" :key="i"> <div class="card" v-for="i in 6" :key="i">
<div class="plate-area"> <div class="plate-area">
<div class="plate-bottom" v-if="plates.length > 0">
<span></span>
<span class="project-name">{{ plates[i - 1]?.projShortName }}</span>
<div class="plate-bottom" v-if="plates[i - 1]?.isInstall">
<span class="project-lot">{{ plates[i - 1]?.projName }}</span>
<span class="project-name">{{ plates[i - 1]?.lotId }}</span>
<span class="project-number">{{ <span class="project-number">{{
!!plates[i - 1]?.isInstall ? `${plates[i - 1]?.num}/25` : '' !!plates[i - 1]?.isInstall ? `${plates[i - 1]?.num}/25` : ''
}}</span> }}</span>
@ -115,7 +115,7 @@ const updateSliderEndVal = async (plateNum, order) => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: #f6f6f6; background-color: #f6f6f6;
// padding-left: 4px;
padding-left: 8px;
// //
.temperature { .temperature {
width: 100%; width: 100%;
@ -188,11 +188,8 @@ const updateSliderEndVal = async (plateNum, order) => {
background-color: #f6f6f6; background-color: #f6f6f6;
.plate-area { .plate-area {
// width: 100%;
// height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
position: relative; position: relative;
.close-circle { .close-circle {
@ -216,18 +213,26 @@ const updateSliderEndVal = async (plateNum, order) => {
} }
.plate-bottom { .plate-bottom {
width: 100%;
// width: 100%;
height: 32px; height: 32px;
background-color: #808080; background-color: #808080;
display: flex; display: flex;
justify-content: space-around;
// justify-content: space-around;
align-items: center;
color: white; color: white;
line-height: 32px;
font-size: 22px;
padding: 0 10px;
gap: 8px;
.project-name,
.project-name, .project-lot {
flex: 1 1 auto;
text-align: left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.project-number { .project-number {
font-size: 25px;
font-weight: 300;
flex: 0 0 auto;
} }
} }
} }

5
src/store/modules/consumables.ts

@ -101,9 +101,10 @@ export const useConsumablesStore = defineStore(
} }
const projectsAvailable = computed(() => { const projectsAvailable = computed(() => {
//@ts-ignore
const group = R.groupBy( const group = R.groupBy(
(p) => p.projName,
//@ts-ignore
R.prop('projName'),
consumableData.value.reactionPlateGroup, consumableData.value.reactionPlateGroup,
) )
const pNames = R.keys(group).filter((n) => n !== 'null') const pNames = R.keys(group).filter((n) => n !== 'null')

Loading…
Cancel
Save