@steedos-labs/plugin-workflow 3.0.15 → 3.0.18

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.
@@ -0,0 +1,222 @@
1
+ # Workflow Template Export/Import
2
+
3
+ ## 概述 Overview
4
+
5
+ 这是一个独立的脚本工具,用于导出和导入工作流模板(表单模板和打印模板),支持从 Blaze 格式转换为 Liquid 格式。
6
+
7
+ This is a standalone script tool for exporting and importing workflow templates (form templates and print templates), supporting conversion from Blaze to Liquid format.
8
+
9
+ ## 安装 Installation
10
+
11
+ 在运行脚本前,需要先安装依赖:
12
+ Before running the script, install dependencies:
13
+
14
+ ```bash
15
+ cd steedos-packages/plugin-workflow
16
+ npm install
17
+ ```
18
+
19
+ 脚本使用原生 MongoDB 驱动连接数据库,连接信息从环境变量 `MONGO_URL` 读取。
20
+ The script uses native MongoDB driver to connect to the database. Connection info is read from `MONGO_URL` environment variable.
21
+
22
+ ## 快速开始 Quick Start
23
+
24
+ ```bash
25
+ cd steedos-packages/plugin-workflow
26
+
27
+ # 导出所有模板 Export all templates
28
+ node run.js export
29
+
30
+ # 导出特定流程 Export specific flow
31
+ node run.js export <flowId>
32
+
33
+ # 转换 .blaze 文件为 .liquid (手动或使用 Copilot)
34
+ # Convert .blaze files to .liquid (manually or with Copilot)
35
+
36
+ # 导入转换后的模板 Import converted templates
37
+ node run.js import <flowId>
38
+ ```
39
+
40
+ ## 目录结构 Directory Structure
41
+
42
+ ```
43
+ flows-template/
44
+ ├── {flowId}.instance_template.blaze # 导出的表单模板 (Blaze 格式)
45
+ ├── {flowId}.print_template.blaze # 导出的打印模板 (Blaze 格式)
46
+ ├── {flowId}.fields.json # 字段定义
47
+ ├── {flowId}.instance_template.liquid # 转换后的表单模板 (Liquid 格式,用于导入)
48
+ └── {flowId}.print_template.liquid # 转换后的打印模板 (Liquid 格式,用于导入)
49
+ ```
50
+
51
+ ## 命令使用 Commands
52
+
53
+ ### 导出模板 Export Templates
54
+
55
+ ```bash
56
+ # 导出所有包含模板的流程
57
+ # Export all flows with templates
58
+ node run.js export
59
+
60
+ # 导出特定流程
61
+ # Export specific flow
62
+ node run.js export <flowId>
63
+
64
+ # 导出到自定义目录
65
+ # Export to custom directory
66
+ node run.js export <flowId> /path/to/output
67
+ ```
68
+
69
+ **示例 Example:**
70
+ ```bash
71
+ node run.js export abc123
72
+ ```
73
+
74
+ **输出 Output:**
75
+ ```
76
+ Found 1 flow(s) to export.
77
+
78
+ Exporting flow: Leave Request (abc123)
79
+ ✓ abc123.instance_template.blaze
80
+ ✓ abc123.print_template.blaze
81
+ ✓ abc123.fields.json
82
+ Exported 3 file(s)
83
+
84
+ ✅ Export completed. Files saved to: /path/to/flows-template
85
+ ```
86
+
87
+ ### 导入模板 Import Templates
88
+
89
+ ```bash
90
+ # 导入流程的所有模板
91
+ # Import both templates for a flow
92
+ node run.js import <flowId>
93
+
94
+ # 仅导入表单模板
95
+ # Import only instance_template
96
+ node run.js import <flowId> instance_template
97
+
98
+ # 仅导入打印模板
99
+ # Import only print_template
100
+ node run.js import <flowId> print_template
101
+
102
+ # 从自定义目录导入
103
+ # Import from custom directory
104
+ node run.js import <flowId> instance_template /path/to/input
105
+ ```
106
+
107
+ **示例 Example:**
108
+ ```bash
109
+ node run.js import abc123
110
+ ```
111
+
112
+ **输出 Output:**
113
+ ```
114
+ Importing templates for flow: Leave Request (abc123)
115
+ ℹ Backing up old instance_template to instance_template_backup
116
+ ✓ Imported instance_template from abc123.instance_template.liquid
117
+ ℹ Backing up old print_template to print_template_backup
118
+ ✓ Imported print_template from abc123.print_template.liquid
119
+
120
+ ✅ Import completed. Imported 2 template(s).
121
+ - instance_template: updated (old value backed up)
122
+ - print_template: updated (old value backed up)
123
+ ```
124
+
125
+ ## 工作流程 Workflow
126
+
127
+ 1. **导出 Export**: 运行导出命令,将模板保存为 `.blaze` 文件
128
+ 2. **转换 Convert**: 使用 Copilot 或其他工具将 `.blaze` 文件转换为 `.liquid` 格式
129
+ 3. **导入 Import**: 运行导入命令,将转换后的 `.liquid` 模板加载回数据库
130
+ 4. **备份 Backup**: 导入时自动备份旧模板到 `{模板名}_backup` 字段
131
+
132
+ ## 备份字段 Backup Fields
133
+
134
+ 导入模板时,旧值会自动备份到:
135
+ When importing templates, old values are backed up to:
136
+
137
+ - `instance_template_backup`: 表单模板备份 (Form template backup)
138
+ - `print_template_backup`: 打印模板备份 (Print template backup)
139
+
140
+ 这些备份字段在界面中隐藏,但可以通过程序访问。
141
+ These backup fields are hidden in the UI but can be accessed programmatically.
142
+
143
+ ## 字段定义 Field Definitions
144
+
145
+ `.fields.json` 文件包含表单的字段定义(来自 `current.fields`),为模板转换工具(如 Copilot)提供字段结构和类型的上下文信息。
146
+
147
+ The `.fields.json` file contains field definitions from the form's `current.fields`, providing context about field structure and types for conversion tools like Copilot.
148
+
149
+ **示例 Example:**
150
+ ```json
151
+ [
152
+ {
153
+ "_id": "field1",
154
+ "code": "userName",
155
+ "name": "User Name",
156
+ "type": "text",
157
+ "is_required": true
158
+ },
159
+ {
160
+ "_id": "field2",
161
+ "code": "requestDate",
162
+ "name": "Request Date",
163
+ "type": "date",
164
+ "is_required": true
165
+ }
166
+ ]
167
+ ```
168
+
169
+ ## 数据库配置 Database Configuration
170
+
171
+ 脚本使用环境变量配置的 MongoDB 连接(通过 `.env` 文件中的 `MONGO_URL`)。
172
+
173
+ The script uses the MongoDB connection configured via environment variables (through `MONGO_URL` in `.env` file).
174
+
175
+ ## 错误处理 Error Handling
176
+
177
+ 脚本提供清晰的错误信息:
178
+ The script provides clear error messages:
179
+
180
+ - `Flow not found: abc123` - 验证流程 ID 是否存在 (Verify the flow ID exists)
181
+ - `No template files found for flow abc123` - 确保 `.liquid` 文件存在 (Ensure `.liquid` files exist)
182
+ - `Permission denied reading file` - 检查文件权限 (Check file permissions)
183
+ - `No flows found with templates` - 没有包含模板的流程 (No flows have templates)
184
+
185
+ ## 使用提示 Tips
186
+
187
+ 1. 导入模板前务必备份数据库 (Always backup your database before importing)
188
+ 2. 旧模板值会自动备份到 `{模板名}_backup` 字段 (Old values are automatically backed up)
189
+ 3. 先在开发环境测试导入 (Test imports in development environment first)
190
+ 4. 使用字段定义了解模板结构 (Use field definitions to understand template structure)
191
+ 5. 导入前仔细检查转换后的模板 (Review converted templates carefully before importing)
192
+ 6. `flows-template` 目录自动被 git 忽略 (The directory is automatically ignored by git)
193
+
194
+ ## 完整示例 Complete Example
195
+
196
+ ```bash
197
+ # 1. 导出模板 Export templates
198
+ cd steedos-packages/plugin-workflow
199
+ node run.js export abc123
200
+
201
+ # 2. 查看导出的文件 View exported files
202
+ ls -la flows-template/
203
+ # abc123.instance_template.blaze
204
+ # abc123.print_template.blaze
205
+ # abc123.fields.json
206
+
207
+ # 3. 转换模板 Convert templates
208
+ # 使用 Copilot 或手动将 .blaze 文件转换为 .liquid
209
+ # Use Copilot or manually convert .blaze files to .liquid
210
+ #
211
+ # 示例转换 Example conversion:
212
+ # {{#if userName}} → {% if userName %}
213
+ # {{userName}} → {{ userName }}
214
+ # {{/if}} → {% endif %}
215
+
216
+ # 4. 导入转换后的模板 Import converted templates
217
+ node run.js import abc123
218
+
219
+ # 5. 验证 Verify
220
+ # 检查数据库中的 flows 记录,确认模板已更新且备份已创建
221
+ # Check flows record in database to confirm templates are updated and backups are created
222
+ ```
@@ -0,0 +1,51 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const converter = require('./src/util/templateConverter');
4
+
5
+ const convertDir = path.join(__dirname, 'flows-template/export');
6
+
7
+ if (!fs.existsSync(convertDir)) {
8
+ console.error(`Directory not found: ${convertDir}`);
9
+ process.exit(1);
10
+ }
11
+
12
+ console.log('==========================================');
13
+ console.log('开始转换模板 (Blaze -> Liquid + AMIS)');
14
+ console.log('==========================================');
15
+
16
+ const blazeFiles = fs.readdirSync(convertDir).filter(f => f.endsWith('.blaze'));
17
+ const fieldsCache = {}; // Cache fields.json content
18
+
19
+ blazeFiles.forEach(file => {
20
+ const content = fs.readFileSync(path.join(convertDir, file), 'utf8');
21
+ const flowId = file.split('.')[0];
22
+ const isPrint = file.includes('print_template');
23
+
24
+ // Load fields def
25
+ let fields = fieldsCache[flowId];
26
+ if (!fields) {
27
+ const fieldsPath = path.join(convertDir, `${flowId}.fields.json`);
28
+ if (fs.existsSync(fieldsPath)) {
29
+ try {
30
+ // Read fields as array
31
+ fields = JSON.parse(fs.readFileSync(fieldsPath, 'utf8'));
32
+ fieldsCache[flowId] = fields;
33
+ } catch (e) {
34
+ console.error(`Error parsing fields for ${flowId}:`, e.message);
35
+ }
36
+ }
37
+ }
38
+
39
+ try {
40
+ const newContent = converter.convertTemplate(content, fields, isPrint);
41
+ const newFile = file.replace('.blaze', '.liquid');
42
+ fs.writeFileSync(path.join(convertDir, newFile), newContent);
43
+ console.log(`✓ ${file} -> ${newFile}`);
44
+ } catch (error) {
45
+ console.error(`✗ Failed to convert ${file}:`, error.message);
46
+ }
47
+ });
48
+
49
+ console.log('==========================================');
50
+ console.log('转换完成');
51
+ console.log('==========================================');
@@ -27,6 +27,21 @@ nav_schema: {
27
27
  "size": "none",
28
28
  "className": "instances-sidebar-wrapper mt-1 bg-white",
29
29
  "body": [
30
+ {
31
+ "type": "button",
32
+ "label": "刷新",
33
+ "className": "instance-nav-reload hidden",
34
+ "onEvent": {
35
+ "click": {
36
+ "actions": [
37
+ {
38
+ "actionType": "rebuild",
39
+ "componentId": "u:instanceNav"
40
+ }
41
+ ]
42
+ }
43
+ }
44
+ },
30
45
  {
31
46
  "type": "service",
32
47
  "id": "u:instanceNav",
@@ -41,117 +56,16 @@ nav_schema: {
41
56
  }
42
57
  },
43
58
  "body": [
44
- {
45
- "type": "button",
46
- "label": "刷新",
47
- "className": "instance-nav-reload hidden",
48
- "onEvent": {
49
- "click": {
50
- "actions": [
51
- {
52
- "actionType": "reload",
53
- "componentId": "u:instanceNav"
54
- }
55
- ]
56
- }
57
- }
58
- },
59
- {
60
- "type": "input-tree",
61
- "name": "tree",
62
- "treeContainerClassName": "h-full bg-white",
63
- "className": "instance-box-tree h-full w-full p-0 bg-white",
64
- "id": "u:9f3dd961ca12",
65
- "stacked": true,
66
- "multiple": false,
67
- "enableNodePath": false,
68
- "hideRoot": true,
69
- "showIcon": true,
70
- "initiallyOpen": false,
71
- "virtualThreshold": 100000,
72
- "value": "${value}",
73
- "size": "md",
74
- "onEvent": {
75
- "change": {
76
- "actions": [
77
- {
78
- "actionType": "setValue",
79
- "componentId": "instances_list_service",
80
- "args": {
81
- "value": {
82
- "isFlowDataDone": false
83
- }
84
- }
85
- },
86
- {
87
- "actionType": "custom",
88
- "script": "//获取上一次的flowId和categoryId\nconst lastFlowId = event.data.flowId;\nconst lastCategoryId = event.data.categoryId;\n//从value中获取最新的flowId\nvar flowIdRegex = /&flowId=([^&]+)/;\nvar flowIdMatch = event.data.value.match(flowIdRegex);\nconst flowId = flowIdMatch && flowIdMatch.length > 0 ? flowIdMatch[1] : \"\";\n//从value中获取最新的categoryId\nvar categoryIdRegex = /&categoryId=([^&]+)/;\nvar categoryIdMatch = event.data.value.match(categoryIdRegex);\nconst categoryId = categoryIdMatch && categoryIdMatch.length > 0 ? categoryIdMatch[1] : \"\";\n//获取上一次的listname和最新的listname\nconst lastListName = event.data.listName;\nconst listName = event.data.value.split('?')[0].split('instances/grid/')[1];\n//切换流程时清除过滤条件\nif (lastListName == \"monitor\" && listName == \"monitor\" && (flowId != lastFlowId || categoryId != lastCategoryId)) {\n listViewPropsStoreKey = window.location.pathname + \"/crud\";\n sessionStorage.removeItem(listViewPropsStoreKey);\n sessionStorage.removeItem(listViewPropsStoreKey + \"/query\");\n}"
89
- },
90
- {
91
- "actionType": "setValue",
92
- "componentId": "instances_list_service",
93
- "args": {
94
- "value": {
95
- "additionalFilters": [
96
- "${event.data.options.name}",
97
- "=",
98
- "${event.data.options.value}"
99
- ]
100
- }
101
- },
102
- "expression": "${event.data.options.level>=10}"
103
- },
104
- {
105
- "args": {
106
- "link": "${event.data.value}",
107
- "blank": false
108
- },
109
- "actionType": "link"
110
- }
111
- ]
112
- }
113
- },
114
- "menuTpl": {
115
- "type": "wrapper",
116
- "className": "flex items-center py-1.5 px-3 m-0 rounded-md transition-colors duration-150",
117
- "body": [
118
- {
119
- "type": "tpl",
120
- "className": "flex-1 leading-6 truncate instance-menu-label",
121
- "tpl": "${label}",
122
- "id": "u:9dee51f00db4"
123
- },
124
- {
125
- "type": "tpl",
126
- "className": "ml-auto",
127
- "tpl": "",
128
- "badge": {
129
- "className": "h-0",
130
- "offset": [
131
- -5,
132
- 0
133
- ],
134
- "mode": "text",
135
- "text": "${tag | toInt}",
136
- "overflowCount": 999
137
- },
138
- "id": "u:2329cd1fecc2"
139
- }
140
- ],
141
- "id": "u:545154bcc334"
142
- },
143
- "unfoldedLevel": 2,
144
- "source": "${options}"
145
- }
146
59
  ],
147
- "api": {
60
+ "schemaApi": {
148
61
  "method": "get",
149
62
  "url": "${context.rootUrl}/api/${appId}/workflow/nav",
150
63
  "headers": {
151
64
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"
152
65
  },
153
66
  "messages": {},
154
- "adaptor": "payload.data.value = window.location.pathname + decodeURIComponent(window.location.search); return payload;"
67
+ "adaptor": "payload.data.value = window.location.pathname + decodeURIComponent(window.location.search);\n// return payload;\n\n\nreturn {\n \"type\": \"service\",\n \"data\": payload.data,\n \"body\": [{\n \"type\": \"input-tree\",\n \"name\": \"tree\",\n \"treeContainerClassName\": \"h-full bg-white\",\n \"className\": \"instance-box-tree h-full w-full p-0 bg-white\",\n \"id\": \"u:9f3dd961ca12\",\n \"stacked\": true,\n \"multiple\": false,\n \"enableNodePath\": false,\n \"hideRoot\": true,\n \"showIcon\": true,\n \"initiallyOpen\": false,\n \"virtualThreshold\": 100000,\n \"value\": \"${value}\",\n \"size\": \"md\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"setValue\",\n \"componentId\": \"instances_list_service\",\n \"args\": {\n \"value\": {\n \"isFlowDataDone\": false\n }\n }\n },\n {\n \"actionType\": \"custom\",\n \"script\": \"//获取上一次的flowId和categoryId\\nconst lastFlowId = event.data.flowId;\\nconst lastCategoryId = event.data.categoryId;\\n//从value中获取最新的flowId\\nvar flowIdRegex = /&flowId=([^&]+)/;\\nvar flowIdMatch = event.data.value.match(flowIdRegex);\\nconst flowId = flowIdMatch && flowIdMatch.length > 0 ? flowIdMatch[1] : \\\"\\\";\\n//从value中获取最新的categoryId\\nvar categoryIdRegex = /&categoryId=([^&]+)/;\\nvar categoryIdMatch = event.data.value.match(categoryIdRegex);\\nconst categoryId = categoryIdMatch && categoryIdMatch.length > 0 ? categoryIdMatch[1] : \\\"\\\";\\n//获取上一次的listname和最新的listname\\nconst lastListName = event.data.listName;\\nconst listName = event.data.value.split('?')[0].split('instances/grid/')[1];\\n//切换流程时清除过滤条件\\nif (lastListName == \\\"monitor\\\" && listName == \\\"monitor\\\" && (flowId != lastFlowId || categoryId != lastCategoryId)) {\\n listViewPropsStoreKey = window.location.pathname + \\\"/crud\\\";\\n sessionStorage.removeItem(listViewPropsStoreKey);\\n sessionStorage.removeItem(listViewPropsStoreKey + \\\"/query\\\");\\n}\"\n },\n {\n \"actionType\": \"setValue\",\n \"componentId\": \"instances_list_service\",\n \"args\": {\n \"value\": {\n \"additionalFilters\": [\n \"${event.data.options.name}\",\n \"=\",\n \"${event.data.options.value}\"\n ]\n }\n },\n \"expression\": \"${event.data.options.level>=10}\"\n },\n {\n \"args\": {\n \"link\": \"${event.data.value}\",\n \"blank\": false\n },\n \"actionType\": \"link\"\n }\n ]\n }\n },\n \"menuTpl\": {\n \"type\": \"wrapper\",\n \"className\": \"flex items-center py-1.5 px-3 m-0 rounded-md transition-colors duration-150\",\n \"body\": [\n {\n \"type\": \"tpl\",\n \"className\": \"flex-1 leading-6 truncate instance-menu-label\",\n \"tpl\": \"${label}\",\n \"id\": \"u:9dee51f00db4\"\n },\n {\n \"type\": \"tpl\",\n \"className\": \"ml-auto\",\n \"tpl\": \"\",\n \"badge\": {\n \"className\": \"h-0\",\n \"offset\": [\n -5,\n 0\n ],\n \"mode\": \"text\",\n \"text\": \"${tag | toInt}\",\n \"overflowCount\": 999\n },\n \"id\": \"u:2329cd1fecc2\"\n }\n ],\n \"id\": \"u:545154bcc334\"\n },\n \"unfoldedLevel\": 2,\n \"source\": \"${options}\"\n }]\n}"
68
+ # "adaptor": "payload.data.value = window.location.pathname + decodeURIComponent(window.location.search); return payload;"
155
69
  },
156
70
  "messages": {},
157
71
  "dsType": "api"
@@ -456,12 +456,28 @@ fields:
456
456
  language: html
457
457
  is_wide: true
458
458
  group: template
459
+ instance_template_backup:
460
+ label: Form Template Backup
461
+ type: code
462
+ language: html
463
+ is_wide: true
464
+ group: template
465
+ hidden: true
466
+ omit: true
459
467
  print_template:
460
468
  label: Print Template
461
469
  type: code
462
470
  language: html
463
471
  is_wide: true
464
472
  group: template
473
+ print_template_backup:
474
+ label: Print Template Backup
475
+ type: code
476
+ language: html
477
+ is_wide: true
478
+ group: template
479
+ hidden: true
480
+ omit: true
465
481
  name_formula:
466
482
  label: Formula of Title
467
483
  type: text
@@ -32,6 +32,10 @@ amis_schema: |-
32
32
  {
33
33
  "actionType": "custom",
34
34
  "script":"window.$('.list-view-btn-reload').click()"
35
+ },
36
+ {
37
+ "actionType": "custom",
38
+ "script":"window.$('.instance-nav-reload').click()"
35
39
  }
36
40
  ],
37
41
  "weight": 0
@@ -71,6 +71,10 @@ amis_schema: |-
71
71
  {
72
72
  "actionType": "custom",
73
73
  "script":"window.$('.list-view-btn-reload').click()"
74
+ },
75
+ {
76
+ "actionType": "custom",
77
+ "script":"window.$('.instance-nav-reload').click()"
74
78
  }
75
79
  ]
76
80
  }
@@ -350,8 +350,67 @@
350
350
  ".steedos-amis-instance-view .form-control .antd-Table-table tbody tr:last-child td": {
351
351
  "border-right": "0px"
352
352
  },
353
+ ".steedos-instance-related-view-wrapper .instance-form-view": {
354
+ "table-layout": "fixed !important",
355
+ "width": "100% !important"
356
+ },
357
+ ".steedos-instance-related-view-wrapper .steedos-input-table": {
358
+ "width": "100% !important",
359
+ "display": "block !important"
360
+ },
361
+ ".steedos-instance-related-view-wrapper .antd-Table-contentWrap": {
362
+ "overflow-x": "auto !important",
363
+ "display": "block !important",
364
+ "width": "100% !important"
365
+ },
353
366
  ".antd-Table-content-colDragLine": {
354
367
  "display": "none !important"
368
+ },
369
+ "@media print": {
370
+ "html, body, #root, #main, .creator-content-wrapper, .builder-component, .builder-content, .builder-blocks, .builder-block, .amis-scope, .amis-routes-wrapper": {
371
+ "width": "100% !important",
372
+ "height": "auto !important",
373
+ "overflow": "visible !important",
374
+ "display": "block !important",
375
+ "position": "static !important"
376
+ },
377
+ ".resize-sensor, .no-print, .antd-Page-toolbar, .steedos-global-header-root": {
378
+ "display": "none !important"
379
+ },
380
+ ".steedos-instance-related-view-wrapper, .steedos-instance-related-view-wrapper .antd-Page-content, .steedos-instance-related-view-wrapper .antd-Page-main, .steedos-instance-related-view-wrapper .antd-Page-body, .steedos-instance-related-view-wrapper .steedos-instance-detail-wrapper, .steedos-instance-related-view-wrapper .antd-Service, .steedos-instance-related-view-wrapper .antd-Wrapper, .steedos-instance-related-view-wrapper .steedos-amis-instance-view, .steedos-instance-related-view-wrapper .steedos-amis-instance-view-body, .steedos-instance-related-view-wrapper .steedos-amis-instance-view-content, .steedos-instance-related-view-wrapper .liquid-amis-container": {
381
+ "display": "block !important",
382
+ "height": "auto !important",
383
+ "width": "100% !important",
384
+ "overflow": "visible !important",
385
+ "flex": "none !important",
386
+ "position": "static !important"
387
+ },
388
+ ".steedos-instance-related-view-wrapper .instance-form": {
389
+ "margin": "0 auto",
390
+ "width": "100% !important",
391
+ "max-width": "100% !important"
392
+ },
393
+ ".steedos-instance-related-view-wrapper .instance-form-view": {
394
+ "table-layout": "fixed !important",
395
+ "width": "100% !important"
396
+ },
397
+ ".steedos-instance-related-view-wrapper .steedos-input-table": {
398
+ "width": "100% !important",
399
+ "display": "block !important"
400
+ },
401
+ ".steedos-instance-related-view-wrapper .antd-Table-contentWrap": {
402
+ "overflow-y": "visible !important",
403
+ "overflow-x": "auto !important",
404
+ "display": "block !important",
405
+ "width": "100% !important",
406
+ "height": "auto !important"
407
+ },
408
+ ".steedos-instance-related-view-wrapper .instance-form-view td": {
409
+ "border-width": "1px !important"
410
+ },
411
+ ".steedos-instance-related-view-wrapper .instance-approve-history .antd-Table-table tr td": {
412
+ "border-bottom": "1px solid #e8e8e8 !important"
413
+ }
355
414
  }
356
415
  },
357
416
  "wrapperCustomStyle": {}
@@ -513,7 +513,7 @@ const FlowversionAPI = {
513
513
  <meta name="mobile-web-app-capable" content="yes">
514
514
  <meta name="theme-color" content="#000">
515
515
  <meta name="application-name">
516
- <script type="text/javascript" src="/unpkg.com/jquery@1.11.2/dist/jquery.min.js"></script>
516
+ <script type="text/javascript" src="/unpkg.com/jquery@3.7.1/dist/jquery.min.js"></script>
517
517
  <script type="text/javascript" src="/unpkg.com/mermaid@9.1.2/dist/mermaid.min.js"></script>
518
518
  <style>
519
519
  body {
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "@steedos-labs/plugin-workflow",
3
- "version": "3.0.15",
3
+ "version": "3.0.18",
4
4
  "main": "package.service.js",
5
5
  "license": "MIT",
6
6
  "scripts": {
7
7
  "build:watch": "tsc --watch",
8
- "release": "npm publish --registry https://registry.npmjs.org && npx cnpm sync @steedos-labs/plugin-workflow"
8
+ "release": "npm publish --registry https://registry.npmjs.org && npx cnpm sync @steedos-labs/plugin-workflow",
9
+ "export-templates": "node run.js export",
10
+ "convert-templates": "node convert-templates.js"
9
11
  },
10
12
  "dependencies": {
11
13
  "graphql-parse-resolve-info": "^4.12.3",
@@ -597,6 +597,109 @@ tbody .color-priority-muted *{
597
597
  }
598
598
 
599
599
 
600
+ .instance-form,.instance-template .td-title{
601
+ text-align: center;
602
+ }
603
+
604
+ .instance-form .td-childfield{
605
+ text-align: left;
606
+ }
607
+
608
+ .instance-template .table-page-body .antd-Form-label{
609
+ display: none !important;
610
+ }
611
+
612
+ .instance-form .form-table {
613
+ border-collapse: collapse;
614
+ border: 2px solid black;
615
+ }
616
+ .instance-form .form-table td {
617
+ border: 1px solid black;
618
+ padding: 4px 6px;
619
+ border-collapse: collapse;
620
+ }
621
+
622
+ .instance-form .td-childfield{
623
+ padding: 0 !important;
624
+ border: none !important;
625
+ }
626
+
627
+
628
+ /* 1. 基础设置:合并边框并去掉表格容器的外边框 */
629
+ .instance-form .antd-Table-table {
630
+ border-collapse: collapse;
631
+ border: none !important; /* 强制移除最外层边框 */
632
+ }
633
+
634
+ /* 2. 给所有单元格添加边框(内部边框) */
635
+ .instance-form .antd-Table-table th,
636
+ .instance-form .antd-Table-table td {
637
+ border: 1px solid #000; /* 这里可以修改你想要的颜色,比如 #000 */
638
+ padding: 8px; /* 适当增加间距更美观 */
639
+ }
640
+
641
+ /* 3. 移除最左侧和最右侧的垂直边框 */
642
+ .instance-form .antd-Table-table tr th:first-child,
643
+ .instance-form .antd-Table-table tr td:first-child {
644
+ border-left: none;
645
+ }
646
+ .instance-form .antd-Table-table tr th:last-child,
647
+ .instance-form .antd-Table-table tr td:last-child {
648
+ border-right: none;
649
+ }
650
+
651
+ /* 4. 移除最顶部和最底部的水平边框 */
652
+ .instance-form .antd-Table-table thead tr:first-child th {
653
+ border-top: none;
654
+ }
655
+ .instance-form .antd-Table-table tbody tr:last-child td {
656
+ border-bottom: none;
657
+ }
658
+
659
+ .instance-form .steedos-input-table .antd-Service>.antd-Form-item {
660
+ margin-bottom: 0px !important;
661
+ }
662
+
663
+
664
+ .instance-form .steedos-input-table .antd-Table-table colgroup col:nth-child(2) {
665
+ width: 0px !important;
666
+ min-width: 0px !important;
667
+ }
668
+
669
+ .instance-form .steedos-input-table .antd-Table-table thead tr th:first-child {
670
+ width: 60px;
671
+ }
672
+
673
+ .instance-form .steedos-input-table .antd-Table-table thead .antd-Table-operationCell {
674
+ width: 0px !important;
675
+ }
676
+
677
+ .instance-form .steedos-input-table .antd-Table-table .steedos-input-table-column-operation {
678
+ border: none !important;
679
+ }
680
+
681
+ .instance-form .steedos-input-table .antd-Table-table .steedos-input-table-column-operation .antd-OperationField {
682
+ margin-left: -55px;
683
+ }
684
+
685
+ .instance-form td .loading {
686
+ display: none !important;
687
+ }
688
+
689
+
690
+ .instance-form .antd-Table-headToolbar{
691
+ display: none !important;
692
+ }
693
+
694
+ .table-page-title{
695
+ border: none !important;
696
+ }
697
+
698
+ .instance-name .page-title{
699
+ text-align: center;
700
+ border: none !important;
701
+ }
702
+
600
703
  /* 公共打印隐藏样式 */
601
704
  @media print {
602
705
  .no-print {