fix: 修改场景联动执行动作设备查询排序
This commit is contained in:
parent
8187e27a43
commit
ecd956b4fd
|
@ -150,7 +150,7 @@ const handleSearch = (p: any) => {
|
||||||
|
|
||||||
const deviceQuery = (p: any) => {
|
const deviceQuery = (p: any) => {
|
||||||
const sorts: any = [];
|
const sorts: any = [];
|
||||||
if (props.value) {
|
if (props.value[0]?.value) {
|
||||||
sorts.push({
|
sorts.push({
|
||||||
name: 'id',
|
name: 'id',
|
||||||
value: props.value[0]?.value,
|
value: props.value[0]?.value,
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
:danger="true"
|
:danger="true"
|
||||||
:popConfirm="{
|
:popConfirm="{
|
||||||
title: `确认删除`,
|
title: `确认删除`,
|
||||||
onConfirm: () => clickDel(record),
|
onConfirm: () => clickDel(record, index),
|
||||||
}"
|
}"
|
||||||
:disabled="record.status"
|
:disabled="record.status"
|
||||||
>
|
>
|
||||||
|
@ -358,14 +358,18 @@ const addRow = () => {
|
||||||
table.data.push(initData);
|
table.data.push(initData);
|
||||||
};
|
};
|
||||||
|
|
||||||
const clickDel = (row: any) => {
|
const clickDel = (row: any, index: number) => {
|
||||||
if (row.scale !== undefined) {
|
if (row.scale !== undefined) {
|
||||||
delSaveRow_api(id, leftData.selectedKeys[0], [row.name]).then(
|
delSaveRow_api(id, leftData.selectedKeys[0], [row.name]).then(
|
||||||
(resp: any) => {
|
(resp: any) => {
|
||||||
if (resp.status === 200) table.data.splice(row.index, 1);
|
if (resp.status === 200) {
|
||||||
|
table.data.splice(index, 1)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
} else table.data.splice(row.index, 1);
|
} else {
|
||||||
|
table.data.splice(index, 1)
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const clickSave = () => {
|
const clickSave = () => {
|
||||||
|
|
Loading…
Reference in New Issue