|
|
@@ -94,22 +94,22 @@ async function loadDeviceOptions() {
|
|
|
|
|
|
deviceLoading.value = true
|
|
|
try {
|
|
|
- // const data = await IotDeviceApi.getBoardDevice({
|
|
|
- // deptId: deviceQuery.value.deptId,
|
|
|
- // ifInline: deviceQuery.value.ifInline,
|
|
|
- // pageSize: 100
|
|
|
- // })
|
|
|
- const data = await IotDeviceApi.getIotDeviceTdPage({
|
|
|
+ const data = await IotDeviceApi.getBoardDevice({
|
|
|
deptId: deviceQuery.value.deptId,
|
|
|
ifInline: deviceQuery.value.ifInline,
|
|
|
pageSize: 100
|
|
|
})
|
|
|
+ // const data = await IotDeviceApi.getIotDeviceTdPage({
|
|
|
+ // deptId: deviceQuery.value.deptId,
|
|
|
+ // ifInline: deviceQuery.value.ifInline,
|
|
|
+ // pageSize: 100
|
|
|
+ // })
|
|
|
deviceOptions.value = data.list.map((item: any) => ({
|
|
|
label: item.deviceCode + '-' + item.deviceName,
|
|
|
value: item.id,
|
|
|
raw: item
|
|
|
}))
|
|
|
- // query.value.deviceIds = deviceOptions.value.map(i => i.value)
|
|
|
+ handleDeviceChange(deviceOptions.value.filter((i) => i.raw.ifInline === 3).map((i) => i.value))
|
|
|
} catch (error) {
|
|
|
deviceOptions.value = []
|
|
|
} finally {
|
|
|
@@ -166,6 +166,10 @@ function handleRest() {
|
|
|
loadDeptOptions()
|
|
|
loadDeviceOptions()
|
|
|
}
|
|
|
+
|
|
|
+function handleInlineChange() {
|
|
|
+ loadDeviceOptions()
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
@@ -239,6 +243,7 @@ function handleRest() {
|
|
|
popper-class="poper"
|
|
|
class="w-full"
|
|
|
:class="{ selected: Boolean(deviceQuery.ifInline) }"
|
|
|
+ @change="handleInlineChange"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.IOT_DEVICE_STATUS)"
|