feat: 新增ai管家消息展示列表页;

fix: 修补优化部分代码
master
chris 2 weeks ago
parent 4dabcb080e
commit d5a2dda1b5

@ -2,8 +2,8 @@
* @Author: chris
* @Date: 2025-02-06 16:43:54
* @LastEditors: chris
* @LastEditTime: 2025-10-29 16:12:03
-->
* @LastEditTime: 2025-12-03 09:06:25
-->
<template>
<div class="device-list-container">
<div class="device-list">

@ -0,0 +1,48 @@
/*
* @Author: chris
* @Date: 2025-10-31 16:52:46
* @LastEditors: chris
* @LastEditTime: 2025-10-31 16:55:51
*/
export const typeDict = {
// 类型 1: 虫情检测 2:土壤墒情监测 3:气象视频监测
1: {
icon: "carbon:pest",
title: "虫情检测设备",
color: "#b47a3e",
span: 3,
},
2: {
icon: "carbon:soil-moisture",
title: "墒情监测设备",
color: "#45969f",
span: 3,
},
3: {
icon: "carbon:radar-weather",
title: "气象监测设备",
color: "#396a78",
span: 3,
},
4: {
icon: "carbon:camera",
title: "监控设备",
color: "#233c62",
span: 3,
},
};
export const statusDict = {
1: {
icon: "carbon:link",
color: "#3aa534",
title: "在线设备",
span: 3,
},
0: {
icon: "carbon:unlink",
color: "#808890",
title: "离线设备",
span: 3,
},
};

@ -42,49 +42,7 @@
</template>
<script setup>
const { proxy } = getCurrentInstance()
const typeDict = readonly({ // 1: 2: 3:
1:{
icon: 'carbon:pest',
title: '虫情检测设备',
color: '#b47a3e',
span: 3
},
2:{
icon: 'carbon:soil-moisture',
title: '墒情监测设备',
color: '#45969f',
span: 3
},
3:{
icon: 'carbon:radar-weather',
title: '气象监测设备',
color: '#396a78',
span: 3
},
4:{
icon: 'carbon:camera',
title: '监控设备',
color: '#233c62',
span: 3
}
})
const statusDict = readonly({
1:{
icon: 'carbon:link',
color: '#3aa534',
title: '在线设备',
span: 3
},
0:{
icon: 'carbon:unlink',
color: '#808890',
title: '离线设备',
span: 3
}
})
import { typeDict, statusDict } from './config.js'
const props = defineProps({
deviceData: {

@ -2,7 +2,7 @@
* @Author: chris
* @Date: 2025-08-25 15:51:13
* @LastEditors: chris
* @LastEditTime: 2025-10-15 10:53:21
* @LastEditTime: 2025-11-17 10:49:58
-->
<script setup>
import ModuleTitle from './moduleTitle.vue';
@ -319,7 +319,7 @@ function formatData (data) {
function createChartData(data, type) {
const keys = Object.keys(data)
const values = []
names.forEach(key => {
keys.forEach(key => {
values.push(data[key].reduce((pre, cur) => cur + (pre.value || 0), 0))
})
return type === 'line' ? { dates: keys, values } : { names: keys, values }

@ -0,0 +1,17 @@
<!--
* @Author: chris
* @Date: 2025-11-05 11:26:45
* @LastEditors: chris
* @LastEditTime: 2025-11-14 09:51:19
-->
<script>
</script>
<template>
<div class="ai-expert">
AI专家
</div>
</template>
<style lang="scss" scoped>
</style>
Loading…
Cancel
Save