weaver-work-cli 0.1.38 → 0.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/chunks/{archive-PDV724YK.js → archive-ENZYBBME.js} +556 -66
- package/dist/chunks/{archive-oa-4XE4MNXQ.js → archive-oa-YWLEC5V4.js} +2 -2
- package/dist/chunks/{asset-PDL2QE2N.js → asset-OOV6DWPA.js} +2 -2
- package/dist/chunks/asset-idle-RE632MY5.js +670 -0
- package/dist/chunks/{attachment-content-MDDGOE5E.js → attachment-content-RWN2FCLL.js} +3 -3
- package/dist/chunks/{blog-UYR3EUXW.js → blog-PEPOJAL7.js} +2 -2
- package/dist/chunks/{caizhilian-LG2X5NMF.js → caizhilian-WYIQDVPJ.js} +2 -2
- package/dist/chunks/{calendar-FG4BAZHE.js → calendar-CIARBAOX.js} +2 -2
- package/dist/chunks/{chunk-6FTTSA45.js → chunk-36DIFZAH.js} +2 -2
- package/dist/chunks/{chunk-UJJD4QWF.js → chunk-BJGXMFGD.js} +2 -2
- package/dist/chunks/{chunk-ELYDWBZJ.js → chunk-CQHGNCK2.js} +1 -1
- package/dist/chunks/{chunk-XJY7G4DD.js → chunk-EINRJHQ3.js} +3 -3
- package/dist/chunks/{chunk-UZZBA6PV.js → chunk-EZGFHJFW.js} +28 -6
- package/dist/chunks/{chunk-NI6GIPIM.js → chunk-F2EQXUEE.js} +438 -387
- package/dist/chunks/{chunk-VRYHGG6O.js → chunk-GVPJZXJ2.js} +3 -3
- package/dist/chunks/{chunk-IZUDA353.js → chunk-HJYVHXUQ.js} +1 -1
- package/dist/chunks/{chunk-KKRL3REV.js → chunk-I2HB737U.js} +2 -2
- package/dist/chunks/{chunk-NR6RKXPA.js → chunk-K3RUEEOL.js} +4 -2
- package/dist/chunks/{chunk-6LTFIFLM.js → chunk-KTCB5R5H.js} +2 -2
- package/dist/chunks/{chunk-J7USS3ED.js → chunk-L4N7B7ZD.js} +4 -4
- package/dist/chunks/{chunk-CORFRD7Q.js → chunk-MUQUHKPG.js} +2 -2
- package/dist/chunks/{chunk-DMV2TOMH.js → chunk-NLK2RZKG.js} +46 -46
- package/dist/chunks/{chunk-JSMFPO43.js → chunk-P2DAISYW.js} +1 -1
- package/dist/chunks/{chunk-GGJFMNJM.js → chunk-T7JDJJ7H.js} +3 -3
- package/dist/chunks/{chunk-OJQUJZQF.js → chunk-XXJOSZTQ.js} +2 -0
- package/dist/chunks/{chunk-Z32KWY6G.js → chunk-YS5DPN4T.js} +1 -1
- package/dist/chunks/{chunk-EG6ZU444.js → chunk-ZUX3P6BQ.js} +10 -5
- package/dist/chunks/{chunk-FUWVHMVV.js → chunk-ZXRNHZTE.js} +2 -2
- package/dist/chunks/{conflict-BQZEQ4SP.js → conflict-DRMDOL56.js} +2 -2
- package/dist/chunks/{contract-XIRAFTEV.js → contract-73MERZWN.js} +2 -2
- package/dist/chunks/{cowork-BLG62BL2.js → cowork-HNGBPD7A.js} +2 -2
- package/dist/chunks/{ebuilder-form-NUKG5QW4.js → ebuilder-form-OY6DVNRK.js} +3 -3
- package/dist/chunks/{ehr-2STW5ILH.js → ehr-RAQNEQO7.js} +2 -2
- package/dist/chunks/{esb-UUDQUNKY.js → esb-6XV7C7YV.js} +4 -4
- package/dist/chunks/{fna-6RCY4NU5.js → fna-XTSRB7G7.js} +2 -2
- package/dist/chunks/{host-RHM3NPXV.js → host-3F5UM5GN.js} +3 -3
- package/dist/chunks/{host-EJZFROU3.js → host-A7J6GDUP.js} +3 -3
- package/dist/chunks/{host-FWDOSRH5.js → host-VGPVP7YF.js} +3 -3
- package/dist/chunks/{host-7RXEDMAH.js → host-YAQAPYNP.js} +3 -3
- package/dist/chunks/{host-UFF33TWJ.js → host-YMBXWFWX.js} +3 -3
- package/dist/chunks/{hrm-PKJ6ELSH.js → hrm-TLHKC545.js} +3 -3
- package/dist/chunks/{im-YJAXS7CO.js → im-YOUCFMUK.js} +3 -3
- package/dist/chunks/{invoice-HWVSXGX6.js → invoice-WNBS2B4C.js} +3 -3
- package/dist/chunks/{jiuchuanhui-L7VKILZB.js → jiuchuanhui-XABWS5RN.js} +2 -2
- package/dist/chunks/{lazy-dispatch-NMYEIHRH.js → lazy-dispatch-NLZ5UQQI.js} +5 -5
- package/dist/chunks/{mail-B42RRU7G.js → mail-LRYMBFNL.js} +2 -2
- package/dist/chunks/{meeting-CFYVBJSS.js → meeting-ESXL6MFI.js} +10 -10
- package/dist/chunks/{okr-GCLF6V7W.js → okr-EOV65SSF.js} +2 -2
- package/dist/chunks/{plan-ZVL7GBRI.js → plan-YFPVKW6Y.js} +2 -2
- package/dist/chunks/{project-4YWAAE2K.js → project-MDVZUYQW.js} +2 -2
- package/dist/chunks/{registry-EP4VTHZS.js → registry-QCLZEDAP.js} +8 -8
- package/dist/chunks/{registry-FRJ6H7BT.js → registry-VT5Y2HLA.js} +4 -4
- package/dist/chunks/{registry-SG2PGVCF.js → registry-YX4CSEMD.js} +3 -3
- package/dist/chunks/{room-recommend-R3JVUUAC.js → room-recommend-L3MWH4JW.js} +4 -4
- package/dist/chunks/{schedule-NIJBTYDO.js → schedule-UASAVDVD.js} +4 -4
- package/dist/chunks/{workflow-BB24DFBY.js → workflow-KDGIUCNW.js} +9 -6
- package/dist/core/output.js +16 -6
- package/dist/index.js +33 -28
- package/dist/internal/e10/auth/messages.js +1 -0
- package/dist/internal/e10/auth-recovery.js +13 -6
- package/dist/internal/e10/context.js +16 -3
- package/dist/internal/e10/request-runtime.js +3 -1
- package/dist/shortcuts/archive/host.js +2 -0
- package/dist/shortcuts/archive/manifest.js +1 -1
- package/dist/shortcuts/archive/operations/borrow-list.js +13 -1
- package/dist/shortcuts/archive/operations/flow-url.js +1 -1
- package/dist/shortcuts/archive/operations/prelib.js +472 -0
- package/dist/shortcuts/archive/operations/registry.js +2 -0
- package/dist/shortcuts/archive/operations/upload.js +1 -1
- package/dist/shortcuts/asset-idle/errors.js +44 -0
- package/dist/shortcuts/asset-idle/host.js +161 -0
- package/dist/shortcuts/asset-idle/index.js +114 -0
- package/dist/shortcuts/asset-idle/manifest.js +159 -0
- package/dist/shortcuts/asset-idle/operations/idle.js +47 -0
- package/dist/shortcuts/asset-idle/operations/registry.js +33 -0
- package/dist/shortcuts/asset-idle/operations/shared.js +142 -0
- package/dist/shortcuts/asset-idle/operations/types.js +9 -0
- package/dist/shortcuts/asset-idle/operations.js +15 -0
- package/dist/shortcuts/index.js +5 -0
- package/dist/shortcuts/workflow/host.js +3 -0
- package/dist/shortcuts/workflow/index.js +1 -1
- package/dist/shortcuts/workflow/operations/form.js +46 -171
- package/dist/shortcuts/workflow/operations/todoSmartConvert/aigroupRules.js +77 -26
- package/dist/shortcuts/workflow/operations/todoSmartConvert/aigroupStore.js +6 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/summaryCache.js +59 -117
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailCache.js +44 -7
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailFetcher.js +37 -29
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +20 -6
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.detail.js +22 -18
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.groupSummary.js +34 -10
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +4 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +9 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.summary.js +110 -20
- package/docs/_catalog.md +3 -0
- package/docs/asset-idle.md +45 -0
- package/docs/e10-auth.md +1 -1
- package/docs/todo-smart-convert/subgroup-rules.md +1 -1
- package/package.json +1 -1
- package/scripts/package-skill.mjs +2 -0
- package/skill-template/business-info.json +14 -1
- package/skill-template/domains/asset-idle.md +13 -0
- package/skill-template/domains/wenshuding.md +3 -0
- package/skills/weaver-e10-archive-oa/SKILL.md +1 -0
- package/skills/weaver-e10-archive-oa/references/my-borrow.md +49 -0
- package/skills/weaver-e10-asset-idle/SKILL.md +73 -0
- package/skills/weaver-e10-asset-idle/references/idle-list.md +62 -0
- package/skills/weaver-e10-asset-idle/references/idle-stats-and-charts.md +65 -0
- package/skills/weaver-e10-asset-idle/references/source-manifest.json +193 -0
- package/skills/weaver-e10-asset-idle/references/widget-style.md +205 -0
- package/skills/weaver-e10-caizhilian/SKILL.md +29 -11
- package/skills/weaver-e10-caizhilian/references/auth-and-install.md +12 -0
- package/skills/weaver-e10-caizhilian/references/files.md +1 -1
- package/skills/weaver-e10-caizhilian/references/setting-encrypt.md +1 -1
- package/skills/weaver-e10-caizhilian/references/source-manifest.json +45 -45
- package/skills/weaver-e10-cowork/SKILL.md +2 -0
- package/skills/weaver-e10-jucailin/SKILL.md +2 -0
- package/skills/weaver-e10-jucailin/references/recruit-read.md +2 -0
- package/skills/weaver-e10-jucailin/references/recruit-write.md +1 -1
- package/skills/weaver-e10-mail/SKILL.md +3 -0
- package/skills/weaver-e10-shared/SKILL.md +5 -5
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +3 -3
- package/skills/weaver-e10-wenshuding/SKILL.md +29 -6
- package/skills/weaver-e10-wenshuding/references/archive-borrow-list.md +14 -0
- package/skills/weaver-e10-wenshuding/references/archive-download.md +2 -0
- package/skills/weaver-e10-wenshuding/references/archive-flow.md +1 -1
- package/skills/weaver-e10-wenshuding/references/archive-prelib-arrange.md +76 -0
- package/skills/weaver-e10-wenshuding/references/archive-prelib-list.md +107 -0
- package/skills/weaver-e10-wenshuding/references/archive-prelib-open.md +59 -0
- package/skills/weaver-e10-wenshuding/references/archive-upload.md +4 -1
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +108 -65
- package/skills/weaver-e10-workflow/SKILL.md +5 -2
- package/skills/weaver-e10-workflow/aigroup/default.json +154 -19
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +59 -27
- package/skills/weaver-e10-workflow/tools/todo-serve.cjs +113 -25
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +292 -42
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: weaver-e10-asset-idle
|
|
3
|
+
display_name: 泛微E10闲置资产统计
|
|
4
|
+
display_name_en: Weaver E10 Idle Asset Statistics
|
|
5
|
+
description: "泛微E10资管家闲置资产判定结果查询与统计:触发「自用-skill获取闲置资产」动作流分页获取服务端已判定的闲置资产,聚合处置建议、类型与闲置时长统计并出三张图,通过 weaver-work-cli asset-idle 命令执行。"
|
|
6
|
+
description_zh: "泛微E10资管家闲置资产:分页获取服务端已判定的闲置资产结果集,聚合处置建议(待调拨/待调剂/待评估)、资产类型与闲置时长统计,并按固定样式输出三张图与系统页面地址,通过 weaver-work-cli asset-idle 命令执行。"
|
|
7
|
+
description_en: "Query server-judged idle assets from Weaver E10 asset management via the weaver-work-cli asset-idle command, aggregate disposal suggestions, asset types and idle-duration buckets, and render three fixed-style charts."
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
author: 泛微网络科技股份有限公司
|
|
10
|
+
agent_created: true
|
|
11
|
+
requires:
|
|
12
|
+
bins: ["weaver-work-cli"]
|
|
13
|
+
cliHelp: "weaver-work-cli asset-idle --help"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# 泛微E10闲置资产统计
|
|
17
|
+
|
|
18
|
+
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若共享规则不存在、CLI 未安装或读取失败,说明本技能的必需依赖缺失,必须调用宿主提供的提问/确认弹框,向用户说明必须补齐 `weaver-work-cli` 与共享 skill `weaver-e10-shared`(不补齐本技能无法执行)及补齐计划,并把下面两条待执行命令原样完整展示在确认信息中;Agent 不能在未确认时自行安装。用户明确确认后,Agent 必须直接代为按顺序执行且每条仅执行一次,不得要求或引导用户手动执行:① 缺 CLI 时执行 `npm install -g weaver-work-cli`;② 再执行 `weaver-work-cli skills install shared --target-dir <SKILLS_ROOT>` 装回共享 skill,`<SKILLS_ROOT>` 取本 SKILL.md 所在目录的上一级绝对目录(即与本技能同级的 skills 根目录),不要省略 `--target-dir`——省略会装进默认目录,导致本技能依然读不到共享规则。命令均成功后重新读取共享规则;仍读不到就停止并把结果报告用户,不得凭猜测继续。**
|
|
19
|
+
|
|
20
|
+
**`--is-connector` 判据**:用户明确使用连接器、或上下文要求用连接器完成任务 → 传 `true`;本次任务或上下文直接选择单独技能 → 不传;用户没有明确说明时,按**正在运行的这份 Skill 是哪一级**定——**用户级(条目标 `(user)`)不传,连接器级(标 `(connector)`)传**(同名 Skill 只会运行用户级那一份)。传 `true` 时不要再写 `--profile` / `--base-url`。完整规则见 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md)。
|
|
21
|
+
|
|
22
|
+
本技能覆盖**闲置资产判定结果的查询、聚合统计与可视化**:闲置判定由服务端动作流完成,CLI 只拉取结果与聚合,不做二次判定。接口原始调用(curl / 拼请求头)不在本技能范围,见「不在范围」。
|
|
23
|
+
|
|
24
|
+
## 命令入口
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
weaver-work-cli asset-idle --help
|
|
28
|
+
weaver-work-cli asset-idle schema
|
|
29
|
+
weaver-work-cli --json asset-idle run <operation> --input-json '<json>'
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`schema` 是可用能力的唯一事实来源。禁止把源资料中的接口路径当成本技能可直接调用的地址,也禁止把未出现在 `schema` 中的能力当作可用 operation。
|
|
33
|
+
|
|
34
|
+
## 高优先级语义
|
|
35
|
+
|
|
36
|
+
- 「闲置资产」「闲置统计」「待调剂/待调拨/待评估」「闲置时长」「资管家闲置」→ 本技能
|
|
37
|
+
- 判定口径全部来自服务端:`xzsz`(闲置时长/天)、`pdyj`(判定依据,原样展示)、`zxd`(置信度 0.8/0.85/0.9/0.95)、`czjy`(处置建议编码:0=待调拨、1=待调剂、2=待评估)直接使用,**不重算、不补算、不改写**
|
|
38
|
+
- `xzsz` 或 `czjy` 缺失 → 标「无法判断」,排除出对应统计,不猜测
|
|
39
|
+
- 不使用「内部调拨/内部调剂/报废评估」旧称,不计算剩余年限,不反推 `idle_date`/`stockindate`/`use_term`
|
|
40
|
+
- `esbFlowId` 必须由调用方传入;按名称解析动作流 ID 是禁用能力(`asset-idle.flow.resolve`),不要猜 ID
|
|
41
|
+
|
|
42
|
+
## 命令表
|
|
43
|
+
|
|
44
|
+
| 用户意图 | CLI operation | Reference |
|
|
45
|
+
| --- | --- | --- |
|
|
46
|
+
| 拉取闲置资产判定结果明细(自动翻页合并) | `asset-idle.idle.list` | [`references/idle-list.md`](references/idle-list.md) |
|
|
47
|
+
| 出统计三张图(数据统计/类型统计/闲置时长统计)+ 系统页面地址 | `asset-idle.idle.stats` | [`references/idle-stats-and-charts.md`](references/idle-stats-and-charts.md) |
|
|
48
|
+
| 图表尺寸、字号、色值、文案结构 | (渲染规范,不调 CLI) | [`references/widget-style.md`](references/widget-style.md) |
|
|
49
|
+
|
|
50
|
+
## 处理链(统计出图必须按此顺序)
|
|
51
|
+
|
|
52
|
+
1. **确认 esbFlowId**:用户没给动作流 ID 时向用户索取(或按用户确认在旧版 e10-cli 用 `actionflow application-list` 按 name 精确匹配「自用-skill获取闲置资产」、moudle=ebuilder 取 id;匹配不到或多条同名即停止并告知用户,不得沿用旧 ID 或猜测)。
|
|
53
|
+
2. **取数**:`asset-idle.idle.stats` 一次拿到 total、czjyCounts、typeCounts、agingBuckets(CLI 已自动翻页合并)。要明细时再跑 `asset-idle.idle.list`。
|
|
54
|
+
3. **出图**:先加载图表设计规范(widget_guidelines,chart + diagram 模块,只加载不写文字),再按 [`references/widget-style.md`](references/widget-style.md) 依次输出三张图:① 数据统计(HTML 网格卡)② 类型统计(Top10 + 其他横向条形图)③ 闲置时长统计(5 档柱状图,0 档不显示)。
|
|
55
|
+
4. **页面地址**:写在图③ widget 内部最后一行,格式 `闲置资产详情:{url}`;三张图之前、图与图之间不得输出任何正文文字。
|
|
56
|
+
|
|
57
|
+
## 执行原则
|
|
58
|
+
|
|
59
|
+
- 最小必要查询:默认只要统计就跑 `idle.stats`,不要先 `idle.list` 再自己数
|
|
60
|
+
- 大结果摘要:`idle.list` 可能返回上千条,回复用户时给总数与分组摘要,不粘贴全量 JSON;不落盘、不生成 html、不调用 present_files
|
|
61
|
+
- 错误语义驱动:按 JSON envelope 的 `error.type/subtype` 处置(见 reference 失败处理),不盲目重试
|
|
62
|
+
- `truncated=true` 时结果不是全集:先增大 `maxPages` 重查,不要用截断数据出图
|
|
63
|
+
|
|
64
|
+
## 写操作失败决策树
|
|
65
|
+
|
|
66
|
+
本模块两个 operation 均为只读(`risk: read`),没有高风险写链。认证/会话类失败按 `weaver-e10-shared` 的「认证错误只报告状态」规则处理;其余失败处置见各 reference 的「失败处理」。
|
|
67
|
+
|
|
68
|
+
## 不在范围
|
|
69
|
+
|
|
70
|
+
- 禁止绕过 CLI 直接 curl / fetch / 浏览器自动化调用 E10 接口
|
|
71
|
+
- 按名称解析动作流 ID(`asset-idle.flow.resolve`,见 schema 的 `withheldOperations`)
|
|
72
|
+
- 基于日期的判定、阈值反推、剩余年限计算(服务端判定为唯一口径,见 schema 的 `disabledCapabilities`)
|
|
73
|
+
- 闲置资产的台账管理(入库/领用/归还/维保)→ 用 `weaver-e10-ziguanjia`(`weaver-work-cli asset`)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# 拉取闲置资产判定结果
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
- 用户要闲置资产明细、要逐条看判定依据(pdyj)、置信度(zxd)
|
|
6
|
+
- 统计出图前需要确认数据规模,或要核对某类资产的条目
|
|
7
|
+
- 统计请优先用 `asset-idle.idle.stats`(一次拿到全部分组),本 operation 用于明细
|
|
8
|
+
|
|
9
|
+
## 输入要点
|
|
10
|
+
|
|
11
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| esbFlowId | string(1-32 位数字) | 是 | 「自用-skill获取闲置资产」动作流 ID。按名称解析是禁用能力(`asset-idle.flow.resolve`),必须由用户或调用方提供 |
|
|
14
|
+
| maxPages | integer 1-100 | 否(默认 20) | 单次最多翻页数。每页 1000 条为服务端固定值;hasMore=false 才是全集 |
|
|
15
|
+
|
|
16
|
+
请求体由 CLI 组装(esbFlowId + moduleSource=ebuilder + customParams.mainTable.curPage),认证请求头由 `weaver-work-cli` 统一托管,见 `weaver-e10-shared` 的「请求头契约」。
|
|
17
|
+
|
|
18
|
+
## 命令
|
|
19
|
+
|
|
20
|
+
Windows PowerShell:
|
|
21
|
+
|
|
22
|
+
```powershell
|
|
23
|
+
weaver-work-cli --json asset-idle run asset-idle.idle.list --input-json '{"esbFlowId":"1330576130980388964"}'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
macOS/Linux(bash/zsh):
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
weaver-work-cli --json asset-idle run asset-idle.idle.list --input-json '{"esbFlowId":"1330576130980388964"}'
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
上面 JSON 中的动作流 ID 是源资料实测样例,实际以用户提供的为准,不要照抄。控制翻页上限:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
weaver-work-cli --json asset-idle run asset-idle.idle.list --input-json '{"esbFlowId":"<用户提供的动作流ID>","maxPages":50}'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 输出处理
|
|
39
|
+
|
|
40
|
+
成功 envelope 的 `data`:
|
|
41
|
+
|
|
42
|
+
- `items`:各页 idleAssets 合并后的条目数组,字段为 `zclx`(资产类型)、`xzsz`(闲置时长/天,字符串数字)、`pdyj`(判定依据,原样展示)、`zxd`(置信度)、`czjy`(处置建议编码 0/1/2)、`xzdj`(闲置等级编码)、`zcmc`(资产标识,当前是资产记录 ID)、`unique_key` / `id`(记录主键)
|
|
43
|
+
- `total`:合并后总条数,即服务端判定的闲置资产全集(统计分母)
|
|
44
|
+
- `pages` / `hasMore` / `truncated`:翻页状态
|
|
45
|
+
|
|
46
|
+
回复用户时给摘要(总数、czjy 分组、类型 Top 几),不要粘贴全量 JSON;不落盘、不生成 html 文件。
|
|
47
|
+
|
|
48
|
+
## 注意
|
|
49
|
+
|
|
50
|
+
- 返回条数即服务端判定的闲置资产全集;`truncated=true` 时不是全集,先增大 `maxPages` 重查
|
|
51
|
+
- 判定结论直接使用(xzsz / pdyj / zxd / czjy),不做二次判定、不重算、不补算、不改写
|
|
52
|
+
- 字段缺失(如 xzsz 为空)标「无法判断」,不臆造、不反推日期补齐
|
|
53
|
+
|
|
54
|
+
## 失败处理
|
|
55
|
+
|
|
56
|
+
| error.type / subtype | 含义 | 处置 |
|
|
57
|
+
| --- | --- | --- |
|
|
58
|
+
| authentication / session_expired | 未登录或会话失效 | 按 `weaver-e10-shared` 规则反馈;CLI 底层已自动恢复过一次,仍失败即停止 |
|
|
59
|
+
| api / actionflow_failed | 动作流执行未成功(resultCode 非 200) | 看 error.details.resultCode / resultMsg,向用户反馈服务端原因;retryable=false 不自动重试 |
|
|
60
|
+
| network / protocol | 返回结构异常(缺 mainTable / 非 JSON / 无 resultCode) | 反馈协议异常,不猜测结构重试 |
|
|
61
|
+
| validation / operation_unknown | operation 名写错 | 用 `weaver-work-cli asset-idle schema` 核对 |
|
|
62
|
+
| validation / input_unknown_key 等 | 输入字段不合法 | 按 error.message 修正入参 |
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# 闲置资产统计出图
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
- 用户要看闲置资产统计:数据统计(闲置资产/待调剂/待调拨/待评估)、类型统计、闲置时长统计
|
|
6
|
+
- 触发词:「闲置资产统计」「出三张图」「闲置情况」「资管家闲置」
|
|
7
|
+
|
|
8
|
+
## 输入要点
|
|
9
|
+
|
|
10
|
+
与 `asset-idle.idle.list` 完全一致:`esbFlowId`(必填)、`maxPages`(可选,默认 20)。聚合由 CLI 完成,Agent 不再自己数数。
|
|
11
|
+
|
|
12
|
+
## 命令
|
|
13
|
+
|
|
14
|
+
Windows PowerShell:
|
|
15
|
+
|
|
16
|
+
```powershell
|
|
17
|
+
weaver-work-cli --json asset-idle run asset-idle.idle.stats --input-json '{"esbFlowId":"1330576130980388964"}'
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
macOS/Linux(bash/zsh):
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
weaver-work-cli --json asset-idle run asset-idle.idle.stats --input-json '{"esbFlowId":"1330576130980388964"}'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
上面 JSON 中的动作流 ID 是源资料实测样例,实际以用户提供的为准,不要照抄。
|
|
27
|
+
|
|
28
|
+
## 输出处理
|
|
29
|
+
|
|
30
|
+
成功 envelope 的 `data`:
|
|
31
|
+
|
|
32
|
+
- `total`:服务端判定结果集总条数(统计分母)
|
|
33
|
+
- `czjyCounts`:处置建议分组,`code` 固定映射 0=待调拨、1=待调剂、2=待评估,缺失为 `code:null`(无法判断)
|
|
34
|
+
- `typeCounts`:按 `zclx` 计数,降序;xzsz 缺失的条目不参与
|
|
35
|
+
- `agingBuckets`:闲置时长分档(1 个月按 30 天计,边界值归前一档:≤30、31–90、91–180、181–365、>365),固定顺序,仅含数量大于 0 的档位
|
|
36
|
+
- `unableToJudge`:xzsz 缺失(无法判断)条数,已排除出类型与时长统计
|
|
37
|
+
- `truncated`:为 true 时统计不完整,先增大 maxPages 重查,不要出图
|
|
38
|
+
|
|
39
|
+
## 出图流程(顺序固定,不得增减)
|
|
40
|
+
|
|
41
|
+
1. **先加载图表设计规范**(widget_guidelines,chart + diagram 模块;仅加载,不把加载过程写成文字)。
|
|
42
|
+
2. **按 [`widget-style.md`](widget-style.md) 依次输出三张图**,`show_widget` title 固定为 ①「数据统计」②「类型统计」③「闲置时长统计」:
|
|
43
|
+
- ① 数据统计:HTML 网格卡,四项为 闲置资产(total)/ 待调剂(czjy=1)/ 待调拨(czjy=0)/ 待评估(czjy=2),卡背景 #F5F9FF
|
|
44
|
+
- ② 类型统计:typeCounts 取 Top10,其余合并为灰条「其他(N类)」;类型数 ≤10 时不画灰条;容器高度 = 柱数 × 42 + 60
|
|
45
|
+
- ③ 闲置时长统计:agingBuckets 柱状图,数量为 0 的档位不显示(CLI 已过滤)
|
|
46
|
+
3. **对话窗口内只输出这三张图**:第一张图之前、图与图之间一律不写任何文字——不写引导语、不写解读、不写过渡句、不写结论、不写总结。图表自带标题、图例与数值。
|
|
47
|
+
4. **页面地址行写在图③ widget 内部**(图表容器之后、widget 最后一行,`margin-top:8px`、13px、`--color-text-secondary`、链接色 `--color-text-info`、`target=_blank`),格式固定 `闲置资产详情:{url}`,不得作为正文文本输出:
|
|
48
|
+
- PC 端:`{base-url}/sp/ebdpage/view/1330976366140497921/page/1330976366140497921`
|
|
49
|
+
- 移动端:`{base-url}/mobile/ebdpage/view/1089307236525424647`
|
|
50
|
+
- `{base-url}` 用当前登录租户的 baseUrl 替换
|
|
51
|
+
- 客户端判断:**默认按 PC 端输出**;仅当用户明确说明在移动端(「手机上」「移动端」「App 里」)才给移动端地址;判断不了按 PC 端,不追问、不同时给两端地址
|
|
52
|
+
5. 全量明细不在对话窗口输出、不落盘、不生成 html 文件、不调用 present_files;第三张图之后不再输出任何正文文字。
|
|
53
|
+
|
|
54
|
+
## 注意
|
|
55
|
+
|
|
56
|
+
- 统计口径与判定规则以 CLI 返回为准(服务端判定),Agent 不重算、不二次分组、不改档位边界
|
|
57
|
+
- widget_code 必须是裸 SVG/HTML 片段:不含 `<!DOCTYPE>` / `<html>` / `<head>` / `<body>`;SVG 每个形状显式设置 fill;配色跟随当前 IDE 主题(浅色主题不用深色底)
|
|
58
|
+
- 禁止临场改样式、禁止再用手绘 SVG 出图;尺寸、字号、色值、文案结构一律以 [`widget-style.md`](widget-style.md) 为准
|
|
59
|
+
|
|
60
|
+
## 失败处理
|
|
61
|
+
|
|
62
|
+
与 [`idle-list.md`](idle-list.md) 相同(同一 host 通道);额外注意:
|
|
63
|
+
|
|
64
|
+
- `truncated=true`:不出图,增大 `maxPages` 重查后再统计
|
|
65
|
+
- `czjyCounts` 中 `code:null`(无法判断)数量大:如实展示,不要猜测编码补齐
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"generatedAt": "2026-11-02",
|
|
4
|
+
"generator": "weaver-e10-skill-maker (weaver-work-cli 0.1.38)",
|
|
5
|
+
"sourceRoot": "用户级技能目录(weaver-e10-ziguanjia-idle,安装副本)",
|
|
6
|
+
"files": [
|
|
7
|
+
{
|
|
8
|
+
"path": "SKILL.md",
|
|
9
|
+
"size": 5524,
|
|
10
|
+
"sha256": "2ac15681e818513fc683bdfeb68e1744f6b00a637b467b529503930808928b3e",
|
|
11
|
+
"role": "existing-skill"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"path": "references/api.md",
|
|
15
|
+
"size": 4422,
|
|
16
|
+
"sha256": "ceb67e67f0c8a1c365acbb4615f98ea3a16516f8bda3b82120e31d43d5e1ad8f",
|
|
17
|
+
"role": "api-doc"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"path": "references/widget-style.md",
|
|
21
|
+
"size": 12794,
|
|
22
|
+
"sha256": "a5eecde866cfb54389cbea8d576d8ef1db8acaf61b3e74351844b63ef31386c5",
|
|
23
|
+
"role": "existing-skill"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "_user_meta.json",
|
|
27
|
+
"size": 99,
|
|
28
|
+
"sha256": "78824fabf9515f2df728154197f8ae782b8805d2688372013b2cc99833817529",
|
|
29
|
+
"role": "sample"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"sourceChunks": [
|
|
33
|
+
{
|
|
34
|
+
"id": "api.md#find-idle-assents",
|
|
35
|
+
"title": "接口 find-idle-assents(POST {baseurl}/api/esb/server/event/triggerActionFlow)",
|
|
36
|
+
"operations": ["asset-idle.idle.list", "asset-idle.idle.stats"],
|
|
37
|
+
"impacted": ["src/shortcuts/asset-idle/host.ts", "references/idle-list.md"]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "api.md#调用与鉴权",
|
|
41
|
+
"title": "调用与鉴权(实测固化 2026-10-27):无通用 HTTP 命令、分页 1000 条/页、hasMore 翻页、会话失效判据",
|
|
42
|
+
"operations": ["asset-idle.idle.list", "asset-idle.idle.stats"],
|
|
43
|
+
"impacted": ["src/shortcuts/asset-idle/host.ts", "references/idle-list.md"]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "api.md#当前返回结构",
|
|
47
|
+
"title": "2026-10-30 起返回服务端判定结果集(zclx/xzsz/pdyj/zxd/czjy/xzdj/zcmc 等)",
|
|
48
|
+
"operations": ["asset-idle.idle.list", "asset-idle.idle.stats"],
|
|
49
|
+
"impacted": ["src/shortcuts/asset-idle/manifest.ts", "src/shortcuts/asset-idle/operations/shared.ts", "references/idle-list.md"]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "SKILL.md#二数据的来源与判定口径",
|
|
53
|
+
"title": "服务端判定不重算;字段缺失标无法判断;返回条数即全集",
|
|
54
|
+
"operations": ["asset-idle.idle.list", "asset-idle.idle.stats"],
|
|
55
|
+
"impacted": ["src/shortcuts/asset-idle/manifest.ts(disabledCapabilities)", "src/shortcuts/asset-idle/operations/shared.ts", "skills/weaver-e10-asset-idle/SKILL.md"]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "SKILL.md#三处置建议口径",
|
|
59
|
+
"title": "czjy 编码映射 0=待调拨、1=待调剂、2=待评估;不算剩余年限;不用旧称",
|
|
60
|
+
"operations": ["asset-idle.idle.stats"],
|
|
61
|
+
"impacted": ["src/shortcuts/asset-idle/operations/shared.ts(CZJY_LABELS)", "references/idle-stats-and-charts.md"]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "SKILL.md#四技能执行步骤",
|
|
65
|
+
"title": "esbFlowId 动态解析规则、分页合并、统计出图流程、页面地址行规则",
|
|
66
|
+
"operations": ["asset-idle.idle.list", "asset-idle.idle.stats"],
|
|
67
|
+
"impacted": ["skills/weaver-e10-asset-idle/SKILL.md", "references/idle-stats-and-charts.md", "src/shortcuts/asset-idle/manifest.ts(withheldOperations)"]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "widget-style.md#1-3",
|
|
71
|
+
"title": "三张图模板与硬规则(数据统计卡 / 类型统计 / 闲置时长统计)",
|
|
72
|
+
"operations": [],
|
|
73
|
+
"impacted": ["references/widget-style.md(整文件保真迁移)"]
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"operationImpact": {
|
|
77
|
+
"asset-idle.idle.list": {
|
|
78
|
+
"parameterCoverage": [
|
|
79
|
+
{
|
|
80
|
+
"source": "esbFlowId(api.md 请求参数;SKILL.md 四.1 动态解析)",
|
|
81
|
+
"target": "inputSchema.properties.esbFlowId",
|
|
82
|
+
"status": "converted",
|
|
83
|
+
"note": "ID 按字符串传递避免精度丢失;按名称解析在 weaver-work-cli 无可用接口,登记为 withheldOperation asset-idle.flow.resolve,esbFlowId 必须由调用方传入"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"source": "curPage(api.md:从 1 开始,hasMore=true 则 +1)",
|
|
87
|
+
"target": "handler 内部循环(host.fetchPage 第二参数)",
|
|
88
|
+
"status": "derived",
|
|
89
|
+
"note": "CLI 自动翻页,不暴露给调用方"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"source": "moduleSource=ebuilder(api.md 固定参数)",
|
|
93
|
+
"target": "host 常量 ASSET_IDLE_MODULE_SOURCE",
|
|
94
|
+
"status": "fixed"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"source": "每页 1000 条(api.md 分页规则)",
|
|
98
|
+
"target": "host 常量 ASSET_IDLE_PAGE_SIZE(服务端固定,CLI 不传)",
|
|
99
|
+
"status": "fixed"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"source": "(源资料无此参数)",
|
|
103
|
+
"target": "inputSchema.properties.maxPages(默认 20,1-100)",
|
|
104
|
+
"status": "derived",
|
|
105
|
+
"note": "CLI 保护的翻页上限;停止判据 hasMore 来自源资料。truncated=true 时结果不是全集并给出警告"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"source": "会话失效判据(api.md:{\"error\":\"authentication required\",\"code\":-2})",
|
|
109
|
+
"target": "host.isIdleAuthRejected",
|
|
110
|
+
"status": "converted"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"outputFields": [
|
|
114
|
+
{ "source": "idleAssets[](api.md 当前返回结构字段表)", "target": "data.items[]", "status": "converted" },
|
|
115
|
+
{ "source": "zclx / xzsz / pdyj / zxd / czjy / xzdj / zcmc / unique_key / id", "target": "data.items[].同名字段", "status": "converted", "note": "逐字段进 outputSchema.items;xzsz/pdyj/zxd/czjy 直接使用不重算" },
|
|
116
|
+
{ "source": "czjy_obj / xzdj_obj / yjzczt_obj / czlc / czlc_obj / zcxzczrq(实测恒为空)", "target": "无(manifest.disabledCapabilities.display-only-fields)", "status": "not-applicable", "note": "不可依赖,归一化时不透出" },
|
|
117
|
+
{ "source": "旧版结构 stockindate / idle_date / use_term / asset_name / type_name / status_name(已不适用)", "target": "无", "status": "not-applicable", "note": "2026-10-30 起动作流改为返回判定结果集,旧字段不再返回;禁止反推日期补齐" },
|
|
118
|
+
{ "source": "hasMore", "target": "data.hasMore", "status": "converted" },
|
|
119
|
+
{ "source": "resultCode=200(成功判据)", "target": "host 成功判定;非 200 → api/actionflow_failed", "status": "converted" },
|
|
120
|
+
{ "source": "(CLI 侧统计)total / pages / truncated", "target": "data 同名字段", "status": "derived" }
|
|
121
|
+
],
|
|
122
|
+
"inputExamples": [
|
|
123
|
+
{
|
|
124
|
+
"name": "single-flow-default-pages",
|
|
125
|
+
"input": { "esbFlowId": "1330576130980388964" },
|
|
126
|
+
"source": "references/api.md 请求参数示例(2026-11-02 实测值,仅作样例展示,实际以用户提供的为准)",
|
|
127
|
+
"sourceType": "source-provided",
|
|
128
|
+
"notes": "esbFlowId 按名称动态解析是源口径;CLI 侧要求调用方传入,样例值仅为格式参考"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "with-page-cap",
|
|
132
|
+
"input": { "esbFlowId": "1330576130980388964", "maxPages": 50 },
|
|
133
|
+
"source": "synthetic(由 maxPages schema 推导,需业务复核)",
|
|
134
|
+
"sourceType": "synthetic"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"asset-idle.idle.stats": {
|
|
139
|
+
"parameterCoverage": [
|
|
140
|
+
{
|
|
141
|
+
"source": "同 asset-idle.idle.list(esbFlowId / maxPages;curPage、moduleSource、页大小为 derived/fixed)",
|
|
142
|
+
"target": "inputSchema 与 idle.list 一致",
|
|
143
|
+
"status": "converted"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"source": "SKILL.md 四.2 聚合统计:总数、czjy 分组计数、按 zclx 计数、按 xzsz 分档",
|
|
147
|
+
"target": "handler 调 aggregateIdleAssets",
|
|
148
|
+
"status": "converted"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"source": "widget-style.md 第 3 节档位边界(≤30/31–90/91–180/181–365/>365,边界归前一档)",
|
|
152
|
+
"target": "operations/shared.ts AGING_BUCKETS / agingBucketOf",
|
|
153
|
+
"status": "converted"
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"outputFields": [
|
|
157
|
+
{ "source": "总数(SKILL.md 四.2)", "target": "data.total", "status": "converted" },
|
|
158
|
+
{ "source": "czjy 分组计数(0/1/2/缺失→无法判断)", "target": "data.czjyCounts[]", "status": "converted" },
|
|
159
|
+
{ "source": "按 zclx 计数(降序)", "target": "data.typeCounts[]", "status": "converted", "note": "Top10+其他合并为展示口径,由渲染侧处理" },
|
|
160
|
+
{ "source": "按 xzsz 分档(5 档,0 档不显示)", "target": "data.agingBuckets[]", "status": "converted" },
|
|
161
|
+
{ "source": "字段缺失标无法判断并排除出统计(SKILL.md 二.3)", "target": "data.unableToJudge / unableToJudgeByType", "status": "converted" },
|
|
162
|
+
{ "source": "(CLI 侧)pages / truncated / esbFlowId", "target": "data 同名字段", "status": "derived" }
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"sourceCoverage": [
|
|
167
|
+
{
|
|
168
|
+
"file": "SKILL.md",
|
|
169
|
+
"status": "converted",
|
|
170
|
+
"evidence": "判定口径/处置口径 → manifest.disabledCapabilities 与 operations/shared.ts;esbFlowId 解析 → withheldOperations;出图流程与页面地址 → SKILL.md + idle-stats-and-charts.md;esbFlowId 实测值 → manifest inputExamples(source-provided,标注实际以用户为准)"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"file": "references/api.md",
|
|
174
|
+
"status": "converted",
|
|
175
|
+
"evidence": "接口路径/请求体/分页/会话失效判据 → host.ts;返回字段表 → manifest outputSchema;调用与鉴权段中的 e10-login/curl 凭据拼装不迁移(shared 规则禁止,认证由 CLI 托管)→ external-only"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"file": "references/widget-style.md",
|
|
179
|
+
"status": "converted",
|
|
180
|
+
"evidence": "整文件保真迁移到 references/widget-style.md;仅头部说明改为数值来自 asset-idle.idle.stats"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"file": "_user_meta.json",
|
|
184
|
+
"status": "not-applicable",
|
|
185
|
+
"evidence": "用户安装元数据,不参与业务能力"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"notes": [
|
|
189
|
+
"源 skill 引用的登录技能与 e10-login/e10-cli 凭据拼装按 weaver-e10-shared 红线不迁移:认证统一由 weaver-work-cli 托管。",
|
|
190
|
+
"api.md『调用与鉴权』段的 curl/e10-login 实测细节不迁移为能力,只保留其业务判据(页大小 1000、hasMore 翻页、code=-2 会话失效),登记 external-only。",
|
|
191
|
+
"缺失样例:无 missingExamples;源资料提供了请求参数样例(已入 inputExamples)。"
|
|
192
|
+
]
|
|
193
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# 闲置资产可视化成套样式
|
|
2
|
+
|
|
3
|
+
本文件是 `weaver-e10-asset-idle` 技能**唯一**的图表样式来源。渲染时必须照抄本文件的尺寸、字号、色值、文案结构,禁止临场改样式,禁止再用手绘 SVG 出图。统计数值一律来自 `asset-idle.idle.stats` 的返回(`total` / `czjyCounts` / `typeCounts` / `agingBuckets`),渲染侧不重算。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 0. 通用规则
|
|
8
|
+
|
|
9
|
+
- `widget_code` 为裸 HTML / JS 片段:不含 `<!DOCTYPE>` / `<html>` / `<head>` / `<body>`。
|
|
10
|
+
- Chart.js 只从 `cdnjs.cloudflare.com` 加载(CSP 白名单),版本固定 `4.4.1`。
|
|
11
|
+
- 每个 `<canvas>` 必须带 `role="img"` + 具体 `aria-label` + 标签内 fallback 文本。
|
|
12
|
+
- 每张图必须有 `role="img"` 的隐藏标题:`<h2 class="sr-only" style="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)">…</h2>`,内容为一句话结论(带数字)。
|
|
13
|
+
- 浅/深色适配:HTML 用 `var(--color-*)`;canvas 无法读 CSS 变量,用 `matchMedia('(prefers-color-scheme: dark)')` 切换轴线与刻度色。
|
|
14
|
+
- canvas 外层容器只设高度,不设 canvas 自身高度。
|
|
15
|
+
- 三张卡按 ①→②→③ 顺序**连续输出**:第一张之前、卡与卡之间都不得输出任何文字(无引导语、无解读、无过渡句);第三张之后**仅输出一行 `闲置资产详情:{系统页面地址}`**(PC/移动端判断规则见 SKILL.md 与 idle-stats-and-charts.md),地址行 = 前缀「闲置资产详情:」+ 地址。**该地址行必须写在图③ widget 内部、canvas 容器之后**(正文文本会被渲染到卡片之前,地址跑到最前面,2026-11-02 修正),整条回复正文不得输出其他文字。图表自带标题、图例、数值与隐藏标题,信息已完整。
|
|
16
|
+
- 三张图的 `show_widget` title 固定为:①「数据统计」②「类型统计」③「闲置时长统计」,不另起标题。
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 1. 数据统计卡(HTML 网格卡)
|
|
21
|
+
|
|
22
|
+
标题「数据统计」+ 4 列等宽卡,卡背景固定 `#F5F9FF`、无边框。数值 24px/500,单位 12px 跟在数字后。
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<h2 class="sr-only" style="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)">数据统计:闲置资产 {{total}} 件,待调剂 {{cz1}} 件,待调拨 {{cz0}} 件,待评估 {{cz2}} 件</h2>
|
|
26
|
+
<div style="font-family:PingFang SC,sans-serif;">
|
|
27
|
+
<div style="font-size:14px;font-weight:500;color:var(--color-text-primary);margin-bottom:8px;">数据统计</div>
|
|
28
|
+
<div style="display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;">
|
|
29
|
+
<div style="background:#F5F9FF;border-radius:var(--border-radius-md);padding:1rem;">
|
|
30
|
+
<div style="font-size:13px;color:var(--color-text-secondary);margin-bottom:6px;">闲置资产</div>
|
|
31
|
+
<div style="font-size:24px;font-weight:500;color:var(--color-text-primary);">{{total}}<span style="font-size:12px;color:var(--color-text-tertiary);margin-left:2px;">件</span></div>
|
|
32
|
+
</div>
|
|
33
|
+
<div style="background:#F5F9FF;border-radius:var(--border-radius-md);padding:1rem;">
|
|
34
|
+
<div style="font-size:13px;color:var(--color-text-secondary);margin-bottom:6px;">待调剂</div>
|
|
35
|
+
<div style="font-size:24px;font-weight:500;color:var(--color-text-primary);">{{cz1}}<span style="font-size:12px;color:var(--color-text-tertiary);margin-left:2px;">件</span></div>
|
|
36
|
+
</div>
|
|
37
|
+
<div style="background:#F5F9FF;border-radius:var(--border-radius-md);padding:1rem;">
|
|
38
|
+
<div style="font-size:13px;color:var(--color-text-secondary);margin-bottom:6px;">待调拨</div>
|
|
39
|
+
<div style="font-size:24px;font-weight:500;color:var(--color-text-primary);">{{cz0}}<span style="font-size:12px;color:var(--color-text-tertiary);margin-left:2px;">件</span></div>
|
|
40
|
+
</div>
|
|
41
|
+
<div style="background:#F5F9FF;border-radius:var(--border-radius-md);padding:1rem;">
|
|
42
|
+
<div style="font-size:13px;color:var(--color-text-secondary);margin-bottom:6px;">待评估</div>
|
|
43
|
+
<div style="font-size:24px;font-weight:500;color:var(--color-text-primary);">{{cz2}}<span style="font-size:12px;color:var(--color-text-tertiary);margin-left:2px;">件</span></div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
必须遵守:
|
|
50
|
+
|
|
51
|
+
- 四个统计项名称固定为「闲置资产」「待调剂」「待调拨」「待评估」,顺序不调。
|
|
52
|
+
- 取值口径固定:闲置资产 = `total`;待调剂 = `czjyCounts` 中 `code:"1"` 的 count;待调拨 = `code:"0"`;待评估 = `code:"2"`。
|
|
53
|
+
- 卡背景统一 `#F5F9FF`,不随主题变化;所有数字统一 `--color-text-primary`。
|
|
54
|
+
- 卡片不写「约 X 年」小字;顶部标题「数据统计」不可省略;**底部说明行不要输出**(统计日、口径说明、编码对照一律不写,2026-11-02 移除)。
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 2. 类型统计(Top10 + 其他)
|
|
59
|
+
|
|
60
|
+
横向条形,**单系列、只画闲置数量**;不统计也不展示平均闲置天数(无橙色折线、无副轴、无平均口径 tooltip)。
|
|
61
|
+
|
|
62
|
+
```html
|
|
63
|
+
<h2 class="sr-only" style="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)">按资产类型分布:{{top1_type}} {{top1_count}} 件最多,前十类合计 {{top10_count}} 件</h2>
|
|
64
|
+
<div style="font-family:PingFang SC,sans-serif;">
|
|
65
|
+
<div style="font-size:14px;font-weight:500;color:var(--color-text-primary);margin-bottom:8px;">类型统计</div>
|
|
66
|
+
<div style="display:flex;flex-wrap:wrap;align-items:center;gap:16px;margin-bottom:8px;font-size:12px;color:var(--color-text-secondary);">
|
|
67
|
+
<span style="display:flex;align-items:center;gap:4px;"><span style="width:10px;height:10px;border-radius:2px;background:#3B7CFF;"></span>闲置数量(件)</span>
|
|
68
|
+
<span style="display:flex;align-items:center;gap:4px;"><span style="width:10px;height:10px;border-radius:2px;background:#888780;"></span>其他 {{rest_types}} 类合计</span>
|
|
69
|
+
<span style="margin-left:auto;color:var(--color-text-tertiary);">前十类合计 {{top10_count}} 件 · 占 {{top10_pct}}%</span>
|
|
70
|
+
</div>
|
|
71
|
+
<div style="position:relative;width:100%;height:520px;">
|
|
72
|
+
<canvas id="typeChart" role="img" aria-label="按资产类型分布的横向条形图,前 10 类加其他类合计">闲置资产按类型分布条形图:{{top1_type}} {{top1_count}} 件。</canvas>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js"></script>
|
|
76
|
+
<script>
|
|
77
|
+
(function () {
|
|
78
|
+
var dark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
79
|
+
new Chart(document.getElementById('typeChart'), {
|
|
80
|
+
type: 'bar',
|
|
81
|
+
data: {
|
|
82
|
+
labels: {{labels}},
|
|
83
|
+
datasets: [{
|
|
84
|
+
label: '闲置数量',
|
|
85
|
+
data: {{counts}},
|
|
86
|
+
backgroundColor: {{colors}},
|
|
87
|
+
borderRadius: 3,
|
|
88
|
+
barThickness: 22
|
|
89
|
+
}]
|
|
90
|
+
},
|
|
91
|
+
options: {
|
|
92
|
+
indexAxis: 'y',
|
|
93
|
+
responsive: true,
|
|
94
|
+
maintainAspectRatio: false,
|
|
95
|
+
plugins: {
|
|
96
|
+
legend: { display: false },
|
|
97
|
+
tooltip: {
|
|
98
|
+
callbacks: {
|
|
99
|
+
label: function (ctx) {
|
|
100
|
+
return '闲置 ' + ctx.parsed.x + ' 件';
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
scales: {
|
|
106
|
+
x: {
|
|
107
|
+
grid: { color: dark ? 'rgba(255,255,255,0.08)' : 'rgba(0,0,0,0.06)' },
|
|
108
|
+
ticks: { color: dark ? '#B4B2A9' : '#5F5E5A' }
|
|
109
|
+
},
|
|
110
|
+
y: {
|
|
111
|
+
grid: { display: false },
|
|
112
|
+
ticks: { color: dark ? '#D3D1C7' : '#444441', autoSkip: false, font: { size: 12 } }
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
})();
|
|
118
|
+
</script>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
必须遵守:
|
|
122
|
+
|
|
123
|
+
- 视觉基准:蓝色柱单系列,**不画橙色折线、不设副轴**。
|
|
124
|
+
- 数据来源 `typeCounts`(已降序):固定 Top10,其余全部合并为最后一根「其他(N类)」,颜色 `#888780`;前 10 根统一 `#3B7CFF`。
|
|
125
|
+
- **类型数 ≤10 时不画「其他」灰条**:图例去掉「其他 N 类合计」一项,右上角统计改为「全部分类合计 N 件」;类型数 >10 时才出现灰条(2026-11-02 补充)。
|
|
126
|
+
- **高度按柱数自适应**:`容器高度 = 柱数 × 42 + 60`(px);11 根(Top10+其他)≈ 520px,6 根 ≈ 300px。柱数与高度不匹配会留大片空白。
|
|
127
|
+
- **不统计平均闲置天数**:不计算、不进 tooltip、不进图例、不设第二条数据系列或 `y1` 轴。要展示的维度只有「数量」。
|
|
128
|
+
- 图例必须手写色块(`plugins.legend.display: false`),并保留右上角合计与占比。
|
|
129
|
+
- `barThickness: 22`、`borderRadius: 3`,不调。
|
|
130
|
+
- 若 Top10 中数量极差过大(首尾比 > 50),仍保持线性轴,不换对数轴。
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 3. 闲置时长统计
|
|
135
|
+
|
|
136
|
+
垂直柱状,5 档固定不变。档位边界由 CLI 的 `agingBuckets` 口径固化(≤30、31–90、91–180、181–365、>365 天),返回里数量为 0 的档位已过滤。
|
|
137
|
+
|
|
138
|
+
```html
|
|
139
|
+
<h2 class="sr-only" style="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)">闲置时长统计:{{top_seg}} {{top_n}} 件最多,占 {{top_pct}}%</h2>
|
|
140
|
+
<div style="font-family:PingFang SC,sans-serif;">
|
|
141
|
+
<div style="font-size:14px;font-weight:500;color:var(--color-text-primary);margin-bottom:8px;">闲置时长统计</div>
|
|
142
|
+
<div style="position:relative;width:100%;height:300px;">
|
|
143
|
+
<canvas id="agingChart" role="img" aria-label="闲置时长统计柱状图,{{top_seg}} {{top_n}} 件">闲置时长统计柱状图:{{seg_summary}}。</canvas>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js"></script>
|
|
147
|
+
<script>
|
|
148
|
+
(function () {
|
|
149
|
+
var dark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
150
|
+
var total = {{total}};
|
|
151
|
+
new Chart(document.getElementById('agingChart'), {
|
|
152
|
+
type: 'bar',
|
|
153
|
+
data: {
|
|
154
|
+
labels: {{segment_labels}},
|
|
155
|
+
datasets: [{
|
|
156
|
+
label: '数量',
|
|
157
|
+
data: {{segment_counts}},
|
|
158
|
+
backgroundColor: {{segment_colors}},
|
|
159
|
+
borderRadius: 3,
|
|
160
|
+
maxBarThickness: 56
|
|
161
|
+
}]
|
|
162
|
+
},
|
|
163
|
+
options: {
|
|
164
|
+
responsive: true,
|
|
165
|
+
maintainAspectRatio: false,
|
|
166
|
+
plugins: {
|
|
167
|
+
legend: { display: false },
|
|
168
|
+
tooltip: {
|
|
169
|
+
callbacks: {
|
|
170
|
+
label: function (ctx) { return '闲置 ' + ctx.parsed.y + ' 件'; },
|
|
171
|
+
afterLabel: function (ctx) { return '占全部 ' + (ctx.parsed.y / total * 100).toFixed(1) + '%'; }
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
scales: {
|
|
176
|
+
y: {
|
|
177
|
+
grid: { color: dark ? 'rgba(255,255,255,0.08)' : 'rgba(0,0,0,0.06)' },
|
|
178
|
+
ticks: { color: dark ? '#B4B2A9' : '#5F5E5A' }
|
|
179
|
+
},
|
|
180
|
+
x: {
|
|
181
|
+
grid: { display: false },
|
|
182
|
+
ticks: { color: dark ? '#D3D1C7' : '#444441', autoSkip: false, font: { size: 12 } }
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
})();
|
|
188
|
+
</script>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
必须遵守:
|
|
192
|
+
|
|
193
|
+
- 档位按闲置天数划分(1 个月按 30 天计):**1个月以内** ≤30 天、**1~3个月** 31–90 天、**3~6个月** 91–180 天、**6~12个月** 181–365 天、**一年以上** >365 天。边界值归前一档(如 30 天算「1个月以内」、90 天算「1~3个月」)。分档与过滤已由 `asset-idle.idle.stats` 的 `agingBuckets` 完成,渲染侧不再重算。
|
|
194
|
+
- 末档文案用「一年以上」;`xzsz` 缺失的记录由 CLI 标「无法判断」并**排除出统计**,不进任何档位。
|
|
195
|
+
- **数量为 0 的档位不显示**:`agingBuckets` 只含有数据的档位,保持固定顺序渲染;aria/fallback/隐藏标题只列有数据的档(2026-11-02 调整)。
|
|
196
|
+
- 配色按档位固定映射,隐藏空档不影响配色:1个月以内 `#2F9E6E`、1~3个月 `#E6862E`、3~6个月 `#D9730D`、6~12个月 `#E05252`、一年以上 `#A32D2D`。
|
|
197
|
+
- 高度 300px、`maxBarThickness: 56`、`borderRadius: 3`,不调。
|
|
198
|
+
- 保持线性轴,不做断轴(断轴会低估首尾差距)。柱几乎贴地时可接受,tooltip 里给件数与占比。
|
|
199
|
+
|
|
200
|
+
## 4. 文案约定
|
|
201
|
+
|
|
202
|
+
- 图②标题固定「类型统计」,图③标题固定「闲置时长统计」,不在标题里追加类数、档位等括号说明。
|
|
203
|
+
- 时长档位文案固定在 chart 的 x 轴标签里:「1个月以内」「1~3个月」「3~6个月」「6~12个月」「一年以上」;数量为 0 的档位不出现。
|
|
204
|
+
- 统计日、口径说明、编码对照**一律不出现在图内或图后**(2026-11-02 移除底部说明行)。
|
|
205
|
+
- **对话窗口内不输出任何文字解读**:三张图连续输出,图前、图间都不写文字(2026-10-27 固化);图后仅输出一行 `闲置资产详情:{系统页面地址}`(PC/移动端判断规则见 idle-stats-and-charts.md,2026-11-02 增加前缀文字)。该行写在**图③ widget 内部、canvas 容器之后**,不用正文文本承载(2026-11-02 修正渲染顺序)。图表中的所有数字必须自带在标题/图例/柱标/隐藏标题里,不依赖正文解释。
|