Browse Source

消毒设置运行时改为运行参数切且不显示配方名称

master
王梦远 2 weeks ago
parent
commit
f069fd9dee
  1. 3
      src/components/formula/FormulaConfig.vue
  2. 11
      src/components/home/HomeSetting.vue
  3. 2
      src/components/home/config.vue
  4. 5
      src/router/routes.ts
  5. 2
      src/views/formula/index.vue
  6. 4
      src/views/home/chart.vue
  7. 2
      src/views/setting/index.vue

3
src/components/formula/FormulaConfig.vue

@ -19,6 +19,7 @@ import { useFormulaStore } from '@/stores/formulaStore'
const props = defineProps<{ const props = defineProps<{
type: string type: string
formulaNameVisible: boolean
}>() }>()
const nameLeng = 10 const nameLeng = 10
@ -391,7 +392,7 @@ defineExpose({
<transition name="slide-right"> <transition name="slide-right">
<div v-if="isFlip" class="formula-form"> <div v-if="isFlip" class="formula-form">
<el-form ref="formRef" :model="formData" label-width="auto" label-position="right" :size="size" inline> <el-form ref="formRef" :model="formData" label-width="auto" label-position="right" :size="size" inline>
<el-form-item v-if="type !== 'setting'" label="配方名称" style="width: 93%;">
<el-form-item v-if="type !== 'setting' && formulaNameVisible" label="配方名称" style="width: 93%;">
<el-input <el-input
v-model="formData.name" v-model="formData.name"
v-prevent-keyboard v-prevent-keyboard

11
src/components/home/HomeSetting.vue

@ -86,14 +86,15 @@ const getPressureConfig = async () => {
const deviceState = computed(() => { const deviceState = computed(() => {
return disinfectionState.value.state === 'idle' || disinfectionState.value.state === 'finished' return disinfectionState.value.state === 'idle' || disinfectionState.value.state === 'finished'
}) })
const disinfectFormulaTitle = ref<string>('消毒设置')
/** /**
* @function 打开消毒设置对话框 * @function 打开消毒设置对话框
* @desc 根据当前选中配方或默认配方初始化设置 * @desc 根据当前选中配方或默认配方初始化设置
*/ */
const onDisinfectConfig = () => {
const onDisinfectConfig = (title: string) => {
formulaStore.updateSelectedFormulaDataByList(selectedByFormulas.value || cloneDeep(formulaStore.defaultFormulaInfo)) formulaStore.updateSelectedFormulaDataByList(selectedByFormulas.value || cloneDeep(formulaStore.defaultFormulaInfo))
disinfectFormulaVisible.value = true disinfectFormulaVisible.value = true
disinfectFormulaTitle.value = title
} }
/** /**
@ -260,7 +261,7 @@ const settingWidth = computed(() => {
:width="settingWidth" :width="settingWidth"
text-color="#1989fa" text-color="#1989fa"
height="3rem" height="3rem"
@click="onDisinfectConfig"
@click="onDisinfectConfig('消毒设置')"
/> />
<BtButton <BtButton
v-else v-else
@ -270,12 +271,12 @@ const settingWidth = computed(() => {
:width="settingWidth" :width="settingWidth"
text-color="#1989fa" text-color="#1989fa"
height="3rem" height="3rem"
@click="onDisinfectConfig"
@click="onDisinfectConfig('运行参数')"
/> />
</div> </div>
</div> </div>
</div> </div>
<ft-dialog v-model="disinfectFormulaVisible" title="消毒设置" width="80vw">
<ft-dialog v-model="disinfectFormulaVisible" :title="disinfectFormulaTitle" width="80vw">
<div style="height: 80vh;overflow: auto"> <div style="height: 80vh;overflow: auto">
<Config ref="configRef" /> <Config ref="configRef" />
</div> </div>

2
src/components/home/config.vue

@ -135,7 +135,7 @@ const onDefaultFormula = () => {
</bt-button> </bt-button>
</div> </div>
<div class="formula-config"> <div class="formula-config">
<FormulaConfig type="home" />
<FormulaConfig type="home" :formula-name-visible="!!isDeviceIdle" />
</div> </div>
<SelectModal <SelectModal
v-if="isModalOpen" v-if="isModalOpen"

5
src/router/routes.ts

@ -132,6 +132,11 @@ watchEffect(() => {
return item.name !== 'liquid' return item.name !== 'liquid'
}) })
} }
/* else { //
authRoutes.value = authRoutes.value.filter((item) => {
return item.name !== 'liquid'
})
} */
}, 2000) }, 2000)
}) })

2
src/views/formula/index.vue

@ -43,7 +43,7 @@ const selectedIndexRest = () => {
</div> </div>
</div> </div>
<div class="formula-right"> <div class="formula-right">
<FormulaConfig ref="formRef" type="formula" />
<FormulaConfig ref="formRef" type="formula" formula-name-visible="true" />
</div> </div>
</main> </main>
</div> </div>

4
src/views/home/chart.vue

@ -87,7 +87,7 @@ const onClose = () => {
</div> </div>
<div class="line-chart-set"> <div class="line-chart-set">
<bt-button <bt-button
button-text="消毒设置"
button-text="运行参数"
text-size="14px" text-size="14px"
border-radius="5px" border-radius="5px"
height="3.5rem" height="3.5rem"
@ -151,7 +151,7 @@ const onClose = () => {
/> />
</div> </div>
</div> </div>
<ft-dialog v-model="disinfectFormulaVisible" title="消毒设置" width="80vw" :ok-handle="onSave" @cancel="onClose">
<ft-dialog v-model="disinfectFormulaVisible" title="" width="80vw" :ok-handle="onSave" @cancel="onClose">
<div> <div>
<Config ref="configRef" /> <Config ref="configRef" />
</div> </div>

2
src/views/setting/index.vue

@ -38,7 +38,7 @@ const selectItem = (menuCode: string) => {
<div class="setting-right"> <div class="setting-right">
<History v-if="selectedMenuCode === 'history'" /> <History v-if="selectedMenuCode === 'history'" />
<div v-if="selectedMenuCode === 'defaultFormula'"> <div v-if="selectedMenuCode === 'defaultFormula'">
<FormulaConfig type="setting" />
<FormulaConfig type="setting" formula-name-visible="false" />
</div> </div>
<template v-if="selectedMenuCode === 'user'"> <template v-if="selectedMenuCode === 'user'">
<User /> <User />

Loading…
Cancel
Save