weaver-work-cli 0.1.8 → 0.1.21
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 +25 -17
- package/dist/cmd/action.js +76 -0
- package/dist/cmd/index.js +2 -0
- package/dist/cmd/refs/index.js +103 -0
- package/dist/cmd/register.js +31 -0
- package/dist/cmd/root.js +1 -0
- package/dist/cmd/setup/index.js +25 -5
- package/dist/cmd/skills/index.js +37 -5
- package/dist/core/connector.js +54 -0
- package/dist/core/context.js +2 -1
- package/dist/core/input.js +48 -0
- package/dist/core/output.js +298 -3
- package/dist/core/refs.js +435 -0
- package/dist/core/state.js +26 -0
- package/dist/internal/e10/auth/commands.js +34 -19
- package/dist/internal/e10/auth/session.js +74 -2
- package/dist/internal/e10/auth/xiaoe.js +359 -94
- package/dist/internal/e10/context.js +18 -6
- package/dist/internal/e10/request-runtime.js +8 -1
- package/dist/internal/skills/install.js +148 -28
- package/dist/internal/skills/reader.js +12 -9
- package/dist/shortcuts/blog/continuation.js +74 -0
- package/dist/shortcuts/blog/errors.js +60 -0
- package/dist/shortcuts/blog/host.js +175 -0
- package/dist/shortcuts/blog/index.js +324 -0
- package/dist/shortcuts/blog/manifest.js +415 -0
- package/dist/shortcuts/blog/operations/comment.js +125 -0
- package/dist/shortcuts/blog/operations/comments.js +31 -0
- package/dist/shortcuts/blog/operations/edit.js +131 -0
- package/dist/shortcuts/blog/operations/export.js +46 -0
- package/dist/shortcuts/blog/operations/like.js +80 -0
- package/dist/shortcuts/blog/operations/publish.js +157 -0
- package/dist/shortcuts/blog/operations/query-user.js +58 -0
- package/dist/shortcuts/blog/operations/query.js +96 -0
- package/dist/shortcuts/blog/operations/registry.js +54 -0
- package/dist/shortcuts/blog/operations/remind.js +176 -0
- package/dist/shortcuts/blog/operations/shared.js +330 -0
- package/dist/shortcuts/blog/operations/types.js +16 -0
- package/dist/shortcuts/blog/operations.js +9 -0
- package/dist/shortcuts/caizhilian/continuation.js +70 -0
- package/dist/shortcuts/caizhilian/errors.js +53 -0
- package/dist/shortcuts/caizhilian/host.js +190 -0
- package/dist/shortcuts/caizhilian/index.js +186 -0
- package/dist/shortcuts/caizhilian/manifest.js +42 -0
- package/dist/shortcuts/caizhilian/operations/api.js +801 -0
- package/dist/shortcuts/caizhilian/operations/confirm.js +75 -0
- package/dist/shortcuts/caizhilian/operations/files.js +306 -0
- package/dist/shortcuts/caizhilian/operations/form.js +170 -0
- package/dist/shortcuts/caizhilian/operations/handlers/collab.js +611 -0
- package/dist/shortcuts/caizhilian/operations/handlers/document.js +890 -0
- package/dist/shortcuts/caizhilian/operations/handlers/file-collection.js +1227 -0
- package/dist/shortcuts/caizhilian/operations/handlers/file-upload.js +192 -0
- package/dist/shortcuts/caizhilian/operations/handlers/fileops.js +570 -0
- package/dist/shortcuts/caizhilian/operations/handlers/folder.js +1024 -0
- package/dist/shortcuts/caizhilian/operations/handlers/search.js +318 -0
- package/dist/shortcuts/caizhilian/operations/handlers/setting-attach.js +294 -0
- package/dist/shortcuts/caizhilian/operations/handlers/setting-backup.js +423 -0
- package/dist/shortcuts/caizhilian/operations/handlers/setting-encrypt.js +238 -0
- package/dist/shortcuts/caizhilian/operations/handlers/setting-storage.js +364 -0
- package/dist/shortcuts/caizhilian/operations/handlers/system.js +106 -0
- package/dist/shortcuts/caizhilian/operations/registry.js +151 -0
- package/dist/shortcuts/caizhilian/operations/shared.js +408 -0
- package/dist/shortcuts/caizhilian/operations/specs.js +698 -0
- package/dist/shortcuts/caizhilian/operations/types.js +57 -0
- package/dist/shortcuts/caizhilian/operations.js +21 -0
- package/dist/shortcuts/contract/continuation.js +70 -0
- package/dist/shortcuts/contract/errors.js +62 -0
- package/dist/shortcuts/contract/host.js +205 -0
- package/dist/shortcuts/contract/index.js +318 -0
- package/dist/shortcuts/contract/manifest.js +596 -0
- package/dist/shortcuts/contract/operations/clause-reference.js +78 -0
- package/dist/shortcuts/contract/operations/form-info.js +371 -0
- package/dist/shortcuts/contract/operations/read.js +118 -0
- package/dist/shortcuts/contract/operations/registry.js +43 -0
- package/dist/shortcuts/contract/operations/request.js +300 -0
- package/dist/shortcuts/contract/operations/shared.js +133 -0
- package/dist/shortcuts/contract/operations/subject.js +157 -0
- package/dist/shortcuts/contract/operations/template.js +81 -0
- package/dist/shortcuts/contract/operations/types.js +7 -0
- package/dist/shortcuts/contract/operations/workflow.js +52 -0
- package/dist/shortcuts/contract/operations/write.js +131 -0
- package/dist/shortcuts/contract/operations.js +8 -0
- package/dist/shortcuts/hrm/index.js +83 -2
- package/dist/shortcuts/hrm/manifest.js +16 -9
- package/dist/shortcuts/hrm/operations/employee.js +160 -30
- package/dist/shortcuts/hrm/operations/org.js +17 -3
- package/dist/shortcuts/hrm/operations/position.js +18 -2
- package/dist/shortcuts/hrm/operations/registry.js +2 -0
- package/dist/shortcuts/hrm/operations/resolve.js +449 -0
- package/dist/shortcuts/index.js +5 -1
- package/dist/shortcuts/invoice/index.js +74 -36
- package/dist/shortcuts/invoice/manifest.js +674 -4
- package/dist/shortcuts/invoice/markdown.js +172 -0
- package/dist/shortcuts/invoice/operations/add.js +3 -3
- package/dist/shortcuts/invoice/operations/delete.js +2 -2
- package/dist/shortcuts/invoice/operations/get.js +10 -2
- package/dist/shortcuts/invoice/operations/import.js +2 -2
- package/dist/shortcuts/invoice/operations/registry.js +8 -1
- package/dist/shortcuts/invoice/operations/reim-auto.js +719 -0
- package/dist/shortcuts/invoice/operations/reim.js +85 -2
- package/dist/shortcuts/invoice/operations/shared.js +75 -8
- package/dist/shortcuts/invoice/operations/update.js +2 -2
- package/dist/shortcuts/invoice/operations/upload-and-validate.js +93 -0
- package/dist/shortcuts/invoice/operations/validate-preview.js +2 -1
- package/dist/shortcuts/invoice/projection.js +328 -0
- package/dist/shortcuts/meeting/host.js +18 -1
- package/dist/shortcuts/meeting/manifest.js +30 -18
- package/dist/shortcuts/meeting/operations/eb/catalog.js +390 -0
- package/dist/shortcuts/meeting/operations/eb/conflict.js +389 -0
- package/dist/shortcuts/meeting/operations/eb/factory.js +389 -0
- package/dist/shortcuts/meeting/operations/eb/index.js +22 -0
- package/dist/shortcuts/meeting/operations/env.js +8 -1
- package/dist/shortcuts/meeting/operations/registry.js +2 -0
- package/dist/shortcuts/meeting/operations/signs.js +216 -2
- package/dist/shortcuts/workflow/endpoints.js +2 -1
- package/dist/shortcuts/workflow/errors.js +8 -2
- package/dist/shortcuts/workflow/host.js +11 -4
- package/dist/shortcuts/workflow/operations/form.js +1016 -590
- package/dist/shortcuts/workflow/operations/read.js +913 -231
- package/dist/shortcuts/workflow/operations/shared.js +21 -0
- package/dist/shortcuts/workflow/operations/write.js +750 -52
- package/dist/shortcuts/workflow/operations.js +36 -10
- package/docs/_catalog.md +6 -0
- package/docs/agent-invoice.md +5 -1
- package/docs/agent-io-channel-design.md +468 -0
- package/docs/agent-skill-install.md +9 -4
- package/docs/blog.md +123 -0
- package/docs/caizhilian.md +304 -0
- package/docs/contract.md +91 -0
- package/docs/e10-auth.md +4 -2
- package/docs/hrm.md +53 -11
- package/docs/invoice.md +5 -1
- package/docs/meeting.md +1 -1
- package/docs/operation-manual.md +15 -3
- package/docs/skill-review-2026-09-19.md +2 -2
- package/package.json +1 -1
- package/scripts/package-skill.mjs +32 -20
- package/scripts/xiaoe_env.py +118 -0
- package/skill-template/business-info.json +113 -14
- package/skill-template/domains/blog.md +24 -0
- package/skill-template/domains/caizhilian.md +22 -0
- package/skill-template/domains/hrm.md +2 -1
- package/skill-template/domains/jinchengda.md +23 -0
- package/skill-template/domains/meeting.md +1 -1
- package/skill-template/domains/workflow.md +1 -1
- package/skill-template/skill-template.md +1 -1
- package/skills/weaver-e10-blog/SKILL.md +111 -0
- package/skills/weaver-e10-blog/references/blog-comment.md +51 -0
- package/skills/weaver-e10-blog/references/blog-comments.md +39 -0
- package/skills/weaver-e10-blog/references/blog-default-permission.md +38 -0
- package/skills/weaver-e10-blog/references/blog-disabled-capabilities.md +11 -0
- package/skills/weaver-e10-blog/references/blog-edit.md +51 -0
- package/skills/weaver-e10-blog/references/blog-export.md +42 -0
- package/skills/weaver-e10-blog/references/blog-like.md +50 -0
- package/skills/weaver-e10-blog/references/blog-publish.md +52 -0
- package/skills/weaver-e10-blog/references/blog-query-user.md +45 -0
- package/skills/weaver-e10-blog/references/blog-query.md +49 -0
- package/skills/weaver-e10-blog/references/blog-remind.md +51 -0
- package/skills/weaver-e10-blog/references/blog-resolve-users.md +38 -0
- package/skills/weaver-e10-blog/references/source-manifest.json +1540 -0
- package/skills/weaver-e10-caizhilian/SKILL.md +217 -0
- package/skills/weaver-e10-caizhilian/references/agent-entry.md +106 -0
- package/skills/weaver-e10-caizhilian/references/collaboration.md +112 -0
- package/skills/weaver-e10-caizhilian/references/document.md +111 -0
- package/skills/weaver-e10-caizhilian/references/file-collection.md +173 -0
- package/skills/weaver-e10-caizhilian/references/file-upload.md +309 -0
- package/skills/weaver-e10-caizhilian/references/files.md +120 -0
- package/skills/weaver-e10-caizhilian/references/folder.md +122 -0
- package/skills/weaver-e10-caizhilian/references/org-browser.md +104 -0
- package/skills/weaver-e10-caizhilian/references/setting-attach.md +440 -0
- package/skills/weaver-e10-caizhilian/references/setting-backup.md +372 -0
- package/skills/weaver-e10-caizhilian/references/setting-encrypt.md +399 -0
- package/skills/weaver-e10-caizhilian/references/setting-storage.md +603 -0
- package/skills/weaver-e10-caizhilian/references/source-manifest.json +5694 -0
- package/skills/weaver-e10-caizhilian/references/withheld.md +93 -0
- package/skills/weaver-e10-caizhilian/references/write-protocol.md +120 -0
- package/skills/weaver-e10-calendar/SKILL.md +4 -3
- package/skills/weaver-e10-ebuilder-form/SKILL.md +4 -9
- package/skills/weaver-e10-ebuilder-form/references/context-routing.md +0 -9
- package/skills/weaver-e10-ebuilder-form/references/custom-api.md +1 -5
- package/skills/weaver-e10-ebuilder-form/references/fields-browser.md +1 -5
- package/skills/weaver-e10-ebuilder-form/references/list-nlist.md +1 -5
- package/skills/weaver-e10-ebuilder-form/references/openapi-read.md +1 -5
- package/skills/weaver-e10-ebuilder-form/references/openapi-write.md +1 -5
- package/skills/weaver-e10-esb/SKILL.md +2 -2
- package/skills/weaver-e10-esb/references/source-manifest.json +9 -9
- package/skills/weaver-e10-hrm/SKILL.md +104 -9
- package/skills/weaver-e10-hrm/references/employee.md +89 -15
- package/skills/weaver-e10-hrm/references/org.md +114 -5
- package/skills/weaver-e10-hrm/references/position.md +14 -7
- package/skills/weaver-e10-hrm/references/source-manifest.json +1 -1
- package/skills/weaver-e10-jinchengda/SKILL.md +167 -0
- package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +82 -0
- package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +69 -0
- package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +78 -0
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +27 -0
- package/skills/weaver-e10-jinchengda/references/contract-request-status.md +71 -0
- package/skills/weaver-e10-jinchengda/references/contract-request-write.md +94 -0
- package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +89 -0
- package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +77 -0
- package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +66 -0
- package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +94 -0
- package/skills/weaver-e10-jinchengda/references/source-manifest.json +259 -0
- package/skills/weaver-e10-jiuchuanhui/SKILL.md +5 -11
- package/skills/weaver-e10-jucailin/SKILL.md +4 -3
- package/skills/weaver-e10-mail/SKILL.md +4 -11
- package/skills/weaver-e10-meeting/SKILL.md +66 -32
- package/skills/weaver-e10-meeting/references/meeting-change.md +5 -2
- package/skills/weaver-e10-meeting/references/meeting-create.md +2 -1
- package/skills/weaver-e10-meeting/references/meeting-eb.md +114 -0
- package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +9 -8
- package/skills/weaver-e10-meeting/references/meeting-receipts-signs.md +35 -7
- package/skills/weaver-e10-meeting/references/meeting-update.md +1 -1
- package/skills/weaver-e10-okr/SKILL.md +6 -11
- package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
- package/skills/weaver-e10-plan/SKILL.md +3 -3
- package/skills/weaver-e10-plan/references/plan-collect-and-compose.md +1 -1
- package/skills/weaver-e10-plan/references/plan-overview-and-routing.md +1 -1
- package/skills/weaver-e10-plan/references/source-manifest.json +13 -13
- package/skills/weaver-e10-qiyecheng/SKILL.md +4 -10
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +9 -9
- package/skills/weaver-e10-shared/SKILL.md +42 -34
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +16 -43
- package/skills/weaver-e10-shared/references/json-output-contract.md +20 -11
- package/skills/weaver-e10-shared/references/non-interactive-environment.md +21 -14
- package/skills/weaver-e10-shijingran/SKILL.md +2 -1
- package/skills/weaver-e10-shijingran/references/source-manifest.json +9 -9
- package/skills/weaver-e10-skill-maker/SKILL.md +4 -10
- package/skills/weaver-e10-skill-maker/references/business-skill-generation.md +5 -3
- package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +12 -27
- package/skills/weaver-e10-skill-maker/references/module-gap-audit-and-repair.md +17 -5
- package/skills/weaver-e10-skill-maker/references/source-update-detection.md +4 -27
- package/skills/weaver-e10-skill-maker/references/weaver-skill-style.md +1 -1
- package/skills/weaver-e10-wenshuding/SKILL.md +5 -16
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +7 -7
- package/skills/weaver-e10-workflow/SKILL.md +41 -46
- package/skills/weaver-e10-workflow/references/source-manifest.json +39 -75
- package/skills/weaver-e10-workflow/references/workflow-batch.md +90 -29
- package/skills/weaver-e10-workflow/references/workflow-create.md +83 -109
- package/skills/weaver-e10-workflow/references/workflow-memory.md +19 -9
- package/skills/weaver-e10-workflow/references/workflow-operate.md +2 -2
- package/skills/weaver-e10-workflow/references/workflow-query.md +40 -27
- package/skills/weaver-e10-workflow/references/workflow-share.md +18 -2
- package/skills/weaver-e10-workflow/references/workflow-view.md +3 -4
- package/skills/weaver-e10-yepiaotong/SKILL.md +74 -39
- package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +22 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +3 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +135 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +15 -3
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-summarize.py +217 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +88 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-validation-preview.md +7 -2
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +89 -9
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +1 -0
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +70 -49
- package/skills/weaver-e10-yepiaotong/references/reim-fast-path.md +119 -0
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +55 -36
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +4 -0
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +149 -0
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +125 -5
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +430 -63
- package/skills/weaver-e10-yimiaoban/SKILL.md +4 -12
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +3 -3
- package/skills/weaver-e10-ziguanjia/SKILL.md +2 -1
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-agent-entry.md +3 -3
- package/tools/weaver-skill-detector-1.0.13/SKILL.md +9 -9
- package/tools/weaver-skill-detector-1.0.13/references/checklist.md +3 -3
- package/tools/weaver-skill-detector-1.0.13/scripts/__pycache__/validate_skill.cpython-313.pyc +0 -0
- package/tools/weaver-skill-detector-1.0.13/scripts/validate_skill.py +98 -91
- package/scripts/sync-connector-skills.mjs +0 -172
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: weaver-setting-attach
|
|
3
|
+
description: "对话式修改\"文件设置 → 附件设置\"页面的 15 个配置项(上传最大、上传格式控制 方式、附件打开方式、批量下载、禁止移动端下载、附加提示、图片压缩、版本清理、 打印转 PDF 等)。通过自然语言 / `setting set --item key=value` 即可完成 GET 全量 → modify(保留原值) → diff 让用户确认 → POST 落库,无需打开 浏览器逐项点击。覆盖 weapp 端 `POST /api/file/tenant/setting` 与 `POST /api/file/tenant/setting/save` 两条接口。Use for 改附件设置、改上传 最大、改附件打开方式、改白名单黑名单、附件批量下载、禁止移动端下载、附加 提示、文件设置、文件上传、格式限制、图片压缩、版本清理、清理文件版本、 打印转 PDF、eteams-file 后台、<your-e10-domain>/info/fileSet/attach."
|
|
4
|
+
license: Proprietary
|
|
5
|
+
compatibility: 泛微E10采知连配套使用,内部可自由使用与修改,禁止对外分发
|
|
6
|
+
metadata:
|
|
7
|
+
maintainer: unknown
|
|
8
|
+
type: capability
|
|
9
|
+
version: 1.0.0
|
|
10
|
+
updated: 2026-08-19
|
|
11
|
+
tags: [附件设置, 上传最大, 格式控制, 批量下载, 图片压缩, 版本清理, 打印转PDF]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# weaver-setting-attach
|
|
15
|
+
|
|
16
|
+
让"文件设置 → 附件设置"页面**用对话就能改**。背后只调两条 HTTP 接口
|
|
17
|
+
(`POST /api/file/tenant/setting` 拉全量 / `POST /api/file/tenant/setting/save`
|
|
18
|
+
保存),改之前先 diff 让用户确认,**绝不会**误清空未指定字段。
|
|
19
|
+
|
|
20
|
+
## 前置依赖
|
|
21
|
+
|
|
22
|
+
### 认证前置(必须)
|
|
23
|
+
|
|
24
|
+
本模块通过 CLI 托管的认证获取凭证(base_url + Cookie + eteamsid + User-Agent),凭证契约见共享规则 [`../../weaver-e10-shared/SKILL.md`](../../weaver-e10-shared/SKILL.md),不依赖手动配置文件,Agent 不得自己读取或输出凭证。
|
|
25
|
+
|
|
26
|
+
**使用前必须确保**:
|
|
27
|
+
1. CLI 已安装:`weaver-work-cli --version` 能正常输出版本号
|
|
28
|
+
2. 已完成登录:`weaver-work-cli auth status` 显示已登录
|
|
29
|
+
|
|
30
|
+
**首次登录**:
|
|
31
|
+
```text
|
|
32
|
+
# OAuth2.0 浏览器授权(推荐)
|
|
33
|
+
weaver-work-cli auth login
|
|
34
|
+
|
|
35
|
+
# 或手动写入 ETEAMSID(从浏览器 DevTools 复制)
|
|
36
|
+
weaver-work-cli auth set --eteamsid "PCACCOUNT_xxx"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**凭证过期处理**:操作返回认证错误时,提示用户通过 `weaver-work-cli auth login` 或 `weaver-work-cli auth set` 重新登录。
|
|
40
|
+
|
|
41
|
+
## When to use
|
|
42
|
+
|
|
43
|
+
- 用户说「把附件批量下载关了」「上传最大改成 2G」「白名单改成 png,jpg」
|
|
44
|
+
「禁止移动端下载附件打开」「图片音视频在新页签打开」等
|
|
45
|
+
- 改 weapp 后台的"附件设置"页(`<your-e10-domain>/info/fileSet/attach`)
|
|
46
|
+
- 需要批量修附件设置但不想打开浏览器一项项点
|
|
47
|
+
- 调试 eteams-file 后台设置项
|
|
48
|
+
- 出现「附件设置 / 上传设置 / 打开方式 / 批量下载 / 禁止移动端 / 附加提示 /
|
|
49
|
+
格式白名单黑名单 / 上传分片」等关键词
|
|
50
|
+
|
|
51
|
+
不适用:存储设置、备份设置、文件采集设置、加解密设置、预览编辑设置、文件
|
|
52
|
+
深度清理、页面设置——这些 Tab 走的是另一套接口(多数要 `POST /papi/file/...`),
|
|
53
|
+
**不在本 skill 范围**。
|
|
54
|
+
|
|
55
|
+
## 命令清单
|
|
56
|
+
|
|
57
|
+
| 命令 | 作用 |
|
|
58
|
+
|---|---|
|
|
59
|
+
| `setting show` | 拉全量设置并以表格打印 |
|
|
60
|
+
| `setting set --item <key=value> [--item ...] [--dry-run] [--yes]` | GET → 合并 → diff → 询问 → POST |
|
|
61
|
+
| `setting diff --item ...` | 只打印 diff,不调任何接口 |
|
|
62
|
+
|
|
63
|
+
## 15 个支持字段
|
|
64
|
+
|
|
65
|
+
字段别名(中文 / 英文 / DTO 字段名)三选一即可:
|
|
66
|
+
|
|
67
|
+
| 别名(key) | DTO 字段 | 类型 | 备注 |
|
|
68
|
+
|---|---|---|---|
|
|
69
|
+
| `upload-max` | `sysMaxSingleUploadSize` | 数字 + 单位(KB/MB/GB) | 不可超过 `sysMaxSingleUploadLimitSize` |
|
|
70
|
+
| `shard-size` | `uploadShardSize` | 整数 MB | 1 ≤ n ≤ 50 |
|
|
71
|
+
| `format-mode` | `sysFormatWhitesEnable` | `whitelist` / `blacklist` | 切换模式后会自动迁移 `format-list` |
|
|
72
|
+
| `format-list` | `sysFormatWhites` 或 `sysFormatBlacks` | 逗号/分号分隔扩展名 | 自动按当前 mode 写到正确字段 |
|
|
73
|
+
| `non-image-open` | `sysNonImageMediaOpenType` | `newTab` / `popupWindow` | 后端实际只有这两个值(v0.1.0 表格写的 dialog/directDownload 是错的,已纠正) |
|
|
74
|
+
| `image-open` | `sysImageMediaOpenType` | `newTab` / `previewComponent` | |
|
|
75
|
+
| `show-attach-list` | `sysPreviewShowAttachmentList` | bool | |
|
|
76
|
+
| `attach-expand` | `sysAttachmentListDefaultExpand` | bool | |
|
|
77
|
+
| `custom-msg` | `sysUploadCustomMsgEnable` (+ `sysUploadCustomMsg`) | bool (+ 文本) | 写 `custom-msg=true::安全提示文本` 一次性带上 |
|
|
78
|
+
| `batch-download` | `sysBatchDownload` | bool | |
|
|
79
|
+
| `mobile-block` | `sysAppDownload` | bool | 自然语义"禁止移动端下载"为 true(CLI true ↔ DTO true) |
|
|
80
|
+
| `download-pdf-types` | `sysDownloadToPdfFileTypes` | 逗号分隔扩展名 | |
|
|
81
|
+
| `img-compress` | `sysImgCompressEnable` | bool | 图片压缩总开关(关闭时子项 img-compress-quality 不生效) |
|
|
82
|
+
| `img-compress-quality` | `sysImgCompressQuality` | `low` / `medium` / `high` | 压缩质量(仅在 img-compress 开启时生效) |
|
|
83
|
+
| `auto-clear-version` | `sysAutoClearFileVersion` | bool | 文件版本自动清理总开关(关闭时子项 version-size / version-time 不生效) |
|
|
84
|
+
| `version-size` | `sysFileVersionSize` | 整数(1-500) / `-1`(不限) | 每个文件最多保留多少个历史版本。**与 `version-time` 互斥**,由 `version-clean-type` 决定生效哪个 |
|
|
85
|
+
| `version-time` | `sysFileVersionTime` | 整数(1-1095) / `-1`(永久) | 每个文件的历史版本保留多少天。**与 `version-size` 互斥**,由 `version-clean-type` 决定生效哪个 |
|
|
86
|
+
| `print-pdf-types` | `sysPrintToPdfFileTypes` | 逗号分隔扩展名 | 打印时需要转 PDF 的扩展名(空 = 未启用,独立项) |
|
|
87
|
+
| `version-clean-type` | `sysAutoClearFileVersionType` | `versionSize` / `versionTime` | 版本清理方式(按份数 / 按时间)—— v0.2.0 补。**决定 `version-size` 和 `version-time` 哪个生效** |
|
|
88
|
+
| `version-size-type` | `sysFileVersionSizeType` | `selected` / `custom` | 份数那一行 UI 状态(selected = 选下拉 / custom = 自定义)—— v0.2.0 补 |
|
|
89
|
+
| `version-time-type` | `sysFileVersionTimeType` | `selected` / `custom` | 时间那一行 UI 状态(selected = 选下拉 / custom = 自定义)—— v0.2.0 补 |
|
|
90
|
+
|
|
91
|
+
### 版本清理设置规则(强制)
|
|
92
|
+
|
|
93
|
+
设置版本清理时,**必须同时设置以下 6 个字段**才能让前端正确生效:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"auto-clear-version": true,
|
|
98
|
+
"version-size": <数量>,
|
|
99
|
+
"version-time": <天数>,
|
|
100
|
+
"version-clean-type": "versionSize",
|
|
101
|
+
"version-size-type": "custom",
|
|
102
|
+
"version-time-type": "custom"
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**单独设置 `version-size` 或 `version-time` 不会生效**,必须同时设置 `version-size-type` 和 `version-time-type` 为 `custom`。
|
|
107
|
+
|
|
108
|
+
完整别名表见 [setting-attach-field-map.md](setting-attach-field-map.md)。
|
|
109
|
+
|
|
110
|
+
## 硬性门禁
|
|
111
|
+
|
|
112
|
+
1. **写操作必须先 diff**——`set` 不带 `--dry-run` 也不带 `--yes` 时,强制把 diff
|
|
113
|
+
打到 stdout 并等用户在 stdin 输入 `y` 才发 POST;EOF / `n` / 非 `y` 全部视为取消。
|
|
114
|
+
2. **`prod` 必加 --yes**——生产环境操作时必须同时带 `--yes` 才会发 POST,
|
|
115
|
+
防止手滑改生产。
|
|
116
|
+
3. **只 POST changed 字段,不透传全量**——后端 `fileSettingSave` 是**逐字段 update**(遍历
|
|
117
|
+
DTO,非 null 字段调 `FileSetItemServiceProxy.updateSysFileItem`),且会用每个字段名
|
|
118
|
+
调 `FileobjTenantPermissionEnum.valueOf(key)`;**只读/虚拟字段**(如
|
|
119
|
+
`sysMaxSingleUploadLimitSize`、`id` 等)不在 enum 里,会抛
|
|
120
|
+
`IllegalArgumentException` 让整笔事务回滚。`set` 只把 diff 出的字段 POST 上去。
|
|
121
|
+
4. **保存后再次 GET 校验**——POST 完调一次 `tenant/setting` 比对 diff,不一致立即
|
|
122
|
+
报错并打印服务端返回值。
|
|
123
|
+
5. **不写日志到 home 之外**——所有凭证 / 日志只落在 `~/.minimax/skills/weaver-setting-attach/`
|
|
124
|
+
下,不写系统级。
|
|
125
|
+
6. **版本清理必须一次到位**——设置版本清理时,必须同时设置 6 个字段(`auto-clear-version`、
|
|
126
|
+
`version-size`、`version-time`、`version-clean-type`、`version-size-type`、`version-time-type`),
|
|
127
|
+
其中 `version-size-type` 和 `version-time-type` 必须为 `custom`,否则前端不生效。
|
|
128
|
+
|
|
129
|
+
## 对话式交互规则
|
|
130
|
+
|
|
131
|
+
> 这些是 **agent 在对话中使用本 skill 时**的硬约束,跟底层 CLI 脚本无关。
|
|
132
|
+
> 命令行直接跑 `setting.py` 可以绕过,但任何经由本 skill 的 agent 流程都必须遵守。
|
|
133
|
+
|
|
134
|
+
1. **操作前必查登录态**
|
|
135
|
+
每次执行业务操作前,确认 CLI 已完成登录:
|
|
136
|
+
- 若 `weaver-work-cli auth status` 显示未登录,提示用户执行 `weaver-work-cli auth login` 或 `weaver-work-cli auth set` 完成登录
|
|
137
|
+
- 登录完成后**立刻**继续用户原本的请求,不要让用户再敲一次命令
|
|
138
|
+
|
|
139
|
+
2. **查询要简洁**(`show` / 读设置时的输出格式)
|
|
140
|
+
- **只返回三样**:**设置项名**(中文别名或 DTO 字段名)、
|
|
141
|
+
当前值、**当前租户名**
|
|
142
|
+
- **不要**返回:bool 三态展开、enum 解释、字段语义说明、风险提示、
|
|
143
|
+
"建议/可以这么做" 等附加内容 —— 这些只在用户追问时再说
|
|
144
|
+
- 多项查询时一行一项,格式固定:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
<租户名> · <设置项名>:<当前值>
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
3. **修改前必须三步问清**
|
|
151
|
+
- 步骤 a — **改前的值**:说清楚这一项当前是什么(从 GET 里取,不要瞎猜)
|
|
152
|
+
- 步骤 b — **改后影响**:说清楚改完会影响什么业务、放行/禁止哪些格式、
|
|
153
|
+
触及哪些用户,以及是否会**间接影响其他字段**(如 `format-mode` 切换会
|
|
154
|
+
迁移 `format-list` 到另一个 DTO 字段)
|
|
155
|
+
- 步骤 c — **明确询问**:用一句话问"要改成 X 吗?",**得到用户肯定回复
|
|
156
|
+
(y / 改 / 确认 / 好的 之类)才发 POST**,即使 CLI 已带 `--yes` 也不许跳过
|
|
157
|
+
- 三步可以一次消息里说全,但步骤 c 的问句**必须独立成行**,不能藏在
|
|
158
|
+
长段落里让人找不到
|
|
159
|
+
|
|
160
|
+
**互斥字段必须主动引导**:当用户同时设置互斥字段时,必须在执行前说明
|
|
161
|
+
互斥关系并让用户选择,不能先执行再提醒。典型场景:
|
|
162
|
+
|
|
163
|
+
- **版本清理**:`version-size`(按份数)和 `version-time`(按时间)互斥,
|
|
164
|
+
由 `version-clean-type` 决定生效哪个。用户同时设置两个值时,必须先问
|
|
165
|
+
「你想按份数保留(如最多保留 4 个版本),还是按时间保留(如保留 12 天)?」,
|
|
166
|
+
确认后再设置对应的清理方式和数值
|
|
167
|
+
- **格式控制**:`format-mode` 切换会迁移 `format-list` 到另一个字段,
|
|
168
|
+
必须说明迁移影响
|
|
169
|
+
|
|
170
|
+
4. **话术面向客户(非开发)**
|
|
171
|
+
本 skill 的对话对象是**客户/业务人员**,不是开发。所有输出话术:
|
|
172
|
+
- **禁止出现**:CLI key(`mobile-block`、`upload-max`、`format-list` 等)、
|
|
173
|
+
DTO 字段名(`sysAppDownload`、`sysMaxSingleUploadSize` 等)、布尔字面值
|
|
174
|
+
(`true` / `false`)、HTTP 术语(POST / GET / 200 / 401)、内部流程术语
|
|
175
|
+
("步骤 a / 步骤 b / 步骤 c"、"diff"、"回 y / 改"、"落库"、"diff 让用户确认")
|
|
176
|
+
- **必须使用**:业务中文名("移动端禁止下载" 开关、"上传单文件最大"、
|
|
177
|
+
"黑白名单")、业务状态("已开启 / 已关闭 / 允许 / 禁止"、
|
|
178
|
+
"顶到上限 / 不会真生效")、自然语言确认("要打开吗?回 改 / 确认 / 好的")
|
|
179
|
+
- 需要看技术细节时(用户主动问"用的什么字段" / "接口是啥" / "为什么改不了"),
|
|
180
|
+
**只在该轮回应**展开,平时一律隐藏
|
|
181
|
+
- 身份信息隐藏 `userId` / `tenantKey` 这类内部 ID,只说"当前租户"
|
|
182
|
+
|
|
183
|
+
5. **超上限引导**(以"上传单文件最大" 为典型场景;其他带硬上限的字段同款处理)
|
|
184
|
+
客户要把某项值改成**超过该租户硬上限**的数(常见就是"上传单文件最大"
|
|
185
|
+
超过当前租户的上限,比如上限 1 GB、客户要 2 GB):
|
|
186
|
+
- **不要**静默截断、**不要**自动改,直接告诉客户改不了 + 给出正确路径
|
|
187
|
+
- 口语化提示(无开发词):
|
|
188
|
+
"你要改成 X 已经超过你们租户的上限了(当前上限 Y),附件设置里调不了,
|
|
189
|
+
需要去『**租户平台 → 租户详情**』那里把上限先调高"
|
|
190
|
+
- 用口语化文字告知客户操作步骤(三步走):
|
|
191
|
+
1. 打开『**租户平台 → 租户管理**』,在列表里找到并点击要设置的租户
|
|
192
|
+
2. 进入租户详情页,点击右上角"编辑"
|
|
193
|
+
3. 在编辑页找到"单文件最大上传"输入框,填入需要的值,点击右上角"保存"
|
|
194
|
+
- 引导话术末尾加一句:
|
|
195
|
+
"在租户平台那里保存后,回到这里再让我帮你改附件设置里的对应项,
|
|
196
|
+
就能设到你想要的值了"
|
|
197
|
+
|
|
198
|
+
## 宿主
|
|
199
|
+
|
|
200
|
+
CLI 入口:
|
|
201
|
+
|
|
202
|
+
```text
|
|
203
|
+
python3 scripts/attach_setting.py <cmd> [args]
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
装好后 `setting show / set ...` 即可直接调用。
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
## 与 weaver-im 的关系
|
|
210
|
+
|
|
211
|
+
两者**不共享凭证**(`auth_opt2` 决策)。现在统一通过 CLI 托管的认证获取凭证。
|
|
212
|
+
|
|
213
|
+
## 版本
|
|
214
|
+
|
|
215
|
+
- 0.1.0(2026-08-06)首次创建。覆盖 eteams-file 截图"附件设置" Tab 的 11 字段。
|
|
216
|
+
- 0.2.0(2026-08-09)补 6 字段:图片压缩(`img-compress` / `img-compress-quality`)、
|
|
217
|
+
版本清理(`auto-clear-version` / `version-size` / `version-time`)、
|
|
218
|
+
打印转 PDF(`print-pdf-types`)。这 3 类功能实际也在附件设置同一页
|
|
219
|
+
(`AttachSet/index.tsx`),0.1.0 时只覆盖 11 项漏了。同时修 `mobile-block`
|
|
220
|
+
alias 的 `invert=True` 方向写反 bug(CLI true 现在直接对应 DTO true)。
|
|
221
|
+
# 接口协议
|
|
222
|
+
|
|
223
|
+
## 端点
|
|
224
|
+
|
|
225
|
+
| 操作 | 方法 | URL | 入参 | 出参 |
|
|
226
|
+
|---|---|---|---|---|
|
|
227
|
+
| 拉全量 | `POST` | `{baseUrl}/api/file/tenant/setting` | `{}`(body 留空对象) | `{status, data: FileSettingDto}` |
|
|
228
|
+
| 保存 | `POST` | `{baseUrl}/api/file/tenant/setting/save` | `FileSettingDto`(全量) | `{status, data: FileSettingDto}` |
|
|
229
|
+
|
|
230
|
+
`{baseUrl}` 例:`https://<your-e10-domain>`
|
|
231
|
+
|
|
232
|
+
## 鉴权
|
|
233
|
+
|
|
234
|
+
走 `Cookie: ETEAMSID=<id>`,与前端 `axios` 默认 cookie 行为一致。
|
|
235
|
+
|
|
236
|
+
CLI 自动从 `.env.local` / ENV 读取并塞进 Cookie。
|
|
237
|
+
|
|
238
|
+
## FileSettingDto 节选(11 字段 + 只读)
|
|
239
|
+
|
|
240
|
+
完整 DTO 见 eteams-file 仓库 `BaseSetDto.java`。下面只列本 skill 关心的字段:
|
|
241
|
+
|
|
242
|
+
```json
|
|
243
|
+
{
|
|
244
|
+
"sysMaxSingleUploadSize": "1000", // str (数字+单位)
|
|
245
|
+
"sysMaxSingleUploadLimitSize": "2048", // str, 只读回传,写时透传
|
|
246
|
+
"uploadShardSize": 5, // int
|
|
247
|
+
"sysFormatWhitesEnable": true, // bool, true=白名单
|
|
248
|
+
"sysFormatWhites": "*", // str, 逗号/分号分隔
|
|
249
|
+
"sysFormatBlacks": "", // str
|
|
250
|
+
"sysNonImageMediaOpenType": "dialog", // enum: newTab/dialog/directDownload
|
|
251
|
+
"sysImageMediaOpenType": "previewComponent", // enum: newTab/previewComponent
|
|
252
|
+
"sysPreviewShowAttachmentList": true, // bool
|
|
253
|
+
"sysAttachmentListDefaultExpand": true, // bool
|
|
254
|
+
"sysUploadCustomMsgEnable": false, // bool
|
|
255
|
+
"sysUploadCustomMsg": "", // str
|
|
256
|
+
"sysBatchDownload": true, // bool
|
|
257
|
+
"sysAppDownload": true, // bool (true=禁止移动端下载)
|
|
258
|
+
"sysDownloadToPdfFileTypes": "" // str
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
未指定字段透传:CLI 先 GET 全量 → 把你传的字段 merge 进去 → POST 回去。**绝不会**清空未指定字段。
|
|
263
|
+
|
|
264
|
+
## 错误码
|
|
265
|
+
|
|
266
|
+
| HTTP | 业务 status | 含义 |
|
|
267
|
+
|---|---|---|
|
|
268
|
+
| 200 | `0` | 成功 |
|
|
269
|
+
| 200 | 非 0 | 业务异常,看 `msg` 字段 |
|
|
270
|
+
| 401/403 | — | ETEAMSID 失效/没权限,重跑 `setting login --config <name>` |
|
|
271
|
+
| 5xx | — | 后端挂了,看日志 |
|
|
272
|
+
|
|
273
|
+
## 后端实现位置(参考)
|
|
274
|
+
|
|
275
|
+
- Controller:`eteams-file/src/main/java/com/weaver/teams/file/e10/mvc/web/FileSettingController.java`
|
|
276
|
+
- DTO:`com.weaver.teams.file.e10.dto.FileSettingDto` / `BaseSetDto`
|
|
277
|
+
- 设置项注册:`com.weaver.teams.file.e10.manager.set.FileSetFactory`
|
|
278
|
+
- 前端调用:`weapp-file/src/api/fileSetApi.ts` 中 `fileSetDatas` / `fileSetSave`
|
|
279
|
+
|
|
280
|
+
## POST 注意事项
|
|
281
|
+
|
|
282
|
+
1. **保存是逐字段 update,不是覆盖式全量**。后端 `fileSettingSave` 遍历 DTO,对**非 null**
|
|
283
|
+
字段调 `FileSetItemServiceProxy.updateSysFileItem(...)`;null 字段跳过不处理。
|
|
284
|
+
意味着:未指定字段**不会被清空**(因为后端根本不动它们)。
|
|
285
|
+
2. **但绝对不能透传只读/虚拟字段**——后端用每个字段名 `FileobjTenantPermissionEnum.valueOf(key)`,
|
|
286
|
+
`sysMaxSingleUploadLimitSize` 等虚拟字段不在 enum 里,会抛
|
|
287
|
+
`IllegalArgumentException: No enum constant ...` 让整笔事务回滚。
|
|
288
|
+
3. **只 POST 改了的字段**。CLI 用 `field_map.diff` 算出 changed 字段后只发这一份。
|
|
289
|
+
4. **服务端会校验范围**:传超范围值会返回业务异常(status=false / code=500),
|
|
290
|
+
CLI 会原样打印 `detailErrorMessage`。
|
|
291
|
+
5. **操作日志**:`FileOpLogManager` 会记一条 `fileSetting` 日志(管理员可在"操作日志"里看到)。
|
|
292
|
+
# 字段对照表(11 项)
|
|
293
|
+
|
|
294
|
+
> 对应 eteams-file 后端 `BaseSetDto` / `FileSettingDto`。
|
|
295
|
+
> 任意字段用 CLI key、中文别名、或 DTO 字段名(最后一个)都接受。
|
|
296
|
+
|
|
297
|
+
## 1. 上传最大
|
|
298
|
+
|
|
299
|
+
- **CLI key**:`upload-max`
|
|
300
|
+
- **中文**:`上传最大` / `最大上传`
|
|
301
|
+
- **DTO 字段**:`sysMaxSingleUploadSize`
|
|
302
|
+
- **类型**:整数 + 单位
|
|
303
|
+
- **单位**:`B / KB / MB / GB / TB`(单字母简写也行:`2G` ≡ `2GB`)
|
|
304
|
+
- **示例**:
|
|
305
|
+
```text
|
|
306
|
+
--item upload-max=2G # 2048 MB
|
|
307
|
+
--item upload-max=2048MB
|
|
308
|
+
--item upload-max=512KB # 1 MB(< 1MB 自动取整为 1)
|
|
309
|
+
```
|
|
310
|
+
- **校验**:不可超过 `sysMaxSingleUploadLimitSize`(GET 时带回),否则拒绝保存。
|
|
311
|
+
|
|
312
|
+
## 2. 上传分片大小
|
|
313
|
+
|
|
314
|
+
- **CLI key**:`shard-size`
|
|
315
|
+
- **中文**:`上传分片大小` / `分片大小`
|
|
316
|
+
- **DTO 字段**:`uploadShardSize`
|
|
317
|
+
- **类型**:整数 MB
|
|
318
|
+
- **范围**:1 ≤ n ≤ 50
|
|
319
|
+
- **示例**:`--item shard-size=8`
|
|
320
|
+
|
|
321
|
+
## 3. 上传格式控制方式
|
|
322
|
+
|
|
323
|
+
- **CLI key**:`format-mode`
|
|
324
|
+
- **中文**:`格式控制方式` / `黑白名单模式`
|
|
325
|
+
- **DTO 字段**:`sysFormatWhitesEnable`(Boolean:true = 白名单)
|
|
326
|
+
- **值**:`whitelist` / `blacklist`(也支持中文:`白名单` / `黑名单`)
|
|
327
|
+
- **示例**:`--item format-mode=whitelist`
|
|
328
|
+
|
|
329
|
+
## 4. 格式列表
|
|
330
|
+
|
|
331
|
+
- **CLI key**:`format-list`
|
|
332
|
+
- **中文**:`格式列表` / `白名单` / `黑名单` / `格式白名单` / `格式黑名单`
|
|
333
|
+
- **DTO 字段**:按当前 mode 自动写到 `sysFormatWhites`(白名单 mode)或 `sysFormatBlacks`(黑名单 mode)
|
|
334
|
+
- **类型**:字符串,扩展名列表
|
|
335
|
+
- **分隔符**:`,` 或 `;` 都接受
|
|
336
|
+
- **示例**:
|
|
337
|
+
```text
|
|
338
|
+
--item format-mode=whitelist --item format-list='png,jpg,jpeg'
|
|
339
|
+
--item format-list='*' # 全部(白名单下"*" = 允许所有)
|
|
340
|
+
--item format-list='exe,bat,sh' # 黑名单下禁止这些
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
## 5. 非图片/音视频打开方式
|
|
344
|
+
|
|
345
|
+
- **CLI key**:`non-image-open`
|
|
346
|
+
- **中文**:`非图片音视频打开方式` / `非图片打开方式`
|
|
347
|
+
- **DTO 字段**:`sysNonImageMediaOpenType`
|
|
348
|
+
- **后端 enum**:`FileMediaOpenTypeEnum`(`newTab` / `popupWindow` 两个值,没有"直接下载")
|
|
349
|
+
- **值**:
|
|
350
|
+
| 英文 | 中文 | 含义 |
|
|
351
|
+
|---|---|---|
|
|
352
|
+
| `newTab` | 新页签 / 新窗口 | 浏览器新标签打开 |
|
|
353
|
+
| `popupWindow` | 弹出窗口 / 弹窗 | 弹出预览层 |
|
|
354
|
+
- **示例**:`--item non-image-open=新页签`
|
|
355
|
+
|
|
356
|
+
## 6. 图片/音视频打开方式
|
|
357
|
+
|
|
358
|
+
- **CLI key**:`image-open`
|
|
359
|
+
- **中文**:`图片音视频打开方式` / `图片打开方式`
|
|
360
|
+
- **DTO 字段**:`sysImageMediaOpenType`
|
|
361
|
+
- **后端 enum**:`FileMediaOpenTypeEnum`(`newTab` / `previewComponent` 两个值)
|
|
362
|
+
- **值**:
|
|
363
|
+
| 英文 | 中文 | 含义 |
|
|
364
|
+
|---|---|---|
|
|
365
|
+
| `newTab` | 新页签 | 浏览器新标签打开 |
|
|
366
|
+
| `previewComponent` | 预览组件 / 预览 | 前端内置预览组件 |
|
|
367
|
+
- **示例**:`--item image-open=预览组件`
|
|
368
|
+
|
|
369
|
+
## 7. 预览时显示附件列表
|
|
370
|
+
|
|
371
|
+
- **CLI key**:`show-attach-list`
|
|
372
|
+
- **中文**:`预览显示附件列表` / `显示附件列表`
|
|
373
|
+
- **DTO 字段**:`sysPreviewShowAttachmentList`
|
|
374
|
+
- **类型**:Boolean
|
|
375
|
+
- **值**:`true` / `false` / `1` / `0` / `开` / `关` / `启用` / `禁用`
|
|
376
|
+
|
|
377
|
+
## 8. 附件列默认展开
|
|
378
|
+
|
|
379
|
+
- **CLI key**:`attach-expand`
|
|
380
|
+
- **中文**:`附件列默认展开` / `附件列表展开`
|
|
381
|
+
- **DTO 字段**:`sysAttachmentListDefaultExpand`
|
|
382
|
+
- **类型**:Boolean
|
|
383
|
+
|
|
384
|
+
## 9. 附件附加提示
|
|
385
|
+
|
|
386
|
+
- **CLI key**:`custom-msg`
|
|
387
|
+
- **中文**:`附加提示` / `上传附加提示`
|
|
388
|
+
- **DTO 字段**:`sysUploadCustomMsgEnable`(Boolean)+ `sysUploadCustomMsg`(String)
|
|
389
|
+
- **复合写法**:`custom-msg=true::<文本>` 一次性写两个
|
|
390
|
+
- **只改 bool 不改文本**:`--item custom-msg=true`
|
|
391
|
+
- **示例**:
|
|
392
|
+
```text
|
|
393
|
+
--item custom-msg=true::请勿上传公司机密文件
|
|
394
|
+
--item custom-msg=false # 关闭附加提示(不抹掉原 msg 字段)
|
|
395
|
+
```
|
|
396
|
+
- **注意**:单独写 bool 时,旧 msg 文本**会保留**(merge 时透传 current 里的值);要清空 msg 需显式:
|
|
397
|
+
```text
|
|
398
|
+
--item custom-msg=false --item sysUploadCustomMsg=
|
|
399
|
+
```
|
|
400
|
+
(第二个写法直接用 DTO 字段名也能接受,**逃生口**。)
|
|
401
|
+
|
|
402
|
+
## 10. 附件批量下载
|
|
403
|
+
|
|
404
|
+
- **CLI key**:`batch-download`
|
|
405
|
+
- **中文**:`附件批量下载` / `批量下载`
|
|
406
|
+
- **DTO 字段**:`sysBatchDownload`
|
|
407
|
+
- **类型**:Boolean
|
|
408
|
+
|
|
409
|
+
## 11. 禁止移动端下载附件
|
|
410
|
+
|
|
411
|
+
- **CLI key**:`mobile-block`
|
|
412
|
+
- **中文**:`禁止移动端下载` / `移动端禁止下载`
|
|
413
|
+
- **DTO 字段**:`sysAppDownload`(CLI true ↔ DTO true,禁止移动端下载)
|
|
414
|
+
- **类型**:Boolean
|
|
415
|
+
- **示例**:
|
|
416
|
+
```text
|
|
417
|
+
--item mobile-block=true # 禁止移动端下载
|
|
418
|
+
--item mobile-block=false # 允许移动端下载
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
## 12. 下载需要转 PDF 的文件格式
|
|
422
|
+
|
|
423
|
+
- **CLI key**:`download-pdf-types`
|
|
424
|
+
- **中文**:`下载转PDF格式` / `下载转pdf`
|
|
425
|
+
- **DTO 字段**:`sysDownloadToPdfFileTypes`
|
|
426
|
+
- **类型**:字符串,逗号分隔扩展名
|
|
427
|
+
- **示例**:`--item download-pdf-types='doc,docx,xls,xlsx'`
|
|
428
|
+
|
|
429
|
+
---
|
|
430
|
+
|
|
431
|
+
## 逃生口
|
|
432
|
+
|
|
433
|
+
任意字段也支持直接用 DTO 字段名(snake case 必须小写)作为 key。
|
|
434
|
+
不推荐,仅供复杂场景使用——CLI 会**完全信任**你的值不做校验(除了 merge 时的范围检查)。
|
|
435
|
+
|
|
436
|
+
```text
|
|
437
|
+
--item sysMaxSingleUploadSize=2048
|
|
438
|
+
--item sysAppDownload=false
|
|
439
|
+
--item sysUploadCustomMsg= # 清空 msg
|
|
440
|
+
```
|