|
|
@ -15,12 +15,25 @@ |
|
|
|
<p>操作</p> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
id="set_device_container" |
|
|
|
:class=" |
|
|
|
formulaStore?.formulaList?.length == 0 |
|
|
|
? 'content_wrap layout' |
|
|
|
: 'content_wrap' |
|
|
|
" |
|
|
|
> |
|
|
|
<img |
|
|
|
:src="Top" |
|
|
|
@click.prevent="topContainer" |
|
|
|
class="top_arrow" |
|
|
|
alt="" |
|
|
|
/> |
|
|
|
<img |
|
|
|
:src="Down" |
|
|
|
@click.prevent="bottomContainer" |
|
|
|
class="bottom_arrow" |
|
|
|
alt="" |
|
|
|
/> |
|
|
|
<div |
|
|
|
class="line" |
|
|
|
v-for="item in formulaStore?.formulaList" |
|
|
@ -123,6 +136,8 @@ import UpdatePreSetting from './UpdatePreSetting' |
|
|
|
import { getAllFormulaJSON } from '@/mock/command' |
|
|
|
import { useWebSocketStore, useFormulaStore } from '@/store' |
|
|
|
import { startFormulaJSON } from '@/mock/command' |
|
|
|
import Down from '@/assets/img/arrow/down.png' |
|
|
|
import Top from '@/assets/img/arrow/top.png' |
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
|
changeTab: { |
|
|
@ -133,6 +148,16 @@ const props = defineProps({ |
|
|
|
}, |
|
|
|
}) |
|
|
|
|
|
|
|
const topContainer = () => { |
|
|
|
const ele = document.getElementById('set_device_container') |
|
|
|
ele.scrollTop = ele.scrollTop - 100 < 0 ? 0 : ele.scrollTop - 100 |
|
|
|
} |
|
|
|
|
|
|
|
const bottomContainer = () => { |
|
|
|
const ele = document.getElementById('set_device_container') |
|
|
|
ele.scrollTop = ele.scrollTop + 100 |
|
|
|
} |
|
|
|
|
|
|
|
const webSocketStore = useWebSocketStore() |
|
|
|
const formulaStore = useFormulaStore() |
|
|
|
|
|
|
@ -215,6 +240,23 @@ onMounted(() => { |
|
|
|
height: 446px; |
|
|
|
overflow: scroll; |
|
|
|
box-sizing: border-box; |
|
|
|
position: relative; |
|
|
|
.top_arrow { |
|
|
|
width: 40px; |
|
|
|
height: 40px; |
|
|
|
position: fixed; |
|
|
|
right: 45px; |
|
|
|
top: 221px; |
|
|
|
z-index: 2; |
|
|
|
} |
|
|
|
.bottom_arrow { |
|
|
|
width: 40px; |
|
|
|
height: 40px; |
|
|
|
position: fixed; |
|
|
|
right: 45px; |
|
|
|
bottom: 159px; |
|
|
|
z-index: 2; |
|
|
|
} |
|
|
|
.line { |
|
|
|
padding: 12px; |
|
|
|
padding-left: 40px; |
|
|
|