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