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