From fb87ae4de955e0fb59a6f00812018e846f30e84e Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 8 Oct 2026 22:41:19 +0800 Subject: [PATCH] feat: local Bootstrap Vue ECharts dashboards and universal genealogy write scope --- RELEASE-v0.1.43.md | 28 ++ VERSION | 2 +- family_permissions.py | 43 +++ frontend/README.md | 6 +- frontend/THIRD-PARTY-LICENSES.txt | 276 ++++++++++++++++++ frontend/package.json | 3 +- frontend/pnpm-lock.yaml | 23 ++ frontend/src/compat/load.js | 2 +- frontend/src/components/HomeExplorer.vue | 5 + frontend/src/components/HomeInsights.vue | 44 +-- frontend/src/components/LocalChart.vue | 50 ++++ frontend/src/components/NetworkDiagram.vue | 37 +-- frontend/src/components/RuntimeOverlays.vue | 6 +- frontend/src/components/ScopeInsights.vue | 14 + frontend/src/components/Workspace.vue | 5 +- frontend/src/composables/charts-runtime.js | 7 + frontend/src/composables/charts.mjs | 32 ++ frontend/src/dashboard.css | 54 ++++ frontend/src/main.js | 1 + genealogy.py | 88 +++++- identity.py | 4 +- test_app.py | 69 +++-- test_charts.js | 44 +++ test_family_permissions.py | 153 ++++++++++ test_households.py | 4 +- test_ui_logic.js | 10 +- web/family-events.js | 8 +- web/family.js | 44 ++- web/ui/assets/charts-runtime-Q8qiYCVP.js | 16 + ...{index-B2d9n-y0.css => index-BOIfNXlB.css} | 2 +- web/ui/assets/index-CSPlB4s9.js | 1 - web/ui/assets/index-OX4XEEVF.js | 5 + web/ui/index.html | 4 +- 33 files changed, 980 insertions(+), 110 deletions(-) create mode 100644 RELEASE-v0.1.43.md create mode 100644 family_permissions.py create mode 100644 frontend/src/components/LocalChart.vue create mode 100644 frontend/src/components/ScopeInsights.vue create mode 100644 frontend/src/composables/charts-runtime.js create mode 100644 frontend/src/composables/charts.mjs create mode 100644 frontend/src/dashboard.css create mode 100644 test_charts.js create mode 100644 test_family_permissions.py create mode 100644 web/ui/assets/charts-runtime-Q8qiYCVP.js rename web/ui/assets/{index-B2d9n-y0.css => index-BOIfNXlB.css} (99%) delete mode 100644 web/ui/assets/index-CSPlB4s9.js create mode 100644 web/ui/assets/index-OX4XEEVF.js diff --git a/RELEASE-v0.1.43.md b/RELEASE-v0.1.43.md new file mode 100644 index 0000000..46582cb --- /dev/null +++ b/RELEASE-v0.1.43.md @@ -0,0 +1,28 @@ +# v0.1.43 · 本地图表与五代维护边界 + +## 界面与图表 + +- Vue 页面统一使用本地 Bootstrap 5.3.8;新增本地 Apache ECharts 6.1.0,生产页面不依赖远程 CDN、字体或地图资源。 +- 首页展示已授权场所、设备及区域数量,以及空间分布和各场所设备柱图。场所总览展示设备类型和网络接入方式;不推算没有数据依据的在线率或历史趋势。 +- 平台总拓扑仅展示已授权家庭、办公与工厂;场所内部网络图根据已登记上级关系生成,支持平移、缩放、重置及点击进入设备档案。详情列表保留键盘操作入口。 +- 图表按需加载、离开页面释放,相同数据刷新不重新布局。手机首页默认收起详细统计,可展开;表单、卡片和导航沿用 Bootstrap 响应式布局。 +- 视频与家谱等既有业务控制器保留兼容层,避免重建播放节点;本版没有宣称全部业务已改为 Vue 状态管理。 + +## 族谱维护权限 + +- 所有角色(包括超级管理员)均以账号关联的本人为准,只能维护本人及上下各五代以内的已连接亲属资料。 +- 例如第 32 代可维护第 27 至第 37 代,第 26、38 代及第 5 代不能修改;原有查看权限不变,不截断远代人物。 +- 人物、亲属关系、关联人物记事、归档和历史恢复统一经后端范围检查。切换查看参照人物不改变维护范围。 +- 本人关联设置后固定;不允许通过解除关联、更换本人、断开再重接世系或改变已确认代际位置扩大维护范围。代际冲突时暂停维护。 +- 没有关联本人的账号先关联已有本人人物;本人尚未录入时,可建立自己的档案并绑定。其他新增人物须关联可维护亲属,人物与关系原子保存,超出第六代时不会留下孤立人物。 +- 平台账号与各家庭成员结构的全面重构不在本次发布内。 + +## 验证 + +- 后端 190 项测试、前端 154 项测试通过。 +- Edge 本机测试:第五代边界编辑保存、远代只读、变更参照人物不扩权、ECharts 渲染及节点进入设备、390 像素手机显示。 +- 本地开发数据与生产资料分离,未替用户指定或更换真实人物关联。 + +## 发布 + +部署前创建一致性数据库备份;原子切换版本,仅重启 Web 服务,保留视频服务。无数据库结构迁移。 diff --git a/VERSION b/VERSION index 4a3e97d..278cbc8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.42 +0.1.43 diff --git a/family_permissions.py b/family_permissions.py new file mode 100644 index 0000000..26af719 --- /dev/null +++ b/family_permissions.py @@ -0,0 +1,43 @@ +"""Generation-based write boundaries. Viewing and role grants are separate.""" +from collections import deque + +LIMIT = 5 + + +def generations(people, links, self_id): + ids = {p['id'] for p in people} + if self_id not in ids: + return {}, False + graph = {key: [] for key in ids} + for edge in links: + a, b = edge.get('fromId'), edge.get('toId') + if not edge.get('active') or a not in ids or b not in ids: + continue + delta = 1 if edge.get('kind') == 'parent' else 0 + if edge.get('kind') not in ('parent', 'spouse'): + continue + graph[a].append((b, delta)) + graph[b].append((a, -delta)) + levels, pending, conflict = {self_id: 0}, deque([self_id]), False + while pending: + current = pending.popleft() + for other, delta in graph[current]: + level = levels[current] + delta + if other in levels: + conflict |= levels[other] != level + else: + levels[other] = level + pending.append(other) + return levels, conflict + + +def within(levels, person_id): + return person_id in levels and abs(levels[person_id]) <= LIMIT + + +def targets(kind, item): + if kind == 'person': + return [item['id']] + if kind == 'link': + return [item['fromId'], item['toId']] + return item.get('personIds', []) diff --git a/frontend/README.md b/frontend/README.md index 9f74479..d625fa9 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,6 +1,6 @@ # 赵府 Vue 前端 -Vue 3 + Vite + Bootstrap 5。Python 服务提供 API 和本地静态资源;生产主机无需安装 Node。 +Vue 3 + Vite + Bootstrap 5 + Apache ECharts。Python 服务提供 API 和本地静态资源;生产主机无需安装 Node。 ## 构建 @@ -19,12 +19,16 @@ pnpm --dir frontend build - `HomeExplorer`:账号独立的卡片布局、分页、排序及场所总拓扑。 - `DeviceCollection`、`NetworkMap`:同一设备目录的卡片和拓扑视图。 - `NetworkStatus`:授权设备的实时网络检查与后台入口,清理定时器并丢弃过期响应。 +- `LocalChart`、`HomeInsights`、`ScopeInsights`:本地 ECharts 场所及设备统计;按需加载,关闭页面释放实例,相同数据刷新不重排。手机首页默认收起详细统计。 +- `NetworkDiagram`:固定坐标网络图,支持平移、缩放和点击设备;下方详情提供键盘及读屏操作。平台总拓扑与设备拓扑只使用当前账号已授权数据,不虚构在线率或历史曲线。 - `Workspace`、`RuntimeOverlays`:现有业务页面与表单模板。 - `composables/bridge.js`、`web/vue-bridge.js`:Vue 与现有业务控制器的状态边界。 - `compat/scripts.json`:旧业务控制器依赖顺序,按顺序加载。视频播放器、家谱、记事等复杂交互暂时保留原控制器;尚未全部迁为 Vue 状态管理。 Vue 管理家庭卡片、设备列表、网络拓扑的 DOM;旧控制器只发布数据,不再覆盖这些容器。表单及播放器的兼容容器由原控制器管理,Vue 不重建其内部节点,避免轮询时重建视频。`web/index.html` 已移除,模板以 Vue 组件为准。 +ECharts 使用 npm 包按需打包饼图、柱图、关系图和 Canvas 渲染器。生产 `/ui/assets/` 内包含全部框架、样式和图表代码;没有远程 CDN、远程字体或地图服务依赖。外部媒体与设备后台链接仍按业务配置访问。原有播放器和家谱关系图保留现有控制器。许可证及 NOTICE 收录于 `THIRD-PARTY-LICENSES.txt`。 + ## 网络状态 `GET /api/devices/network?source=device|camera|recorder&id=...` 只允许当前家庭管理员与超级管理员检查本归属下的已登记设备。端口探测与 Tailscale 节点状态分别显示,30 秒缓存、并发限制;用户输入不能指定任意检查目标。只连接 TCP 端口,不修改设备、不发送登录密码。 diff --git a/frontend/THIRD-PARTY-LICENSES.txt b/frontend/THIRD-PARTY-LICENSES.txt index 2c771c7..cc0ffe6 100644 --- a/frontend/THIRD-PARTY-LICENSES.txt +++ b/frontend/THIRD-PARTY-LICENSES.txt @@ -44,3 +44,279 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +echarts + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + + + +======================================================================== +Apache ECharts Subcomponents: + +The Apache ECharts project contains subcomponents with separate copyright +notices and license terms. Your use of the source code for these +subcomponents is also subject to the terms and conditions of the following +licenses. + +BSD 3-Clause (d3.js): +The following files embed [d3.js](https://github.com/d3/d3) BSD 3-Clause: + `/src/chart/treemap/treemapLayout.ts`, + `/src/chart/tree/layoutHelper.ts`, + `/src/chart/graph/forceHelper.ts`, + `/src/util/number.ts` +See `/licenses/LICENSE-d3` for details of the license. + +Apache ECharts +Copyright 2017-2026 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (https://www.apache.org/). + +zrender +BSD 3-Clause License + +Copyright (c) 2017, Baidu Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +tslib +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index f6e3784..08e2cd2 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "zhao-steward-ui", "private": true, - "version": "0.1.42", + "version": "0.1.43", "type": "module", "scripts": { "build": "vite build", @@ -9,6 +9,7 @@ }, "dependencies": { "bootstrap": "5.3.8", + "echarts": "6.1.0", "vue": "^3.5.0" }, "devDependencies": { diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index ddb269e..5298e36 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: bootstrap: specifier: 5.3.8 version: 5.3.8(@popperjs/core@2.11.8) + echarts: + specifier: 6.1.0 + version: 6.1.0 vue: specifier: ^3.5.0 version: 3.5.43 @@ -396,6 +399,9 @@ packages: csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + echarts@6.1.0: + resolution: {integrity: sha512-q0yaFPggC9FUdsWH4blavRWFmxdrIodbkoKNAjJudAI6CA9gNPxHtV2RcZNEepZVlk4yvBYkOkbk6HIVpIyHZA==} + entities@7.0.1: resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} engines: {node: '>=0.12'} @@ -454,6 +460,9 @@ packages: resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} engines: {node: '>=12.0.0'} + tslib@2.3.0: + resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==} + vite@7.3.6: resolution: {integrity: sha512-4XP60spRGjSZFf1qYH+dJIkK2znL3zQfl9KkOV9MkkRR/3Dls0dxaBsQPTloEc5BLXWPL9vsOxopxyKoMmDueg==} engines: {node: ^20.19.0 || >=22.12.0} @@ -502,6 +511,9 @@ packages: typescript: optional: true + zrender@6.1.0: + resolution: {integrity: sha512-oEGMDB6pOP2S6OwRR4PdVv610zrjnA3Bh+JnSG12fYJlBKjtNAoEb5fSUoCOOINlH96I2fU38/A2UpRKs67xYQ==} + snapshots: '@babel/helper-string-parser@7.29.7': {} @@ -747,6 +759,11 @@ snapshots: csstype@3.2.3: {} + echarts@6.1.0: + dependencies: + tslib: 2.3.0 + zrender: 6.1.0 + entities@7.0.1: {} esbuild@0.28.2: @@ -842,6 +859,8 @@ snapshots: fdir: 6.5.0(picomatch@4.0.7) picomatch: 4.0.7 + tslib@2.3.0: {} + vite@7.3.6: dependencies: esbuild: 0.28.2 @@ -860,3 +879,7 @@ snapshots: '@vue/runtime-dom': 3.5.43 '@vue/server-renderer': 3.5.43 '@vue/shared': 3.5.43 + + zrender@6.1.0: + dependencies: + tslib: 2.3.0 diff --git a/frontend/src/compat/load.js b/frontend/src/compat/load.js index 4575c35..5acf4e1 100644 --- a/frontend/src/compat/load.js +++ b/frontend/src/compat/load.js @@ -15,6 +15,6 @@ export function enhance(root){ export async function loadControllers(){ enhance(document.getElementById('app')) new MutationObserver(records=>{for(const record of records)for(const node of record.addedNodes)enhance(node)}).observe(document.getElementById('app'),{childList:true,subtree:true}) - for(const path of [...scripts,'/vue-bridge.js'])await new Promise((resolve,reject)=>{const script=document.createElement('script');script.src=path+'?ui=0.1.42';script.onload=resolve;script.onerror=()=>reject(new Error('Could not load '+path));document.head.append(script)}) + for(const path of [...scripts,'/vue-bridge.js'])await new Promise((resolve,reject)=>{const script=document.createElement('script');script.src=path+'?ui=0.1.43';script.onload=resolve;script.onerror=()=>reject(new Error('Could not load '+path));document.head.append(script)}) await window.ZhaoVue.boot() } diff --git a/frontend/src/components/HomeExplorer.vue b/frontend/src/components/HomeExplorer.vue index 7cb934d..09cf9e2 100644 --- a/frontend/src/components/HomeExplorer.vue +++ b/frontend/src/components/HomeExplorer.vue @@ -3,6 +3,8 @@ import { computed, ref, watch } from "vue"; import { snapshot, bridge, accessLabel } from "../composables/bridge.js"; import AppIcon from "./AppIcon.vue"; import HomeInsights from "./HomeInsights.vue"; +import LocalChart from "./LocalChart.vue"; +import { platformChart } from "../composables/charts.mjs"; const draft = ref({ revision: 0, columns: 2, @@ -369,6 +371,9 @@ async function enter(h, network = false) {

平台与场所的管理关系;进入场所查看内部设备及网络。

+
+ +
网络与连接

保存后自动更新拓扑。网络信息用于设备档案;摄像机实际取流地址在“配置镜头”内设置。选择人员不改变账号访问权限。

驱动在当前版本提供路径模板。录像机历史录像检索、回放及通道自动导入,需要型号确认后接入,当前尚未实现。

负责人安排与交接

选择本家庭 / 场所的成员,分别指定主要和备用负责人。主要负责人即一家之主;选择普通成员时,需明确确认授予其本家庭管理权限。备用负责人可稍后安排。

交接后原负责人仍保留本归属的管理员权限。系统不会依据未登录或家谱去世日期自动转移权限;交接记录可追溯。

家庭 / 场所档案

照片仅向有权进入该家庭或场所的账号开放。

创建后进入该归属,建立管理员,再自行划分区域和登记设备。

-

账号档案

允许查看摄像头的空间

普通成员只访问本归属内已授权的区域。默认仅授权所选区域;勾选“包含下级区域”后同时包含其所有后代。管理员可管理本归属全部区域。

+

账号档案

允许查看摄像头的空间

普通成员只访问本归属内已授权的区域。默认仅授权所选区域;勾选“包含下级区域”后同时包含其所有后代。管理员可管理本归属全部区域。

-

家谱人物

出生日期日期不详可留空
籍贯(祖籍)
出生地

籍贯与出生地可不同;选择中国、世界或自定义地域,不详的层级可留空。

-

连接人物关系

每条亲子关系连接一位父母与一位子女。录入另一位父母时,再建立一条关系。

+

家谱人物

新人物与已有亲属的关系

人物与关系一起保存,无需为亲属开设登录账号;超出五代时不会写入。

出生日期日期不详可留空
籍贯(祖籍)
出生地

籍贯与出生地可不同;选择中国、世界或自定义地域,不详的层级可留空。

+

连接人物关系

每条亲子关系连接一位父母与一位子女。双方需在本人上下五代内;不能通过移动或断开已确认世系来改变维护范围。

写一则家族记事

事情发生的日期 *
关联人物(可多选)

未选择人物时记为全家记事。每位关联人物的档案都可以追溯到这条记事。

正式发布后,有家谱查看权限的账号即可在时间线看到;草稿只对有编辑权限的人可见。

家事 · 家声

修改记录

人物、关系与记事每次保存都会留存版本。仅有家谱编辑权限的账号可查阅和恢复。

diff --git a/frontend/src/components/ScopeInsights.vue b/frontend/src/components/ScopeInsights.vue new file mode 100644 index 0000000..0d303c5 --- /dev/null +++ b/frontend/src/components/ScopeInsights.vue @@ -0,0 +1,14 @@ + + diff --git a/frontend/src/components/Workspace.vue b/frontend/src/components/Workspace.vue index 680dd81..0f4ef2f 100644 --- a/frontend/src/components/Workspace.vue +++ b/frontend/src/components/Workspace.vue @@ -3,6 +3,7 @@ import HomeExplorer from './HomeExplorer.vue' import DeviceCollection from './DeviceCollection.vue' import NetworkMap from './NetworkMap.vue' import DeviceNetworkPanel from './DeviceNetworkPanel.vue' +import ScopeInsights from './ScopeInsights.vue'