| | |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="设备状态" prop="deviceStatus"> |
| | | <el-form-item label="设备状态" prop="status"> |
| | | <el-select |
| | | class="command-select" |
| | | popper-class="command-select-popper" |
| | | v-model="searchParams.deviceStatus" |
| | | v-model="searchParams.status" |
| | | placeholder="请选择" |
| | | clearable |
| | | @change="handleSearch" |
| | |
| | | <el-table-column prop="deviceModel" show-overflow-tooltip label="设备型号" /> |
| | | <el-table-column prop="deviceName" show-overflow-tooltip label="设备名称" /> |
| | | <el-table-column prop="deviceSn" show-overflow-tooltip label="设备编码" /> |
| | | <el-table-column prop="deviceStatus" show-overflow-tooltip label="设备状态"> |
| | | <el-table-column prop="deviceStatus" show-overflow-tooltip width="96" label="设备状态"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.status, dictObj.deviceStatus) }} |
| | | </template> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="manufacturer" show-overflow-tooltip label="厂商" /> |
| | | <el-table-column prop="contactPhone" show-overflow-tooltip label="联系方式" /> |
| | | <el-table-column prop="contactPhone" show-overflow-tooltip width="112" label="联系方式" /> |
| | | <el-table-column prop="sceneName" show-overflow-tooltip label="所属场景" /> |
| | | <el-table-column label="操作" class-name="operation-btns"> |
| | | <template v-slot="{ row }"> |
| | |
| | | const initSearchParams = () => ({ |
| | | deviceName: '', // 设备名称 |
| | | deviceType: '', // 设备类型 |
| | | deviceStatus: '', // 设备状态 |
| | | status: '', // 设备状态 |
| | | current: 1, // 当前页 |
| | | size: 10, // 每页大小 |
| | | }) |
| | |
| | | async function getList() { |
| | | loading.value = true |
| | | try { |
| | | const res = await fwDevicePageApi(searchParams.value) |
| | | const res = await fwDevicePageApi({ |
| | | ...searchParams.value, |
| | | deviceStatusList: '0,1,2' |
| | | }) |
| | | list.value = res?.data?.data?.records ?? [] |
| | | total.value = res?.data?.data?.total ?? 0 |
| | | } finally { |
| | |
| | | function getDictList() { |
| | | getDictionaryByCode('deviceType,deviceStatus,deviceAtt').then(res => { |
| | | dictObj.value = res.data.data |
| | | dictObj.value.deviceStatus = dictObj.value.deviceStatus.filter(item => item.dictKey != 3) |
| | | }) |
| | | } |
| | | |