ibp调整

This commit is contained in:
fan 2023-10-10 10:36:41 +08:00
parent af08d1ae10
commit 40f5b6d06c
6 changed files with 161 additions and 0 deletions

View File

@ -3,6 +3,14 @@ import { useIBPDrawStore } from 'src/stores/ibp-draw-store';
import CanvasIBPProperty from './properties/CanvasIBPProperty.vue';
import IbpButtonProperty from './properties/IbpButtonProperty.vue';
import { IBPButton } from 'src/graphics/IBPButton/IBPButton';
import IbpAlarmProperty from './properties/IbpAlarmProperty.vue';
import { IbpAlarm } from 'src/graphics/ibpAlarm/IbpAlarm';
import IbpKeyProperty from './properties/IbpKeyProperty.vue';
import { IbpKey } from 'src/graphics/ibpKey/IbpKey';
import { TextContent } from 'src/graphics/textContent/TextContent';
import IbpTextProperty from './properties/IbpTextProperty.vue';
import { Arrow } from 'src/graphics/arrow/Arrow';
import IbpArrowProperty from './properties/IbpArrowPropery.vue';
const ibpDrawStore = useIBPDrawStore();
</script>
@ -24,6 +32,18 @@ const ibpDrawStore = useIBPDrawStore();
<IbpButtonProperty
v-if="ibpDrawStore.selectedGraphicType === IBPButton.Type"
/>
<ibp-alarm-property
v-else-if="ibpDrawStore.selectedGraphicType === IbpAlarm.Type"
/>
<ibp-key-property
v-else-if="ibpDrawStore.selectedGraphicType === IbpKey.Type"
/>
<ibp-arrow-property
v-else-if="ibpDrawStore.selectedGraphicType === Arrow.Type"
/>
<ibp-text-property
v-else-if="ibpDrawStore.selectedGraphicType === TextContent.Type"
/>
</QCardSection>
</template>
</QCard>

View File

@ -0,0 +1,24 @@
<template>
<q-form>
<q-input outlined readonly v-model="ibpAlarmModel.id" label="id" hint="" />
<q-input
outlined
v-model="ibpAlarmModel.code"
@blur="onUpdate"
label="Ibp蜂鸣器"
lazy-rules
/>
</q-form>
</template>
<script setup lang="ts">
import { IbpAlarmData } from 'src/drawApp/graphics/IbpAlarmInteraction';
import { useIBPDrawStore } from 'src/stores/ibp-draw-store';
import { useFormData } from 'src/components/DrawAppFormUtils';
const ibpDrawStore = useIBPDrawStore();
const { data: ibpAlarmModel, onUpdate } = useFormData(
new IbpAlarmData(),
ibpDrawStore.getDrawApp()
);
</script>

View File

@ -0,0 +1,24 @@
<template>
<q-form>
<q-input outlined readonly v-model="ibpArrowModel.id" label="id" hint="" />
<q-input
outlined
v-model="ibpArrowModel.code"
@blur="onUpdate"
label="Ibp箭头"
lazy-rules
/>
</q-form>
</template>
<script setup lang="ts">
import { ArrowData } from 'src/drawApp/graphics/ArrowInteraction';
import { useIBPDrawStore } from 'src/stores/ibp-draw-store';
import { useFormData } from 'src/components/DrawAppFormUtils';
const ibpDrawStore = useIBPDrawStore();
const { data: ibpArrowModel, onUpdate } = useFormData(
new ArrowData(),
ibpDrawStore.getDrawApp()
);
</script>

View File

@ -0,0 +1,24 @@
<template>
<q-form>
<q-input outlined readonly v-model="ibpKeyModel.id" label="id" hint="" />
<q-input
outlined
v-model="ibpKeyModel.code"
@blur="onUpdate"
label="Ibp钥匙"
lazy-rules
/>
</q-form>
</template>
<script setup lang="ts">
import { IbpKeyData } from 'src/drawApp/graphics/IbpKeyInteraction';
import { useIBPDrawStore } from 'src/stores/ibp-draw-store';
import { useFormData } from 'src/components/DrawAppFormUtils';
const ibpDrawStore = useIBPDrawStore();
const { data: ibpKeyModel, onUpdate } = useFormData(
new IbpKeyData(),
ibpDrawStore.getDrawApp()
);
</script>

View File

@ -0,0 +1,67 @@
<template>
<q-form>
<q-input
outlined
readonly
v-model="textContentModel.id"
label="id"
hint=""
/>
<q-input
outlined
class="q-mt-sm"
v-model="textContentModel.code"
@blur="onUpdate"
label="IBP文字Code"
lazy-rules
/>
<q-input
outlined
class="q-mt-sm"
v-model="textContentModel.content"
@update:model-value="onUpdate"
label="IBP文字内容"
lazy-rules
/>
<q-input
outlined
class="q-mt-sm"
v-model="textContentModel.color"
@blur="onUpdate"
label="IBP文字颜色"
lazy-rules
>
<template v-slot:append>
<q-icon name="colorize" class="cursor-pointer">
<q-popup-proxy cover transition-show="scale" transition-hide="scale">
<q-color
@update:model-value="onUpdate"
v-model="textContentModel.color"
/>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
<q-input
class="q-mt-sm"
v-model.number="textContentModel.fontSize"
type="number"
outlined
@blur="onUpdate"
label="IBP文字大小"
lazy-rules
/>
</q-form>
</template>
<script setup lang="ts">
import { IbpTextData } from 'src/drawApp/graphics/IbpTextInteraction.ts';
import { useIBPDrawStore } from 'src/stores/ibp-draw-store';
import { useFormData } from 'src/components/DrawAppFormUtils';
const ibpDrawStore = useIBPDrawStore();
const { data: textContentModel, onUpdate } = useFormData(
new IbpTextData(),
ibpDrawStore.getDrawApp()
);
</script>

View File

@ -32,6 +32,8 @@ export class ArrowDraw extends GraphicDrawAssistant<ArrowTemplate, IArrowData> {
super(app, template, 'call_made', '箭头Arrow');
this.container.addChild(this.lineGraphic);
this.container.addChild(this.arrowGraphic);
ArrowPointEditPlugin.init(app, this);
}
bind(): void {