@cloudbase/weda-ui 3.4.3 → 3.4.5
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/dist/configs/components/chart/bar.json +117 -8
- package/dist/configs/components/chart/line.js +127 -18
- package/dist/configs/components/chart/pie.json +117 -8
- package/dist/configs/components/chart/statisticsCard.json +57 -0
- package/dist/configs/components/dataView.js +507 -0
- package/dist/configs/components/form/location.json +2 -1
- package/dist/configs/components/form/userTreeSelect.json +55 -0
- package/dist/configs/components/formdetail.json +12 -2
- package/dist/configs/components/graphicCard.json +1 -1
- package/dist/configs/components/grid/col.js +125 -0
- package/dist/configs/components/grid/grid.js +131 -0
- package/dist/configs/components/grid/row.js +143 -0
- package/dist/configs/components/image.js +11 -1
- package/dist/configs/components/link.js +11 -1
- package/dist/configs/components/listView.js +1092 -0
- package/dist/configs/components/navLayout.json +1 -1
- package/dist/configs/components/navigationBar.json +9 -1
- package/dist/configs/components/repeater-item.json +17 -0
- package/dist/configs/components/repeater.js +125 -0
- package/dist/configs/components/table.json +187 -29
- package/dist/configs/components/text.js +12 -1
- package/dist/configs/components/wd-bubble.js +204 -0
- package/dist/configs/components/wd-button.js +417 -0
- package/dist/configs/components/wd-divider.js +89 -0
- package/dist/configs/components/wd-icon.js +126 -0
- package/dist/configs/components/wd-image.js +164 -0
- package/dist/configs/components/wd-link.js +234 -0
- package/dist/configs/components/wd-table.js +59 -0
- package/dist/configs/components/wd-text.js +142 -0
- package/dist/configs/components/wxOpenApi/phone.js +2 -2
- package/dist/configs/components/wxOpenApi/phoneCode.js +2 -2
- package/dist/configs/index.js +34 -3
- package/dist/configs/type-utils/index.js +4 -1
- package/dist/docs/common/componentList.js +144 -0
- package/dist/docs/common/components/classes-view.js +34 -0
- package/dist/docs/common/components/event-view.js +46 -0
- package/dist/docs/common/components/json-schema-view.js +18 -0
- package/dist/docs/common/components/methods-view.js +32 -0
- package/dist/docs/common/components/properties-view.js +45 -0
- package/dist/docs/common/format.js +60 -35
- package/dist/docs/common/helper.js +1 -0
- package/dist/docs/common/tableView.js +61 -50
- package/dist/enum/index.js +521 -0
- package/dist/index.js +1 -1
- package/dist/style/index.scss +1 -0
- package/dist/web/actions/showMessage/index.css +0 -3
- package/dist/web/actions/showMessage/index.js +1 -1
- package/dist/web/actions/showModal/index.css +0 -3
- package/dist/web/components/button/index.css +2 -5
- package/dist/web/components/button/index.js +3 -3
- package/dist/web/components/calendar/index.css +29 -32
- package/dist/web/components/calendar/index.js +37 -35
- package/dist/web/components/carousel/index.css +11 -14
- package/dist/web/components/carousel/index.js +3 -1
- package/dist/web/components/chart/common/core/eChartBar.js +10 -2
- package/dist/web/components/chart/common/core/eChartLine.js +16 -8
- package/dist/web/components/chart/common/core/eChartPie.js +2 -1
- package/dist/web/components/chart/common/data-transform.js +1 -1
- package/dist/web/components/chart/statisticsCard/index.css +12 -15
- package/dist/web/components/chart/statisticsCard/index.js +7 -2
- package/dist/web/components/dataView/index.js +3 -3
- package/dist/web/components/emptyContent/index.css +26 -0
- package/dist/web/components/emptyContent/index.js +46 -0
- package/dist/web/components/flow/components/FlowModuleText/index.css +1 -4
- package/dist/web/components/flow/components/FlowUserSelect/index.css +29 -32
- package/dist/web/components/flow/components/HighlightTextarea/index.css +5 -8
- package/dist/web/components/flow/components/UserSelectModel/UserSelect.js +9 -8
- package/dist/web/components/flow/components/UserSelectModel/UserSelectMobile.css +1 -4
- package/dist/web/components/flow/components/UserSelectModel/UserSelectMobile.js +3 -4
- package/dist/web/components/flow/components/WedaUserTransfer/index.css +0 -3
- package/dist/web/components/flow/frame/getCommonFlowData.js +3 -1
- package/dist/web/components/flow/frame/index.js +18 -1
- package/dist/web/components/flow/frame/types.js +6 -0
- package/dist/web/components/flow/frame/utils.js +20 -11
- package/dist/web/components/flow/modules/basic/Basic.css +3 -6
- package/dist/web/components/flow/modules/basic/BasicMobile.css +9 -12
- package/dist/web/components/flow/modules/chart/Chart.js +2 -2
- package/dist/web/components/flow/modules/chart/index.css +23 -29
- package/dist/web/components/flow/modules/chart/isString.js +5 -0
- package/dist/web/components/flow/modules/control/ApprovalDrawer.css +44 -47
- package/dist/web/components/flow/modules/control/ApprovalPopup.css +34 -37
- package/dist/web/components/flow/modules/control/ApprovalPopup.js +12 -9
- package/dist/web/components/flow/modules/control/Control.css +7 -10
- package/dist/web/components/flow/modules/control/Control.js +31 -16
- package/dist/web/components/flow/modules/control/ControlMobile.css +41 -12
- package/dist/web/components/flow/modules/control/ControlMobile.js +28 -13
- package/dist/web/components/flow/modules/control/FlowTaskInfoModal.css +0 -3
- package/dist/web/components/flow/modules/control/FlowTaskInfoModal.js +4 -4
- package/dist/web/components/flow/modules/control/provider/useControlModel.js +20 -11
- package/dist/web/components/flow/modules/control/provider/useMobileModel.js +0 -2
- package/dist/web/components/flow/modules/control/provider/useRevokeAndBackHook.js +2 -0
- package/dist/web/components/flow/modules/control/utils/index.js +1 -0
- package/dist/web/components/flow/modules/control/utils/tools.js +3 -0
- package/dist/web/components/flow/modules/layout/index.css +0 -3
- package/dist/web/components/flow/modules/process/Process.js +1 -1
- package/dist/web/components/flow/modules/process/ProcessMobile.js +1 -1
- package/dist/web/components/flow/modules/process/index.css +49 -43
- package/dist/web/components/form/form/index.css +2 -5
- package/dist/web/components/form/form/index.js +48 -4
- package/dist/web/components/form/formcell/index.css +29 -17
- package/dist/web/components/form/input/index.css +5 -8
- package/dist/web/components/form/input/index.js +11 -0
- package/dist/web/components/form/location/common/mapChoose.css +88 -91
- package/dist/web/components/form/location/common/selectModal.css +10 -13
- package/dist/web/components/form/location/components/LocationH5/index.css +17 -20
- package/dist/web/components/form/location/components/LocationH5/location.h5.js +2 -3
- package/dist/web/components/form/location/components/LocationH5/location.module.css +0 -3
- package/dist/web/components/form/location/components/LocationPC/index.css +10 -13
- package/dist/web/components/form/location/components/LocationPC/location.PC.js +2 -3
- package/dist/web/components/form/location/index.css +0 -3
- package/dist/web/components/form/radio/index.css +0 -3
- package/dist/web/components/form/select/allTimePicker/calendar.css +15 -18
- package/dist/web/components/form/select/allTimePicker/index.css +53 -27
- package/dist/web/components/form/select/dropdown-select/h5.js +23 -12
- package/dist/web/components/form/select/dropdown-select/index.css +34 -27
- package/dist/web/components/form/select/dropdown-select/index.js +37 -4
- package/dist/web/components/form/select/dropdown-select/pc.js +57 -17
- package/dist/web/components/form/select/dropdown-select/ui.js +5 -2
- package/dist/web/components/form/select/index.css +12 -8
- package/dist/web/components/form/select/index.js +4 -9
- package/dist/web/components/form/select/status/index.css +10 -13
- package/dist/web/components/form/switch/switch.module.css +0 -3
- package/dist/web/components/form/textarea/index.css +1 -4
- package/dist/web/components/form/textarea/index.js +1 -1
- package/dist/web/components/form/tips/index.css +11 -2
- package/dist/web/components/form/uploader/index.css +14 -17
- package/dist/web/components/form/uploaderFile/index.css +64 -66
- package/dist/web/components/form/uploaderFile/uploadFile.h5.js +10 -11
- package/dist/web/components/form/uploaderFile/uploadFile.pc.js +3 -2
- package/dist/web/components/form/userOrgSelect/common/fetch-data-service.js +120 -38
- package/dist/web/components/form/userOrgSelect/common/utils.js +89 -1
- package/dist/web/components/form/userOrgSelect/component/depart-breadcrumb.js +15 -0
- package/dist/web/components/form/userOrgSelect/component/depart-select/depart-select-pc.js +63 -0
- package/dist/web/components/form/userOrgSelect/component/depart-select/index.js +96 -0
- package/dist/web/components/form/userOrgSelect/component/depart-select/org-modal-pc.js +69 -0
- package/dist/web/components/form/userOrgSelect/{user-select-pc → component}/error-tips.js +0 -0
- package/dist/web/components/form/userOrgSelect/component/index.css +323 -0
- package/dist/web/components/form/userOrgSelect/component/input-tags.js +21 -0
- package/dist/web/components/form/userOrgSelect/component/modal-search-h5.js +25 -0
- package/dist/web/components/form/userOrgSelect/component/modal-search.js +11 -0
- package/dist/web/components/form/userOrgSelect/component/modal-select-h5.js +201 -0
- package/dist/web/components/form/userOrgSelect/component/org-tree-h5.js +19 -0
- package/dist/web/components/form/userOrgSelect/component/org-tree.js +33 -0
- package/dist/web/components/form/userOrgSelect/component/selected-list-h5.js +44 -0
- package/dist/web/components/form/userOrgSelect/component/selected-list.js +15 -0
- package/dist/web/components/form/userOrgSelect/component/user-org-list.js +55 -0
- package/dist/web/components/form/userOrgSelect/component/user-select-h5/index.js +168 -0
- package/dist/web/components/form/userOrgSelect/component/user-select-h5/user-list-h5.js +107 -0
- package/dist/web/components/form/userOrgSelect/component/user-select-h5/user-select-h5.js +59 -0
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/error-tips.js +11 -0
- package/dist/web/components/form/userOrgSelect/{user-select-pc → component/user-select-pc}/model-user-list.js +9 -9
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/org-tree.js +10 -0
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-model.js +75 -0
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-select-pc.js +65 -0
- package/dist/web/components/form/userOrgSelect/component/userOrgSelect.css +1160 -0
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +54 -87
- package/dist/web/components/form/userOrgSelect/hooks/use-depart-data.js +30 -35
- package/dist/web/components/form/userOrgSelect/hooks/use-views-data.js +48 -0
- package/dist/web/components/formdetail/index.css +34 -31
- package/dist/web/components/formdetail/index.js +12 -3
- package/dist/web/components/graphicCard/index.css +15 -18
- package/dist/web/components/grid/_utils.css +67 -0
- package/dist/web/components/grid/col.js +33 -0
- package/dist/web/components/grid/grid.css +1185 -0
- package/dist/web/components/grid/grid.js +19 -0
- package/dist/web/components/grid/row.js +14 -0
- package/dist/web/components/image/image.js +9 -1
- package/dist/web/components/image/index.css +2 -5
- package/dist/web/components/index.js +17 -3
- package/dist/web/components/link/index.css +0 -3
- package/dist/web/components/listView/index.css +21 -23
- package/dist/web/components/listView/index.js +215 -81
- package/dist/web/components/lottery/index.css +72 -75
- package/dist/web/components/modal/h5.css +19 -21
- package/dist/web/components/modal/modal.h5.js +11 -10
- package/dist/web/components/navLayout/index.css +14 -139
- package/dist/web/components/navigationBar/common.js +5 -4
- package/dist/web/components/navigationBar/h5Menu.js +12 -10
- package/dist/web/components/navigationBar/horizontalMenu.js +42 -35
- package/dist/web/components/navigationBar/index.css +130 -86
- package/dist/web/components/navigationBar/index.js +6 -4
- package/dist/web/components/navigationBar/verticalMenu.js +13 -9
- package/dist/web/components/pageLayout/PageContent/index.css +7 -10
- package/dist/web/components/pageLayout/index.css +0 -3
- package/dist/web/components/pageLayout/index.js +2 -1
- package/dist/web/components/repeater/index.js +17 -0
- package/dist/web/components/repeater-item/index.js +9 -0
- package/dist/web/components/richText/index.css +5 -8
- package/dist/web/components/richText/index.js +4 -2
- package/dist/web/components/richText/richtext.module.css +1 -4
- package/dist/web/components/richTextView/index.css +9 -10
- package/dist/web/components/swiper/index.css +10 -13
- package/dist/web/components/swiper/index.js +25 -5
- package/dist/web/components/table/BaseTable.js +355 -286
- package/dist/web/components/table/ExportFileModalByApi/index.css +9 -0
- package/dist/web/components/table/ExportFileModalByApi/index.js +150 -0
- package/dist/web/components/table/FieldRender.js +25 -18
- package/dist/web/components/table/FilterFields.js +17 -11
- package/dist/web/components/table/Form/Location.css +2 -5
- package/dist/web/components/table/ImportFileModal/csvTemplate.json +65 -6
- package/dist/web/components/table/ImportFileModalByApi/index.css +130 -0
- package/dist/web/components/table/ImportFileModalByApi/index.js +321 -0
- package/dist/web/components/table/ImportFileModalByApi/uploadCSVFile.js +115 -0
- package/dist/web/components/table/InOrOutRecordModeal.js +139 -0
- package/dist/web/components/table/SelectableBlock/index.css +0 -2
- package/dist/web/components/table/UserDepartment/viewCell.css +3 -6
- package/dist/web/components/table/baseTable.css +579 -0
- package/dist/web/components/table/hooks/useImportingStatus.js +69 -0
- package/dist/web/components/table/hooks/useInOutFieldsRecords.js +23 -0
- package/dist/web/components/table/index.css +275 -508
- package/dist/web/components/table/index.js +6 -4
- package/dist/web/components/tabs/index.css +19 -18
- package/dist/web/components/tabs/tabs.h5.js +7 -16
- package/dist/web/components/text/index.css +6 -9
- package/dist/web/components/uploaderFileView/index.css +0 -3
- package/dist/web/components/uploaderView/index.css +5 -8
- package/dist/web/components/wd-bubble/index.js +3 -17
- package/dist/web/components/wd-bubble/wd-bubble.js +17 -0
- package/dist/web/components/wd-button/convert-legacy-props.js +14 -0
- package/dist/web/components/wd-button/index.js +3 -0
- package/dist/web/components/wd-button/wd-button.js +89 -0
- package/dist/web/components/wd-config-provider/index.js +1 -0
- package/dist/web/components/wd-config-provider/wd-config-context.js +5 -0
- package/dist/web/components/wd-config-provider/wd-config-provider.js +12 -0
- package/dist/web/components/wd-divider/index.js +3 -0
- package/dist/web/components/wd-divider/wd-divider.js +29 -0
- package/dist/web/components/wd-icon/convert-legacy-props.js +14 -0
- package/dist/web/components/wd-icon/index.js +3 -0
- package/dist/web/components/wd-icon/wd-icon.js +63 -0
- package/dist/web/components/wd-image/image.js +171 -0
- package/dist/web/components/wd-image/index.js +82 -0
- package/dist/web/components/wd-link/index.js +3 -0
- package/dist/web/components/wd-link/wd-link.js +105 -0
- package/dist/web/components/wd-table/index.js +3 -0
- package/dist/web/components/wd-table/wd-table.js +24 -0
- package/dist/web/components/wd-text/convert-legacy-props.js +14 -0
- package/dist/web/components/wd-text/index.js +3 -0
- package/dist/web/components/wd-text/wd-text.js +91 -0
- package/dist/web/components/wedaVideo/index.css +2 -5
- package/dist/web/components/wedaVideo/index.js +8 -6
- package/dist/web/index.js +1 -1
- package/dist/web/utils/config-context/index.js +1 -0
- package/dist/web/utils/config-context/use-config.js +9 -0
- package/dist/web/utils/constant.js +1 -0
- package/dist/web/utils/datasource.js +19 -7
- package/dist/web/utils/file.js +22 -0
- package/dist/web/utils/hooks/CreatePortal.js +6 -0
- package/dist/web/utils/hooks/EnumHoc.js +23 -3
- package/dist/web/utils/hooks/context.js +5 -1
- package/dist/web/utils/hooks/use-cloud-id-temp-url.js +2 -1
- package/dist/web/utils/platform.js +40 -12
- package/dist/web/utils/pollingInterface.js +61 -0
- package/dist/web/utils/tcb.js +16 -0
- package/dist/web/utils/tool.js +88 -0
- package/dist/web/utils/widget-api/index.js +18 -0
- package/dist/web/weda-ui.css +128 -4
- package/package.json +51 -33
- package/dist/configs/components/dataView.json +0 -305
- package/dist/configs/components/listView.json +0 -515
- package/dist/configs/components/wd-bubble.json +0 -170
- package/dist/web/components/form/userOrgSelect/comTool.js +0 -102
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.js +0 -155
- package/dist/web/components/form/userOrgSelect/departTreeSelect/index.js +0 -17
- package/dist/web/components/form/userOrgSelect/getUserService.js +0 -165
- package/dist/web/components/form/userOrgSelect/index.js +0 -17
- package/dist/web/components/form/userOrgSelect/user-select-pc/index.css +0 -216
- package/dist/web/components/form/userOrgSelect/user-select-pc/index.js +0 -195
- package/dist/web/components/form/userOrgSelect/user-select-pc/org-tree.js +0 -15
- package/dist/web/components/form/userOrgSelect/user-select-pc/search-user.js +0 -80
- package/dist/web/components/form/userOrgSelect/user-select-pc/selected-user-list.js +0 -12
- package/dist/web/components/form/userOrgSelect/user-select-pc/user-model.js +0 -36
- package/dist/web/components/form/userOrgSelect/userOrgSelect.css +0 -824
- package/dist/web/components/form/userOrgSelect/userTreeSelect.h5.js +0 -302
- package/dist/web/components/form/userOrgSelect/utils.js +0 -95
- package/dist/web/components/table/ImportFileModal/index.css +0 -263
- package/dist/web/components/wd-bubble/index.css +0 -21
- package/dist/web/utils/hooks/useRequest.js +0 -25
|
@@ -6,6 +6,7 @@ import { useControlContext } from './provider';
|
|
|
6
6
|
import { ACTION_TYPE } from './constants';
|
|
7
7
|
import { ApprovalDrawer } from './ApprovalDrawer';
|
|
8
8
|
import { FlowTaskInfoModal } from './FlowTaskInfoModal';
|
|
9
|
+
import { setOperationButtonId } from './utils';
|
|
9
10
|
import './Control.css';
|
|
10
11
|
export const FlowControl = (props) => {
|
|
11
12
|
const { commonFlowData, flowLocalProps, ide } = props;
|
|
@@ -13,7 +14,7 @@ export const FlowControl = (props) => {
|
|
|
13
14
|
const { isWedaIde, currentPageType } = flowLocalProps;
|
|
14
15
|
const {
|
|
15
16
|
// ControlModel
|
|
16
|
-
userModalVisible, submitApplyLoading, ccUserModelVisible, ccUsers, ifSubmitAndCc, setCcUsers, setCcUserModelVisible, onControlChick, setUserModalVisible, onUserModalVisibleChange, onAddCounterSign, onBackFlowCenter,
|
|
17
|
+
userModalVisible, submitApplyLoading, ccUserModelVisible, ccUsers, ifSubmitAndCc, hasGoBack, setCcUsers, setCcUserModelVisible, onControlChick, setUserModalVisible, onUserModalVisibleChange, onAddCounterSign, onBackFlowCenter,
|
|
17
18
|
// RevokeModel
|
|
18
19
|
showRevokeModal, showBackModal, backNodeList, backNode, setShowRevokeModal, doneRevokeFn, doneBackFn, setShowBackModal, getNodeList, setBackNode, } = useControlContext();
|
|
19
20
|
const onClickGoBack = async () => {
|
|
@@ -27,40 +28,54 @@ export const FlowControl = (props) => {
|
|
|
27
28
|
'page-process__progress__app-page': !isWedaIde,
|
|
28
29
|
});
|
|
29
30
|
const renderButtonGroup = () => {
|
|
30
|
-
var _a, _b;
|
|
31
|
+
var _a, _b, _c;
|
|
32
|
+
if (hasGoBack)
|
|
33
|
+
return null;
|
|
34
|
+
/**
|
|
35
|
+
* 审批页面类型 - approval:审批页面,apply:提交审批页面
|
|
36
|
+
* 微搭编辑器中预览按钮区域根据审批页面类型展示不同的按钮,审批页面类型是提交审批页面 且在微搭编辑器中 的话 渲染提交申请按钮组
|
|
37
|
+
*/
|
|
38
|
+
if (((_a = ide.bindMetadata) === null || _a === void 0 ? void 0 : _a.approvalPageType) === 'apply' && isWedaIde) {
|
|
39
|
+
return (React.createElement("div", { className: footerClassNames },
|
|
40
|
+
React.createElement(ButtonLayout, { gap: 10 },
|
|
41
|
+
React.createElement(Button, { type: "primary" }, "\u63D0\u4EA4\u7533\u8BF7"),
|
|
42
|
+
React.createElement(Button, { type: "weak" }, "\u4FDD\u5B58\u8349\u7A3F"),
|
|
43
|
+
React.createElement(Button, { type: "weak" }, "\u53D6\u6D88"))));
|
|
44
|
+
}
|
|
31
45
|
if (['CREATE', 'DONE'].includes(currentPageType) && (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.showRevoke)) {
|
|
32
46
|
return (React.createElement("div", { className: footerClassNames },
|
|
33
|
-
React.createElement(Button, { type: "weak", onClick: () => setShowRevokeModal(true) }, "\u64A4\u9500")));
|
|
47
|
+
React.createElement(Button, { type: "weak", onClick: () => setShowRevokeModal(true), id: setOperationButtonId('revoke') }, "\u64A4\u9500")));
|
|
34
48
|
}
|
|
35
49
|
if (['DRAFT', 'CREATEFLOW', 'TODO'].includes(currentPageType) &&
|
|
36
50
|
(pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.show)) {
|
|
37
51
|
if (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.showSubmitApp) {
|
|
38
52
|
return (React.createElement("div", { className: footerClassNames },
|
|
39
53
|
React.createElement(ButtonLayout, { gap: 10 },
|
|
40
|
-
ifSubmitAndCc ? (React.createElement(Button, { type: "link", onClick: () => setCcUserModelVisible(true) },
|
|
54
|
+
ifSubmitAndCc ? (React.createElement(Button, { type: "link", onClick: () => setCcUserModelVisible(true), id: setOperationButtonId('cc') },
|
|
41
55
|
"+\u6284\u9001\u4EBA(",
|
|
42
|
-
ccUsers.length || 0,
|
|
56
|
+
(ccUsers === null || ccUsers === void 0 ? void 0 : ccUsers.length) || 0,
|
|
43
57
|
")")) : null,
|
|
44
|
-
React.createElement(Button, { type: "primary", loading: submitApplyLoading, onClick: (e) => onControlChick(ACTION_TYPE.SUBMIT, e) }, ((
|
|
58
|
+
React.createElement(Button, { type: "primary", loading: submitApplyLoading, onClick: (e) => onControlChick(ACTION_TYPE.SUBMIT, e), id: setOperationButtonId('submit') }, ((_b = pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons) === null || _b === void 0 ? void 0 : _b[3]) || '提交申请'),
|
|
45
59
|
(flowDetail === null || flowDetail === void 0 ? void 0 : flowDetail.canDelete) && (React.createElement(React.Fragment, null,
|
|
46
|
-
React.createElement(Button, { type: "weak", onClick: (e) => onControlChick(ACTION_TYPE.SAVE_DRAFT, e) }, "\u4FDD\u5B58\u8349\u7A3F"),
|
|
60
|
+
React.createElement(Button, { type: "weak", onClick: (e) => onControlChick(ACTION_TYPE.SAVE_DRAFT, e), id: setOperationButtonId('save_draft') }, "\u4FDD\u5B58\u8349\u7A3F"),
|
|
47
61
|
React.createElement(Button, { type: "weak", onClick: onBackFlowCenter }, "\u53D6\u6D88"))))));
|
|
48
62
|
}
|
|
49
63
|
return (React.createElement("div", { className: footerClassNames },
|
|
50
64
|
React.createElement(ButtonLayout, null,
|
|
51
|
-
(flowDetail === null || flowDetail === void 0 ? void 0 : flowDetail.userTaskType) === 2 ? (React.createElement(Button, { type: "primary", onClick: (e) => onControlChick(ACTION_TYPE.HANDLE, e) }, flowDetail === null || flowDetail === void 0 ? void 0 : flowDetail.operationName)) : (React.createElement(ButtonLayout, { gap: 10 },
|
|
52
|
-
React.createElement(Button, { type: "primary", onClick: (e) => onControlChick(ACTION_TYPE.AGREE, e) }, (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons) ? pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons[1] : '同意'),
|
|
53
|
-
React.createElement(Button, { type: "weak", onClick: (e) => onControlChick(ACTION_TYPE.REJECT, e) }, (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons) ? pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons[2] : '拒绝'))),
|
|
54
|
-
(pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.showTurnToPerson) ? (React.createElement(Button, { type: "weak", className: "mf-progress-footer__btn-line", onClick: (e) => onControlChick(ACTION_TYPE.TRANSFER, e) }, "\u8F6C\u529E")) : null,
|
|
55
|
-
(pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.showRollBack) && (React.createElement(Button, { type: "weak", className: "mf-progress-footer__btn-line", onClick: onClickGoBack }, "\u56DE\u9000")),
|
|
56
|
-
(pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.showAddAssignee) && (React.createElement(Button, { type: "weak", className: "mf-progress-footer__btn-line", onClick: onUserModalVisibleChange }, "\u52A0\u7B7E")))));
|
|
65
|
+
(flowDetail === null || flowDetail === void 0 ? void 0 : flowDetail.userTaskType) === 2 ? (React.createElement(Button, { type: "primary", onClick: (e) => onControlChick(ACTION_TYPE.HANDLE, e), id: setOperationButtonId('handle') }, flowDetail === null || flowDetail === void 0 ? void 0 : flowDetail.operationName)) : (React.createElement(ButtonLayout, { gap: 10 },
|
|
66
|
+
React.createElement(Button, { type: "primary", onClick: (e) => onControlChick(ACTION_TYPE.AGREE, e), id: setOperationButtonId('agree') }, (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons) ? pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons[1] : '同意'),
|
|
67
|
+
React.createElement(Button, { type: "weak", onClick: (e) => onControlChick(ACTION_TYPE.REJECT, e), id: setOperationButtonId('reject') }, (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons) ? pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons[2] : '拒绝'))),
|
|
68
|
+
(pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.showTurnToPerson) ? (React.createElement(Button, { type: "weak", className: "mf-progress-footer__btn-line", onClick: (e) => onControlChick(ACTION_TYPE.TRANSFER, e), id: setOperationButtonId('turn_to_person') }, "\u8F6C\u529E")) : null,
|
|
69
|
+
(pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.showRollBack) && (React.createElement(Button, { type: "weak", className: "mf-progress-footer__btn-line", onClick: onClickGoBack, id: setOperationButtonId('roll_back') }, "\u56DE\u9000")),
|
|
70
|
+
(pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.showAddAssignee) && (React.createElement(Button, { type: "weak", className: "mf-progress-footer__btn-line", onClick: onUserModalVisibleChange, id: setOperationButtonId('add_assignee') }, "\u52A0\u7B7E")))));
|
|
57
71
|
}
|
|
58
72
|
if (['DRAFT', 'CREATEFLOW'].includes(currentPageType)) {
|
|
59
73
|
return (React.createElement("div", { className: footerClassNames },
|
|
60
|
-
React.createElement(Button, { type: "primary", loading: submitApplyLoading, onClick: (e) => onControlChick(ACTION_TYPE.SUBMIT, e) }, ((
|
|
61
|
-
React.createElement(Button, { type: "weak", onClick: (e) => onControlChick(ACTION_TYPE.SAVE_DRAFT, e) }, "\u4FDD\u5B58\u8349\u7A3F"),
|
|
74
|
+
React.createElement(Button, { type: "primary", loading: submitApplyLoading, onClick: (e) => onControlChick(ACTION_TYPE.SUBMIT, e), id: setOperationButtonId('submit') }, ((_c = pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons) === null || _c === void 0 ? void 0 : _c[3]) || '提交申请'),
|
|
75
|
+
React.createElement(Button, { type: "weak", onClick: (e) => onControlChick(ACTION_TYPE.SAVE_DRAFT, e), id: setOperationButtonId('save_draft') }, "\u4FDD\u5B58\u8349\u7A3F"),
|
|
62
76
|
React.createElement(Button, { type: "weak", onClick: onBackFlowCenter }, "\u53D6\u6D88")));
|
|
63
77
|
}
|
|
78
|
+
return null;
|
|
64
79
|
};
|
|
65
80
|
return (
|
|
66
81
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -81,7 +96,7 @@ export const FlowControl = (props) => {
|
|
|
81
96
|
React.createElement(Button, { type: "primary", onClick: doneRevokeFn }, "\u786E\u5B9A"),
|
|
82
97
|
React.createElement(Button, { type: "weak", onClick: () => setShowRevokeModal(false) }, "\u53D6\u6D88"))),
|
|
83
98
|
React.createElement(UserSelectModel, { visible: userModalVisible, onChange: (val) => val.length && onAddCounterSign(val), onClose: () => setUserModalVisible(false) }),
|
|
84
|
-
React.createElement(UserSelectModel, { value: ccUsers, visible: ccUserModelVisible,
|
|
99
|
+
React.createElement(UserSelectModel, { value: ccUsers, visible: ccUserModelVisible, onUserIdChange: (ids) => setCcUsers(ids || []), onClose: () => setCcUserModelVisible(false) }),
|
|
85
100
|
React.createElement(FlowTaskInfoModal, null),
|
|
86
101
|
React.createElement(ApprovalDrawer, { pageInfo: pageInfo, flowDetail: flowDetail }))));
|
|
87
102
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.mf-progress-mb--footer {
|
|
2
2
|
background: #fff;
|
|
3
|
-
padding:
|
|
3
|
+
padding: 20px 0;
|
|
4
4
|
text-align: center;
|
|
5
5
|
width: 100%;
|
|
6
6
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
padding: 0;
|
|
10
10
|
vertical-align: bottom;
|
|
11
11
|
min-width: 100%;
|
|
12
|
-
border-radius:
|
|
12
|
+
border-radius: 0px;
|
|
13
13
|
}
|
|
14
14
|
@media (max-width: 1024px) {
|
|
15
15
|
.approval-progress__more--dialog .wedatea2td-dialog__inner {
|
|
@@ -18,25 +18,25 @@
|
|
|
18
18
|
}
|
|
19
19
|
.flow-popup {
|
|
20
20
|
display: flex;
|
|
21
|
-
max-height:
|
|
21
|
+
max-height: 400px;
|
|
22
22
|
flex-direction: column;
|
|
23
23
|
}
|
|
24
24
|
.flow-popup-title {
|
|
25
|
-
height:
|
|
25
|
+
height: 40px;
|
|
26
26
|
display: flex;
|
|
27
27
|
flex-shrink: 0;
|
|
28
28
|
justify-content: space-between;
|
|
29
29
|
align-items: center;
|
|
30
|
-
font-size:
|
|
30
|
+
font-size: 16px;
|
|
31
31
|
font-weight: 400;
|
|
32
|
-
padding: 0
|
|
33
|
-
border-bottom:
|
|
32
|
+
padding: 0 20px;
|
|
33
|
+
border-bottom: 1px solid #dcdee6;
|
|
34
34
|
}
|
|
35
35
|
.flow-popup-title .left {
|
|
36
36
|
color: #666;
|
|
37
37
|
}
|
|
38
38
|
.flow-popup-title .center {
|
|
39
|
-
font-size:
|
|
39
|
+
font-size: 14px;
|
|
40
40
|
color: #666;
|
|
41
41
|
}
|
|
42
42
|
.flow-popup-title .right {
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
text-overflow: ellipsis;
|
|
54
54
|
}
|
|
55
55
|
.flow-popup_mb-group-list .apa-icon {
|
|
56
|
-
width:
|
|
57
|
-
height:
|
|
56
|
+
width: 16px;
|
|
57
|
+
height: 16px;
|
|
58
58
|
display: inline-block;
|
|
59
59
|
vertical-align: middle;
|
|
60
60
|
background-repeat: no-repeat;
|
|
@@ -68,5 +68,34 @@
|
|
|
68
68
|
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgMTYgMTYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDU4ICg4NDY2MykgLSBodHRwczovL3NrZXRjaC5jb20gLS0+CiAgICA8dGl0bGU+55S75p2/PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGcgaWQ9IueUu+advyIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Iue8lue7hCI+CiAgICAgICAgICAgIDxyZWN0IGlkPSLnn6nlvaIiIHg9IjAiIHk9IjAiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PC9yZWN0PgogICAgICAgICAgICA8cGF0aCBkPSJNOC40NDgzNjgwNCwxLjcwODQ5Mjg4IEwxMC4zNTExNDEsNS41NjM5MzIwMiBMMTAuMzUxMTQxLDUuNTYzOTMyMDIgTDE0LjYwNTg3MDcsNi4xODIxODA0NCBDMTQuODc5MTQzMSw2LjIyMTg4OTI1IDE1LjA2ODQ4MzksNi40NzU2MTA2NyAxNS4wMjg3NzUxLDYuNzQ4ODgzMSBDMTUuMDEyOTYyOCw2Ljg1NzcwMTYyIDE0Ljk2MTcxOTIsNi45NTgyNzI4MiAxNC44ODI5Nzc0LDcuMDM1MDI3MTMgTDExLjgwNDIyNjEsMTAuMDM2MDY4IEwxMS44MDQyMjYxLDEwLjAzNjA2OCBMMTIuNTMxMDIwNywxNC4yNzM2MDU3IEMxMi41Nzc3MDEyLDE0LjU0NTc3MzkgMTIuMzk0OTA3MywxNC44MDQyNTE4IDEyLjEyMjczOSwxNC44NTA5MzI0IEMxMi4wMTQzNjAyLDE0Ljg2OTUyMDggMTEuOTAyODc2MiwxNC44NTE4NjM0IDExLjgwNTU0NTksMTQuODAwNjkzOSBMOCwxMi44IEw4LDEyLjggTDQuMTk0NDU0MDYsMTQuODAwNjkzOSBDMy45NTAwMzE3NywxNC45MjkxOTQzIDMuNjQ3NzE4MTksMTQuODM1MjIxIDMuNTE5MjE3NzgsMTQuNTkwNzk4OCBDMy40NjgwNDgyNSwxNC40OTM0Njg1IDMuNDUwMzkwOTEsMTQuMzgxOTg0NSAzLjQ2ODk3OTMzLDE0LjI3MzYwNTcgTDQuMTk1NzczOTMsMTAuMDM2MDY4IEw0LjE5NTc3MzkzLDEwLjAzNjA2OCBMMS4xMTcwMjI2LDcuMDM1MDI3MTMgQzAuOTE5MjgwODA2LDYuODQyMjc2NTIgMC45MTUyMzQ2NTMsNi41MjU3MTk4OSAxLjEwNzk4NTI2LDYuMzI3OTc4MSBDMS4xODQ3Mzk1Niw2LjI0OTIzNjI4IDEuMjg1MzEwNzcsNi4xOTc5OTI2OSAxLjM5NDEyOTI4LDYuMTgyMTgwNDQgTDUuNjQ4ODU4OTksNS41NjM5MzIwMiBMNS42NDg4NTg5OSw1LjU2MzkzMjAyIEw3LjU1MTYzMTk2LDEuNzA4NDkyODggQzcuNjczODQzMTEsMS40NjA4NjYwNSA3Ljk3MzY1NjAzLDEuMzU5MTk2NTUgOC4yMjEyODI4NiwxLjQ4MTQwNzY5IEM4LjMxOTg4OTE2LDEuNTMwMDcyODEgOC4zOTk3MDI5MiwxLjYwOTg4NjU3IDguNDQ4MzY4MDQsMS43MDg0OTI4OCBaIiBpZD0i5pif5b2iIiBmaWxsPSIjQTJBQ0JEIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
.list-content {
|
|
72
|
+
flex: 1;
|
|
73
|
+
padding: 0 20px 20px;
|
|
74
|
+
font-size: 14px;
|
|
75
|
+
overflow-y: auto;
|
|
76
|
+
}
|
|
77
|
+
.list-content li {
|
|
78
|
+
height: 40px;
|
|
79
|
+
line-height: 40px;
|
|
80
|
+
border-bottom: 1px solid #dcdee6;
|
|
81
|
+
}
|
|
82
|
+
.list-content .list-checked {
|
|
83
|
+
color: #2473f2;
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-content: space-between;
|
|
86
|
+
align-items: center;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.list-checked::after {
|
|
90
|
+
content: '\2713';
|
|
91
|
+
width: 16px;
|
|
92
|
+
height: 40px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.list-content li span {
|
|
96
|
+
display: inline-block;
|
|
97
|
+
max-width: 90%;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
text-overflow: ellipsis;
|
|
101
|
+
}
|
|
@@ -6,14 +6,16 @@ import { useControlContext } from './provider';
|
|
|
6
6
|
import { ACTION_TYPE } from './constants';
|
|
7
7
|
import { ApprovalPopup } from './ApprovalPopup';
|
|
8
8
|
import { ButtonLayout } from './Control';
|
|
9
|
+
import { setOperationButtonId } from './utils';
|
|
10
|
+
import { FlowTaskInfoModal } from './FlowTaskInfoModal';
|
|
9
11
|
import './ControlMobile.css';
|
|
10
12
|
export const FlowControlMobile = (props) => {
|
|
11
13
|
const { commonFlowData, flowLocalProps, ide } = props;
|
|
12
14
|
const { pageInfo, flowDetail } = commonFlowData;
|
|
13
|
-
const { safeJsonParse, currentPageType } = flowLocalProps;
|
|
15
|
+
const { isWedaIde, safeJsonParse, currentPageType } = flowLocalProps;
|
|
14
16
|
const {
|
|
15
17
|
// ControlModel
|
|
16
|
-
submitApplyLoading, showMoreAction, ifSubmitAndCc, ccUsers, onControlChick, onShowMoreVisibleChange, loadingAssign, onBackFlowCenter,
|
|
18
|
+
submitApplyLoading, showMoreAction, ifSubmitAndCc, hasGoBack, ccUsers, onControlChick, onShowMoreVisibleChange, loadingAssign, onBackFlowCenter,
|
|
17
19
|
// RevokeModel
|
|
18
20
|
showRevokeModal, showBackModal, backNodeList, backNode, setShowRevokeModal, doneRevokeFn, doneBackFn, setShowBackModal, getNodeList, setBackNode, onUserSelectModalInfoChange, setUserSelectModelVisible, userSelectApproveField, userSelectModelVisible, userSelectMode, } = useControlContext();
|
|
19
21
|
const onClickRollBack = async () => {
|
|
@@ -29,6 +31,7 @@ export const FlowControlMobile = (props) => {
|
|
|
29
31
|
showTurnToPerson: {
|
|
30
32
|
label: '转办',
|
|
31
33
|
action: (e) => onControlChick(ACTION_TYPE.TRANSFER, e),
|
|
34
|
+
operationName: 'turn_to_person',
|
|
32
35
|
},
|
|
33
36
|
showRollBack: {
|
|
34
37
|
label: '回退',
|
|
@@ -36,6 +39,7 @@ export const FlowControlMobile = (props) => {
|
|
|
36
39
|
await getNodeList();
|
|
37
40
|
setShowBackModal(true);
|
|
38
41
|
},
|
|
42
|
+
operationName: 'roll_back',
|
|
39
43
|
},
|
|
40
44
|
showAddAssignee: {
|
|
41
45
|
label: '加签',
|
|
@@ -55,39 +59,50 @@ export const FlowControlMobile = (props) => {
|
|
|
55
59
|
mode: 'multiple',
|
|
56
60
|
});
|
|
57
61
|
},
|
|
62
|
+
operationName: 'add_assignee',
|
|
58
63
|
},
|
|
59
64
|
};
|
|
60
65
|
const renderButtonGroup = () => {
|
|
61
|
-
var _a;
|
|
66
|
+
var _a, _b;
|
|
67
|
+
if (hasGoBack)
|
|
68
|
+
return null;
|
|
69
|
+
if (((_a = ide.bindMetadata) === null || _a === void 0 ? void 0 : _a.approvalPageType) === 'apply' && isWedaIde) {
|
|
70
|
+
return (React.createElement("div", { className: "mf-progress-mb--footer" },
|
|
71
|
+
React.createElement(ButtonLayout, { gap: 10 },
|
|
72
|
+
React.createElement(Button, { type: "primary" }, "\u63D0\u4EA4\u7533\u8BF7"),
|
|
73
|
+
React.createElement(Button, { type: "weak" }, "\u4FDD\u5B58\u8349\u7A3F"),
|
|
74
|
+
React.createElement(Button, { type: "weak" }, "\u53D6\u6D88"))));
|
|
75
|
+
}
|
|
62
76
|
if (['CREATE', 'DONE'].includes(currentPageType) && (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.showRevoke)) {
|
|
63
77
|
return (React.createElement("div", { className: "mf-progress-mb--footer" },
|
|
64
|
-
React.createElement(Button, { type: "primary", onClick: () => setShowRevokeModal(true) }, "\u64A4\u9500")));
|
|
78
|
+
React.createElement(Button, { type: "primary", onClick: () => setShowRevokeModal(true), id: setOperationButtonId('revoke') }, "\u64A4\u9500")));
|
|
65
79
|
}
|
|
66
80
|
if (['DRAFT', 'CREATEFLOW', 'TODO'].includes(currentPageType) &&
|
|
67
81
|
(pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.show)) {
|
|
68
82
|
return (React.createElement("div", { className: "mf-progress-mb--footer" }, (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.showSubmitApp) ? (React.createElement(ButtonLayout, { gap: 10 },
|
|
69
|
-
flowDetail.canDelete ? (React.createElement(Button, { type: "link", onClick: () => onControlChick(ACTION_TYPE.SAVE_DRAFT) }, "\u4FDD\u5B58\u8349\u7A3F")) : null,
|
|
70
|
-
ifSubmitAndCc ? (React.createElement(Button, { type: "link", onClick: onClickAddCcUser },
|
|
83
|
+
flowDetail.canDelete ? (React.createElement(Button, { type: "link", onClick: () => onControlChick(ACTION_TYPE.SAVE_DRAFT), id: setOperationButtonId('save_draft') }, "\u4FDD\u5B58\u8349\u7A3F")) : null,
|
|
84
|
+
ifSubmitAndCc ? (React.createElement(Button, { type: "link", onClick: onClickAddCcUser, id: setOperationButtonId('cc') },
|
|
71
85
|
"+\u6284\u9001\u4EBA(",
|
|
72
86
|
ccUsers.length || 0,
|
|
73
87
|
")")) : null,
|
|
74
|
-
React.createElement(Button, { type: "primary", loading: submitApplyLoading, onClick: () => onControlChick(ACTION_TYPE.SUBMIT) }, ((
|
|
88
|
+
React.createElement(Button, { type: "primary", loading: submitApplyLoading, onClick: () => onControlChick(ACTION_TYPE.SUBMIT), id: setOperationButtonId('submit') }, ((_b = pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons) === null || _b === void 0 ? void 0 : _b[3]) || '提交申请'),
|
|
75
89
|
flowDetail.canDelete ? (React.createElement(Button, { type: "weak", onClick: onBackFlowCenter }, "\u53D6\u6D88")) : null)) : (React.createElement(ButtonLayout, { gap: 10 },
|
|
76
90
|
['showTurnToPerson', 'showRollBack', 'showAddAssignee'].filter((key) => pageInfo[key]).length >= 2 ? (React.createElement(Button, { type: "link", onClick: onShowMoreVisibleChange }, "\u66F4\u591A")) : (['showTurnToPerson', 'showRollBack', 'showAddAssignee']
|
|
77
91
|
.filter((key) => pageInfo[key])
|
|
78
92
|
.map((key, actionIndex) => {
|
|
79
|
-
const { label, action } = buttonActionMap[key];
|
|
80
|
-
return (React.createElement(Button, { key: `actionItem-${actionIndex}`, className: "apa-height-xl tea-mr-4n tea-mt-1n", type: "link", onClick: action }, label));
|
|
93
|
+
const { label, action, operationName } = buttonActionMap[key];
|
|
94
|
+
return (React.createElement(Button, { key: `actionItem-${actionIndex}`, className: "apa-height-xl tea-mr-4n tea-mt-1n", type: "link", onClick: action, id: setOperationButtonId(operationName) }, label));
|
|
81
95
|
})),
|
|
82
|
-
flowDetail.userTaskType === 2 ? (React.createElement(Button, { type: "primary", style: { flex: 3 }, onClick: (e) => onControlChick(ACTION_TYPE.HANDLE, e) }, flowDetail.operationName)) : (React.createElement(React.Fragment, null,
|
|
83
|
-
React.createElement(Button, { onClick: (e) => onControlChick(ACTION_TYPE.REJECT, e) }, (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons) ? pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons[2] : '拒绝'),
|
|
84
|
-
React.createElement(Button, { type: "primary", onClick: (e) => onControlChick(ACTION_TYPE.AGREE, e) }, (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons) ? pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons[1] : '同意')))))));
|
|
96
|
+
flowDetail.userTaskType === 2 ? (React.createElement(Button, { type: "primary", style: { flex: 3 }, onClick: (e) => onControlChick(ACTION_TYPE.HANDLE, e), id: setOperationButtonId('handle') }, flowDetail.operationName)) : (React.createElement(React.Fragment, null,
|
|
97
|
+
React.createElement(Button, { onClick: (e) => onControlChick(ACTION_TYPE.REJECT, e), id: setOperationButtonId('reject') }, (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons) ? pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons[2] : '拒绝'),
|
|
98
|
+
React.createElement(Button, { type: "primary", onClick: (e) => onControlChick(ACTION_TYPE.AGREE, e), id: setOperationButtonId('agree') }, (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons) ? pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.buttons[1] : '同意')))))));
|
|
85
99
|
}
|
|
86
100
|
};
|
|
87
101
|
return (
|
|
88
102
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
89
103
|
React.createElement("div", { ...ide },
|
|
90
104
|
renderButtonGroup(),
|
|
105
|
+
React.createElement(FlowTaskInfoModal, { layout: "vertical" }),
|
|
91
106
|
React.createElement(Popup, { className: "cp-mobile-dialog apa-m-overlay approval-progress__more--dialog", visible: showMoreAction, onClose: onShowMoreVisibleChange,
|
|
92
107
|
// disableCloseIcon={true}
|
|
93
108
|
closeIcon: false, position: "bottom" },
|
|
@@ -128,6 +143,6 @@ export const FlowControlMobile = (props) => {
|
|
|
128
143
|
} }, "\u5B8C\u6210")),
|
|
129
144
|
(backNodeList === null || backNodeList === void 0 ? void 0 : backNodeList.length) ? (React.createElement("ul", { className: "list-content" }, backNodeList === null || backNodeList === void 0 ? void 0 : backNodeList.map((item) => (React.createElement("li", { key: item.value, className: backNode === item.value ? 'list-checked' : '', onClick: () => setBackNode(item.value) },
|
|
130
145
|
React.createElement("span", null, item.text)))))) : (React.createElement(Status, { icon: "blank", size: "l", title: "\u6682\u65E0\u53EF\u56DE\u9000\u8282\u70B9" }))),
|
|
131
|
-
|
|
146
|
+
React.createElement(UserSelectModel, { visible: userSelectModelVisible, approveField: userSelectApproveField, mode: userSelectMode, close: () => setUserSelectModelVisible(false), mobileModel: true, values: ccUsers.map((user) => user.value) }),
|
|
132
147
|
React.createElement(ApprovalPopup, { pageInfo: pageInfo, flowDetail: flowDetail, safeJsonParse: safeJsonParse })));
|
|
133
148
|
};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
.flow_center_next_approve-form_item > .tea-form__controls {
|
|
2
2
|
width: 100% !important;
|
|
3
3
|
}
|
|
4
|
-
|
|
5
|
-
/*# sourceURL=webpack://./src/web/components/flow/modules/control/FlowTaskInfoModal.css */
|
|
6
|
-
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy93ZWIvY29tcG9uZW50cy9mbG93L21vZHVsZXMvY29udHJvbC9GbG93VGFza0luZm9Nb2RhbC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxzQkFBc0I7QUFDeEIiLCJzb3VyY2VzQ29udGVudCI6WyIuZmxvd19jZW50ZXJfbmV4dF9hcHByb3ZlLWZvcm1faXRlbSA+IC50ZWEtZm9ybV9fY29udHJvbHMge1xuICB3aWR0aDogMTAwJSAhaW1wb3J0YW50O1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ== */
|
|
@@ -3,7 +3,7 @@ import { Modal, SelectMultiple, Button, Form } from 'tea-component';
|
|
|
3
3
|
// import { history } from 'umi';
|
|
4
4
|
import { useControlContext } from './provider';
|
|
5
5
|
import './FlowTaskInfoModal.css';
|
|
6
|
-
export const FlowTaskInfoModal = () => {
|
|
6
|
+
export const FlowTaskInfoModal = ({ layout = 'default', }) => {
|
|
7
7
|
// const { visible, setVisible, flowTaskInfoList, flowTaskIds, setFlowTaskIds, allInfos } = props;
|
|
8
8
|
const { flowTaskInfoList, flowTaskInfoModalVisible, flowTaskIds, setFlowTaskIds, onCloseFlowTaskInfoModal, } = useControlContext();
|
|
9
9
|
const [options, setOptions] = useState([]);
|
|
@@ -18,13 +18,13 @@ export const FlowTaskInfoModal = () => {
|
|
|
18
18
|
});
|
|
19
19
|
setOptions(tempOptions);
|
|
20
20
|
}, [flowTaskInfoList]);
|
|
21
|
-
return (React.createElement(Modal, { visible: flowTaskInfoModalVisible, caption: '选择下一节点处理人', onClose: onCloseFlowTaskInfoModal },
|
|
21
|
+
return (React.createElement(Modal, { visible: flowTaskInfoModalVisible, caption: '选择下一节点处理人', onClose: onCloseFlowTaskInfoModal, size: "auto" },
|
|
22
22
|
React.createElement(Modal.Body, null,
|
|
23
|
-
React.createElement(Form, { style: { marginBottom: '5px' } },
|
|
23
|
+
React.createElement(Form, { style: { marginBottom: '5px' }, layout: layout },
|
|
24
24
|
React.createElement(Form.Item, { label: '选择处理人', className: "flow_center_next_approve-form_item" },
|
|
25
25
|
React.createElement(SelectMultiple, { appearance: "button", size: 'full', searchable: true, matchButtonWidth: true, staging: false, options: options, onChange: (val) => {
|
|
26
26
|
setFlowTaskIds(val);
|
|
27
|
-
}, value: flowTaskIds })))),
|
|
27
|
+
}, value: flowTaskIds, style: { width: 200 } })))),
|
|
28
28
|
React.createElement(Modal.Footer, null,
|
|
29
29
|
React.createElement(Button, { type: "primary", onClick: onCloseFlowTaskInfoModal }, "\u786E\u5B9A"),
|
|
30
30
|
React.createElement(Button, { type: "weak", onClick: onCloseFlowTaskInfoModal }, "\u53D6\u6D88"))));
|
|
@@ -4,7 +4,7 @@ import { postApprovalFlow, postApprovalSign, postFlowTaskList, } from '../../../
|
|
|
4
4
|
import { ACTION_TYPE, ACTION_TYPE_MAP, ACTION_FINISH_MAP } from '../constants';
|
|
5
5
|
import { ControlModelUtils } from '../utils';
|
|
6
6
|
export const useControlModel = (params) => {
|
|
7
|
-
const { commonFlowData, flowLocalProps, ide, reload } = params;
|
|
7
|
+
const { commonFlowData, flowLocalProps, ide, reload, setFormType } = params;
|
|
8
8
|
const { flowDetail, pageInfo, ccUserMaps } = commonFlowData;
|
|
9
9
|
const { isWedaIde, callWedaApi } = flowLocalProps;
|
|
10
10
|
const { events } = ide || {};
|
|
@@ -20,6 +20,8 @@ export const useControlModel = (params) => {
|
|
|
20
20
|
const [flowTaskIds, setFlowTaskIds] = useState([]);
|
|
21
21
|
const [ccUserModelVisible, setCcUserModelVisible] = useState(false);
|
|
22
22
|
const [ccUsers, setCcUsers] = useState([]);
|
|
23
|
+
/** 流程是否回退 */
|
|
24
|
+
const [hasGoBack, setHasGoBack] = useState(false);
|
|
23
25
|
useEffect(() => {
|
|
24
26
|
var _a;
|
|
25
27
|
const ccUsers = (_a = Object.entries(ccUserMaps || {})) === null || _a === void 0 ? void 0 : _a.map(([value, text]) => ({
|
|
@@ -55,8 +57,11 @@ export const useControlModel = (params) => {
|
|
|
55
57
|
}
|
|
56
58
|
handleTypeRef.current = type;
|
|
57
59
|
(_a = events === null || events === void 0 ? void 0 : events.tap) === null || _a === void 0 ? void 0 : _a.call(events, {
|
|
58
|
-
onGetFormData: (
|
|
59
|
-
|
|
60
|
+
onGetFormData: (formDataMap) => {
|
|
61
|
+
if (Object.values(formDataMap).some((item) => item === undefined)) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
pageFormData.current = { ...pageFormData.current, ...formDataMap };
|
|
60
65
|
if (type === ACTION_TYPE.SUBMIT) {
|
|
61
66
|
onTriggerFlowEvent({ buttonAction: ACTION_TYPE_MAP.submit });
|
|
62
67
|
}
|
|
@@ -85,9 +90,7 @@ export const useControlModel = (params) => {
|
|
|
85
90
|
const onSaveDraft = () => {
|
|
86
91
|
const params = {
|
|
87
92
|
buttonAction: ACTION_TYPE_MAP[ACTION_TYPE.SAVE_DRAFT],
|
|
88
|
-
ccUserIds: (ccUsers === null || ccUsers === void 0 ? void 0 : ccUsers.length)
|
|
89
|
-
? ccUsers.map(({ value }) => value).join(',')
|
|
90
|
-
: undefined,
|
|
93
|
+
ccUserIds: (ccUsers === null || ccUsers === void 0 ? void 0 : ccUsers.length) ? ccUsers.join(',') : undefined,
|
|
91
94
|
flowCode: flowDetail.flowCode,
|
|
92
95
|
instanceId: flowDetail.instanceId,
|
|
93
96
|
nodeId: flowDetail.currentNodeId,
|
|
@@ -121,9 +124,7 @@ export const useControlModel = (params) => {
|
|
|
121
124
|
setSubmitLoading(true);
|
|
122
125
|
const params = {
|
|
123
126
|
buttonAction: ACTION_TYPE_MAP[handleType],
|
|
124
|
-
ccUserIds: (ccUsers === null || ccUsers === void 0 ? void 0 : ccUsers.length)
|
|
125
|
-
? ccUsers.map(({ value }) => value).join(',')
|
|
126
|
-
: undefined,
|
|
127
|
+
ccUserIds: (ccUsers === null || ccUsers === void 0 ? void 0 : ccUsers.length) ? ccUsers.join(',') : undefined,
|
|
127
128
|
flowCode: flowDetail.flowCode,
|
|
128
129
|
instanceId: flowDetail.instanceId,
|
|
129
130
|
nodeId: flowDetail.currentNodeId,
|
|
@@ -206,8 +207,15 @@ export const useControlModel = (params) => {
|
|
|
206
207
|
}
|
|
207
208
|
ControlModelUtils.updateUrlSearch({ pageType: newPageType });
|
|
208
209
|
}
|
|
209
|
-
//
|
|
210
|
-
|
|
210
|
+
// 操作类型不是回退的情况才reload数据 回退之后当前流程被销毁 故回退之后不刷新数据
|
|
211
|
+
if (currentHandleType === ACTION_TYPE.GO_BACK) {
|
|
212
|
+
setHasGoBack(true);
|
|
213
|
+
setFormType('read');
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
// 重新加载数据
|
|
217
|
+
reload();
|
|
218
|
+
}
|
|
211
219
|
// 执行自定义事件
|
|
212
220
|
customizeFinishAction === null || customizeFinishAction === void 0 ? void 0 : customizeFinishAction();
|
|
213
221
|
}
|
|
@@ -225,6 +233,7 @@ export const useControlModel = (params) => {
|
|
|
225
233
|
ccUserModelVisible,
|
|
226
234
|
ccUsers,
|
|
227
235
|
ifSubmitAndCc,
|
|
236
|
+
hasGoBack,
|
|
228
237
|
setUserModalVisible,
|
|
229
238
|
setCcUsers,
|
|
230
239
|
setCcUserModelVisible,
|
|
@@ -26,8 +26,6 @@ export const useMobileModel = (params, controlModel) => {
|
|
|
26
26
|
setApprovers(approvers || []);
|
|
27
27
|
setOpinionUserMap({ ...opinionUserMap });
|
|
28
28
|
setHighlightPositionMap({ ...highlightPositionMap });
|
|
29
|
-
setApprover(approver);
|
|
30
|
-
setApprovers(approvers);
|
|
31
29
|
setFileList(fileList);
|
|
32
30
|
if (ccUsers) {
|
|
33
31
|
setCcUsers(ccUserFormStorage.map((user) => ({
|
|
@@ -4,6 +4,3 @@
|
|
|
4
4
|
.model-flow-layout .wedatea2td-layout__content {
|
|
5
5
|
background-color: #fff;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
/*# sourceURL=webpack://./src/web/components/flow/modules/layout/index.css */
|
|
9
|
-
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy93ZWIvY29tcG9uZW50cy9mbG93L21vZHVsZXMvbGF5b3V0L2luZGV4LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLHVCQUF1QjtBQUN6QjtBQUNBO0VBQ0Usc0JBQXNCO0FBQ3hCIiwic291cmNlc0NvbnRlbnQiOlsiLm1vZGVsLWZsb3ctbGF5b3V0IHtcbiAgaGVpZ2h0OiBhdXRvICFpbXBvcnRhbnQ7XG59XG4ubW9kZWwtZmxvdy1sYXlvdXQgLndlZGF0ZWEydGQtbGF5b3V0X19jb250ZW50IHtcbiAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0= */
|
|
@@ -47,7 +47,7 @@ const ApproveProcess = (props) => {
|
|
|
47
47
|
(details === null || details === void 0 ? void 0 : details.operation)
|
|
48
48
|
? (_d = safeJsonParse(details === null || details === void 0 ? void 0 : details.operation)[1]) === null || _d === void 0 ? void 0 : _d.name
|
|
49
49
|
: '')),
|
|
50
|
-
!!details.operationComment && (React.createElement(Text, { theme: "weak" },
|
|
50
|
+
!!details.operationComment && (React.createElement(Text, { theme: "weak", className: "approval-progress__comment" },
|
|
51
51
|
"\u5BA1\u6279\u610F\u89C1\uFF1A",
|
|
52
52
|
React.createElement(HighLightComment, { details: details })))),
|
|
53
53
|
React.createElement("div", { className: "approval-progress__row", style: {
|
|
@@ -54,7 +54,7 @@ const ApproveProcessMobile = (props) => {
|
|
|
54
54
|
? (_d = safeJsonParse(details === null || details === void 0 ? void 0 : details.operation)[1]) === null || _d === void 0 ? void 0 : _d.name
|
|
55
55
|
: ''))),
|
|
56
56
|
!!details.operationComment && (React.createElement("div", { className: "approval-progress__row approval-progress__row--start tea-mb-1n" },
|
|
57
|
-
React.createElement(Text, { theme: "weak" },
|
|
57
|
+
React.createElement(Text, { theme: "weak", className: "approval-progress__comment-mb" },
|
|
58
58
|
"\u5BA1\u6279\u610F\u89C1\uFF1A",
|
|
59
59
|
React.createElement(HighLightComment, { details: details })))),
|
|
60
60
|
React.createElement("div", { className: "approval-progress__row", style: {
|