From fddf53520ce596dcf5f4f5906596bb041a17d72b Mon Sep 17 00:00:00 2001 From: guoyixuan Date: Fri, 25 Jul 2025 15:10:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=B7=A5=E5=85=B7=E7=BB=86=E8=8A=82?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 84 +- css/common.css | 16 +- index.html | 4079 ++++++++++++++++++++++------------------- 3 files changed, 2233 insertions(+), 1946 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index ebb3d31..83a1619 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,23 +1,71 @@ { - // 通用配置 + // ====== 1. 编辑器通用设置 ====== "editor.fontSize": 14, // 字体大小 - "editor.wordWrap": "on", // 自动换行 - "editor.tabSize": 2, // 缩进2空格(Vue推荐) + "editor.lineHeight": 24, // 行高,让代码不那么紧凑 + "editor.tabSize": 2, // Tab 键的宽度为 2 个空格 + "editor.insertSpaces": true, // 敲 Tab 键时插入空格而不是制表符 + "editor.detectIndentation": false, // 关闭自动检测缩进,强制使用 tabSize + "editor.renderWhitespace": "none", // 不显示空白字符('all'/'boundary'/'none') + "editor.minimap.enabled": false, // 显示代码小地图 + "editor.wordWrap": "off", // 不自动换行,让 Prettier 处理 + "editor.cursorSmoothCaretAnimation": "on", // 光标动画更平滑 + "editor.smoothScrolling": true, // 滚动平滑 + + // ====== 2. 格式化设置 (Prettier) ====== + "editor.defaultFormatter": "esbenp.prettier-vscode", // 设置默认格式化程序为 Prettier "editor.formatOnSave": true, // 保存时自动格式化 - // Vue专用配置 - "[vue]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" // 使用Vetur格式化 + "editor.formatOnPaste": false, // 粘贴时是否格式化,通常设置为 false 避免干扰 + "editor.formatOnType": false, // 输入时是否格式化,通常设置为 false 避免干扰 + + // ====== 3. Prettier 插件的特定配置 ====== + // 这些配置会覆盖 .prettierrc 中的同名配置,如果项目有 .prettierrc,建议在 .prettierrc 中配置 + "prettier.printWidth": 100, // 单行代码的最大长度(超过会换行) + "prettier.tabWidth": 2, // 缩进宽度为 2 个空格 + "prettier.useTabs": false, // 不使用 Tab 字符缩进,使用空格 + "prettier.singleQuote": true, // 使用单引号代替双引号 + "prettier.semi": false, // 不在语句末尾添加分号 + "prettier.trailingComma": "es5", // 在多行对象、数组等末尾添加逗号(如在 ES5 中有效) + "prettier.bracketSpacing": true, // 在对象字面量的大括号之间添加空格 + "prettier.jsxBracketSameLine": false, // JSX 元素的右括号是否和属性在同一行 + "prettier.arrowParens": "avoid", // 箭头函数只有一个参数时省略括号 (e.g., x => x 而不是 (x) => x) + "prettier.endOfLine": "lf", // 统一行尾序列为 LF (Linux Line Feed) + "prettier.vueIndentScriptAndStyle": true, // Vue 文件中 - - - - - - - - - - - - - - + + + tool + + + + + + + + + + + + -
-
- -
-
新增监测点
-
编辑
- -
删除
-
+
+
+ +
+
新增监测点
+
编辑
+ +
删除
+
+
+
+
+ + +
+
+ + + +
+
+ 导入监测点 + 新增站点 +
+
+
+ +
+ + + +
+ +
+
+
+
+ + -
-
- - -
-
- - - -
-
- 导入监测点 - 新增站点 -
+
+ + + +
-
- -
- - - -
- -
+
+
+
+ +
+
+
+
+ +
+
+ +
+ +
+
+
+ + 事件: + + + + + + + + + + + + + + + + + 确定 + 重置 + + +
-
-
- - -
- - - - -
-
-
-
- -
+
+
+
+ 时间: + {{item.time}}
-
-
- -
-
- -
- -
-
-
- - 事件: - - - - - - - - - - - - - - - - - 确定 - 重置 - - - -
-
-
-
- 时间: - {{item.time}} -
-
- 放电类型: - {{allPdTypes.find(({value})=>value==item.pdType)?.label}} -
-
- - 最大值: - {{item.maxValue}} - - 脉冲数: - {{item.plusCount}} - -
-
-
-
-
+
+ 放电类型: + {{allPdTypes.find(({value})=>value==item.pdType)?.label}}
-
- - -
-
- -
-
站点告警配置
-
- 站点: - - - {{ item.stationName }} - - -
-
- - 清除告警时间段: - - - - 删除 - -
- - 导入告警 - -
-
-
路径配置
-
-
{{item.label}} :
-
- - 国网 - 南网 - - -
- 保存 - 初始化 - 重置 -

- 当前初始化进度:{{initTips}} -

-
-
+
+ + 最大值: + {{item.maxValue}} + + 脉冲数: + {{item.plusCount}} +
+
+
- - - - - - + + +
+
+ +
+
站点告警配置
+
+ 站点: + + + {{ item.stationName }} + + +
+
+ + 清除告警时间段: + + + + 删除 + +
+ + 导入告警 + +
+
+
路径配置
+
+
{{item.label}} :
+
+ + 国网 + 南网 + + +
+ 保存 + 初始化 + 重置 +

+ 当前初始化进度:{{initTips}} +

+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + - - - + + - - - - - - - - - + + + + + + + + - - - + + - - - + + - - - - - -
- + } else { + console.error('初始化配置请求失败,code:', code); + } + } catch (error) { + console.error('初始化目录时发生网络或服务器错误:', error); + } + }; + onMounted(() => { + initTreeData() + getAllConfigs() + progressTimer.value = setInterval(getInitPrgress, 2000); + document.addEventListener('click', handleClickOutside); + }) + onUnmounted(() => { + document.removeEventListener('click', handleClickOutside); + if (unref(progressTimer)) { + clearInterval(progressTimer.value); + progressTimer.value = null; + } + }); + return { + treeRef, + treeData, + fullTreeData, + treeMenuInfo, + treeMenu, + filterNode, + handleRightClick, + checkedKeys1, + searchValue, + search, + activeKey, + tabsArr, + onLoadData, + editNodeItem, + deleteNodeItem, + isImportMonitorModalShow, + onImportMonitor, + importMonitorModalloading, + siteModalloading, + addSite, + isSiteModalShow, + siteModalRef, + siteModalForm, + onSiteModalSubmit, + isAddTypeOfSiteModal, + isMonitorModalShow, + isAddTypeOfMonitorModal, + monitorModalLoading, + addMonitor, + monitorModalRef, + monitorModalForm, + onMonitorModalSubmit, + dateRange, + checkTree, + trendGraphData, + typeOfCheckable, + timeSelectArr, + columns, + dataSource, + pagination, + configLoading, + handleTableChange, + selectedKey, + cancelOps, + alarmFilters, + pdTypeOps, + deleteAlarmTimes, + deleteAlarmConfirm, + fetchAlarmGridData, + initAlarmGridData, + stationName1, + alarmCustomUpload, + alarmBeforeUpload, + defaultProps, + totalPrpds, + allPathCongfigs, + savePathConfig, + resetPathConfig, + initCatalogue, + isCurrentInit, + initTips, + trendGraphRefs, + allPdTypes, + trendGraphInfo, + prpdAndPrpsTimes, + eventListLoading, + getEventList, + eventList, + isTypeOfCountPrpd, + handleEventClick, + activeEventTime, + alarmRowClick, + defaultExpendKeys, + jumpToPRPD, + everntFilterVisible, + eventFilterForm, + onFilterEventList, + onResetEventList, + trendRef, + handleNodeContentClick, + importMonitorForm, + handleFileChange, + beforImportMonitor, + importMonitorRules, + importMonitorFormRef, + handleImportMonitorFileRemove, + monitorImportRef, + validatePlusCount + }; + }, + components: { + prpdAndPrpsComp, + eventCount, + historyTrendGraph + } + }) + .use(antd) + .use(ElementPlus, { + locale: ElementPlusLocaleZhCn // 使用中文语言包 + }) + .mount('#app'); + - \ No newline at end of file +