|
|
|
|
@ -175,7 +175,7 @@ const queryParams = reactive({
|
|
|
|
|
dataUnit: undefined,
|
|
|
|
|
ratio: undefined,
|
|
|
|
|
remark: undefined,
|
|
|
|
|
deviceModelId: undefined,
|
|
|
|
|
deviceModelId: undefined as number | undefined,
|
|
|
|
|
createTime: [],
|
|
|
|
|
})
|
|
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
|
|
@ -212,6 +212,9 @@ watch(
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
queryParams.id = val
|
|
|
|
|
queryParams.deviceModelId = val
|
|
|
|
|
selectedIds.value = []
|
|
|
|
|
tableRef.value?.clearSelection?.()
|
|
|
|
|
handleQuery()
|
|
|
|
|
},
|
|
|
|
|
{ immediate: true, deep: true }
|
|
|
|
|
@ -298,8 +301,8 @@ const handleBatchDelete = async () => {
|
|
|
|
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
const handleExport = async () => {
|
|
|
|
|
if (!selectedIds.value.length) {
|
|
|
|
|
message.error('请选择需要导出的数据')
|
|
|
|
|
if (!props.id) {
|
|
|
|
|
message.error('请选择一个采集设备模型')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
@ -307,7 +310,10 @@ const handleExport = async () => {
|
|
|
|
|
await message.exportConfirm()
|
|
|
|
|
// 发起导出
|
|
|
|
|
exportLoading.value = true
|
|
|
|
|
const data = await DeviceModelAttributeApi.exportDeviceModelAttribute({ ids: selectedIds.value.join(',') })
|
|
|
|
|
const data = await DeviceModelAttributeApi.exportDeviceModelAttribute({
|
|
|
|
|
deviceModelId: props.id,
|
|
|
|
|
ids: selectedIds.value.length ? selectedIds.value.join(',') : undefined,
|
|
|
|
|
})
|
|
|
|
|
download.excel(data, '采集设备模型-点位管理.xls')
|
|
|
|
|
} catch {
|
|
|
|
|
} finally {
|
|
|
|
|
|