1. 工作人员账号添加
2. 优化打包
3. 日志
4. 用户头像列表
This commit is contained in:
Zy
2026-10-21 08:59:48 +08:00
parent 5584ef1954
commit eeb842d278
36 changed files with 1514 additions and 602 deletions

View File

@@ -47,24 +47,25 @@
<el-table v-loading="loading" :data="deviceList" border class="data-table"
@selection-change="handleSelectionChange">
<el-table-column align="center" type="selection" width="55"/>
<el-table-column align="center" label="设备名称" prop="name"/>
<el-table-column align="center" label="产品型号" prop="model"/>
<el-table-column align="center" label="所在房间" prop="homeName"/>
<el-table-column align="center" label="设备名称" min-width="150" prop="name"/>
<el-table-column align="center" label="产品型号" min-width="150" prop="model"/>
<el-table-column align="center" label="所在房间" min-width="150" prop="homeName"/>
<el-table-column align="center" label="在线状态" prop="status" width="100">
<template #default="scope">
<el-tag v-if="scope.row.status === '0'" type="success">在线</el-tag>
<el-tag v-else type="danger">离线</el-tag>
<el-tag v-if="scope.row.status === DeviceStatus.online" type="success">在线</el-tag>
<el-tag v-else-if="scope.row.status === DeviceStatus.offline" type="danger">离线</el-tag>
<el-tag v-else-if="scope.row.status === DeviceStatus.unActive" type="info">未激活</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="当前TVOC" prop="tvoc">
<el-table-column align="center" label="当前TVOC" min-width="100" prop="tvoc">
<template #default="scope">
<div class="flex flex-items-center justify-center">
<div>{{ scope.row.tvoc ?? '--' }}</div>
<div>
<el-tag v-if="scope.row.airLevel == '0'" type="primary">优</el-tag>
<el-tag v-else-if="scope.row.airLevel == '1'" type="success">良</el-tag>
<el-tag v-else-if="scope.row.airLevel == '2'" type="warning">差</el-tag>
<el-tag v-else-if="scope.row.airLevel == '3'" type="danger">污染</el-tag>
<el-tag v-if="scope.row.airLevel === airLevel.Excellent" type="primary">优</el-tag>
<el-tag v-else-if="scope.row.airLevel === airLevel.good" type="success">良</el-tag>
<el-tag v-else-if="scope.row.airLevel === airLevel.poor" type="warning">差</el-tag>
<el-tag v-else-if="scope.row.airLevel === airLevel.polluted" type="danger">污染</el-tag>
</div>
</div>
</template>
@@ -76,34 +77,36 @@
}" class="defaultLife">{{ scope.row.filterLife }}%</span>
</template>
</el-table-column>
<el-table-column align="center" label="电池电量" prop="deviceBattery" width="100">
<template #default="scope">
<span :class="{
lowBattery: scope.row.filterLife < 50
}" class="defaultLife">{{ scope.row.filterLife }}%</span>
<el-table-column align="center" label="电池电量" width="100">
<template #default="{ row }">
<div v-if="row.deviceBattery" :class="{ lowBattery: row.deviceBattery < 50 }" class="defaultLife">
{{ row.deviceBattery }}%
</div>
<div v-else>---</div>
</template>
</el-table-column>
<el-table-column align="center" label="运行模式" prop="runMode" width="100">
<template #default="scope">
<span v-if="scope.row.runMode == '2'" style="color: rgba(17, 24, 39, 1);">桌面模式</span>
<span v-else-if="scope.row.runMode == '1'" style="color: rgba(17, 24, 39, 1);">车载模式</span>
<span v-if="scope.row.runMode == runMode.dask" style="color: rgba(17, 24, 39, 1);">桌面模式</span>
<span v-else-if="scope.row.runMode == runMode.car" style="color: rgba(17, 24, 39, 1);">车载模式</span>
<span v-else style="color: rgba(17, 24, 39, 1);">自动</span>
</template>
</el-table-column>
<el-table-column align="center" label="风速挡位" prop="mac" width="100">
<el-table-column align="center" label="风速挡位" prop="fanLevel" width="100">
<template #default="scope">
<span v-if="scope.row.fanLevel == '1'" style="color: rgba(17, 24, 39, 1);">强力</span>
<span v-else-if="scope.row.fanLevel == '2'" style="color: rgba(17, 24, 39, 1);">低档</span>
<span v-if="scope.row.fanLevel == fanLevel.power" style="color: rgba(17, 24, 39, 1);">强力</span>
<span v-else-if="scope.row.fanLevel == fanLevel.lower" style="color: rgba(17, 24, 39, 1);">低档</span>
<span v-else style="color: rgba(17, 24, 39, 1);">标准</span>
</template>
</el-table-column>
<el-table-column align="center" label="创建时间" prop="createTime"/>
<el-table-column align="center" class-name="small-padding fixed-width" label="操作" min-width="100">
<el-table-column align="center" label="数据更新时间" min-width="180" prop="updateTime"/>
<el-table-column align="center" class-name="small-padding fixed-width" fixed="right" label="操作"
min-width="200">
<template #default="scope">
<el-button v-hasPermi="['device:device:query']" plain type="primary"
@click="handleUpdate(scope.row)">查看详情
</el-button>
<el-button v-hasPermi="['device:device:edit']" plain type="info"
<el-button v-hasPermiAnd="['device:device:edit','device:device:query']" plain type="info"
@click="handleEdit(scope.row)">编辑
</el-button>
</template>
@@ -129,6 +132,7 @@ import {useSearchToggle} from '@/hooks/form/useSearchToggle';
import {useTableSelection} from '@/hooks/table/useTableSelection';
import modal from '@/plugins/modal';
import {download as requestDownload} from '@/utils/request';
import {airLevel, DeviceStatus, fanLevel, runMode} from "@/views/system/device/devicelist/type";
const router = useRouter();