|
@@ -51,6 +51,17 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="action-buttons">
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ @click="handleQuery"
|
|
|
+ class="add-property-btn"
|
|
|
+ size="default"
|
|
|
+ >
|
|
|
+ <template #icon>
|
|
|
+ <Icon icon="ep:search" />
|
|
|
+ </template>
|
|
|
+ 查询
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
@click="openForm('create')"
|
|
@@ -90,7 +101,7 @@
|
|
|
<ContentWrap>
|
|
|
<el-row v-if="selectedNode&&list.length>0" :gutter="16">
|
|
|
<el-col v-for="item in list" :key="item.id" :lg="6" :md="12" :sm="12" :xs="24" class="mb-4">
|
|
|
- <el-card :body-style="{ padding: '0' }" class="h-full transition-colors">
|
|
|
+ <el-card v-loading="loading" :body-style="{ padding: '0' }" class="h-full transition-colors">
|
|
|
<!-- 内容区域 -->
|
|
|
<div class="p-4">
|
|
|
<!-- 标题区域 -->
|
|
@@ -142,7 +153,6 @@
|
|
|
<!-- 按钮组 -->
|
|
|
<div class="flex items-center px-0">
|
|
|
<el-button
|
|
|
- v-hasPermi="['iot:product:update']"
|
|
|
class="flex-1 !px-2 !h-[32px] text-[13px]"
|
|
|
plain
|
|
|
type="primary"
|
|
@@ -151,34 +161,31 @@
|
|
|
<Icon class="mr-1" icon="ep:edit-pen" />
|
|
|
编辑
|
|
|
</el-button>
|
|
|
+<!-- <el-button-->
|
|
|
+<!-- class="flex-1 !px-2 !h-[32px] !ml-[10px] text-[13px]"-->
|
|
|
+<!-- plain-->
|
|
|
+<!-- type="warning"-->
|
|
|
+<!-- @click="openDetail(item.id)"-->
|
|
|
+<!-- >-->
|
|
|
+<!-- <Icon class="mr-1" icon="ep:view" />-->
|
|
|
+<!-- 详情-->
|
|
|
+<!-- </el-button>-->
|
|
|
+<!-- <el-button-->
|
|
|
+<!-- class="flex-1 !px-2 !h-[32px] !ml-[10px] text-[13px]"-->
|
|
|
+<!-- plain-->
|
|
|
+<!-- type="success"-->
|
|
|
+<!-- @click="openObjectModel(item)"-->
|
|
|
+<!-- >-->
|
|
|
+<!-- <Icon class="mr-1" icon="ep:scale-to-original" />-->
|
|
|
+<!-- 物模型-->
|
|
|
+<!-- </el-button>-->
|
|
|
<el-button
|
|
|
class="flex-1 !px-2 !h-[32px] !ml-[10px] text-[13px]"
|
|
|
plain
|
|
|
- type="warning"
|
|
|
- @click="openDetail(item.id)"
|
|
|
- >
|
|
|
- <Icon class="mr-1" icon="ep:view" />
|
|
|
- 详情
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- class="flex-1 !px-2 !h-[32px] !ml-[10px] text-[13px]"
|
|
|
- plain
|
|
|
- type="success"
|
|
|
- @click="openObjectModel(item)"
|
|
|
- >
|
|
|
- <Icon class="mr-1" icon="ep:scale-to-original" />
|
|
|
- 物模型
|
|
|
- </el-button>
|
|
|
- <div class="mx-[10px] h-[20px] w-[1px] bg-[#dcdfe6]"></div>
|
|
|
- <el-button
|
|
|
- v-hasPermi="['iot:product:delete']"
|
|
|
- :disabled="item.status === 1"
|
|
|
- class="!px-2 !h-[32px] text-[13px]"
|
|
|
- plain
|
|
|
type="danger"
|
|
|
@click="handleDelete(item.id)"
|
|
|
>
|
|
|
- <Icon icon="ep:delete" />
|
|
|
+ <Icon icon="ep:delete" />删除
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -303,6 +310,7 @@ const handleClassifyRadio = async () =>{
|
|
|
const getList = async (ifdevice:string) => {
|
|
|
loading.value = true
|
|
|
try {
|
|
|
+ debugger
|
|
|
const data = await IotAlarmSettingApi.getIotAlarmSettingPage(queryParams, ifdevice)
|
|
|
list.value = data.list
|
|
|
total.value = data.total
|
|
@@ -314,7 +322,7 @@ const getList = async (ifdevice:string) => {
|
|
|
/** 搜索按钮操作 */
|
|
|
const handleQuery = () => {
|
|
|
queryParams.pageNo = 1
|
|
|
- getList()
|
|
|
+ getList(ifDevice.value)
|
|
|
}
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
@@ -404,10 +412,10 @@ const handleDelete = async (id: number) => {
|
|
|
// 删除的二次确认
|
|
|
await message.delConfirm()
|
|
|
// 发起删除
|
|
|
- await DeviceTemplateApi.deleteDeviceTemplate(id)
|
|
|
+ await IotAlarmSettingApi.deleteIotAlarmSetting(id)
|
|
|
message.success(t('common.delSuccess'))
|
|
|
// 刷新列表
|
|
|
- await getList()
|
|
|
+ await getList(ifDevice.value)
|
|
|
} catch {}
|
|
|
}
|
|
|
|
|
@@ -431,7 +439,6 @@ const saveAllProperties = async () => {
|
|
|
saveLoading.value = true
|
|
|
try {
|
|
|
debugger
|
|
|
-
|
|
|
// 调用保存接口
|
|
|
await IotAlarmSettingApi.batchUpdateAlarmSettings(modifiedItems)
|
|
|
message.success('保存成功')
|