ops-console v1.0.2 (versionCode 8) 源码入库
This commit is contained in:
70
docs/sequence-diagram.mermaid
Normal file
70
docs/sequence-diagram.mermaid
Normal file
@@ -0,0 +1,70 @@
|
||||
%% 主流程:门店编辑(省市区+主题+品牌)
|
||||
sequenceDiagram
|
||||
actor U as 用户
|
||||
participant S as _StoreFormSheet
|
||||
participant RP as RegionPicker
|
||||
participant RD as RegionData
|
||||
participant TG as StoreThemeGrid
|
||||
participant TP as StoreThemePreview
|
||||
participant BE as BrandingEditor
|
||||
participant IP as image_picker
|
||||
participant OS as OrgService
|
||||
participant LC as StoreLocalCache
|
||||
|
||||
U->>S: 打开新增/编辑门店
|
||||
S->>RD: load() (懒加载 province.json)
|
||||
U->>RP: 点「地址」
|
||||
RP->>RD: citiesOf/ districtsOf
|
||||
RP-->>S: provinceCode/cityCode/districtCode + text
|
||||
U->>TG: 点「主题皮肤」
|
||||
TG->>TP: 选 themeId → 预览模拟头部
|
||||
TG-->>S: themeId
|
||||
U->>BE: 点「启动图/Logo」
|
||||
BE->>IP: 选图
|
||||
IP-->>BE: XFile.path
|
||||
BE-->>S: splashUrl/logoUrl (本地路径)
|
||||
U->>S: 点「保存」
|
||||
S->>OS: saveStore(data) [占位]
|
||||
OS->>LC: saveTheme/saveBranding/saveRegion
|
||||
OS-->>S: 完成(未真实上报 TODO)
|
||||
S-->>U: 关闭 sheet, 刷新列表
|
||||
|
||||
%% 设备扫码:查询模式
|
||||
sequenceDiagram
|
||||
actor U as 用户
|
||||
participant DL as device_list_page
|
||||
participant SP as device_scan_page
|
||||
participant MS as mobile_scanner
|
||||
participant DS as DeviceService
|
||||
|
||||
U->>DL: AppBar 扫码图标
|
||||
DL->>SP: go('/device/scan?mode=query')
|
||||
SP->>MS: 实时扫码 / 相册识别
|
||||
MS-->>SP: scanPayload (mac/sn)
|
||||
SP->>DS: fetchDevices(mac: payload)
|
||||
DS-->>SP: Device?
|
||||
alt 命中
|
||||
SP-->>U: go('/device/:id') 跳详情
|
||||
else 未命中
|
||||
SP-->>U: 提示「未找到设备」
|
||||
end
|
||||
|
||||
%% 设备扫码:绑定模式
|
||||
sequenceDiagram
|
||||
actor U as 用户
|
||||
participant DD as device_detail_page
|
||||
participant SP as device_scan_page
|
||||
participant MS as mobile_scanner
|
||||
participant DS as DeviceService
|
||||
participant LC as StoreLocalCache
|
||||
|
||||
U->>DD: 「扫二维码绑定」
|
||||
DD->>SP: go('/device/scan?mode=bind&deviceId=xxx')
|
||||
SP->>MS: 扫码得门店/分组码
|
||||
MS-->>SP: scanPayload
|
||||
SP->>U: 弹窗确认绑定门店/分组
|
||||
U->>SP: 确认
|
||||
SP->>DS: bindDeviceByScan(payload, storeId, groupId) [占位]
|
||||
DS->>LC: updateDevice(groupId/storeName)
|
||||
DS-->>SP: 完成(真实 POST TODO)
|
||||
SP-->>DD: 返回, 展示更新归属
|
||||
Reference in New Issue
Block a user