@deepinnet-components/pc 0.0.61 → 0.0.63
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/UserCenter/AccountPage/components/CreateAccount/index.js +31 -31
- package/dist/UserCenter/AccountPage/components/EditPasswordModal/index.js +6 -7
- package/dist/UserCenter/AccountPage/index.d.ts +9 -2
- package/dist/UserCenter/AccountPage/index.js +189 -169
- package/dist/UserCenter/ConfigProvider/index.d.ts +4 -3
- package/dist/UserCenter/ConfigProvider/index.js +22 -4
- package/dist/UserCenter/OrgPage/components/CreateMember/index.js +3 -3
- package/dist/UserCenter/OrgPage/components/CreateOrg/index.js +3 -3
- package/dist/UserCenter/OrgPage/index.d.ts +10 -2
- package/dist/UserCenter/OrgPage/index.js +89 -96
- package/dist/UserCenter/RolePage/components/Create/index.js +18 -104
- package/dist/UserCenter/RolePage/index.d.ts +9 -2
- package/dist/UserCenter/RolePage/index.js +77 -72
- package/dist/UserCenter/index.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
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; }
|
|
3
|
+
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); } }
|
|
4
|
+
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); }); }; }
|
|
2
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
6
|
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."); }
|
|
4
7
|
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); }
|
|
@@ -10,9 +13,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
10
13
|
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; }
|
|
11
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
12
15
|
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); }
|
|
13
|
-
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; }
|
|
14
|
-
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); } }
|
|
15
|
-
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); }); }; }
|
|
16
16
|
import { Form, FormButtonGroup, FormItem, Input } from '@formily/antd-v5';
|
|
17
17
|
import { createForm, onFieldValueChange } from '@formily/core';
|
|
18
18
|
import { createSchemaField } from '@formily/react';
|
|
@@ -161,6 +161,34 @@ var CreateAccount = function CreateAccount(props) {
|
|
|
161
161
|
passwordConfig = contextValue.passwordConfig,
|
|
162
162
|
passwordEncryption = contextValue.passwordEncryption,
|
|
163
163
|
passwordEncryptionNeedSalt = contextValue.passwordEncryptionNeedSalt;
|
|
164
|
+
var form = useMemo(function () {
|
|
165
|
+
return createForm({
|
|
166
|
+
effects: function effects() {
|
|
167
|
+
onFieldValueChange('orgArr', function (field) {
|
|
168
|
+
form.setFieldState('bindMemberId', function (state) {
|
|
169
|
+
var _field$value, _field$value2;
|
|
170
|
+
state.value = undefined;
|
|
171
|
+
state.componentProps = _objectSpread(_objectSpread({}, state.componentProps), {}, {
|
|
172
|
+
disabled: addOrEdit === 'edit' || !field.value,
|
|
173
|
+
searchParams: {
|
|
174
|
+
departmentId: (_field$value = field.value) === null || _field$value === void 0 ? void 0 : _field$value[((_field$value2 = field.value) === null || _field$value2 === void 0 ? void 0 : _field$value2.length) - 1],
|
|
175
|
+
memberStatus: addOrEdit === 'add' ? 'available' : 'occupied'
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
}, [visible]);
|
|
183
|
+
var _useState = useState(addOrEdit === 'edit'),
|
|
184
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
185
|
+
getDataLoading = _useState2[0],
|
|
186
|
+
setGetDataLoading = _useState2[1];
|
|
187
|
+
var _useState3 = useState(false),
|
|
188
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
189
|
+
loading = _useState4[0],
|
|
190
|
+
setLoading = _useState4[1];
|
|
191
|
+
var canSubmit = useRef(true);
|
|
164
192
|
var getAccountDetail = /*#__PURE__*/function () {
|
|
165
193
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
166
194
|
var params, _yield$ApiService$get, data, _data$departmentFlatD, _data$userMemberBindD;
|
|
@@ -218,34 +246,6 @@ var CreateAccount = function CreateAccount(props) {
|
|
|
218
246
|
form.reset();
|
|
219
247
|
}
|
|
220
248
|
}, [visible, actionRow]);
|
|
221
|
-
var form = useMemo(function () {
|
|
222
|
-
return createForm({
|
|
223
|
-
effects: function effects() {
|
|
224
|
-
onFieldValueChange('orgArr', function (field) {
|
|
225
|
-
form.setFieldState('bindMemberId', function (state) {
|
|
226
|
-
var _field$value, _field$value2;
|
|
227
|
-
state.value = undefined;
|
|
228
|
-
state.componentProps = _objectSpread(_objectSpread({}, state.componentProps), {}, {
|
|
229
|
-
disabled: addOrEdit === 'edit' || !field.value,
|
|
230
|
-
searchParams: {
|
|
231
|
-
departmentId: (_field$value = field.value) === null || _field$value === void 0 ? void 0 : _field$value[((_field$value2 = field.value) === null || _field$value2 === void 0 ? void 0 : _field$value2.length) - 1],
|
|
232
|
-
memberStatus: addOrEdit === 'add' ? 'available' : 'occupied'
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
});
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
}, [visible]);
|
|
240
|
-
var _useState = useState(addOrEdit === 'edit'),
|
|
241
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
242
|
-
getDataLoading = _useState2[0],
|
|
243
|
-
setGetDataLoading = _useState2[1];
|
|
244
|
-
var _useState3 = useState(false),
|
|
245
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
246
|
-
loading = _useState4[0],
|
|
247
|
-
setLoading = _useState4[1];
|
|
248
|
-
var canSubmit = useRef(true);
|
|
249
249
|
var handleSubmit = /*#__PURE__*/function () {
|
|
250
250
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
251
251
|
var values, params, _sm4Encrypt, key, encryptedData, _yield$ApiService$sav, success, _params, _yield$ApiService$sav2, _success;
|
|
@@ -8,11 +8,11 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
8
|
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; }
|
|
9
9
|
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; } }
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
import React, { useContext, useState, useMemo } from 'react';
|
|
12
|
-
import { Modal, message } from 'antd';
|
|
13
11
|
import { Form, FormItem, Input, Select } from '@formily/antd-v5';
|
|
14
12
|
import { createForm } from '@formily/core';
|
|
15
13
|
import { createSchemaField } from '@formily/react';
|
|
14
|
+
import { Modal, message } from 'antd';
|
|
15
|
+
import React, { useContext, useMemo, useState } from 'react';
|
|
16
16
|
import { hashWithCryptoJS, sm4Encrypt } from "../../../utils";
|
|
17
17
|
import ValueContext from "../../../context";
|
|
18
18
|
var SchemaField = createSchemaField({
|
|
@@ -76,8 +76,7 @@ var schema = {
|
|
|
76
76
|
};
|
|
77
77
|
var EditPasswordModal = function EditPasswordModal(props) {
|
|
78
78
|
var actionRow = props.actionRow,
|
|
79
|
-
onClose = props.onClose
|
|
80
|
-
onSuccess = props.onSuccess;
|
|
79
|
+
onClose = props.onClose;
|
|
81
80
|
var contextValue = useContext(ValueContext);
|
|
82
81
|
var ApiService = contextValue.ApiService,
|
|
83
82
|
passwordConfig = contextValue.passwordConfig,
|
|
@@ -87,6 +86,9 @@ var EditPasswordModal = function EditPasswordModal(props) {
|
|
|
87
86
|
_useState2 = _slicedToArray(_useState, 2),
|
|
88
87
|
loading = _useState2[0],
|
|
89
88
|
setLoading = _useState2[1];
|
|
89
|
+
var form = useMemo(function () {
|
|
90
|
+
return createForm({});
|
|
91
|
+
}, []);
|
|
90
92
|
function handleOk() {
|
|
91
93
|
return _handleOk.apply(this, arguments);
|
|
92
94
|
}
|
|
@@ -141,9 +143,6 @@ var EditPasswordModal = function EditPasswordModal(props) {
|
|
|
141
143
|
function handleCancel() {
|
|
142
144
|
onClose === null || onClose === void 0 || onClose();
|
|
143
145
|
}
|
|
144
|
-
var form = useMemo(function () {
|
|
145
|
-
return createForm({});
|
|
146
|
-
}, []);
|
|
147
146
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
148
147
|
title: "\u4FEE\u6539\u5BC6\u7801",
|
|
149
148
|
open: true,
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface AccountPageRef {
|
|
4
|
+
handleAddAccount: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface AccountPageProps {
|
|
7
|
+
hideTopBtn?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const AccountList: React.ForwardRefExoticComponent<AccountPageProps & React.RefAttributes<AccountPageRef>>;
|
|
3
10
|
export default AccountList;
|
|
@@ -19,11 +19,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
19
19
|
import { ShenduTable } from "../..";
|
|
20
20
|
import { Button, message, Tooltip } from 'antd';
|
|
21
21
|
import dayjs from 'dayjs';
|
|
22
|
-
import React, { useContext, useRef, useState } from 'react';
|
|
23
|
-
import CreateAccount from "./components/CreateAccount";
|
|
24
|
-
import EditPasswordModal from "./components/EditPasswordModal";
|
|
22
|
+
import React, { forwardRef, useContext, useImperativeHandle, useRef, useState } from 'react';
|
|
25
23
|
import { exportFile } from "../utils";
|
|
26
24
|
import ValueContext from "../context";
|
|
25
|
+
import OrgSelect from "../OrgSelect";
|
|
26
|
+
import EditPasswordModal from "./components/EditPasswordModal";
|
|
27
|
+
import CreateAccount from "./components/CreateAccount";
|
|
27
28
|
var statusMap = {
|
|
28
29
|
0: {
|
|
29
30
|
text: '正常',
|
|
@@ -34,9 +35,9 @@ var statusMap = {
|
|
|
34
35
|
color: '#f50'
|
|
35
36
|
}
|
|
36
37
|
};
|
|
37
|
-
|
|
38
38
|
// 账号管理
|
|
39
|
-
var AccountList = function
|
|
39
|
+
var AccountList = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
40
|
+
var hideTopBtn = _ref.hideTopBtn;
|
|
40
41
|
var contextValue = useContext(ValueContext);
|
|
41
42
|
var ApiService = contextValue.ApiService,
|
|
42
43
|
Components = contextValue.Components,
|
|
@@ -47,8 +48,168 @@ var AccountList = function AccountList() {
|
|
|
47
48
|
canEditPassword = contextValue.canEditPassword,
|
|
48
49
|
isNeedExportAccount = contextValue.isNeedExportAccount,
|
|
49
50
|
requestHeaders = contextValue.requestHeaders,
|
|
50
|
-
api = contextValue.api
|
|
51
|
+
api = contextValue.api,
|
|
52
|
+
accountSearchNeedDepartment = contextValue.accountSearchNeedDepartment;
|
|
51
53
|
var tableRef = useRef(null);
|
|
54
|
+
var tableList = useRef([]);
|
|
55
|
+
|
|
56
|
+
//
|
|
57
|
+
var _useState = useState({
|
|
58
|
+
visible: false,
|
|
59
|
+
addOrEdit: 'add',
|
|
60
|
+
actionRow: undefined
|
|
61
|
+
}),
|
|
62
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
63
|
+
accountModalInfo = _useState2[0],
|
|
64
|
+
setAccountModalInfo = _useState2[1];
|
|
65
|
+
var _useState3 = useState(),
|
|
66
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
67
|
+
editPasswordAccount = _useState4[0],
|
|
68
|
+
setEditPasswordAccount = _useState4[1];
|
|
69
|
+
var _useState5 = useState(false),
|
|
70
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
71
|
+
passwordModalShow = _useState6[0],
|
|
72
|
+
setPasswordModalShow = _useState6[1];
|
|
73
|
+
function handleAddAccount() {
|
|
74
|
+
setAccountModalInfo({
|
|
75
|
+
visible: true,
|
|
76
|
+
addOrEdit: 'add',
|
|
77
|
+
actionRow: undefined
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
useImperativeHandle(ref, function () {
|
|
81
|
+
return {
|
|
82
|
+
handleAddAccount: handleAddAccount
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
function handleEditAccount(row) {
|
|
86
|
+
setAccountModalInfo({
|
|
87
|
+
visible: true,
|
|
88
|
+
addOrEdit: 'edit',
|
|
89
|
+
actionRow: row
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// 删除账号
|
|
94
|
+
function handleDeleteAccount(_x) {
|
|
95
|
+
return _handleDeleteAccount.apply(this, arguments);
|
|
96
|
+
} // 冻结账号
|
|
97
|
+
function _handleDeleteAccount() {
|
|
98
|
+
_handleDeleteAccount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(row) {
|
|
99
|
+
var _yield$ApiService$del, success;
|
|
100
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
101
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
102
|
+
case 0:
|
|
103
|
+
_context2.next = 2;
|
|
104
|
+
return ApiService.deleteAccount({
|
|
105
|
+
accountNo: row.accountNo
|
|
106
|
+
});
|
|
107
|
+
case 2:
|
|
108
|
+
_yield$ApiService$del = _context2.sent;
|
|
109
|
+
success = _yield$ApiService$del.success;
|
|
110
|
+
if (success) {
|
|
111
|
+
message.success('删除成功');
|
|
112
|
+
if (tableList.current.length === 1) {
|
|
113
|
+
tableRef.current.reload();
|
|
114
|
+
} else {
|
|
115
|
+
tableRef.current.reloadCurrentPage();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
case 5:
|
|
119
|
+
case "end":
|
|
120
|
+
return _context2.stop();
|
|
121
|
+
}
|
|
122
|
+
}, _callee2);
|
|
123
|
+
}));
|
|
124
|
+
return _handleDeleteAccount.apply(this, arguments);
|
|
125
|
+
}
|
|
126
|
+
function handleFreezeAccount(_x2) {
|
|
127
|
+
return _handleFreezeAccount.apply(this, arguments);
|
|
128
|
+
} // 解冻账号
|
|
129
|
+
function _handleFreezeAccount() {
|
|
130
|
+
_handleFreezeAccount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(row) {
|
|
131
|
+
var _yield$ApiService$fre, success;
|
|
132
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
133
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
134
|
+
case 0:
|
|
135
|
+
_context3.next = 2;
|
|
136
|
+
return ApiService.freezeAccount({
|
|
137
|
+
accountNo: row.accountNo
|
|
138
|
+
});
|
|
139
|
+
case 2:
|
|
140
|
+
_yield$ApiService$fre = _context3.sent;
|
|
141
|
+
success = _yield$ApiService$fre.success;
|
|
142
|
+
if (success) {
|
|
143
|
+
message.success('冻结成功');
|
|
144
|
+
if (tableList.current.length === 1) {
|
|
145
|
+
tableRef.current.reload();
|
|
146
|
+
} else {
|
|
147
|
+
tableRef.current.reloadCurrentPage();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
case 5:
|
|
151
|
+
case "end":
|
|
152
|
+
return _context3.stop();
|
|
153
|
+
}
|
|
154
|
+
}, _callee3);
|
|
155
|
+
}));
|
|
156
|
+
return _handleFreezeAccount.apply(this, arguments);
|
|
157
|
+
}
|
|
158
|
+
function handleUnFreezeAccount(_x3) {
|
|
159
|
+
return _handleUnFreezeAccount.apply(this, arguments);
|
|
160
|
+
}
|
|
161
|
+
function _handleUnFreezeAccount() {
|
|
162
|
+
_handleUnFreezeAccount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(row) {
|
|
163
|
+
var _yield$ApiService$unF, success;
|
|
164
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
165
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
166
|
+
case 0:
|
|
167
|
+
_context4.next = 2;
|
|
168
|
+
return ApiService.unFreezeAccount({
|
|
169
|
+
accountNo: row.accountNo
|
|
170
|
+
});
|
|
171
|
+
case 2:
|
|
172
|
+
_yield$ApiService$unF = _context4.sent;
|
|
173
|
+
success = _yield$ApiService$unF.success;
|
|
174
|
+
if (success) {
|
|
175
|
+
message.success('解冻成功');
|
|
176
|
+
if (tableList.current.length === 1) {
|
|
177
|
+
tableRef.current.reload();
|
|
178
|
+
} else {
|
|
179
|
+
tableRef.current.reloadCurrentPage();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
case 5:
|
|
183
|
+
case "end":
|
|
184
|
+
return _context4.stop();
|
|
185
|
+
}
|
|
186
|
+
}, _callee4);
|
|
187
|
+
}));
|
|
188
|
+
return _handleUnFreezeAccount.apply(this, arguments);
|
|
189
|
+
}
|
|
190
|
+
function handleClickOrg(id) {
|
|
191
|
+
navigate("".concat(pageUrl.orgPage, "?id=").concat(id));
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// 导出账号
|
|
195
|
+
function handleExportAccount() {
|
|
196
|
+
exportFile({
|
|
197
|
+
method: 'post',
|
|
198
|
+
url: api.exportAccount,
|
|
199
|
+
headers: _objectSpread({}, requestHeaders),
|
|
200
|
+
data: {
|
|
201
|
+
userType: userType
|
|
202
|
+
},
|
|
203
|
+
blobType: 'text/csv;charset=utf-8',
|
|
204
|
+
fileName: '账号列表',
|
|
205
|
+
successFn: function successFn() {
|
|
206
|
+
message.success('导出成功');
|
|
207
|
+
},
|
|
208
|
+
failFn: function failFn() {
|
|
209
|
+
message.error('导出失败');
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
}
|
|
52
213
|
var columns = [{
|
|
53
214
|
title: '姓名',
|
|
54
215
|
dataIndex: 'name',
|
|
@@ -114,13 +275,20 @@ var AccountList = function AccountList() {
|
|
|
114
275
|
}
|
|
115
276
|
}, item.name), !isLast && /*#__PURE__*/React.createElement("div", null, "/"));
|
|
116
277
|
}));
|
|
117
|
-
}
|
|
278
|
+
},
|
|
279
|
+
searchConfig: accountSearchNeedDepartment ? {
|
|
280
|
+
props: {
|
|
281
|
+
allowClear: true,
|
|
282
|
+
placeholder: '请选择组织'
|
|
283
|
+
},
|
|
284
|
+
searchKey: 'orgIds',
|
|
285
|
+
component: 'OrgSelect'
|
|
286
|
+
} : undefined
|
|
118
287
|
}, {
|
|
119
288
|
title: '角色',
|
|
120
289
|
dataIndex: 'roles',
|
|
121
290
|
width: 150,
|
|
122
291
|
render: function render(_) {
|
|
123
|
-
var arr = _ === null || _ === void 0 ? void 0 : _[0];
|
|
124
292
|
if (!(_ !== null && _ !== void 0 && _.length)) return '-';
|
|
125
293
|
var text = '';
|
|
126
294
|
_.forEach(function (item, index) {
|
|
@@ -220,167 +388,16 @@ var AccountList = function AccountList() {
|
|
|
220
388
|
});
|
|
221
389
|
}
|
|
222
390
|
}];
|
|
223
|
-
|
|
224
|
-
//
|
|
225
|
-
var _useState = useState({
|
|
226
|
-
visible: false,
|
|
227
|
-
addOrEdit: 'add',
|
|
228
|
-
actionRow: undefined
|
|
229
|
-
}),
|
|
230
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
231
|
-
accountModalInfo = _useState2[0],
|
|
232
|
-
setAccountModalInfo = _useState2[1];
|
|
233
|
-
function handleAddAccount() {
|
|
234
|
-
setAccountModalInfo({
|
|
235
|
-
visible: true,
|
|
236
|
-
addOrEdit: 'add',
|
|
237
|
-
actionRow: undefined
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
function handleEditAccount(row) {
|
|
241
|
-
setAccountModalInfo({
|
|
242
|
-
visible: true,
|
|
243
|
-
addOrEdit: 'edit',
|
|
244
|
-
actionRow: row
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
// 删除账号
|
|
249
|
-
function handleDeleteAccount(_x) {
|
|
250
|
-
return _handleDeleteAccount.apply(this, arguments);
|
|
251
|
-
} // 冻结账号
|
|
252
|
-
function _handleDeleteAccount() {
|
|
253
|
-
_handleDeleteAccount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(row) {
|
|
254
|
-
var _yield$ApiService$del, success;
|
|
255
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
256
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
257
|
-
case 0:
|
|
258
|
-
_context2.next = 2;
|
|
259
|
-
return ApiService.deleteAccount({
|
|
260
|
-
accountNo: row.accountNo
|
|
261
|
-
});
|
|
262
|
-
case 2:
|
|
263
|
-
_yield$ApiService$del = _context2.sent;
|
|
264
|
-
success = _yield$ApiService$del.success;
|
|
265
|
-
if (success) {
|
|
266
|
-
message.success('删除成功');
|
|
267
|
-
if (tableList.current.length === 1) {
|
|
268
|
-
tableRef.current.reload();
|
|
269
|
-
} else {
|
|
270
|
-
tableRef.current.reloadCurrentPage();
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
case 5:
|
|
274
|
-
case "end":
|
|
275
|
-
return _context2.stop();
|
|
276
|
-
}
|
|
277
|
-
}, _callee2);
|
|
278
|
-
}));
|
|
279
|
-
return _handleDeleteAccount.apply(this, arguments);
|
|
280
|
-
}
|
|
281
|
-
function handleFreezeAccount(_x2) {
|
|
282
|
-
return _handleFreezeAccount.apply(this, arguments);
|
|
283
|
-
} // 解冻账号
|
|
284
|
-
function _handleFreezeAccount() {
|
|
285
|
-
_handleFreezeAccount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(row) {
|
|
286
|
-
var _yield$ApiService$fre, success;
|
|
287
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
288
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
289
|
-
case 0:
|
|
290
|
-
_context3.next = 2;
|
|
291
|
-
return ApiService.freezeAccount({
|
|
292
|
-
accountNo: row.accountNo
|
|
293
|
-
});
|
|
294
|
-
case 2:
|
|
295
|
-
_yield$ApiService$fre = _context3.sent;
|
|
296
|
-
success = _yield$ApiService$fre.success;
|
|
297
|
-
if (success) {
|
|
298
|
-
message.success('冻结成功');
|
|
299
|
-
if (tableList.current.length === 1) {
|
|
300
|
-
tableRef.current.reload();
|
|
301
|
-
} else {
|
|
302
|
-
tableRef.current.reloadCurrentPage();
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
case 5:
|
|
306
|
-
case "end":
|
|
307
|
-
return _context3.stop();
|
|
308
|
-
}
|
|
309
|
-
}, _callee3);
|
|
310
|
-
}));
|
|
311
|
-
return _handleFreezeAccount.apply(this, arguments);
|
|
312
|
-
}
|
|
313
|
-
function handleUnFreezeAccount(_x3) {
|
|
314
|
-
return _handleUnFreezeAccount.apply(this, arguments);
|
|
315
|
-
}
|
|
316
|
-
function _handleUnFreezeAccount() {
|
|
317
|
-
_handleUnFreezeAccount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(row) {
|
|
318
|
-
var _yield$ApiService$unF, success;
|
|
319
|
-
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
320
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
321
|
-
case 0:
|
|
322
|
-
_context4.next = 2;
|
|
323
|
-
return ApiService.unFreezeAccount({
|
|
324
|
-
accountNo: row.accountNo
|
|
325
|
-
});
|
|
326
|
-
case 2:
|
|
327
|
-
_yield$ApiService$unF = _context4.sent;
|
|
328
|
-
success = _yield$ApiService$unF.success;
|
|
329
|
-
if (success) {
|
|
330
|
-
message.success('解冻成功');
|
|
331
|
-
if (tableList.current.length === 1) {
|
|
332
|
-
tableRef.current.reload();
|
|
333
|
-
} else {
|
|
334
|
-
tableRef.current.reloadCurrentPage();
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
case 5:
|
|
338
|
-
case "end":
|
|
339
|
-
return _context4.stop();
|
|
340
|
-
}
|
|
341
|
-
}, _callee4);
|
|
342
|
-
}));
|
|
343
|
-
return _handleUnFreezeAccount.apply(this, arguments);
|
|
344
|
-
}
|
|
345
|
-
var tableList = useRef([]);
|
|
346
|
-
function handleClickOrg(id) {
|
|
347
|
-
navigate("".concat(pageUrl.orgPage, "?id=").concat(id));
|
|
348
|
-
}
|
|
349
|
-
var _useState3 = useState(),
|
|
350
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
351
|
-
editPasswordAccount = _useState4[0],
|
|
352
|
-
setEditPasswordAccount = _useState4[1];
|
|
353
|
-
var _useState5 = useState(false),
|
|
354
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
355
|
-
passwordModalShow = _useState6[0],
|
|
356
|
-
setPasswordModalShow = _useState6[1];
|
|
357
|
-
|
|
358
|
-
// 导出账号
|
|
359
|
-
function handleExportAccount() {
|
|
360
|
-
exportFile({
|
|
361
|
-
method: 'post',
|
|
362
|
-
url: api.exportAccount,
|
|
363
|
-
headers: _objectSpread({}, requestHeaders),
|
|
364
|
-
data: {
|
|
365
|
-
userType: userType
|
|
366
|
-
},
|
|
367
|
-
blobType: 'text/csv;charset=utf-8',
|
|
368
|
-
fileName: '账号列表',
|
|
369
|
-
successFn: function successFn() {
|
|
370
|
-
message.success('导出成功');
|
|
371
|
-
},
|
|
372
|
-
failFn: function failFn() {
|
|
373
|
-
message.error('导出失败');
|
|
374
|
-
}
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
391
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ShenduTable, {
|
|
378
392
|
search: {
|
|
379
393
|
labelWidth: 'auto'
|
|
380
394
|
},
|
|
395
|
+
searchComponents: {
|
|
396
|
+
OrgSelect: OrgSelect
|
|
397
|
+
},
|
|
381
398
|
actionRef: tableRef,
|
|
382
399
|
request: ( /*#__PURE__*/function () {
|
|
383
|
-
var
|
|
400
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(searchInfo) {
|
|
384
401
|
var _search$username, _search$phone;
|
|
385
402
|
var pageNum, pageSize, search, params, _yield$ApiService$get, data;
|
|
386
403
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -394,9 +411,12 @@ var AccountList = function AccountList() {
|
|
|
394
411
|
phone: (_search$phone = search.phone) === null || _search$phone === void 0 ? void 0 : _search$phone.trim(),
|
|
395
412
|
userType: userType
|
|
396
413
|
};
|
|
397
|
-
|
|
414
|
+
if (search.orgIds) {
|
|
415
|
+
params.departmentIds = [search.orgIds[search.orgIds.length - 1]];
|
|
416
|
+
}
|
|
417
|
+
_context.next = 5;
|
|
398
418
|
return ApiService.getAccountList(params);
|
|
399
|
-
case
|
|
419
|
+
case 5:
|
|
400
420
|
_yield$ApiService$get = _context.sent;
|
|
401
421
|
data = _yield$ApiService$get.data;
|
|
402
422
|
tableList.current = data.list;
|
|
@@ -405,14 +425,14 @@ var AccountList = function AccountList() {
|
|
|
405
425
|
success: true,
|
|
406
426
|
total: data.total || 0
|
|
407
427
|
});
|
|
408
|
-
case
|
|
428
|
+
case 9:
|
|
409
429
|
case "end":
|
|
410
430
|
return _context.stop();
|
|
411
431
|
}
|
|
412
432
|
}, _callee);
|
|
413
433
|
}));
|
|
414
434
|
return function (_x4) {
|
|
415
|
-
return
|
|
435
|
+
return _ref2.apply(this, arguments);
|
|
416
436
|
};
|
|
417
437
|
}()),
|
|
418
438
|
columns: columns,
|
|
@@ -421,7 +441,7 @@ var AccountList = function AccountList() {
|
|
|
421
441
|
x: 1100
|
|
422
442
|
},
|
|
423
443
|
toolbar: {
|
|
424
|
-
title: /*#__PURE__*/React.createElement("div", {
|
|
444
|
+
title: hideTopBtn ? undefined : /*#__PURE__*/React.createElement("div", {
|
|
425
445
|
className: "flex justify-end"
|
|
426
446
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
427
447
|
type: "primary",
|
|
@@ -466,5 +486,5 @@ var AccountList = function AccountList() {
|
|
|
466
486
|
setPasswordModalShow(false);
|
|
467
487
|
}
|
|
468
488
|
}));
|
|
469
|
-
};
|
|
489
|
+
});
|
|
470
490
|
export default AccountList;
|
|
@@ -14,12 +14,13 @@ export interface MainProps {
|
|
|
14
14
|
passwordEncryption?: string;
|
|
15
15
|
passwordEncryptionNeedSalt?: boolean;
|
|
16
16
|
hideDeleteAccountBtn?: boolean;
|
|
17
|
-
hideMemberType?:
|
|
18
|
-
showMemberPilot?:
|
|
19
|
-
canEditPassword?:
|
|
17
|
+
hideMemberType?: boolean;
|
|
18
|
+
showMemberPilot?: boolean;
|
|
19
|
+
canEditPassword?: boolean;
|
|
20
20
|
orgSortConfig?: any;
|
|
21
21
|
isNeedExportAccount?: boolean;
|
|
22
22
|
requestHeaders?: any;
|
|
23
|
+
accountSearchNeedDepartment?: boolean;
|
|
23
24
|
}
|
|
24
25
|
declare const Index: React.FC<MainProps>;
|
|
25
26
|
export default Index;
|