提交:场景控制 选择设备 更换接口 /iot/device/projectDev

This commit is contained in:
23688nl 2022-09-28 16:14:42 +08:00
parent f6602d37cd
commit 1af91ba9e5
3 changed files with 14 additions and 4 deletions

View File

@ -232,3 +232,12 @@ export function projectSceneLoggingList(query) {
params: query params: query
}); });
} }
// 查询 查询 项目中设备列表
export function projectSelectDeviceList(query) {
return request({
url: "/iot/device/projectDev",
method: "get",
params: query
});
}

View File

@ -154,7 +154,8 @@
// import { listDevice } from "@/api/iot/device"; // import { listDevice } from "@/api/iot/device";
import SelectTableWrap from "@/components/SelectTable/index"; import SelectTableWrap from "@/components/SelectTable/index";
import { getDeviceFunList, getDeviceCmdList } from "@/api/iot/device"; import { getDeviceFunList, getDeviceCmdList } from "@/api/iot/device";
import { getDeviceList } from "@/api/app"; import { projectSelectDeviceList } from "@/api/iot/project_new";
export default { export default {
name: "EDeviceParam", name: "EDeviceParam",
@ -403,7 +404,7 @@ export default {
this.deviceChildList(data); this.deviceChildList(data);
}, },
deviceChildList(data) { deviceChildList(data) {
getDeviceList(Object.assign(data.page, data.param)).then((res) => { projectSelectDeviceList(Object.assign(data.page, data.param)).then((res) => {
this.tableSelectOption.tableList = res.rows; this.tableSelectOption.tableList = res.rows;
this.tableList = res.rows; this.tableList = res.rows;
this.tableSelectOption.queryOpt.page.total = Number(res.total); this.tableSelectOption.queryOpt.page.total = Number(res.total);

View File

@ -49,7 +49,7 @@
</template> </template>
<script> <script>
import SelectTableWrap from "@/components/SelectTable/index"; import SelectTableWrap from "@/components/SelectTable/index";
import { getDeviceList } from "@/api/app"; import { projectSelectDeviceList } from "@/api/iot/project_new";
export default { export default {
name: "ESelectDevice", name: "ESelectDevice",
@ -200,7 +200,7 @@ export default {
}, },
// //
getSiteChildList(data, type) { getSiteChildList(data, type) {
getDeviceList(Object.assign(data.param, this.param, data.page)).then( projectSelectDeviceList(Object.assign(data.param, this.param, data.page)).then(
(response) => { (response) => {
if (response.rows.length > 0) { if (response.rows.length > 0) {
this.tableSelectOption.tableList = response.rows; this.tableSelectOption.tableList = response.rows;