refactor(device):优化设备图片引用方式、添加测试页面

- 统一设备卡片和项目页面中的默认图片替换为本地导入的图片资源
- 新增测试页面用于验证告警组件功能
- 调整环境配置文件中的目标地址注释格式
- 更新.gitignore忽略.history目录
This commit is contained in:
fhysy 2025-10-10 09:55:01 +08:00
parent bd8103dc95
commit be51e130e9
12 changed files with 673 additions and 311 deletions

View File

@ -56,4 +56,5 @@ port= 9988
// 测试端 // 测试端
// target = http://192.168.10.241:32024 // target = http://192.168.10.241:32024
// 开发端 // 开发端
target = http://192.168.1.17:8899 # target = http://power.gkiiot.com
target = http://192.168.1.17:8899

1
.gitignore vendored
View File

@ -23,3 +23,4 @@ package-lock.json
yarn.lock yarn.lock
/dist*.zip /dist*.zip
/src/assets/download.zip /src/assets/download.zip
.history

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -8,6 +8,7 @@
ref="audio" ref="audio"
v-if="audioHidden" v-if="audioHidden"
></audio> ></audio>
<!-- <el-button @click="handleTextSend">ws 告警通知</el-button>-->
<div class="e-dialog-div" v-show="dialogShow"> <div class="e-dialog-div" v-show="dialogShow">
<div class="dialog-top"> <div class="dialog-top">
<span class="info-title">报警提醒</span> <span class="info-title">报警提醒</span>

View File

@ -310,8 +310,8 @@
<div class="card-header"> <div class="card-header">
<div class="device-img-box"> <div class="device-img-box">
<el-image <el-image
:preview-src-list="item.deviceImage?[imgPath+item.deviceImage]:['http://static.drgyen.com/pc/smart-power-ui/device/device-card.png']" :preview-src-list="item.deviceImage?[imgPath+item.deviceImage]:[deviceCardImgUrl]"
:src="item.deviceImage?imgPath+item.deviceImage:'http://static.drgyen.com/pc/smart-power-ui/device/device-card.png'" :src="item.deviceImage?imgPath+item.deviceImage:deviceCardImgUrl"
style="width: 100%; height: 100%"> style="width: 100%; height: 100%">
</el-image> </el-image>
</div> </div>
@ -586,6 +586,7 @@ import DialogTemplate from "@/components/DialogTemplate";
import JsBarcode from "jsbarcode"; import JsBarcode from "jsbarcode";
import { getProjectGroupList, listProject } from "@/api/tenant/project"; import { getProjectGroupList, listProject } from "@/api/tenant/project";
import { listDeviceType } from '../../../api/iot/deviceType' import { listDeviceType } from '../../../api/iot/deviceType'
import deviceCardImgUrl from "@/assets/images/device/device-card.png";
const deviceStatusOpt = { const deviceStatusOpt = {
ONLINE: "在线", ONLINE: "在线",
@ -803,6 +804,7 @@ export default {
}, },
data() { data() {
return { return {
deviceCardImgUrl,
// //
viewType: "card", viewType: "card",
deviceStatusOpt, deviceStatusOpt,

View File

@ -161,8 +161,8 @@
<div class="card-header-top"> <div class="card-header-top">
<div class="device-img-box"> <div class="device-img-box">
<el-image <el-image
:preview-src-list="['http://static.drgyen.com/pc/smart-power-ui/device/device-number.png']" :preview-src-list="[deviceImgUrl]"
:src="'http://static.drgyen.com/pc/smart-power-ui/device/device-number.png'" :src="deviceImgUrl"
style="width: 100%; height: 100%"> style="width: 100%; height: 100%">
</el-image> </el-image>
</div> </div>
@ -437,6 +437,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import DialogTemplate from "@/components/DialogTemplate/index"; import DialogTemplate from "@/components/DialogTemplate/index";
import EDialogTableInput from "@/components/EDialogTableInput"; import EDialogTableInput from "@/components/EDialogTableInput";
import deviceImgUrl from "@/assets/images/device/device-number.png";
///// /////
import EDetailsWrap from "./profileV2/details"; import EDetailsWrap from "./profileV2/details";
@ -603,6 +604,7 @@ export default {
}, },
data() { data() {
return { return {
deviceImgUrl,
// //
viewType: "card", viewType: "card",
selectPriceTable, selectPriceTable,

View File

@ -241,8 +241,8 @@
<div class="card-header"> <div class="card-header">
<div class="device-img-box"> <div class="device-img-box">
<el-image <el-image
:preview-src-list="item.deviceImage?[imgPath+item.deviceImage]:['http://static.drgyen.com/pc/smart-power-ui/device/device-card.png']" :preview-src-list="item.deviceImage?[imgPath+item.deviceImage]:[deviceCardImgUrl]"
:src="item.deviceImage?imgPath+item.deviceImage:'http://static.drgyen.com/pc/smart-power-ui/device/device-card.png'" :src="item.deviceImage?imgPath+item.deviceImage:deviceCardImgUrl"
style="width: 100%; height: 100%"> style="width: 100%; height: 100%">
</el-image> </el-image>
</div> </div>
@ -364,6 +364,7 @@ import GatewayDetail from "@/views/profile/DeviceDetailsView/index";
import JsBarcode from "jsbarcode"; import JsBarcode from "jsbarcode";
import { getProjectGroupList, listProject } from "@/api/tenant/project"; import { getProjectGroupList, listProject } from "@/api/tenant/project";
import { listDeviceType } from '../../../api/iot/deviceType' import { listDeviceType } from '../../../api/iot/deviceType'
import deviceCardImgUrl from "@/assets/images/device/device-card.png";
const deviceStatusOpt = { const deviceStatusOpt = {
ONLINE: "在线", ONLINE: "在线",
OFFLINE: "离线", OFFLINE: "离线",
@ -383,6 +384,7 @@ export default {
}, },
data() { data() {
return { return {
deviceCardImgUrl,
// //
viewType: "card", viewType: "card",
deviceStatusOpt, deviceStatusOpt,

View File

@ -118,7 +118,7 @@
<div class="card-header-top"> <div class="card-header-top">
<div class="device-img-box"> <div class="device-img-box">
<el-image <el-image
:src="'http://static.drgyen.com/pc/smart-power-ui/device/device-number.png'" :src="deviceImgUrl"
style="width: 100%; height: 100%"> style="width: 100%; height: 100%">
</el-image> </el-image>
</div> </div>
@ -173,6 +173,7 @@ import {
import DetailsWrap from '@/views/iot/project/profileV2/details' import DetailsWrap from '@/views/iot/project/profileV2/details'
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import deviceImgUrl from "@/assets/images/device/device-number.png";
export default { export default {
name: "Project", name: "Project",
@ -182,6 +183,7 @@ export default {
}, },
data() { data() {
return { return {
deviceImgUrl,
// //
viewType: "card", viewType: "card",
// //

14
src/views/test/index.vue Normal file
View File

@ -0,0 +1,14 @@
<template>
<div>
测试页面
<notification-alarm></notification-alarm>
</div>
</template>
<script>
import NotificationAlarm from "../bigScreen/v3/profile/NotificationAlarm"
export default {
name: "test",
components: {NotificationAlarm}
}
</script>

943
yarn.lock

File diff suppressed because it is too large Load Diff