Sfoglia il codice sorgente

用户管理列表和查询重置功能

wyn 5 mesi fa
parent
commit
2c76369930

+ 1 - 1
node_modules/.vite/deps/react-dom_client.js.map

@@ -1,7 +1,7 @@
 {
   "version": 3,
   "sources": ["../../react-dom/client.js"],
-  "sourcesContent": ["'use strict';\r\n\r\nvar m = require('react-dom');\r\nif (process.env.NODE_ENV === 'production') {\r\n  exports.createRoot = m.createRoot;\r\n  exports.hydrateRoot = m.hydrateRoot;\r\n} else {\r\n  var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\r\n  exports.createRoot = function(c, o) {\r\n    i.usingClientEntryPoint = true;\r\n    try {\r\n      return m.createRoot(c, o);\r\n    } finally {\r\n      i.usingClientEntryPoint = false;\r\n    }\r\n  };\r\n  exports.hydrateRoot = function(c, h, o) {\r\n    i.usingClientEntryPoint = true;\r\n    try {\r\n      return m.hydrateRoot(c, h, o);\r\n    } finally {\r\n      i.usingClientEntryPoint = false;\r\n    }\r\n  };\r\n}\r\n"],
+  "sourcesContent": ["'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n  exports.createRoot = m.createRoot;\n  exports.hydrateRoot = m.hydrateRoot;\n} else {\n  var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n  exports.createRoot = function(c, o) {\n    i.usingClientEntryPoint = true;\n    try {\n      return m.createRoot(c, o);\n    } finally {\n      i.usingClientEntryPoint = false;\n    }\n  };\n  exports.hydrateRoot = function(c, h, o) {\n    i.usingClientEntryPoint = true;\n    try {\n      return m.hydrateRoot(c, h, o);\n    } finally {\n      i.usingClientEntryPoint = false;\n    }\n  };\n}\n"],
   "mappings": ";;;;;;;;;AAAA;AAAA;AAEA,QAAI,IAAI;AACR,QAAI,OAAuC;AACzC,cAAQ,aAAa,EAAE;AACvB,cAAQ,cAAc,EAAE;AAAA,IAC1B,OAAO;AACD,UAAI,EAAE;AACV,cAAQ,aAAa,SAAS,GAAG,GAAG;AAClC,UAAE,wBAAwB;AAC1B,YAAI;AACF,iBAAO,EAAE,WAAW,GAAG,CAAC;AAAA,QAC1B,UAAE;AACA,YAAE,wBAAwB;AAAA,QAC5B;AAAA,MACF;AACA,cAAQ,cAAc,SAAS,GAAG,GAAG,GAAG;AACtC,UAAE,wBAAwB;AAC1B,YAAI;AACF,iBAAO,EAAE,YAAY,GAAG,GAAG,CAAC;AAAA,QAC9B,UAAE;AACA,YAAE,wBAAwB;AAAA,QAC5B;AAAA,MACF;AAAA,IACF;AAjBM;AAAA;AAAA;",
   "names": []
 }

+ 2 - 2
node_modules/.vite/deps/react-i18next.js

@@ -1,9 +1,9 @@
 import {
   keysFromSelector
-} from "./chunk-AGDJ642P.js";
+} from "./chunk-HCC4GIHT.js";
 import {
   require_react
-} from "./chunk-QRULMDK5.js";
+} from "./chunk-DRWLMN53.js";
 import {
   __commonJS,
   __toESM

File diff suppressed because it is too large
+ 0 - 0
node_modules/.vite/deps/react-i18next.js.map


+ 2 - 2
node_modules/.vite/deps/react-router-dom.js

@@ -1,9 +1,9 @@
 import {
   require_react_dom
-} from "./chunk-BANT3OPS.js";
+} from "./chunk-K23GC2QC.js";
 import {
   require_react
-} from "./chunk-QRULMDK5.js";
+} from "./chunk-DRWLMN53.js";
 import {
   __commonJS,
   __toESM

File diff suppressed because it is too large
+ 0 - 0
node_modules/.vite/deps/react-router-dom.js.map


+ 1 - 1
node_modules/.vite/deps/react.js

@@ -1,5 +1,5 @@
 import {
   require_react
-} from "./chunk-QRULMDK5.js";
+} from "./chunk-DRWLMN53.js";
 import "./chunk-G3PMV62Z.js";
 export default require_react();

+ 1 - 1
node_modules/.vite/deps/react_jsx-dev-runtime.js

@@ -1,6 +1,6 @@
 import {
   require_react
-} from "./chunk-QRULMDK5.js";
+} from "./chunk-DRWLMN53.js";
 import {
   __commonJS
 } from "./chunk-G3PMV62Z.js";

File diff suppressed because it is too large
+ 0 - 0
node_modules/.vite/deps/react_jsx-dev-runtime.js.map


+ 4 - 923
node_modules/.vite/deps/react_jsx-runtime.js

@@ -1,925 +1,6 @@
 import {
-  require_react
-} from "./chunk-QRULMDK5.js";
-import {
-  __commonJS
-} from "./chunk-G3PMV62Z.js";
-
-// node_modules/react/cjs/react-jsx-runtime.development.js
-var require_react_jsx_runtime_development = __commonJS({
-  "node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
-    "use strict";
-    if (true) {
-      (function() {
-        "use strict";
-        var React = require_react();
-        var REACT_ELEMENT_TYPE = Symbol.for("react.element");
-        var REACT_PORTAL_TYPE = Symbol.for("react.portal");
-        var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
-        var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
-        var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
-        var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
-        var REACT_CONTEXT_TYPE = Symbol.for("react.context");
-        var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
-        var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
-        var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
-        var REACT_MEMO_TYPE = Symbol.for("react.memo");
-        var REACT_LAZY_TYPE = Symbol.for("react.lazy");
-        var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
-        var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
-        var FAUX_ITERATOR_SYMBOL = "@@iterator";
-        function getIteratorFn(maybeIterable) {
-          if (maybeIterable === null || typeof maybeIterable !== "object") {
-            return null;
-          }
-          var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
-          if (typeof maybeIterator === "function") {
-            return maybeIterator;
-          }
-          return null;
-        }
-        var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
-        function error(format) {
-          {
-            {
-              for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
-                args[_key2 - 1] = arguments[_key2];
-              }
-              printWarning("error", format, args);
-            }
-          }
-        }
-        function printWarning(level, format, args) {
-          {
-            var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
-            var stack = ReactDebugCurrentFrame2.getStackAddendum();
-            if (stack !== "") {
-              format += "%s";
-              args = args.concat([stack]);
-            }
-            var argsWithFormat = args.map(function(item) {
-              return String(item);
-            });
-            argsWithFormat.unshift("Warning: " + format);
-            Function.prototype.apply.call(console[level], console, argsWithFormat);
-          }
-        }
-        var enableScopeAPI = false;
-        var enableCacheElement = false;
-        var enableTransitionTracing = false;
-        var enableLegacyHidden = false;
-        var enableDebugTracing = false;
-        var REACT_MODULE_REFERENCE;
-        {
-          REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
-        }
-        function isValidElementType(type) {
-          if (typeof type === "string" || typeof type === "function") {
-            return true;
-          }
-          if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
-            return true;
-          }
-          if (typeof type === "object" && type !== null) {
-            if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
-            // types supported by any Flight configuration anywhere since
-            // we don't know which Flight build this will end up being used
-            // with.
-            type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
-              return true;
-            }
-          }
-          return false;
-        }
-        function getWrappedName(outerType, innerType, wrapperName) {
-          var displayName = outerType.displayName;
-          if (displayName) {
-            return displayName;
-          }
-          var functionName = innerType.displayName || innerType.name || "";
-          return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
-        }
-        function getContextName(type) {
-          return type.displayName || "Context";
-        }
-        function getComponentNameFromType(type) {
-          if (type == null) {
-            return null;
-          }
-          {
-            if (typeof type.tag === "number") {
-              error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
-            }
-          }
-          if (typeof type === "function") {
-            return type.displayName || type.name || null;
-          }
-          if (typeof type === "string") {
-            return type;
-          }
-          switch (type) {
-            case REACT_FRAGMENT_TYPE:
-              return "Fragment";
-            case REACT_PORTAL_TYPE:
-              return "Portal";
-            case REACT_PROFILER_TYPE:
-              return "Profiler";
-            case REACT_STRICT_MODE_TYPE:
-              return "StrictMode";
-            case REACT_SUSPENSE_TYPE:
-              return "Suspense";
-            case REACT_SUSPENSE_LIST_TYPE:
-              return "SuspenseList";
-          }
-          if (typeof type === "object") {
-            switch (type.$$typeof) {
-              case REACT_CONTEXT_TYPE:
-                var context = type;
-                return getContextName(context) + ".Consumer";
-              case REACT_PROVIDER_TYPE:
-                var provider = type;
-                return getContextName(provider._context) + ".Provider";
-              case REACT_FORWARD_REF_TYPE:
-                return getWrappedName(type, type.render, "ForwardRef");
-              case REACT_MEMO_TYPE:
-                var outerName = type.displayName || null;
-                if (outerName !== null) {
-                  return outerName;
-                }
-                return getComponentNameFromType(type.type) || "Memo";
-              case REACT_LAZY_TYPE: {
-                var lazyComponent = type;
-                var payload = lazyComponent._payload;
-                var init = lazyComponent._init;
-                try {
-                  return getComponentNameFromType(init(payload));
-                } catch (x) {
-                  return null;
-                }
-              }
-            }
-          }
-          return null;
-        }
-        var assign = Object.assign;
-        var disabledDepth = 0;
-        var prevLog;
-        var prevInfo;
-        var prevWarn;
-        var prevError;
-        var prevGroup;
-        var prevGroupCollapsed;
-        var prevGroupEnd;
-        function disabledLog() {
-        }
-        disabledLog.__reactDisabledLog = true;
-        function disableLogs() {
-          {
-            if (disabledDepth === 0) {
-              prevLog = console.log;
-              prevInfo = console.info;
-              prevWarn = console.warn;
-              prevError = console.error;
-              prevGroup = console.group;
-              prevGroupCollapsed = console.groupCollapsed;
-              prevGroupEnd = console.groupEnd;
-              var props = {
-                configurable: true,
-                enumerable: true,
-                value: disabledLog,
-                writable: true
-              };
-              Object.defineProperties(console, {
-                info: props,
-                log: props,
-                warn: props,
-                error: props,
-                group: props,
-                groupCollapsed: props,
-                groupEnd: props
-              });
-            }
-            disabledDepth++;
-          }
-        }
-        function reenableLogs() {
-          {
-            disabledDepth--;
-            if (disabledDepth === 0) {
-              var props = {
-                configurable: true,
-                enumerable: true,
-                writable: true
-              };
-              Object.defineProperties(console, {
-                log: assign({}, props, {
-                  value: prevLog
-                }),
-                info: assign({}, props, {
-                  value: prevInfo
-                }),
-                warn: assign({}, props, {
-                  value: prevWarn
-                }),
-                error: assign({}, props, {
-                  value: prevError
-                }),
-                group: assign({}, props, {
-                  value: prevGroup
-                }),
-                groupCollapsed: assign({}, props, {
-                  value: prevGroupCollapsed
-                }),
-                groupEnd: assign({}, props, {
-                  value: prevGroupEnd
-                })
-              });
-            }
-            if (disabledDepth < 0) {
-              error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
-            }
-          }
-        }
-        var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
-        var prefix;
-        function describeBuiltInComponentFrame(name, source, ownerFn) {
-          {
-            if (prefix === void 0) {
-              try {
-                throw Error();
-              } catch (x) {
-                var match = x.stack.trim().match(/\n( *(at )?)/);
-                prefix = match && match[1] || "";
-              }
-            }
-            return "\n" + prefix + name;
-          }
-        }
-        var reentry = false;
-        var componentFrameCache;
-        {
-          var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
-          componentFrameCache = new PossiblyWeakMap();
-        }
-        function describeNativeComponentFrame(fn, construct) {
-          if (!fn || reentry) {
-            return "";
-          }
-          {
-            var frame = componentFrameCache.get(fn);
-            if (frame !== void 0) {
-              return frame;
-            }
-          }
-          var control;
-          reentry = true;
-          var previousPrepareStackTrace = Error.prepareStackTrace;
-          Error.prepareStackTrace = void 0;
-          var previousDispatcher;
-          {
-            previousDispatcher = ReactCurrentDispatcher.current;
-            ReactCurrentDispatcher.current = null;
-            disableLogs();
-          }
-          try {
-            if (construct) {
-              var Fake = function() {
-                throw Error();
-              };
-              Object.defineProperty(Fake.prototype, "props", {
-                set: function() {
-                  throw Error();
-                }
-              });
-              if (typeof Reflect === "object" && Reflect.construct) {
-                try {
-                  Reflect.construct(Fake, []);
-                } catch (x) {
-                  control = x;
-                }
-                Reflect.construct(fn, [], Fake);
-              } else {
-                try {
-                  Fake.call();
-                } catch (x) {
-                  control = x;
-                }
-                fn.call(Fake.prototype);
-              }
-            } else {
-              try {
-                throw Error();
-              } catch (x) {
-                control = x;
-              }
-              fn();
-            }
-          } catch (sample) {
-            if (sample && control && typeof sample.stack === "string") {
-              var sampleLines = sample.stack.split("\n");
-              var controlLines = control.stack.split("\n");
-              var s = sampleLines.length - 1;
-              var c = controlLines.length - 1;
-              while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
-                c--;
-              }
-              for (; s >= 1 && c >= 0; s--, c--) {
-                if (sampleLines[s] !== controlLines[c]) {
-                  if (s !== 1 || c !== 1) {
-                    do {
-                      s--;
-                      c--;
-                      if (c < 0 || sampleLines[s] !== controlLines[c]) {
-                        var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
-                        if (fn.displayName && _frame.includes("<anonymous>")) {
-                          _frame = _frame.replace("<anonymous>", fn.displayName);
-                        }
-                        {
-                          if (typeof fn === "function") {
-                            componentFrameCache.set(fn, _frame);
-                          }
-                        }
-                        return _frame;
-                      }
-                    } while (s >= 1 && c >= 0);
-                  }
-                  break;
-                }
-              }
-            }
-          } finally {
-            reentry = false;
-            {
-              ReactCurrentDispatcher.current = previousDispatcher;
-              reenableLogs();
-            }
-            Error.prepareStackTrace = previousPrepareStackTrace;
-          }
-          var name = fn ? fn.displayName || fn.name : "";
-          var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
-          {
-            if (typeof fn === "function") {
-              componentFrameCache.set(fn, syntheticFrame);
-            }
-          }
-          return syntheticFrame;
-        }
-        function describeFunctionComponentFrame(fn, source, ownerFn) {
-          {
-            return describeNativeComponentFrame(fn, false);
-          }
-        }
-        function shouldConstruct(Component) {
-          var prototype = Component.prototype;
-          return !!(prototype && prototype.isReactComponent);
-        }
-        function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
-          if (type == null) {
-            return "";
-          }
-          if (typeof type === "function") {
-            {
-              return describeNativeComponentFrame(type, shouldConstruct(type));
-            }
-          }
-          if (typeof type === "string") {
-            return describeBuiltInComponentFrame(type);
-          }
-          switch (type) {
-            case REACT_SUSPENSE_TYPE:
-              return describeBuiltInComponentFrame("Suspense");
-            case REACT_SUSPENSE_LIST_TYPE:
-              return describeBuiltInComponentFrame("SuspenseList");
-          }
-          if (typeof type === "object") {
-            switch (type.$$typeof) {
-              case REACT_FORWARD_REF_TYPE:
-                return describeFunctionComponentFrame(type.render);
-              case REACT_MEMO_TYPE:
-                return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
-              case REACT_LAZY_TYPE: {
-                var lazyComponent = type;
-                var payload = lazyComponent._payload;
-                var init = lazyComponent._init;
-                try {
-                  return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
-                } catch (x) {
-                }
-              }
-            }
-          }
-          return "";
-        }
-        var hasOwnProperty = Object.prototype.hasOwnProperty;
-        var loggedTypeFailures = {};
-        var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
-        function setCurrentlyValidatingElement(element) {
-          {
-            if (element) {
-              var owner = element._owner;
-              var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
-              ReactDebugCurrentFrame.setExtraStackFrame(stack);
-            } else {
-              ReactDebugCurrentFrame.setExtraStackFrame(null);
-            }
-          }
-        }
-        function checkPropTypes(typeSpecs, values, location, componentName, element) {
-          {
-            var has = Function.call.bind(hasOwnProperty);
-            for (var typeSpecName in typeSpecs) {
-              if (has(typeSpecs, typeSpecName)) {
-                var error$1 = void 0;
-                try {
-                  if (typeof typeSpecs[typeSpecName] !== "function") {
-                    var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
-                    err.name = "Invariant Violation";
-                    throw err;
-                  }
-                  error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
-                } catch (ex) {
-                  error$1 = ex;
-                }
-                if (error$1 && !(error$1 instanceof Error)) {
-                  setCurrentlyValidatingElement(element);
-                  error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
-                  setCurrentlyValidatingElement(null);
-                }
-                if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
-                  loggedTypeFailures[error$1.message] = true;
-                  setCurrentlyValidatingElement(element);
-                  error("Failed %s type: %s", location, error$1.message);
-                  setCurrentlyValidatingElement(null);
-                }
-              }
-            }
-          }
-        }
-        var isArrayImpl = Array.isArray;
-        function isArray(a) {
-          return isArrayImpl(a);
-        }
-        function typeName(value) {
-          {
-            var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
-            var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
-            return type;
-          }
-        }
-        function willCoercionThrow(value) {
-          {
-            try {
-              testStringCoercion(value);
-              return false;
-            } catch (e) {
-              return true;
-            }
-          }
-        }
-        function testStringCoercion(value) {
-          return "" + value;
-        }
-        function checkKeyStringCoercion(value) {
-          {
-            if (willCoercionThrow(value)) {
-              error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
-              return testStringCoercion(value);
-            }
-          }
-        }
-        var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
-        var RESERVED_PROPS = {
-          key: true,
-          ref: true,
-          __self: true,
-          __source: true
-        };
-        var specialPropKeyWarningShown;
-        var specialPropRefWarningShown;
-        var didWarnAboutStringRefs;
-        {
-          didWarnAboutStringRefs = {};
-        }
-        function hasValidRef(config) {
-          {
-            if (hasOwnProperty.call(config, "ref")) {
-              var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
-              if (getter && getter.isReactWarning) {
-                return false;
-              }
-            }
-          }
-          return config.ref !== void 0;
-        }
-        function hasValidKey(config) {
-          {
-            if (hasOwnProperty.call(config, "key")) {
-              var getter = Object.getOwnPropertyDescriptor(config, "key").get;
-              if (getter && getter.isReactWarning) {
-                return false;
-              }
-            }
-          }
-          return config.key !== void 0;
-        }
-        function warnIfStringRefCannotBeAutoConverted(config, self) {
-          {
-            if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
-              var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
-              if (!didWarnAboutStringRefs[componentName]) {
-                error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
-                didWarnAboutStringRefs[componentName] = true;
-              }
-            }
-          }
-        }
-        function defineKeyPropWarningGetter(props, displayName) {
-          {
-            var warnAboutAccessingKey = function() {
-              if (!specialPropKeyWarningShown) {
-                specialPropKeyWarningShown = true;
-                error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
-              }
-            };
-            warnAboutAccessingKey.isReactWarning = true;
-            Object.defineProperty(props, "key", {
-              get: warnAboutAccessingKey,
-              configurable: true
-            });
-          }
-        }
-        function defineRefPropWarningGetter(props, displayName) {
-          {
-            var warnAboutAccessingRef = function() {
-              if (!specialPropRefWarningShown) {
-                specialPropRefWarningShown = true;
-                error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
-              }
-            };
-            warnAboutAccessingRef.isReactWarning = true;
-            Object.defineProperty(props, "ref", {
-              get: warnAboutAccessingRef,
-              configurable: true
-            });
-          }
-        }
-        var ReactElement = function(type, key, ref, self, source, owner, props) {
-          var element = {
-            // This tag allows us to uniquely identify this as a React Element
-            $$typeof: REACT_ELEMENT_TYPE,
-            // Built-in properties that belong on the element
-            type,
-            key,
-            ref,
-            props,
-            // Record the component responsible for creating this element.
-            _owner: owner
-          };
-          {
-            element._store = {};
-            Object.defineProperty(element._store, "validated", {
-              configurable: false,
-              enumerable: false,
-              writable: true,
-              value: false
-            });
-            Object.defineProperty(element, "_self", {
-              configurable: false,
-              enumerable: false,
-              writable: false,
-              value: self
-            });
-            Object.defineProperty(element, "_source", {
-              configurable: false,
-              enumerable: false,
-              writable: false,
-              value: source
-            });
-            if (Object.freeze) {
-              Object.freeze(element.props);
-              Object.freeze(element);
-            }
-          }
-          return element;
-        };
-        function jsxDEV(type, config, maybeKey, source, self) {
-          {
-            var propName;
-            var props = {};
-            var key = null;
-            var ref = null;
-            if (maybeKey !== void 0) {
-              {
-                checkKeyStringCoercion(maybeKey);
-              }
-              key = "" + maybeKey;
-            }
-            if (hasValidKey(config)) {
-              {
-                checkKeyStringCoercion(config.key);
-              }
-              key = "" + config.key;
-            }
-            if (hasValidRef(config)) {
-              ref = config.ref;
-              warnIfStringRefCannotBeAutoConverted(config, self);
-            }
-            for (propName in config) {
-              if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
-                props[propName] = config[propName];
-              }
-            }
-            if (type && type.defaultProps) {
-              var defaultProps = type.defaultProps;
-              for (propName in defaultProps) {
-                if (props[propName] === void 0) {
-                  props[propName] = defaultProps[propName];
-                }
-              }
-            }
-            if (key || ref) {
-              var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
-              if (key) {
-                defineKeyPropWarningGetter(props, displayName);
-              }
-              if (ref) {
-                defineRefPropWarningGetter(props, displayName);
-              }
-            }
-            return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
-          }
-        }
-        var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
-        var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
-        function setCurrentlyValidatingElement$1(element) {
-          {
-            if (element) {
-              var owner = element._owner;
-              var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
-              ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
-            } else {
-              ReactDebugCurrentFrame$1.setExtraStackFrame(null);
-            }
-          }
-        }
-        var propTypesMisspellWarningShown;
-        {
-          propTypesMisspellWarningShown = false;
-        }
-        function isValidElement(object) {
-          {
-            return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
-          }
-        }
-        function getDeclarationErrorAddendum() {
-          {
-            if (ReactCurrentOwner$1.current) {
-              var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
-              if (name) {
-                return "\n\nCheck the render method of `" + name + "`.";
-              }
-            }
-            return "";
-          }
-        }
-        function getSourceInfoErrorAddendum(source) {
-          {
-            if (source !== void 0) {
-              var fileName = source.fileName.replace(/^.*[\\\/]/, "");
-              var lineNumber = source.lineNumber;
-              return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
-            }
-            return "";
-          }
-        }
-        var ownerHasKeyUseWarning = {};
-        function getCurrentComponentErrorInfo(parentType) {
-          {
-            var info = getDeclarationErrorAddendum();
-            if (!info) {
-              var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
-              if (parentName) {
-                info = "\n\nCheck the top-level render call using <" + parentName + ">.";
-              }
-            }
-            return info;
-          }
-        }
-        function validateExplicitKey(element, parentType) {
-          {
-            if (!element._store || element._store.validated || element.key != null) {
-              return;
-            }
-            element._store.validated = true;
-            var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
-            if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
-              return;
-            }
-            ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
-            var childOwner = "";
-            if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
-              childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
-            }
-            setCurrentlyValidatingElement$1(element);
-            error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
-            setCurrentlyValidatingElement$1(null);
-          }
-        }
-        function validateChildKeys(node, parentType) {
-          {
-            if (typeof node !== "object") {
-              return;
-            }
-            if (isArray(node)) {
-              for (var i = 0; i < node.length; i++) {
-                var child = node[i];
-                if (isValidElement(child)) {
-                  validateExplicitKey(child, parentType);
-                }
-              }
-            } else if (isValidElement(node)) {
-              if (node._store) {
-                node._store.validated = true;
-              }
-            } else if (node) {
-              var iteratorFn = getIteratorFn(node);
-              if (typeof iteratorFn === "function") {
-                if (iteratorFn !== node.entries) {
-                  var iterator = iteratorFn.call(node);
-                  var step;
-                  while (!(step = iterator.next()).done) {
-                    if (isValidElement(step.value)) {
-                      validateExplicitKey(step.value, parentType);
-                    }
-                  }
-                }
-              }
-            }
-          }
-        }
-        function validatePropTypes(element) {
-          {
-            var type = element.type;
-            if (type === null || type === void 0 || typeof type === "string") {
-              return;
-            }
-            var propTypes;
-            if (typeof type === "function") {
-              propTypes = type.propTypes;
-            } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
-            // Inner props are checked in the reconciler.
-            type.$$typeof === REACT_MEMO_TYPE)) {
-              propTypes = type.propTypes;
-            } else {
-              return;
-            }
-            if (propTypes) {
-              var name = getComponentNameFromType(type);
-              checkPropTypes(propTypes, element.props, "prop", name, element);
-            } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
-              propTypesMisspellWarningShown = true;
-              var _name = getComponentNameFromType(type);
-              error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
-            }
-            if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
-              error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
-            }
-          }
-        }
-        function validateFragmentProps(fragment) {
-          {
-            var keys = Object.keys(fragment.props);
-            for (var i = 0; i < keys.length; i++) {
-              var key = keys[i];
-              if (key !== "children" && key !== "key") {
-                setCurrentlyValidatingElement$1(fragment);
-                error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
-                setCurrentlyValidatingElement$1(null);
-                break;
-              }
-            }
-            if (fragment.ref !== null) {
-              setCurrentlyValidatingElement$1(fragment);
-              error("Invalid attribute `ref` supplied to `React.Fragment`.");
-              setCurrentlyValidatingElement$1(null);
-            }
-          }
-        }
-        var didWarnAboutKeySpread = {};
-        function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
-          {
-            var validType = isValidElementType(type);
-            if (!validType) {
-              var info = "";
-              if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
-                info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
-              }
-              var sourceInfo = getSourceInfoErrorAddendum(source);
-              if (sourceInfo) {
-                info += sourceInfo;
-              } else {
-                info += getDeclarationErrorAddendum();
-              }
-              var typeString;
-              if (type === null) {
-                typeString = "null";
-              } else if (isArray(type)) {
-                typeString = "array";
-              } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
-                typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
-                info = " Did you accidentally export a JSX literal instead of a component?";
-              } else {
-                typeString = typeof type;
-              }
-              error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
-            }
-            var element = jsxDEV(type, props, key, source, self);
-            if (element == null) {
-              return element;
-            }
-            if (validType) {
-              var children = props.children;
-              if (children !== void 0) {
-                if (isStaticChildren) {
-                  if (isArray(children)) {
-                    for (var i = 0; i < children.length; i++) {
-                      validateChildKeys(children[i], type);
-                    }
-                    if (Object.freeze) {
-                      Object.freeze(children);
-                    }
-                  } else {
-                    error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
-                  }
-                } else {
-                  validateChildKeys(children, type);
-                }
-              }
-            }
-            {
-              if (hasOwnProperty.call(props, "key")) {
-                var componentName = getComponentNameFromType(type);
-                var keys = Object.keys(props).filter(function(k) {
-                  return k !== "key";
-                });
-                var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
-                if (!didWarnAboutKeySpread[componentName + beforeExample]) {
-                  var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
-                  error('A props object containing a "key" prop is being spread into JSX:\n  let props = %s;\n  <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n  let props = %s;\n  <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
-                  didWarnAboutKeySpread[componentName + beforeExample] = true;
-                }
-              }
-            }
-            if (type === REACT_FRAGMENT_TYPE) {
-              validateFragmentProps(element);
-            } else {
-              validatePropTypes(element);
-            }
-            return element;
-          }
-        }
-        function jsxWithValidationStatic(type, props, key) {
-          {
-            return jsxWithValidation(type, props, key, true);
-          }
-        }
-        function jsxWithValidationDynamic(type, props, key) {
-          {
-            return jsxWithValidation(type, props, key, false);
-          }
-        }
-        var jsx = jsxWithValidationDynamic;
-        var jsxs = jsxWithValidationStatic;
-        exports.Fragment = REACT_FRAGMENT_TYPE;
-        exports.jsx = jsx;
-        exports.jsxs = jsxs;
-      })();
-    }
-  }
-});
-
-// node_modules/react/jsx-runtime.js
-var require_jsx_runtime = __commonJS({
-  "node_modules/react/jsx-runtime.js"(exports, module) {
-    if (false) {
-      module.exports = null;
-    } else {
-      module.exports = require_react_jsx_runtime_development();
-    }
-  }
-});
+  require_jsx_runtime
+} from "./chunk-6PXSGDAH.js";
+import "./chunk-DRWLMN53.js";
+import "./chunk-G3PMV62Z.js";
 export default require_jsx_runtime();
-/*! Bundled license information:
-
-react/cjs/react-jsx-runtime.development.js:
-  (**
-   * @license React
-   * react-jsx-runtime.development.js
-   *
-   * Copyright (c) Facebook, Inc. and its affiliates.
-   *
-   * This source code is licensed under the MIT license found in the
-   * LICENSE file in the root directory of this source tree.
-   *)
-*/
-//# sourceMappingURL=react_jsx-runtime.js.map

File diff suppressed because it is too large
+ 0 - 1
node_modules/.vite/deps/react_jsx-runtime.js.map


File diff suppressed because it is too large
+ 223 - 236
node_modules/.vite/deps/recharts.js


File diff suppressed because it is too large
+ 0 - 0
node_modules/.vite/deps/recharts.js.map


+ 2 - 2
node_modules/.vite/deps/sonner.js

@@ -1,10 +1,10 @@
 "use client";
 import {
   require_react_dom
-} from "./chunk-BANT3OPS.js";
+} from "./chunk-K23GC2QC.js";
 import {
   require_react
-} from "./chunk-QRULMDK5.js";
+} from "./chunk-DRWLMN53.js";
 import {
   __toESM
 } from "./chunk-G3PMV62Z.js";

File diff suppressed because it is too large
+ 0 - 0
node_modules/.vite/deps/sonner.js.map


+ 6 - 0
src/api/System.ts

@@ -1,4 +1,5 @@
 import axiosInstance from '../utils/axios';
+import { RoleVO } from '../types';
 
 // 系统配置 API
 export const systemApi = {
@@ -16,5 +17,10 @@ export const systemApi = {
   getRoles: () => {
     return axiosInstance.get('/system/roles');
   },
+
+  // 获取简单角色列表(用于下拉选择等场景)
+  getSimpleRoleList: (): Promise<RoleVO[]> => {
+    return axiosInstance.get('/system/role/simple-list');
+  },
 };
 

+ 0 - 30
src/api/User.ts

@@ -1,30 +0,0 @@
-import axiosInstance from '../utils/axios';
-
-// 用户管理 API
-export const userApi = {
-  // 获取用户列表
-  getUserList: (params?: { page?: number; pageSize?: number; keyword?: string }) => {
-    return axiosInstance.get('/users', { params });
-  },
-
-  // 获取用户详情
-  getUserDetail: (id: string) => {
-    return axiosInstance.get(`/users/${id}`);
-  },
-
-  // 创建用户
-  createUser: (data: any) => {
-    return axiosInstance.post('/users', data);
-  },
-
-  // 更新用户
-  updateUser: (id: string, data: any) => {
-    return axiosInstance.put(`/users/${id}`, data);
-  },
-
-  // 删除用户
-  deleteUser: (id: string) => {
-    return axiosInstance.delete(`/users/${id}`);
-  },
-};
-

+ 11 - 2
src/api/index.ts

@@ -1,5 +1,8 @@
 import { loginApi } from './Login';
-import { userApi } from './User';
+import { userApi } from './user';
+import { userPermissionApi } from './user/permission';
+import { userImportApi } from './user/import';
+import { userCharacteristicApi } from './user/characteristic';
 import { systemApi } from './System';
 import { hardwareApi } from './Hardware';
 
@@ -12,7 +15,10 @@ export interface ApiResponse<T = any> {
 
 // 导出所有 API 模块
 export { loginApi } from './Login';
-export { userApi } from './User';
+export { userApi } from './user';
+export { userPermissionApi } from './user/permission';
+export { userImportApi } from './user/import';
+export { userCharacteristicApi } from './user/characteristic';
 export { systemApi } from './System';
 export { hardwareApi } from './Hardware';
 
@@ -24,6 +30,9 @@ export default {
   login: loginApi,
   auth: loginApi, // 兼容旧代码
   user: userApi,
+  userPermission: userPermissionApi,
+  userImport: userImportApi,
+  userCharacteristic: userCharacteristicApi,
   system: systemApi,
   hardware: hardwareApi,
 };

+ 23 - 0
src/api/user/characteristic.ts

@@ -0,0 +1,23 @@
+import axiosInstance from '../../utils/axios';
+
+// 分页参数类型
+export interface PageParam {
+  pageNo?: number;
+  pageSize?: number;
+  userId?: number;
+  [key: string]: any;
+}
+
+// 用户特征值 API(指纹、面部)
+export const userCharacteristicApi = {
+  // 查询用户特征值(指纹、面部)
+  getUserType: (params: PageParam): Promise<any> => {
+    return axiosInstance.get('/iscs/user-characteristic/getUserCharacteristicPage', { params });
+  },
+
+  // 删除用户指纹、人脸
+  deleteUserFaceOrFinger: (ids: number): Promise<void> => {
+    return axiosInstance.delete(`/iscs/user-characteristic/deleteUserCharacteristicList?ids=${ids}`);
+  },
+};
+

+ 32 - 0
src/api/user/import.ts

@@ -0,0 +1,32 @@
+import axiosInstance from '../../utils/axios';
+
+// 导入导出 API
+export const userImportApi = {
+  // 导出用户
+  exportUser: (params: any): Promise<Blob> => {
+    return axiosInstance.get('/system/user/export', {
+      params,
+      responseType: 'blob',
+    });
+  },
+
+  // 下载用户导入模板
+  importUserTemplate: (): Promise<Blob> => {
+    return axiosInstance.get('/system/user/get-import-template', {
+      responseType: 'blob',
+    });
+  },
+
+  // 导入用户
+  importUser: (file: File, updateSupport: number): Promise<any> => {
+    const formData = new FormData();
+    formData.append('file', file);
+    formData.append('updateSupport', updateSupport.toString());
+    return axiosInstance.post('/system/user/import', formData, {
+      headers: {
+        'Content-Type': 'multipart/form-data',
+      },
+    });
+  },
+};
+

+ 64 - 0
src/api/user/index.ts

@@ -0,0 +1,64 @@
+import axiosInstance from '../../utils/axios';
+import { UserVO } from '../../types';
+
+// 分页参数类型
+export interface PageParam {
+  pageNo?: number;
+  pageSize?: number;
+  [key: string]: any;
+}
+
+// 分页响应类型
+export interface PageResponse<T> {
+  list: T[];
+  total: number;
+}
+
+// 用户管理基础 API
+export const userApi = {
+  // 查询用户管理列表
+  getUserPage: (params: PageParam): Promise<PageResponse<UserVO>> => {
+    return axiosInstance.get('/system/user/page', { params });
+  },
+
+  // 查询用户详情
+  getUser: (id: number): Promise<UserVO> => {
+    return axiosInstance.get(`/system/user/get?id=${id}`);
+  },
+
+  // 根据角色代码查询用户
+  getRoleUser: (code: string): Promise<UserVO[]> => {
+    return axiosInstance.get(`/system/user/getUserByRoleCode?roleCode=${code}`);
+  },
+
+  // 新增用户
+  createUser: (data: UserVO): Promise<void> => {
+    return axiosInstance.post('/system/user/create', data);
+  },
+
+  // 修改用户
+  updateUser: (data: UserVO): Promise<void> => {
+    return axiosInstance.put('/system/user/update', data);
+  },
+
+  // 删除用户
+  deleteUser: (id: number): Promise<void> => {
+    return axiosInstance.delete(`/system/user/delete?id=${id}`);
+  },
+
+  // 用户密码重置
+  resetUserPassword: (id: number, password: string): Promise<void> => {
+    return axiosInstance.put('/system/user/update-password', { id, password });
+  },
+
+  // 用户状态修改
+  updateUserStatus: (id: number, status: number): Promise<void> => {
+    return axiosInstance.put('/system/user/update-status', { id, status });
+  },
+
+  // 获取用户精简信息列表
+  getSimpleUserList: (): Promise<UserVO[]> => {
+    return axiosInstance.get('/system/user/simple-list');
+  },
+};
+

+ 18 - 0
src/api/user/permission.ts

@@ -0,0 +1,18 @@
+import axiosInstance from '../../utils/axios';
+
+// 权限管理 API
+export const userPermissionApi = {
+  // 获取用户角色列表
+  getUserRoleList: (userId: number): Promise<number[]> => {
+    return axiosInstance.get(`/system/permission/get-user-role-list?userId=${userId}`);
+  },
+
+  // 分配用户角色
+  assignUserRole: (params: {
+    userId: number;
+    roleIds: number[];
+  }): Promise<void> => {
+    return axiosInstance.post('/system/permission/assign-user-role', params);
+  },
+};
+

+ 22 - 12
src/components/UserManagement.tsx

@@ -1,6 +1,7 @@
 import React, { useState, useEffect, useRef } from 'react';
 import { Plus, Search, Edit2, Trash2, MoreVertical, Upload, Download, Key, UserCog, Eye, RefreshCw } from 'lucide-react';
-import { userApi } from '../api/User';
+import { userApi } from '../api/user';
+import { userImportApi } from '../api/user/import';
 import { UserVO, WorkstationNode } from '../types';
 import { toast } from 'sonner';
 import DeptTree from './user/DeptTree';
@@ -43,10 +44,11 @@ export default function UserManagement({ subMenu }: UserManagementProps) {
   const faceOrFingerFormRef = useRef<FaceOrFingerFormRef>(null);
 
   // 获取用户列表
-  const getList = async () => {
+  const getList = async (params?: typeof queryParams) => {
+    const currentParams = params || queryParams;
     setLoading(true);
     try {
-      const response = await userApi.getUserPage(queryParams);
+      const response = await userApi.getUserPage(currentParams);
       setList(response.list || []);
       setTotal(response.total || 0);
     } catch (error: any) {
@@ -58,26 +60,34 @@ export default function UserManagement({ subMenu }: UserManagementProps) {
 
   useEffect(() => {
     getList();
+    // eslint-disable-next-line react-hooks/exhaustive-deps
   }, [queryParams.pageNo, queryParams.pageSize, queryParams.workstationId]);
 
   // 搜索
   const handleQuery = () => {
-    setQueryParams(prev => ({ ...prev, pageNo: 1 }));
-    getList();
+    const newParams = { ...queryParams, pageNo: 1 };
+    setQueryParams(newParams);
+    getList(newParams);
   };
 
   // 重置搜索
   const resetQuery = () => {
-    setQueryParams({
+    // 先清空表格数据
+    setList([]);
+    setTotal(0);
+    // 重置所有查询参数
+    const resetParams = {
       pageNo: 1,
       pageSize: 10,
       username: '',
       mobile: '',
-      status: undefined,
-      workstationId: undefined,
-      createTime: [],
-    });
-    setTimeout(() => getList(), 100);
+      status: undefined as number | undefined,
+      workstationId: undefined as number | undefined,
+      createTime: [] as string[],
+    };
+    setQueryParams(resetParams);
+    // 立即使用重置后的参数获取列表,不需要等待状态更新
+    getList(resetParams);
   };
 
   // 处理部门节点点击
@@ -103,7 +113,7 @@ export default function UserManagement({ subMenu }: UserManagementProps) {
 
     setExportLoading(true);
     try {
-      const blob = await userApi.exportUser(queryParams);
+      const blob = await userImportApi.exportUser(queryParams);
       const url = window.URL.createObjectURL(blob);
       const link = document.createElement('a');
       link.href = url;

+ 3 - 3
src/components/user/FaceOrFingerForm.tsx

@@ -2,7 +2,7 @@ import React, { useState, useEffect, useImperativeHandle, forwardRef } from 'rea
 import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '../ui/dialog';
 import { Button } from '../ui/button';
 import { Trash2, ZoomIn } from 'lucide-react';
-import { userApi } from '../../api/User';
+import { userCharacteristicApi } from '../../api/user/characteristic';
 import { UserCharacteristic } from '../../types';
 import { toast } from 'sonner';
 
@@ -50,7 +50,7 @@ const FaceOrFingerForm = forwardRef<FaceOrFingerFormRef, FaceOrFingerFormProps>(
 
     setFormLoading(true);
     try {
-      const response = await userApi.getUserType({
+      const response = await userCharacteristicApi.getUserType({
         pageNo: queryParams.pageNo,
         pageSize: queryParams.pageSize,
         userId: userId,
@@ -87,7 +87,7 @@ const FaceOrFingerForm = forwardRef<FaceOrFingerFormRef, FaceOrFingerFormProps>(
     try {
       // 逐个删除
       for (const deleteId of idsToDelete) {
-        await userApi.deleteUserFaceOrFinger(deleteId);
+        await userCharacteristicApi.deleteUserFaceOrFinger(deleteId);
       }
       toast.success('删除成功');
       await getFaceOrFingerList();

+ 3 - 3
src/components/user/UserAssignRoleForm.tsx

@@ -3,7 +3,7 @@ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '
 import { Button } from '../ui/button';
 import { Input } from '../ui/input';
 import { Label } from '../ui/label';
-import { permissionApi } from '../../api/Permission';
+import { userPermissionApi } from '../../api/user/permission';
 import { systemApi } from '../../api/System';
 import { UserVO, RoleVO } from '../../types';
 import { toast } from 'sonner';
@@ -53,7 +53,7 @@ const UserAssignRoleForm = forwardRef<UserAssignRoleFormRef, UserAssignRoleFormP
     // 获取用户角色列表
     setFormLoading(true);
     try {
-      const roleIds = await permissionApi.getUserRoleList(row.id);
+      const roleIds = await userPermissionApi.getUserRoleList(row.id);
       setFormData(prev => ({ ...prev, roleIds: roleIds || [] }));
     } catch (error) {
       console.error('获取用户角色失败:', error);
@@ -70,7 +70,7 @@ const UserAssignRoleForm = forwardRef<UserAssignRoleFormRef, UserAssignRoleFormP
   const submitForm = async () => {
     setFormLoading(true);
     try {
-      await permissionApi.assignUserRole({
+      await userPermissionApi.assignUserRole({
         userId: formData.id,
         roleIds: formData.roleIds,
       });

+ 1 - 1
src/components/user/UserForm.tsx

@@ -4,7 +4,7 @@ import { Button } from '../ui/button';
 import { Input } from '../ui/input';
 import { Label } from '../ui/label';
 import { Textarea } from '../ui/textarea';
-import { userApi } from '../../api/User';
+import { userApi } from '../../api/user';
 import { systemApi } from '../../api/System';
 import { UserVO, WorkstationNode } from '../../types';
 import { toast } from 'sonner';

+ 3 - 3
src/components/user/UserImportForm.tsx

@@ -2,7 +2,7 @@ import React, { useState, useImperativeHandle, forwardRef } from 'react';
 import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '../ui/dialog';
 import { Button } from '../ui/button';
 import { Upload, Download, FileSpreadsheet } from 'lucide-react';
-import { userApi } from '../../api/User';
+import { userImportApi } from '../../api/user/import';
 import { toast } from 'sonner';
 
 interface UserImportFormProps {
@@ -33,7 +33,7 @@ const UserImportForm = forwardRef<UserImportFormRef, UserImportFormProps>(({ onS
   // 下载模板
   const importTemplate = async () => {
     try {
-      const blob = await userApi.importUserTemplate();
+      const blob = await userImportApi.importUserTemplate();
       const url = window.URL.createObjectURL(blob);
       const link = document.createElement('a');
       link.href = url;
@@ -57,7 +57,7 @@ const UserImportForm = forwardRef<UserImportFormRef, UserImportFormProps>(({ onS
 
     setFormLoading(true);
     try {
-      const response = await userApi.importUser(file, updateSupport ? 1 : 0);
+      const response = await userImportApi.importUser(file, updateSupport ? 1 : 0);
       
       // 拼接提示语
       const data = response;

+ 28 - 0
src/types/index.ts

@@ -44,3 +44,31 @@ export interface PaginationResponse<T> {
   pageSize: number;
 }
 
+// 用户 VO 类型
+export interface UserVO {
+  id: number;
+  username: string;
+  nickname: string;
+  deptId?: number;
+  postIds?: string[];
+  email?: string;
+  mobile?: string;
+  sex?: number;
+  avatar?: string;
+  loginIp?: string;
+  status?: number;
+  remark?: string;
+  loginDate?: Date | string;
+  createTime?: Date | string;
+}
+
+// 角色 VO 类型
+export interface RoleVO {
+  id: number;
+  name: string;
+  code?: string;
+  sort?: number;
+  status?: number;
+  remark?: string;
+}
+

+ 6 - 1
src/utils/axios.ts

@@ -40,7 +40,12 @@ axiosInstance.interceptors.request.use(
 // 响应拦截器
 axiosInstance.interceptors.response.use(
   (response: AxiosResponse) => {
-    const { data } = response;
+    const { data, config } = response;
+
+    // 如果是 blob 类型响应(文件下载),直接返回
+    if (config.responseType === 'blob' || data instanceof Blob) {
+      return data;
+    }
 
     // 如果后端返回的数据格式是 { code, data, message }
     if (data.code !== undefined) {

+ 62 - 0
src/utils/permission_role.ts

@@ -0,0 +1,62 @@
+/**
+ * 角色权限校验
+ * @param {string[]} value 校验值
+ * @returns {Boolean}
+ */
+export function checkRole(value: string[]): boolean {
+  if (value && value instanceof Array && value.length > 0) {
+    // 从 localStorage 获取用户信息
+    const userInfoStr = localStorage.getItem('userInfo');
+    if (!userInfoStr) {
+      console.error('用户信息不存在');
+      return false;
+    }
+
+    try {
+      const userInfo = JSON.parse(userInfoStr);
+      const permissionRoles = value;
+      const super_admin = 'super_admin';
+      const roles = userInfo?.roles || [];
+      
+      const hasRole = roles.some((role: string) => {
+        return super_admin === role || permissionRoles.includes(role);
+      });
+      
+      return !!hasRole;
+    } catch (error) {
+      console.error('解析用户信息失败:', error);
+      return false;
+    }
+  } else {
+    console.error('角色权限校验值不能为空');
+    return false;
+  }
+}
+
+/**
+ * 字符权限校验(需要配合权限指令使用)
+ * 注意:此函数需要配合权限系统使用,如果项目中有权限指令,可以在这里实现
+ * @param {string[]} permission 权限标识数组
+ * @returns {Boolean}
+ */
+export function checkPermi(permission: string[]): boolean {
+  // TODO: 根据项目的权限系统实现
+  // 这里需要从权限信息中检查是否有对应的权限
+  const permissionInfoStr = localStorage.getItem('permissionInfo');
+  if (!permissionInfoStr) {
+    return false;
+  }
+
+  try {
+    const permissionInfo = JSON.parse(permissionInfoStr);
+    const permissions = permissionInfo?.permissions || [];
+    
+    return permission.some((perm: string) => {
+      return permissions.includes(perm);
+    });
+  } catch (error) {
+    console.error('解析权限信息失败:', error);
+    return false;
+  }
+}
+

+ 6 - 0
vite.config.ts

@@ -60,6 +60,12 @@
     server: {
       port: Number(env.VITE_PORT) || 3000,
       open: env.VITE_OPEN === 'true' || false,
+      hmr: {
+        // 配置 HMR WebSocket 连接,使用与服务器相同的端口
+        clientPort: Number(env.VITE_PORT) || 3000,
+        // 如果连接失败,不显示错误(静默失败)
+        overlay: false,
+      },
     },
     };
   });

Some files were not shown because too many files changed in this diff