Browse Source

fix: 亮度记忆; 试管冷却状态

master
guoapeng 2 months ago
parent
commit
0acec4f940
  1. 3
      src/components/home/Tube/index.vue
  2. 1
      src/stores/systemStore.ts
  3. 3
      src/types/system.d.ts
  4. 5
      src/views/home/index.vue

3
src/components/home/Tube/index.vue

@ -108,7 +108,7 @@ defineExpose({
已放置 已放置
</el-tag> </el-tag>
</div> </div>
<div class="tube-item" :class="{ 'tube-item-heat': ['warm_up', 'thermostatic'].includes(data.heatingType), 'tube-item-constant': data.heatingType === 'constant', 'tube-item-fan': data.fanOpen }" @click.prevent="mousedownHandle" @touch.prevent="mousedownHandle">
<div class="tube-item" :class="{ 'tube-item-heat': ['warm_up', 'thermostatic'].includes(data.heatingType), 'tube-item-constant': data.heatingType === 'constant', 'tube-item-fan': data.fanOpen || data.heatingType === 'trayCooling' }" @click.prevent="mousedownHandle" @touch.prevent="mousedownHandle">
<div v-if="data.trayStatus === 0" class="tube-disable" /> <div v-if="data.trayStatus === 0" class="tube-disable" />
<div <div
v-if="craft?.state" v-if="craft?.state"
@ -162,6 +162,7 @@ defineExpose({
<span v-show="data.heatingType === 'warm_up'" style="color: #FF4500;font-weight: bold ">预热中</span> <span v-show="data.heatingType === 'warm_up'" style="color: #FF4500;font-weight: bold ">预热中</span>
<span v-show="data.heatingType === 'thermostatic'" style="color: #FF4500;;font-weight: bold ">加热中</span> <span v-show="data.heatingType === 'thermostatic'" style="color: #FF4500;;font-weight: bold ">加热中</span>
<span v-show="data.heatingType === 'constant'" style="color: #eccbb6;font-weight: bold ">恒温中</span> <span v-show="data.heatingType === 'constant'" style="color: #eccbb6;font-weight: bold ">恒温中</span>
<span v-show="data.heatingType === 'trayCooling'" style="color: #6CD3FF;font-weight: bold ">试管冷却中</span>
<span v-show="data.fanOpen" style="color: #6CD3FF;font-weight: bold ">降温中</span> <span v-show="data.fanOpen" style="color: #6CD3FF;font-weight: bold ">降温中</span>
</div> </div>
<CountDown v-if="data.startHeatTime && data.targetTime" :current="new Date().getTime()" :start-time="data.startHeatTime" :duration="data.targetTime" /> <CountDown v-if="data.startHeatTime && data.targetTime" :current="new Date().getTime()" :start-time="data.startHeatTime" :duration="data.targetTime" />

1
src/stores/systemStore.ts

@ -234,6 +234,7 @@ export const useSystemStore = defineStore('system', {
systemList: [], systemList: [],
systemLogList: [], systemLogList: [],
currentTime: '0000-00-00 00:00:00', currentTime: '0000-00-00 00:00:00',
lightNum: 100,
}), }),
actions: { actions: {
insertLog(log: System.SystemLog) { insertLog(log: System.SystemLog) {

3
src/types/system.d.ts

@ -10,6 +10,7 @@ declare namespace System {
loginForm: LoginForm loginForm: LoginForm
systemLogList: SystemLog[] systemLogList: SystemLog[]
currentTime: string currentTime: string
lightNum: number
} }
interface SystemLog { interface SystemLog {
cmdName: string cmdName: string
@ -61,7 +62,7 @@ declare namespace System {
moduleCode: 'heat_module_01' | 'heat_module_02' | 'heat_module_03' | 'heat_module_04' | 'heat_module_05' | 'heat_module_06' moduleCode: 'heat_module_01' | 'heat_module_02' | 'heat_module_03' | 'heat_module_04' | 'heat_module_05' | 'heat_module_06'
trayUp: 0 | 1 trayUp: 0 | 1
trayStatus: 0 | 1 trayStatus: 0 | 1
heatingType: 'stop' | 'warm_up' | 'thermostatic' | 'constant'
heatingType: 'stop' | 'warm_up' | 'thermostatic' | 'constant' | 'trayCooling'
fanOpen: boolean fanOpen: boolean
heating?: boolean heating?: boolean
capExist: boolean capExist: boolean

5
src/views/home/index.vue

@ -311,13 +311,12 @@ const warmUpStart = async () => {
} }
const lightVisible = ref(false) const lightVisible = ref(false)
const lightNum = ref(0)
const photoUrl = ref('') const photoUrl = ref('')
const take_photo = async () => { const take_photo = async () => {
const params = { const params = {
lightIntensity: lightVisible.value ? lightNum.value : null,
lightIntensity: lightVisible.value ? systemStore.lightNum : null,
} }
photoUrl.value = await takePhoto(params) photoUrl.value = await takePhoto(params)
} }
@ -364,7 +363,7 @@ const savePhoto = () => {
</div> </div>
</template> </template>
<span>亮度: </span> <span>亮度: </span>
<el-slider v-model="lightNum" />
<el-slider v-model="systemStore.lightNum" />
</el-popover> </el-popover>
<ft-button type="primary" :click-handle="take_photo"> <ft-button type="primary" :click-handle="take_photo">

Loading…
Cancel
Save