驱采数据加清空
This commit is contained in:
parent
54ee649581
commit
35eab5ac87
@ -32,6 +32,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template v-slot:titleButton>
|
<template v-slot:titleButton>
|
||||||
|
<q-btn
|
||||||
|
color="primary"
|
||||||
|
label="清空"
|
||||||
|
style="margin-right: 10px"
|
||||||
|
@click="clearCiCjListData"
|
||||||
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
color="primary"
|
color="primary"
|
||||||
label="设置"
|
label="设置"
|
||||||
@ -85,6 +91,7 @@ import {
|
|||||||
loadCiCjList,
|
loadCiCjList,
|
||||||
creatCiCjList,
|
creatCiCjList,
|
||||||
refRelaysListMap,
|
refRelaysListMap,
|
||||||
|
clearCiCjList,
|
||||||
} 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';
|
||||||
@ -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);
|
const showTooltip = ref(false);
|
||||||
function onMouseOver(e: MouseEvent) {
|
function onMouseOver(e: MouseEvent) {
|
||||||
if ((e.target as HTMLElement).clientHeight > 30) {
|
if ((e.target as HTMLElement).clientHeight > 30) {
|
||||||
|
@ -384,15 +384,7 @@ export function loadCiCjList() {
|
|||||||
|
|
||||||
export function creatCiCjList(rows: number, cols: number) {
|
export function creatCiCjList(rows: number, cols: number) {
|
||||||
if (ciCjList == undefined) {
|
if (ciCjList == undefined) {
|
||||||
ciCjList = new relayCabinetGraphicData.CiCj();
|
clearCiCjList(rows, cols);
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
const oldRows = ciCjList.dsCount;
|
const oldRows = ciCjList.dsCount;
|
||||||
ciCjList.dsCount = rows;
|
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;
|
let ciQdList: relayCabinetGraphicData.CiQd;
|
||||||
export function loadCiQdList() {
|
export function loadCiQdList() {
|
||||||
|
Loading…
Reference in New Issue
Block a user