mirror of
https://gitee.com/pnoker/iot-dc3.git
synced 2026-09-19 02:04:37 +08:00
style: reformat package.json indentation and wrap long html/md lines
This commit is contained in:
+7
-7
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"tabWidth": 4,
|
||||
"printWidth": 180,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"endOfLine": "auto",
|
||||
"trailingComma": "none",
|
||||
"objectCurlySpacing": false
|
||||
"tabWidth": 4,
|
||||
"printWidth": 180,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"endOfLine": "auto",
|
||||
"trailingComma": "none",
|
||||
"objectCurlySpacing": false
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# 使用 ACME.SH 申请并安装 LET’S ENCRYPT SSL 证书
|
||||
|
||||
Let’s Encrypt 是一个免费的, 自动化的, 开放的证书颁发机构(CA), 为公众的利益而运行。 它是一项由 Internet Security Research Group(ISRG)提供的服务。
|
||||
Let’s Encrypt 是一个免费的, 自动化的, 开放的证书颁发机构(CA), 为公众的利益而运行。 它是一项由 Internet Security Research
|
||||
Group(ISRG)提供的服务。
|
||||
acme.sh 则是实现了 acme 协议, 可以从 letsencrypt 生成免费的证书。
|
||||
|
||||
## 安装 ACME.SH
|
||||
@@ -49,7 +50,8 @@ acme.sh --renew -d dc3.site --force
|
||||
|
||||
## 取消更新
|
||||
|
||||
有时候你可能需要移除特定域名的自动申请, 这时候可以使用下面的命令让 acme.sh 取消对特定域名的自动续期。当然已申请的证书仍然有效, 不会失效。
|
||||
有时候你可能需要移除特定域名的自动申请, 这时候可以使用下面的命令让 acme.sh 取消对特定域名的自动续期。当然已申请的证书仍然有效,
|
||||
不会失效。
|
||||
|
||||
```bash
|
||||
acme.sh --remove -d dc3.site
|
||||
|
||||
+3
-1
@@ -25,7 +25,9 @@
|
||||
<meta content="yes" name="apple-mobile-web-app-capable" />
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
|
||||
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0" name="viewport" />
|
||||
<meta content="IoT DC3, 一个基于Spring Cloud的开源的, 分布式的物联网(IOT)平台,用于快速开发物联网项目和管理物联设备,是一整套物联系统解决方案。" name="description" />
|
||||
<meta
|
||||
content="IoT DC3, 一个基于Spring Cloud的开源的, 分布式的物联网(IOT)平台,用于快速开发物联网项目和管理物联设备,是一整套物联系统解决方案。"
|
||||
name="description" />
|
||||
|
||||
<link href="/favicon.ico" rel="icon" />
|
||||
<link href="/css/animate/animate.min.css" rel="stylesheet" />
|
||||
|
||||
+77
-77
@@ -1,79 +1,79 @@
|
||||
{
|
||||
"name": "iot-dc3-web",
|
||||
"version": "2024.3.0",
|
||||
"private": true,
|
||||
"author": "pnoker",
|
||||
"description": "IoT DC3 平台前端页面",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"tauri": "tauri",
|
||||
"serve": "vite --host --mode dev",
|
||||
"test": "vite --host --mode test",
|
||||
"pre": "vite --host --mode pre",
|
||||
"pro": "vite --host --mode pro",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"check": "vue-tsc --build --force",
|
||||
"format": "prettier --write src/",
|
||||
"lint": "eslint . --ext .vue,.ts --fix --ignore-path .gitignore"
|
||||
},
|
||||
"dependencies": {
|
||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||
"@antv/g2": "^5.2.10",
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@tauri-apps/api": "^2.1.1",
|
||||
"@tauri-apps/plugin-shell": "^2.2.0",
|
||||
"axios": "^1.7.9",
|
||||
"clipboard": "^2.0.11",
|
||||
"core-js": "^3.39.0",
|
||||
"echarts": "^5.6.0",
|
||||
"element-plus": "^2.9.1",
|
||||
"highlight.js": "^11.11.1",
|
||||
"js-base64": "^3.7.7",
|
||||
"js-cookie": "^3.0.5",
|
||||
"js-md5": "^0.8.3",
|
||||
"json-bigint": "^1.0.0",
|
||||
"marked": "^15.0.4",
|
||||
"mitt": "^3.0.1",
|
||||
"moment": "^2.30.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "^2.3.0",
|
||||
"screenfull": "^6.0.2",
|
||||
"vue": "^3.5.13",
|
||||
"vue-router": "^4.5.0",
|
||||
"vuex": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "^2.1.0",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/json-bigint": "^1.0.4",
|
||||
"@types/node": "^22.10.2",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@typescript-eslint/eslint-plugin": "^8.18.2",
|
||||
"@typescript-eslint/parser": "^8.18.2",
|
||||
"@vitejs/plugin-legacy": "^6.0.0",
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"@vue/eslint-config-typescript": "^14.2.0",
|
||||
"dotenv": "^16.4.7",
|
||||
"eslint": "^9.17.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"eslint-plugin-vue": "^9.32.0",
|
||||
"minimist": "^1.2.8",
|
||||
"path": "^0.12.7",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier-eslint": "^16.3.0",
|
||||
"sass": "^1.83.0",
|
||||
"terser": "^5.37.0",
|
||||
"typescript": "~5.7.2",
|
||||
"unplugin-auto-import": "^0.19.0",
|
||||
"unplugin-vue-components": "^0.28.0",
|
||||
"vite": "^6.0.6",
|
||||
"vue-class-component": "^8.0.0-0",
|
||||
"vue-template-compiler": "^2.7.16",
|
||||
"vue-tsc": "^2.2.0"
|
||||
}
|
||||
"name": "iot-dc3-web",
|
||||
"version": "2024.3.0",
|
||||
"private": true,
|
||||
"author": "pnoker",
|
||||
"description": "IoT DC3 平台前端页面",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"tauri": "tauri",
|
||||
"serve": "vite --host --mode dev",
|
||||
"test": "vite --host --mode test",
|
||||
"pre": "vite --host --mode pre",
|
||||
"pro": "vite --host --mode pro",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"check": "vue-tsc --build --force",
|
||||
"format": "prettier --write src/",
|
||||
"lint": "eslint . --ext .vue,.ts --fix --ignore-path .gitignore"
|
||||
},
|
||||
"dependencies": {
|
||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||
"@antv/g2": "^5.2.10",
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@tauri-apps/api": "^2.1.1",
|
||||
"@tauri-apps/plugin-shell": "^2.2.0",
|
||||
"axios": "^1.7.9",
|
||||
"clipboard": "^2.0.11",
|
||||
"core-js": "^3.39.0",
|
||||
"echarts": "^5.6.0",
|
||||
"element-plus": "^2.9.1",
|
||||
"highlight.js": "^11.11.1",
|
||||
"js-base64": "^3.7.7",
|
||||
"js-cookie": "^3.0.5",
|
||||
"js-md5": "^0.8.3",
|
||||
"json-bigint": "^1.0.0",
|
||||
"marked": "^15.0.4",
|
||||
"mitt": "^3.0.1",
|
||||
"moment": "^2.30.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "^2.3.0",
|
||||
"screenfull": "^6.0.2",
|
||||
"vue": "^3.5.13",
|
||||
"vue-router": "^4.5.0",
|
||||
"vuex": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "^2.1.0",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/json-bigint": "^1.0.4",
|
||||
"@types/node": "^22.10.2",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@typescript-eslint/eslint-plugin": "^8.18.2",
|
||||
"@typescript-eslint/parser": "^8.18.2",
|
||||
"@vitejs/plugin-legacy": "^6.0.0",
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"@vue/eslint-config-typescript": "^14.2.0",
|
||||
"dotenv": "^16.4.7",
|
||||
"eslint": "^9.17.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"eslint-plugin-vue": "^9.32.0",
|
||||
"minimist": "^1.2.8",
|
||||
"path": "^0.12.7",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier-eslint": "^16.3.0",
|
||||
"sass": "^1.83.0",
|
||||
"terser": "^5.37.0",
|
||||
"typescript": "~5.7.2",
|
||||
"unplugin-auto-import": "^0.19.0",
|
||||
"unplugin-vue-components": "^0.28.0",
|
||||
"vite": "^6.0.6",
|
||||
"vue-class-component": "^8.0.0-0",
|
||||
"vue-template-compiler": "^2.7.16",
|
||||
"vue-tsc": "^2.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="white">
|
||||
<path opacity=".25" d="M16 0 A16 16 0 0 0 16 32 A16 16 0 0 0 16 0 M16 4 A12 12 0 0 1 16 28 A12 12 0 0 1 16 4"/>
|
||||
<path d="M16 0 A16 16 0 0 1 32 16 L28 16 A12 12 0 0 0 16 4z">
|
||||
<animateTransform attributeName="transform" type="rotate" from="0 16 16" to="360 16 16" dur="0.8s" repeatCount="indefinite"/>
|
||||
<animateTransform attributeName="transform" type="rotate" from="0 16 16" to="360 16 16" dur="0.8s"
|
||||
repeatCount="indefinite"/>
|
||||
</path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -73,24 +73,30 @@
|
||||
fill: url(#_GradualChange_14);
|
||||
}
|
||||
</style>
|
||||
<linearGradient gradientUnits="userSpaceOnUse" y2="995.69" x2="714.93" y1="1290.92" x1="714.93" id="_GradualChange_10">
|
||||
<linearGradient gradientUnits="userSpaceOnUse" y2="995.69" x2="714.93" y1="1290.92" x1="714.93"
|
||||
id="_GradualChange_10">
|
||||
<stop stop-opacity=".5" stop-color="#f7fbff" offset="0"></stop>
|
||||
<stop stop-color="#ecf5ff" offset="1"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient gradientUnits="userSpaceOnUse" y2="66.57" x2="1007.27" y1="66.57" x1="1227.25" id="_GradualChange_15">
|
||||
<linearGradient gradientUnits="userSpaceOnUse" y2="66.57" x2="1007.27" y1="66.57" x1="1227.25"
|
||||
id="_GradualChange_15">
|
||||
<stop stop-color="#f7fbff" offset="0"></stop>
|
||||
<stop stop-color="#ecf5ff" offset="1"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient xlink:href="#_GradualChange_15" y2="283.66" x2="191.03" y1="283.66" x1="344.06" id="_GradualChange_15-2"></linearGradient>
|
||||
<linearGradient gradientUnits="userSpaceOnUse" y2="457.32" x2="694.67" y1="784.79" x1="694.67" id="_GradualChange_56">
|
||||
<linearGradient xlink:href="#_GradualChange_15" y2="283.66" x2="191.03" y1="283.66" x1="344.06"
|
||||
id="_GradualChange_15-2"></linearGradient>
|
||||
<linearGradient gradientUnits="userSpaceOnUse" y2="457.32" x2="694.67" y1="784.79" x1="694.67"
|
||||
id="_GradualChange_56">
|
||||
<stop stop-color="#84bbf1" offset="0"></stop>
|
||||
<stop stop-color="#4095e6" offset="1"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient gradientUnits="userSpaceOnUse" y2="619.41" x2="694.67" y1="833.6" x1="694.67" id="_GradualChange_14">
|
||||
<linearGradient gradientUnits="userSpaceOnUse" y2="619.41" x2="694.67" y1="833.6" x1="694.67"
|
||||
id="_GradualChange_14">
|
||||
<stop stop-color="#dcedff" offset="0"></stop>
|
||||
<stop stop-color="#4095e6" offset="1"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient gradientUnits="userSpaceOnUse" y2="758.35" x2="700.46" y1="1042" x1="700.46" id="_GradualChange_64">
|
||||
<linearGradient gradientUnits="userSpaceOnUse" y2="758.35" x2="700.46" y1="1042" x1="700.46"
|
||||
id="_GradualChange_64">
|
||||
<stop stop-opacity="0" stop-color="#eefaff" offset="0"></stop>
|
||||
<stop stop-color="#eefaff" offset="1"></stop>
|
||||
</linearGradient>
|
||||
@@ -122,15 +128,18 @@
|
||||
class="cls-6"></path>
|
||||
<path d="m353.12,1169.86c0,13,161.58,23.63,361.81,23.63s361.81-10.64,361.81-23.63-161.61-23.65-361.81-23.65c-200.23-.09-361.81,10.04-361.81,23.63"
|
||||
class="cls-11"></path>
|
||||
<path d="m926.22,688.88c0,127.88-463.11,127.88-463.11,0s103.67-231.56,231.56-231.56,231.56,103.67,231.56,231.56Z" class="cls-10"></path>
|
||||
<path d="m926.22,688.88c0,127.88-463.11,127.88-463.11,0s103.67-231.56,231.56-231.56,231.56,103.67,231.56,231.56Z"
|
||||
class="cls-10"></path>
|
||||
<ellipse ry="107.09" rx="411.01" cy="726.51" cx="694.67" class="cls-12"></ellipse>
|
||||
<ellipse ry="39.95" rx="237.34" cy="734.61" cx="694.67" class="cls-4"></ellipse>
|
||||
<polygon points="932.01 1042 468.9 1042 526.79 758.35 868.33 758.35 932.01 1042" class="cls-5"></polygon>
|
||||
<g>
|
||||
<path d="m517.69,975.35l53.75-117.32h37.19l-52.3,115.89h78.33v31.67h-116.97v-30.23Zm70.43-45.58h32.87v102.69h-32.87v-102.69Z" class="cls-2"></path>
|
||||
<path d="m517.69,975.35l53.75-117.32h37.19l-52.3,115.89h78.33v31.67h-116.97v-30.23Zm70.43-45.58h32.87v102.69h-32.87v-102.69Z"
|
||||
class="cls-2"></path>
|
||||
<path d="m661.58,899.43c-8.88-8.76-13.31-20.89-13.31-36.41v-79.29c0-15.67,4.45-27.85,13.38-36.53,8.91-8.67,21.84-13.01,38.8-13.01s30,4.32,38.87,12.95c8.88,8.64,13.32,20.83,13.32,36.59v79.29c0,15.68-4.47,27.85-13.38,36.53-8.92,8.68-21.86,13.02-38.81,13.02s-30-4.38-38.87-13.14Zm53.51-25.31c3.11-4.52,4.67-11.02,4.67-19.49v-62.5c0-8.48-1.56-14.98-4.67-19.5-3.12-4.52-8-6.78-14.64-6.78s-11.52,2.26-14.63,6.78c-3.12,4.52-4.68,11.02-4.68,19.5v62.5c0,8.48,1.56,14.98,4.68,19.49,3.11,4.52,7.99,6.78,14.63,6.78s11.52-2.26,14.64-6.78Z"
|
||||
class="cls-2"></path>
|
||||
<path d="m769.86,940.61l53.74-117.32h37.19l-52.3,115.89h78.34v31.67h-116.97v-30.23Zm70.42-45.58h32.87v102.69h-32.87v-102.69Z" class="cls-2"></path>
|
||||
<path d="m769.86,940.61l53.74-117.32h37.19l-52.3,115.89h78.34v31.67h-116.97v-30.23Zm70.42-45.58h32.87v102.69h-32.87v-102.69Z"
|
||||
class="cls-2"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.4 KiB |
@@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1733743714442" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14051" width="512" height="512"
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1733743714442" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="14051" width="512" height="512"
|
||||
>
|
||||
<path d="M784 0a112 112 0 0 1 31.424 219.52L783.392 419.68a112 112 0 1 1-167.12 134.672l-123.04-6.848a80 80 0 1 1-98.064-122.528l10.944-65.744a80 80 0 1 1 94.72 15.808l-10.96 65.744c3.2 3.36 6.112 6.976 8.704 10.848l123.04 6.832a112.288 112.288 0 0 1 66.976-53.984l32-200.128a112.48 112.48 0 0 1-37.808-44.32H341.216a112.288 112.288 0 0 1-70.032 59.584L213.12 577.648a144.08 144.08 0 0 1 73.84 108.96L725.392 784A159.936 159.936 0 0 1 864 704c88.368 0 160 71.632 160 160s-71.632 160-160 160c-83.728 0-152.432-64.32-159.424-146.24l-438.448-97.44a144 144 0 1 1-147.776-218.048l58.064-358.064A112 112 0 1 1 341.216 64h341.568A112 112 0 0 1 784 0z"
|
||||
fill="#1296db" p-id="14052"></path>
|
||||
|
||||
|
Before Width: | Height: | Size: 986 B After Width: | Height: | Size: 999 B |
@@ -28,44 +28,44 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
})
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.title-card {
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
.title-card {
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.title-card__header {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
padding-top: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.el-card {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.el-card__header {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.el-card__body {
|
||||
padding: 10px 5px 0px 5px;
|
||||
}
|
||||
|
||||
.el-tabs__nav {
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
.title-card__header {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
padding-top: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.el-card {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.el-card__header {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.el-card__body {
|
||||
padding: 10px 5px 0px 5px;
|
||||
}
|
||||
|
||||
.el-tabs__nav {
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
<template v-for="menusItem in menus">
|
||||
<el-sub-menu v-if="menusItem.children" :key="menusItem.path" :index="menusItem.path">
|
||||
<template #title>{{ (menusItem.meta as any).title }}</template>
|
||||
<el-menu-item v-for="item in menusItem.children" :key="item.path" :index="item.path">{{ (menusItem.meta as any).title }}</el-menu-item>
|
||||
<el-menu-item v-for="item in menusItem.children" :key="item.path" :index="item.path">
|
||||
{{ (menusItem.meta as any).title }}
|
||||
</el-menu-item>
|
||||
</el-sub-menu>
|
||||
<el-menu-item v-else :key="menusItem.path" :index="menusItem.path">
|
||||
<el-icon>
|
||||
|
||||
@@ -20,7 +20,6 @@ import CommonConstant from '@/config/constant/common'
|
||||
import { failMessage, warnMessage } from '@/utils/NotificationUtil'
|
||||
import { getStorage } from '@/utils/StorageUtil'
|
||||
import { isNull } from '@/utils/utils'
|
||||
import { encode } from 'js-base64'
|
||||
import JSONBigInt from 'json-bigint'
|
||||
|
||||
const JSONBigIntStr = JSONBigInt({ storeAsString: true })
|
||||
@@ -36,8 +35,8 @@ const request: AxiosInstance = axios.create({
|
||||
} catch (err) {
|
||||
return { data }
|
||||
}
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
request.interceptors.request.use(
|
||||
|
||||
@@ -17,5 +17,5 @@
|
||||
export default {
|
||||
X_AUTH_TENANT: 'X-Auth-Tenant',
|
||||
X_AUTH_LOGIN: 'X-Auth-Login',
|
||||
X_AUTH_TOKEN: 'X-Auth-Token',
|
||||
X_AUTH_TOKEN: 'X-Auth-Token'
|
||||
}
|
||||
|
||||
@@ -23,12 +23,12 @@ export default (app: any) => {
|
||||
|
||||
console.log(
|
||||
'.___ ___________ ________ _________ ________\n' +
|
||||
'| | ___\\__ ___/ \\______ \\ \\_ ___ \\\\_____ \\\n' +
|
||||
'| |/ _ \\| | | | \\/ \\ \\/ _(__ <\n' +
|
||||
'| ( <_> ) | | ` \\ \\____/ \\\n' +
|
||||
'|___|\\____/|____| /_______ /\\______ /______ /\n' +
|
||||
' \\/ \\/ \\/\n' +
|
||||
'https://doc.dc3.site\n' +
|
||||
'IoT DC3 Platform V2024.3.0'
|
||||
'| | ___\\__ ___/ \\______ \\ \\_ ___ \\\\_____ \\\n' +
|
||||
'| |/ _ \\| | | | \\/ \\ \\/ _(__ <\n' +
|
||||
'| ( <_> ) | | ` \\ \\____/ \\\n' +
|
||||
'|___|\\____/|____| /_______ /\\______ /______ /\n' +
|
||||
' \\/ \\/ \\/\n' +
|
||||
'https://doc.dc3.site\n' +
|
||||
'IoT DC3 Platform V2024.3.0'
|
||||
)
|
||||
}
|
||||
|
||||
+4
-4
@@ -336,16 +336,16 @@ export const listenFullscreen = (callback) => {
|
||||
callback()
|
||||
}
|
||||
|
||||
document.addEventListener('fullscreenchange', function() {
|
||||
document.addEventListener('fullscreenchange', function () {
|
||||
listen()
|
||||
})
|
||||
document.addEventListener('mozfullscreenchange', function() {
|
||||
document.addEventListener('mozfullscreenchange', function () {
|
||||
listen()
|
||||
})
|
||||
document.addEventListener('webkitfullscreenchange', function() {
|
||||
document.addEventListener('webkitfullscreenchange', function () {
|
||||
listen()
|
||||
})
|
||||
document.addEventListener('msfullscreenchange', function() {
|
||||
document.addEventListener('msfullscreenchange', function () {
|
||||
listen()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -67,11 +67,7 @@
|
||||
<point ref="pointViewRef" :device-id="reactiveData.id" :embedded="'device'"></point>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="设备数据" name="pointValue">
|
||||
<point-value
|
||||
ref="pointValueViewRef"
|
||||
:device-id="reactiveData.id"
|
||||
:embedded="'device'"
|
||||
></point-value>
|
||||
<point-value ref="pointValueViewRef" :device-id="reactiveData.id" :embedded="'device'"></point-value>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</base-card>
|
||||
@@ -79,125 +75,125 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, reactive, ref } from 'vue'
|
||||
import { CollectionTag, Edit, List, Management, Promotion, Sunset } from '@element-plus/icons-vue'
|
||||
import { computed, onMounted, reactive, ref } from 'vue'
|
||||
import { CollectionTag, Edit, List, Management, Promotion, Sunset } from '@element-plus/icons-vue'
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
import router from '@/config/router'
|
||||
import { useRoute } from 'vue-router'
|
||||
import router from '@/config/router'
|
||||
|
||||
import { getDriverById } from '@/api/driver'
|
||||
import { getProfileByDeviceId, getProfileByIds } from '@/api/profile'
|
||||
import { getDeviceById } from '@/api/device'
|
||||
import { getDriverById } from '@/api/driver'
|
||||
import { getProfileByDeviceId, getProfileByIds } from '@/api/profile'
|
||||
import { getDeviceById } from '@/api/device'
|
||||
|
||||
import baseCard from '@/components/card/base/BaseCard.vue'
|
||||
import detailCard from '@/components/card/detail/DetailCard.vue'
|
||||
import profile from '@/views/profile/Profile.vue'
|
||||
import point from '@/views/point/Point.vue'
|
||||
import pointValue from '@/views/point/value/PointValue.vue'
|
||||
import { timestamp } from '@/utils/CommonUtil'
|
||||
import baseCard from '@/components/card/base/BaseCard.vue'
|
||||
import detailCard from '@/components/card/detail/DetailCard.vue'
|
||||
import profile from '@/views/profile/Profile.vue'
|
||||
import point from '@/views/point/Point.vue'
|
||||
import pointValue from '@/views/point/value/PointValue.vue'
|
||||
import { timestamp } from '@/utils/CommonUtil'
|
||||
|
||||
const route = useRoute()
|
||||
const route = useRoute()
|
||||
|
||||
const profileViewRef: any = ref<InstanceType<typeof profile>>()
|
||||
const pointViewRef: any = ref<InstanceType<typeof point>>()
|
||||
const pointValueViewRef: any = ref<InstanceType<typeof pointValue>>()
|
||||
const profileViewRef: any = ref<InstanceType<typeof profile>>()
|
||||
const pointViewRef: any = ref<InstanceType<typeof point>>()
|
||||
const pointValueViewRef: any = ref<InstanceType<typeof pointValue>>()
|
||||
|
||||
// 定义响应式数据
|
||||
const reactiveData = reactive({
|
||||
id: route.query.id as string,
|
||||
active: route.query.active,
|
||||
profileLoading: true,
|
||||
pointLoading: true,
|
||||
pointValueLoading: true,
|
||||
data: {} as any,
|
||||
driver: {} as any,
|
||||
profileTable: {},
|
||||
pointTable: {},
|
||||
deviceTable: {},
|
||||
unitTable: {},
|
||||
listProfileData: [] as any[],
|
||||
listPointData: [] as any[],
|
||||
listPointValueData: [] as any[],
|
||||
listPointValueHistoryData: {},
|
||||
pointValueDetailData: {},
|
||||
})
|
||||
// 定义响应式数据
|
||||
const reactiveData = reactive({
|
||||
id: route.query.id as string,
|
||||
active: route.query.active,
|
||||
profileLoading: true,
|
||||
pointLoading: true,
|
||||
pointValueLoading: true,
|
||||
data: {} as any,
|
||||
driver: {} as any,
|
||||
profileTable: {},
|
||||
pointTable: {},
|
||||
deviceTable: {},
|
||||
unitTable: {},
|
||||
listProfileData: [] as any[],
|
||||
listPointData: [] as any[],
|
||||
listPointValueData: [] as any[],
|
||||
listPointValueHistoryData: {},
|
||||
pointValueDetailData: {}
|
||||
})
|
||||
|
||||
const profileLength = computed(() => {
|
||||
return profileViewRef.value?.reactiveData.page.total || 0
|
||||
})
|
||||
const profileLength = computed(() => {
|
||||
return profileViewRef.value?.reactiveData.page.total || 0
|
||||
})
|
||||
|
||||
const pointLength = computed(() => {
|
||||
return pointViewRef.value?.reactiveData.page.total || 0
|
||||
})
|
||||
const pointLength = computed(() => {
|
||||
return pointViewRef.value?.reactiveData.page.total || 0
|
||||
})
|
||||
|
||||
const device = () => {
|
||||
getDeviceById(reactiveData.id)
|
||||
.then((res) => {
|
||||
reactiveData.data = res.data
|
||||
reactiveData.deviceTable[reactiveData.data.id] = reactiveData.data.deviceName
|
||||
const device = () => {
|
||||
getDeviceById(reactiveData.id)
|
||||
.then((res) => {
|
||||
reactiveData.data = res.data
|
||||
reactiveData.deviceTable[reactiveData.data.id] = reactiveData.data.deviceName
|
||||
|
||||
getDriverById(reactiveData.data.driverId)
|
||||
.then((res) => {
|
||||
reactiveData.driver = res.data
|
||||
})
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
}
|
||||
|
||||
const profiles = () => {
|
||||
getProfileByDeviceId(reactiveData.id)
|
||||
.then((res) => {
|
||||
reactiveData.listProfileData = res.data
|
||||
|
||||
// profile
|
||||
const profileIds = Array.from(new Set(reactiveData.listProfileData.map((pointValue) => pointValue.id)))
|
||||
getProfileByIds(profileIds)
|
||||
.then((res) => {
|
||||
reactiveData.profileTable = res.data
|
||||
})
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
.finally(() => {
|
||||
reactiveData.profileLoading = false
|
||||
})
|
||||
}
|
||||
|
||||
const changeActive = (tab) => {
|
||||
const query = route.query
|
||||
router.push({ query: { ...query, active: tab.props.name } }).catch(() => {
|
||||
getDriverById(reactiveData.data.driverId)
|
||||
.then((res) => {
|
||||
reactiveData.driver = res.data
|
||||
})
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
}
|
||||
|
||||
switch (tab.props.name) {
|
||||
case 'profile':
|
||||
break
|
||||
case 'point':
|
||||
pointViewRef.value?.refresh()
|
||||
break
|
||||
case 'pointValue':
|
||||
pointValueViewRef.value?.refresh()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
const profiles = () => {
|
||||
getProfileByDeviceId(reactiveData.id)
|
||||
.then((res) => {
|
||||
reactiveData.listProfileData = res.data
|
||||
|
||||
onMounted(() => {
|
||||
device()
|
||||
profiles()
|
||||
// profile
|
||||
const profileIds = Array.from(new Set(reactiveData.listProfileData.map((pointValue) => pointValue.id)))
|
||||
getProfileByIds(profileIds)
|
||||
.then((res) => {
|
||||
reactiveData.profileTable = res.data
|
||||
})
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
.finally(() => {
|
||||
reactiveData.profileLoading = false
|
||||
})
|
||||
}
|
||||
|
||||
const changeActive = (tab) => {
|
||||
const query = route.query
|
||||
router.push({ query: { ...query, active: tab.props.name } }).catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
|
||||
switch (tab.props.name) {
|
||||
case 'profile':
|
||||
break
|
||||
case 'point':
|
||||
pointViewRef.value?.refresh()
|
||||
break
|
||||
case 'pointValue':
|
||||
pointValueViewRef.value?.refresh()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
device()
|
||||
profiles()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use '@/components/card/styles/things-card.scss';
|
||||
@use '@/components/card/styles/things-card.scss';
|
||||
</style>
|
||||
|
||||
@@ -191,8 +191,8 @@
|
||||
</el-form>
|
||||
<el-form-item class="edit-form-button">
|
||||
<el-button :icon="Back" plain type="success" @click="pre">上一步</el-button>
|
||||
<el-button :disabled="!hasPointFormData" :icon="Edit" type="primary" @click="pointUpdate"> 修改</el-button>
|
||||
<el-button :disabled="!hasPointFormData" :icon="RefreshLeft" @click="pointInfoReset"> 恢复</el-button>
|
||||
<el-button :disabled="!hasPointFormData" :icon="Edit" type="primary" @click="pointUpdate"> 修改 </el-button>
|
||||
<el-button :disabled="!hasPointFormData" :icon="RefreshLeft" @click="pointInfoReset"> 恢复 </el-button>
|
||||
<el-button :icon="Check" plain type="warning" @click="next">下一步</el-button>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
|
||||
@@ -369,15 +369,15 @@ export default defineComponent({
|
||||
|
||||
driverInfo.id
|
||||
? updateDriverInfo(driverInfo)
|
||||
.then(() => loadFormData(driverInfo))
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
.then(() => loadFormData(driverInfo))
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
: addDriverInfo(driverInfo)
|
||||
.then(() => loadFormData(driverInfo))
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
.then(() => loadFormData(driverInfo))
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
|
||||
function loadFormData(res: { id: any; driverAttributeId?: any; deviceId?: string; configValue: any }) {
|
||||
driverFormData[attribute.attributeName] = {
|
||||
@@ -406,15 +406,15 @@ export default defineComponent({
|
||||
|
||||
pointInfo.id
|
||||
? updatePointInfo(pointInfo)
|
||||
.then(() => loadFormData(pointInfo))
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
.then(() => loadFormData(pointInfo))
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
: addPointInfo(pointInfo)
|
||||
.then(() => loadFormData(pointInfo))
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
.then(() => loadFormData(pointInfo))
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
|
||||
function loadFormData(res: { id: any; pointAttributeId?: any; deviceId?: string; pointId?: any; configValue: any }) {
|
||||
reactiveData.pointInfoData.forEach((pointInfo) => {
|
||||
|
||||
@@ -38,54 +38,54 @@
|
||||
<ul class="things-body-content-item-column-2">
|
||||
<li class="nowrap-item">
|
||||
<span
|
||||
><el-icon><List /></el-icon> 所属模板: </span
|
||||
><el-icon><List /></el-icon> 所属模板: </span
|
||||
>{{ profile.profileName }}
|
||||
</li>
|
||||
<li class="nowrap-item">
|
||||
<span
|
||||
><el-icon><Location /></el-icon> 比例系数: </span
|
||||
><el-icon><Location /></el-icon> 比例系数: </span
|
||||
>{{ data.multiple }}
|
||||
</li>
|
||||
<li class="nowrap-item">
|
||||
<span
|
||||
><el-icon><Location /></el-icon> 数据精度: </span
|
||||
><el-icon><Location /></el-icon> 数据精度: </span
|
||||
>{{ data.valueDecimal }}
|
||||
</li>
|
||||
<li class="nowrap-item">
|
||||
<span
|
||||
><el-icon><Location /></el-icon> 单位: </span
|
||||
><el-icon><Location /></el-icon> 单位: </span
|
||||
>{{ data.unit }}
|
||||
</li>
|
||||
<li class="nowrap-item">
|
||||
<span
|
||||
><el-icon><Edit /></el-icon> 修改日期: </span
|
||||
><el-icon><Edit /></el-icon> 修改日期: </span
|
||||
>{{ timestamp(data.operateTime) }}
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="things-body-content-item-column-2">
|
||||
<li class="nowrap-item">
|
||||
<span
|
||||
><el-icon><Location /></el-icon> 数据类型: </span
|
||||
><el-icon><Location /></el-icon> 数据类型: </span
|
||||
>{{ pointTypeFlag }}
|
||||
</li>
|
||||
<li class="nowrap-item">
|
||||
<span
|
||||
><el-icon><Location /></el-icon> 基础值: </span
|
||||
><el-icon><Location /></el-icon> 基础值: </span
|
||||
>{{ data.baseValue }}
|
||||
</li>
|
||||
<li class="nowrap-item">
|
||||
<span
|
||||
><el-icon><Location /></el-icon> 处理值: </span
|
||||
><el-icon><Location /></el-icon> 处理值: </span
|
||||
>Y = {{ data.multiple }}X + {{ data.baseValue }}, 保留{{ data.valueDecimal }}位小数
|
||||
</li>
|
||||
<li class="nowrap-item">
|
||||
<span
|
||||
><el-icon><Location /></el-icon> 读写标识: </span
|
||||
><el-icon><Location /></el-icon> 读写标识: </span
|
||||
>{{ rwFlag }}
|
||||
</li>
|
||||
<li class="nowrap-item">
|
||||
<span
|
||||
><el-icon><Sunset /></el-icon> 创建日期: </span
|
||||
><el-icon><Sunset /></el-icon> 创建日期: </span
|
||||
>{{ timestamp(data.createTime) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -124,9 +124,14 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
const edit = () => {
|
||||
router.push({ name: 'pointEdit', query: { id: props.data.id, profileId: props.data.profileId, active: '0' } }).catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
router
|
||||
.push({
|
||||
name: 'pointEdit',
|
||||
query: { id: props.data.id, profileId: props.data.profileId, active: '0' }
|
||||
})
|
||||
.catch(() => {
|
||||
// nothing to do
|
||||
})
|
||||
}
|
||||
|
||||
const detail = () => {
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
</el-form>
|
||||
<div class="tool-card__footer">
|
||||
<div class="tool-card-footer-button">
|
||||
<el-button v-if="embedded == '' || embedded == 'edit'" :icon="Plus" type="success" @click="showAdd">新增</el-button>
|
||||
<el-button v-if="embedded == '' || embedded == 'edit'" :icon="Plus" type="success" @click="showAdd"> 新增 </el-button>
|
||||
</div>
|
||||
<div class="tool-card-footer-page">
|
||||
<el-pagination
|
||||
|
||||
Reference in New Issue
Block a user