驱采数据加清空
This commit is contained in:
parent
54ee649581
commit
35eab5ac87
@ -32,6 +32,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<template v-slot:titleButton>
|
||||
<q-btn
|
||||
color="primary"
|
||||
label="清空"
|
||||
style="margin-right: 10px"
|
||||
@click="clearCiCjListData"
|
||||
/>
|
||||
<q-btn
|
||||
color="primary"
|
||||
label="设置"
|
||||
@ -85,6 +91,7 @@ import {
|
||||
loadCiCjList,
|
||||
creatCiCjList,
|
||||
refRelaysListMap,
|
||||
clearCiCjList,
|
||||
} from 'src/drawApp/relayCabinetLayoutApp';
|
||||
import { relayCabinetGraphicData } from 'src/protos/relayCabinetLayoutGraphics';
|
||||
import { Relay } from 'src/graphics/relay/Relay';
|
||||
@ -175,6 +182,14 @@ function updateMap() {
|
||||
});
|
||||
}
|
||||
|
||||
function clearCiCjListData() {
|
||||
clearCiCjList(setCellMessage.value.rows, setCellMessage.value.cols);
|
||||
ciCjList = loadCiCjList();
|
||||
updateMap();
|
||||
setCellDialog.value = true;
|
||||
setCellDialog.value = false;
|
||||
}
|
||||
|
||||
const showTooltip = ref(false);
|
||||
function onMouseOver(e: MouseEvent) {
|
||||
if ((e.target as HTMLElement).clientHeight > 30) {
|
||||
|
@ -384,15 +384,7 @@ export function loadCiCjList() {
|
||||
|
||||
export function creatCiCjList(rows: number, cols: number) {
|
||||
if (ciCjList == undefined) {
|
||||
ciCjList = new relayCabinetGraphicData.CiCj();
|
||||
ciCjList.dsCount = rows;
|
||||
for (let i = 0; i < cols; i++) {
|
||||
ciCjList.cjList[i] = new relayCabinetGraphicData.CjDataSet();
|
||||
ciCjList.cjList[i].name = 'D' + (i + 1);
|
||||
for (let j = 0; j < rows; j++) {
|
||||
ciCjList.cjList[i].bitList[j] = new relayCabinetGraphicData.CjData();
|
||||
}
|
||||
}
|
||||
clearCiCjList(rows, cols);
|
||||
} else {
|
||||
const oldRows = ciCjList.dsCount;
|
||||
ciCjList.dsCount = rows;
|
||||
@ -448,6 +440,18 @@ export function creatCiCjListByCombinationtype(
|
||||
}
|
||||
}
|
||||
|
||||
export function clearCiCjList(rows: number, cols: number) {
|
||||
ciCjList = new relayCabinetGraphicData.CiCj();
|
||||
ciCjList.dsCount = rows;
|
||||
for (let i = 0; i < cols; i++) {
|
||||
ciCjList.cjList[i] = new relayCabinetGraphicData.CjDataSet();
|
||||
ciCjList.cjList[i].name = 'D' + (i + 1);
|
||||
for (let j = 0; j < rows; j++) {
|
||||
ciCjList.cjList[i].bitList[j] = new relayCabinetGraphicData.CjData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//驱动列表的增删改查
|
||||
let ciQdList: relayCabinetGraphicData.CiQd;
|
||||
export function loadCiQdList() {
|
||||
|
Loading…
Reference in New Issue
Block a user