Browse Source

执行时改变tab

master
maochaoying 2 years ago
parent
commit
6421c6f3b2
  1. 8
      src/components/Formula.vue
  2. 2
      src/pages/Home.vue

8
src/components/Formula.vue

@ -124,6 +124,12 @@ import { getAllFormulaJSON } from '@/mock/command'
import { useWebSocketStore, useFormulaStore } from '@/store'
import { startFormulaJSON } from '@/mock/command'
const props = defineProps({
changeTab: {
type: Function,
},
})
const webSocketStore = useWebSocketStore()
const formulaStore = useFormulaStore()
@ -161,7 +167,7 @@ const hideAddSettingModal = () => {
const runConfig = item => {
formulaStore.updateCurrentFormula(item)
webSocketStore.sendCommandMsg(startFormulaJSON(item.id))
console.log('run config', item)
props.changeTab(1)
}
const addNewPre = () => {

2
src/pages/Home.vue

@ -216,7 +216,7 @@
"
/>
<Audit v-if="activeTab == 6" />
<Formula v-if="activeTab == 7" />
<Formula v-if="activeTab == 7" :changeTab="changeTab" />
<div class="other_info">
<p class="ip">IP {{ settingStore.deviceIp }}</p>
<div class="time_wrap">

Loading…
Cancel
Save