|
@ -101,10 +101,12 @@ |
|
|
<p class="title">配方名称</p> |
|
|
<p class="title">配方名称</p> |
|
|
<div> |
|
|
<div> |
|
|
<input |
|
|
<input |
|
|
|
|
|
id="id_formula" |
|
|
type="text" |
|
|
type="text" |
|
|
v-model="formula_id" |
|
|
v-model="formula_id" |
|
|
class="formula_input" |
|
|
class="formula_input" |
|
|
placeholder="请输入配方名称" |
|
|
placeholder="请输入配方名称" |
|
|
|
|
|
@focus="handleShowKeyBoard" |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -218,11 +220,15 @@ |
|
|
<div class="btn" @click="save">保存</div> |
|
|
<div class="btn" @click="save">保存</div> |
|
|
<div class="btn ml" @click="hiddleSettingModal">返回</div> |
|
|
<div class="btn ml" @click="hiddleSettingModal">返回</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="key_wrap" v-if="showkeyboard" id="keyboard_formula"> |
|
|
|
|
|
<SimpleKeyboard @onChange="onChange" :input="formula_id" /> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup> |
|
|
<script setup> |
|
|
import { ref } from 'vue' |
|
|
|
|
|
|
|
|
import { ref, onMounted } from 'vue' |
|
|
|
|
|
import SimpleKeyboard from 'cpns/SimpleKeyboard' |
|
|
import { showSuccessToast, showFailToast } from 'vant' |
|
|
import { showSuccessToast, showFailToast } from 'vant' |
|
|
import { useSettingStore, useWebSocketStore, useOperatorStore } from '@/store' |
|
|
import { useSettingStore, useWebSocketStore, useOperatorStore } from '@/store' |
|
|
import { storeToRefs } from 'pinia' |
|
|
import { storeToRefs } from 'pinia' |
|
@ -665,6 +671,24 @@ const setSprayLiquidVal = () => { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const showkeyboard = ref(false) |
|
|
|
|
|
const onChange = a => { |
|
|
|
|
|
formula_id.value = a |
|
|
|
|
|
} |
|
|
|
|
|
const handleShowKeyBoard = () => { |
|
|
|
|
|
showkeyboard.value = true |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
|
document.addEventListener('click', e => { |
|
|
|
|
|
let box = document.getElementById('keyboard_formula') |
|
|
|
|
|
let room = document.getElementById('id_formula') |
|
|
|
|
|
if (!box?.contains(e.target) && e.target != room) { |
|
|
|
|
|
showkeyboard.value = false |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss" scoped> |
|
@ -762,5 +786,12 @@ const setSprayLiquidVal = () => { |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
.key_wrap { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
left: 0; |
|
|
|
|
|
right: 0; |
|
|
|
|
|
bottom: 0; |
|
|
|
|
|
height: 230px; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |