|
@ -15,9 +15,11 @@ |
|
|
: 'content_wrap' |
|
|
: 'content_wrap' |
|
|
" |
|
|
" |
|
|
> |
|
|
> |
|
|
<!-- v-for="item in formulaStore?.formulaList" |
|
|
|
|
|
:key="item.id" --> |
|
|
|
|
|
<div class="line"> |
|
|
|
|
|
|
|
|
<div |
|
|
|
|
|
class="line" |
|
|
|
|
|
v-for="item in formulaStore?.formulaList" |
|
|
|
|
|
:key="item.id" |
|
|
|
|
|
> |
|
|
<div class="username">{{ item?.formula_id }}</div> |
|
|
<div class="username">{{ item?.formula_id }}</div> |
|
|
<div class="btns"> |
|
|
<div class="btns"> |
|
|
<div class="btn" @click="delModalShow(item)">删除</div> |
|
|
<div class="btn" @click="delModalShow(item)">删除</div> |
|
@ -104,17 +106,12 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<DelPreModal v-if="delPreModalVisible" :hideDelModal="hideDelModal" /> |
|
|
<DelPreModal v-if="delPreModalVisible" :hideDelModal="hideDelModal" /> |
|
|
<AddPreModal |
|
|
|
|
|
v-if="addPreModalVisible" |
|
|
|
|
|
:hideAddNewPreModal="hideAddNewPreModal" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup> |
|
|
<script setup> |
|
|
import { ref, onMounted } from 'vue' |
|
|
import { ref, onMounted } from 'vue' |
|
|
import DelPreModal from 'cpns/dialogs/DelPreModal' |
|
|
import DelPreModal from 'cpns/dialogs/DelPreModal' |
|
|
import AddPreModal from 'cpns/dialogs/AddPreModal' |
|
|
|
|
|
import PreSetting from './PreSetting' |
|
|
import PreSetting from './PreSetting' |
|
|
import { getAllFormulaJSON } from '@/mock/command' |
|
|
import { getAllFormulaJSON } from '@/mock/command' |
|
|
import { useWebSocketStore, useFormulaStore } from '@/store' |
|
|
import { useWebSocketStore, useFormulaStore } from '@/store' |
|
@ -134,17 +131,6 @@ const hideDelModal = () => { |
|
|
delPreModalVisible.value = false |
|
|
delPreModalVisible.value = false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const addPreModalVisible = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
// 新增预设 |
|
|
|
|
|
const addNewPre = () => { |
|
|
|
|
|
addPreModalVisible.value = true |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const hideAddNewPreModal = () => { |
|
|
|
|
|
addPreModalVisible.value = false |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const isSettingVisible = ref(false) |
|
|
const isSettingVisible = ref(false) |
|
|
|
|
|
|
|
|
const showSetting = item => { |
|
|
const showSetting = item => { |
|
@ -163,6 +149,11 @@ const runConfig = item => { |
|
|
console.log('run config', item) |
|
|
console.log('run config', item) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const addNewPre = () => { |
|
|
|
|
|
// 添加新预设 |
|
|
|
|
|
isSettingVisible.value = true |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
// webSocketStore.sendCommandMsg(getAllFormulaJSON) |
|
|
// webSocketStore.sendCommandMsg(getAllFormulaJSON) |
|
|
}) |
|
|
}) |
|
|