@szjy/workflow 0.1.32 → 0.1.35
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 +49 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.mjs +22339 -21897
- package/dist/index.umd.js +254 -254
- package/dist/packages/components/Workflow/biz-logic/form-cell/FormAssociatedProperty.vue.d.ts +2 -0
- package/dist/packages/components/Workflow/components/biz/validation/userValidation.d.ts +49 -0
- package/dist/packages/components/Workflow/exposeApi.d.ts +6 -0
- package/dist/packages/components/Workflow/index.vue.d.ts +6 -1
- package/dist/packages/components/Workflow/store/cell-associated/constants.d.ts +56 -0
- package/dist/packages/components/Workflow/store/cell-associated/index.d.ts +37 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -119,6 +119,10 @@ const importXml = (xml) => {
|
|
|
119
119
|
|
|
120
120
|
支持配置电子签章的位置、样式和触发条件。
|
|
121
121
|
|
|
122
|
+
### 单元格关联配置
|
|
123
|
+
|
|
124
|
+
支持为工作流各节点配置单元格(字段)的关联操作,包括记录操作时间和操作人员。可以分别为当前用户和其他用户配置不同的关联规则。
|
|
125
|
+
|
|
122
126
|
### 国际化支持
|
|
123
127
|
|
|
124
128
|
内置中文和英文语言包,支持多语言配置。
|
|
@@ -150,6 +154,9 @@ const importXml = (xml) => {
|
|
|
150
154
|
| updatePermFields | fields: FieldItemType[] | void | 更新表单字段列表 |
|
|
151
155
|
| getEsignJSON | - | EsignJSONLike | 获取电子签章配置 |
|
|
152
156
|
| setEsignConfig | esignJSON: EsignJSONLike | void | 设置电子签章配置 |
|
|
157
|
+
| getCellAssociatedJSON | - | CellAssociatedJSONLike | 获取单元格关联配置 |
|
|
158
|
+
| setCellAssociatedConfig | cellAssociatedJSON: CellAssociatedJSONLike, fields: FieldItemType[] | void | 设置单元格关联配置 |
|
|
159
|
+
| updateCellAssociatedFields | fields: FieldItemType[] | void | 更新单元格关联配置的字段列表 |
|
|
153
160
|
|
|
154
161
|
### 插槽
|
|
155
162
|
|
|
@@ -249,6 +256,48 @@ const permissions = {
|
|
|
249
256
|
workflowRef.value?.setPermissionByFields(permissions, fields)
|
|
250
257
|
```
|
|
251
258
|
|
|
259
|
+
### 单元格关联配置
|
|
260
|
+
|
|
261
|
+
```typescript
|
|
262
|
+
// 字段列表
|
|
263
|
+
const fields = [
|
|
264
|
+
{ id: 'field1', name: '操作时间' },
|
|
265
|
+
{ id: 'field2', name: '操作人员' },
|
|
266
|
+
{ id: 'field3', name: '审批意见' }
|
|
267
|
+
]
|
|
268
|
+
|
|
269
|
+
// 单元格关联配置
|
|
270
|
+
const cellAssociatedConfig = {
|
|
271
|
+
'Activity_1': {
|
|
272
|
+
current: {
|
|
273
|
+
'field1': { opTime: true }, // 当前用户操作时记录操作时间
|
|
274
|
+
'field2': { opUser: true } // 当前用户操作时记录操作人员
|
|
275
|
+
},
|
|
276
|
+
others: {
|
|
277
|
+
'field3': { opTime: true, opUser: true } // 其他用户操作时同时记录时间和人员
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
'Activity_2': {
|
|
281
|
+
current: {
|
|
282
|
+
'field1': { opTime: true }
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// 设置单元格关联配置
|
|
288
|
+
workflowRef.value?.setCellAssociatedConfig(cellAssociatedConfig, fields)
|
|
289
|
+
|
|
290
|
+
// 获取单元格关联配置
|
|
291
|
+
const config = workflowRef.value?.getCellAssociatedJSON()
|
|
292
|
+
console.log('单元格关联配置:', config)
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
配置说明:
|
|
296
|
+
- `opTime`: 是否记录操作时间
|
|
297
|
+
- `opUser`: 是否记录操作人员
|
|
298
|
+
- `current`: 当前用户的配置
|
|
299
|
+
- `others`: 其他用户的配置
|
|
300
|
+
|
|
252
301
|
## 项目开发
|
|
253
302
|
|
|
254
303
|
### 本地开发
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { App } from "vue";
|
|
2
2
|
export * from "./packages/components/components";
|
|
3
|
-
export
|
|
3
|
+
export { PERMISSION_TYPE, ASSIGNEE_MAP_KEY, OTHER_MAP_KEY, DEFAULT_PERM_VALUE_KEY, CREATION_KEY, EDITABLE_KEY, PERMISSION_OPTIONS, convertPermissionArrayToMap, convertTaskPermissionMapToMap, convertPermissionMapToArray, } from './packages/components/Workflow/store/permission/constants';
|
|
4
|
+
export type { PermissionGroupName, PermissionType, FieldItemType as PermissionFieldItemType, TaskPermissionMap, AllTaskPermissionMap, TaskConfig, AllTaskConfigMap, PermissionItem, ExtraInfo as PermissionExtraInfo, FieldPermissionConfig, FieldPermissionConfigMap, FieldPermissionConfigMapNode, PermissionJSONLike, } from './packages/components/Workflow/store/permission/constants';
|
|
5
|
+
export { CURRENT_USER_KEY, OTHER_USER_KEY, CELL_ASSOCIATED_TYPE, CELL_ASSOCIATED_OPTIONS, convertCellAssociatedArrayToMap, convertCellAssociatedMapToArray, convertTaskCellAssociatedMapToMap, } from './packages/components/Workflow/store/cell-associated/constants';
|
|
6
|
+
export type { CellAssociatedGroupName, CellAssociatedConfigType, FieldItemType as CellAssociatedFieldItemType, CellConfigItem, CellAssociatedItem, TaskCellAssociatedMap, AllTaskCellAssociatedMap, CellAssociatedConfigMap, CellAssociatedConfigMapNode, CellAssociatedJSONLike, ExtraInfo as CellAssociatedExtraInfo, } from './packages/components/Workflow/store/cell-associated/constants';
|
|
4
7
|
export { SLOT_NAMES as WORKFLOW_SLOT_NAMES } from './packages/components/Workflow/slots';
|
|
5
8
|
export { default as create } from './packages/components/create';
|
|
6
9
|
declare const _default: {
|