@hzab/flowlong-designer 1.0.7-beta1 → 1.0.7-beta3
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ import "./index.less";
|
|
|
11
11
|
import SignatureConfiguration from "../../components/SignatureConfiguration";
|
|
12
12
|
|
|
13
13
|
export const Approver = (props) => {
|
|
14
|
-
const { modelValue = {}, onChange, disable, readOnly } = props;
|
|
14
|
+
const { modelValue = {}, onChange, disable, readOnly, showSignature } = props;
|
|
15
15
|
const [form, setForm] = useState({
|
|
16
16
|
nodeName: "",
|
|
17
17
|
setType: undefined,
|
|
@@ -123,12 +123,9 @@ export const Approver = (props) => {
|
|
|
123
123
|
function onDrawerSave() {
|
|
124
124
|
signatureConfigurationRef.current.form.validateFields().then((res) => {
|
|
125
125
|
const { extendConfig = {} }: any = form;
|
|
126
|
-
extendConfig["confirmTxt"] = res?.extendConfig?.confirmTxt;
|
|
127
|
-
extendConfig["needConfirm"] = res?.extendConfig?.needConfirm;
|
|
128
|
-
extendConfig["needSign"] = res?.extendConfig?.needSign;
|
|
129
|
-
extendConfig["usePreSign"] = res?.extendConfig?.usePreSign;
|
|
130
126
|
const newValue = {
|
|
131
127
|
...form,
|
|
128
|
+
extendConfig: { ...form?.extendConfig, ...res?.extendConfig },
|
|
132
129
|
};
|
|
133
130
|
if (form.setType == "20") {
|
|
134
131
|
if (!extendConfig?.isChecked) {
|
|
@@ -584,11 +581,13 @@ export const Approver = (props) => {
|
|
|
584
581
|
</Form.Item>
|
|
585
582
|
) : null}
|
|
586
583
|
</Form>
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
584
|
+
{showSignature && (
|
|
585
|
+
<SignatureConfiguration
|
|
586
|
+
ref={signatureConfigurationRef}
|
|
587
|
+
formData={form}
|
|
588
|
+
type="approver"
|
|
589
|
+
></SignatureConfiguration>
|
|
590
|
+
)}
|
|
592
591
|
</Drawer>
|
|
593
592
|
</div>
|
|
594
593
|
</div>
|
|
@@ -10,7 +10,7 @@ import SignatureConfiguration from "../../components/SignatureConfiguration";
|
|
|
10
10
|
|
|
11
11
|
export const Promoter = (props) => {
|
|
12
12
|
const selectorCtx = useContext(SelectContext);
|
|
13
|
-
const { modelValue: nodeConfig = {}, onChange, disable, readOnly } = props;
|
|
13
|
+
const { modelValue: nodeConfig = {}, onChange, disable, readOnly, showSignature } = props;
|
|
14
14
|
|
|
15
15
|
const [drawer, setDrawer] = useState(false);
|
|
16
16
|
const [isEditTitle, setIsEditTitle] = useState(false);
|
|
@@ -194,7 +194,9 @@ export const Promoter = (props) => {
|
|
|
194
194
|
{!form.nodeAssigneeList || form.nodeAssigneeList?.length <= 0 ? (
|
|
195
195
|
<Alert message="不指定则默认所有人都可发起此审批" type="info" />
|
|
196
196
|
) : null}
|
|
197
|
-
|
|
197
|
+
{showSignature && (
|
|
198
|
+
<SignatureConfiguration ref={signatureConfigurationRef} formData={form}></SignatureConfiguration>
|
|
199
|
+
)}
|
|
198
200
|
</Drawer>
|
|
199
201
|
</div>
|
|
200
202
|
</div>
|
package/src/index.tsx
CHANGED
|
@@ -49,7 +49,17 @@ function copy(str) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
function FlowlongDesigner(props, ref) {
|
|
52
|
-
const {
|
|
52
|
+
const {
|
|
53
|
+
value,
|
|
54
|
+
flowName,
|
|
55
|
+
roleListConfig,
|
|
56
|
+
listConfig,
|
|
57
|
+
initiatorListConfig,
|
|
58
|
+
isShowJson,
|
|
59
|
+
disable,
|
|
60
|
+
readOnly,
|
|
61
|
+
showSignature,
|
|
62
|
+
} = props;
|
|
53
63
|
const [drawer, setDrawer] = useState(false);
|
|
54
64
|
const [zoom, setZoom] = useState(1);
|
|
55
65
|
const [data, setData] = useState(Object.keys(value || {}).length > 0 ? value : getInitNodeData({ name: flowName }));
|
|
@@ -131,6 +141,7 @@ function FlowlongDesigner(props, ref) {
|
|
|
131
141
|
modelValue={data.nodeConfig}
|
|
132
142
|
disable={disable}
|
|
133
143
|
readOnly={readOnly}
|
|
144
|
+
showSignature={showSignature}
|
|
134
145
|
onChange={(val) => {
|
|
135
146
|
setData((d) => {
|
|
136
147
|
d.nodeConfig = val;
|