@fmdevui/fm-dev 1.0.69 → 1.0.71

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! fm-dev v1.0.69 */
1
+ /*! fm-dev v1.0.71 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('crypto'), require('url'), require('http'), require('https'), require('util'), require('stream'), require('assert'), require('zlib'), require('element-plus')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'vue', 'crypto', 'url', 'http', 'https', 'util', 'stream', 'assert', 'zlib', 'element-plus'], factory) :
@@ -8422,6 +8422,17 @@
8422
8422
  else if (hour < 22) return getMessage("eveningGreeting");
8423
8423
  else return getMessage("nightGreeting");
8424
8424
  }
8425
+ function getBdate(num = 1) {
8426
+ const firstDay = /* @__PURE__ */ new Date();
8427
+ firstDay.setDate(num);
8428
+ return formatDate(firstDay, "YYYY-mm-dd");
8429
+ }
8430
+ function getEdate(num = 0) {
8431
+ const lastDay = /* @__PURE__ */ new Date();
8432
+ lastDay.setMonth(lastDay.getMonth() + 1, 0);
8433
+ if (num > 0) lastDay.setDate(num);
8434
+ return formatDate(lastDay, "YYYY-mm-dd");
8435
+ }
8425
8436
 
8426
8437
  function useChangeColor() {
8427
8438
  const hexToRgb = (str) => {
@@ -29918,1456 +29929,561 @@
29918
29929
  ZoomOut: zoom_out_default
29919
29930
  });
29920
29931
 
29921
- var _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
29922
- ...{
29923
- name: "Fminputdropdown"
29924
- },
29925
- __name: "index",
29926
- props: /* @__PURE__ */ vue.mergeModels({
29927
- //数据
29928
- optionData: {
29929
- type: Array,
29930
- default: []
29931
- },
29932
- /**
29933
- * 值的属性值
29934
- */
29935
- bvalue: {
29936
- type: String,
29937
- default: "id"
29938
- },
29939
- /**
29940
- * 值的属性标签
29941
- */
29942
- blabel: {
29943
- type: String,
29944
- default: "name"
29945
- },
29946
- placeholder: {
29947
- type: String,
29948
- default: "\u8BF7\u9009\u62E9"
29949
- },
29950
- inputWidth: {
29951
- type: String,
29952
- default: "40%"
29953
- },
29954
- dropWidth: {
29955
- type: String,
29956
- default: "90px"
29957
- },
29958
- /**
29959
- * api service name
29960
- */
29961
- apiService: {
29962
- type: String,
29963
- default: "baseData"
29964
- },
29965
- /**
29966
- * api service 下的方法
29967
- */
29968
- apiAction: {
29969
- type: String,
29970
- default: "baseDataList"
29971
- },
29972
- /**
29973
- * 基础编码 自动获取数据
29974
- */
29975
- basecode: {
29976
- type: String,
29977
- default: ""
29932
+ var __create$1 = Object.create;
29933
+ var __defProp$1 = Object.defineProperty;
29934
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
29935
+ var __getOwnPropNames$1 = Object.getOwnPropertyNames;
29936
+ var __getProtoOf$1 = Object.getPrototypeOf;
29937
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
29938
+ var __esm$1 = (fn, res) => function __init() {
29939
+ return fn && (res = (0, fn[__getOwnPropNames$1(fn)[0]])(fn = 0)), res;
29940
+ };
29941
+ var __commonJS$1 = (cb, mod) => function __require() {
29942
+ return mod || (0, cb[__getOwnPropNames$1(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
29943
+ };
29944
+ var __copyProps$1 = (to, from, except, desc) => {
29945
+ if (from && typeof from === "object" || typeof from === "function") {
29946
+ for (let key of __getOwnPropNames$1(from))
29947
+ if (!__hasOwnProp$1.call(to, key) && key !== except)
29948
+ __defProp$1(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc$1(from, key)) || desc.enumerable });
29949
+ }
29950
+ return to;
29951
+ };
29952
+ var __toESM$1 = (mod, isNodeMode, target2) => (target2 = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$1(
29953
+ // If the importer is in node compatibility mode or this is not an ESM
29954
+ // file that has been converted to a CommonJS file using a Babel-
29955
+ // compatible transform (i.e. "__esModule" has not been set), then set
29956
+ // "default" to the CommonJS "module.exports" for node compatibility.
29957
+ __defProp$1(target2, "default", { value: mod, enumerable: true }) ,
29958
+ mod
29959
+ ));
29960
+
29961
+ // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js
29962
+ var init_esm_shims$1 = __esm$1({
29963
+ "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"() {
29964
+ }
29965
+ });
29966
+
29967
+ // ../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js
29968
+ var require_rfdc = __commonJS$1({
29969
+ "../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(exports, module) {
29970
+ init_esm_shims$1();
29971
+ module.exports = rfdc2;
29972
+ function copyBuffer(cur) {
29973
+ if (cur instanceof Buffer) {
29974
+ return Buffer.from(cur);
29975
+ }
29976
+ return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length);
29978
29977
  }
29979
- }, {
29980
- "id": {
29981
- type: Number,
29982
- default: 0
29983
- },
29984
- "idModifiers": {},
29985
- "name": {
29986
- type: String,
29987
- default: ""
29988
- },
29989
- "nameModifiers": {}
29990
- }),
29991
- emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:id", "update:name"]),
29992
- setup(__props, { emit: __emit }) {
29993
- const modeValueId = vue.useModel(__props, "id");
29994
- const modeValueName = vue.useModel(__props, "name");
29995
- const props = __props;
29996
- const state = vue.reactive({
29997
- optionData: props.optionData
29998
- });
29999
- const emit = __emit;
30000
- const handCommand = (command) => {
30001
- const fitem = props.optionData.find((item) => item[props.bvalue] === command);
30002
- modeValueId.value = fitem != null ? [props.bvalue] : 0;
30003
- modeValueName.value = fitem != null ? fitem[props.blabel] : "";
30004
- emit("change", fitem);
30005
- };
30006
- vue.onMounted(async () => {
30007
- state.optionData = props.optionData;
30008
- if (props.basecode && props.basecode != "") {
30009
- const res = await useBaseApi(props.apiService).get(null, props.apiAction + "/?codetype=" + props.basecode);
30010
- state.optionData = res.data.result ?? [];
29978
+ function rfdc2(opts) {
29979
+ opts = opts || {};
29980
+ if (opts.circles) return rfdcCircles(opts);
29981
+ const constructorHandlers = /* @__PURE__ */ new Map();
29982
+ constructorHandlers.set(Date, (o) => new Date(o));
29983
+ constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
29984
+ constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
29985
+ if (opts.constructorHandlers) {
29986
+ for (const handler2 of opts.constructorHandlers) {
29987
+ constructorHandlers.set(handler2[0], handler2[1]);
29988
+ }
30011
29989
  }
30012
- });
30013
- const handRestdata = async () => {
30014
- if (props.basecode && props.basecode != "") {
30015
- const res = await useBaseApi(props.apiService).get(null, props.apiAction + "/?codetype=" + props.basecode);
30016
- state.optionData = res.data.result ?? [];
29990
+ let handler = null;
29991
+ return opts.proto ? cloneProto : clone;
29992
+ function cloneArray(a, fn) {
29993
+ const keys = Object.keys(a);
29994
+ const a2 = new Array(keys.length);
29995
+ for (let i = 0; i < keys.length; i++) {
29996
+ const k = keys[i];
29997
+ const cur = a[k];
29998
+ if (typeof cur !== "object" || cur === null) {
29999
+ a2[k] = cur;
30000
+ } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
30001
+ a2[k] = handler(cur, fn);
30002
+ } else if (ArrayBuffer.isView(cur)) {
30003
+ a2[k] = copyBuffer(cur);
30004
+ } else {
30005
+ a2[k] = fn(cur);
30006
+ }
30007
+ }
30008
+ return a2;
30017
30009
  }
30018
- };
30019
- return (_ctx, _cache) => {
30020
- const _component_el_button = vue.resolveComponent("el-button");
30021
- const _component_el_input = vue.resolveComponent("el-input");
30022
- const _component_el_dropdown_item = vue.resolveComponent("el-dropdown-item");
30023
- const _component_el_dropdown_menu = vue.resolveComponent("el-dropdown-menu");
30024
- const _component_el_dropdown = vue.resolveComponent("el-dropdown");
30025
- return vue.openBlock(), vue.createBlock(_component_el_dropdown, {
30026
- placement: "bottom",
30027
- trigger: "click",
30028
- style: { "width": "100%" },
30029
- onCommand: handCommand
30030
- }, {
30031
- dropdown: vue.withCtx(() => [
30032
- vue.createVNode(_component_el_dropdown_menu, {
30033
- style: vue.normalizeStyle({ width: __props.dropWidth })
30034
- }, {
30035
- default: vue.withCtx(() => [
30036
- (vue.openBlock(true), vue.createElementBlock(
30037
- vue.Fragment,
30038
- null,
30039
- vue.renderList(state.optionData, (item, index) => {
30040
- return vue.openBlock(), vue.createBlock(_component_el_dropdown_item, {
30041
- key: index,
30042
- command: item[__props.bvalue],
30043
- divided: ""
30044
- }, {
30045
- default: vue.withCtx(() => [
30046
- vue.createTextVNode(
30047
- vue.toDisplayString(item[__props.blabel]),
30048
- 1
30049
- /* TEXT */
30050
- )
30051
- ]),
30052
- _: 2
30053
- /* DYNAMIC */
30054
- }, 1032, ["command"]);
30055
- }),
30056
- 128
30057
- /* KEYED_FRAGMENT */
30058
- ))
30059
- ]),
30060
- _: 1
30061
- /* STABLE */
30062
- }, 8, ["style"])
30063
- ]),
30064
- default: vue.withCtx(() => [
30065
- vue.createVNode(_component_el_input, {
30066
- modelValue: modeValueName.value,
30067
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modeValueName.value = $event),
30068
- placeholder: props.placeholder,
30069
- style: vue.normalizeStyle({ width: __props.inputWidth })
30070
- }, {
30071
- append: vue.withCtx(() => [
30072
- vue.createVNode(_component_el_button, {
30073
- type: "success",
30074
- icon: vue.unref(brush_default),
30075
- onClick: handRestdata
30076
- }, null, 8, ["icon"])
30077
- ]),
30078
- _: 1
30079
- /* STABLE */
30080
- }, 8, ["modelValue", "placeholder", "style"])
30081
- ]),
30082
- _: 1
30083
- /* STABLE */
30084
- });
30085
- };
30010
+ function clone(o) {
30011
+ if (typeof o !== "object" || o === null) return o;
30012
+ if (Array.isArray(o)) return cloneArray(o, clone);
30013
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
30014
+ return handler(o, clone);
30015
+ }
30016
+ const o2 = {};
30017
+ for (const k in o) {
30018
+ if (Object.hasOwnProperty.call(o, k) === false) continue;
30019
+ const cur = o[k];
30020
+ if (typeof cur !== "object" || cur === null) {
30021
+ o2[k] = cur;
30022
+ } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
30023
+ o2[k] = handler(cur, clone);
30024
+ } else if (ArrayBuffer.isView(cur)) {
30025
+ o2[k] = copyBuffer(cur);
30026
+ } else {
30027
+ o2[k] = clone(cur);
30028
+ }
30029
+ }
30030
+ return o2;
30031
+ }
30032
+ function cloneProto(o) {
30033
+ if (typeof o !== "object" || o === null) return o;
30034
+ if (Array.isArray(o)) return cloneArray(o, cloneProto);
30035
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
30036
+ return handler(o, cloneProto);
30037
+ }
30038
+ const o2 = {};
30039
+ for (const k in o) {
30040
+ const cur = o[k];
30041
+ if (typeof cur !== "object" || cur === null) {
30042
+ o2[k] = cur;
30043
+ } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
30044
+ o2[k] = handler(cur, cloneProto);
30045
+ } else if (ArrayBuffer.isView(cur)) {
30046
+ o2[k] = copyBuffer(cur);
30047
+ } else {
30048
+ o2[k] = cloneProto(cur);
30049
+ }
30050
+ }
30051
+ return o2;
30052
+ }
30053
+ }
30054
+ function rfdcCircles(opts) {
30055
+ const refs = [];
30056
+ const refsNew = [];
30057
+ const constructorHandlers = /* @__PURE__ */ new Map();
30058
+ constructorHandlers.set(Date, (o) => new Date(o));
30059
+ constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
30060
+ constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
30061
+ if (opts.constructorHandlers) {
30062
+ for (const handler2 of opts.constructorHandlers) {
30063
+ constructorHandlers.set(handler2[0], handler2[1]);
30064
+ }
30065
+ }
30066
+ let handler = null;
30067
+ return opts.proto ? cloneProto : clone;
30068
+ function cloneArray(a, fn) {
30069
+ const keys = Object.keys(a);
30070
+ const a2 = new Array(keys.length);
30071
+ for (let i = 0; i < keys.length; i++) {
30072
+ const k = keys[i];
30073
+ const cur = a[k];
30074
+ if (typeof cur !== "object" || cur === null) {
30075
+ a2[k] = cur;
30076
+ } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
30077
+ a2[k] = handler(cur, fn);
30078
+ } else if (ArrayBuffer.isView(cur)) {
30079
+ a2[k] = copyBuffer(cur);
30080
+ } else {
30081
+ const index = refs.indexOf(cur);
30082
+ if (index !== -1) {
30083
+ a2[k] = refsNew[index];
30084
+ } else {
30085
+ a2[k] = fn(cur);
30086
+ }
30087
+ }
30088
+ }
30089
+ return a2;
30090
+ }
30091
+ function clone(o) {
30092
+ if (typeof o !== "object" || o === null) return o;
30093
+ if (Array.isArray(o)) return cloneArray(o, clone);
30094
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
30095
+ return handler(o, clone);
30096
+ }
30097
+ const o2 = {};
30098
+ refs.push(o);
30099
+ refsNew.push(o2);
30100
+ for (const k in o) {
30101
+ if (Object.hasOwnProperty.call(o, k) === false) continue;
30102
+ const cur = o[k];
30103
+ if (typeof cur !== "object" || cur === null) {
30104
+ o2[k] = cur;
30105
+ } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
30106
+ o2[k] = handler(cur, clone);
30107
+ } else if (ArrayBuffer.isView(cur)) {
30108
+ o2[k] = copyBuffer(cur);
30109
+ } else {
30110
+ const i = refs.indexOf(cur);
30111
+ if (i !== -1) {
30112
+ o2[k] = refsNew[i];
30113
+ } else {
30114
+ o2[k] = clone(cur);
30115
+ }
30116
+ }
30117
+ }
30118
+ refs.pop();
30119
+ refsNew.pop();
30120
+ return o2;
30121
+ }
30122
+ function cloneProto(o) {
30123
+ if (typeof o !== "object" || o === null) return o;
30124
+ if (Array.isArray(o)) return cloneArray(o, cloneProto);
30125
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
30126
+ return handler(o, cloneProto);
30127
+ }
30128
+ const o2 = {};
30129
+ refs.push(o);
30130
+ refsNew.push(o2);
30131
+ for (const k in o) {
30132
+ const cur = o[k];
30133
+ if (typeof cur !== "object" || cur === null) {
30134
+ o2[k] = cur;
30135
+ } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
30136
+ o2[k] = handler(cur, cloneProto);
30137
+ } else if (ArrayBuffer.isView(cur)) {
30138
+ o2[k] = copyBuffer(cur);
30139
+ } else {
30140
+ const i = refs.indexOf(cur);
30141
+ if (i !== -1) {
30142
+ o2[k] = refsNew[i];
30143
+ } else {
30144
+ o2[k] = cloneProto(cur);
30145
+ }
30146
+ }
30147
+ }
30148
+ refs.pop();
30149
+ refsNew.pop();
30150
+ return o2;
30151
+ }
30152
+ }
30086
30153
  }
30087
30154
  });
30088
30155
 
30089
- const _hoisted_1$1 = { style: { "padding": "5px" } };
30090
- const _hoisted_2 = { style: { "display": "flex", "align-items": "center", "gap": "8px", "flex-wrap": "nowrap", "overflow": "hidden" } };
30091
- const _hoisted_3 = { style: { "flex": "1 1 200px", "min-width": "0", "overflow": "hidden" } };
30092
- const _hoisted_4 = { style: { "display": "flex", "align-items": "center", "flex-shrink": "0", "white-space": "nowrap" } };
30093
- const _hoisted_5 = { style: { "margin-bottom": "45px" } };
30094
- var _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
30095
- ...{
30096
- name: "FmTree"
30097
- },
30098
- __name: "index",
30099
- props: {
30100
- checkStrictly: { type: Boolean, default: true },
30101
- /**
30102
- * api service name
30103
- */
30104
- apiService: {
30105
- type: String,
30106
- default: "planOrder"
30107
- },
30108
- /**
30109
- * api service 下的方法
30110
- */
30111
- apiAction: {
30112
- type: String,
30113
- default: "autoQuerySearch"
30114
- },
30115
- paras: {
30116
- type: Object,
30117
- default: null
30118
- },
30119
- nodeKey: {
30120
- type: String,
30121
- default: "id"
30122
- },
30123
- defaultProps: {
30124
- type: Object,
30125
- default: { children: "children", label: "name" }
30156
+ // src/index.ts
30157
+ init_esm_shims$1();
30158
+
30159
+ // src/constants.ts
30160
+ init_esm_shims$1();
30161
+
30162
+ // src/env.ts
30163
+ init_esm_shims$1();
30164
+ var isBrowser = typeof navigator !== "undefined";
30165
+ var target = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : typeof global !== "undefined" ? global : {};
30166
+ typeof target.chrome !== "undefined" && !!target.chrome.devtools;
30167
+ isBrowser && target.self !== target.top;
30168
+ var _a$1;
30169
+ typeof navigator !== "undefined" && ((_a$1 = navigator.userAgent) == null ? void 0 : _a$1.toLowerCase().includes("electron"));
30170
+
30171
+ // src/general.ts
30172
+ init_esm_shims$1();
30173
+ var import_rfdc = __toESM$1(require_rfdc());
30174
+ var classifyRE = /(?:^|[-_/])(\w)/g;
30175
+ function toUpper(_, c) {
30176
+ return c ? c.toUpperCase() : "";
30177
+ }
30178
+ function classify(str) {
30179
+ return str && `${str}`.replace(classifyRE, toUpper);
30180
+ }
30181
+ function basename(filename, ext) {
30182
+ let normalizedFilename = filename.replace(/^[a-z]:/i, "").replace(/\\/g, "/");
30183
+ if (normalizedFilename.endsWith(`index${ext}`)) {
30184
+ normalizedFilename = normalizedFilename.replace(`/index${ext}`, ext);
30185
+ }
30186
+ const lastSlashIndex = normalizedFilename.lastIndexOf("/");
30187
+ const baseNameWithExt = normalizedFilename.substring(lastSlashIndex + 1);
30188
+ {
30189
+ const extIndex = baseNameWithExt.lastIndexOf(ext);
30190
+ return baseNameWithExt.substring(0, extIndex);
30191
+ }
30192
+ }
30193
+ var deepClone = (0, import_rfdc.default)({ circles: true });
30194
+
30195
+ const DEBOUNCE_DEFAULTS = {
30196
+ trailing: true
30197
+ };
30198
+ function debounce(fn, wait = 25, options = {}) {
30199
+ options = { ...DEBOUNCE_DEFAULTS, ...options };
30200
+ if (!Number.isFinite(wait)) {
30201
+ throw new TypeError("Expected `wait` to be a finite number");
30202
+ }
30203
+ let leadingValue;
30204
+ let timeout;
30205
+ let resolveList = [];
30206
+ let currentPromise;
30207
+ let trailingArgs;
30208
+ const applyFn = (_this, args) => {
30209
+ currentPromise = _applyPromised(fn, _this, args);
30210
+ currentPromise.finally(() => {
30211
+ currentPromise = null;
30212
+ if (options.trailing && trailingArgs && !timeout) {
30213
+ const promise = applyFn(_this, trailingArgs);
30214
+ trailingArgs = null;
30215
+ return promise;
30216
+ }
30217
+ });
30218
+ return currentPromise;
30219
+ };
30220
+ return function(...args) {
30221
+ if (currentPromise) {
30222
+ if (options.trailing) {
30223
+ trailingArgs = args;
30224
+ }
30225
+ return currentPromise;
30126
30226
  }
30127
- },
30128
- emits: ["node-click"],
30129
- setup(__props, { expose: __expose, emit: __emit }) {
30130
- const props = __props;
30131
- const filterText = vue.ref("");
30132
- const treeRef = vue.ref();
30133
- const state = vue.reactive({
30134
- loading: false,
30135
- folderData: [],
30136
- isShowCheckbox: false,
30137
- strictly: false
30227
+ return new Promise((resolve) => {
30228
+ const shouldCallNow = !timeout && options.leading;
30229
+ clearTimeout(timeout);
30230
+ timeout = setTimeout(() => {
30231
+ timeout = null;
30232
+ const promise = options.leading ? leadingValue : applyFn(this, args);
30233
+ for (const _resolve of resolveList) {
30234
+ _resolve(promise);
30235
+ }
30236
+ resolveList = [];
30237
+ }, wait);
30238
+ if (shouldCallNow) {
30239
+ leadingValue = applyFn(this, args);
30240
+ resolve(leadingValue);
30241
+ } else {
30242
+ resolveList.push(resolve);
30243
+ }
30138
30244
  });
30139
- vue.onMounted(async () => {
30140
- await fetchTreeData();
30141
- });
30142
- vue.watch(filterText, (val) => {
30143
- treeRef.value.filter(val);
30144
- });
30145
- const fetchTreeData = async (showLoading = true) => {
30146
- if (showLoading) state.loading = true;
30147
- var res = await useBaseApi(props.apiService).get(props.paras, props.apiAction);
30148
- state.folderData = res.data.result ?? [];
30149
- if (showLoading) state.loading = false;
30150
- return res.data.result ?? [];
30151
- };
30152
- const getCheckedKeys = () => {
30153
- return treeRef.value.getCheckedKeys();
30154
- };
30155
- const filterNode = (value, data) => {
30156
- if (!value) return true;
30157
- return data.name.includes(value);
30158
- };
30159
- const handleCommand = async (command) => {
30160
- if ("expandAll" == command) {
30161
- for (let i = 0; i < treeRef.value.store._getAllNodes().length; i++) {
30162
- treeRef.value.store._getAllNodes()[i].expanded = true;
30163
- }
30164
- } else if ("collapseAll" == command) {
30165
- for (let i = 0; i < treeRef.value.store._getAllNodes().length; i++) {
30166
- treeRef.value.store._getAllNodes()[i].expanded = false;
30167
- }
30168
- } else if ("refresh" == command) {
30169
- fetchTreeData();
30170
- } else if ("rootNode" == command) {
30171
- treeRef.value?.setCurrentKey();
30172
- emit("node-click", { id: 0, name: "" });
30245
+ };
30246
+ }
30247
+ async function _applyPromised(fn, _this, args) {
30248
+ return await fn.apply(_this, args);
30249
+ }
30250
+
30251
+ function flatHooks(configHooks, hooks = {}, parentName) {
30252
+ for (const key in configHooks) {
30253
+ const subHook = configHooks[key];
30254
+ const name = parentName ? `${parentName}:${key}` : key;
30255
+ if (typeof subHook === "object" && subHook !== null) {
30256
+ flatHooks(subHook, hooks, name);
30257
+ } else if (typeof subHook === "function") {
30258
+ hooks[name] = subHook;
30259
+ }
30260
+ }
30261
+ return hooks;
30262
+ }
30263
+ const defaultTask = { run: (function_) => function_() };
30264
+ const _createTask = () => defaultTask;
30265
+ const createTask = typeof console.createTask !== "undefined" ? console.createTask : _createTask;
30266
+ function serialTaskCaller(hooks, args) {
30267
+ const name = args.shift();
30268
+ const task = createTask(name);
30269
+ return hooks.reduce(
30270
+ (promise, hookFunction) => promise.then(() => task.run(() => hookFunction(...args))),
30271
+ Promise.resolve()
30272
+ );
30273
+ }
30274
+ function parallelTaskCaller(hooks, args) {
30275
+ const name = args.shift();
30276
+ const task = createTask(name);
30277
+ return Promise.all(hooks.map((hook) => task.run(() => hook(...args))));
30278
+ }
30279
+ function callEachWith(callbacks, arg0) {
30280
+ for (const callback of [...callbacks]) {
30281
+ callback(arg0);
30282
+ }
30283
+ }
30284
+
30285
+ class Hookable {
30286
+ constructor() {
30287
+ this._hooks = {};
30288
+ this._before = void 0;
30289
+ this._after = void 0;
30290
+ this._deprecatedMessages = void 0;
30291
+ this._deprecatedHooks = {};
30292
+ this.hook = this.hook.bind(this);
30293
+ this.callHook = this.callHook.bind(this);
30294
+ this.callHookWith = this.callHookWith.bind(this);
30295
+ }
30296
+ hook(name, function_, options = {}) {
30297
+ if (!name || typeof function_ !== "function") {
30298
+ return () => {
30299
+ };
30300
+ }
30301
+ const originalName = name;
30302
+ let dep;
30303
+ while (this._deprecatedHooks[name]) {
30304
+ dep = this._deprecatedHooks[name];
30305
+ name = dep.to;
30306
+ }
30307
+ if (dep && !options.allowDeprecated) {
30308
+ let message = dep.message;
30309
+ if (!message) {
30310
+ message = `${originalName} hook has been deprecated` + (dep.to ? `, please use ${dep.to}` : "");
30311
+ }
30312
+ if (!this._deprecatedMessages) {
30313
+ this._deprecatedMessages = /* @__PURE__ */ new Set();
30314
+ }
30315
+ if (!this._deprecatedMessages.has(message)) {
30316
+ console.warn(message);
30317
+ this._deprecatedMessages.add(message);
30318
+ }
30319
+ }
30320
+ if (!function_.name) {
30321
+ try {
30322
+ Object.defineProperty(function_, "name", {
30323
+ get: () => "_" + name.replace(/\W+/g, "_") + "_hook_cb",
30324
+ configurable: true
30325
+ });
30326
+ } catch {
30327
+ }
30328
+ }
30329
+ this._hooks[name] = this._hooks[name] || [];
30330
+ this._hooks[name].push(function_);
30331
+ return () => {
30332
+ if (function_) {
30333
+ this.removeHook(name, function_);
30334
+ function_ = void 0;
30173
30335
  }
30174
30336
  };
30175
- const emit = __emit;
30176
- const nodeClick = (node) => {
30177
- emit("node-click", { id: node.id, name: node.name });
30178
- };
30179
- const setCurrentKey = (key, shouldAutoExpandParent) => {
30180
- treeRef.value?.setCurrentKey(key, shouldAutoExpandParent);
30181
- };
30182
- __expose({ fetchTreeData, getCheckedKeys, setCurrentKey });
30183
- return (_ctx, _cache) => {
30184
- const _component_el_input = vue.resolveComponent("el-input");
30185
- const _component_el_checkbox = vue.resolveComponent("el-checkbox");
30186
- const _component_el_icon = vue.resolveComponent("el-icon");
30187
- const _component_el_button = vue.resolveComponent("el-button");
30188
- const _component_el_dropdown_item = vue.resolveComponent("el-dropdown-item");
30189
- const _component_el_dropdown_menu = vue.resolveComponent("el-dropdown-menu");
30190
- const _component_el_dropdown = vue.resolveComponent("el-dropdown");
30191
- const _component_el_tree = vue.resolveComponent("el-tree");
30192
- const _component_el_scrollbar = vue.resolveComponent("el-scrollbar");
30193
- const _component_el_card = vue.resolveComponent("el-card");
30194
- const _directive_loading = vue.resolveDirective("loading");
30195
- return vue.openBlock(), vue.createBlock(_component_el_card, {
30196
- shadow: "hover",
30197
- "body-style": "height:100%;overflow:auto;padding:5px;width:100%;",
30198
- style: { "height": "100%" }
30199
- }, {
30200
- header: vue.withCtx(() => [
30201
- vue.createElementVNode("div", _hoisted_1$1, [
30202
- vue.createElementVNode("div", _hoisted_2, [
30203
- vue.createElementVNode("div", _hoisted_3, [
30204
- vue.createVNode(_component_el_input, {
30205
- "prefix-icon": vue.unref(search_default),
30206
- modelValue: filterText.value,
30207
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filterText.value = $event),
30208
- modelModifiers: { lazy: true },
30209
- clearable: "",
30210
- placeholder: "\u7C7B\u578B\u540D\u79F0"
30211
- }, null, 8, ["prefix-icon", "modelValue"])
30212
- ]),
30213
- vue.createElementVNode("div", _hoisted_4, [
30214
- !props.checkStrictly && state.isShowCheckbox ? (vue.openBlock(), vue.createBlock(_component_el_checkbox, {
30215
- key: 0,
30216
- modelValue: state.strictly,
30217
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => state.strictly = $event),
30218
- label: "\u8054\u52A8",
30219
- style: { "margin-left": "8px" },
30220
- border: ""
30221
- }, null, 8, ["modelValue"])) : vue.createCommentVNode("v-if", true),
30222
- vue.createVNode(_component_el_dropdown, { onCommand: handleCommand }, {
30223
- dropdown: vue.withCtx(() => [
30224
- vue.createVNode(_component_el_dropdown_menu, null, {
30225
- default: vue.withCtx(() => [
30226
- vue.createVNode(_component_el_dropdown_item, { command: "expandAll" }, {
30227
- default: vue.withCtx(() => _cache[2] || (_cache[2] = [
30228
- vue.createTextVNode("\u5168\u90E8\u5C55\u5F00")
30229
- ])),
30230
- _: 1,
30231
- __: [2]
30232
- }),
30233
- vue.createVNode(_component_el_dropdown_item, { command: "collapseAll" }, {
30234
- default: vue.withCtx(() => _cache[3] || (_cache[3] = [
30235
- vue.createTextVNode("\u5168\u90E8\u6298\u53E0")
30236
- ])),
30237
- _: 1,
30238
- __: [3]
30239
- }),
30240
- vue.createVNode(_component_el_dropdown_item, { command: "rootNode" }, {
30241
- default: vue.withCtx(() => _cache[4] || (_cache[4] = [
30242
- vue.createTextVNode("\u6839\u8282\u70B9")
30243
- ])),
30244
- _: 1,
30245
- __: [4]
30246
- }),
30247
- vue.createVNode(_component_el_dropdown_item, { command: "refresh" }, {
30248
- default: vue.withCtx(() => _cache[5] || (_cache[5] = [
30249
- vue.createTextVNode("\u5237\u65B0")
30250
- ])),
30251
- _: 1,
30252
- __: [5]
30253
- })
30254
- ]),
30255
- _: 1
30256
- /* STABLE */
30257
- })
30258
- ]),
30259
- default: vue.withCtx(() => [
30260
- vue.createVNode(_component_el_button, { style: { "margin-left": "8px", "width": "34px" } }, {
30261
- default: vue.withCtx(() => [
30262
- vue.createVNode(_component_el_icon, { class: "el-icon--center" }, {
30263
- default: vue.withCtx(() => [
30264
- vue.createVNode(vue.unref(more_filled_default))
30265
- ]),
30266
- _: 1
30267
- /* STABLE */
30268
- })
30269
- ]),
30270
- _: 1
30271
- /* STABLE */
30272
- })
30273
- ]),
30274
- _: 1
30275
- /* STABLE */
30276
- })
30277
- ])
30278
- ])
30279
- ])
30280
- ]),
30281
- default: vue.withCtx(() => [
30282
- vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
30283
- vue.createVNode(_component_el_scrollbar, null, {
30284
- default: vue.withCtx(() => [
30285
- vue.createVNode(_component_el_tree, {
30286
- ref_key: "treeRef",
30287
- ref: treeRef,
30288
- class: "filter-tree",
30289
- data: state.folderData,
30290
- "node-key": __props.nodeKey,
30291
- props: __props.defaultProps,
30292
- "filter-node-method": filterNode,
30293
- onNodeClick: nodeClick,
30294
- "show-checkbox": state.isShowCheckbox,
30295
- "default-expand-all": "",
30296
- "highlight-current": "",
30297
- "check-strictly": !state.strictly
30298
- }, {
30299
- default: vue.withCtx(({ node }) => [
30300
- vue.createCommentVNode(' <el-icon v-if="node.level < 4" size="16" style="margin-right: 3px; display: inline; vertical-align: middle"><ele-FolderOpened /></el-icon>\r\n <el-icon v-else size="16" style="margin-right: 3px; display: inline; vertical-align: middle"><ele-Folder /></el-icon> '),
30301
- vue.createTextVNode(
30302
- " " + vue.toDisplayString(node.label),
30303
- 1
30304
- /* TEXT */
30305
- )
30306
- ]),
30307
- _: 1
30308
- /* STABLE */
30309
- }, 8, ["data", "node-key", "props", "show-checkbox", "check-strictly"])
30310
- ]),
30311
- _: 1
30312
- /* STABLE */
30313
- })
30314
- ])), [
30315
- [_directive_loading, state.loading]
30316
- ])
30317
- ]),
30318
- _: 1
30319
- /* STABLE */
30320
- });
30337
+ }
30338
+ hookOnce(name, function_) {
30339
+ let _unreg;
30340
+ let _function = (...arguments_) => {
30341
+ if (typeof _unreg === "function") {
30342
+ _unreg();
30343
+ }
30344
+ _unreg = void 0;
30345
+ _function = void 0;
30346
+ return function_(...arguments_);
30321
30347
  };
30348
+ _unreg = this.hook(name, _function);
30349
+ return _unreg;
30322
30350
  }
30323
- });
30324
-
30325
- const _hoisted_1 = ["src"];
30326
- var _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
30327
- ...{
30328
- name: "svgIcon"
30329
- },
30330
- __name: "svgicon",
30331
- props: {
30332
- // svg 图标组件名字
30333
- name: {
30334
- type: String
30335
- },
30336
- // svg 大小
30337
- size: {
30338
- type: Number,
30339
- default: () => 14
30340
- },
30341
- // svg 颜色
30342
- color: {
30343
- type: String
30351
+ removeHook(name, function_) {
30352
+ if (this._hooks[name]) {
30353
+ const index = this._hooks[name].indexOf(function_);
30354
+ if (index !== -1) {
30355
+ this._hooks[name].splice(index, 1);
30356
+ }
30357
+ if (this._hooks[name].length === 0) {
30358
+ delete this._hooks[name];
30359
+ }
30344
30360
  }
30345
- },
30346
- setup(__props) {
30347
- const props = __props;
30348
- const linesString = ["https", "http", "/src", "/assets", "data:image", window.__env__.VITE_PUBLIC_PATH];
30349
- const getIconName = vue.computed(() => {
30350
- return props?.name;
30351
- });
30352
- const isShowIconSvg = vue.computed(() => {
30353
- return props?.name?.startsWith("ele-");
30354
- });
30355
- const isShowIconImg = vue.computed(() => {
30356
- return linesString.find((str) => props.name?.startsWith(str));
30357
- });
30358
- const setIconSvgStyle = vue.computed(() => {
30359
- return `font-size: ${props.size}px;color: ${props.color};`;
30360
- });
30361
- const setIconImgOutStyle = vue.computed(() => {
30362
- return `width: ${props.size}px;height: ${props.size}px;display: inline-block;overflow: hidden;`;
30363
- });
30364
- const setIconSvgInsStyle = vue.computed(() => {
30365
- const filterStyle = [];
30366
- const compatibles = ["-webkit", "-ms", "-o", "-moz"];
30367
- compatibles.forEach((j) => filterStyle.push(`${j}-filter: drop-shadow(${props.color} ${props.size}px 0);`));
30368
- return `width: ${props.size}px;height: ${props.size}px;position: relative;left: -${props.size}px;${filterStyle.join("")}`;
30369
- });
30370
- return (_ctx, _cache) => {
30371
- return isShowIconSvg.value ? (vue.openBlock(), vue.createElementBlock(
30372
- "i",
30373
- {
30374
- key: 0,
30375
- class: "el-icon",
30376
- style: vue.normalizeStyle(setIconSvgStyle.value)
30377
- },
30378
- [
30379
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getIconName.value)))
30380
- ],
30381
- 4
30382
- /* STYLE */
30383
- )) : isShowIconImg.value ? (vue.openBlock(), vue.createElementBlock(
30384
- "div",
30385
- {
30386
- key: 1,
30387
- style: vue.normalizeStyle(setIconImgOutStyle.value)
30388
- },
30389
- [
30390
- vue.createElementVNode("img", {
30391
- src: getIconName.value,
30392
- style: vue.normalizeStyle(setIconSvgInsStyle.value)
30393
- }, null, 12, _hoisted_1)
30394
- ],
30395
- 4
30396
- /* STYLE */
30397
- )) : (vue.openBlock(), vue.createElementBlock(
30398
- "i",
30399
- {
30400
- key: 2,
30401
- class: vue.normalizeClass(getIconName.value),
30402
- style: vue.normalizeStyle(setIconSvgStyle.value)
30403
- },
30404
- null,
30405
- 6
30406
- /* CLASS, STYLE */
30407
- ));
30408
- };
30409
30361
  }
30410
- });
30411
-
30412
- function elSvg(app) {
30413
- const icons = svg;
30414
- for (const i in icons) {
30415
- if (!app._context.components[`ele-${icons[i].name}`]) {
30416
- app.component(`ele-${icons[i].name}`, icons[i]);
30362
+ deprecateHook(name, deprecated) {
30363
+ this._deprecatedHooks[name] = typeof deprecated === "string" ? { to: deprecated } : deprecated;
30364
+ const _hooks = this._hooks[name] || [];
30365
+ delete this._hooks[name];
30366
+ for (const hook of _hooks) {
30367
+ this.hook(name, hook);
30417
30368
  }
30418
30369
  }
30419
- if (!app._context.components[`SvgIcon`]) {
30420
- app.component("SvgIcon", _sfc_main$1);
30370
+ deprecateHooks(deprecatedHooks) {
30371
+ Object.assign(this._deprecatedHooks, deprecatedHooks);
30372
+ for (const name in deprecatedHooks) {
30373
+ this.deprecateHook(name, deprecatedHooks[name]);
30374
+ }
30421
30375
  }
30422
- }
30423
-
30424
- const FmTransfer = _sfc_main$8;
30425
- const FmNoticeBar = _sfc_main$7;
30426
- const FmDragImg = dragimg;
30427
- const Fmselect = _sfc_main$5;
30428
- const FmAutocomplete = _sfc_main$4;
30429
- const Fminputdropdown = _sfc_main$3;
30430
- const FmTree = _sfc_main$2;
30431
-
30432
- const makeInstaller = (components = []) => {
30433
- const install = (app) => {
30434
- components.forEach(
30435
- (component) => {
30436
- if (!app._context.components[component.name]) {
30437
- app.component(component.name, component);
30438
- }
30376
+ addHooks(configHooks) {
30377
+ const hooks = flatHooks(configHooks);
30378
+ const removeFns = Object.keys(hooks).map(
30379
+ (key) => this.hook(key, hooks[key])
30380
+ );
30381
+ return () => {
30382
+ for (const unreg of removeFns.splice(0, removeFns.length)) {
30383
+ unreg();
30439
30384
  }
30385
+ };
30386
+ }
30387
+ removeHooks(configHooks) {
30388
+ const hooks = flatHooks(configHooks);
30389
+ for (const key in hooks) {
30390
+ this.removeHook(key, hooks[key]);
30391
+ }
30392
+ }
30393
+ removeAllHooks() {
30394
+ for (const key in this._hooks) {
30395
+ delete this._hooks[key];
30396
+ }
30397
+ }
30398
+ callHook(name, ...arguments_) {
30399
+ arguments_.unshift(name);
30400
+ return this.callHookWith(serialTaskCaller, name, ...arguments_);
30401
+ }
30402
+ callHookParallel(name, ...arguments_) {
30403
+ arguments_.unshift(name);
30404
+ return this.callHookWith(parallelTaskCaller, name, ...arguments_);
30405
+ }
30406
+ callHookWith(caller, name, ...arguments_) {
30407
+ const event = this._before || this._after ? { name, args: arguments_, context: {} } : void 0;
30408
+ if (this._before) {
30409
+ callEachWith(this._before, event);
30410
+ }
30411
+ const result = caller(
30412
+ name in this._hooks ? [...this._hooks[name]] : [],
30413
+ arguments_
30440
30414
  );
30441
- if (app)
30442
- elSvg(app);
30443
- };
30444
- return {
30445
- install
30446
- };
30447
- };
30448
-
30449
- var _sfc_main = /* @__PURE__ */ vue.defineComponent({
30450
- ...{
30451
- name: "FmLogin"
30452
- },
30453
- __name: "index",
30454
- setup(__props) {
30455
- const login = vue.ref(false);
30456
- function handleLogin() {
30457
- login.value = true;
30415
+ if (result instanceof Promise) {
30416
+ return result.finally(() => {
30417
+ if (this._after && event) {
30418
+ callEachWith(this._after, event);
30419
+ }
30420
+ });
30458
30421
  }
30459
- return (_ctx, _cache) => {
30460
- return vue.openBlock(), vue.createElementBlock("div", { onClick: handleLogin }, _cache[0] || (_cache[0] = [
30461
- vue.createElementVNode(
30462
- "h1",
30463
- null,
30464
- "login xxxxx ",
30465
- -1
30466
- /* CACHED */
30467
- )
30468
- ]));
30422
+ if (this._after && event) {
30423
+ callEachWith(this._after, event);
30424
+ }
30425
+ return result;
30426
+ }
30427
+ beforeEach(function_) {
30428
+ this._before = this._before || [];
30429
+ this._before.push(function_);
30430
+ return () => {
30431
+ if (this._before !== void 0) {
30432
+ const index = this._before.indexOf(function_);
30433
+ if (index !== -1) {
30434
+ this._before.splice(index, 1);
30435
+ }
30436
+ }
30469
30437
  };
30470
30438
  }
30471
- });
30472
-
30473
- const FmLogin = _sfc_main;
30474
-
30475
- const plugins = [
30476
- FmLogin,
30477
- FmTransfer,
30478
- FmNoticeBar,
30479
- Fmselect,
30480
- FmAutocomplete,
30481
- Fminputdropdown,
30482
- FmTree
30483
- ];
30484
-
30485
- var installer = makeInstaller([...plugins]);
30486
-
30487
- const cssCdnUrlList = [
30488
- // 调整为从本地引入,注释下面的 url
30489
- // '//at.alicdn.com/t/c/font_2298093_rnp72ifj3ba.css',
30490
- // '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',
30491
- ];
30492
- const jsCdnUrlList = [];
30493
- function setCssCdn() {
30494
- if (cssCdnUrlList.length <= 0) return false;
30495
- cssCdnUrlList.map((v) => {
30496
- let link = document.createElement("link");
30497
- link.rel = "stylesheet";
30498
- link.href = v;
30499
- link.crossOrigin = "anonymous";
30500
- document.getElementsByTagName("head")[0].appendChild(link);
30501
- });
30502
- }
30503
- function setJsCdn() {
30504
- if (jsCdnUrlList.length <= 0) return false;
30505
- jsCdnUrlList.map((v) => {
30506
- let link = document.createElement("script");
30507
- link.src = v;
30508
- document.body.appendChild(link);
30509
- });
30510
- }
30511
- const setIntroduction = {
30512
- // 设置css
30513
- cssCdn: () => {
30514
- setCssCdn();
30515
- },
30516
- // 设置js
30517
- jsCdn: () => {
30518
- setJsCdn();
30519
- }
30520
- };
30521
-
30522
- const NextLoading = {
30523
- // 创建 loading
30524
- start: () => {
30525
- const bodys = document.body;
30526
- const div = document.createElement("div");
30527
- div.setAttribute("class", "loading-next");
30528
- const htmls = `
30529
- <div class="loading-next-box">
30530
- <div class="loading-next-box-warp">
30531
- <div class="loading-next-box-item"></div>
30532
- <div class="loading-next-box-item"></div>
30533
- <div class="loading-next-box-item"></div>
30534
- <div class="loading-next-box-item"></div>
30535
- <div class="loading-next-box-item"></div>
30536
- <div class="loading-next-box-item"></div>
30537
- <div class="loading-next-box-item"></div>
30538
- <div class="loading-next-box-item"></div>
30539
- <div class="loading-next-box-item"></div>
30540
- </div>
30541
- </div>
30542
- `;
30543
- div.innerHTML = htmls;
30544
- bodys.insertBefore(div, bodys.childNodes[0]);
30545
- window.nextLoading = true;
30546
- },
30547
- // 移除 loading
30548
- done: (time = 0) => {
30549
- vue.nextTick(() => {
30550
- setTimeout(() => {
30551
- window.nextLoading = false;
30552
- const el = document.querySelector(".loading-next");
30553
- el?.parentNode?.removeChild(el);
30554
- }, time);
30555
- });
30439
+ afterEach(function_) {
30440
+ this._after = this._after || [];
30441
+ this._after.push(function_);
30442
+ return () => {
30443
+ if (this._after !== void 0) {
30444
+ const index = this._after.indexOf(function_);
30445
+ if (index !== -1) {
30446
+ this._after.splice(index, 1);
30447
+ }
30448
+ }
30449
+ };
30556
30450
  }
30557
- };
30558
-
30559
- function useSysApi() {
30560
- return {
30561
- getSysInfo: (id) => {
30562
- return service({
30563
- url: `/api/sysTenant/sysInfo/${id}`,
30564
- method: "GET"
30565
- });
30566
- },
30567
- getSmPublicKey: () => {
30568
- return service({
30569
- url: `/api/sysConfig/smPublicKey`,
30570
- method: "GET"
30571
- });
30572
- },
30573
- getMenuTree: () => {
30574
- return service({
30575
- url: `/api/sysMenu/loginMenuTree`,
30576
- method: "GET"
30577
- });
30578
- },
30579
- getMenuUserMenuList: () => {
30580
- return service({
30581
- url: `/api/sysUserMenu/userMenuList`,
30582
- method: "GET"
30583
- });
30584
- },
30585
- addUserMenu: (data) => {
30586
- return service({
30587
- url: `/api/sysUserMenu/add`,
30588
- method: "POST",
30589
- data
30590
- });
30591
- },
30592
- setNoticeRead: (data) => {
30593
- return service({
30594
- url: `/api/sysNotice/setRead`,
30595
- method: "POST",
30596
- data
30597
- });
30598
- },
30599
- getNoticeTitle: () => {
30600
- return service({
30601
- url: `/api/sysNotice/noticeTitle`,
30602
- method: "GET"
30603
- });
30604
- },
30605
- getNoticeUnReadList: () => {
30606
- return service({
30607
- url: `/api/sysNotice/unReadList`,
30608
- method: "GET"
30609
- });
30610
- },
30611
- NoticePageReceived: (data) => {
30612
- return service({
30613
- url: `/api/sysNotice/pageReceived`,
30614
- method: "POST",
30615
- data
30616
- });
30617
- },
30618
- getUpgradeLastUnRead: () => {
30619
- return service({
30620
- url: `/api/sysUpgrade/lastUnRead`,
30621
- method: "GET"
30622
- });
30623
- },
30624
- // 获取用户信息
30625
- getUserInfo: () => {
30626
- return service({
30627
- url: `/api/sysAuth/userInfo`,
30628
- method: "GET"
30629
- });
30630
- },
30631
- getUserRoleTableList: () => {
30632
- return service({
30633
- url: `/api/sysRole/userRoleTableList`,
30634
- method: "GET"
30635
- });
30636
- },
30637
- getConstList: () => {
30638
- return service({
30639
- url: `/api/sysConst/list`,
30640
- method: "GET"
30641
- });
30642
- },
30643
- getPosList: () => {
30644
- return service({
30645
- url: `/api/sysPos/list`,
30646
- method: "GET"
30647
- });
30648
- },
30649
- getOwnRoleListById: (userid) => {
30650
- return service({
30651
- url: `/api/sysUser/ownRoleList/${userid}`,
30652
- method: "GET"
30653
- });
30654
- },
30655
- getRoleList: () => {
30656
- return service({
30657
- url: `/api/sysRole/list`,
30658
- method: "GET"
30659
- });
30660
- },
30661
- getSysOrgChildTreePidLevel: (pid, level) => {
30662
- return service({
30663
- url: `/api/sysOrg/childTree/${pid}/${level}`,
30664
- method: "GET"
30665
- });
30666
- },
30667
- getOrgList: (params) => {
30668
- return service({
30669
- url: `/api/sysOrg/list`,
30670
- method: "GET",
30671
- params
30672
- });
30673
- },
30674
- getUserBaseInfo: () => {
30675
- return service({
30676
- url: `/api/sysUser/baseInfo`,
30677
- method: "GET"
30678
- });
30679
- },
30680
- getOwnExtOrgListByid: (userid) => {
30681
- return service({
30682
- url: `/api/sysUser/ownExtOrgList/${userid}`,
30683
- method: "GET"
30684
- });
30685
- },
30686
- getAllDictList: () => {
30687
- return service({
30688
- url: `/api/sysDictType/allDictList`,
30689
- method: "GET"
30690
- });
30691
- },
30692
- verifyPwdExpirationTime: () => {
30693
- return service({
30694
- url: `/api/sysUser/verifyPwdExpirationTime`,
30695
- method: "POST"
30696
- });
30697
- },
30698
- changePwd: (data) => {
30699
- return service({
30700
- url: `/fmauth/sysauth/changePwd`,
30701
- method: "POST",
30702
- data
30703
- });
30704
- },
30705
- resetPwd: (data) => {
30706
- return service({
30707
- url: `/fmauth/sysauth/resetPwd`,
30708
- method: "POST",
30709
- data
30710
- });
30711
- },
30712
- unlockLogin: (data) => {
30713
- return service({
30714
- url: `/fmauth/sysauth/unlockLogin`,
30715
- method: "POST",
30716
- data
30717
- });
30718
- },
30719
- changeToken: (data) => {
30720
- return service({
30721
- url: `/fmauth/sysauth/changeToken`,
30722
- method: "POST",
30723
- data
30724
- });
30725
- },
30726
- Logout: () => {
30727
- return service({
30728
- url: `/fmauth/sysauth/logout`,
30729
- method: "POST"
30730
- });
30731
- },
30732
- unLockScreen: (password) => {
30733
- return service({
30734
- url: `/fmauth/sysauth/unlockScreen/?password=${password}`,
30735
- method: "POST"
30736
- });
30737
- },
30738
- getOnlineUserList: (data) => {
30739
- return service({
30740
- url: `/fmauth/sysOnlineUser/page`,
30741
- method: "POST",
30742
- data
30743
- });
30744
- }
30745
- };
30746
- }
30747
- function feature(promise, errorExt) {
30748
- return promise.then((data) => [null, data]).catch((err) => {
30749
- if (errorExt) {
30750
- const parsedError = Object.assign({}, err, errorExt);
30751
- return [parsedError, void 0];
30752
- }
30753
- return [err, void 0];
30754
- });
30755
30451
  }
30756
-
30757
- function useLoginApi() {
30758
- return {
30759
- signIn: (data) => {
30760
- return service({
30761
- url: "/fmauth/sysauth/login",
30762
- method: "post",
30763
- data
30764
- });
30765
- },
30766
- loginPhonenumber: (data) => {
30767
- return service({
30768
- url: "/fmauth/sysauth/loginPhone",
30769
- method: "post",
30770
- data
30771
- });
30772
- },
30773
- getCaptcha: () => {
30774
- return service({
30775
- url: "/fmauth/sysauth/captcha",
30776
- method: "get"
30777
- });
30778
- },
30779
- signOut: (data) => {
30780
- return service({
30781
- url: "/fmauth/sysauth/signOut",
30782
- method: "post",
30783
- data
30784
- });
30785
- }
30786
- };
30452
+ function createHooks() {
30453
+ return new Hookable();
30787
30454
  }
30788
30455
 
30789
- var AccountTypeEnum = /* @__PURE__ */ ((AccountTypeEnum2) => {
30790
- AccountTypeEnum2[AccountTypeEnum2["NUMBER_666"] = 666] = "NUMBER_666";
30791
- AccountTypeEnum2[AccountTypeEnum2["NUMBER_777"] = 777] = "NUMBER_777";
30792
- AccountTypeEnum2[AccountTypeEnum2["NUMBER_888"] = 888] = "NUMBER_888";
30793
- AccountTypeEnum2[AccountTypeEnum2["NUMBER_987"] = 987] = "NUMBER_987";
30794
- AccountTypeEnum2[AccountTypeEnum2["NUMBER_999"] = 999] = "NUMBER_999";
30795
- return AccountTypeEnum2;
30796
- })(AccountTypeEnum || {});
30797
- var JobCreateTypeEnum = /* @__PURE__ */ ((JobCreateTypeEnum2) => {
30798
- JobCreateTypeEnum2[JobCreateTypeEnum2["NUMBER_0"] = 0] = "NUMBER_0";
30799
- JobCreateTypeEnum2[JobCreateTypeEnum2["NUMBER_1"] = 1] = "NUMBER_1";
30800
- JobCreateTypeEnum2[JobCreateTypeEnum2["NUMBER_2"] = 2] = "NUMBER_2";
30801
- return JobCreateTypeEnum2;
30802
- })(JobCreateTypeEnum || {});
30803
- var HttpMethodEnum = /* @__PURE__ */ ((HttpMethodEnum2) => {
30804
- HttpMethodEnum2[HttpMethodEnum2["NUMBER_0"] = 0] = "NUMBER_0";
30805
- HttpMethodEnum2[HttpMethodEnum2["NUMBER_1"] = 1] = "NUMBER_1";
30806
- HttpMethodEnum2[HttpMethodEnum2["NUMBER_2"] = 2] = "NUMBER_2";
30807
- HttpMethodEnum2[HttpMethodEnum2["NUMBER_3"] = 3] = "NUMBER_3";
30808
- HttpMethodEnum2[HttpMethodEnum2["NUMBER_4"] = 4] = "NUMBER_4";
30809
- HttpMethodEnum2[HttpMethodEnum2["NUMBER_5"] = 5] = "NUMBER_5";
30810
- HttpMethodEnum2[HttpMethodEnum2["NUMBER_6"] = 6] = "NUMBER_6";
30811
- HttpMethodEnum2[HttpMethodEnum2["NUMBER_7"] = 7] = "NUMBER_7";
30812
- HttpMethodEnum2[HttpMethodEnum2["NUMBER_8"] = 8] = "NUMBER_8";
30813
- return HttpMethodEnum2;
30814
- })(HttpMethodEnum || {});
30815
-
30816
- var __create$1 = Object.create;
30817
- var __defProp$1 = Object.defineProperty;
30818
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
30819
- var __getOwnPropNames$1 = Object.getOwnPropertyNames;
30820
- var __getProtoOf$1 = Object.getPrototypeOf;
30821
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
30822
- var __esm$1 = (fn, res) => function __init() {
30823
- return fn && (res = (0, fn[__getOwnPropNames$1(fn)[0]])(fn = 0)), res;
30456
+ var __create = Object.create;
30457
+ var __defProp = Object.defineProperty;
30458
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
30459
+ var __getOwnPropNames = Object.getOwnPropertyNames;
30460
+ var __getProtoOf = Object.getPrototypeOf;
30461
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
30462
+ var __esm = (fn, res) => function __init() {
30463
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
30824
30464
  };
30825
- var __commonJS$1 = (cb, mod) => function __require() {
30826
- return mod || (0, cb[__getOwnPropNames$1(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
30465
+ var __commonJS = (cb, mod) => function __require() {
30466
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
30827
30467
  };
30828
- var __copyProps$1 = (to, from, except, desc) => {
30468
+ var __copyProps = (to, from, except, desc) => {
30829
30469
  if (from && typeof from === "object" || typeof from === "function") {
30830
- for (let key of __getOwnPropNames$1(from))
30831
- if (!__hasOwnProp$1.call(to, key) && key !== except)
30832
- __defProp$1(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc$1(from, key)) || desc.enumerable });
30470
+ for (let key of __getOwnPropNames(from))
30471
+ if (!__hasOwnProp.call(to, key) && key !== except)
30472
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
30833
30473
  }
30834
30474
  return to;
30835
30475
  };
30836
- var __toESM$1 = (mod, isNodeMode, target2) => (target2 = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$1(
30476
+ var __toESM = (mod, isNodeMode, target22) => (target22 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
30837
30477
  // If the importer is in node compatibility mode or this is not an ESM
30838
30478
  // file that has been converted to a CommonJS file using a Babel-
30839
30479
  // compatible transform (i.e. "__esModule" has not been set), then set
30840
30480
  // "default" to the CommonJS "module.exports" for node compatibility.
30841
- __defProp$1(target2, "default", { value: mod, enumerable: true }) ,
30481
+ __defProp(target22, "default", { value: mod, enumerable: true }) ,
30842
30482
  mod
30843
30483
  ));
30844
30484
 
30845
30485
  // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js
30846
- var init_esm_shims$1 = __esm$1({
30847
- "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"() {
30848
- }
30849
- });
30850
-
30851
- // ../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js
30852
- var require_rfdc = __commonJS$1({
30853
- "../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(exports, module) {
30854
- init_esm_shims$1();
30855
- module.exports = rfdc2;
30856
- function copyBuffer(cur) {
30857
- if (cur instanceof Buffer) {
30858
- return Buffer.from(cur);
30859
- }
30860
- return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length);
30861
- }
30862
- function rfdc2(opts) {
30863
- opts = opts || {};
30864
- if (opts.circles) return rfdcCircles(opts);
30865
- const constructorHandlers = /* @__PURE__ */ new Map();
30866
- constructorHandlers.set(Date, (o) => new Date(o));
30867
- constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
30868
- constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
30869
- if (opts.constructorHandlers) {
30870
- for (const handler2 of opts.constructorHandlers) {
30871
- constructorHandlers.set(handler2[0], handler2[1]);
30872
- }
30873
- }
30874
- let handler = null;
30875
- return opts.proto ? cloneProto : clone;
30876
- function cloneArray(a, fn) {
30877
- const keys = Object.keys(a);
30878
- const a2 = new Array(keys.length);
30879
- for (let i = 0; i < keys.length; i++) {
30880
- const k = keys[i];
30881
- const cur = a[k];
30882
- if (typeof cur !== "object" || cur === null) {
30883
- a2[k] = cur;
30884
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
30885
- a2[k] = handler(cur, fn);
30886
- } else if (ArrayBuffer.isView(cur)) {
30887
- a2[k] = copyBuffer(cur);
30888
- } else {
30889
- a2[k] = fn(cur);
30890
- }
30891
- }
30892
- return a2;
30893
- }
30894
- function clone(o) {
30895
- if (typeof o !== "object" || o === null) return o;
30896
- if (Array.isArray(o)) return cloneArray(o, clone);
30897
- if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
30898
- return handler(o, clone);
30899
- }
30900
- const o2 = {};
30901
- for (const k in o) {
30902
- if (Object.hasOwnProperty.call(o, k) === false) continue;
30903
- const cur = o[k];
30904
- if (typeof cur !== "object" || cur === null) {
30905
- o2[k] = cur;
30906
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
30907
- o2[k] = handler(cur, clone);
30908
- } else if (ArrayBuffer.isView(cur)) {
30909
- o2[k] = copyBuffer(cur);
30910
- } else {
30911
- o2[k] = clone(cur);
30912
- }
30913
- }
30914
- return o2;
30915
- }
30916
- function cloneProto(o) {
30917
- if (typeof o !== "object" || o === null) return o;
30918
- if (Array.isArray(o)) return cloneArray(o, cloneProto);
30919
- if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
30920
- return handler(o, cloneProto);
30921
- }
30922
- const o2 = {};
30923
- for (const k in o) {
30924
- const cur = o[k];
30925
- if (typeof cur !== "object" || cur === null) {
30926
- o2[k] = cur;
30927
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
30928
- o2[k] = handler(cur, cloneProto);
30929
- } else if (ArrayBuffer.isView(cur)) {
30930
- o2[k] = copyBuffer(cur);
30931
- } else {
30932
- o2[k] = cloneProto(cur);
30933
- }
30934
- }
30935
- return o2;
30936
- }
30937
- }
30938
- function rfdcCircles(opts) {
30939
- const refs = [];
30940
- const refsNew = [];
30941
- const constructorHandlers = /* @__PURE__ */ new Map();
30942
- constructorHandlers.set(Date, (o) => new Date(o));
30943
- constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
30944
- constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
30945
- if (opts.constructorHandlers) {
30946
- for (const handler2 of opts.constructorHandlers) {
30947
- constructorHandlers.set(handler2[0], handler2[1]);
30948
- }
30949
- }
30950
- let handler = null;
30951
- return opts.proto ? cloneProto : clone;
30952
- function cloneArray(a, fn) {
30953
- const keys = Object.keys(a);
30954
- const a2 = new Array(keys.length);
30955
- for (let i = 0; i < keys.length; i++) {
30956
- const k = keys[i];
30957
- const cur = a[k];
30958
- if (typeof cur !== "object" || cur === null) {
30959
- a2[k] = cur;
30960
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
30961
- a2[k] = handler(cur, fn);
30962
- } else if (ArrayBuffer.isView(cur)) {
30963
- a2[k] = copyBuffer(cur);
30964
- } else {
30965
- const index = refs.indexOf(cur);
30966
- if (index !== -1) {
30967
- a2[k] = refsNew[index];
30968
- } else {
30969
- a2[k] = fn(cur);
30970
- }
30971
- }
30972
- }
30973
- return a2;
30974
- }
30975
- function clone(o) {
30976
- if (typeof o !== "object" || o === null) return o;
30977
- if (Array.isArray(o)) return cloneArray(o, clone);
30978
- if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
30979
- return handler(o, clone);
30980
- }
30981
- const o2 = {};
30982
- refs.push(o);
30983
- refsNew.push(o2);
30984
- for (const k in o) {
30985
- if (Object.hasOwnProperty.call(o, k) === false) continue;
30986
- const cur = o[k];
30987
- if (typeof cur !== "object" || cur === null) {
30988
- o2[k] = cur;
30989
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
30990
- o2[k] = handler(cur, clone);
30991
- } else if (ArrayBuffer.isView(cur)) {
30992
- o2[k] = copyBuffer(cur);
30993
- } else {
30994
- const i = refs.indexOf(cur);
30995
- if (i !== -1) {
30996
- o2[k] = refsNew[i];
30997
- } else {
30998
- o2[k] = clone(cur);
30999
- }
31000
- }
31001
- }
31002
- refs.pop();
31003
- refsNew.pop();
31004
- return o2;
31005
- }
31006
- function cloneProto(o) {
31007
- if (typeof o !== "object" || o === null) return o;
31008
- if (Array.isArray(o)) return cloneArray(o, cloneProto);
31009
- if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
31010
- return handler(o, cloneProto);
31011
- }
31012
- const o2 = {};
31013
- refs.push(o);
31014
- refsNew.push(o2);
31015
- for (const k in o) {
31016
- const cur = o[k];
31017
- if (typeof cur !== "object" || cur === null) {
31018
- o2[k] = cur;
31019
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
31020
- o2[k] = handler(cur, cloneProto);
31021
- } else if (ArrayBuffer.isView(cur)) {
31022
- o2[k] = copyBuffer(cur);
31023
- } else {
31024
- const i = refs.indexOf(cur);
31025
- if (i !== -1) {
31026
- o2[k] = refsNew[i];
31027
- } else {
31028
- o2[k] = cloneProto(cur);
31029
- }
31030
- }
31031
- }
31032
- refs.pop();
31033
- refsNew.pop();
31034
- return o2;
31035
- }
31036
- }
31037
- }
31038
- });
31039
-
31040
- // src/index.ts
31041
- init_esm_shims$1();
31042
-
31043
- // src/constants.ts
31044
- init_esm_shims$1();
31045
-
31046
- // src/env.ts
31047
- init_esm_shims$1();
31048
- var isBrowser = typeof navigator !== "undefined";
31049
- var target = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : typeof global !== "undefined" ? global : {};
31050
- typeof target.chrome !== "undefined" && !!target.chrome.devtools;
31051
- isBrowser && target.self !== target.top;
31052
- var _a$1;
31053
- typeof navigator !== "undefined" && ((_a$1 = navigator.userAgent) == null ? void 0 : _a$1.toLowerCase().includes("electron"));
31054
-
31055
- // src/general.ts
31056
- init_esm_shims$1();
31057
- var import_rfdc = __toESM$1(require_rfdc());
31058
- var classifyRE = /(?:^|[-_/])(\w)/g;
31059
- function toUpper(_, c) {
31060
- return c ? c.toUpperCase() : "";
31061
- }
31062
- function classify(str) {
31063
- return str && `${str}`.replace(classifyRE, toUpper);
31064
- }
31065
- function basename(filename, ext) {
31066
- let normalizedFilename = filename.replace(/^[a-z]:/i, "").replace(/\\/g, "/");
31067
- if (normalizedFilename.endsWith(`index${ext}`)) {
31068
- normalizedFilename = normalizedFilename.replace(`/index${ext}`, ext);
31069
- }
31070
- const lastSlashIndex = normalizedFilename.lastIndexOf("/");
31071
- const baseNameWithExt = normalizedFilename.substring(lastSlashIndex + 1);
31072
- {
31073
- const extIndex = baseNameWithExt.lastIndexOf(ext);
31074
- return baseNameWithExt.substring(0, extIndex);
31075
- }
31076
- }
31077
- var deepClone = (0, import_rfdc.default)({ circles: true });
31078
-
31079
- const DEBOUNCE_DEFAULTS = {
31080
- trailing: true
31081
- };
31082
- function debounce(fn, wait = 25, options = {}) {
31083
- options = { ...DEBOUNCE_DEFAULTS, ...options };
31084
- if (!Number.isFinite(wait)) {
31085
- throw new TypeError("Expected `wait` to be a finite number");
31086
- }
31087
- let leadingValue;
31088
- let timeout;
31089
- let resolveList = [];
31090
- let currentPromise;
31091
- let trailingArgs;
31092
- const applyFn = (_this, args) => {
31093
- currentPromise = _applyPromised(fn, _this, args);
31094
- currentPromise.finally(() => {
31095
- currentPromise = null;
31096
- if (options.trailing && trailingArgs && !timeout) {
31097
- const promise = applyFn(_this, trailingArgs);
31098
- trailingArgs = null;
31099
- return promise;
31100
- }
31101
- });
31102
- return currentPromise;
31103
- };
31104
- return function(...args) {
31105
- if (currentPromise) {
31106
- if (options.trailing) {
31107
- trailingArgs = args;
31108
- }
31109
- return currentPromise;
31110
- }
31111
- return new Promise((resolve) => {
31112
- const shouldCallNow = !timeout && options.leading;
31113
- clearTimeout(timeout);
31114
- timeout = setTimeout(() => {
31115
- timeout = null;
31116
- const promise = options.leading ? leadingValue : applyFn(this, args);
31117
- for (const _resolve of resolveList) {
31118
- _resolve(promise);
31119
- }
31120
- resolveList = [];
31121
- }, wait);
31122
- if (shouldCallNow) {
31123
- leadingValue = applyFn(this, args);
31124
- resolve(leadingValue);
31125
- } else {
31126
- resolveList.push(resolve);
31127
- }
31128
- });
31129
- };
31130
- }
31131
- async function _applyPromised(fn, _this, args) {
31132
- return await fn.apply(_this, args);
31133
- }
31134
-
31135
- function flatHooks(configHooks, hooks = {}, parentName) {
31136
- for (const key in configHooks) {
31137
- const subHook = configHooks[key];
31138
- const name = parentName ? `${parentName}:${key}` : key;
31139
- if (typeof subHook === "object" && subHook !== null) {
31140
- flatHooks(subHook, hooks, name);
31141
- } else if (typeof subHook === "function") {
31142
- hooks[name] = subHook;
31143
- }
31144
- }
31145
- return hooks;
31146
- }
31147
- const defaultTask = { run: (function_) => function_() };
31148
- const _createTask = () => defaultTask;
31149
- const createTask = typeof console.createTask !== "undefined" ? console.createTask : _createTask;
31150
- function serialTaskCaller(hooks, args) {
31151
- const name = args.shift();
31152
- const task = createTask(name);
31153
- return hooks.reduce(
31154
- (promise, hookFunction) => promise.then(() => task.run(() => hookFunction(...args))),
31155
- Promise.resolve()
31156
- );
31157
- }
31158
- function parallelTaskCaller(hooks, args) {
31159
- const name = args.shift();
31160
- const task = createTask(name);
31161
- return Promise.all(hooks.map((hook) => task.run(() => hook(...args))));
31162
- }
31163
- function callEachWith(callbacks, arg0) {
31164
- for (const callback of [...callbacks]) {
31165
- callback(arg0);
31166
- }
31167
- }
31168
-
31169
- class Hookable {
31170
- constructor() {
31171
- this._hooks = {};
31172
- this._before = void 0;
31173
- this._after = void 0;
31174
- this._deprecatedMessages = void 0;
31175
- this._deprecatedHooks = {};
31176
- this.hook = this.hook.bind(this);
31177
- this.callHook = this.callHook.bind(this);
31178
- this.callHookWith = this.callHookWith.bind(this);
31179
- }
31180
- hook(name, function_, options = {}) {
31181
- if (!name || typeof function_ !== "function") {
31182
- return () => {
31183
- };
31184
- }
31185
- const originalName = name;
31186
- let dep;
31187
- while (this._deprecatedHooks[name]) {
31188
- dep = this._deprecatedHooks[name];
31189
- name = dep.to;
31190
- }
31191
- if (dep && !options.allowDeprecated) {
31192
- let message = dep.message;
31193
- if (!message) {
31194
- message = `${originalName} hook has been deprecated` + (dep.to ? `, please use ${dep.to}` : "");
31195
- }
31196
- if (!this._deprecatedMessages) {
31197
- this._deprecatedMessages = /* @__PURE__ */ new Set();
31198
- }
31199
- if (!this._deprecatedMessages.has(message)) {
31200
- console.warn(message);
31201
- this._deprecatedMessages.add(message);
31202
- }
31203
- }
31204
- if (!function_.name) {
31205
- try {
31206
- Object.defineProperty(function_, "name", {
31207
- get: () => "_" + name.replace(/\W+/g, "_") + "_hook_cb",
31208
- configurable: true
31209
- });
31210
- } catch {
31211
- }
31212
- }
31213
- this._hooks[name] = this._hooks[name] || [];
31214
- this._hooks[name].push(function_);
31215
- return () => {
31216
- if (function_) {
31217
- this.removeHook(name, function_);
31218
- function_ = void 0;
31219
- }
31220
- };
31221
- }
31222
- hookOnce(name, function_) {
31223
- let _unreg;
31224
- let _function = (...arguments_) => {
31225
- if (typeof _unreg === "function") {
31226
- _unreg();
31227
- }
31228
- _unreg = void 0;
31229
- _function = void 0;
31230
- return function_(...arguments_);
31231
- };
31232
- _unreg = this.hook(name, _function);
31233
- return _unreg;
31234
- }
31235
- removeHook(name, function_) {
31236
- if (this._hooks[name]) {
31237
- const index = this._hooks[name].indexOf(function_);
31238
- if (index !== -1) {
31239
- this._hooks[name].splice(index, 1);
31240
- }
31241
- if (this._hooks[name].length === 0) {
31242
- delete this._hooks[name];
31243
- }
31244
- }
31245
- }
31246
- deprecateHook(name, deprecated) {
31247
- this._deprecatedHooks[name] = typeof deprecated === "string" ? { to: deprecated } : deprecated;
31248
- const _hooks = this._hooks[name] || [];
31249
- delete this._hooks[name];
31250
- for (const hook of _hooks) {
31251
- this.hook(name, hook);
31252
- }
31253
- }
31254
- deprecateHooks(deprecatedHooks) {
31255
- Object.assign(this._deprecatedHooks, deprecatedHooks);
31256
- for (const name in deprecatedHooks) {
31257
- this.deprecateHook(name, deprecatedHooks[name]);
31258
- }
31259
- }
31260
- addHooks(configHooks) {
31261
- const hooks = flatHooks(configHooks);
31262
- const removeFns = Object.keys(hooks).map(
31263
- (key) => this.hook(key, hooks[key])
31264
- );
31265
- return () => {
31266
- for (const unreg of removeFns.splice(0, removeFns.length)) {
31267
- unreg();
31268
- }
31269
- };
31270
- }
31271
- removeHooks(configHooks) {
31272
- const hooks = flatHooks(configHooks);
31273
- for (const key in hooks) {
31274
- this.removeHook(key, hooks[key]);
31275
- }
31276
- }
31277
- removeAllHooks() {
31278
- for (const key in this._hooks) {
31279
- delete this._hooks[key];
31280
- }
31281
- }
31282
- callHook(name, ...arguments_) {
31283
- arguments_.unshift(name);
31284
- return this.callHookWith(serialTaskCaller, name, ...arguments_);
31285
- }
31286
- callHookParallel(name, ...arguments_) {
31287
- arguments_.unshift(name);
31288
- return this.callHookWith(parallelTaskCaller, name, ...arguments_);
31289
- }
31290
- callHookWith(caller, name, ...arguments_) {
31291
- const event = this._before || this._after ? { name, args: arguments_, context: {} } : void 0;
31292
- if (this._before) {
31293
- callEachWith(this._before, event);
31294
- }
31295
- const result = caller(
31296
- name in this._hooks ? [...this._hooks[name]] : [],
31297
- arguments_
31298
- );
31299
- if (result instanceof Promise) {
31300
- return result.finally(() => {
31301
- if (this._after && event) {
31302
- callEachWith(this._after, event);
31303
- }
31304
- });
31305
- }
31306
- if (this._after && event) {
31307
- callEachWith(this._after, event);
31308
- }
31309
- return result;
31310
- }
31311
- beforeEach(function_) {
31312
- this._before = this._before || [];
31313
- this._before.push(function_);
31314
- return () => {
31315
- if (this._before !== void 0) {
31316
- const index = this._before.indexOf(function_);
31317
- if (index !== -1) {
31318
- this._before.splice(index, 1);
31319
- }
31320
- }
31321
- };
31322
- }
31323
- afterEach(function_) {
31324
- this._after = this._after || [];
31325
- this._after.push(function_);
31326
- return () => {
31327
- if (this._after !== void 0) {
31328
- const index = this._after.indexOf(function_);
31329
- if (index !== -1) {
31330
- this._after.splice(index, 1);
31331
- }
31332
- }
31333
- };
31334
- }
31335
- }
31336
- function createHooks() {
31337
- return new Hookable();
31338
- }
31339
-
31340
- var __create = Object.create;
31341
- var __defProp = Object.defineProperty;
31342
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
31343
- var __getOwnPropNames = Object.getOwnPropertyNames;
31344
- var __getProtoOf = Object.getPrototypeOf;
31345
- var __hasOwnProp = Object.prototype.hasOwnProperty;
31346
- var __esm = (fn, res) => function __init() {
31347
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
31348
- };
31349
- var __commonJS = (cb, mod) => function __require() {
31350
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
31351
- };
31352
- var __copyProps = (to, from, except, desc) => {
31353
- if (from && typeof from === "object" || typeof from === "function") {
31354
- for (let key of __getOwnPropNames(from))
31355
- if (!__hasOwnProp.call(to, key) && key !== except)
31356
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
31357
- }
31358
- return to;
31359
- };
31360
- var __toESM = (mod, isNodeMode, target22) => (target22 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
31361
- // If the importer is in node compatibility mode or this is not an ESM
31362
- // file that has been converted to a CommonJS file using a Babel-
31363
- // compatible transform (i.e. "__esModule" has not been set), then set
31364
- // "default" to the CommonJS "module.exports" for node compatibility.
31365
- __defProp(target22, "default", { value: mod, enumerable: true }) ,
31366
- mod
31367
- ));
31368
-
31369
- // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js
31370
- var init_esm_shims = __esm({
30486
+ var init_esm_shims = __esm({
31371
30487
  "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"() {
31372
30488
  }
31373
30489
  });
@@ -36992,6 +36108,927 @@
36992
36108
  return useStore;
36993
36109
  }
36994
36110
 
36111
+ const usefminputdropdownstore = defineStore("fminputdropdownstore", () => {
36112
+ const state = vue.reactive({
36113
+ optionsData: {}
36114
+ });
36115
+ const getOptionsData = async (apiService, apiAction, basecode, reload = false) => {
36116
+ if (!reload) {
36117
+ if (state.optionsData[basecode] && state.optionsData[basecode].length > 0) {
36118
+ return state.optionsData[basecode];
36119
+ }
36120
+ }
36121
+ const res = await useBaseApi(apiService).get(null, apiAction + "/?codetype=" + basecode);
36122
+ return state.optionsData[basecode] = res.data.result ?? [];
36123
+ };
36124
+ return {
36125
+ state,
36126
+ getOptionsData
36127
+ };
36128
+ });
36129
+
36130
+ var _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
36131
+ ...{
36132
+ name: "Fminputdropdown"
36133
+ },
36134
+ __name: "index",
36135
+ props: /* @__PURE__ */ vue.mergeModels({
36136
+ //数据
36137
+ optionData: {
36138
+ type: Array,
36139
+ default: []
36140
+ },
36141
+ /**
36142
+ * 值的属性值
36143
+ */
36144
+ bvalue: {
36145
+ type: String,
36146
+ default: "id"
36147
+ },
36148
+ /**
36149
+ * 值的属性标签
36150
+ */
36151
+ blabel: {
36152
+ type: String,
36153
+ default: "name"
36154
+ },
36155
+ placeholder: {
36156
+ type: String,
36157
+ default: "\u8BF7\u9009\u62E9"
36158
+ },
36159
+ inputWidth: {
36160
+ type: String,
36161
+ default: "40%"
36162
+ },
36163
+ dropWidth: {
36164
+ type: String,
36165
+ default: "90px"
36166
+ },
36167
+ /**
36168
+ * api service name
36169
+ */
36170
+ apiService: {
36171
+ type: String,
36172
+ default: "baseData"
36173
+ },
36174
+ /**
36175
+ * api service 下的方法
36176
+ */
36177
+ apiAction: {
36178
+ type: String,
36179
+ default: "baseDataList"
36180
+ },
36181
+ /**
36182
+ * 基础编码 自动获取数据
36183
+ */
36184
+ basecode: {
36185
+ type: String,
36186
+ default: ""
36187
+ }
36188
+ }, {
36189
+ "id": {
36190
+ type: Number,
36191
+ default: 0
36192
+ },
36193
+ "idModifiers": {},
36194
+ "name": {
36195
+ type: String,
36196
+ default: ""
36197
+ },
36198
+ "nameModifiers": {}
36199
+ }),
36200
+ emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:id", "update:name"]),
36201
+ setup(__props, { emit: __emit }) {
36202
+ const modeValueId = vue.useModel(__props, "id");
36203
+ const modeValueName = vue.useModel(__props, "name");
36204
+ const props = __props;
36205
+ const useBaseApi = usefminputdropdownstore();
36206
+ const state = vue.reactive({
36207
+ optionData: props.optionData
36208
+ });
36209
+ const emit = __emit;
36210
+ const handCommand = (command) => {
36211
+ const fitem = state.optionData.find((item) => item[props.bvalue] === command);
36212
+ modeValueId.value = fitem != null ? [props.bvalue] : 0;
36213
+ modeValueName.value = fitem != null ? fitem[props.blabel] : "";
36214
+ emit("change", fitem);
36215
+ };
36216
+ vue.onMounted(async () => {
36217
+ state.optionData = props.optionData;
36218
+ if (props.basecode && props.basecode != "") {
36219
+ const res = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode);
36220
+ state.optionData = res.data.result ?? [];
36221
+ }
36222
+ });
36223
+ const handRestdata = async () => {
36224
+ if (props.basecode && props.basecode != "") {
36225
+ const res = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true);
36226
+ state.optionData = res.data.result ?? [];
36227
+ }
36228
+ };
36229
+ return (_ctx, _cache) => {
36230
+ const _component_el_icon = vue.resolveComponent("el-icon");
36231
+ const _component_el_input = vue.resolveComponent("el-input");
36232
+ const _component_el_dropdown_item = vue.resolveComponent("el-dropdown-item");
36233
+ const _component_el_dropdown_menu = vue.resolveComponent("el-dropdown-menu");
36234
+ const _component_el_dropdown = vue.resolveComponent("el-dropdown");
36235
+ return vue.openBlock(), vue.createBlock(_component_el_dropdown, {
36236
+ class: "fminputdropdown",
36237
+ placement: "bottom",
36238
+ trigger: "click",
36239
+ style: { "width": "100%" },
36240
+ onCommand: handCommand
36241
+ }, {
36242
+ dropdown: vue.withCtx(() => [
36243
+ vue.createVNode(_component_el_dropdown_menu, {
36244
+ style: vue.normalizeStyle({ width: __props.dropWidth })
36245
+ }, {
36246
+ default: vue.withCtx(() => [
36247
+ (vue.openBlock(true), vue.createElementBlock(
36248
+ vue.Fragment,
36249
+ null,
36250
+ vue.renderList(state.optionData, (item, index) => {
36251
+ return vue.openBlock(), vue.createBlock(_component_el_dropdown_item, {
36252
+ key: index,
36253
+ command: item[__props.bvalue],
36254
+ divided: ""
36255
+ }, {
36256
+ default: vue.withCtx(() => [
36257
+ vue.createTextVNode(
36258
+ vue.toDisplayString(item[__props.blabel]),
36259
+ 1
36260
+ /* TEXT */
36261
+ )
36262
+ ]),
36263
+ _: 2
36264
+ /* DYNAMIC */
36265
+ }, 1032, ["command"]);
36266
+ }),
36267
+ 128
36268
+ /* KEYED_FRAGMENT */
36269
+ ))
36270
+ ]),
36271
+ _: 1
36272
+ /* STABLE */
36273
+ }, 8, ["style"])
36274
+ ]),
36275
+ default: vue.withCtx(() => [
36276
+ vue.createVNode(_component_el_input, {
36277
+ modelValue: modeValueName.value,
36278
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modeValueName.value = $event),
36279
+ placeholder: props.placeholder,
36280
+ style: vue.normalizeStyle({ width: __props.inputWidth })
36281
+ }, {
36282
+ append: vue.withCtx(() => [
36283
+ vue.createVNode(_component_el_icon, {
36284
+ color: "#13c2c2",
36285
+ onClick: handRestdata
36286
+ }, {
36287
+ default: vue.withCtx(() => [
36288
+ vue.createVNode(vue.unref(refresh_left_default))
36289
+ ]),
36290
+ _: 1
36291
+ /* STABLE */
36292
+ })
36293
+ ]),
36294
+ _: 1
36295
+ /* STABLE */
36296
+ }, 8, ["modelValue", "placeholder", "style"])
36297
+ ]),
36298
+ _: 1
36299
+ /* STABLE */
36300
+ });
36301
+ };
36302
+ }
36303
+ });
36304
+
36305
+ const _hoisted_1$1 = { style: { "padding": "5px" } };
36306
+ const _hoisted_2 = { style: { "display": "flex", "align-items": "center", "gap": "8px", "flex-wrap": "nowrap", "overflow": "hidden" } };
36307
+ const _hoisted_3 = { style: { "flex": "1 1 200px", "min-width": "0", "overflow": "hidden" } };
36308
+ const _hoisted_4 = { style: { "display": "flex", "align-items": "center", "flex-shrink": "0", "white-space": "nowrap" } };
36309
+ const _hoisted_5 = { style: { "margin-bottom": "45px" } };
36310
+ var _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
36311
+ ...{
36312
+ name: "FmTree"
36313
+ },
36314
+ __name: "index",
36315
+ props: {
36316
+ checkStrictly: { type: Boolean, default: true },
36317
+ /**
36318
+ * api service name
36319
+ */
36320
+ apiService: {
36321
+ type: String,
36322
+ default: "planOrder"
36323
+ },
36324
+ /**
36325
+ * api service 下的方法
36326
+ */
36327
+ apiAction: {
36328
+ type: String,
36329
+ default: "autoQuerySearch"
36330
+ },
36331
+ paras: {
36332
+ type: Object,
36333
+ default: null
36334
+ },
36335
+ nodeKey: {
36336
+ type: String,
36337
+ default: "id"
36338
+ },
36339
+ defaultProps: {
36340
+ type: Object,
36341
+ default: { children: "children", label: "name" }
36342
+ }
36343
+ },
36344
+ emits: ["node-click"],
36345
+ setup(__props, { expose: __expose, emit: __emit }) {
36346
+ const props = __props;
36347
+ const filterText = vue.ref("");
36348
+ const treeRef = vue.ref();
36349
+ const state = vue.reactive({
36350
+ loading: false,
36351
+ folderData: [],
36352
+ isShowCheckbox: false,
36353
+ strictly: false
36354
+ });
36355
+ vue.onMounted(async () => {
36356
+ await fetchTreeData();
36357
+ });
36358
+ vue.watch(filterText, (val) => {
36359
+ treeRef.value.filter(val);
36360
+ });
36361
+ const fetchTreeData = async (showLoading = true) => {
36362
+ if (showLoading) state.loading = true;
36363
+ var res = await useBaseApi(props.apiService).get(props.paras, props.apiAction);
36364
+ state.folderData = res.data.result ?? [];
36365
+ if (showLoading) state.loading = false;
36366
+ return res.data.result ?? [];
36367
+ };
36368
+ const getCheckedKeys = () => {
36369
+ return treeRef.value.getCheckedKeys();
36370
+ };
36371
+ const filterNode = (value, data) => {
36372
+ if (!value) return true;
36373
+ return data.name.includes(value);
36374
+ };
36375
+ const handleCommand = async (command) => {
36376
+ if ("expandAll" == command) {
36377
+ for (let i = 0; i < treeRef.value.store._getAllNodes().length; i++) {
36378
+ treeRef.value.store._getAllNodes()[i].expanded = true;
36379
+ }
36380
+ } else if ("collapseAll" == command) {
36381
+ for (let i = 0; i < treeRef.value.store._getAllNodes().length; i++) {
36382
+ treeRef.value.store._getAllNodes()[i].expanded = false;
36383
+ }
36384
+ } else if ("refresh" == command) {
36385
+ fetchTreeData();
36386
+ } else if ("rootNode" == command) {
36387
+ treeRef.value?.setCurrentKey();
36388
+ emit("node-click", { id: 0, name: "" });
36389
+ }
36390
+ };
36391
+ const emit = __emit;
36392
+ const nodeClick = (node) => {
36393
+ emit("node-click", { id: node.id, name: node.name });
36394
+ };
36395
+ const setCurrentKey = (key, shouldAutoExpandParent) => {
36396
+ treeRef.value?.setCurrentKey(key, shouldAutoExpandParent);
36397
+ };
36398
+ __expose({ fetchTreeData, getCheckedKeys, setCurrentKey });
36399
+ return (_ctx, _cache) => {
36400
+ const _component_el_input = vue.resolveComponent("el-input");
36401
+ const _component_el_checkbox = vue.resolveComponent("el-checkbox");
36402
+ const _component_el_icon = vue.resolveComponent("el-icon");
36403
+ const _component_el_button = vue.resolveComponent("el-button");
36404
+ const _component_el_dropdown_item = vue.resolveComponent("el-dropdown-item");
36405
+ const _component_el_dropdown_menu = vue.resolveComponent("el-dropdown-menu");
36406
+ const _component_el_dropdown = vue.resolveComponent("el-dropdown");
36407
+ const _component_el_tree = vue.resolveComponent("el-tree");
36408
+ const _component_el_scrollbar = vue.resolveComponent("el-scrollbar");
36409
+ const _component_el_card = vue.resolveComponent("el-card");
36410
+ const _directive_loading = vue.resolveDirective("loading");
36411
+ return vue.openBlock(), vue.createBlock(_component_el_card, {
36412
+ shadow: "hover",
36413
+ "body-style": "height:100%;overflow:auto;padding:5px;width:100%;",
36414
+ style: { "height": "100%" }
36415
+ }, {
36416
+ header: vue.withCtx(() => [
36417
+ vue.createElementVNode("div", _hoisted_1$1, [
36418
+ vue.createElementVNode("div", _hoisted_2, [
36419
+ vue.createElementVNode("div", _hoisted_3, [
36420
+ vue.createVNode(_component_el_input, {
36421
+ "prefix-icon": vue.unref(search_default),
36422
+ modelValue: filterText.value,
36423
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filterText.value = $event),
36424
+ modelModifiers: { lazy: true },
36425
+ clearable: "",
36426
+ placeholder: "\u7C7B\u578B\u540D\u79F0"
36427
+ }, null, 8, ["prefix-icon", "modelValue"])
36428
+ ]),
36429
+ vue.createElementVNode("div", _hoisted_4, [
36430
+ !props.checkStrictly && state.isShowCheckbox ? (vue.openBlock(), vue.createBlock(_component_el_checkbox, {
36431
+ key: 0,
36432
+ modelValue: state.strictly,
36433
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => state.strictly = $event),
36434
+ label: "\u8054\u52A8",
36435
+ style: { "margin-left": "8px" },
36436
+ border: ""
36437
+ }, null, 8, ["modelValue"])) : vue.createCommentVNode("v-if", true),
36438
+ vue.createVNode(_component_el_dropdown, { onCommand: handleCommand }, {
36439
+ dropdown: vue.withCtx(() => [
36440
+ vue.createVNode(_component_el_dropdown_menu, null, {
36441
+ default: vue.withCtx(() => [
36442
+ vue.createVNode(_component_el_dropdown_item, { command: "expandAll" }, {
36443
+ default: vue.withCtx(() => _cache[2] || (_cache[2] = [
36444
+ vue.createTextVNode("\u5168\u90E8\u5C55\u5F00")
36445
+ ])),
36446
+ _: 1,
36447
+ __: [2]
36448
+ }),
36449
+ vue.createVNode(_component_el_dropdown_item, { command: "collapseAll" }, {
36450
+ default: vue.withCtx(() => _cache[3] || (_cache[3] = [
36451
+ vue.createTextVNode("\u5168\u90E8\u6298\u53E0")
36452
+ ])),
36453
+ _: 1,
36454
+ __: [3]
36455
+ }),
36456
+ vue.createVNode(_component_el_dropdown_item, { command: "rootNode" }, {
36457
+ default: vue.withCtx(() => _cache[4] || (_cache[4] = [
36458
+ vue.createTextVNode("\u6839\u8282\u70B9")
36459
+ ])),
36460
+ _: 1,
36461
+ __: [4]
36462
+ }),
36463
+ vue.createVNode(_component_el_dropdown_item, { command: "refresh" }, {
36464
+ default: vue.withCtx(() => _cache[5] || (_cache[5] = [
36465
+ vue.createTextVNode("\u5237\u65B0")
36466
+ ])),
36467
+ _: 1,
36468
+ __: [5]
36469
+ })
36470
+ ]),
36471
+ _: 1
36472
+ /* STABLE */
36473
+ })
36474
+ ]),
36475
+ default: vue.withCtx(() => [
36476
+ vue.createVNode(_component_el_button, { style: { "margin-left": "8px", "width": "34px" } }, {
36477
+ default: vue.withCtx(() => [
36478
+ vue.createVNode(_component_el_icon, { class: "el-icon--center" }, {
36479
+ default: vue.withCtx(() => [
36480
+ vue.createVNode(vue.unref(more_filled_default))
36481
+ ]),
36482
+ _: 1
36483
+ /* STABLE */
36484
+ })
36485
+ ]),
36486
+ _: 1
36487
+ /* STABLE */
36488
+ })
36489
+ ]),
36490
+ _: 1
36491
+ /* STABLE */
36492
+ })
36493
+ ])
36494
+ ])
36495
+ ])
36496
+ ]),
36497
+ default: vue.withCtx(() => [
36498
+ vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
36499
+ vue.createVNode(_component_el_scrollbar, null, {
36500
+ default: vue.withCtx(() => [
36501
+ vue.createVNode(_component_el_tree, {
36502
+ ref_key: "treeRef",
36503
+ ref: treeRef,
36504
+ class: "filter-tree",
36505
+ data: state.folderData,
36506
+ "node-key": __props.nodeKey,
36507
+ props: __props.defaultProps,
36508
+ "filter-node-method": filterNode,
36509
+ onNodeClick: nodeClick,
36510
+ "show-checkbox": state.isShowCheckbox,
36511
+ "default-expand-all": "",
36512
+ "highlight-current": "",
36513
+ "check-strictly": !state.strictly
36514
+ }, {
36515
+ default: vue.withCtx(({ node }) => [
36516
+ vue.createCommentVNode(' <el-icon v-if="node.level < 4" size="16" style="margin-right: 3px; display: inline; vertical-align: middle"><ele-FolderOpened /></el-icon>\r\n <el-icon v-else size="16" style="margin-right: 3px; display: inline; vertical-align: middle"><ele-Folder /></el-icon> '),
36517
+ vue.createTextVNode(
36518
+ " " + vue.toDisplayString(node.label),
36519
+ 1
36520
+ /* TEXT */
36521
+ )
36522
+ ]),
36523
+ _: 1
36524
+ /* STABLE */
36525
+ }, 8, ["data", "node-key", "props", "show-checkbox", "check-strictly"])
36526
+ ]),
36527
+ _: 1
36528
+ /* STABLE */
36529
+ })
36530
+ ])), [
36531
+ [_directive_loading, state.loading]
36532
+ ])
36533
+ ]),
36534
+ _: 1
36535
+ /* STABLE */
36536
+ });
36537
+ };
36538
+ }
36539
+ });
36540
+
36541
+ const _hoisted_1 = ["src"];
36542
+ var _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
36543
+ ...{
36544
+ name: "svgIcon"
36545
+ },
36546
+ __name: "svgicon",
36547
+ props: {
36548
+ // svg 图标组件名字
36549
+ name: {
36550
+ type: String
36551
+ },
36552
+ // svg 大小
36553
+ size: {
36554
+ type: Number,
36555
+ default: () => 14
36556
+ },
36557
+ // svg 颜色
36558
+ color: {
36559
+ type: String
36560
+ }
36561
+ },
36562
+ setup(__props) {
36563
+ const props = __props;
36564
+ const linesString = ["https", "http", "/src", "/assets", "data:image", window.__env__.VITE_PUBLIC_PATH];
36565
+ const getIconName = vue.computed(() => {
36566
+ return props?.name;
36567
+ });
36568
+ const isShowIconSvg = vue.computed(() => {
36569
+ return props?.name?.startsWith("ele-");
36570
+ });
36571
+ const isShowIconImg = vue.computed(() => {
36572
+ return linesString.find((str) => props.name?.startsWith(str));
36573
+ });
36574
+ const setIconSvgStyle = vue.computed(() => {
36575
+ return `font-size: ${props.size}px;color: ${props.color};`;
36576
+ });
36577
+ const setIconImgOutStyle = vue.computed(() => {
36578
+ return `width: ${props.size}px;height: ${props.size}px;display: inline-block;overflow: hidden;`;
36579
+ });
36580
+ const setIconSvgInsStyle = vue.computed(() => {
36581
+ const filterStyle = [];
36582
+ const compatibles = ["-webkit", "-ms", "-o", "-moz"];
36583
+ compatibles.forEach((j) => filterStyle.push(`${j}-filter: drop-shadow(${props.color} ${props.size}px 0);`));
36584
+ return `width: ${props.size}px;height: ${props.size}px;position: relative;left: -${props.size}px;${filterStyle.join("")}`;
36585
+ });
36586
+ return (_ctx, _cache) => {
36587
+ return isShowIconSvg.value ? (vue.openBlock(), vue.createElementBlock(
36588
+ "i",
36589
+ {
36590
+ key: 0,
36591
+ class: "el-icon",
36592
+ style: vue.normalizeStyle(setIconSvgStyle.value)
36593
+ },
36594
+ [
36595
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getIconName.value)))
36596
+ ],
36597
+ 4
36598
+ /* STYLE */
36599
+ )) : isShowIconImg.value ? (vue.openBlock(), vue.createElementBlock(
36600
+ "div",
36601
+ {
36602
+ key: 1,
36603
+ style: vue.normalizeStyle(setIconImgOutStyle.value)
36604
+ },
36605
+ [
36606
+ vue.createElementVNode("img", {
36607
+ src: getIconName.value,
36608
+ style: vue.normalizeStyle(setIconSvgInsStyle.value)
36609
+ }, null, 12, _hoisted_1)
36610
+ ],
36611
+ 4
36612
+ /* STYLE */
36613
+ )) : (vue.openBlock(), vue.createElementBlock(
36614
+ "i",
36615
+ {
36616
+ key: 2,
36617
+ class: vue.normalizeClass(getIconName.value),
36618
+ style: vue.normalizeStyle(setIconSvgStyle.value)
36619
+ },
36620
+ null,
36621
+ 6
36622
+ /* CLASS, STYLE */
36623
+ ));
36624
+ };
36625
+ }
36626
+ });
36627
+
36628
+ function elSvg(app) {
36629
+ const icons = svg;
36630
+ for (const i in icons) {
36631
+ if (!app._context.components[`ele-${icons[i].name}`]) {
36632
+ app.component(`ele-${icons[i].name}`, icons[i]);
36633
+ }
36634
+ }
36635
+ if (!app._context.components[`SvgIcon`]) {
36636
+ app.component("SvgIcon", _sfc_main$1);
36637
+ }
36638
+ }
36639
+
36640
+ const FmTransfer = _sfc_main$8;
36641
+ const FmNoticeBar = _sfc_main$7;
36642
+ const FmDragImg = dragimg;
36643
+ const Fmselect = _sfc_main$5;
36644
+ const FmAutocomplete = _sfc_main$4;
36645
+ const Fminputdropdown = _sfc_main$3;
36646
+ const FmTree = _sfc_main$2;
36647
+
36648
+ const makeInstaller = (components = []) => {
36649
+ const install = (app) => {
36650
+ components.forEach(
36651
+ (component) => {
36652
+ if (!app._context.components[component.name]) {
36653
+ app.component(component.name, component);
36654
+ }
36655
+ }
36656
+ );
36657
+ if (app)
36658
+ elSvg(app);
36659
+ };
36660
+ return {
36661
+ install
36662
+ };
36663
+ };
36664
+
36665
+ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
36666
+ ...{
36667
+ name: "FmLogin"
36668
+ },
36669
+ __name: "index",
36670
+ setup(__props) {
36671
+ const login = vue.ref(false);
36672
+ function handleLogin() {
36673
+ login.value = true;
36674
+ }
36675
+ return (_ctx, _cache) => {
36676
+ return vue.openBlock(), vue.createElementBlock("div", { onClick: handleLogin }, _cache[0] || (_cache[0] = [
36677
+ vue.createElementVNode(
36678
+ "h1",
36679
+ null,
36680
+ "login xxxxx ",
36681
+ -1
36682
+ /* CACHED */
36683
+ )
36684
+ ]));
36685
+ };
36686
+ }
36687
+ });
36688
+
36689
+ const FmLogin = _sfc_main;
36690
+
36691
+ const plugins = [
36692
+ FmLogin,
36693
+ FmTransfer,
36694
+ FmNoticeBar,
36695
+ Fmselect,
36696
+ FmAutocomplete,
36697
+ Fminputdropdown,
36698
+ FmTree
36699
+ ];
36700
+
36701
+ var installer = makeInstaller([...plugins]);
36702
+
36703
+ const cssCdnUrlList = [
36704
+ // 调整为从本地引入,注释下面的 url
36705
+ // '//at.alicdn.com/t/c/font_2298093_rnp72ifj3ba.css',
36706
+ // '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',
36707
+ ];
36708
+ const jsCdnUrlList = [];
36709
+ function setCssCdn() {
36710
+ if (cssCdnUrlList.length <= 0) return false;
36711
+ cssCdnUrlList.map((v) => {
36712
+ let link = document.createElement("link");
36713
+ link.rel = "stylesheet";
36714
+ link.href = v;
36715
+ link.crossOrigin = "anonymous";
36716
+ document.getElementsByTagName("head")[0].appendChild(link);
36717
+ });
36718
+ }
36719
+ function setJsCdn() {
36720
+ if (jsCdnUrlList.length <= 0) return false;
36721
+ jsCdnUrlList.map((v) => {
36722
+ let link = document.createElement("script");
36723
+ link.src = v;
36724
+ document.body.appendChild(link);
36725
+ });
36726
+ }
36727
+ const setIntroduction = {
36728
+ // 设置css
36729
+ cssCdn: () => {
36730
+ setCssCdn();
36731
+ },
36732
+ // 设置js
36733
+ jsCdn: () => {
36734
+ setJsCdn();
36735
+ }
36736
+ };
36737
+
36738
+ const NextLoading = {
36739
+ // 创建 loading
36740
+ start: () => {
36741
+ const bodys = document.body;
36742
+ const div = document.createElement("div");
36743
+ div.setAttribute("class", "loading-next");
36744
+ const htmls = `
36745
+ <div class="loading-next-box">
36746
+ <div class="loading-next-box-warp">
36747
+ <div class="loading-next-box-item"></div>
36748
+ <div class="loading-next-box-item"></div>
36749
+ <div class="loading-next-box-item"></div>
36750
+ <div class="loading-next-box-item"></div>
36751
+ <div class="loading-next-box-item"></div>
36752
+ <div class="loading-next-box-item"></div>
36753
+ <div class="loading-next-box-item"></div>
36754
+ <div class="loading-next-box-item"></div>
36755
+ <div class="loading-next-box-item"></div>
36756
+ </div>
36757
+ </div>
36758
+ `;
36759
+ div.innerHTML = htmls;
36760
+ bodys.insertBefore(div, bodys.childNodes[0]);
36761
+ window.nextLoading = true;
36762
+ },
36763
+ // 移除 loading
36764
+ done: (time = 0) => {
36765
+ vue.nextTick(() => {
36766
+ setTimeout(() => {
36767
+ window.nextLoading = false;
36768
+ const el = document.querySelector(".loading-next");
36769
+ el?.parentNode?.removeChild(el);
36770
+ }, time);
36771
+ });
36772
+ }
36773
+ };
36774
+
36775
+ function useSysApi() {
36776
+ return {
36777
+ getSysInfo: (id) => {
36778
+ return service({
36779
+ url: `/api/sysTenant/sysInfo/${id}`,
36780
+ method: "GET"
36781
+ });
36782
+ },
36783
+ getSmPublicKey: () => {
36784
+ return service({
36785
+ url: `/api/sysConfig/smPublicKey`,
36786
+ method: "GET"
36787
+ });
36788
+ },
36789
+ getMenuTree: () => {
36790
+ return service({
36791
+ url: `/api/sysMenu/loginMenuTree`,
36792
+ method: "GET"
36793
+ });
36794
+ },
36795
+ getMenuUserMenuList: () => {
36796
+ return service({
36797
+ url: `/api/sysUserMenu/userMenuList`,
36798
+ method: "GET"
36799
+ });
36800
+ },
36801
+ addUserMenu: (data) => {
36802
+ return service({
36803
+ url: `/api/sysUserMenu/add`,
36804
+ method: "POST",
36805
+ data
36806
+ });
36807
+ },
36808
+ setNoticeRead: (data) => {
36809
+ return service({
36810
+ url: `/api/sysNotice/setRead`,
36811
+ method: "POST",
36812
+ data
36813
+ });
36814
+ },
36815
+ getNoticeTitle: () => {
36816
+ return service({
36817
+ url: `/api/sysNotice/noticeTitle`,
36818
+ method: "GET"
36819
+ });
36820
+ },
36821
+ getNoticeUnReadList: () => {
36822
+ return service({
36823
+ url: `/api/sysNotice/unReadList`,
36824
+ method: "GET"
36825
+ });
36826
+ },
36827
+ NoticePageReceived: (data) => {
36828
+ return service({
36829
+ url: `/api/sysNotice/pageReceived`,
36830
+ method: "POST",
36831
+ data
36832
+ });
36833
+ },
36834
+ getUpgradeLastUnRead: () => {
36835
+ return service({
36836
+ url: `/api/sysUpgrade/lastUnRead`,
36837
+ method: "GET"
36838
+ });
36839
+ },
36840
+ // 获取用户信息
36841
+ getUserInfo: () => {
36842
+ return service({
36843
+ url: `/api/sysAuth/userInfo`,
36844
+ method: "GET"
36845
+ });
36846
+ },
36847
+ getUserRoleTableList: () => {
36848
+ return service({
36849
+ url: `/api/sysRole/userRoleTableList`,
36850
+ method: "GET"
36851
+ });
36852
+ },
36853
+ getConstList: () => {
36854
+ return service({
36855
+ url: `/api/sysConst/list`,
36856
+ method: "GET"
36857
+ });
36858
+ },
36859
+ getPosList: () => {
36860
+ return service({
36861
+ url: `/api/sysPos/list`,
36862
+ method: "GET"
36863
+ });
36864
+ },
36865
+ getOwnRoleListById: (userid) => {
36866
+ return service({
36867
+ url: `/api/sysUser/ownRoleList/${userid}`,
36868
+ method: "GET"
36869
+ });
36870
+ },
36871
+ getRoleList: () => {
36872
+ return service({
36873
+ url: `/api/sysRole/list`,
36874
+ method: "GET"
36875
+ });
36876
+ },
36877
+ getSysOrgChildTreePidLevel: (pid, level) => {
36878
+ return service({
36879
+ url: `/api/sysOrg/childTree/${pid}/${level}`,
36880
+ method: "GET"
36881
+ });
36882
+ },
36883
+ getOrgList: (params) => {
36884
+ return service({
36885
+ url: `/api/sysOrg/list`,
36886
+ method: "GET",
36887
+ params
36888
+ });
36889
+ },
36890
+ getUserBaseInfo: () => {
36891
+ return service({
36892
+ url: `/api/sysUser/baseInfo`,
36893
+ method: "GET"
36894
+ });
36895
+ },
36896
+ getOwnExtOrgListByid: (userid) => {
36897
+ return service({
36898
+ url: `/api/sysUser/ownExtOrgList/${userid}`,
36899
+ method: "GET"
36900
+ });
36901
+ },
36902
+ getAllDictList: () => {
36903
+ return service({
36904
+ url: `/api/sysDictType/allDictList`,
36905
+ method: "GET"
36906
+ });
36907
+ },
36908
+ verifyPwdExpirationTime: () => {
36909
+ return service({
36910
+ url: `/api/sysUser/verifyPwdExpirationTime`,
36911
+ method: "POST"
36912
+ });
36913
+ },
36914
+ changePwd: (data) => {
36915
+ return service({
36916
+ url: `/fmauth/sysauth/changePwd`,
36917
+ method: "POST",
36918
+ data
36919
+ });
36920
+ },
36921
+ resetPwd: (data) => {
36922
+ return service({
36923
+ url: `/fmauth/sysauth/resetPwd`,
36924
+ method: "POST",
36925
+ data
36926
+ });
36927
+ },
36928
+ unlockLogin: (data) => {
36929
+ return service({
36930
+ url: `/fmauth/sysauth/unlockLogin`,
36931
+ method: "POST",
36932
+ data
36933
+ });
36934
+ },
36935
+ changeToken: (data) => {
36936
+ return service({
36937
+ url: `/fmauth/sysauth/changeToken`,
36938
+ method: "POST",
36939
+ data
36940
+ });
36941
+ },
36942
+ Logout: () => {
36943
+ return service({
36944
+ url: `/fmauth/sysauth/logout`,
36945
+ method: "POST"
36946
+ });
36947
+ },
36948
+ unLockScreen: (password) => {
36949
+ return service({
36950
+ url: `/fmauth/sysauth/unlockScreen/?password=${password}`,
36951
+ method: "POST"
36952
+ });
36953
+ },
36954
+ getOnlineUserList: (data) => {
36955
+ return service({
36956
+ url: `/fmauth/sysOnlineUser/page`,
36957
+ method: "POST",
36958
+ data
36959
+ });
36960
+ }
36961
+ };
36962
+ }
36963
+ function feature(promise, errorExt) {
36964
+ return promise.then((data) => [null, data]).catch((err) => {
36965
+ if (errorExt) {
36966
+ const parsedError = Object.assign({}, err, errorExt);
36967
+ return [parsedError, void 0];
36968
+ }
36969
+ return [err, void 0];
36970
+ });
36971
+ }
36972
+
36973
+ function useLoginApi() {
36974
+ return {
36975
+ signIn: (data) => {
36976
+ return service({
36977
+ url: "/fmauth/sysauth/login",
36978
+ method: "post",
36979
+ data
36980
+ });
36981
+ },
36982
+ loginPhonenumber: (data) => {
36983
+ return service({
36984
+ url: "/fmauth/sysauth/loginPhone",
36985
+ method: "post",
36986
+ data
36987
+ });
36988
+ },
36989
+ getCaptcha: () => {
36990
+ return service({
36991
+ url: "/fmauth/sysauth/captcha",
36992
+ method: "get"
36993
+ });
36994
+ },
36995
+ signOut: (data) => {
36996
+ return service({
36997
+ url: "/fmauth/sysauth/signOut",
36998
+ method: "post",
36999
+ data
37000
+ });
37001
+ }
37002
+ };
37003
+ }
37004
+
37005
+ var AccountTypeEnum = /* @__PURE__ */ ((AccountTypeEnum2) => {
37006
+ AccountTypeEnum2[AccountTypeEnum2["NUMBER_666"] = 666] = "NUMBER_666";
37007
+ AccountTypeEnum2[AccountTypeEnum2["NUMBER_777"] = 777] = "NUMBER_777";
37008
+ AccountTypeEnum2[AccountTypeEnum2["NUMBER_888"] = 888] = "NUMBER_888";
37009
+ AccountTypeEnum2[AccountTypeEnum2["NUMBER_987"] = 987] = "NUMBER_987";
37010
+ AccountTypeEnum2[AccountTypeEnum2["NUMBER_999"] = 999] = "NUMBER_999";
37011
+ return AccountTypeEnum2;
37012
+ })(AccountTypeEnum || {});
37013
+ var JobCreateTypeEnum = /* @__PURE__ */ ((JobCreateTypeEnum2) => {
37014
+ JobCreateTypeEnum2[JobCreateTypeEnum2["NUMBER_0"] = 0] = "NUMBER_0";
37015
+ JobCreateTypeEnum2[JobCreateTypeEnum2["NUMBER_1"] = 1] = "NUMBER_1";
37016
+ JobCreateTypeEnum2[JobCreateTypeEnum2["NUMBER_2"] = 2] = "NUMBER_2";
37017
+ return JobCreateTypeEnum2;
37018
+ })(JobCreateTypeEnum || {});
37019
+ var HttpMethodEnum = /* @__PURE__ */ ((HttpMethodEnum2) => {
37020
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_0"] = 0] = "NUMBER_0";
37021
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_1"] = 1] = "NUMBER_1";
37022
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_2"] = 2] = "NUMBER_2";
37023
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_3"] = 3] = "NUMBER_3";
37024
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_4"] = 4] = "NUMBER_4";
37025
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_5"] = 5] = "NUMBER_5";
37026
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_6"] = 6] = "NUMBER_6";
37027
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_7"] = 7] = "NUMBER_7";
37028
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_8"] = 8] = "NUMBER_8";
37029
+ return HttpMethodEnum2;
37030
+ })(HttpMethodEnum || {});
37031
+
36995
37032
  const pinia = createPinia();
36996
37033
 
36997
37034
  const useKeepALiveNames = defineStore("keepALiveNames", {
@@ -53278,7 +53315,9 @@
53278
53315
  exports.formatAxis = formatAxis;
53279
53316
  exports.formatDate = formatDate;
53280
53317
  exports.formatPast = formatPast;
53318
+ exports.getBdate = getBdate;
53281
53319
  exports.getCountryCode = getCountryCode;
53320
+ exports.getEdate = getEdate;
53282
53321
  exports.getFileName = getFileName;
53283
53322
  exports.getFileUrl = getFileUrl;
53284
53323
  exports.getJWTDate = getJWTDate;