Squashed commit of the following:
All checks were successful
CI / Docker-Build (push) Successful in 1m59s
All checks were successful
CI / Docker-Build (push) Successful in 1m59s
commit d4c5e5a4a8
Author: joylink_zhaoerwei <Bob_Engineer@163.com>
Date: Thu Jun 27 15:41:42 2024 +0800
继电器增加批量操作
This commit is contained in:
parent
d17144cd7e
commit
f0cdd8c3b4
@ -34,6 +34,9 @@
|
||||
></signalFaultAlarm-property>
|
||||
</q-card-section>
|
||||
</template>
|
||||
<template v-else-if="relayCabinetStore.selectedGraphics.length > 1">
|
||||
<relay-multiple-select-property />
|
||||
</template>
|
||||
</q-card>
|
||||
</div>
|
||||
</template>
|
||||
@ -49,6 +52,7 @@ import { PhaseFailureProtector } from 'src/graphics/phaseFailureProtector/PhaseF
|
||||
import SignalFaultAlarmProperty from './properties/SignalFaultAlarmProperty.vue';
|
||||
import { SignalFaultAlarm } from 'src/graphics/signalFaultAlarm/SignalFaultAlarm';
|
||||
import { useRelayCabinetStore } from 'src/stores/relayCabinet-store';
|
||||
import RelayMultipleSelectProperty from './properties/RelayMultipleSelectProperty.vue';
|
||||
|
||||
const relayCabinetStore = useRelayCabinetStore();
|
||||
</script>
|
||||
|
@ -0,0 +1,54 @@
|
||||
<template>
|
||||
<div class="q-gutter-sm" style="padding: 16px">
|
||||
<q-select
|
||||
outlined
|
||||
v-model="defaultInitialPosition"
|
||||
:options="defaultInitialPositionModel"
|
||||
emitValue
|
||||
mapOptions
|
||||
label="继电器默认初始位置"
|
||||
>
|
||||
<template v-slot:after>
|
||||
<q-btn label="设置" color="primary" @click="changeRelayPos" />
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Relay } from 'src/graphics/relay/Relay';
|
||||
import { relayCabinetGraphicData } from 'src/protos/relayCabinetLayoutGraphics';
|
||||
import { useRelayCabinetStore } from 'src/stores/relayCabinet-store';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const relayCabinetStore = useRelayCabinetStore();
|
||||
const defaultInitialPosition =
|
||||
ref<relayCabinetGraphicData.CjDataItem.PostionType>(
|
||||
relayCabinetGraphicData.CjDataItem.PostionType.NONE
|
||||
);
|
||||
const defaultInitialPositionModel = [
|
||||
{
|
||||
label: 'Q',
|
||||
value: relayCabinetGraphicData.CjDataItem.PostionType.Q,
|
||||
},
|
||||
{
|
||||
label: 'H',
|
||||
value: relayCabinetGraphicData.CjDataItem.PostionType.H,
|
||||
},
|
||||
{
|
||||
label: 'NONE',
|
||||
value: relayCabinetGraphicData.CjDataItem.PostionType.NONE,
|
||||
},
|
||||
];
|
||||
|
||||
function changeRelayPos() {
|
||||
const selectedRelays = relayCabinetStore.selectedGraphics?.filter(
|
||||
(g) => g instanceof Relay
|
||||
);
|
||||
selectedRelays?.forEach(
|
||||
(relay) =>
|
||||
((relay as Relay).datas.defaultInitialPosition =
|
||||
defaultInitialPosition.value)
|
||||
);
|
||||
}
|
||||
</script>
|
@ -59,7 +59,7 @@ export const useRelayCabinetStore = defineStore('relayCabinet', {
|
||||
).description;
|
||||
return name || '';
|
||||
}
|
||||
return '多选';
|
||||
return '批量设置';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user