|
@@ -44,8 +44,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
|
|
|
-
|
|
|
- <el-form-item v-show="ifShow" label="设备状态" label-width="85px" prop="deviceStatus">
|
|
|
+ <el-form-item v-show="ifShow" label="设备状态" label-width="85px" prop="deviceStatus">
|
|
|
<el-select
|
|
|
v-model="queryParams.deviceStatus"
|
|
|
placeholder="设备状态"
|
|
@@ -77,16 +76,23 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
-
|
|
|
<el-form-item>
|
|
|
- <el-button v-if="!ifShow" @click="moreQuery(true)" type="warning"><Icon icon="ep:search" class="mr-5px"/> 更多查询</el-button>
|
|
|
- <el-button v-if="ifShow" @click="moreQuery(false)" type="danger"><Icon icon="ep:search" class="mr-5px"/> 收起查询</el-button>
|
|
|
- <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
|
|
- <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
|
|
+ <el-button v-if="!ifShow" @click="moreQuery(true)" type="warning"
|
|
|
+ ><Icon icon="ep:search" class="mr-5px" /> 更多查询</el-button
|
|
|
+ >
|
|
|
+ <el-button v-if="ifShow" @click="moreQuery(false)" type="danger"
|
|
|
+ ><Icon icon="ep:search" class="mr-5px" /> 收起查询</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="handleQuery"
|
|
|
+ ><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="resetQuery"
|
|
|
+ ><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
plain
|
|
|
- @click="openForm('create',undefined,queryParams.deptId)"
|
|
|
+ @click="openForm('create', undefined, queryParams.deptId)"
|
|
|
v-hasPermi="['rq:iot-device:create']"
|
|
|
>
|
|
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
|
@@ -108,15 +114,15 @@
|
|
|
<ContentWrap>
|
|
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
|
|
<el-table-column label="资产编码" align="center" prop="deviceCode" />
|
|
|
- <el-table-column label="设备名称" align="center" prop="deviceName" >
|
|
|
+ <el-table-column label="设备名称" align="center" prop="deviceName">
|
|
|
<template #default="scope">
|
|
|
<el-link :underline="false" type="primary" @click="handleDetail(scope.row.id)">
|
|
|
{{ scope.row.deviceName }}
|
|
|
</el-link>
|
|
|
</template>
|
|
|
- <!-- <template #default="{ row }">-->
|
|
|
- <!-- <div class="custom-cell">{{ row.deviceName }}</div>-->
|
|
|
- <!-- </template>-->
|
|
|
+ <!-- <template #default="{ row }">-->
|
|
|
+ <!-- <div class="custom-cell">{{ row.deviceName }}</div>-->
|
|
|
+ <!-- </template>-->
|
|
|
</el-table-column>
|
|
|
<el-table-column label="所在部门" align="center" prop="deptName" />
|
|
|
<el-table-column label="设备状态" align="center" prop="deviceStatus">
|
|
@@ -165,11 +171,7 @@
|
|
|
>
|
|
|
删除
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="warning"
|
|
|
- @click="handleUpload(scope.row.id)"
|
|
|
- >
|
|
|
+ <el-button link type="warning" @click="handleUpload(scope.row.id)">
|
|
|
资料上传
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -186,18 +188,16 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<!-- 表单弹窗:添加/修改 -->
|
|
|
-<!-- <IotDeviceForm ref="formRef" @success="getList" />-->
|
|
|
+ <!-- <IotDeviceForm ref="formRef" @success="getList" />-->
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import download from '@/utils/download'
|
|
|
import { IotDeviceApi, IotDeviceVO } from '@/api/pms/device'
|
|
|
-import IotDeviceForm from './IotDeviceForm.vue'
|
|
|
-import {DICT_TYPE, getIntDictOptions, getStrDictOptions} from "@/utils/dict";
|
|
|
-import {dateFormatter} from "@/utils/formatTime";
|
|
|
-import PmsTree from "@/views/system/tree/PmsTree.vue";
|
|
|
-import DeptTree from "@/views/system/user/DeptTree.vue";
|
|
|
-import {CACHE_KEY, useCache} from "@/hooks/web/useCache";
|
|
|
+import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
|
|
|
+import { dateFormatter } from '@/utils/formatTime'
|
|
|
+import DeptTree from '@/views/system/user/DeptTree.vue'
|
|
|
+import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
|
|
|
|
|
/** 设备台账 列表 */
|
|
|
defineOptions({ name: 'IotDevicePms' })
|
|
@@ -283,11 +283,11 @@ const formRef = ref()
|
|
|
const openForm = (type: string, id?: number) => {
|
|
|
//修改
|
|
|
if (typeof id === 'number') {
|
|
|
- push({ name: 'DeviceDetailEdit', params: {id } })
|
|
|
+ push({ name: 'DeviceDetailEdit', params: { id } })
|
|
|
return
|
|
|
}
|
|
|
// 新增
|
|
|
- push({ name: 'DeviceDetailAdd', params:{} })
|
|
|
+ push({ name: 'DeviceDetailAdd', params: {} })
|
|
|
}
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
@@ -304,11 +304,11 @@ const handleDelete = async (id: number) => {
|
|
|
}
|
|
|
|
|
|
const handleDetail = (id: number) => {
|
|
|
- push({ name: 'DeviceDetailInfo', params:{id} })
|
|
|
+ push({ name: 'DeviceDetailInfo', params: { id } })
|
|
|
}
|
|
|
|
|
|
const handleUpload = (id: number) => {
|
|
|
- push({ name: 'DeviceUpload', params:{id} })
|
|
|
+ push({ name: 'DeviceUpload', params: { id } })
|
|
|
}
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
@@ -333,5 +333,4 @@ onMounted(() => {
|
|
|
getList()
|
|
|
})
|
|
|
</script>
|
|
|
-<style scoped>
|
|
|
-</style>
|
|
|
+<style scoped></style>
|