Browse Source

修改两个阀门的借口

master
maochaoying 2 years ago
parent
commit
6a920c71fc
  1. 13
      src/components/info/AirSwitchConfig.vue

13
src/components/info/AirSwitchConfig.vue

@ -66,11 +66,16 @@
<script setup>
import A1 from '@/assets/img/air/1.png'
import A2 from '@/assets/img/air/2.png'
import { useSealStore } from '@/store'
import { useSealStore, useWebSocketStore } from '@/store'
import {
AirInletProportionalValve_setStateJSON,
AirOutletProportionalValve_setStateJSON,
} from '@/mock/command'
import { ref } from 'vue'
const activeTab = ref('1')
const sealStore = useSealStore()
const webSocketStore = useWebSocketStore()
const changeTab = tab => {
activeTab.value = tab
@ -79,10 +84,16 @@ const topText = ref('0%')
const bottomText = ref('0%')
const topChange = ({ selectedOptions, selectedValues }) => {
topText.value = selectedOptions[0].text
webSocketStore.sendCommandMsg(
AirInletProportionalValve_setStateJSON([parseInt(selectedValues[0]) * 10]),
)
sealStore.updateAirInletProportionalValue(parseInt(selectedValues[0]) * 10)
}
const bottomChange = ({ selectedOptions, selectedValues }) => {
bottomText.value = selectedOptions[0].text
webSocketStore.sendCommandMsg(
AirOutletProportionalValve_setStateJSON([parseInt(selectedValues[0]) * 10]),
)
sealStore.updateAirOutletProportionalValue(parseInt(selectedValues[0]) * 10)
}

Loading…
Cancel
Save