@das-fed/upf-ui 6.4.0-dev.311 → 6.4.0-dev.313
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/esm-map.json +2 -1
- package/front-end/i18n/front-end-page/dasui_en-US.js +10 -7
- package/front-end/i18n/front-end-page/dasui_zh-CN.js +10 -7
- package/front-end/i18n/front-end-page/dasui_zh-MO.js +10 -7
- package/package.json +7 -7
- package/packages/business-components/ai-panel/{index-BdLFU3HT.js → index-C1XseEkL.js} +1 -1
- package/packages/business-components/ai-panel/index-C1XseEkL.js.gz +0 -0
- package/packages/business-components/ai-panel/{index-Cc1_Wpca.js → index-_XzaXcle.js} +1136 -1154
- package/packages/business-components/ai-panel/index-_XzaXcle.js.gz +0 -0
- package/packages/business-components/ai-panel/index.js +1 -1
- package/packages/business-components/ai-panel/src/dasAI/hooks/audio.d.ts +1 -1
- package/packages/business-components/app-container/index.js +56 -56
- package/packages/business-components/app-container/index.js.gz +0 -0
- package/packages/business-components/area-phone-select/index.d.ts +30 -30
- package/packages/business-components/area-phone-select/index.js +87 -87
- package/packages/business-components/area-phone-select/index.js.gz +0 -0
- package/packages/business-components/area-phone-select/src/area-popover/index.vue.d.ts +4 -4
- package/packages/business-components/change-enterprises/index.js +20 -20
- package/packages/business-components/change-enterprises/index.js.gz +0 -0
- package/packages/business-components/change-pwd/index.js +15 -15
- package/packages/business-components/change-pwd/index.js.gz +0 -0
- package/packages/business-components/change-pwd/src/hooks/use-changePwd.d.ts +14 -14
- package/packages/business-components/currency-page/index.js +39 -39
- package/packages/business-components/currency-page/index.js.gz +0 -0
- package/packages/business-components/device-panel/index.js +46 -46
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/device-panel/style.css +1 -1
- package/packages/business-components/device-panel/style.css.gz +0 -0
- package/packages/business-components/export-button/index.js +92 -92
- package/packages/business-components/export-button/index.js.gz +0 -0
- package/packages/business-components/import-button/index.js +171 -171
- package/packages/business-components/import-button/index.js.gz +0 -0
- package/packages/business-components/layout-breadcrumb/index.js +42 -42
- package/packages/business-components/layout-breadcrumb/index.js.gz +0 -0
- package/packages/business-components/model-table-dialog/index.d.ts +4 -4
- package/packages/business-components/model-table-dialog/index.js +233 -233
- package/packages/business-components/model-table-dialog/index.js.gz +0 -0
- package/packages/business-components/payment/index.js +44 -44
- package/packages/business-components/payment/index.js.gz +0 -0
- package/packages/business-components/process-form/index.js +939 -939
- package/packages/business-components/process-form/index.js.gz +0 -0
- package/packages/business-components/process-form/src/hooks/useForm.d.ts +14 -14
- package/packages/business-components/process-log/index.js +331 -331
- package/packages/business-components/process-log/index.js.gz +0 -0
- package/packages/business-components/process-log/style.css +1 -1
- package/packages/business-components/process-log/style.css.gz +0 -0
- package/packages/business-components/process-search-form/hooks/useSearchOptions.d.ts +4 -2
- package/packages/business-components/process-table/index.d.ts +14 -14
- package/packages/business-components/upload-file/index.js +43 -43
- package/packages/business-components/upload-file/index.js.gz +0 -0
- package/packages/business-components/upload-file/style.css +1 -1
- package/packages/business-components/urgent-panel/index.js +340 -340
- package/packages/business-components/urgent-panel/index.js.gz +0 -0
- package/packages/business-components/video-dialog/index.js +17 -17
- package/packages/business-components/video-dialog/index.js.gz +0 -0
- package/packages/business-components/video-dialog/style.css +1 -1
- package/packages/business-components/video-dialog/style.css.gz +0 -0
- package/packages/components/alert/index.d.ts +4 -4
- package/packages/components/alert/index.js +5 -5
- package/packages/components/alert/index.js.gz +0 -0
- package/packages/components/audio-video/index.js +141 -141
- package/packages/components/audio-video/index.js.gz +0 -0
- package/packages/components/autocomplete/index.d.ts +6 -6
- package/packages/components/autocomplete/index.js +162 -162
- package/packages/components/autocomplete/index.js.gz +0 -0
- package/packages/components/autocomplete/style.css +1 -1
- package/packages/components/autocomplete/style.css.gz +0 -0
- package/packages/components/breadcrumb/index.js +37 -37
- package/packages/components/breadcrumb/index.js.gz +0 -0
- package/packages/components/button/index.js +223 -223
- package/packages/components/button/index.js.gz +0 -0
- package/packages/components/calendar/index.js +164 -164
- package/packages/components/calendar/index.js.gz +0 -0
- package/packages/components/cascader/index.d.ts +8 -8
- package/packages/components/cascader/index.js +89 -89
- package/packages/components/cascader/index.js.gz +0 -0
- package/packages/components/cascader/style.css +1 -1
- package/packages/components/cascader/style.css.gz +0 -0
- package/packages/components/checkbox/index.d.ts +12 -12
- package/packages/components/checkbox/index.js +180 -180
- package/packages/components/checkbox/index.js.gz +0 -0
- package/packages/components/checkbox/style.css +1 -1
- package/packages/components/checkbox/style.css.gz +0 -0
- package/packages/components/collapse-panel/index.js +12 -12
- package/packages/components/collapse-panel/index.js.gz +0 -0
- package/packages/components/collaspe/index.d.ts +4 -4
- package/packages/components/collaspe/index.js +22 -22
- package/packages/components/collaspe/index.js.gz +0 -0
- package/packages/components/custom-search-item/index.d.ts +4 -4
- package/packages/components/custom-search-item/index.js +36 -36
- package/packages/components/custom-search-item/index.js.gz +0 -0
- package/packages/components/date-picker/index.js +658 -658
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/date-picker/style.css +1 -1
- package/packages/components/date-picker/style.css.gz +0 -0
- package/packages/components/dimple-layout/index.js +31 -73
- package/packages/components/dimple-layout/index.js.gz +0 -0
- package/packages/components/dropdown/index.js +33 -33
- package/packages/components/dropdown/index.js.gz +0 -0
- package/packages/components/edit-table/index.d.ts +4 -4
- package/packages/components/edit-table/index.js +190 -190
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/empty/index.js +29 -29
- package/packages/components/empty/index.js.gz +0 -0
- package/packages/components/error-overlay-model/index.js +31 -31
- package/packages/components/error-overlay-model/index.js.gz +0 -0
- package/packages/components/form/index.d.ts +14 -14
- package/packages/components/form/index.js +23 -23
- package/packages/components/form/index.js.gz +0 -0
- package/packages/components/form-item/index.js +771 -771
- package/packages/components/form-item/index.js.gz +0 -0
- package/packages/components/form-item/style.css +1 -1
- package/packages/components/form-item/style.css.gz +0 -0
- package/packages/components/image-upload/index.js +90 -90
- package/packages/components/image-upload/index.js.gz +0 -0
- package/packages/components/image-viewer/index.js +418 -418
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/infinite-scroll/index.d.ts +1 -3
- package/packages/components/infinite-scroll/index.js +509 -509
- package/packages/components/infinite-scroll/index.js.gz +0 -0
- package/packages/components/infinite-scroll/src/index.vue.d.ts +1 -3
- package/packages/components/input/index.js +544 -544
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input/src/index.vue.d.ts +2 -2
- package/packages/components/input/style.css +2 -2
- package/packages/components/input/style.css.gz +0 -0
- package/packages/components/input-dialog-select/index.js +82 -82
- package/packages/components/input-dialog-select/index.js.gz +0 -0
- package/packages/components/input-number/index.js +103 -103
- package/packages/components/input-number/index.js.gz +0 -0
- package/packages/components/input-number/style.css +1 -1
- package/packages/components/input-number/style.css.gz +0 -0
- package/packages/components/live-player/index.d.ts +4 -4
- package/packages/components/loading/index.js +1 -1
- package/packages/components/loading/index.js.gz +0 -0
- package/packages/components/menu-aside/index.js +600 -600
- package/packages/components/menu-aside/index.js.gz +0 -0
- package/packages/components/menu-header/index.js +17 -17
- package/packages/components/menu-header/index.js.gz +0 -0
- package/packages/components/pagination/index.js +91 -91
- package/packages/components/pagination/index.js.gz +0 -0
- package/packages/components/pagination/style.css +1 -1
- package/packages/components/pagination/style.css.gz +0 -0
- package/packages/components/popover/index.d.ts +4 -4
- package/packages/components/popover/index.js +33 -33
- package/packages/components/popover/index.js.gz +0 -0
- package/packages/components/popup-mask/index.js +13 -13
- package/packages/components/popup-mask/index.js.gz +0 -0
- package/packages/components/progress/index.js +93 -93
- package/packages/components/progress/index.js.gz +0 -0
- package/packages/components/progress/style.css +1 -1
- package/packages/components/progress/style.css.gz +0 -0
- package/packages/components/radio/index.d.ts +10 -10
- package/packages/components/radio/index.js +175 -175
- package/packages/components/radio/index.js.gz +0 -0
- package/packages/components/rich-editor/index.js +234 -234
- package/packages/components/rich-editor/index.js.gz +0 -0
- package/packages/components/scrollbar/index.js +2 -2
- package/packages/components/scrollbar/index.js.gz +0 -0
- package/packages/components/search/index.js +68 -68
- package/packages/components/search/index.js.gz +0 -0
- package/packages/components/search-form/i18n/index.d.ts +12 -0
- package/packages/components/search-form/index.d.ts +3 -0
- package/packages/components/search-form/index.js +1989 -1099
- package/packages/components/search-form/index.js.gz +0 -0
- package/packages/components/search-form/skills/DasSearchForm/345/215/207/347/272/247/346/214/207/345/215/227.md +139 -0
- package/packages/components/search-form/skills/das-search-form-toolbar-migration/SKILL.md +122 -0
- package/packages/components/search-form/skills/das-search-form-toolbar-migration//350/277/201/347/247/273/350/246/201/347/202/271/344/270/216/345/270/270/350/247/201/351/227/256/351/242/230.md +82 -0
- package/packages/components/search-form/src/Index.vue.d.ts +12 -50
- package/packages/components/search-form/src/Legacy.vue.d.ts +61 -0
- package/packages/components/search-form/src/SearchDateRange.vue.d.ts +5 -2
- package/packages/components/search-form/src/Toolbar.vue.d.ts +57 -0
- package/packages/components/search-form/src/api/park-space.d.ts +8 -0
- package/packages/components/search-form/src/hooks/common-query.d.ts +7 -0
- package/packages/components/search-form/src/hooks/searchFormItem.d.ts +16 -14
- package/packages/components/search-form/src/hooks/submission.d.ts +23 -0
- package/packages/components/search-form/src/hooks/toolbar-state.d.ts +22 -0
- package/packages/components/search-form/src/toolbar-types.d.ts +45 -0
- package/packages/components/search-form/style.css +1 -1
- package/packages/components/search-form/style.css.gz +0 -0
- package/packages/components/select/index.js +288 -264
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/src/type.d.ts +97 -97
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/select-input/index.js +79 -79
- package/packages/components/select-input/index.js.gz +0 -0
- package/packages/components/select-input/style.css +1 -1
- package/packages/components/select-input/style.css.gz +0 -0
- package/packages/components/select-list/index.js +430 -430
- package/packages/components/select-list/index.js.gz +0 -0
- package/packages/components/select-list/style.css +1 -1
- package/packages/components/select-list/style.css.gz +0 -0
- package/packages/components/special-range-picker-month/index.js +140 -140
- package/packages/components/special-range-picker-month/index.js.gz +0 -0
- package/packages/components/special-range-picker-month/style.css +1 -1
- package/packages/components/special-range-picker-month/style.css.gz +0 -0
- package/packages/components/special-range-picker-year/index.js +169 -169
- package/packages/components/special-range-picker-year/index.js.gz +0 -0
- package/packages/components/special-range-picker-year/style.css +1 -1
- package/packages/components/special-range-picker-year/style.css.gz +0 -0
- package/packages/components/spin/index.js +37 -37
- package/packages/components/spin/index.js.gz +0 -0
- package/packages/components/split-panel/index.d.ts +8 -8
- package/packages/components/split-panel/index.js +27 -27
- package/packages/components/split-panel/index.js.gz +0 -0
- package/packages/components/switch/style.css +1 -1
- package/packages/components/switch/style.css.gz +0 -0
- package/packages/components/table/index.d.ts +103 -103
- package/packages/components/table/index.js +1869 -1869
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/table/src/Table.vue.d.ts +9 -9
- package/packages/components/tabs/index.js +101 -101
- package/packages/components/tabs/index.js.gz +0 -0
- package/packages/components/time-line/index.js +35 -35
- package/packages/components/time-line/index.js.gz +0 -0
- package/packages/components/tooltip/index.d.ts +6 -6
- package/packages/components/tooltip/index.js +62 -62
- package/packages/components/tooltip/index.js.gz +0 -0
- package/packages/components/tooltip/style.css +1 -1
- package/packages/components/tooltip/style.css.gz +0 -0
- package/packages/components/tree/index.js +426 -426
- package/packages/components/tree/index.js.gz +0 -0
- package/packages/components/tree-select/index.js +268 -265
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-select/src/App.vue.d.ts +15 -14
- package/packages/components/tree-select/src/hooks/use-tree-select.d.ts +12 -12
- package/packages/components/tree-select/src/type.d.ts +115 -112
- package/packages/components/tree-table/index.d.ts +2 -2
- package/packages/components/tree-table/index.js +181 -181
- package/packages/components/tree-table/index.js.gz +0 -0
- package/packages/components/tree-v2/index.js +1308 -1308
- package/packages/components/tree-v2/index.js.gz +0 -0
- package/packages/components/tree-v2/src/App.vue.d.ts +141 -143
- package/packages/components/tree-v2/style.css +2 -2
- package/packages/components/tree-v2/style.css.gz +0 -0
- package/packages/components/upload/index.js +98 -98
- package/packages/components/upload/index.js.gz +0 -0
- package/packages/components/virtual-tree/index.js +62 -62
- package/packages/components/virtual-tree/index.js.gz +0 -0
- package/packages/components/virtual-tree/src/App.vue.d.ts +140 -140
- package/release-meta.json +4 -4
- package/packages/business-components/ai-panel/index-BdLFU3HT.js.gz +0 -0
- package/packages/business-components/ai-panel/index-Cc1_Wpca.js.gz +0 -0
|
Binary file
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# DasSearchForm 升级指南
|
|
2
|
+
|
|
3
|
+
本文随 `@das-fed/upf-ui` 发布,供 AI 根据业务页面路径和页面目标完成 DasSearchForm 迁移。业务方不需要重复描述组件内部实现;AI 必须检查运行项目实际安装的包及页面请求链路。
|
|
4
|
+
|
|
5
|
+
## 业务最短提问
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
请按当前项目实际安装的 @das-fed/upf-ui search-form skills,升级
|
|
9
|
+
<相对项目根目录的页面路径> 中的 DasSearchForm。保留页面现有业务筛选和请求行为,
|
|
10
|
+
按页面设计决定是否使用园区/楼栋筛选;空间参数由组件/公共请求层处理,业务 handler 和 payload
|
|
11
|
+
不处理 park/building。检查首次查询、日期、重置、分页时序,完成必要修改和验证,
|
|
12
|
+
并报告改动及未验证项。
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
示例:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
请按当前项目实际安装的 @das-fed/upf-ui search-form skills,升级
|
|
19
|
+
src/views/myMeeting/pages/home/hooks/use-search/Search.vue 中的 DasSearchForm。保留页面现有
|
|
20
|
+
业务筛选和请求行为,按页面设计决定是否使用园区/楼栋筛选;空间参数由组件/公共请求层处理,
|
|
21
|
+
业务 handler 和 payload 不处理 park/building。检查首次查询、日期、重置、分页时序,完成必要修改
|
|
22
|
+
和验证,并报告改动及未验证项。
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
若截图/需求已明确空间控件行为,可只追加一句,例如“页面仅展示单选园区,不展示楼栋”。如果页面现状和设计均无法判断是否需要空间过滤,AI 只追问这个关键问题,不擅自开启空间筛选。
|
|
26
|
+
|
|
27
|
+
## AI 执行约定
|
|
28
|
+
|
|
29
|
+
1. 从启动项目 `package.json` 所在目录定位 `node_modules/@das-fed/upf-ui/packages/components/search-form/skills/`,先读取本指南、`das-search-form-toolbar-migration/SKILL.md` 和 `迁移要点与常见问题.md`。不要默认从 monorepo 根或另一个 checkout 读取依赖资料。
|
|
30
|
+
2. 核对该项目 manifest 声明版本、锁文件解析版本和实际安装包目录/文件。只有运行项目实际解析到的包可证明其使用版本;三者不一致时明确报告,不得只凭截图或 lockfile 推断运行时能力。
|
|
31
|
+
3. 若已安装包缺少所需 API/行为,说明版本阻塞并停止使用该 API;不得臆造 prop、复制其它 checkout 的源码到业务目录或静默升级依赖。未经明确要求,不修改 UPF 版本、锁文件或发布配置。
|
|
32
|
+
4. 阅读目标 Search.vue、父级搜索状态、表格/分页查询、API 模块和页面设计,盘点普通字段、默认值、权限条件、日期/周期转换、异步回调、初始请求及所有列表查询入口。根据页面需求判定空间控件是否应启用。
|
|
33
|
+
5. 尽量仅修改当前页面查询链路,保留原业务筛选语义。按影响执行定向类型检查/测试/构建。要求 Chrome 时,用外部 Chrome 检查目标页面和 Network;不能运行时明确说明,不得以单测代替浏览器验证。
|
|
34
|
+
|
|
35
|
+
## 新旧布局
|
|
36
|
+
|
|
37
|
+
`layoutMode` 支持 `legacy` 和 `toolbar`,默认 `legacy`;不设置时旧页面保持旧模式。只有页面明确采用新版工具栏时才设置 `layout-mode="toolbar"`。
|
|
38
|
+
|
|
39
|
+
```vue
|
|
40
|
+
<das-search-form layout-mode="toolbar" :options="options" @confirm="searchData" />
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Toolbar 普通字段变化本身不自动查询。按钮查询、实例 `confirm()`、重置后的内部确认及空间初始化/选择联动会触发 `confirm`。迁移时要检查旧字段回调、父级首次查询和表格挂载顺序,避免重复或漏查。
|
|
44
|
+
|
|
45
|
+
## 公共参数合同
|
|
46
|
+
|
|
47
|
+
- `@confirm` 第一个参数 `formValues` 是普通筛选快照,不含空间条件。第二个参数 `selectedSpace` 是可选 UI 状态 `{ parkIds, buildingIds }`,用于受控展示等场景;通常业务无需消费它。
|
|
48
|
+
- `park`、`building` 是后端从 URL query 读取的通用空间条件,不是业务 DTO 字段。业务 Search.vue、搜索状态、handler、分页状态、请求 payload 不定义、映射或兼容 `park`、`building`、`parkIds`、`buildingIds`。
|
|
49
|
+
- 当前页面空间控件可见且初始化完成时,search-form 提供该页面的最新空间值;公共 `createService` 在发出 GET/POST 前把它们加入 query,数组用逗号序列化,并从 JSON body 删除同名键。
|
|
50
|
+
- 业务照常使用现有 `createService`。不在业务层拼 URL/query,不把空间值复制到 body。显式 query 中同名参数优先于自动公共空间值,但业务不应依此实现空间处理。
|
|
51
|
+
- 不配置空间控件时组件不请求园区数据、不主动注入空间条件,也不从其它页面/Tab 继承旧值。当前 createService 仍会把历史业务 JSON body 中已有的 `park/building` 移到 query;迁移后的业务因此必须删除这些字段,才能满足“空间条件不参与”的契约。不要为不需要园区过滤的页面强制启用空间筛选。
|
|
52
|
+
- 控件隐藏时对应空间键不注入;控件可见但未选择时保留空值语义(数组序列化为空字符串),与键缺失不同。
|
|
53
|
+
- `spaceValue` 内部 UI 状态可使用 `parkIds/buildingIds`,这不代表业务接口可以使用这些字段。
|
|
54
|
+
|
|
55
|
+
正确的业务 handler 只映射业务字段:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
function searchData(values: Record<string, any>) {
|
|
59
|
+
requestList({ params: { pageIndex: pageIndex.value, pageSize: pageSize.value }, data: mapBusinessFields(values) })
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`requestList` 应沿用页面既有 `createService` API。不要读取第二个参数并将空间字段合入 `data` 或 `params`。
|
|
64
|
+
|
|
65
|
+
## Props 与空间配置
|
|
66
|
+
|
|
67
|
+
| Prop | 行为 |
|
|
68
|
+
| ------------- | -------------------------------------------------------------------------------------- |
|
|
69
|
+
| `layoutMode` | `legacy` / `toolbar`,默认 `legacy`。 |
|
|
70
|
+
| `options` | 普通筛选项,允许 `null`;空数组时普通筛选区及查询/重置按钮隐藏,空间控件仍可单独显示。 |
|
|
71
|
+
| `spaceConfig` | 默认 `{}`;只有实际需要空间条件时设置 `visible: true`。 |
|
|
72
|
+
| `spaceValue` | 可选受控 UI 值 `{ parkIds: [], buildingIds: [] }`,不是业务请求参数。 |
|
|
73
|
+
| `searchOrder` | `last` 默认将搜索输入类字段置后;`original` 保留原顺序。 |
|
|
74
|
+
|
|
75
|
+
`spaceConfig`:
|
|
76
|
+
|
|
77
|
+
| 字段 | 默认/说明 |
|
|
78
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------- |
|
|
79
|
+
| `visible` | 默认 false。空间控件及数据加载总开关。 |
|
|
80
|
+
| `showPark` | 默认显示;关闭时不显示园区控件、不注入 `park`。 |
|
|
81
|
+
| `showBuilding` | 默认显示;关闭时不显示楼栋/空间控件、不注入 `building`。 |
|
|
82
|
+
| `defaultPark` | 默认 true;只决定是否自动选第一园区,不取消初始化和首次确认。false 时可见 `park` 是空值。 |
|
|
83
|
+
| `parkMultiple` | 默认 true;false 为单选园区。 |
|
|
84
|
+
| `buildingMultiple` | 默认 false;控制楼栋/空间单选或多选。 |
|
|
85
|
+
| `size` | `small`、`middle`、`large`,默认 `small`。 |
|
|
86
|
+
| `load` | 自定义 `(signal) => Promise<{ parks, buildings }>`,完全替代默认空间数据加载,须返回完整数据并处理取消。 |
|
|
87
|
+
|
|
88
|
+
```vue
|
|
89
|
+
<!-- 仅按园区过滤,不展示楼栋 -->
|
|
90
|
+
<das-search-form
|
|
91
|
+
layout-mode="toolbar"
|
|
92
|
+
:options="options"
|
|
93
|
+
:space-config="{ visible: true, showPark: true, showBuilding: false, parkMultiple: false }"
|
|
94
|
+
@confirm="searchData"
|
|
95
|
+
/>
|
|
96
|
+
|
|
97
|
+
<!-- 按园区和楼栋/空间过滤 -->
|
|
98
|
+
<das-search-form
|
|
99
|
+
layout-mode="toolbar"
|
|
100
|
+
:options="options"
|
|
101
|
+
:space-config="{ visible: true, showPark: true, showBuilding: true, defaultPark: true }"
|
|
102
|
+
@confirm="searchData"
|
|
103
|
+
/>
|
|
104
|
+
|
|
105
|
+
<!-- 不需要空间过滤 -->
|
|
106
|
+
<das-search-form layout-mode="toolbar" :options="options" @confirm="searchData" />
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
若 `showPark=false, showBuilding=true`,默认数据源没有园区上下文,须由自定义 `load` 提供完整楼栋树。
|
|
110
|
+
|
|
111
|
+
## 查询时序与事件
|
|
112
|
+
|
|
113
|
+
- 启用空间后,首次业务确认等待园区列表/自定义数据加载;启用默认园区时先确定选择。显示楼栋时等待楼栋初始化流程结束后再确认;楼栋加载错误通过 `spaceError` 报告,当前实现可能以空楼栋值继续首次确认,需结合目标已安装版本和业务要求验证。
|
|
114
|
+
- `defaultPark: false` 仍完成空间初始化并首次确认一次;它只关闭首项默认选择。
|
|
115
|
+
- 园区变化由组件清空旧楼栋和普通筛选,加载新空间后确认一次;楼栋实际值变化后确认一次。重复写回相同值不应重复查询。
|
|
116
|
+
- `spaceChange` 只用于 `{ parkIds, buildingIds }` UI 状态同步/界面联动,不能在此请求业务列表或手动调用 `confirm`。
|
|
117
|
+
- `spaceError` 是空间加载错误诊断。不能把空间初始化失败当作成功的空值状态而盲发首次业务查询。楼栋加载错误的具体确认行为需以实际安装版本为准。
|
|
118
|
+
- `resetSearch()` 重置普通字段,触发 `reset` 并内部确认一次,默认保留空间值。reset handler 和表格 watcher 不应再各发一遍。
|
|
119
|
+
- 表格可能晚于 Search.vue 异步挂载,应能立即消费已经提交的搜索状态/ready 状态;不要额外保留无条件 `onMounted` 列表查询。
|
|
120
|
+
- 日期/周期字段回调若自己触发业务请求,要与 toolbar confirm 协调,保证每次用户动作只有预期的一条列表查询路径。
|
|
121
|
+
- 公共空间 query 对当前可见页面生效。缓存 Tab 隐藏/返回时要验证来源切换,不得把另一页面的空间值带入请求。
|
|
122
|
+
|
|
123
|
+
## 暴露方法
|
|
124
|
+
|
|
125
|
+
| 方法 | 用途 |
|
|
126
|
+
| ------------------------------ | ------------------------------------------------ |
|
|
127
|
+
| `confirm()` | 提交普通筛选快照,等待异步字段和空间初始化门禁。 |
|
|
128
|
+
| `resetSearch()` | 重置普通筛选并确认,保留空间值。 |
|
|
129
|
+
| `closeSearch(target)` | 清理指定普通筛选字段并触发 `clearSearch`。 |
|
|
130
|
+
| `treeSelectResetLazyLoad(key)` | 重置普通树筛选项的懒加载。 |
|
|
131
|
+
| `getCollapseStatus()` | 读取工具栏展开状态。 |
|
|
132
|
+
|
|
133
|
+
## 页面验收
|
|
134
|
+
|
|
135
|
+
- 确认是否启用 toolbar 与空间筛选,并以页面 UI/业务需求为依据。
|
|
136
|
+
- 检查首次进入、筛选、日期/周期、重置、分页、Tab 首次进入及缓存返回的请求次数和 initiator。
|
|
137
|
+
- 若启用空间,确认园区/楼栋变化各只触发预期请求,query 稳定使用最新可见值。
|
|
138
|
+
- Network 中空间值只在 query;JSON body 只有业务字段。隐藏空间控件或无空间配置,且业务 body 已移除历史空间字段时,不应出现空间键。
|
|
139
|
+
- 报告运行的检查、Chrome 是否完成及未验证项。
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: das-search-form-toolbar-migration
|
|
3
|
+
description: 将业务页面的 DasSearchForm 迁移到 toolbar 布局,并接入可选的园区/楼栋通用筛选,保证空间初始化、confirm 时序、query 参数和业务查询行为正确。适用于按页面逐项升级,不用于无关组件重构。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# DasSearchForm Toolbar 迁移 Skill
|
|
7
|
+
|
|
8
|
+
## 业务最短提问
|
|
9
|
+
|
|
10
|
+
业务通常只需提供目标页面路径及空间控件期望,AI 应自行检查当前启动项目安装的版本、随包指南、页面链路和请求实现:
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
按当前项目实际安装的 @das-fed/upf-ui search-form skills,升级 <页面路径> 中的 DasSearchForm。
|
|
14
|
+
保留页面现有业务筛选和请求行为,按页面设计决定是否使用园区/楼栋筛选;空间参数由组件/公共请求层处理,
|
|
15
|
+
业务 handler 和 payload 不处理 park/building。检查首次查询、日期、重置、分页时序,完成必要修改和验证,
|
|
16
|
+
并报告改动及未验证项。
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
业务只需补充截图/明确行为(例如“只展示单选园区,不展示楼栋”)。若空间过滤需求无法从页面/设计确定,先追问,不得猜测。
|
|
20
|
+
|
|
21
|
+
## 版本和资料核对
|
|
22
|
+
|
|
23
|
+
1. 从启动项目的 `package.json` 所在目录读取 `node_modules/@das-fed/upf-ui/packages/components/search-form/skills/` 下的主指南、本 Skill 和常见问题。不要误读 monorepo 根或另一个 checkout 的包。
|
|
24
|
+
2. 分别核对 `package.json` 声明、lockfile 解析和实际安装目录/文件。仅实际运行项目解析到的安装包能证明其能力;版本不一致时明确说明,不凭 lockfile 或截图推断。
|
|
25
|
+
3. 已安装版本不含所需 API 时,报告版本阻塞并停止该 API 迁移;不得臆造 prop、从其它源码副本拷贝实现或擅自升级依赖。未经要求不改版本和 lockfile。
|
|
26
|
+
4. 文档与目标已安装包的公开类型/导出/实现不符时,以安装包为准并报告冲突。
|
|
27
|
+
|
|
28
|
+
## 先理解公共契约
|
|
29
|
+
|
|
30
|
+
本 Skill 的核心不是把 `legacy` 改成 `toolbar`,而是把空间筛选从业务请求参数中抽离:
|
|
31
|
+
|
|
32
|
+
- 业务 JSON payload 不定义 `park`、`building`;需要空间过滤时才配置空间控件。
|
|
33
|
+
- Toolbar 内部空间 UI 状态为 `parkIds`、`buildingIds`;`confirm` 第一参数只包含普通筛选快照,第二参数(如有)是 UI 空间状态,不是业务请求 DTO。
|
|
34
|
+
- `createService` 从当前可见 search-form 来源获取空间值,在发送前放进 query,并从 JSON body 删除;后端统一从 query 读取。
|
|
35
|
+
- `spaceChange` 只通知空间状态变化;业务列表请求只从 `@confirm` 触发。
|
|
36
|
+
- 空间初始化、园区切换和楼栋变化都必须保证 query 使用稳定的最新空间值,不能通过业务页面 watcher 另行补请求。
|
|
37
|
+
|
|
38
|
+
源码和测试优先于本文档:
|
|
39
|
+
|
|
40
|
+
- 组件入口:`packages/das-ui/packages/components/search-form/src/Index.vue`
|
|
41
|
+
- toolbar 实现:`.../src/Toolbar.vue`
|
|
42
|
+
- 空间类型:`.../src/toolbar-types.ts`
|
|
43
|
+
- 空间值映射:`.../src/hooks/toolbar-state.ts`
|
|
44
|
+
- 默认空间 API:`.../src/api/park-space.ts`
|
|
45
|
+
- 主指南:`../DasSearchForm升级指南.md`
|
|
46
|
+
|
|
47
|
+
## 迁移步骤
|
|
48
|
+
|
|
49
|
+
1. 读取目标页面和真实 API,盘点普通字段、异步字段回调、分页、日期/重复规则、弹窗提交和所有列表请求路径。
|
|
50
|
+
2. 确认页面是否需要空间筛选。无空间筛选时不要配置 `spaceConfig.visible`,也不要为通用接口强行补 `park/building`。
|
|
51
|
+
3. 若需要空间筛选,逐项确认 `visible`、`showPark`、`showBuilding`、`defaultPark`、`parkMultiple`、`buildingMultiple` 和是否自定义 `load`。
|
|
52
|
+
4. 仅在页面实际采用新版布局时设置 `layout-mode="toolbar"`;保留原 `options`、字段 key/value、业务 handler 和页面辅助状态。
|
|
53
|
+
5. `@confirm` 只处理普通字段;不要在业务层处理空间字段,也不要在 `spaceChange`、字段 `change` 回调或 `@reset` 中重复请求。
|
|
54
|
+
6. 使用 `createService` 发送请求;不在业务 API 手动拼 `park/building` query,不在业务 DTO 保留 `park/building/parkIds/buildingIds`。
|
|
55
|
+
7. 盘点父级首次查询、日期回调、表格挂载、reset 和分页;验证首次进入、默认值、园区/楼栋、重置和 Tab 返回的请求次数与参数。
|
|
56
|
+
|
|
57
|
+
## 空间配置决策
|
|
58
|
+
|
|
59
|
+
| 配置 | 默认 | 关键含义 |
|
|
60
|
+
| ------------------ | -------------- | ------------------------------------------------ |
|
|
61
|
+
| `visible` | `false` | 总开关;关闭时不加载默认园区数据。 |
|
|
62
|
+
| `showPark` | 跟随 `visible` | 显示园区并决定是否输出 `park`。 |
|
|
63
|
+
| `showBuilding` | 跟随 `visible` | 显示空间树并决定是否输出 `building`。 |
|
|
64
|
+
| `defaultPark` | `true` | 是否自动选中首园区;关闭不等于跳过首次查询。 |
|
|
65
|
+
| `parkMultiple` | `true` | 园区多选模式。 |
|
|
66
|
+
| `buildingMultiple` | `false` | 楼栋/空间多选模式。 |
|
|
67
|
+
| `size` | `small` | 空间控件尺寸。 |
|
|
68
|
+
| `load` | 默认数据源 | 返回 `{ parks, buildings }` 的自定义数据适配器。 |
|
|
69
|
+
|
|
70
|
+
重要边界:
|
|
71
|
+
|
|
72
|
+
- 仅园区控件且 `defaultPark=true`:首项加载后查询一次并带 `park`。
|
|
73
|
+
- 仅园区控件且 `defaultPark=false`:仍加载园区并完成首次查询,但首次不带有效 `park`。
|
|
74
|
+
- 园区+楼栋控件:首次查询必须等待园区和楼栋数据初始化完成。
|
|
75
|
+
- `showPark=false, showBuilding=true`:默认数据源没有园区上下文;需要自定义 `load` 提供完整树。
|
|
76
|
+
- 无空间控件:不初始化空间数据,不改变普通业务首次请求。
|
|
77
|
+
|
|
78
|
+
## 事件与方法
|
|
79
|
+
|
|
80
|
+
- `@confirm="searchData"`:toolbar 业务查询入口;第一参数是普通筛选快照,第二参数(若有)是 UI 空间快照,不是 API DTO。
|
|
81
|
+
- `@reset="resetAuxiliary"`:清理业务页面在组件外维护的辅助状态;组件随后自动确认一次。
|
|
82
|
+
- `@space-change="handleSpaceChange"`:接收 `{ parkIds, buildingIds }` 状态快照,只做同步或 UI 联动,不发列表请求。
|
|
83
|
+
- `@space-error="handleSpaceError"`:空间加载错误诊断入口。园区列表初始化失败会阻止首次确认;楼栋树加载错误当前会报告错误并可能继续用空 building 确认,须按已安装版本验证。
|
|
84
|
+
- `v-model:space-value`:需要受控空间状态时使用,值结构为 `{ parkIds, buildingIds }`。
|
|
85
|
+
- `confirm()`:等待字段异步回调和空间门禁后提交查询。
|
|
86
|
+
- `resetSearch()`:恢复普通字段、触发 reset 并确认,默认保留空间值。
|
|
87
|
+
- `closeSearch(target)`:清理普通字段,不清理空间值。
|
|
88
|
+
- `treeSelectResetLazyLoad(key)`:重置普通树字段的懒加载。
|
|
89
|
+
- `getCollapseStatus()`:读取 toolbar 折叠状态。
|
|
90
|
+
|
|
91
|
+
## 推荐接入
|
|
92
|
+
|
|
93
|
+
```vue
|
|
94
|
+
<das-search-form
|
|
95
|
+
ref="searchFormRef"
|
|
96
|
+
layout-mode="toolbar"
|
|
97
|
+
:options="options"
|
|
98
|
+
:space-config="{
|
|
99
|
+
visible: true,
|
|
100
|
+
showPark: true,
|
|
101
|
+
showBuilding: true,
|
|
102
|
+
defaultPark: true,
|
|
103
|
+
parkMultiple: true,
|
|
104
|
+
buildingMultiple: false,
|
|
105
|
+
}"
|
|
106
|
+
@confirm="searchData"
|
|
107
|
+
@reset="resetAuxiliary"
|
|
108
|
+
@space-change="handleSpaceChange"
|
|
109
|
+
/>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
业务 handler 只映射普通筛选字段,沿用既有 `createService` API;不要从 `values` 读取空间字段,不要把第二参数并入 payload/query。空间 UI 值由组件和公共请求层处理。
|
|
113
|
+
|
|
114
|
+
## 验收清单
|
|
115
|
+
|
|
116
|
+
- 首次空间初始化只提交一次业务查询,且不会在空间初始化完成前发送请求;控件可见但无选择时对应 query 值为空。
|
|
117
|
+
- 园区切换后旧楼栋被清空;新空间数据完成后 query 使用新 `park`。
|
|
118
|
+
- 楼栋选择后 query 同时包含最新 `park` 和 `building`,相同值重复回写不重复请求。
|
|
119
|
+
- `park/building` 在 query,JSON body 不包含它们;未配置空间控件的业务不出现这些字段。
|
|
120
|
+
- reset、字段变化、分页和业务回调不会各自重复请求。
|
|
121
|
+
- `options=null/[]` 时普通过滤区域和按钮隐藏,但空间控件仍可独立工作。
|
|
122
|
+
- 运行定向测试、受影响包类型检查和真实页面 Chrome 验证;未验证项必须在结论中说明。
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# DasSearchForm Toolbar 迁移要点与常见问题
|
|
2
|
+
|
|
3
|
+
## 一句话理解
|
|
4
|
+
|
|
5
|
+
业务只负责普通筛选与业务请求;页面是否配置并展示园区/楼栋控件决定空间过滤是否启用;空间值由 search-form 和公共 `createService` 请求层写入 URL query,业务 `confirm`、handler、payload 不处理空间字段。
|
|
6
|
+
|
|
7
|
+
## 业务只给页面路径时,AI 应做什么
|
|
8
|
+
|
|
9
|
+
1. 从启动应用 `package.json` 所在目录读取当前安装包随附的 search-form skills,并核对 manifest、lockfile 及实际安装包版本。
|
|
10
|
+
2. 读取目标 Search.vue、父级搜索状态、列表/分页组件和 API,梳理首次加载、`@confirm`、watch、日期回调、reset、分页和 Tab 缓存请求路径。
|
|
11
|
+
3. 根据页面 UI/需求判定是否要空间过滤。行为不明确时先追问,不擅自添加园区控件。
|
|
12
|
+
4. 保留普通筛选和业务映射,消除旧首次请求与 toolbar 自动确认、日期回调与 confirm 等重复/遗漏请求。
|
|
13
|
+
5. 按影响验证并说明证据;要求 Chrome 时需实际查看页面及 Network,不可用时明确写出。
|
|
14
|
+
|
|
15
|
+
业务方最短提示词见主指南“业务最短提问”。一般只需提供页面路径和必要的 UI 期望,不必复述公共参数实现规则。
|
|
16
|
+
|
|
17
|
+
## 空间行为速查
|
|
18
|
+
|
|
19
|
+
| 页面需求 | 配置与行为 |
|
|
20
|
+
| --------------------- | --------------------------------------------------------------------------------------- |
|
|
21
|
+
| 不按园区/楼栋过滤 | 不启用空间控件;不加载园区、不创建空间 query。 |
|
|
22
|
+
| 只按园区过滤 | `visible: true, showPark: true, showBuilding: false`;园区初始化稳定后才首次确认。 |
|
|
23
|
+
| 按园区和楼栋/空间过滤 | `visible: true, showPark: true, showBuilding: true`;等待园区和所需空间数据就绪后确认。 |
|
|
24
|
+
| 显示楼栋但不显示园区 | 用自定义 `load` 返回完整且有关联信息的楼栋树;默认数据源没有园区上下文。 |
|
|
25
|
+
| 不自动选择首园区 | `defaultPark: false`;仍会初始化和首次确认,可见 park query 是空值语义。 |
|
|
26
|
+
|
|
27
|
+
控件隐藏时组件不注入对应条件。控件可见但未选择时,当前实现保留空值语义,数组经请求层序列化为空字符串;这不同于字段不存在。无空间控件页面不继承其它页面/Tab 的空间值。注意 createService 还会兼容地把调用方旧 JSON body 里的 park/building 移到 query;无空间过滤的业务需移除 body 中遗留字段,不能只看 UI 是否有控件。
|
|
28
|
+
|
|
29
|
+
## 正确的业务请求方式
|
|
30
|
+
|
|
31
|
+
handler 只构造业务字段并沿用项目现有 `createService`:
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
function searchData(values: Record<string, any>) {
|
|
35
|
+
const data = mapBusinessFields(values)
|
|
36
|
+
requestList({ params: { pageIndex: pageIndex.value, pageSize: pageSize.value }, data })
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
不要读取 confirm 的第二个空间 UI 参数,也不要将 park/building 合入 data 或 params。公共请求层会对 GET/POST 注入当前可见页面的空间 query、将数组逗号序列化,并从 JSON body 删除空间字段。
|
|
41
|
+
|
|
42
|
+
## 常见问题
|
|
43
|
+
|
|
44
|
+
### `defaultPark=false` 是否不再有首次查询?
|
|
45
|
+
|
|
46
|
+
不是。它只关闭自动选第一项;空间控件仍会完成初始化,并首次确认一次。可见园区控件未选择时对应 query 为空值。不要为了跳过默认选择而在业务层重新控制首次请求。
|
|
47
|
+
|
|
48
|
+
### 为什么不能在 `spaceChange` 请求列表?
|
|
49
|
+
|
|
50
|
+
该事件通知 `{ parkIds, buildingIds }` 的 UI 状态变化。园区切换还要等待空间树加载;在此事件请求会与组件自己的 confirm 竞争,造成空条件、重复请求或闪烁。它只用于受控 UI 同步/界面联动,列表请求走 `@confirm`。
|
|
51
|
+
|
|
52
|
+
### 园区/楼栋变更后谁负责查询?
|
|
53
|
+
|
|
54
|
+
组件在园区切换并完成新空间加载后确认一次;楼栋实际值变化后确认一次。同值重复回写不应重复确认。展开未加载节点可能产生空间子节点请求,那不是业务列表请求。楼栋树加载错误会触发 `spaceError`;当前实现可能继续以空 building 确认,目标业务不能接受该行为时应基于实际版本复现并报告,不应默认为园区列表失败的阻断语义。
|
|
55
|
+
|
|
56
|
+
### 页面显示园区,Network 却没有 park?
|
|
57
|
+
|
|
58
|
+
依次检查:实际运行的 `@das-fed/upf-ui`/`upf-utils` 版本和导入解析路径;空间控件是否在当前可见页面注册;公共请求是否经过 `createService`;首次请求是否在 ready 之前发出;是否有多份搜索组件/缓存 Tab 导致来源不匹配。不要先在业务 handler 手工加 park,那会掩盖根因并违反参数合同。
|
|
59
|
+
|
|
60
|
+
### 首次结果错误后又刷新/闪一下?
|
|
61
|
+
|
|
62
|
+
在 Network 检查是否同时有父级无条件 `onMounted`、表格初次加载、日期回调和 toolbar 首次 confirm。空间首次请求必须等组件初始化完成;异步表格晚挂载时 watcher 应立即消费已存在的 search/ready 状态,不要增加第二条无条件查询。
|
|
63
|
+
|
|
64
|
+
### 怎么避免日期、重置或分页重复请求?
|
|
65
|
+
|
|
66
|
+
追踪一次用户动作对应的 Network initiator:日期 change/debounce、confirm handler、父级 watcher、reset handler、分页回调是否各自发请求。迁移后保留单一业务查询链,reset 后由组件确认一次,分页通过同一公共请求层读取当前 query。
|
|
67
|
+
|
|
68
|
+
## 禁止模式
|
|
69
|
+
|
|
70
|
+
- 业务 DTO/payload/search state 中出现 `park`、`building`、`parkIds`、`buildingIds`。
|
|
71
|
+
- 在 `spaceChange`、字段 change、watch 或 reset 中补业务列表请求,与组件自动确认竞争。
|
|
72
|
+
- 无视页面需求无条件打开 `spaceConfig.visible`。
|
|
73
|
+
- 依据另一个 checkout 的源码、截图或 lockfile 猜测实际安装包 API。
|
|
74
|
+
- 同时保留旧页面首次请求与 toolbar 自动首次确认。
|
|
75
|
+
|
|
76
|
+
## 验收清单
|
|
77
|
+
|
|
78
|
+
- 说明页面是否启用 toolbar/空间控件及依据。
|
|
79
|
+
- 首次进入、搜索、日期、reset、分页、Tab 首次进入/返回的业务请求次数符合预期。
|
|
80
|
+
- 启用空间时园区/楼栋变化只发生预期查询,query 对应当前页面最新值。
|
|
81
|
+
- Network 中空间条件只在 query,JSON body 只含业务字段;无空间配置时无空间 query。
|
|
82
|
+
- 列出已做的 typecheck/test/build/Chrome 验证及未验证项。
|
|
@@ -1,56 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
labelLength?: string | number;
|
|
6
|
-
showFilterPanel?: boolean;
|
|
7
|
-
layout?: 'horizontal' | 'vertical';
|
|
8
|
-
/**当无过滤面板时,部分设计右侧有间距 */
|
|
9
|
-
isMarginRight?: boolean;
|
|
10
|
-
labelPosition?: 'left' | 'top' | 'right';
|
|
11
|
-
hasBtn?: boolean;
|
|
12
|
-
isExpandAtFocus?: boolean;
|
|
13
|
-
isExpandFilter?: boolean;
|
|
14
|
-
}
|
|
15
|
-
declare var __VLS_1: {}, __VLS_18: any, __VLS_19: {}, __VLS_31: any, __VLS_32: {}, __VLS_50: {}, __VLS_92: any, __VLS_93: {}, __VLS_105: any, __VLS_106: {}, __VLS_119: any, __VLS_120: {};
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
layoutMode?: 'legacy' | 'toolbar';
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_8: string | number, __VLS_9: {};
|
|
16
5
|
type __VLS_Slots = {} & {
|
|
17
|
-
[K in NonNullable<typeof
|
|
18
|
-
} & {
|
|
19
|
-
[K in NonNullable<typeof __VLS_31>]?: (props: typeof __VLS_32) => any;
|
|
20
|
-
} & {
|
|
21
|
-
[K in NonNullable<typeof __VLS_92>]?: (props: typeof __VLS_93) => any;
|
|
22
|
-
} & {
|
|
23
|
-
[K in NonNullable<typeof __VLS_105>]?: (props: typeof __VLS_106) => any;
|
|
24
|
-
} & {
|
|
25
|
-
[K in NonNullable<typeof __VLS_119>]?: (props: typeof __VLS_120) => any;
|
|
26
|
-
} & {
|
|
27
|
-
left?: (props: typeof __VLS_1) => any;
|
|
28
|
-
} & {
|
|
29
|
-
right?: (props: typeof __VLS_50) => any;
|
|
6
|
+
[K in NonNullable<typeof __VLS_8>]?: (props: typeof __VLS_9) => any;
|
|
30
7
|
};
|
|
31
|
-
declare const __VLS_component: import("vue").DefineComponent<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
8
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
9
|
+
closeSearch: (...args: any[]) => any;
|
|
10
|
+
resetSearch: (...args: any[]) => any;
|
|
11
|
+
confirm: (...args: any[]) => any;
|
|
12
|
+
treeSelectResetLazyLoad: (...args: any[]) => any;
|
|
36
13
|
getCollapseStatus: () => any;
|
|
37
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
38
|
-
|
|
39
|
-
clearSearch: (e: any) => any;
|
|
40
|
-
}, string, import("vue").PublicProps, Readonly<DasSearchFormProp> & Readonly<{
|
|
41
|
-
onConfirm?: ((e: any) => any) | undefined;
|
|
42
|
-
onClearSearch?: ((e: any) => any) | undefined;
|
|
43
|
-
}>, {
|
|
44
|
-
options: SearchFormProp[];
|
|
45
|
-
title: string;
|
|
46
|
-
layout: "horizontal" | "vertical";
|
|
47
|
-
labelLength: string | number;
|
|
48
|
-
labelPosition: "left" | "top" | "right";
|
|
49
|
-
isExpandAtFocus: boolean;
|
|
50
|
-
showFilterPanel: boolean;
|
|
51
|
-
isMarginRight: boolean;
|
|
52
|
-
hasBtn: boolean;
|
|
53
|
-
isExpandFilter: boolean;
|
|
14
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
layoutMode: "legacy" | "toolbar";
|
|
54
16
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
55
17
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
56
18
|
export default _default;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { SearchFormProp } from './hooks/searchFormItem';
|
|
2
|
+
interface DasSearchFormProp {
|
|
3
|
+
title?: string;
|
|
4
|
+
options?: SearchFormProp[];
|
|
5
|
+
labelLength?: string | number;
|
|
6
|
+
showFilterPanel?: boolean;
|
|
7
|
+
layout?: 'horizontal' | 'vertical';
|
|
8
|
+
/**当无过滤面板时,部分设计右侧有间距 */
|
|
9
|
+
isMarginRight?: boolean;
|
|
10
|
+
labelPosition?: 'left' | 'top' | 'right';
|
|
11
|
+
hasBtn?: boolean;
|
|
12
|
+
isExpandAtFocus?: boolean;
|
|
13
|
+
isExpandFilter?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare var __VLS_1: {}, __VLS_18: any, __VLS_19: {}, __VLS_31: any, __VLS_32: {}, __VLS_50: {}, __VLS_92: any, __VLS_93: {}, __VLS_105: any, __VLS_106: {}, __VLS_119: any, __VLS_120: {};
|
|
16
|
+
type __VLS_Slots = {} & {
|
|
17
|
+
[K in NonNullable<typeof __VLS_18>]?: (props: typeof __VLS_19) => any;
|
|
18
|
+
} & {
|
|
19
|
+
[K in NonNullable<typeof __VLS_31>]?: (props: typeof __VLS_32) => any;
|
|
20
|
+
} & {
|
|
21
|
+
[K in NonNullable<typeof __VLS_92>]?: (props: typeof __VLS_93) => any;
|
|
22
|
+
} & {
|
|
23
|
+
[K in NonNullable<typeof __VLS_105>]?: (props: typeof __VLS_106) => any;
|
|
24
|
+
} & {
|
|
25
|
+
[K in NonNullable<typeof __VLS_119>]?: (props: typeof __VLS_120) => any;
|
|
26
|
+
} & {
|
|
27
|
+
left?: (props: typeof __VLS_1) => any;
|
|
28
|
+
} & {
|
|
29
|
+
right?: (props: typeof __VLS_50) => any;
|
|
30
|
+
};
|
|
31
|
+
declare const __VLS_component: import("vue").DefineComponent<DasSearchFormProp, {
|
|
32
|
+
/**treeSelect 调用懒加载树刷新 */
|
|
33
|
+
treeSelectResetLazyLoad: (key: string) => void;
|
|
34
|
+
closeSearch: (data: SearchFormProp | any[]) => Promise<void>;
|
|
35
|
+
resetSearch: (isTriggerEvent?: boolean) => Promise<void>;
|
|
36
|
+
getCollapseStatus: () => any;
|
|
37
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
38
|
+
confirm: (e: any) => any;
|
|
39
|
+
clearSearch: (e: any) => any;
|
|
40
|
+
}, string, import("vue").PublicProps, Readonly<DasSearchFormProp> & Readonly<{
|
|
41
|
+
onConfirm?: ((e: any) => any) | undefined;
|
|
42
|
+
onClearSearch?: ((e: any) => any) | undefined;
|
|
43
|
+
}>, {
|
|
44
|
+
options: SearchFormProp[];
|
|
45
|
+
title: string;
|
|
46
|
+
layout: "horizontal" | "vertical";
|
|
47
|
+
labelLength: string | number;
|
|
48
|
+
labelPosition: "left" | "top" | "right";
|
|
49
|
+
isExpandAtFocus: boolean;
|
|
50
|
+
showFilterPanel: boolean;
|
|
51
|
+
isMarginRight: boolean;
|
|
52
|
+
hasBtn: boolean;
|
|
53
|
+
isExpandFilter: boolean;
|
|
54
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
55
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
56
|
+
export default _default;
|
|
57
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { Props } from './hooks/searchFormItem';
|
|
2
|
-
|
|
2
|
+
type __VLS_Props = Props & {
|
|
3
|
+
size?: 'large' | 'default' | 'middle' | 'small' | 'table';
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
6
|
"update:modelValue": (value: any) => any;
|
|
4
7
|
"update:optionValue": (value: string | number) => any;
|
|
5
8
|
selectChange: (value: string | number) => any;
|
|
6
9
|
dateRangeChange: (value: any) => any;
|
|
7
10
|
openDialogHandle: () => any;
|
|
8
11
|
openDialogChange: (value: any) => any;
|
|
9
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
13
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
11
14
|
"onUpdate:optionValue"?: ((value: string | number) => any) | undefined;
|
|
12
15
|
onSelectChange?: ((value: string | number) => any) | undefined;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { SearchFormProp } from './hooks/searchFormItem';
|
|
2
|
+
import type { SpaceConfig, SpaceValue } from './toolbar-types';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
title?: string;
|
|
5
|
+
options?: SearchFormProp[] | null;
|
|
6
|
+
spaceConfig?: SpaceConfig;
|
|
7
|
+
spaceValue?: SpaceValue;
|
|
8
|
+
searchOrder?: 'last' | 'original';
|
|
9
|
+
};
|
|
10
|
+
declare function confirm(): Promise<void>;
|
|
11
|
+
declare function resetSearch(): Promise<void>;
|
|
12
|
+
declare function closeSearch(target: SearchFormProp | SearchFormProp[]): void;
|
|
13
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_31: {}, __VLS_33: {}, __VLS_99: string | undefined, __VLS_100: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
[K in NonNullable<typeof __VLS_99>]?: (props: typeof __VLS_100) => any;
|
|
16
|
+
} & {
|
|
17
|
+
left?: (props: typeof __VLS_1) => any;
|
|
18
|
+
} & {
|
|
19
|
+
space?: (props: typeof __VLS_3) => any;
|
|
20
|
+
} & {
|
|
21
|
+
space?: (props: typeof __VLS_31) => any;
|
|
22
|
+
} & {
|
|
23
|
+
right?: (props: typeof __VLS_33) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
26
|
+
confirm: typeof confirm;
|
|
27
|
+
resetSearch: typeof resetSearch;
|
|
28
|
+
closeSearch: typeof closeSearch;
|
|
29
|
+
getCollapseStatus: () => boolean;
|
|
30
|
+
treeSelectResetLazyLoad: (key: string) => void;
|
|
31
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
|
+
reset: (...args: any[]) => void;
|
|
33
|
+
confirm: (...args: any[]) => void;
|
|
34
|
+
clearSearch: (...args: any[]) => void;
|
|
35
|
+
"update:spaceValue": (...args: any[]) => void;
|
|
36
|
+
spaceChange: (...args: any[]) => void;
|
|
37
|
+
spaceError: (...args: any[]) => void;
|
|
38
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
39
|
+
onReset?: ((...args: any[]) => any) | undefined;
|
|
40
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
41
|
+
onClearSearch?: ((...args: any[]) => any) | undefined;
|
|
42
|
+
"onUpdate:spaceValue"?: ((...args: any[]) => any) | undefined;
|
|
43
|
+
onSpaceChange?: ((...args: any[]) => any) | undefined;
|
|
44
|
+
onSpaceError?: ((...args: any[]) => any) | undefined;
|
|
45
|
+
}>, {
|
|
46
|
+
options: SearchFormProp[] | null;
|
|
47
|
+
title: string;
|
|
48
|
+
spaceConfig: SpaceConfig;
|
|
49
|
+
searchOrder: "last" | "original";
|
|
50
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
52
|
+
export default _default;
|
|
53
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
54
|
+
new (): {
|
|
55
|
+
$slots: S;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SpaceId, SpaceNode } from '../toolbar-types';
|
|
2
|
+
export declare function loadParkOptions(signal: AbortSignal): Promise<SpaceNode[]>;
|
|
3
|
+
export declare function loadParkDetail(parkId: SpaceId, signal: AbortSignal): Promise<any>;
|
|
4
|
+
export declare function extractRegions(detail: any): {
|
|
5
|
+
id: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
}[];
|
|
8
|
+
export declare function loadSpaceChildren(spaceId: SpaceId | '', signal: AbortSignal): Promise<any[]>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
export declare function useCommonSpaceQuery(root: Ref<HTMLElement | undefined>, enabled: () => boolean, read: () => Record<string, any> | undefined, onActive: () => void): {
|
|
3
|
+
isActive: () => boolean;
|
|
4
|
+
notify(): void;
|
|
5
|
+
fail(error: unknown): void;
|
|
6
|
+
dispose(): void;
|
|
7
|
+
};
|
|
@@ -2,34 +2,36 @@ type DateType = 'date' | 'dateTime' | 'week' | 'month' | 'quarter' | 'year' | 't
|
|
|
2
2
|
type DateRangeType = 'dateRange' | 'dateTimeRange' | 'weekRange' | 'monthRange' | 'yearRange' | 'timeRange';
|
|
3
3
|
type FormType = 'input' | 'textarea' | 'password' | 'select' | 'treeSelect' | 'radio' | 'checkbox' | 'switch' | 'custom' | DateType | DateRangeType | 'cascader' | 'colorPicker' | 'selectInput' | 'inputDialogSelect' | 'inputNumber';
|
|
4
4
|
export interface SearchFormProp {
|
|
5
|
-
|
|
5
|
+
/** 查询结果对象中的字段名;未配置时该项不进入查询值。 */
|
|
6
6
|
key?: string;
|
|
7
|
-
/**
|
|
7
|
+
/** 当前控件值,支持普通值或 Vue ref。 */
|
|
8
8
|
value?: any;
|
|
9
|
-
/**
|
|
9
|
+
/** treeSelect 当前选中节点;设置树默认值时同步提供,保证标签和节点状态一致。 */
|
|
10
10
|
checkedNodes?: any[];
|
|
11
|
-
/**
|
|
11
|
+
/** 筛选字段显示名称。 */
|
|
12
12
|
label?: any;
|
|
13
|
-
/**
|
|
13
|
+
/** 控件类型;toolbar 模式会把 searchInput/selectSearch 默认排到字段末尾。 */
|
|
14
14
|
type?: FormType | 'searchInput' | 'selectSearch' | 'selectDateRange' | 'inputSelect';
|
|
15
|
-
|
|
15
|
+
/** legacy 模式中控制字段位于顶部还是过滤面板内部;toolbar 模式不使用此布局字段。 */
|
|
16
16
|
layout?: 'out' | 'inner';
|
|
17
|
-
/**
|
|
17
|
+
/** legacy 已选条件标签是否允许删除。 */
|
|
18
18
|
closable?: boolean;
|
|
19
|
-
/**
|
|
19
|
+
/** 是否启用自定义录入与普通选项切换。 */
|
|
20
20
|
custom?: boolean;
|
|
21
|
-
|
|
21
|
+
/** 自定义录入模式当前是否处于自定义输入状态。 */
|
|
22
22
|
customerActive?: boolean;
|
|
23
|
-
|
|
23
|
+
/** 自定义录入模式的选项配置。 */
|
|
24
24
|
customOption?: any;
|
|
25
|
-
|
|
25
|
+
/** type 为 selectDateRange 时,指定实际日期范围类型。 */
|
|
26
26
|
dateType?: string;
|
|
27
|
-
|
|
27
|
+
/** 日期范围或底层控件的模式;具体取值由对应控件决定。 */
|
|
28
28
|
mode?: string;
|
|
29
|
-
|
|
29
|
+
/** legacy 模式字段变化后是否自动查询;toolbar 模式始终由查询按钮或实例方法提交。 */
|
|
30
30
|
isChangeTrigger?: boolean;
|
|
31
|
-
/**
|
|
31
|
+
/** legacy 字段布局的右侧间距。 */
|
|
32
32
|
marginRight?: string;
|
|
33
|
+
/** 单字段控件尺寸;toolbar 下未配置时,searchInput/selectDateRange/treeSelect 使用 middle。 */
|
|
34
|
+
size?: 'small' | 'middle' | 'large' | 'default' | 'table';
|
|
33
35
|
[idx: string]: any;
|
|
34
36
|
}
|
|
35
37
|
export interface Props {
|