ibp工具栏

This commit is contained in:
Yuan 2023-10-10 10:24:47 +08:00
parent af08d1ae10
commit df6e3cb9ab
2 changed files with 11 additions and 6 deletions

View File

@ -7,11 +7,7 @@ import { IBPButtonData } from './graphics/IBPButtonInteraction';
import { errorNotify, successNotify } from 'src/utils/CommonNotify'; import { errorNotify, successNotify } from 'src/utils/CommonNotify';
import { graphicData } from 'src/protos/stationLayoutGraphics'; import { graphicData } from 'src/protos/stationLayoutGraphics';
import { toStorageTransform } from './graphics/GraphicDataBase'; import { toStorageTransform } from './graphics/GraphicDataBase';
import { import { IBPButton, IBPButtonTemplate } from 'src/graphics/IBPButton/IBPButton';
IBPButton,
IBPButtonTemplate,
IIBPButtonData,
} from 'src/graphics/IBPButton/IBPButton';
import { IbpAlarm, IbpAlarmTemplate } from 'src/graphics/ibpAlarm/IbpAlarm'; import { IbpAlarm, IbpAlarmTemplate } from 'src/graphics/ibpAlarm/IbpAlarm';
import { IbpKey, IbpKeyTemplate } from 'src/graphics/ibpKey/IbpKey'; import { IbpKey, IbpKeyTemplate } from 'src/graphics/ibpKey/IbpKey';
import { Arrow, ArrowTemplate } from 'src/graphics/arrow/Arrow'; import { Arrow, ArrowTemplate } from 'src/graphics/arrow/Arrow';

View File

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, reactive, ref } from 'vue'; import { onMounted, reactive, ref, watch } from 'vue';
import { useIBPDrawStore } from '../stores/ibp-draw-store'; import { useIBPDrawStore } from '../stores/ibp-draw-store';
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import { IBPButton } from 'src/graphics/IBPButton/IBPButton'; import { IBPButton } from 'src/graphics/IBPButton/IBPButton';
@ -34,6 +34,14 @@ function toggleRightDrawer() {
onResize(); onResize();
} }
watch(
() => ibpDrawStore.drawAssistant,
(da) => {
if (!da) {
selectUtil.value = '';
}
}
);
const selectUtil = ref(''); const selectUtil = ref('');
const utilsOption: ControlItem[] = reactive([]); const utilsOption: ControlItem[] = reactive([]);
const drawSelect = (item: string) => { const drawSelect = (item: string) => {
@ -124,6 +132,7 @@ function backConfirm() {
</QMenu> </QMenu>
</QBtn> </QBtn>
<QBtnToggle <QBtnToggle
class="q-ml-sm"
v-model="selectUtil" v-model="selectUtil"
:options="utilsOption" :options="utilsOption"
color="brown" color="brown"