删除组合类型列表+增加关联设备类型断路器和电源屏

This commit is contained in:
joylink_zhaoerwei 2023-11-08 13:07:25 +08:00
parent 8d5a14dd35
commit 0adbbfb1ba
11 changed files with 20 additions and 486 deletions

View File

@ -85,7 +85,6 @@ import {
loadCiCjList, loadCiCjList,
creatCiCjList, creatCiCjList,
refRelaysListMap, refRelaysListMap,
combinationListMap,
} from 'src/drawApp/relayCabinetLayoutApp'; } from 'src/drawApp/relayCabinetLayoutApp';
import { relayCabinetGraphicData } from 'src/protos/relayCabinetLayoutGraphics'; import { relayCabinetGraphicData } from 'src/protos/relayCabinetLayoutGraphics';
import { Relay } from 'src/graphics/relay/Relay'; import { Relay } from 'src/graphics/relay/Relay';
@ -158,7 +157,6 @@ function updateMap() {
cjDataSet.bitList.forEach((cjData, j) => { cjDataSet.bitList.forEach((cjData, j) => {
const ref = cjData.refRelays.map((refRelay) => { const ref = cjData.refRelays.map((refRelay) => {
const refDeviceData = refRelaysListMap.get(refRelay.relayId); const refDeviceData = refRelaysListMap.get(refRelay.relayId);
const conbinationData = combinationListMap.get(refRelay.relayId);
const relay = relayCabinetStore const relay = relayCabinetStore
.getDrawApp() .getDrawApp()
.queryStore.queryById<Relay>(refRelay.relayId); .queryStore.queryById<Relay>(refRelay.relayId);
@ -166,10 +164,10 @@ function updateMap() {
refRelay.position == relayCabinetGraphicData.CjDataItem.PostionType.Q refRelay.position == relayCabinetGraphicData.CjDataItem.PostionType.Q
? 'Q' ? 'Q'
: 'H'; : 'H';
if (refDeviceData) { if (refDeviceData?.device) {
return `${refDeviceData.device}_${refDeviceData.combinationtype}_${relay.datas.code}_${pos}`; return `${refDeviceData.device}_${refDeviceData?.combinationtype}_${relay.datas.code}_${pos}`;
} else { } else {
return `${conbinationData}_${relay.datas.code}_${pos}`; return `${refDeviceData?.combinationtype}_${relay.datas.code}_${pos}`;
} }
}); });
map.set(`${j + 1}-${i + 1}`, ref.join('/')); map.set(`${j + 1}-${i + 1}`, ref.join('/'));

View File

@ -85,7 +85,6 @@ import {
loadCiQdList, loadCiQdList,
creatCiQdList, creatCiQdList,
refRelaysListMap, refRelaysListMap,
combinationListMap,
} from 'src/drawApp/relayCabinetLayoutApp'; } from 'src/drawApp/relayCabinetLayoutApp';
import { relayCabinetGraphicData } from 'src/protos/relayCabinetLayoutGraphics'; import { relayCabinetGraphicData } from 'src/protos/relayCabinetLayoutGraphics';
import { Relay } from 'src/graphics/relay/Relay'; import { Relay } from 'src/graphics/relay/Relay';
@ -158,14 +157,13 @@ function updateMap() {
cjDataSet.bitList.forEach((cjData, j) => { cjDataSet.bitList.forEach((cjData, j) => {
const ref = cjData.refRelays.map((refRelay) => { const ref = cjData.refRelays.map((refRelay) => {
const refDeviceData = refRelaysListMap.get(refRelay); const refDeviceData = refRelaysListMap.get(refRelay);
const conbinationData = combinationListMap.get(refRelay);
const relay = relayCabinetStore const relay = relayCabinetStore
.getDrawApp() .getDrawApp()
.queryStore.queryById<Relay>(refRelay); .queryStore.queryById<Relay>(refRelay);
if (refDeviceData) { if (refDeviceData?.device) {
return `${refDeviceData.device}_${refDeviceData.combinationtype}_${relay.datas.code}`; return `${refDeviceData.device}_${refDeviceData.combinationtype}_${relay.datas.code}`;
} else { } else {
return `${conbinationData}_${relay.datas.code}`; return `${refDeviceData?.combinationtype}_${relay.datas.code}`;
} }
}); });
map.set(`${j + 1}-${i + 1}`, ref.join('/')); map.set(`${j + 1}-${i + 1}`, ref.join('/'));

View File

@ -1,147 +0,0 @@
<template>
<draggable-dialog
seamless
@show="onDialogShow"
title="组合类型列表"
:width="600"
:height="0"
>
<template v-slot:footer>
<q-table
ref="tableRef"
row-key="id"
v-model:pagination="pagination"
:loading="loading"
:rows="rows"
:columns="columns"
@request="onRequest"
:rows-per-page-options="[5, 10, 20, 50]"
>
<template v-slot:body-cell="props">
<q-td :props="props" class="custom-column">
{{ props.value }}
</q-td>
</template>
<template v-slot:body-cell-operations="props">
<q-td :props="props">
<div class="q-gutter-sm row justify-center">
<q-btn color="primary" label="编辑" @click="onEdit(props.row)" />
<q-btn color="red" label="删除" @click="deleteData(props.row)" />
</div>
</q-td>
</template>
</q-table>
</template>
<template v-slot:titleButton>
<q-btn
color="primary"
label="新建"
style="margin-right: 10px"
@click="creatData"
/>
</template>
</draggable-dialog>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import DraggableDialog from 'src/components/common/DraggableDialog.vue';
import { QTable, useQuasar } from 'quasar';
import { errorNotify, successNotify } from 'src/utils/CommonNotify';
import {
deleteCombinationtype,
loadCombinationtypeList,
CombinationTypeListItem,
} from 'src/drawApp/relayCabinetLayoutApp';
import { useRelayCabinetStore } from 'src/stores/relayCabinet-store';
import { Relay } from 'src/graphics/relay/Relay';
const relayCabinetStore = useRelayCabinetStore();
const $q = useQuasar();
const tableRef = ref<QTable>();
const columns: QTable['columns'] = [
{ name: 'code', label: '组合类型', field: 'code', align: 'center' },
{
name: 'refRelays',
label: '关联的继电器',
field: (row: CombinationTypeListItem) => {
if (row.refRelays) {
const ref = row.refRelays.map(
(id) =>
(relayCabinetStore.getDrawApp().queryStore.queryById(id) as Relay)
.datas.code
);
return ref.join('\\');
}
},
align: 'center',
},
{ name: 'operations', label: '操作', field: 'operations', align: 'center' },
];
const rows = ref<CombinationTypeListItem[]>([]);
const loading = ref(false);
const pagination = ref({
sortBy: 'desc',
descending: false,
page: 1,
rowsPerPage: 10,
rowsNumber: 10,
});
const onRequest: QTable['onRequest'] = async (props) => {
const { page, rowsPerPage } = props.pagination;
loading.value = true;
const refDatas = loadCombinationtypeList();
pagination.value.rowsNumber = refDatas.length;
pagination.value.page = page;
pagination.value.rowsPerPage = rowsPerPage;
rows.value = refDatas.slice((page - 1) * rowsPerPage, page * rowsPerPage);
loading.value = false;
};
const onDialogShow = () => {
tableRef.value?.requestServerInteraction();
relayCabinetStore.tableOfCombinationType = tableRef.value;
};
const props = defineProps<{
onEditClick: (row: CombinationTypeListItem) => void;
}>();
function onEdit(row: CombinationTypeListItem) {
relayCabinetStore.showRelateRelayConfig = false;
relayCabinetStore.showCombinationTypeConfig = true;
setTimeout(() => {
props.onEditClick(row);
}, 0);
}
function creatData() {
relayCabinetStore.showRelateRelayConfig = false;
relayCabinetStore.showCombinationTypeConfig = true;
}
function deleteData(row: CombinationTypeListItem) {
$q.dialog({ message: `确定删除 "${row.code}" 吗?`, cancel: true }).onOk(
async () => {
try {
deleteCombinationtype(row);
successNotify('删除数据成功!');
} catch (err) {
errorNotify('删除失败:', err);
} finally {
tableRef.value?.requestServerInteraction();
}
}
);
}
</script>
<style scoped>
.custom-column {
max-width: 250px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>

View File

@ -64,6 +64,8 @@ const deviceTypeMap = {
6: '车站', 6: '车站',
7: '屏蔽门', 7: '屏蔽门',
8: '信号机故障报警仪', 8: '信号机故障报警仪',
9: '断路器',
10: '电源屏',
}; };
const columns: QTable['columns'] = [ const columns: QTable['columns'] = [
{ {
@ -119,7 +121,6 @@ const props = defineProps<{
}>(); }>();
function onEdit(row: RelateRelaylistItem) { function onEdit(row: RelateRelaylistItem) {
relayCabinetStore.showCombinationTypeConfig = false;
relayCabinetStore.showRelateRelayConfig = true; relayCabinetStore.showRelateRelayConfig = true;
setTimeout(() => { setTimeout(() => {
props.onEditClick(row); props.onEditClick(row);
@ -127,7 +128,6 @@ function onEdit(row: RelateRelaylistItem) {
} }
function creatData() { function creatData() {
relayCabinetStore.showCombinationTypeConfig = false;
relayCabinetStore.showRelateRelayConfig = true; relayCabinetStore.showRelateRelayConfig = true;
} }

View File

@ -1,220 +0,0 @@
<template>
<div v-if="showRangeConfig">
<q-card class="q-gutter-sm q-pa-sm">
<q-card-section>
<div class="text-h6">{{ handleState }}</div>
</q-card-section>
<q-separator inset></q-separator>
<q-form ref="myForm" @submit="onSubmit" @reset="onReset">
<q-item>
<q-item-section no-wrap class="q-gutter-y-sm column">
<q-input
outlined
v-model="combinationTypeConfig.code"
label="组合类型"
lazy-rules
/>
<q-list bordered separator class="rounded-borders">
<q-item>
<q-item-section no-wrap class="q-gutter-y-sm column">
<q-item-label> 关联的继电器 </q-item-label>
<div class="q-gutter-sm row">
<q-chip
v-for="item in combinationTypeConfig.refRelaysCode"
:key="item"
square
color="primary"
text-color="white"
removable
@remove="removeSelect(item)"
>
{{ item }}
</q-chip>
</div>
</q-item-section>
</q-item>
</q-list>
<div>
<q-btn
v-show="combinationTypeConfig.refRelaysCode.length > 0"
style="width: 130px"
label="清空框选的继电器"
color="red"
class="q-mr-md"
@click="clearAllSelect()"
/>
</div>
</q-item-section>
</q-item>
<div class="q-gutter-sm q-pa-md row justify-center">
<q-btn label="提交" type="submit" color="primary" class="q-mr-md" />
<q-btn label="重置" type="reset" color="primary" class="q-mr-md" />
<q-btn label="返回" color="primary" @click="goBack" />
</div>
</q-form>
</q-card>
</div>
</template>
<script setup lang="ts">
import { onMounted, onUnmounted, ref, watch } from 'vue';
import { QForm, useQuasar } from 'quasar';
import { JlGraphic } from 'src/jl-graphic';
import { useRelayCabinetStore } from 'src/stores/relayCabinet-store';
import { Relay } from 'src/graphics/relay/Relay';
import { relayCabinetGraphicData } from 'src/protos/relayCabinetLayoutGraphics';
import {
creatCombinationtype,
editCombinationtype,
CombinationTypeListItem,
} from 'src/drawApp/relayCabinetLayoutApp';
import { PhaseFailureProtector } from 'src/graphics/phaseFailureProtector/PhaseFailureProtector';
defineExpose({ editRelateRelays });
const relayCabinetStore = useRelayCabinetStore();
const $q = useQuasar();
const showRangeConfig = ref(true);
const combinationTypeConfig = ref<{
code: string;
refRelays: string[];
refRelaysCode: string[];
}>({
code: '',
refRelays: [],
refRelaysCode: [],
});
const handleState = ref('新建组合类型');
let selectGraphic: JlGraphic[] = [];
watch(
() => relayCabinetStore.selectedGraphics,
(val) => {
if (val && val.length > 0) {
const selectFilter = relayCabinetStore.selectedGraphics?.filter(
(g) => g.type == Relay.Type || g.type == PhaseFailureProtector.Type
) as JlGraphic[];
selectGraphic.push(...selectFilter);
selectGraphic = Array.from(new Set(selectGraphic));
relayCabinetStore.getDrawApp().updateSelected(...selectGraphic);
combinationTypeConfig.value.refRelaysCode = selectGraphic.map(
(g) => (g as Relay).datas.code
) as string[];
combinationTypeConfig.value.refRelays = selectGraphic.map(
(g) => g.id
) as string[];
}
}
);
onMounted(() => {
onReset();
});
const myForm = ref<QForm | null>(null);
let editRow: CombinationTypeListItem;
let handle = ref('');
let handleError = ref('');
async function onSubmit() {
myForm.value?.validate().then(async (res) => {
if (res) {
try {
const combinationtypes = new relayCabinetGraphicData.Combinationtype({
code: combinationTypeConfig.value.code,
refRelays: combinationTypeConfig.value.refRelays,
});
if (handleState.value == '新建组合类型') {
handle.value = '创建成功';
handleError.value = '创建失败';
creatCombinationtype(combinationtypes);
} else {
handle.value = '更新成功';
handleError.value = '更新失败';
editCombinationtype(editRow, combinationtypes);
}
relayCabinetStore.tableOfCombinationType?.requestServerInteraction();
$q.notify({
type: 'positive',
message: handle.value,
});
onReset();
showRangeConfig.value = false;
} catch (err) {
$q.notify({
type: 'negative',
message: handleError.value,
});
} finally {
setTimeout(() => {
showRangeConfig.value = true;
}, 0);
}
}
});
}
async function editRelateRelays(row: CombinationTypeListItem) {
try {
const drawApp = relayCabinetStore.getDrawApp();
handleState.value = '编辑组合类型';
selectGraphic = [];
drawApp.updateSelected();
editRow = row;
combinationTypeConfig.value.code = row.code;
combinationTypeConfig.value.refRelays = row.refRelays;
combinationTypeConfig.value.refRelaysCode = [];
const select: JlGraphic[] = [];
row.refRelays.forEach((id) => {
const g = drawApp.queryStore.queryById(id) as Relay;
select.push(g);
combinationTypeConfig.value.refRelaysCode.push(g.datas.code);
});
drawApp.updateSelected(...select);
drawApp.makeGraphicCenterShow(...select);
} catch (err) {
$q.notify({
type: 'negative',
message: '没有需要编辑的详细信息',
});
}
}
function removeSelect(code: string) {
const removeIndex = combinationTypeConfig.value.refRelaysCode.findIndex(
(item) => item == code
);
selectGraphic.splice(removeIndex, 1);
combinationTypeConfig.value.refRelaysCode.splice(removeIndex, 1);
combinationTypeConfig.value.refRelays.splice(removeIndex, 1);
relayCabinetStore.getDrawApp().updateSelected(...selectGraphic);
}
function clearAllSelect() {
combinationTypeConfig.value.refRelays = [];
combinationTypeConfig.value.refRelaysCode = [];
clearAllSelectAtCanvas();
}
function clearAllSelectAtCanvas() {
selectGraphic = [];
relayCabinetStore.getDrawApp().updateSelected();
}
function onReset() {
handleState.value = '新建组合类型';
combinationTypeConfig.value = {
code: '',
refRelays: [],
refRelaysCode: [],
};
clearAllSelectAtCanvas();
}
function goBack() {
onReset();
relayCabinetStore.showCombinationTypeConfig = false;
}
onUnmounted(() => {
relayCabinetStore.showCombinationTypeConfig = false;
});
</script>

View File

@ -16,6 +16,7 @@
:rules="[(val) => val != undefined || '设备类型不能为空']" :rules="[(val) => val != undefined || '设备类型不能为空']"
/> />
<q-input <q-input
v-if="!noShowType.includes(relateRelayConfig.deviceType)"
outlined outlined
label="设备编号" label="设备编号"
v-model="relateRelayConfig.code" v-model="relateRelayConfig.code"
@ -137,6 +138,14 @@ const optionsType = [
label: '信号机故障报警仪', label: '信号机故障报警仪',
value: graphicData.RelatedRef.DeviceType.SignalFaultAlarm, value: graphicData.RelatedRef.DeviceType.SignalFaultAlarm,
}, },
{ label: '断路器', value: graphicData.RelatedRef.DeviceType.Breakers },
{ label: '电源屏', value: graphicData.RelatedRef.DeviceType.PowerScreen },
];
const noShowType = [
graphicData.RelatedRef.DeviceType.SignalFaultAlarm,
graphicData.RelatedRef.DeviceType.Breakers,
graphicData.RelatedRef.DeviceType.PowerScreen,
]; ];
let selectGraphic: JlGraphic[] = []; let selectGraphic: JlGraphic[] = [];

View File

@ -80,8 +80,6 @@ export const refRelaysListMap = new Map<
{ combinationtype: string; device: string } { combinationtype: string; device: string }
>(); >();
export const combinationListMap = new Map<string, string>();
export function initDrawApp(): IDrawApp { export function initDrawApp(): IDrawApp {
drawApp = newDrawApp({ drawApp = newDrawApp({
dataLoader: loadDrawDatas, dataLoader: loadDrawDatas,
@ -137,11 +135,6 @@ export function initDrawApp(): IDrawApp {
}); });
}); });
}); });
combinationTypeList.forEach((combination) => {
combination.refRelays.forEach((relayId) => {
combinationListMap.set(relayId, combination.code);
});
});
const relays = app.queryStore.queryByType<Relay>(Relay.Type); const relays = app.queryStore.queryByType<Relay>(Relay.Type);
relays.forEach((relay) => { relays.forEach((relay) => {
relay.refDevice.text = refRelaysListMap relay.refDevice.text = refRelaysListMap
@ -160,9 +153,7 @@ export function initDrawApp(): IDrawApp {
}); });
app.on('destroy', () => { app.on('destroy', () => {
refRelaysList = []; refRelaysList = [];
combinationTypeList = [];
refRelaysListMap.clear(); refRelaysListMap.clear();
combinationListMap.clear();
}); });
return drawApp; return drawApp;
} }
@ -241,7 +232,6 @@ export function saveDrawDatas(app: IDrawApp) {
} }
}); });
storage.deviceRelateRelayList = refRelaysList; storage.deviceRelateRelayList = refRelaysList;
storage.combinationtypeList = combinationTypeList;
storage.UniqueIdPrefix = UniqueIdPrefix; storage.UniqueIdPrefix = UniqueIdPrefix;
storage.ciCjList = ciCjList; storage.ciCjList = ciCjList;
storage.ciQdList = ciQdList; storage.ciQdList = ciQdList;
@ -276,7 +266,6 @@ export async function loadDrawDatas(): Promise<IGraphicStorage> {
datas.push(new SignalFaultAlarmData(signalFaultAlarm)); datas.push(new SignalFaultAlarmData(signalFaultAlarm));
}); });
refRelaysList = storage.deviceRelateRelayList; refRelaysList = storage.deviceRelateRelayList;
combinationTypeList = storage.combinationtypeList;
UniqueIdPrefix = storage.UniqueIdPrefix; UniqueIdPrefix = storage.UniqueIdPrefix;
ciCjList = storage.ciCjList; ciCjList = storage.ciCjList;
ciQdList = storage.ciQdList; ciQdList = storage.ciQdList;
@ -343,45 +332,6 @@ export function deleteDeviceRelateRelay(row: RelateRelaylistItem) {
} }
} }
//组合类型列表的增删改查
export interface CombinationTypeListItem {
code: string;
refRelays: string[];
refRelaysCode?: string[];
}
let combinationTypeList: relayCabinetGraphicData.Combinationtype[] = [];
export function loadCombinationtypeList() {
return combinationTypeList;
}
export function creatCombinationtype(
row: relayCabinetGraphicData.Combinationtype
) {
combinationTypeList.push(row);
}
export function editCombinationtype(
editRow: CombinationTypeListItem,
newData: relayCabinetGraphicData.Combinationtype
) {
for (let i = 0; i < combinationTypeList.length; i++) {
if (combinationTypeList[i].code == editRow.code) {
combinationTypeList[i] = newData;
break;
}
}
}
export function deleteCombinationtype(row: CombinationTypeListItem) {
for (let i = 0; i < combinationTypeList.length; i++) {
if (combinationTypeList[i].code == row.code) {
combinationTypeList.splice(i, 1);
break;
}
}
}
//所属集中站 //所属集中站
let UniqueIdPrefix: relayCabinetGraphicData.UniqueIdType; let UniqueIdPrefix: relayCabinetGraphicData.UniqueIdType;
export function loadUniqueIdPrefix() { export function loadUniqueIdPrefix() {

View File

@ -86,7 +86,6 @@
<draw-relayCabinetProperties <draw-relayCabinetProperties
v-if=" v-if="
!relayCabinetStore.showRelateRelayConfig && !relayCabinetStore.showRelateRelayConfig &&
!relayCabinetStore.showCombinationTypeConfig &&
!relayCabinetStore.showCiCjConfig && !relayCabinetStore.showCiCjConfig &&
!relayCabinetStore.showCiQdConfig !relayCabinetStore.showCiQdConfig
" "
@ -95,10 +94,6 @@
v-else-if="relayCabinetStore.showRelateRelayConfig" v-else-if="relayCabinetStore.showRelateRelayConfig"
ref="relateRelayConfigEdit" ref="relateRelayConfigEdit"
></relate-relay-config> ></relate-relay-config>
<combination-type-config
v-else-if="relayCabinetStore.showCombinationTypeConfig"
ref="combinationTypeConfigEdit"
></combination-type-config>
<ciCjConfig v-else-if="relayCabinetStore.showCiCjConfig" /> <ciCjConfig v-else-if="relayCabinetStore.showCiCjConfig" />
<ciQdConfig v-else /> <ciQdConfig v-else />
</q-drawer> </q-drawer>
@ -178,8 +173,6 @@ import DrawRelayCabinetProperties from 'src/components/draw-app/DrawRelayCabinet
import BatchBuildRelayCabinetOrRelay from 'src/components/draw-app/dialogs/BatchBuildRelayCabinetOrRelay.vue'; import BatchBuildRelayCabinetOrRelay from 'src/components/draw-app/dialogs/BatchBuildRelayCabinetOrRelay.vue';
import DeviceRelateRelayList from 'src/components/draw-app/dialogs/DeviceRelateRelayList.vue'; import DeviceRelateRelayList from 'src/components/draw-app/dialogs/DeviceRelateRelayList.vue';
import RelateRelayConfig from 'src/components/draw-app/properties/RelateRelayConfig.vue'; import RelateRelayConfig from 'src/components/draw-app/properties/RelateRelayConfig.vue';
import CombinationtypeList from 'src/components/draw-app/dialogs/CombinationtypeList.vue';
import CombinationTypeConfig from 'src/components/draw-app/properties/CombinationTypeConfig.vue';
import CiCjList from 'src/components/draw-app/dialogs/CiCjList.vue'; import CiCjList from 'src/components/draw-app/dialogs/CiCjList.vue';
import CiQdList from 'src/components/draw-app/dialogs/CiQdList.vue'; import CiQdList from 'src/components/draw-app/dialogs/CiQdList.vue';
import CiCjConfig from 'src/components/draw-app/properties/CiCjConfig.vue'; import CiCjConfig from 'src/components/draw-app/properties/CiCjConfig.vue';
@ -189,7 +182,6 @@ import {
saveDrawDatas, saveDrawDatas,
checkDataToServer, checkDataToServer,
RelateRelaylistItem, RelateRelaylistItem,
CombinationTypeListItem,
saveDrawToServer, saveDrawToServer,
loadUniqueIdPrefix, loadUniqueIdPrefix,
setUniqueIdPrefix, setUniqueIdPrefix,
@ -256,7 +248,6 @@ const leftMenuConfig = [
// //
const dataManageConfig = [ const dataManageConfig = [
{ label: '设备关联继电器列表', click: openDeviceRelateRelayList }, { label: '设备关联继电器列表', click: openDeviceRelateRelayList },
{ label: '组合类型列表', click: openCombinationTypeList },
{ label: '采集列表', click: openCiCjList }, { label: '采集列表', click: openCiCjList },
{ label: '驱动列表', click: openCiQdList }, { label: '驱动列表', click: openCiQdList },
]; ];
@ -425,25 +416,6 @@ function openDeviceRelateRelayList() {
}); });
} }
let combinationTypeDialogInstance: DialogChainObject | null = null;
const combinationTypeConfigEdit =
ref<InstanceType<typeof CombinationTypeConfig>>();
function openCombinationTypeList() {
if (combinationTypeDialogInstance) return;
combinationTypeDialogInstance = $q
.dialog({
component: CombinationtypeList,
componentProps: {
onEditClick: (row: CombinationTypeListItem) => {
combinationTypeConfigEdit.value?.editRelateRelays(row);
},
},
})
.onCancel(() => {
combinationTypeDialogInstance = null;
});
}
let ciCjListDialogInstance: DialogChainObject | null = null; let ciCjListDialogInstance: DialogChainObject | null = null;
function openCiCjList() { function openCiCjList() {
if (ciCjListDialogInstance) return; if (ciCjListDialogInstance) return;
@ -483,9 +455,6 @@ onUnmounted(() => {
if (relateRelayDialogInstance) { if (relateRelayDialogInstance) {
relateRelayDialogInstance.hide(); relateRelayDialogInstance.hide();
} }
if (combinationTypeDialogInstance) {
combinationTypeDialogInstance.hide();
}
if (ciCjListDialogInstance) { if (ciCjListDialogInstance) {
ciCjListDialogInstance.hide(); ciCjListDialogInstance.hide();
} }

View File

@ -15,13 +15,12 @@ export namespace relayCabinetGraphicData {
deviceRelateRelayList?: DeviceRelateRelay[]; deviceRelateRelayList?: DeviceRelateRelay[];
UniqueIdPrefix?: UniqueIdType; UniqueIdPrefix?: UniqueIdType;
phaseFailureProtectors?: PhaseFailureProtector[]; phaseFailureProtectors?: PhaseFailureProtector[];
combinationtypeList?: Combinationtype[];
signalFaultAlarms?: SignalFaultAlarm[]; signalFaultAlarms?: SignalFaultAlarm[];
ciCjList?: CiCj; ciCjList?: CiCj;
ciQdList?: CiQd; ciQdList?: CiQd;
}) { }) {
super(); super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4, 7, 8, 9], this.#one_of_decls); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4, 7, 9], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") { if (!Array.isArray(data) && typeof data == "object") {
if ("canvas" in data && data.canvas != undefined) { if ("canvas" in data && data.canvas != undefined) {
this.canvas = data.canvas; this.canvas = data.canvas;
@ -41,9 +40,6 @@ export namespace relayCabinetGraphicData {
if ("phaseFailureProtectors" in data && data.phaseFailureProtectors != undefined) { if ("phaseFailureProtectors" in data && data.phaseFailureProtectors != undefined) {
this.phaseFailureProtectors = data.phaseFailureProtectors; this.phaseFailureProtectors = data.phaseFailureProtectors;
} }
if ("combinationtypeList" in data && data.combinationtypeList != undefined) {
this.combinationtypeList = data.combinationtypeList;
}
if ("signalFaultAlarms" in data && data.signalFaultAlarms != undefined) { if ("signalFaultAlarms" in data && data.signalFaultAlarms != undefined) {
this.signalFaultAlarms = data.signalFaultAlarms; this.signalFaultAlarms = data.signalFaultAlarms;
} }
@ -97,12 +93,6 @@ export namespace relayCabinetGraphicData {
set phaseFailureProtectors(value: PhaseFailureProtector[]) { set phaseFailureProtectors(value: PhaseFailureProtector[]) {
pb_1.Message.setRepeatedWrapperField(this, 7, value); pb_1.Message.setRepeatedWrapperField(this, 7, value);
} }
get combinationtypeList() {
return pb_1.Message.getRepeatedWrapperField(this, Combinationtype, 8) as Combinationtype[];
}
set combinationtypeList(value: Combinationtype[]) {
pb_1.Message.setRepeatedWrapperField(this, 8, value);
}
get signalFaultAlarms() { get signalFaultAlarms() {
return pb_1.Message.getRepeatedWrapperField(this, SignalFaultAlarm, 9) as SignalFaultAlarm[]; return pb_1.Message.getRepeatedWrapperField(this, SignalFaultAlarm, 9) as SignalFaultAlarm[];
} }
@ -134,7 +124,6 @@ export namespace relayCabinetGraphicData {
deviceRelateRelayList?: ReturnType<typeof DeviceRelateRelay.prototype.toObject>[]; deviceRelateRelayList?: ReturnType<typeof DeviceRelateRelay.prototype.toObject>[];
UniqueIdPrefix?: ReturnType<typeof UniqueIdType.prototype.toObject>; UniqueIdPrefix?: ReturnType<typeof UniqueIdType.prototype.toObject>;
phaseFailureProtectors?: ReturnType<typeof PhaseFailureProtector.prototype.toObject>[]; phaseFailureProtectors?: ReturnType<typeof PhaseFailureProtector.prototype.toObject>[];
combinationtypeList?: ReturnType<typeof Combinationtype.prototype.toObject>[];
signalFaultAlarms?: ReturnType<typeof SignalFaultAlarm.prototype.toObject>[]; signalFaultAlarms?: ReturnType<typeof SignalFaultAlarm.prototype.toObject>[];
ciCjList?: ReturnType<typeof CiCj.prototype.toObject>; ciCjList?: ReturnType<typeof CiCj.prototype.toObject>;
ciQdList?: ReturnType<typeof CiQd.prototype.toObject>; ciQdList?: ReturnType<typeof CiQd.prototype.toObject>;
@ -158,9 +147,6 @@ export namespace relayCabinetGraphicData {
if (data.phaseFailureProtectors != null) { if (data.phaseFailureProtectors != null) {
message.phaseFailureProtectors = data.phaseFailureProtectors.map(item => PhaseFailureProtector.fromObject(item)); message.phaseFailureProtectors = data.phaseFailureProtectors.map(item => PhaseFailureProtector.fromObject(item));
} }
if (data.combinationtypeList != null) {
message.combinationtypeList = data.combinationtypeList.map(item => Combinationtype.fromObject(item));
}
if (data.signalFaultAlarms != null) { if (data.signalFaultAlarms != null) {
message.signalFaultAlarms = data.signalFaultAlarms.map(item => SignalFaultAlarm.fromObject(item)); message.signalFaultAlarms = data.signalFaultAlarms.map(item => SignalFaultAlarm.fromObject(item));
} }
@ -180,7 +166,6 @@ export namespace relayCabinetGraphicData {
deviceRelateRelayList?: ReturnType<typeof DeviceRelateRelay.prototype.toObject>[]; deviceRelateRelayList?: ReturnType<typeof DeviceRelateRelay.prototype.toObject>[];
UniqueIdPrefix?: ReturnType<typeof UniqueIdType.prototype.toObject>; UniqueIdPrefix?: ReturnType<typeof UniqueIdType.prototype.toObject>;
phaseFailureProtectors?: ReturnType<typeof PhaseFailureProtector.prototype.toObject>[]; phaseFailureProtectors?: ReturnType<typeof PhaseFailureProtector.prototype.toObject>[];
combinationtypeList?: ReturnType<typeof Combinationtype.prototype.toObject>[];
signalFaultAlarms?: ReturnType<typeof SignalFaultAlarm.prototype.toObject>[]; signalFaultAlarms?: ReturnType<typeof SignalFaultAlarm.prototype.toObject>[];
ciCjList?: ReturnType<typeof CiCj.prototype.toObject>; ciCjList?: ReturnType<typeof CiCj.prototype.toObject>;
ciQdList?: ReturnType<typeof CiQd.prototype.toObject>; ciQdList?: ReturnType<typeof CiQd.prototype.toObject>;
@ -203,9 +188,6 @@ export namespace relayCabinetGraphicData {
if (this.phaseFailureProtectors != null) { if (this.phaseFailureProtectors != null) {
data.phaseFailureProtectors = this.phaseFailureProtectors.map((item: PhaseFailureProtector) => item.toObject()); data.phaseFailureProtectors = this.phaseFailureProtectors.map((item: PhaseFailureProtector) => item.toObject());
} }
if (this.combinationtypeList != null) {
data.combinationtypeList = this.combinationtypeList.map((item: Combinationtype) => item.toObject());
}
if (this.signalFaultAlarms != null) { if (this.signalFaultAlarms != null) {
data.signalFaultAlarms = this.signalFaultAlarms.map((item: SignalFaultAlarm) => item.toObject()); data.signalFaultAlarms = this.signalFaultAlarms.map((item: SignalFaultAlarm) => item.toObject());
} }
@ -233,8 +215,6 @@ export namespace relayCabinetGraphicData {
writer.writeMessage(6, this.UniqueIdPrefix, () => this.UniqueIdPrefix.serialize(writer)); writer.writeMessage(6, this.UniqueIdPrefix, () => this.UniqueIdPrefix.serialize(writer));
if (this.phaseFailureProtectors.length) if (this.phaseFailureProtectors.length)
writer.writeRepeatedMessage(7, this.phaseFailureProtectors, (item: PhaseFailureProtector) => item.serialize(writer)); writer.writeRepeatedMessage(7, this.phaseFailureProtectors, (item: PhaseFailureProtector) => item.serialize(writer));
if (this.combinationtypeList.length)
writer.writeRepeatedMessage(8, this.combinationtypeList, (item: Combinationtype) => item.serialize(writer));
if (this.signalFaultAlarms.length) if (this.signalFaultAlarms.length)
writer.writeRepeatedMessage(9, this.signalFaultAlarms, (item: SignalFaultAlarm) => item.serialize(writer)); writer.writeRepeatedMessage(9, this.signalFaultAlarms, (item: SignalFaultAlarm) => item.serialize(writer));
if (this.has_ciCjList) if (this.has_ciCjList)
@ -268,9 +248,6 @@ export namespace relayCabinetGraphicData {
case 7: case 7:
reader.readMessage(message.phaseFailureProtectors, () => pb_1.Message.addToRepeatedWrapperField(message, 7, PhaseFailureProtector.deserialize(reader), PhaseFailureProtector)); reader.readMessage(message.phaseFailureProtectors, () => pb_1.Message.addToRepeatedWrapperField(message, 7, PhaseFailureProtector.deserialize(reader), PhaseFailureProtector));
break; break;
case 8:
reader.readMessage(message.combinationtypeList, () => pb_1.Message.addToRepeatedWrapperField(message, 8, Combinationtype.deserialize(reader), Combinationtype));
break;
case 9: case 9:
reader.readMessage(message.signalFaultAlarms, () => pb_1.Message.addToRepeatedWrapperField(message, 9, SignalFaultAlarm.deserialize(reader), SignalFaultAlarm)); reader.readMessage(message.signalFaultAlarms, () => pb_1.Message.addToRepeatedWrapperField(message, 9, SignalFaultAlarm.deserialize(reader), SignalFaultAlarm));
break; break;

View File

@ -3539,7 +3539,9 @@ export namespace graphicData {
signal = 5, signal = 5,
station = 6, station = 6,
ScreenDoor = 7, ScreenDoor = 7,
SignalFaultAlarm = 8 SignalFaultAlarm = 8,
Breakers = 9,
PowerScreen = 10
} }
export enum DevicePort { export enum DevicePort {
A = 0, A = 0,

View File

@ -20,8 +20,6 @@ export const useRelayCabinetStore = defineStore('relayCabinet', {
draftId: null as number | null, draftId: null as number | null,
showRelateRelayConfig: false, showRelateRelayConfig: false,
table: undefined as QTable | undefined, table: undefined as QTable | undefined,
showCombinationTypeConfig: false,
tableOfCombinationType: undefined as QTable | undefined,
updateCiCjList: false, updateCiCjList: false,
editCiCjConfigIndex: null as CiCjConfigCeil | null, editCiCjConfigIndex: null as CiCjConfigCeil | null,
showCiCjConfig: false, showCiCjConfig: false,