feat: 算力分配数据mock、服务器数据调整

dev-deviceSetting
donghao 1 year ago
parent 9fe08c85d2
commit 74582fe407

@ -0,0 +1,33 @@
/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-01-17 13:54:43
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-03-07 17:29:22
* @FilePath: \General-AI-Platform-Web-Client\mock\alarm.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { MockMethod } from "vite-plugin-mock";
import {
powerGroupListData,
powerPoolsListData
} from "./pools/computePowerData";
import { fetchMockSuccessFullByOther } from "./utils/apiMock";
export default [
{
url: "/getPowerPoolsList",
method: "post",
response: req => {
console.log(req);
return fetchMockSuccessFullByOther({ data: powerPoolsListData.data });
}
},
{
url: "/getPowerGroupList",
method: "post",
response: req => {
console.log(req);
return fetchMockSuccessFullByOther({ data: powerGroupListData.data });
}
}
] as MockMethod[];

@ -14,7 +14,7 @@ export default [
isEnabled: true,
type: 4,
banner: "https://tdesign.gtimg.com/tdesign-pro/cloud-server.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
@ -24,7 +24,7 @@ export default [
isEnabled: false,
type: 4,
banner: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
@ -34,7 +34,7 @@ export default [
isEnabled: false,
type: 5,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "故障",
description:
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗"
@ -44,7 +44,7 @@ export default [
isEnabled: false,
type: 2,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "离线",
description:
"云数据库MySQL为用户提供安全可靠性能卓越、易于维护的企业级云数据库服务。"
@ -55,7 +55,7 @@ export default [
type: 3,
banner:
"https://tdesign.gtimg.com/tdesign-pro/face-recognition.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"云数据库MySQL为用户提供安全可靠性能卓越、易于维护的企业级云数据库服务。"
@ -65,7 +65,7 @@ export default [
isEnabled: true,
type: 3,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客"
@ -75,7 +75,7 @@ export default [
isEnabled: false,
type: 1,
banner: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "离线",
description:
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客"
@ -85,7 +85,7 @@ export default [
isEnabled: true,
type: 3,
banner: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "故障",
description:
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗"
@ -95,7 +95,7 @@ export default [
isEnabled: false,
type: 1,
banner: "https://tdesign.gtimg.com/tdesign-pro/cloud-server.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "离线",
description:
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客"
@ -105,7 +105,7 @@ export default [
isEnabled: true,
type: 4,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"云数据库MySQL为用户提供安全可靠性能卓越、易于维护的企业级云数据库服务。"
@ -115,7 +115,7 @@ export default [
isEnabled: true,
type: 5,
banner: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
@ -125,7 +125,7 @@ export default [
isEnabled: true,
type: 2,
banner: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
@ -135,7 +135,7 @@ export default [
isEnabled: true,
type: 3,
banner: "https://tdesign.gtimg.com/tdesign-pro/cloud-db.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "故障",
description:
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客"
@ -145,7 +145,7 @@ export default [
isEnabled: false,
type: 5,
banner: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "故障",
description:
"基于腾讯优图强大的面部分析技术,提供包括人脸检测与分析、五官定位、人脸搜索、人脸比对、人脸"
@ -155,7 +155,7 @@ export default [
isEnabled: true,
type: 2,
banner: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
@ -165,7 +165,7 @@ export default [
isEnabled: false,
type: 3,
banner: "https://tdesign.gtimg.com/tdesign-pro/cloud-server.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "离线",
description:
"基于腾讯优图强大的面部分析技术,提供包括人脸检测与分析、五官定位、人脸搜索、人脸比对、人脸"
@ -176,7 +176,7 @@ export default [
type: 5,
banner:
"https://tdesign.gtimg.com/tdesign-pro/face-recognition.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
@ -187,7 +187,7 @@ export default [
type: 4,
banner:
"https://tdesign.gtimg.com/tdesign-pro/face-recognition.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "离线",
description:
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客"
@ -197,7 +197,7 @@ export default [
isEnabled: true,
type: 2,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
@ -208,7 +208,7 @@ export default [
type: 4,
banner:
"https://tdesign.gtimg.com/tdesign-pro/face-recognition.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "故障",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
@ -218,7 +218,7 @@ export default [
isEnabled: false,
type: 4,
banner: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "在线",
description:
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗"
@ -228,7 +228,7 @@ export default [
isEnabled: false,
type: 3,
banner: "https://tdesign.gtimg.com/tdesign-pro/cloud-db.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
@ -238,7 +238,7 @@ export default [
isEnabled: true,
type: 1,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"基于腾讯优图强大的面部分析技术,提供包括人脸检测与分析、五官定位、人脸搜索、人脸比对、人脸"
@ -248,7 +248,7 @@ export default [
isEnabled: true,
type: 4,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "在线",
description:
"基于腾讯优图强大的面部分析技术,提供包括人脸检测与分析、五官定位、人脸搜索、人脸比对、人脸"
@ -259,7 +259,7 @@ export default [
type: 5,
banner:
"https://tdesign.gtimg.com/tdesign-pro/face-recognition.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗"
@ -269,7 +269,7 @@ export default [
isEnabled: true,
type: 4,
banner: "https://tdesign.gtimg.com/tdesign-pro/cloud-server.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "在线",
description:
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗"
@ -279,7 +279,7 @@ export default [
isEnabled: true,
type: 5,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
@ -289,7 +289,7 @@ export default [
isEnabled: false,
type: 4,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"基于腾讯优图强大的面部分析技术,提供包括人脸检测与分析、五官定位、人脸搜索、人脸比对、人脸"
@ -299,7 +299,7 @@ export default [
isEnabled: false,
type: 5,
banner: "https://tdesign.gtimg.com/tdesign-pro/cloud-db.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "故障",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
@ -309,7 +309,7 @@ export default [
isEnabled: true,
type: 1,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "离线",
description:
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗"
@ -319,7 +319,7 @@ export default [
isEnabled: true,
type: 4,
banner: "https://tdesign.gtimg.com/tdesign-pro/cloud-server.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "故障",
description:
"基于腾讯优图强大的面部分析技术,提供包括人脸检测与分析、五官定位、人脸搜索、人脸比对、人脸"
@ -329,7 +329,7 @@ export default [
isEnabled: false,
type: 3,
banner: "https://tdesign.gtimg.com/tdesign-pro/cloud-server.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "在线",
description:
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客"
@ -339,7 +339,7 @@ export default [
isEnabled: true,
type: 3,
banner: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"云数据库MySQL为用户提供安全可靠性能卓越、易于维护的企业级云数据库服务。"
@ -349,7 +349,7 @@ export default [
isEnabled: false,
type: 2,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客"
@ -359,7 +359,7 @@ export default [
isEnabled: false,
type: 1,
banner: "https://tdesign.gtimg.com/tdesign-pro/cloud-server.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "在线",
description:
"基于腾讯优图强大的面部分析技术,提供包括人脸检测与分析、五官定位、人脸搜索、人脸比对、人脸"
@ -370,7 +370,7 @@ export default [
type: 4,
banner:
"https://tdesign.gtimg.com/tdesign-pro/face-recognition.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "在线",
description:
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客"
@ -380,7 +380,7 @@ export default [
isEnabled: true,
type: 5,
banner: "https://tdesign.gtimg.com/tdesign-pro/cloud-server.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "离线",
description:
"云数据库MySQL为用户提供安全可靠性能卓越、易于维护的企业级云数据库服务。"
@ -390,7 +390,7 @@ export default [
isEnabled: false,
type: 4,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "故障",
description:
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗"
@ -400,7 +400,7 @@ export default [
isEnabled: false,
type: 3,
banner: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "故障",
description:
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗"
@ -410,7 +410,7 @@ export default [
isEnabled: true,
type: 4,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
@ -420,7 +420,7 @@ export default [
isEnabled: true,
type: 4,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗"
@ -430,7 +430,7 @@ export default [
isEnabled: true,
type: 3,
banner: "https://tdesign.gtimg.com/tdesign-pro/cloud-server.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "在线",
description:
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗"
@ -440,7 +440,7 @@ export default [
isEnabled: false,
type: 3,
banner: "https://tdesign.gtimg.com/tdesign-pro/cloud-db.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "故障",
description:
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗"
@ -450,7 +450,7 @@ export default [
isEnabled: true,
type: 4,
banner: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "在线",
description:
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗"
@ -460,7 +460,7 @@ export default [
isEnabled: false,
type: 3,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "离线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
@ -470,7 +470,7 @@ export default [
isEnabled: true,
type: 2,
banner: "https://tdesign.gtimg.com/tdesign-pro/cloud-server.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
@ -480,7 +480,7 @@ export default [
isEnabled: false,
type: 4,
banner: "https://tdesign.gtimg.com/tdesign-pro/cloud-server.jpg",
deviceSort: "分析设备",
deviceSort: "精密仪器设备",
state: "在线",
description:
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客"
@ -490,7 +490,7 @@ export default [
isEnabled: false,
type: 3,
banner: "https://tdesign.gtimg.com/tdesign-pro/ssl.jpg",
deviceSort: "监控1",
deviceSort: "机械加工设备",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"

@ -2,33 +2,11 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-02-22 13:38:04
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-02-29 17:53:39
* @LastEditTime: 2024-03-06 10:06:11
* @FilePath: \General-AI-Platform-Web-Client\mock\pools\alarmData.ts
// * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
function generateRandomDateTime(year) {
// 生成随机月份1-12
const month = Math.floor(Math.random() * 12) + 1;
// 生成随机日期1-31
const day = Math.floor(Math.random() * 31) + 1;
// 生成随机小时0-23
const hour = Math.floor(Math.random() * 24);
// 生成随机分钟0-59
const minute = Math.floor(Math.random() * 60);
// 生成随机秒钟0-59
const second = Math.floor(Math.random() * 60);
// 返回随机日期和时间的字符串
return `${year}-${month < 10 ? "0" : ""}${month}-${
day < 10 ? "0" : ""
}${day} ${hour < 10 ? "0" : ""}${hour}:${minute < 10 ? "0" : ""}${minute}:${
second < 10 ? "0" : ""
}${second}`;
}
import { generateRandomDateTimeByYear } from "../utils/mockMoment";
function fetchList(): Record<string, any>[] {
const currList: Record<string, any>[] = [];
const nameArr = [
@ -50,7 +28,7 @@ function fetchList(): Record<string, any>[] {
for (let i = 0; i < 35; i++) {
currList.push({
id: 1,
createTime: generateRandomDateTime(2023),
createTime: generateRandomDateTimeByYear(2023),
updateTime: "2023-10-17T02:35:41.14308Z",
name: nameArr[Math.floor(Math.random() * 3)],
code: codeArr[Math.floor(Math.random() * 4)] + "-" + i,

@ -0,0 +1,122 @@
export type ComputePowerPoolItem = {
name: string;
type: number; // 类别
color?: string; //
proportion: number;
pretreatmentEfficiency?: number;
bgColor?: string;
};
const groupList: Record<string, any>[] = [
{
label: "NVIDIA GeForce 4090",
type: 1
},
{
label: "瑞芯微 RK3566",
type: 0
},
{
label: "瑞芯微 RK3566",
type: 0
},
{
label: "NVIDIA GeForce 4090",
type: 1
},
{
label: "NVIDIA GeForce 4090",
type: 1
}
];
const poolsData: ComputePowerPoolItem[] = [
{
name: "焊线颜色检测",
type: 9,
proportion: 7,
pretreatmentEfficiency: 20,
color: "#014BE6",
bgColor: "linear-gradient(180deg, #015DE6 0%, #4881F6 100%)"
},
{
name: "螺纹缺陷检测",
type: 8,
proportion: 8,
pretreatmentEfficiency: 20,
color: "#FAA90B",
bgColor: "linear-gradient(180deg, #E64601 0%, #F6A648 100%)"
},
{
name: "PIN间距测量",
type: 7,
proportion: 4,
pretreatmentEfficiency: 15,
color: "#EA1281",
bgColor: "linear-gradient(180deg, #E60161 0%, #F648E5 100%)"
},
{
name: "螺纹无牙缺陷检测",
type: 6,
proportion: 7,
pretreatmentEfficiency: 20,
color: "#FA8616",
bgColor: "linear-gradient(180deg, #FA8316 0%, #FAAD16 100%)"
},
{
name: "压板缺陷检测",
type: 5,
proportion: 32,
pretreatmentEfficiency: 38,
color: "#F9DB18",
bgColor: "linear-gradient(180deg, #FFC56F 0%, #F9E006 100%)"
},
{
name: "划伤缺陷检测",
type: 4,
proportion: 8,
pretreatmentEfficiency: 38,
color: "#1CCCFA",
bgColor: "linear-gradient(180deg, #6FFFFF 0%, #06BEF9 100%)"
},
{
name: "披锋(毛刺)缺陷检测",
type: 3,
proportion: 12,
pretreatmentEfficiency: 38,
color: "#9E26EE",
bgColor: "linear-gradient(180deg, #FF2494 0%, #8D27FF 100%)"
},
{
name: "工件尺寸测量",
type: 2,
proportion: 7,
pretreatmentEfficiency: 38,
color: "#6F50F6",
bgColor: "linear-gradient(180deg, #6B55F6 0%, #8C38F8 100%)"
},
{
name: "打孔不良检测",
type: 1,
proportion: 5,
pretreatmentEfficiency: 38,
color: "#24ED75",
bgColor: "linear-gradient(180deg, #43EA80 0%, #38F8D4 100%)"
},
{
name: "空闲算力",
type: 0,
proportion: 10,
pretreatmentEfficiency: 0,
color: "#DCDCDC",
bgColor: "linear-gradient(90deg, #7B7979 0%, #C1C1C1 100%)"
}
];
export const powerGroupListData = {
data: groupList
};
export const powerPoolsListData = {
data: poolsData
};

@ -1,3 +1,48 @@
/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-03-01 16:34:06
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-03-07 17:07:56
* @FilePath: \General-AI-Platform-Web-Client\mock\pools\serverListData.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const generateRandomTwoDecimal = () => {
// 生成一个在 [0, 1) 范围内的随机数
const randomFraction = Math.random();
// 乘以一个倍数,例如 100以增加小数位数
const multipliedValue = randomFraction * 100;
// 使用 Math.round() 进行四舍五入,并将结果除以倍数,得到两位小数
return Math.round(multipliedValue) / 100;
};
const progressData = () => {
const finalArr = [
{
label: "CPU",
percent: generateRandomTwoDecimal(),
strokeColor: "rgb(243,48,5)"
},
{
label: "内存",
percent: (15 + Math.floor(Math.random() * 85)) / 100,
strokeColor: "rgb(33,169,122)"
},
{
label: "存储",
percent: (15 + Math.floor(Math.random() * 85)) / 100,
strokeColor: "rgb(33,169,122)"
},
{
label: "GPU",
percent: (85 + Math.floor(Math.random() * 15)) / 100,
strokeColor: "rgb(250,173,20)"
}
];
return finalArr;
};
const serverList = [
{
index: 1,
@ -7,7 +52,8 @@ const serverList = [
deviceSort: "服务器1",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部",
progressData
},
{
index: 2,
@ -17,7 +63,8 @@ const serverList = [
deviceSort: "服务器2",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部",
progressData
},
{
index: 3,
@ -27,7 +74,8 @@ const serverList = [
deviceSort: "服务器3",
state: "在线",
description:
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗"
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗",
progressData
},
{
index: 4,
@ -37,7 +85,8 @@ const serverList = [
deviceSort: "服务器4",
state: "离线",
description:
"云数据库MySQL为用户提供安全可靠性能卓越、易于维护的企业级云数据库服务。"
"云数据库MySQL为用户提供安全可靠性能卓越、易于维护的企业级云数据库服务。",
progressData
},
{
index: 5,
@ -47,7 +96,8 @@ const serverList = [
deviceSort: "服务器4",
state: "在线",
description:
"云数据库MySQL为用户提供安全可靠性能卓越、易于维护的企业级云数据库服务。"
"云数据库MySQL为用户提供安全可靠性能卓越、易于维护的企业级云数据库服务。",
progressData
},
{
index: 6,
@ -57,7 +107,8 @@ const serverList = [
deviceSort: "服务器5",
state: "在线",
description:
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客"
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客",
progressData
},
{
index: 7,
@ -67,7 +118,8 @@ const serverList = [
deviceSort: "服务器6",
state: "离线",
description:
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客"
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客",
progressData
},
{
index: 8,
@ -77,7 +129,8 @@ const serverList = [
deviceSort: "服务器7",
state: "在线",
description:
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗"
"云硬盘为您提供用于CVM的持久性数据块级存储服务。云硬盘中的数据自动地可用区内以多副本冗",
progressData
},
{
index: 9,
@ -87,7 +140,8 @@ const serverList = [
deviceSort: "服务器8",
state: "离线",
description:
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客"
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客",
progressData
},
{
index: 10,
@ -97,7 +151,8 @@ const serverList = [
deviceSort: "服务器9",
state: "在线",
description:
"云数据库MySQL为用户提供安全可靠性能卓越、易于维护的企业级云数据库服务。"
"云数据库MySQL为用户提供安全可靠性能卓越、易于维护的企业级云数据库服务。",
progressData
},
{
index: 11,
@ -107,7 +162,8 @@ const serverList = [
deviceSort: "服务器10",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部",
progressData
},
{
index: 12,
@ -117,7 +173,8 @@ const serverList = [
deviceSort: "服务器11",
state: "在线",
description:
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部"
"SSL证书又叫服务器证书腾讯云为您提供证书的一站式服务包括免费、付费证书的申请、管理及部",
progressData
},
{
index: 13,
@ -127,7 +184,8 @@ const serverList = [
deviceSort: "服务器12",
state: "在线",
description:
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客"
"腾讯安全云防火墙产品是腾讯云安全团队结合云原生的优势自主研发的SaaS化防火墙产品无需客无需客无需客无需客无需客无需客无需客",
progressData
}
];
@ -139,3 +197,7 @@ export const serverListData = {
pageSize: 10
}
};
export const serverParamsListData = {
data: progressData
};

@ -1,7 +1,18 @@
/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-03-01 16:34:06
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-03-07 11:44:52
* @FilePath: \General-AI-Platform-Web-Client\mock\screenData.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { MockMethod } from "vite-plugin-mock";
import { serverListData } from "./pools/serverListData";
import { serverListData, serverParamsListData } from "./pools/serverListData";
import { modelListData } from "./pools/modelListData";
import { fetchCurrPageByList } from "./utils/apiMock";
import {
fetchCurrPageByList,
fetchMockSuccessFullByOther
} from "./utils/apiMock";
export default [
{
@ -22,6 +33,48 @@ export default [
};
}
},
{
url: "/updateServerBoxList",
method: "post",
response: req => {
const { currServerList } = req.body;
console.log(currServerList, "currServerList");
const finalServerList = currServerList.map(item => {
if (item.isEnabled) {
item.progressData = item.progressData.map(itemChild => {
switch (itemChild.label) {
case "CPU":
case "GPU":
// eslint-disable-next-line no-case-declarations
const randomNumber = Math.random();
// eslint-disable-next-line no-case-declarations
const changeNumberValue = 10;
// 通过逻辑判断,将随机数转换为正数或负数
// 如果随机数小于0.5,则为负数;否则为正数
// eslint-disable-next-line no-case-declarations
const changeNumber =
randomNumber < 0.5 ? -changeNumberValue : changeNumberValue;
itemChild.percent += changeNumber / 100;
if (itemChild.percent >= 1) {
itemChild.percent = 1;
}
if (itemChild.percent <= 0.1) {
itemChild.percent = 0.1;
}
break;
default:
break;
}
return itemChild;
});
}
return item;
});
// console.log(req);
return fetchMockSuccessFullByOther({ data: finalServerList });
}
},
{
url: "/getModelBoxList",
method: "post",

@ -0,0 +1,38 @@
export function generateRandomDateTimeByYear(year) {
// 生成随机月份1-12
const month = Math.floor(Math.random() * 12) + 1;
// 生成随机日期1-31
const day = Math.floor(Math.random() * 31) + 1;
// 生成随机小时0-23
const hour = Math.floor(Math.random() * 24);
// 生成随机分钟0-59
const minute = Math.floor(Math.random() * 60);
// 生成随机秒钟0-59
const second = Math.floor(Math.random() * 60);
// 返回随机日期和时间的字符串
return `${year}-${month < 10 ? "0" : ""}${month}-${
day < 10 ? "0" : ""
}${day} ${hour < 10 ? "0" : ""}${hour}:${minute < 10 ? "0" : ""}${minute}:${
second < 10 ? "0" : ""
}${second}`;
}
export function generateRandomMoment(date = new Date(), type = "HH:mm:ss") {
// 生成随机小时0-23
const hour = Math.floor(Math.random() * 24);
// 生成随机分钟0-59
const minute = Math.floor(Math.random() * 60);
// 生成随机秒钟0-59
const second = Math.floor(Math.random() * 60);
// 返回随机日期和时间的字符串
return `${hour < 10 ? "0" : ""}${hour}:${minute < 10 ? "0" : ""}${minute}:${
second < 10 ? "0" : ""
}${second}`;
}

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-01-15 14:45:56
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-01-18 14:43:01
* @LastEditTime: 2024-03-07 17:14:04
* @FilePath: \General-AI-Platform-Web-Client\src\api\list.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@ -29,6 +29,10 @@ export const getServerBoxList = (data?: object) => {
return http.request<Result>("post", "/getServerBoxList", { data });
};
export const updateServerBoxList = (data?: object) => {
return http.request<Result>("post", "/updateServerBoxList", { data });
};
export const getModelList = (data?: object) => {
return http.request<Result>("post", "/getModelList", { data });
};
@ -41,3 +45,10 @@ export const getModelBoxList = (data?: object) => {
export const getAlarmList = (data?: object) => {
return http.request<Result>("post", "/getAlarmList", { data });
};
/** 算力分配 */
export const getPowerPoolsList = (data?: object) => {
return http.request<Result>("post", "/getPowerPoolsList", { data });
};
export const getPowerGroupList = (data?: object) => {
return http.request<Result>("post", "/getPowerGroupList", { data });
};

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 72 KiB

@ -11,47 +11,13 @@ const testDeviceTreeData = [
expended: true,
childList: [
{
name: "车间1",
id: "分析设备",
level: 1,
childList: [
{
name: "控制器A",
id: "1101001",
level: 2,
childList: [
{
name: "控制器a",
id: "110100101",
level: 3
},
{
name: "控制器b",
id: "110100202",
level: 3
}
]
},
{
name: "控制器B",
id: "1101002",
level: 2
}
]
},
{
name: "车间2",
id: "1102",
level: 1
},
{
name: "车间3",
id: "1103",
name: "精密仪器车间",
id: "精密仪器设备",
level: 1
},
{
name: "车间4",
id: "1104",
name: "装配间",
id: "装配设备",
level: 1
}
]
@ -62,20 +28,10 @@ const testDeviceTreeData = [
level: 0,
childList: [
{
name: "车间1",
id: "监控1",
level: 1
},
{
name: "车间2",
id: "1203",
name: "机械加工车间",
id: "机械加工设备",
level: 1
}
// {
// name: "控制器D",
// id: "1204",
// level: 1
// }
]
}
];

@ -2,11 +2,12 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-02-28 15:21:32
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-02-28 15:25:08
* @LastEditTime: 2024-03-06 09:46:59
* @FilePath: \General-AI-Platform-Web-Client\src\pages\dataScreen\components\alarmInfoList.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script setup lang="ts">
import { generateRandomMoment } from "/mock/utils/mockMoment";
defineOptions({
name: "AlarmInfoList"
});
@ -16,25 +17,25 @@ const deviceStatusData = [
type: 2,
label: "紧急",
des: "核心监测001设备发生告警请及时处理",
time: "今天10:03:01"
time: `昨天${generateRandomMoment()}`
},
{
type: 1,
label: "优先",
des: "核心监测001设备发生告警请及时处理",
time: "今天10:03:01"
time: `昨天${generateRandomMoment()}`
},
{
type: 0,
label: "一般",
des: "核心监测001设备发生告警请及时处理",
time: "今天10:03:01"
time: `昨天${generateRandomMoment()}`
},
{
type: 0,
label: "一般",
des: "核心监测001设备发生告警请及时处理",
time: "今天10:03:01"
time: `昨天${generateRandomMoment()}`
}
// {
// type: 0,

@ -2,128 +2,44 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-01-19 09:22:30
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-02-29 10:02:55
* @LastEditTime: 2024-03-07 17:38:56
* @FilePath: \General-AI-Platform-Web-Client\src\views\computePowerAllocation\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script setup lang="ts">
import { ref } from "vue"; //api/json
import { onMounted, ref } from "vue"; //api/json
import ComputePowerCube from "./components/computePowerCube.vue";
import ComputePowerType from "./components/computePowerType.vue";
import { ComputePowerPoolItem } from "./typing";
import { AnimationPic } from "@/components/AnimationCard";
import computePowerAllocationIcon from "@/assets/animate/device/computePowerAllocation.json";
import { DsBox2 } from "@/components/DsBox";
import { getPowerPoolsList, getPowerGroupList } from "@/api/list";
defineOptions({
name: "ComputePowerAllocation"
});
const groupList = ref<Record<string, any>[]>([
{
label: "NVIDIA GeForce 4090",
type: 1
},
{
label: "瑞芯微 RK3566",
type: 0
},
{
label: "瑞芯微 RK3566",
type: 0
},
{
label: "NVIDIA GeForce 4090",
type: 1
},
{
label: "NVIDIA GeForce 4090",
type: 1
}
]); //dom;
const groupList = ref<Record<string, any>[]>([]); //dom;
const poolsData: ComputePowerPoolItem[] = [
{
name: "焊线颜色检测",
type: 9,
proportion: 7,
pretreatmentEfficiency: 20,
color: "#014BE6",
bgColor: "linear-gradient(180deg, #015DE6 0%, #4881F6 100%)"
},
{
name: "螺纹缺陷检测",
type: 8,
proportion: 8,
pretreatmentEfficiency: 20,
color: "#FAA90B",
bgColor: "linear-gradient(180deg, #E64601 0%, #F6A648 100%)"
},
{
name: "PIN间距测量",
type: 7,
proportion: 4,
pretreatmentEfficiency: 15,
color: "#EA1281",
bgColor: "linear-gradient(180deg, #E60161 0%, #F648E5 100%)"
},
{
name: "螺纹无牙缺陷检测",
type: 6,
proportion: 7,
pretreatmentEfficiency: 20,
color: "#FA8616",
bgColor: "linear-gradient(180deg, #FA8316 0%, #FAAD16 100%)"
},
{
name: "压板缺陷检测",
type: 5,
proportion: 32,
pretreatmentEfficiency: 38,
color: "#F9DB18",
bgColor: "linear-gradient(180deg, #FFC56F 0%, #F9E006 100%)"
},
{
name: "划伤缺陷检测",
type: 4,
proportion: 8,
pretreatmentEfficiency: 38,
color: "#1CCCFA",
bgColor: "linear-gradient(180deg, #6FFFFF 0%, #06BEF9 100%)"
},
{
name: "披锋(毛刺)缺陷检测",
type: 3,
proportion: 12,
pretreatmentEfficiency: 38,
color: "#9E26EE",
bgColor: "linear-gradient(180deg, #FF2494 0%, #8D27FF 100%)"
},
{
name: "工件尺寸测量",
type: 2,
proportion: 7,
pretreatmentEfficiency: 38,
color: "#6F50F6",
bgColor: "linear-gradient(180deg, #6B55F6 0%, #8C38F8 100%)"
},
{
name: "打孔不良检测",
type: 1,
proportion: 5,
pretreatmentEfficiency: 38,
color: "#24ED75",
bgColor: "linear-gradient(180deg, #43EA80 0%, #38F8D4 100%)"
},
{
name: "空闲算力",
type: 0,
proportion: 10,
pretreatmentEfficiency: 0,
color: "#DCDCDC",
bgColor: "linear-gradient(90deg, #7B7979 0%, #C1C1C1 100%)"
}
];
const poolsData = ref<ComputePowerPoolItem[]>([]);
async function fetchPowerData() {
const res = await getPowerPoolsList();
console.log("fetchPowerData_res", res);
poolsData.value = res.data;
}
async function fetchGroupData() {
const res = await getPowerGroupList();
console.log("fetchGroupData_res", res);
groupList.value = res.data;
}
// getPowerGroupList
onMounted(() => {
fetchGroupData();
fetchPowerData();
});
</script>
<template>

@ -2363,7 +2363,7 @@ export const fetchWatchGroupObjects: Record<string, any> = (record: {
version: "5.3.0",
originX: "left",
originY: "top",
left: -27.8446,
left: -22.8446,
top: -54.1521,
width: 640,
height: 90.4,

@ -30,45 +30,11 @@ const stateClass = computed(() => [
"server-box-title-state",
{ "server-box-title-state_offline": props.serverData?.state === "离线" }
]);
const generateRandomTwoDecimal = () => {
// [0, 1)
const randomFraction = Math.random();
// 100
const multipliedValue = randomFraction * 100;
// 使 Math.round()
return Math.round(multipliedValue) / 100;
};
const progressData = ref([
{
label: "CPU",
percent: generateRandomTwoDecimal(),
strokeColor: "rgb(243,48,5)"
},
{
label: "内存",
percent: generateRandomTwoDecimal(),
strokeColor: "rgb(33,169,122)"
},
{
label: "存储",
percent: generateRandomTwoDecimal(),
strokeColor: "rgb(33,169,122)"
},
{
label: "GPU",
percent: generateRandomTwoDecimal(),
strokeColor: "rgb(250,173,20)"
}
]);
</script>
<template>
<div class="server-box">
<div class="server-box-title flex justify-start items-center">
<div class="flex items-center justify-start server-box-title">
<span class="server-box-title-icon" />
<span class="server-box-title-name">{{ serverData?.deviceSort }}</span>
<span :class="stateClass">{{ serverData?.state }}</span>
@ -80,7 +46,7 @@ const progressData = ref([
</div>
<div class="server-box-content-right">
<ul class="w-full">
<li v-for="(v, k) in progressData" :key="k">
<li v-for="(v, k) in serverData?.progressData" :key="k">
<div class="flex items-center rectProgress_box">
<span>
{{ v.label }}

@ -1,11 +1,11 @@
<script setup lang="ts">
import { getServerBoxList } from "@/api/list";
import { getServerBoxList, updateServerBoxList } from "@/api/list";
import error from "@/assets/dataScreen/modelList/error.png";
import loading from "@/assets/dataScreen/modelList/loading.png";
import { ElLoading } from "element-plus";
import "vue-waterfall-plugin-next/dist/style.css";
import InfiniteLoading from "v3-infinite-loading";
import { onMounted, reactive, ref, nextTick } from "vue";
import { onMounted, reactive, ref, nextTick, toRaw } from "vue";
import backTop from "@/assets/svg/back_top.svg?component";
import { Waterfall } from "vue-waterfall-plugin-next";
import ServerBox from "./components/ServerBox.vue";
@ -59,7 +59,15 @@ const page = ref(1);
const list = ref([]);
const pageSize = ref(13);
const loadingInstance = ref();
const timer = ref(null);
/**更新内容 */
async function handleUpdateContent() {
const res = await updateServerBoxList({
currServerList: toRaw(list.value)
});
console.log(res, "handleUpdateContent", toRaw(list.value));
list.value = res.data;
}
/** 加载更多 */
function handleLoadMore() {
loadingInstance.value = ElLoading.service({
@ -78,6 +86,12 @@ function handleLoadMore() {
nextTick(() => {
loadingInstance.value.close();
});
if (timer.value) {
clearInterval(timer.value);
}
timer.value = setInterval(() => {
handleUpdateContent();
}, 3000);
}, 1000);
});
}
@ -103,13 +117,13 @@ onMounted(() => {
<div class="banner_side" />
<div class="server-list-mid">
<div class="server-list-title ff1"><span>服务器运行状态</span></div>
<div class="server-list-box w-full">
<div class="w-full server-list-box">
<el-scrollbar height="744px" class="content">
<Waterfall :list="list" v-bind="options">
<template #item="{ item }">
<ServerBox :serverData="item" />
<!-- <div class="server-box">
<div class="server-box-title flex justify-start items-center">
<div class="flex items-center justify-start server-box-title">
<span class="server-box-title-icon" />
<span class="server-box-title-name">服务器</span>
<span class="server-box-title-state">{{ "在线" }}</span>

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-01-19 09:22:30
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-01-23 11:42:27
* @LastEditTime: 2024-03-04 14:27:02
* @FilePath: \General-AI-Platform-Web-Client\src\views\computePowerAllocation\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@ -32,7 +32,7 @@ const groupList = ref<Record<string, any>[]>([
const poolsData: ComputePowerPoolItem[] = [
{
name: "离岗监控",
name: "焊线颜色检测",
type: 1,
proportion: 34,
pretreatmentEfficiency: 20,
@ -40,7 +40,7 @@ const poolsData: ComputePowerPoolItem[] = [
bgColor: "linear-gradient(180deg, #015DE6 0%, #4881F6 100%)"
},
{
name: "玩手机监控",
name: "螺纹缺陷检测",
type: 2,
proportion: 46,
pretreatmentEfficiency: 15,

@ -4,7 +4,7 @@ import control from "@/assets/svg/device/control.svg?component";
import monitor1 from "@/assets/svg/device/monitor1.svg?component";
import monitor2 from "@/assets/svg/device/monitor2.svg?component";
import { AnimationPic } from "@/components/AnimationCard";
//
//
import controlEquipmentMalfunction from "@/assets/animate/device/controlEquipmentMalfunction.json";
import controlEquipmentOnline from "@/assets/animate/device/controlEquipmentOnline.json";
//
@ -46,7 +46,7 @@ const isEnabledClass = computed(() => [
]);
const deviceClassify = device => {
if (device?.deviceSort === "分析设备") {
if (device?.deviceSort === "精密仪器设备") {
if (device?.state === "在线") {
return controlEquipmentOnline;
} else {
@ -71,8 +71,8 @@ const generateRandomNumber = () => {
const generateRandomDate = () => {
// 2023111231
const startDate = new Date("2023-01-01");
const endDate = new Date("2023-12-31");
const startDate = new Date("2024-01-01");
const endDate = new Date("2024-03-04");
const randomTimestamp =
startDate.getTime() +
Math.random() * (endDate.getTime() - startDate.getTime());
@ -103,10 +103,10 @@ const generateRandomDate = () => {
<div class="device-content">
<div class="device-info">
<div>
设备代码<span>DEVICE{{ generateRandomNumber() }}</span>
设备代码<span> IVP04A_{{ generateRandomNumber() }}</span>
</div>
<div>
设备分类<span>FL{{ generateRandomNumber() }}</span>
设备分类<span>DEVICETYPE_{{ generateRandomNumber() }}</span>
</div>
<div>
是否启用

@ -121,8 +121,8 @@ onMounted(() => {
placeholder="设备分类"
clearable
>
<el-option label="分类1" value="监控1" />
<el-option label="分类2" value="分析设备" />
<el-option label="装配设备" value="装配设备" />
<el-option label="精密仪器设备" value="精密仪器设备" />
</el-select>
</el-form-item>
<el-form-item label="设备状态">

Loading…
Cancel
Save