@kmkf-fe-packages/kmkf-work-order-service-component 2.12.0 → 2.13.2
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.
|
@@ -85,15 +85,12 @@ var CustomerServiceToDoList = function CustomerServiceToDoList(props) {
|
|
|
85
85
|
payload: false
|
|
86
86
|
});
|
|
87
87
|
};
|
|
88
|
-
useEffect(function () {
|
|
89
|
-
reload();
|
|
90
|
-
}, []);
|
|
91
88
|
useEffect(function () {
|
|
92
89
|
if (['submit'].includes(workOrderProcessStatus)) {
|
|
93
90
|
reload();
|
|
94
91
|
dispatch(setWorkOrderProcessStatus(''));
|
|
95
92
|
}
|
|
96
|
-
}, [workOrderProcessStatus, dispatch]);
|
|
93
|
+
}, [workOrderProcessStatus, dispatch, reload]);
|
|
97
94
|
return /*#__PURE__*/React.createElement("div", {
|
|
98
95
|
className: styles.container,
|
|
99
96
|
onClick: onCancel
|
|
@@ -74,7 +74,6 @@ var buttonMap = function buttonMap(flowType) {
|
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
76
|
var ActionList = function ActionList(props) {
|
|
77
|
-
var _ref;
|
|
78
77
|
var _props$flowStatus = props.flowStatus,
|
|
79
78
|
flowStatus = _props$flowStatus === void 0 ? FlowStatus.NON_START : _props$flowStatus,
|
|
80
79
|
hasPreNode = props.hasPreNode,
|
|
@@ -85,6 +84,7 @@ var ActionList = function ActionList(props) {
|
|
|
85
84
|
privilege = _props$privilege === void 0 ? '' : _props$privilege,
|
|
86
85
|
_props$showShareButto = props.showShareButton,
|
|
87
86
|
showShareButton = _props$showShareButto === void 0 ? false : _props$showShareButto;
|
|
87
|
+
var isSinglePageInitialEntry = flowType === FlowType.SINGLE_PAGE && flowStatus === FlowStatus.NON_START;
|
|
88
88
|
var buttonList = useMemo(function () {
|
|
89
89
|
var button = getActionMap(flowStatus, hasPreNode, flowType);
|
|
90
90
|
//如果是没有按钮权限 || 分享过来的 则不显示分享按钮
|
|
@@ -97,11 +97,20 @@ var ActionList = function ActionList(props) {
|
|
|
97
97
|
if (privilege === 'created') {
|
|
98
98
|
return ['submit'];
|
|
99
99
|
}
|
|
100
|
+
if (isSinglePageInitialEntry) {
|
|
101
|
+
return button.filter(function (item) {
|
|
102
|
+
return ['submit', 'save'].includes(item);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
100
105
|
return button;
|
|
101
|
-
}, [flowStatus, hasPreNode, flowType, privilege, showShareButton]);
|
|
106
|
+
}, [flowStatus, hasPreNode, flowType, privilege, showShareButton, isSinglePageInitialEntry]);
|
|
102
107
|
var sliceLen = useMemo(function () {
|
|
108
|
+
if (isSinglePageInitialEntry) {
|
|
109
|
+
return 2;
|
|
110
|
+
}
|
|
103
111
|
return flowType === FlowType.SINGLE_PAGE ? 1 : 3;
|
|
104
|
-
}, [flowType]);
|
|
112
|
+
}, [flowType, isSinglePageInitialEntry]);
|
|
113
|
+
var visibleButtonList = isSinglePageInitialEntry ? buttonList.slice(0, sliceLen) : reverse(buttonList.slice(0, sliceLen));
|
|
105
114
|
var menu = function menu(list) {
|
|
106
115
|
var items = list.map(function (item, index) {
|
|
107
116
|
return {
|
|
@@ -128,11 +137,11 @@ var ActionList = function ActionList(props) {
|
|
|
128
137
|
onClick: function onClick(e) {
|
|
129
138
|
return e.preventDefault();
|
|
130
139
|
}
|
|
131
|
-
}, /*#__PURE__*/React.createElement(Space, null, "\u66F4\u591A", /*#__PURE__*/React.createElement(DownOutlined, null)))),
|
|
140
|
+
}, /*#__PURE__*/React.createElement(Space, null, "\u66F4\u591A", /*#__PURE__*/React.createElement(DownOutlined, null)))), visibleButtonList.map(function (button, index) {
|
|
132
141
|
var _buttonMap$button, _buttonMap$button2, _buttonMap$button3, _buttonMap$button4;
|
|
133
142
|
return /*#__PURE__*/React.createElement(Button, {
|
|
134
143
|
key: "button".concat(index),
|
|
135
|
-
type: buttonMap(flowType)[button].type,
|
|
144
|
+
type: isSinglePageInitialEntry && button === 'save' ? 'default' : buttonMap(flowType)[button].type,
|
|
136
145
|
onClick: function onClick() {
|
|
137
146
|
return handleAction(button);
|
|
138
147
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.2",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ant-design/icons": "^4.7.0",
|
|
35
|
-
"@kmkf-fe-packages/basic-components": "2.
|
|
36
|
-
"@kmkf-fe-packages/kmkf-utils": "2.
|
|
37
|
-
"@kmkf-fe-packages/services-components": "2.
|
|
35
|
+
"@kmkf-fe-packages/basic-components": "2.13.2",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "2.13.2",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "2.13.2",
|
|
38
38
|
"@reduxjs/toolkit": "^1.8.5",
|
|
39
39
|
"ahooks": "^3.7.4",
|
|
40
40
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "1e96450253c2abd7c89fa985e67ed373cfa13271",
|
|
79
79
|
"gitHooks": {
|
|
80
80
|
"pre-commit": "lint-staged"
|
|
81
81
|
}
|