|
|
@ -15,16 +15,14 @@ |
|
|
|
: 'content_wrap' |
|
|
|
" |
|
|
|
> |
|
|
|
<div |
|
|
|
class="line" |
|
|
|
v-for="item in formulaStore?.formulaList" |
|
|
|
:key="item.id" |
|
|
|
> |
|
|
|
<!-- v-for="item in formulaStore?.formulaList" |
|
|
|
:key="item.id" --> |
|
|
|
<div class="line"> |
|
|
|
<div class="username">{{ item?.formula_id }}</div> |
|
|
|
<div class="btns"> |
|
|
|
<div class="btn" @click="delModalShow">删除</div> |
|
|
|
<div class="btn mg" @click="showSetting">配置</div> |
|
|
|
<div class="btn" @click="runConfig">执行</div> |
|
|
|
<div class="btn" @click="delModalShow(item)">删除</div> |
|
|
|
<div class="btn mg" @click="showSetting(item)">配置</div> |
|
|
|
<div class="btn" @click="runConfig(item)">执行</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<svg |
|
|
@ -120,13 +118,15 @@ import AddPreModal from 'cpns/dialogs/AddPreModal' |
|
|
|
import PreSetting from './PreSetting' |
|
|
|
import { getAllFormulaJSON } from '@/mock/command' |
|
|
|
import { useWebSocketStore, useFormulaStore } from '@/store' |
|
|
|
import { startFormulaJSON } from '@/mock/command' |
|
|
|
|
|
|
|
const webSocketStore = useWebSocketStore() |
|
|
|
const formulaStore = useFormulaStore() |
|
|
|
|
|
|
|
const delPreModalVisible = ref(false) |
|
|
|
|
|
|
|
const delModalShow = () => { |
|
|
|
const delModalShow = item => { |
|
|
|
formulaStore.updateCurrentFormula(item) |
|
|
|
delPreModalVisible.value = true |
|
|
|
} |
|
|
|
|
|
|
@ -147,7 +147,8 @@ const hideAddNewPreModal = () => { |
|
|
|
|
|
|
|
const isSettingVisible = ref(false) |
|
|
|
|
|
|
|
const showSetting = () => { |
|
|
|
const showSetting = item => { |
|
|
|
formulaStore.updateCurrentFormula(item) |
|
|
|
isSettingVisible.value = true |
|
|
|
} |
|
|
|
|
|
|
@ -156,12 +157,14 @@ const hideSettingModal = () => { |
|
|
|
} |
|
|
|
|
|
|
|
// 执行配置 |
|
|
|
const runConfig = () => { |
|
|
|
console.log('run config') |
|
|
|
const runConfig = item => { |
|
|
|
formulaStore.updateCurrentFormula(item) |
|
|
|
webSocketStore.sendCommandMsg(startFormulaJSON(item.id)) |
|
|
|
console.log('run config', item) |
|
|
|
} |
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
webSocketStore.sendCommandMsg(getAllFormulaJSON) |
|
|
|
// webSocketStore.sendCommandMsg(getAllFormulaJSON) |
|
|
|
}) |
|
|
|
</script> |
|
|
|
|
|
|
|