venus-design 1.0.80 → 1.0.82
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/Approval/components/SelectRoleAndUser/index.d.ts +1 -0
- package/dist/Approval/components/SelectRoleAndUser/index.js +83 -67
- package/dist/Approval/index.js +179 -63
- package/dist/Approval/service.js +7 -1
- package/dist/Config/api.d.ts +1 -0
- package/dist/Config/api.js +257 -234
- package/dist/Config/columnFilter.d.ts +1 -1
- package/dist/Config/utils.d.ts +13 -0
- package/dist/Config/utils.js +187 -1
- package/dist/VenusForm/staticAttr.js +3 -5
- package/dist/VenusTable/index.js +1 -1
- package/dist/VenusTable/interface.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -2,45 +2,81 @@ import "antd/es/tag/style";
|
|
|
2
2
|
import _Tag from "antd/es/tag";
|
|
3
3
|
import "antd/es/select/style";
|
|
4
4
|
import _Select from "antd/es/select";
|
|
5
|
-
|
|
5
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
9
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
11
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
14
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
+
import React, { useState, useEffect } from 'react';
|
|
6
16
|
var Option = _Select.Option;
|
|
7
17
|
var SelectApprovalUser = function SelectApprovalUser(props) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
var _useState = useState(undefined),
|
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
+
value = _useState2[0],
|
|
21
|
+
saveValue = _useState2[1];
|
|
22
|
+
var _useState3 = useState([]),
|
|
23
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
24
|
+
data = _useState4[0],
|
|
25
|
+
saveData = _useState4[1];
|
|
26
|
+
// 从 props 中提取 users 和 selectType
|
|
27
|
+
var getData = function getData() {
|
|
28
|
+
var options = [];
|
|
29
|
+
var users = props.users,
|
|
30
|
+
selectType = props.selectType;
|
|
31
|
+
if (!(users !== null && users !== void 0 && users.username) || users.username === '未选择人员') return;
|
|
32
|
+
// 成对映射
|
|
33
|
+
var pairs = users.username[0];
|
|
34
|
+
if (!(pairs !== null && pairs !== void 0 && pairs.userid)) return;
|
|
35
|
+
var validOptions = pairs.userid
|
|
36
|
+
//@ts-ignore
|
|
37
|
+
.map(function (id, idx) {
|
|
38
|
+
var _pairs$username;
|
|
39
|
+
return {
|
|
40
|
+
label: ((_pairs$username = pairs.username) === null || _pairs$username === void 0 ? void 0 : _pairs$username[idx]) || id,
|
|
41
|
+
// 万一缺 label 用 id 兜底
|
|
42
|
+
value: id
|
|
43
|
+
};
|
|
44
|
+
})
|
|
45
|
+
// 过滤掉 value 为空的项
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
.filter(function (o) {
|
|
48
|
+
return o.value;
|
|
49
|
+
}); // 去掉空 value
|
|
50
|
+
|
|
51
|
+
options.push.apply(options, _toConsumableArray(validOptions));
|
|
52
|
+
saveData(options);
|
|
53
|
+
if (props.selectType == "moren") {
|
|
54
|
+
saveValue(options);
|
|
32
55
|
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
56
|
+
};
|
|
57
|
+
useEffect(function () {
|
|
58
|
+
saveValue(props.value);
|
|
59
|
+
}, [props.value]);
|
|
60
|
+
useEffect(function () {
|
|
61
|
+
getData();
|
|
62
|
+
}, [props.users]);
|
|
63
|
+
|
|
64
|
+
// 处理 onChange 事件
|
|
65
|
+
var handleChange = function handleChange(val) {
|
|
66
|
+
if (props.onChange) {
|
|
67
|
+
props.onChange(val);
|
|
42
68
|
}
|
|
43
|
-
|
|
69
|
+
};
|
|
70
|
+
//组装下拉选项
|
|
71
|
+
var options = data.map(function (d) {
|
|
72
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Option, {
|
|
73
|
+
key: d.value,
|
|
74
|
+
title: d.label,
|
|
75
|
+
value: d.value
|
|
76
|
+
}, d.label));
|
|
77
|
+
});
|
|
78
|
+
var filterOption = function filterOption(input, option) {
|
|
79
|
+
return option.children[0].indexOf(input) >= 0;
|
|
44
80
|
};
|
|
45
81
|
function tagRender(props) {
|
|
46
82
|
var label = props.label,
|
|
@@ -51,36 +87,16 @@ var SelectApprovalUser = function SelectApprovalUser(props) {
|
|
|
51
87
|
event.preventDefault();
|
|
52
88
|
event.stopPropagation();
|
|
53
89
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}, label);
|
|
64
|
-
} else {
|
|
65
|
-
return /*#__PURE__*/React.createElement(_Tag, {
|
|
66
|
-
color: 'orange',
|
|
67
|
-
onMouseDown: onPreventMouseDown,
|
|
68
|
-
closable: closable,
|
|
69
|
-
onClose: onClose,
|
|
70
|
-
style: {
|
|
71
|
-
marginRight: 3
|
|
72
|
-
}
|
|
73
|
-
}, label);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
function handleChange(value) {
|
|
77
|
-
if (props.onChange) {
|
|
78
|
-
props.onChange(value);
|
|
79
|
-
}
|
|
90
|
+
return /*#__PURE__*/React.createElement(_Tag, {
|
|
91
|
+
color: 'orange',
|
|
92
|
+
onMouseDown: onPreventMouseDown,
|
|
93
|
+
closable: closable,
|
|
94
|
+
onClose: onClose,
|
|
95
|
+
style: {
|
|
96
|
+
marginRight: 3
|
|
97
|
+
}
|
|
98
|
+
}, label);
|
|
80
99
|
}
|
|
81
|
-
var filterOption = function filterOption(input, option) {
|
|
82
|
-
return option.children[0].indexOf(input) >= 0;
|
|
83
|
-
};
|
|
84
100
|
return /*#__PURE__*/React.createElement(_Select, {
|
|
85
101
|
filterOption: filterOption,
|
|
86
102
|
mode: "multiple",
|
|
@@ -92,13 +108,13 @@ var SelectApprovalUser = function SelectApprovalUser(props) {
|
|
|
92
108
|
overflowY: "scroll"
|
|
93
109
|
},
|
|
94
110
|
showSearch: true,
|
|
111
|
+
value: value,
|
|
95
112
|
style: {
|
|
96
113
|
width: '100%'
|
|
97
114
|
},
|
|
98
115
|
placeholder: "\u8BF7\u9009\u62E9\u5BA1\u6279\u4EBA",
|
|
99
116
|
onChange: handleChange,
|
|
100
|
-
key: "ApprovalUser"
|
|
101
|
-
|
|
102
|
-
}, children);
|
|
117
|
+
key: "ApprovalUser"
|
|
118
|
+
}, options);
|
|
103
119
|
};
|
|
104
120
|
export default SelectApprovalUser;
|
package/dist/Approval/index.js
CHANGED
|
@@ -7,6 +7,8 @@ import "antd/es/row/style";
|
|
|
7
7
|
import _Row from "antd/es/row";
|
|
8
8
|
import "antd/es/col/style";
|
|
9
9
|
import _Col from "antd/es/col";
|
|
10
|
+
import "antd/es/select/style";
|
|
11
|
+
import _Select from "antd/es/select";
|
|
10
12
|
import "antd/es/message/style";
|
|
11
13
|
import _message from "antd/es/message";
|
|
12
14
|
import "antd/es/form/style";
|
|
@@ -18,11 +20,11 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
18
20
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
21
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
20
22
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
22
23
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
23
24
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24
25
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
25
26
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
27
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
26
28
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
27
29
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
28
30
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -36,6 +38,7 @@ import SelectRoleAndUser from "./components/SelectRoleAndUser";
|
|
|
36
38
|
import { StyleProvider, legacyLogicalPropertiesTransformer } from "@ant-design/cssinjs";
|
|
37
39
|
import { startData, findByOptionCode, findByUserid, SubmitDataStatus, updateProcessInstance } from "./service";
|
|
38
40
|
import moment from 'moment';
|
|
41
|
+
import { getWfTitle } from "../Config/utils";
|
|
39
42
|
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
40
43
|
var _useState = useState(false),
|
|
41
44
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -103,9 +106,18 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
103
106
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
104
107
|
idS = _useState30[0],
|
|
105
108
|
setIds = _useState30[1];
|
|
109
|
+
var _useState31 = useState(""),
|
|
110
|
+
_useState32 = _slicedToArray(_useState31, 2),
|
|
111
|
+
componentUrl = _useState32[0],
|
|
112
|
+
setComponentUrl = _useState32[1];
|
|
113
|
+
var _useState33 = useState([]),
|
|
114
|
+
_useState34 = _slicedToArray(_useState33, 2),
|
|
115
|
+
processList = _useState34[0],
|
|
116
|
+
setProcessList = _useState34[1];
|
|
117
|
+
var processDefVal = _Form.useWatch('processDef', form);
|
|
106
118
|
var findByOption = /*#__PURE__*/function () {
|
|
107
119
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(record, code, name) {
|
|
108
|
-
var _record$id,
|
|
120
|
+
var _record$id, rawId, hasAmpersand, serviceId, flowRes, _flowRes$data, workflowcode, formid, columnlist, isconfig, _processList, wfTitleConfig, _componentUrl, defaultWorkCode, wfTitle, defaultName;
|
|
109
121
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
110
122
|
while (1) switch (_context.prev = _context.next) {
|
|
111
123
|
case 0:
|
|
@@ -130,26 +142,90 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
130
142
|
setDefaultName(record, name);
|
|
131
143
|
return _context.abrupt("return");
|
|
132
144
|
case 13:
|
|
133
|
-
_flowRes$data = flowRes.data, workflowcode = _flowRes$data.workflowcode, formid = _flowRes$data.formid, columnlist = _flowRes$data.columnlist, isconfig = _flowRes$data.isconfig;
|
|
145
|
+
_flowRes$data = flowRes.data, workflowcode = _flowRes$data.workflowcode, formid = _flowRes$data.formid, columnlist = _flowRes$data.columnlist, isconfig = _flowRes$data.isconfig, _processList = _flowRes$data.processList, wfTitleConfig = _flowRes$data.wfTitleConfig, _componentUrl = _flowRes$data.componentUrl;
|
|
146
|
+
defaultWorkCode = workflowcode; // 3. 处理 processList (关联的多流程)
|
|
147
|
+
if (_processList && _processList.length && _processList.length > 0) {
|
|
148
|
+
setProcessList(_processList);
|
|
149
|
+
;
|
|
150
|
+
form.setFieldsValue({
|
|
151
|
+
processDef: _processList[0].wfBaseCode
|
|
152
|
+
});
|
|
153
|
+
defaultWorkCode = _processList[0].wfBaseCode;
|
|
154
|
+
}
|
|
155
|
+
// 4. 处理 componentUrl
|
|
156
|
+
if (_componentUrl) {
|
|
157
|
+
setComponentUrl(_componentUrl);
|
|
158
|
+
}
|
|
159
|
+
if (!(!name || name === "")) {
|
|
160
|
+
_context.next = 22;
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
_context.next = 20;
|
|
164
|
+
return getWfTitle(wfTitleConfig, record);
|
|
165
|
+
case 20:
|
|
166
|
+
wfTitle = _context.sent;
|
|
167
|
+
name = wfTitle;
|
|
168
|
+
case 22:
|
|
169
|
+
//是否配置使用表单
|
|
134
170
|
setdefineid(formid && isconfig == 1 ? formid : -1);
|
|
135
171
|
if (formid == null && columnlist) settablename(columnlist);
|
|
172
|
+
// 6. 查询审批人
|
|
173
|
+
getApprovalUsers(defaultWorkCode, record);
|
|
136
174
|
|
|
175
|
+
// 5. 设置表单名称
|
|
176
|
+
defaultName = name || buildDefaultName(record);
|
|
177
|
+
form.setFieldsValue({
|
|
178
|
+
name: defaultName
|
|
179
|
+
});
|
|
180
|
+
setdata(flowRes.data);
|
|
181
|
+
case 28:
|
|
182
|
+
_context.prev = 28;
|
|
183
|
+
setload(false);
|
|
184
|
+
return _context.finish(28);
|
|
185
|
+
case 31:
|
|
186
|
+
case "end":
|
|
187
|
+
return _context.stop();
|
|
188
|
+
}
|
|
189
|
+
}, _callee, null, [[0,, 28, 31]]);
|
|
190
|
+
}));
|
|
191
|
+
return function findByOption(_x, _x2, _x3) {
|
|
192
|
+
return _ref.apply(this, arguments);
|
|
193
|
+
};
|
|
194
|
+
}();
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* 查询审批人
|
|
198
|
+
* @param defaultWorkCode
|
|
199
|
+
* @returns
|
|
200
|
+
*/
|
|
201
|
+
var getApprovalUsers = /*#__PURE__*/function () {
|
|
202
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(workflowcode, record) {
|
|
203
|
+
var _userRes$data;
|
|
204
|
+
var userRes, _ref3, rolename, username, selectType, options, _rolename$0$rolecode, _rolename$, _username$0$userid, _username$, users;
|
|
205
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
206
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
207
|
+
case 0:
|
|
208
|
+
console.log(workflowcode);
|
|
209
|
+
form.setFieldsValue({
|
|
210
|
+
person: null
|
|
211
|
+
});
|
|
137
212
|
// 3. 查询审批人
|
|
138
|
-
|
|
213
|
+
_context2.next = 4;
|
|
139
214
|
return findByUserid(workflowcode, record);
|
|
140
|
-
case
|
|
141
|
-
userRes =
|
|
215
|
+
case 4:
|
|
216
|
+
userRes = _context2.sent;
|
|
142
217
|
if (userRes !== null && userRes !== void 0 && userRes.success) {
|
|
143
|
-
|
|
218
|
+
_context2.next = 8;
|
|
144
219
|
break;
|
|
145
220
|
}
|
|
146
221
|
_message.error('查询候选人失败!');
|
|
147
|
-
setDefaultName(record, name);
|
|
148
|
-
return
|
|
149
|
-
case
|
|
150
|
-
|
|
222
|
+
// setDefaultName(record, name);
|
|
223
|
+
return _context2.abrupt("return");
|
|
224
|
+
case 8:
|
|
225
|
+
_ref3 = (_userRes$data = userRes.data) !== null && _userRes$data !== void 0 ? _userRes$data : {}, rolename = _ref3.rolename, username = _ref3.username, selectType = _ref3.selectType;
|
|
226
|
+
console.log(username);
|
|
151
227
|
setuserdata(userRes.data);
|
|
152
|
-
setSelectType(
|
|
228
|
+
setSelectType(selectType);
|
|
153
229
|
|
|
154
230
|
// 4. 构建 options
|
|
155
231
|
options = [];
|
|
@@ -158,34 +234,32 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
158
234
|
}
|
|
159
235
|
if (username && username !== '未选择人员') {
|
|
160
236
|
users = (_username$0$userid = (_username$ = username[0]) === null || _username$ === void 0 ? void 0 : _username$.userid) !== null && _username$0$userid !== void 0 ? _username$0$userid : [];
|
|
161
|
-
if (
|
|
237
|
+
if (selectType === 'moren' && users.length) {
|
|
162
238
|
form.setFieldsValue({
|
|
163
239
|
person: users
|
|
164
240
|
});
|
|
165
241
|
}
|
|
166
242
|
options.push.apply(options, _toConsumableArray(users));
|
|
167
243
|
}
|
|
168
|
-
|
|
169
|
-
defaultName = name || buildDefaultName(record);
|
|
170
|
-
form.setFieldsValue({
|
|
171
|
-
name: defaultName
|
|
172
|
-
});
|
|
173
|
-
setdata(flowRes.data);
|
|
174
|
-
case 32:
|
|
175
|
-
_context.prev = 32;
|
|
176
|
-
setload(false);
|
|
177
|
-
return _context.finish(32);
|
|
178
|
-
case 35:
|
|
244
|
+
case 15:
|
|
179
245
|
case "end":
|
|
180
|
-
return
|
|
246
|
+
return _context2.stop();
|
|
181
247
|
}
|
|
182
|
-
},
|
|
248
|
+
}, _callee2);
|
|
183
249
|
}));
|
|
184
|
-
return function
|
|
185
|
-
return
|
|
250
|
+
return function getApprovalUsers(_x4, _x5) {
|
|
251
|
+
return _ref2.apply(this, arguments);
|
|
186
252
|
};
|
|
187
253
|
}();
|
|
188
|
-
|
|
254
|
+
/**
|
|
255
|
+
* 处理 processDef 变化
|
|
256
|
+
* 发生变化后需要重新获取审批人
|
|
257
|
+
*/
|
|
258
|
+
useEffect(function () {
|
|
259
|
+
if (processDefVal && record) {
|
|
260
|
+
getApprovalUsers(processDefVal, record);
|
|
261
|
+
}
|
|
262
|
+
}, [processDefVal, record]);
|
|
189
263
|
// 抽离:设置默认名称
|
|
190
264
|
function setDefaultName(record, name) {
|
|
191
265
|
var defaultName = name || buildDefaultName(record);
|
|
@@ -233,23 +307,23 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
233
307
|
* @param operationname
|
|
234
308
|
*/
|
|
235
309
|
var onStartInstance = /*#__PURE__*/function () {
|
|
236
|
-
var
|
|
310
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(key, instanceName, id, defineid, tablename, memo, wfBaseInfoId) {
|
|
237
311
|
var firstPerson, flagWf, res, wfData, _res;
|
|
238
|
-
return _regeneratorRuntime().wrap(function
|
|
239
|
-
while (1) switch (
|
|
312
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
313
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
240
314
|
case 0:
|
|
241
315
|
firstPerson = form.getFieldValue("person");
|
|
242
316
|
flagWf = false; //启动
|
|
243
317
|
if (!isReturn) {
|
|
244
|
-
|
|
318
|
+
_context3.next = 19;
|
|
245
319
|
break;
|
|
246
320
|
}
|
|
247
|
-
|
|
321
|
+
_context3.next = 5;
|
|
248
322
|
return updateProcessInstance(instanceName, memo, firstPerson, record.data.processInstanceId);
|
|
249
323
|
case 5:
|
|
250
|
-
res =
|
|
324
|
+
res = _context3.sent;
|
|
251
325
|
if (!(res && res.success)) {
|
|
252
|
-
|
|
326
|
+
_context3.next = 16;
|
|
253
327
|
break;
|
|
254
328
|
}
|
|
255
329
|
_message.success("送审成功!");
|
|
@@ -258,18 +332,18 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
258
332
|
setVisible(false);
|
|
259
333
|
//刷新状态
|
|
260
334
|
if (!(urlUpdateStatus != undefined && urlUpdateStatus != null)) {
|
|
261
|
-
|
|
335
|
+
_context3.next = 14;
|
|
262
336
|
break;
|
|
263
337
|
}
|
|
264
|
-
|
|
338
|
+
_context3.next = 14;
|
|
265
339
|
return SubmitDataStatus(record.id, props.statusList[0], urlUpdateStatus, prefix);
|
|
266
340
|
case 14:
|
|
267
|
-
|
|
341
|
+
_context3.next = 17;
|
|
268
342
|
break;
|
|
269
343
|
case 16:
|
|
270
344
|
_message.error("请检查流程是否部署!");
|
|
271
345
|
case 17:
|
|
272
|
-
|
|
346
|
+
_context3.next = 34;
|
|
273
347
|
break;
|
|
274
348
|
case 19:
|
|
275
349
|
//启动流程数据
|
|
@@ -290,7 +364,7 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
290
364
|
dataViewIid: props.dataViewIid != undefined ? props.dataViewIid : "-1",
|
|
291
365
|
dataSceneIid: props.dataSceneIid != undefined ? props.dataSceneIid : "-1",
|
|
292
366
|
serviceUrl: props.serviceUrl != undefined ? props.serviceUrl : "",
|
|
293
|
-
componentUrl: props.componentUrl != undefined ? props.componentUrl : null,
|
|
367
|
+
componentUrl: props.componentUrl != undefined ? props.componentUrl : componentUrl || null,
|
|
294
368
|
//组件地址
|
|
295
369
|
ownerAppCode: data.ownerAppCode != undefined ? data.ownerAppCode : "",
|
|
296
370
|
wfBaseInfoId: wfBaseInfoId != undefined ? wfBaseInfoId : "",
|
|
@@ -300,12 +374,12 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
300
374
|
isProjectBG: props.isProjectBG != undefined ? props.isProjectBG : false
|
|
301
375
|
})
|
|
302
376
|
}; //启动流程
|
|
303
|
-
|
|
377
|
+
_context3.next = 22;
|
|
304
378
|
return startData(wfData);
|
|
305
379
|
case 22:
|
|
306
|
-
_res =
|
|
380
|
+
_res = _context3.sent;
|
|
307
381
|
if (!(_res && _res.success)) {
|
|
308
|
-
|
|
382
|
+
_context3.next = 33;
|
|
309
383
|
break;
|
|
310
384
|
}
|
|
311
385
|
_message.success("送审成功!");
|
|
@@ -314,13 +388,13 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
314
388
|
setVisible(false);
|
|
315
389
|
//刷新状态
|
|
316
390
|
if (!(urlUpdateStatus != undefined && urlUpdateStatus != null)) {
|
|
317
|
-
|
|
391
|
+
_context3.next = 31;
|
|
318
392
|
break;
|
|
319
393
|
}
|
|
320
|
-
|
|
394
|
+
_context3.next = 31;
|
|
321
395
|
return SubmitDataStatus(record.id, props.statusList[0], urlUpdateStatus, prefix);
|
|
322
396
|
case 31:
|
|
323
|
-
|
|
397
|
+
_context3.next = 34;
|
|
324
398
|
break;
|
|
325
399
|
case 33:
|
|
326
400
|
_message.error("请检查流程是否部署!");
|
|
@@ -329,12 +403,12 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
329
403
|
props.callback(flagWf);
|
|
330
404
|
case 35:
|
|
331
405
|
case "end":
|
|
332
|
-
return
|
|
406
|
+
return _context3.stop();
|
|
333
407
|
}
|
|
334
|
-
},
|
|
408
|
+
}, _callee3);
|
|
335
409
|
}));
|
|
336
|
-
return function onStartInstance(
|
|
337
|
-
return
|
|
410
|
+
return function onStartInstance(_x6, _x7, _x8, _x9, _x10, _x11, _x12) {
|
|
411
|
+
return _ref4.apply(this, arguments);
|
|
338
412
|
};
|
|
339
413
|
}();
|
|
340
414
|
|
|
@@ -359,15 +433,15 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
359
433
|
* @param name
|
|
360
434
|
*/
|
|
361
435
|
var addFn = /*#__PURE__*/function () {
|
|
362
|
-
var
|
|
363
|
-
return _regeneratorRuntime().wrap(function
|
|
364
|
-
while (1) switch (
|
|
436
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(record, code, name) {
|
|
437
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
438
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
365
439
|
case 0:
|
|
366
440
|
setrecord(record);
|
|
367
441
|
if (record.actionId != undefined) {
|
|
368
442
|
setActionId(record.actionId);
|
|
369
443
|
}
|
|
370
|
-
if (record.data.isReturn != undefined && record.data.isReturn == true) {
|
|
444
|
+
if (record.data && record.data.isReturn != undefined && record.data.isReturn == true) {
|
|
371
445
|
//是退回的流程
|
|
372
446
|
console.log("是退回的流程");
|
|
373
447
|
setisReturn(true);
|
|
@@ -378,14 +452,27 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
378
452
|
findByOption(record, code, name);
|
|
379
453
|
case 5:
|
|
380
454
|
case "end":
|
|
381
|
-
return
|
|
455
|
+
return _context4.stop();
|
|
382
456
|
}
|
|
383
|
-
},
|
|
457
|
+
}, _callee4);
|
|
384
458
|
}));
|
|
385
|
-
return function addFn(
|
|
386
|
-
return
|
|
459
|
+
return function addFn(_x13, _x14, _x15) {
|
|
460
|
+
return _ref5.apply(this, arguments);
|
|
387
461
|
};
|
|
388
462
|
}();
|
|
463
|
+
|
|
464
|
+
//组织选择流程下拉项
|
|
465
|
+
var toOptions = function toOptions(processlist) {
|
|
466
|
+
if (processlist != undefined && processlist != null) {
|
|
467
|
+
return processlist.map(function (item) {
|
|
468
|
+
return {
|
|
469
|
+
label: item.wfBaseName,
|
|
470
|
+
value: item.wfBaseCode
|
|
471
|
+
};
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
return [];
|
|
475
|
+
};
|
|
389
476
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyleProvider, {
|
|
390
477
|
hashPriority: "high",
|
|
391
478
|
transformers: [legacyLogicalPropertiesTransformer]
|
|
@@ -413,14 +500,36 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
413
500
|
tip: "\u52A0\u8F7D\u4E2D....",
|
|
414
501
|
spinning: load
|
|
415
502
|
}, /*#__PURE__*/React.createElement(_Form, {
|
|
416
|
-
form: form
|
|
417
|
-
|
|
503
|
+
form: form,
|
|
504
|
+
labelCol: {
|
|
505
|
+
span: 4
|
|
506
|
+
},
|
|
507
|
+
wrapperCol: {
|
|
508
|
+
span: 20
|
|
509
|
+
}
|
|
510
|
+
}, processList != undefined && processList != null && processList.length > 0 ? /*#__PURE__*/React.createElement(_Row, {
|
|
511
|
+
gutter: 24
|
|
512
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
513
|
+
span: 24
|
|
514
|
+
}, /*#__PURE__*/React.createElement(_Form.Item, {
|
|
515
|
+
name: "processDef",
|
|
516
|
+
labelAlign: "right",
|
|
517
|
+
label: "\u6D41\u7A0B\u5B9E\u4F8B",
|
|
518
|
+
rules: [{
|
|
519
|
+
required: true,
|
|
520
|
+
message: '请填写审核标题'
|
|
521
|
+
}]
|
|
522
|
+
}, /*#__PURE__*/React.createElement(_Select, {
|
|
523
|
+
placeholder: "\u9009\u62E9\u5BA1\u6279\u6D41\u7A0B",
|
|
524
|
+
options: toOptions(processList)
|
|
525
|
+
})))) : null, /*#__PURE__*/React.createElement(_Row, {
|
|
418
526
|
gutter: 24
|
|
419
527
|
}, /*#__PURE__*/React.createElement(_Col, {
|
|
420
528
|
span: 24
|
|
421
529
|
}, /*#__PURE__*/React.createElement(_Form.Item, {
|
|
422
530
|
name: "name",
|
|
423
531
|
label: "\u6D41\u7A0B\u6807\u9898",
|
|
532
|
+
labelAlign: "right",
|
|
424
533
|
rules: [{
|
|
425
534
|
required: true,
|
|
426
535
|
message: '请填写审核标题'
|
|
@@ -434,6 +543,7 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
434
543
|
}, /*#__PURE__*/React.createElement(_Form.Item, {
|
|
435
544
|
name: "person",
|
|
436
545
|
label: "\u5BA1\u6838\u4EBA\u5458",
|
|
546
|
+
labelAlign: "right",
|
|
437
547
|
rules: [{
|
|
438
548
|
required: true,
|
|
439
549
|
message: '请填写审核人员'
|
|
@@ -447,6 +557,12 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
447
557
|
span: 24
|
|
448
558
|
}, /*#__PURE__*/React.createElement(_Form.Item, {
|
|
449
559
|
name: "memo",
|
|
450
|
-
label: "\u9644\u8A00"
|
|
451
|
-
|
|
560
|
+
label: "\u9644\u8A00",
|
|
561
|
+
labelAlign: "right"
|
|
562
|
+
}, /*#__PURE__*/React.createElement(TextArea, {
|
|
563
|
+
autoSize: {
|
|
564
|
+
minRows: 2,
|
|
565
|
+
maxRows: 4
|
|
566
|
+
}
|
|
567
|
+
})))))))));
|
|
452
568
|
});
|