@cloudbase/weda-ui 3.4.9 → 3.4.11

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.
Files changed (70) hide show
  1. package/dist/configs/components/wd-table.js +1 -1
  2. package/dist/web/components/calendar/index.js +1 -1
  3. package/dist/web/components/form/enumSelect/MultipleSelect.js +1 -0
  4. package/dist/web/components/form/enumSelect/SelectContainer.js +1 -0
  5. package/dist/web/components/form/input/index.js +11 -5
  6. package/dist/web/components/form/location/components/LocationPC/Header.js +1 -0
  7. package/dist/web/components/form/location/index.js +1 -0
  8. package/dist/web/components/form/select/request.js +14 -2
  9. package/dist/web/components/form/uploader/uploader.h5.js +1 -1
  10. package/dist/web/components/form/uploader/uploader.pc.js +3 -2
  11. package/dist/web/components/form/uploaderFile/index.js +2 -0
  12. package/dist/web/components/form/userOrgSelect/common/fetch-data-service.js +47 -43
  13. package/dist/web/components/form/userOrgSelect/common/utils.js +0 -20
  14. package/dist/web/components/form/userOrgSelect/component/depart-select/depart-select-pc.js +8 -3
  15. package/dist/web/components/form/userOrgSelect/component/depart-select/index.js +18 -14
  16. package/dist/web/components/form/userOrgSelect/component/depart-select/org-modal-pc.js +14 -20
  17. package/dist/web/components/form/userOrgSelect/component/modal-select-h5.js +1 -1
  18. package/dist/web/components/form/userOrgSelect/component/org-tree.js +1 -3
  19. package/dist/web/components/form/userOrgSelect/component/user-select-h5/index.js +4 -29
  20. package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-model.js +7 -2
  21. package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-select-pc.js +4 -6
  22. package/dist/web/components/form/userOrgSelect/component/userOrgSelect.css +2 -8
  23. package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +51 -25
  24. package/dist/web/components/form-input-hooks/index.js +2 -1
  25. package/dist/web/components/repeater/index.js +1 -0
  26. package/dist/web/components/repeater-item/index.js +1 -0
  27. package/dist/web/components/statusContent/index.js +1 -0
  28. package/dist/web/components/table/ImportFileModalByApi/uploadCSVFile.js +1 -1
  29. package/dist/web/components/wd-form/index.js +3 -2
  30. package/dist/web/components/wd-table/components/FieldRender/index.js +15 -18
  31. package/dist/web/components/wd-table/wd-table.js +18 -18
  32. package/dist/web/utils/datasource.js +23 -17
  33. package/package.json +1 -1
  34. package/dist/web/components/emptyContent/index.js +0 -46
  35. package/dist/web/components/flow/components/FlowModuleText/Content.js +0 -6
  36. package/dist/web/components/flow/components/FlowModuleText/Title.js +0 -16
  37. package/dist/web/components/flow/components/FlowModuleText/index.js +0 -7
  38. package/dist/web/components/flow/components/FlowModuleText/utils.js +0 -34
  39. package/dist/web/components/flow/components/FlowStatusText/index.js +0 -37
  40. package/dist/web/components/flow/components/HighLightComment/index.js +0 -31
  41. package/dist/web/components/flow/components/index.js +0 -3
  42. package/dist/web/components/flow/constants/index.js +0 -65
  43. package/dist/web/components/flow/frame/getCommonFlowData.js +0 -80
  44. package/dist/web/components/flow/frame/hooks/index.js +0 -2
  45. package/dist/web/components/flow/frame/hooks/useCommonFlowRequest.js +0 -148
  46. package/dist/web/components/flow/frame/hooks/useElementMediaQuery.js +0 -15
  47. package/dist/web/components/flow/frame/index.js +0 -76
  48. package/dist/web/components/flow/frame/types.js +0 -277
  49. package/dist/web/components/flow/frame/utils.js +0 -149
  50. package/dist/web/components/flow/modules/chart/Chart.js +0 -282
  51. package/dist/web/components/flow/modules/chart/constants.js +0 -28
  52. package/dist/web/components/flow/modules/chart/index.css +0 -84
  53. package/dist/web/components/flow/modules/chart/isString.js +0 -5
  54. package/dist/web/components/flow/modules/chart/utils.js +0 -111
  55. package/dist/web/components/flow/modules/operations/controls-items/flow-task-info-modal.js +0 -98
  56. package/dist/web/components/flow/modules/process/Process.js +0 -73
  57. package/dist/web/components/flow/modules/process/ProcessMobile.js +0 -81
  58. package/dist/web/components/flow/modules/process/index.js +0 -14
  59. package/dist/web/components/flow/modules/process/utils/index.js +0 -32
  60. package/dist/web/components/flow/services/flow.js +0 -111
  61. package/dist/web/components/flow/services/ideData/chart.js +0 -88
  62. package/dist/web/components/flow/services/ideData/index.js +0 -5
  63. package/dist/web/components/flow/services/ideData/instance.js +0 -23
  64. package/dist/web/components/flow/services/ideData/pageDetail.js +0 -42
  65. package/dist/web/components/flow/services/ideData/process.js +0 -27
  66. package/dist/web/components/flow/services/index.js +0 -2
  67. package/dist/web/components/flow/services/user.js +0 -23
  68. package/dist/web/components/flow/services/utils.js +0 -28
  69. package/dist/web/components/form/userOrgSelect/component/OrgPaths.js +0 -12
  70. package/dist/web/components/form/userOrgSelect/component/depart-select/departTreeSelect.h5.js +0 -156
@@ -1,149 +0,0 @@
1
- import { parse, stringify } from 'querystring';
2
- import { getPageQuery } from '../../../utils/getPageQuery';
3
- import { STATUS_NUMBER_MAPPING, STATUS, PAGE_TYPE } from '../constants';
4
- export class CommonFlowDataUtils {
5
- /** 转换流程接口中的变量数据 */
6
- static translateObjectMap(pageDetail) {
7
- var _a;
8
- const objectMap = ((_a = pageDetail === null || pageDetail === void 0 ? void 0 : pageDetail.variableInfos) === null || _a === void 0 ? void 0 : _a.objectMap) || [];
9
- return objectMap.reduce((prev, curr) => {
10
- if (curr.entityCode) {
11
- prev[curr.entityCode] = {
12
- ...curr === null || curr === void 0 ? void 0 : curr.fieldValueMap,
13
- _id: curr.recordId,
14
- };
15
- }
16
- return prev;
17
- }, {});
18
- }
19
- /** 转换流程接口中的对象列表数据 */
20
- static translateObjectListMap(pageDetail) {
21
- var _a;
22
- const objectListMap = ((_a = pageDetail === null || pageDetail === void 0 ? void 0 : pageDetail.variableInfos) === null || _a === void 0 ? void 0 : _a.objectListMap) || [];
23
- return objectListMap.reduce((prev, curr) => {
24
- if (curr.entityCode) {
25
- prev[curr.entityCode] = (curr === null || curr === void 0 ? void 0 : curr.fieldValueMapList) || [];
26
- }
27
- return prev;
28
- }, {});
29
- }
30
- /** 获取流程自定义页面表单状态 */
31
- static getFormState(params) {
32
- const { isWedaIde, currentPageType } = params;
33
- const couldWriteForm = [
34
- PAGE_TYPE.DRAFT,
35
- PAGE_TYPE.TO_DO,
36
- PAGE_TYPE.CREATEFLOW,
37
- ];
38
- return {
39
- isReadonly: isWedaIde ? false : !couldWriteForm.includes(currentPageType),
40
- };
41
- }
42
- /** 获取当前流程页面参数 */
43
- static getCurrentFlowPageQuery(isWedaIde) {
44
- const { flowTaskId, pageType: queryPageType } = getPageQuery();
45
- const currentPageType = isWedaIde ? PAGE_TYPE.TO_DO : queryPageType;
46
- return {
47
- flowTaskId: flowTaskId,
48
- currentPageType: currentPageType,
49
- };
50
- }
51
- /** 更新浏览器参数 */
52
- static updateUrlSearch(newSearchOption) {
53
- const { hash, origin, pathname } = location;
54
- const currentHash = hash.split('?')[0];
55
- const currentSearch = parse(hash.split('?')[1]);
56
- const newSearch = stringify({ ...currentSearch, ...newSearchOption });
57
- const newHash = `${currentHash}?${newSearch}`;
58
- const newUrl = `${origin}${pathname}${newHash}`;
59
- history.pushState('', '', newUrl);
60
- }
61
- }
62
- /** 转换流程记录数据 */
63
- Object.defineProperty(CommonFlowDataUtils, "transProcessData", {
64
- enumerable: true,
65
- configurable: true,
66
- writable: true,
67
- value: (process, safeJsonParse) => {
68
- return process.map((value) => {
69
- var _a, _b;
70
- const item = {
71
- ...value,
72
- status: STATUS_NUMBER_MAPPING === null || STATUS_NUMBER_MAPPING === void 0 ? void 0 : STATUS_NUMBER_MAPPING[process === null || process === void 0 ? void 0 : process.status],
73
- };
74
- const details = {
75
- ...item.contentInfo,
76
- action: STATUS_NUMBER_MAPPING === null || STATUS_NUMBER_MAPPING === void 0 ? void 0 : STATUS_NUMBER_MAPPING[(_a = item === null || item === void 0 ? void 0 : item.contentInfo) === null || _a === void 0 ? void 0 : _a.action],
77
- };
78
- if (item.result === '待审批') {
79
- item.status = STATUS.PENDING;
80
- }
81
- else if (item.result === '待处理') {
82
- item.status = STATUS.HANDLING;
83
- }
84
- else {
85
- item.status = STATUS[details.action];
86
- if (details.action === STATUS.SKIP_PASS) {
87
- item.status =
88
- ((_b = safeJsonParse(details.operation)[0].id) === null || _b === void 0 ? void 0 : _b.toString()) === '2'
89
- ? STATUS.SKIP_PASS
90
- : STATUS.SKIP_DOWN; // 2同意 3驳回
91
- }
92
- }
93
- let files = [];
94
- if (details.attachmentInfo) {
95
- files = safeJsonParse((details === null || details === void 0 ? void 0 : details.attachmentInfo) || '[]') || [];
96
- }
97
- item.files = files;
98
- return item;
99
- });
100
- }
101
- });
102
- /** 针对流程封装请求 */
103
- export class FlowRequest {
104
- /** 设置请求方法,加入 预览数据 入参首字母大小写等设置 */
105
- request(callWedaApi, isWedaIde) {
106
- const flowRequest = async (params, config) => {
107
- const { previewData, upperCaseData = true, upperCaseIgnoreKeys, } = config || {};
108
- if (isWedaIde) {
109
- return this.toTransKeyCase(previewData || {}, 'toLowerCase');
110
- }
111
- const result = await callWedaApi({
112
- ...params,
113
- data: this.toTransKeyCase(params.data, upperCaseData ? 'toUpperCase' : 'toLowerCase', upperCaseIgnoreKeys),
114
- });
115
- return this.toTransKeyCase(result, 'toLowerCase');
116
- };
117
- return flowRequest;
118
- }
119
- /** 转换具体参数的首字母大小写 */
120
- toTransKeyCase(target, method, ignoreKeyValues) {
121
- const result = {};
122
- if (this.isArray(target)) {
123
- return target === null || target === void 0 ? void 0 : target.map((item) => this.toTransKeyCase(item, method));
124
- }
125
- if (this.isObject(target)) {
126
- return Object.keys(target).reduce((acc, key) => {
127
- const finalKey = this.transKey(key, method);
128
- acc[finalKey] = (ignoreKeyValues === null || ignoreKeyValues === void 0 ? void 0 : ignoreKeyValues.includes(key))
129
- ? target[key]
130
- : this.toTransKeyCase(target[key], method);
131
- return acc;
132
- }, result);
133
- }
134
- return target;
135
- }
136
- /** 转换字符串首字母大小写 */
137
- transKey(str, method) {
138
- const firstChar = method === 'toLowerCase'
139
- ? str.charAt(0).toLowerCase()
140
- : str.charAt(0).toUpperCase();
141
- return `${firstChar}${str.slice(1)}`;
142
- }
143
- isArray(value) {
144
- return Array.isArray(value);
145
- }
146
- isObject(value) {
147
- return Object.prototype.toString.call(value) === '[object Object]';
148
- }
149
- }
@@ -1,282 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- /* eslint-disable no-param-reassign */
3
- import { useState, useEffect } from 'react';
4
- import ReactDOM from 'react-dom';
5
- import moment from 'moment';
6
- import { Modal, Button, LoadingTip, Status } from 'tea-component';
7
- import G6 from '@antv/g6';
8
- import { safeJsonParse } from '../../common';
9
- import { isString, getProcessCanvasInfo } from './utils';
10
- import { STATUS_COLOR_MAP, APPROVE_MAP } from './constants';
11
- import './index.css';
12
- G6.Tooltip.prototype.showTooltip = function (e) {
13
- if (!e.item) {
14
- return;
15
- }
16
- const itemTypes = this.get('itemTypes');
17
- if (e.item.getType && itemTypes.indexOf(e.item.getType()) === -1)
18
- return;
19
- const container = this.get('tooltip');
20
- const getContent = this.get('getContent');
21
- const tooltip = getContent(e);
22
- if (isString(tooltip)) {
23
- container.innerHTML = tooltip;
24
- }
25
- else {
26
- container.innerHTML = '';
27
- container.appendChild(tooltip);
28
- }
29
- this.updatePosition(e);
30
- };
31
- export const RenderProcess = (props) => {
32
- const { processInstance } = props;
33
- const { flowCode, flowVersion: appVersion, instanceId, } = processInstance || {};
34
- const [visible, setVisible] = useState(false);
35
- const [modalData, setModalData] = useState({});
36
- const [loading, setLoading] = useState(false);
37
- const [isEmptyChart, setIsEmptyChart] = useState(false);
38
- useEffect(() => {
39
- setIsEmptyChart(!instanceId);
40
- instanceId && getGraphData(instanceId);
41
- }, [instanceId]);
42
- const closeModal = () => {
43
- setVisible(false);
44
- };
45
- const getGraphData = async (instanceId) => {
46
- try {
47
- setLoading(true);
48
- const params = {
49
- flowCode,
50
- instanceId,
51
- appVersion,
52
- };
53
- const data = await getProcessCanvasInfo(params);
54
- setLoading(false);
55
- data && renderContent(data);
56
- }
57
- catch (error) {
58
- console.error(error);
59
- }
60
- };
61
- const showModal = (data, infoData) => {
62
- const modalData = {
63
- nodeName: {
64
- label: '审批节点',
65
- content: data.name,
66
- },
67
- approvePerson: {
68
- label: '审批人',
69
- content: infoData.name,
70
- },
71
- approveAction: {
72
- label: '审批操作',
73
- content: (_jsxs("span", { style: {
74
- color: APPROVE_MAP[infoData.status].color,
75
- }, children: [' ', APPROVE_MAP[infoData.status].txt] })),
76
- },
77
- actionTime: {
78
- label: '操作时间',
79
- content: infoData.opTime
80
- ? moment(infoData.opTime).format('YYYY-MM-DD HH:mm:ss')
81
- : undefined,
82
- },
83
- approveComment: {
84
- label: '审批意见',
85
- content: infoData.comment,
86
- },
87
- newProcessors: {
88
- label: '操作详情',
89
- content: infoData.newProcessors,
90
- },
91
- attachmentInfo: {
92
- label: '上传附件',
93
- content: infoData.attachmentInfo
94
- ? safeJsonParse(infoData.attachmentInfo)
95
- : undefined,
96
- },
97
- };
98
- setVisible(true);
99
- setModalData(modalData);
100
- };
101
- G6.registerNode('sql', {
102
- drawShape(cfg, group) {
103
- const rect = group.addShape('rect', {
104
- attrs: {
105
- x: -75,
106
- y: -25,
107
- width: 150,
108
- height: 50,
109
- radius: 10,
110
- stroke: STATUS_COLOR_MAP[cfg.status].lineColor,
111
- fill: STATUS_COLOR_MAP[cfg.status].bgColor,
112
- lineWidth: 3,
113
- lineDash: cfg.status === 3 ? [5] : undefined,
114
- },
115
- name: cfg.name,
116
- });
117
- if (cfg.name) {
118
- group.addShape('text', {
119
- attrs: {
120
- text: cfg.name,
121
- x: 0,
122
- y: 0,
123
- fill: '#333',
124
- fontSize: 12,
125
- textAlign: 'center',
126
- textBaseline: 'middle',
127
- // fontWeight: 'bold',
128
- },
129
- name: 'text-shape',
130
- });
131
- }
132
- return rect;
133
- },
134
- }, 'single-node');
135
- const renderContent = (jsonData) => {
136
- jsonData.nodes.forEach((node) => {
137
- if (!node.style) {
138
- node.style = {};
139
- }
140
- if (node.id) {
141
- node.id = `${node.id}`;
142
- }
143
- node.style.lineWidth = 3;
144
- node.label = node.name;
145
- node.labelCfg = {
146
- fontSize: 14,
147
- color: '#00287E',
148
- fontWeight: 'bold',
149
- };
150
- // STATUS_COLOR_MAP
151
- node.style.stroke = STATUS_COLOR_MAP[node.status].lineColor;
152
- node.style.fill = STATUS_COLOR_MAP[node.status].bgColor;
153
- if (node.elementId.startsWith('startNode') ||
154
- node.elementId.startsWith('end')) {
155
- node.type = 'circle';
156
- node.size = 80;
157
- if (node.status === 3) {
158
- node.style.lineDash = [5];
159
- }
160
- }
161
- if (node.elementId.startsWith('exclusiveGateway')) {
162
- node.type = 'diamond';
163
- node.size = [160, 80];
164
- node.anchorPoints = [
165
- [0.5, 0],
166
- [0, 0.5],
167
- [0.5, 1],
168
- [1, 0.5],
169
- ];
170
- }
171
- });
172
- const nodeIdsMap = jsonData.nodes.reduce((acc, cur) => {
173
- acc[cur.elementId] = cur.id;
174
- return acc;
175
- }, {});
176
- jsonData.edges.forEach((edge) => {
177
- edge.source = nodeIdsMap[edge.source];
178
- edge.target = nodeIdsMap[edge.target];
179
- edge.labelCfg = {
180
- refY: -20,
181
- };
182
- Reflect.deleteProperty(edge, 'type');
183
- if (edge.status === 1) {
184
- edge.style = {
185
- stroke: '#0ABF5B',
186
- };
187
- }
188
- });
189
- const container = document.getElementById('flow-graph_container');
190
- const width = container.scrollWidth;
191
- const height = document.documentElement.clientHeight;
192
- const tooltip = new G6.Tooltip({
193
- offsetX: 60,
194
- offsetY: -20,
195
- trigger: 'click',
196
- getContent(e) {
197
- const outDiv = document.createElement('div');
198
- outDiv.style.width = 'auto';
199
- const modelData = e.item.getModel();
200
- const conf = modelData === null || modelData === void 0 ? void 0 : modelData.conf;
201
- let vdomContent;
202
- if (conf === null || conf === void 0 ? void 0 : conf.length) {
203
- const contentHtml = conf.map((value, index) => {
204
- const info = { ...value };
205
- // 区分处理节点和审批节点的 待审批/待处理 文案
206
- if (modelData.dataType === 23 && info.status === 0) {
207
- info.status = 10;
208
- }
209
- return (_jsxs("li", { className: "ProcessInfo-item", onClick: () => {
210
- showModal(modelData, info);
211
- }, children: [_jsxs("div", { className: "first-line", children: [_jsx("i", { className: info.status ? 'tootip-will_do' : '' }), _jsx("span", { className: "tootip-name", children: info.name }), _jsx("span", { style: {
212
- color: APPROVE_MAP[info.status ? info.status : 0].color,
213
- paddingLeft: '8px',
214
- }, children: APPROVE_MAP[info.status ? info.status : 0].txt })] }), info.status && info.opTime ? (_jsx("p", { className: "tooltip-time", children: moment(info.opTime).format('YYYY-MM-DD HH:mm:ss') })) : null] }, `conf-${index}`));
215
- });
216
- vdomContent = (_jsxs("div", { className: "ProcessInfo", children: [_jsx("h4", { children: "\u8282\u70B9\u5BA1\u6279\u4FE1\u606F" }), _jsx("ul", { className: "ProcessInfo-content", children: contentHtml })] }));
217
- }
218
- else {
219
- vdomContent = _jsx("p", { children: "\u6682\u65E0\u4FE1\u606F" });
220
- }
221
- ReactDOM.render(vdomContent, outDiv);
222
- return outDiv;
223
- },
224
- itemTypes: ['node'],
225
- });
226
- const graph = new G6.Graph({
227
- container: 'flow-graph_container',
228
- width,
229
- height: height - 300,
230
- fitView: true,
231
- fitViewPadding: [20, 40, 50, 20],
232
- layout: {
233
- type: 'dagre',
234
- ranksep: 30,
235
- controlPoints: true,
236
- },
237
- defaultNode: {
238
- type: 'sql',
239
- },
240
- plugins: [tooltip],
241
- defaultEdge: {
242
- type: 'polyline',
243
- style: {
244
- endArrow: true,
245
- lineWidth: 2,
246
- stroke: '#C2C8D5',
247
- },
248
- },
249
- nodeStateStyles: {
250
- selected: {
251
- stroke: '#000',
252
- fill: '#5394ef',
253
- },
254
- },
255
- modes: {
256
- default: ['drag-canvas', 'zoom-canvas'],
257
- },
258
- });
259
- graph.data(jsonData);
260
- graph.render();
261
- if (typeof window !== 'undefined')
262
- window.onresize = () => {
263
- if (!graph || graph.get('destroyed'))
264
- return;
265
- if (!container || !container.scrollWidth || !container.scrollHeight)
266
- return;
267
- graph.changeSize(container.scrollWidth, container.scrollHeight);
268
- };
269
- };
270
- const renderStatus = () => {
271
- if (loading) {
272
- return _jsx(LoadingTip, {});
273
- }
274
- if (isEmptyChart) {
275
- return _jsx(Status, { icon: "blank", size: "l", title: "\u6682\u65E0\u6D41\u8F6C\u8282\u70B9" });
276
- }
277
- return null;
278
- };
279
- return (_jsxs("div", { id: "flow-graph_container", children: [renderStatus(), _jsxs(Modal, { visible: visible, caption: '审批详情', onClose: closeModal, className: "ProcessInfo-modal", children: [_jsx(Modal.Body, { children: _jsx("div", { className: "ProcessInfo-modal_content", children: Object.entries(modalData)
280
- .filter(([, { content }]) => content)
281
- .map(([, { label, content }], index) => (_jsxs("div", { children: [_jsx("span", { className: "ProcessInfo-modal_content-label", children: label }), _jsx("span", { className: "ProcessInfo-modal_content-content", children: content })] }, index))) }) }), _jsx(Modal.Footer, { children: _jsx(Button, { type: "weak", onClick: closeModal, children: "\u5173\u95ED" }) })] })] }));
282
- };
@@ -1,28 +0,0 @@
1
- export const STATUS_COLOR_MAP = {
2
- 1: {
3
- bgColor: 'rgba(10,191,91,0.10)',
4
- lineColor: '#0ABF5B',
5
- },
6
- 2: {
7
- bgColor: 'rgba(153,153,153,0.10)',
8
- lineColor: '#999999',
9
- },
10
- 3: {
11
- bgColor: 'rgba(0,110,255,0.20)',
12
- lineColor: '#2473F2',
13
- },
14
- };
15
- export const APPROVE_MAP = {
16
- 0: { txt: '待审批', color: '#F88000' },
17
- 1: { txt: '提交', color: '#09BF5B' },
18
- 2: { txt: '同意', color: '#09BF5B' },
19
- 3: { txt: '拒绝', color: '#E02020' },
20
- 4: { txt: '转办', color: '#333333' },
21
- 5: { txt: '撤销', color: '#333333' },
22
- 6: { txt: '回退', color: '#333333' },
23
- 7: { txt: '加签', color: '#333333' },
24
- 8: { txt: '终止', color: '#333333' },
25
- 9: { txt: '跳过', color: '#333333' },
26
- 10: { txt: '待处理', color: '#F88000' },
27
- 13: { txt: '已处理', color: '#09BF5B' },
28
- };
@@ -1,84 +0,0 @@
1
- .ProcessInfo {
2
- padding: 2px 4px;
3
- }
4
- .ProcessInfo h4 {
5
- margin-bottom: 4px;
6
- font-size: 14px;
7
- border-bottom: 1px solid #eee;
8
- color: #000;
9
- }
10
- .ProcessInfo .ProcessInfo-content {
11
- max-height: 160px;
12
- overflow: auto;
13
- }
14
- .ProcessInfo .ProcessInfo-content .ProcessInfo-item {
15
- padding: 8px 0;
16
- border-bottom: 1px solid #e5e8ed;
17
- cursor: pointer;
18
- }
19
- .ProcessInfo .ProcessInfo-content .ProcessInfo-item .first-line {
20
- height: 20px;
21
- display: flex;
22
- justify-content: flex-start nowrap;
23
- align-items: center;
24
- }
25
- .ProcessInfo .ProcessInfo-content .ProcessInfo-item .first-line i {
26
- width: 16px;
27
- height: 16px;
28
- position: relative;
29
- border-radius: 50%;
30
- background: rgba(36, 115, 242, 0.15);
31
- }
32
- .ProcessInfo
33
- .ProcessInfo-content
34
- .ProcessInfo-item
35
- .first-line
36
- i.tooltip-will_do {
37
- background: rgba(162, 172, 189, 0.15);
38
- }
39
- .ProcessInfo
40
- .ProcessInfo-content
41
- .ProcessInfo-item
42
- .first-line
43
- i.tooltip-will_do:after {
44
- background: #a2acbd;
45
- }
46
- .ProcessInfo .ProcessInfo-content .ProcessInfo-item .first-line i:after {
47
- content: '';
48
- position: absolute;
49
- top: 4px;
50
- left: 4px;
51
- width: 8px;
52
- height: 8px;
53
- background-color: var(--co-common-main-color);
54
- border-radius: 50%;
55
- }
56
- .ProcessInfo .ProcessInfo-content .ProcessInfo-item .first-line .tootip-name {
57
- padding-left: 8px;
58
- }
59
- .ProcessInfo .ProcessInfo-content .ProcessInfo-item .tooltip-time {
60
- padding-left: 24px;
61
- color: #999;
62
- font-size: 12px;
63
- height: 18px;
64
- line-height: 18px;
65
- }
66
- .ProcessInfo-modal_content > div {
67
- display: flex;
68
- margin-bottom: 8px;
69
- }
70
- .ProcessInfo-modal_content > div .ProcessInfo-modal_content-label {
71
- min-width: 60px;
72
- margin-right: 28px;
73
- color: #999;
74
- }
75
- .ProcessInfo-modal_content > div .ProcessInfo-modal_content-content {
76
- color: #333;
77
- }
78
- .ProcessInfo-modal_content > div .ProcessInfo-modal_content_link > button {
79
- display: block;
80
- }
81
- .ProcessInfo-modal .tea-dialog__body {
82
- max-height: 200px;
83
- overflow: auto;
84
- }
@@ -1,5 +0,0 @@
1
- const to = {}.toString;
2
- const isType = (value, type) => to.call(value) === '[object ' + type + ']';
3
- export default (str) => {
4
- return isType(str, 'String');
5
- };
@@ -1,111 +0,0 @@
1
- import { message } from 'tea-component';
2
- import { flowRequest } from '../../common';
3
- export function isString(str) {
4
- const to = {}.toString;
5
- const isType = (value, type) => to.call(value) === '[object ' + type + ']';
6
- return isType(str, 'String');
7
- }
8
- /**
9
- * 获取流程实例运行图
10
- */
11
- export async function getProcessCanvasInfo(data) {
12
- try {
13
- const result = await flowRequest({
14
- data,
15
- action: 'GetProcessCanvasInfo',
16
- }, { previewData: getProcessCanvasInfoPreviewData });
17
- return result;
18
- }
19
- catch (error) {
20
- message.error({ content: '获取流程实例运行数据失败' });
21
- return {};
22
- }
23
- }
24
- const getProcessCanvasInfoPreviewData = {
25
- Nodes: [
26
- {
27
- visited: true,
28
- Id: 2,
29
- ElementId: 'approvalNode1656317642548',
30
- Name: '经理审批',
31
- DataType: 17,
32
- Status: 1,
33
- Conf: [
34
- {
35
- Name: '张三',
36
- Status: 2,
37
- OpTime: 1656502417000,
38
- Comment: '',
39
- AttachmentInfo: '[]',
40
- NewProcessors: 'true',
41
- },
42
- ],
43
- },
44
- {
45
- visited: true,
46
- Id: 3,
47
- ElementId: 'approvalNode1656317679079',
48
- Name: '总监审批',
49
- DataType: 17,
50
- Status: 3,
51
- Conf: [
52
- { Name: '王五', Status: 0, OpTime: 0 },
53
- { Name: '李四', Status: 0, OpTime: 0 },
54
- ],
55
- },
56
- {
57
- visited: true,
58
- Id: 4,
59
- ElementId: 'approvalNode1656317682440',
60
- Name: '人事审批',
61
- DataType: 17,
62
- Status: 2,
63
- },
64
- {
65
- visited: true,
66
- Id: 1,
67
- ElementId: 'startNode',
68
- Name: '开始',
69
- DataType: 1,
70
- Status: 1,
71
- },
72
- {
73
- visited: true,
74
- Id: 5,
75
- ElementId: 'endNode',
76
- Name: '结束',
77
- DataType: 13,
78
- Status: 2,
79
- },
80
- ],
81
- Edges: [
82
- {
83
- Label: '同意',
84
- Type: 2,
85
- Source: 'approvalNode1656317679079',
86
- Target: 'approvalNode1656317682440',
87
- Status: 2,
88
- },
89
- {
90
- Label: '同意c',
91
- Type: 2,
92
- Source: 'approvalNode1656317682440',
93
- Target: 'endNode',
94
- Status: 2,
95
- },
96
- {
97
- Label: '同意',
98
- Type: 2,
99
- Source: 'approvalNode1656317642548',
100
- Target: 'approvalNode1656317679079',
101
- Status: 2,
102
- },
103
- {
104
- Label: '',
105
- Type: 2,
106
- Source: 'startNode',
107
- Target: 'approvalNode1656317642548',
108
- Status: 2,
109
- },
110
- ],
111
- };