zsysview 0.0.26 → 0.0.28

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.
Files changed (45) hide show
  1. package/dist/backup-BKq6sQjF.js +519 -0
  2. package/dist/breadcrumb.vue_vue_type_script_setup_true_lang-Ca489fLF.js +43 -0
  3. package/dist/change_password-DHURkzza.js +135 -0
  4. package/dist/department-nsjoJXue.js +410 -0
  5. package/dist/desktop-CcKDaeCI.js +9 -0
  6. package/dist/http_api_v1-CkjqXdob.js +1008 -0
  7. package/dist/index-BGMV_V_g.js +6688 -0
  8. package/dist/{index-BaFHeDAF.js → index-DG0x9mYD.js} +105 -105
  9. package/dist/index.es-DrN1BLo5.js +170 -0
  10. package/dist/log-4jRKPEKy.js +163 -0
  11. package/dist/login-Df4BMtP8.js +111 -0
  12. package/dist/main-CaR_6gzq.js +293 -0
  13. package/dist/message-CVTa4Hb1.js +26 -0
  14. package/dist/position-UV9V8NKa.js +311 -0
  15. package/dist/role-Co7zqJq3.js +405 -0
  16. package/dist/self-CZaIzR2G.js +102 -0
  17. package/dist/sys-BZgBUI3k.js +30 -0
  18. package/dist/user-D8k4kb-7.js +650 -0
  19. package/dist/zsys_delbutton.vue_vue_type_script_setup_true_lang-JGPGvAqL.js +72 -0
  20. package/dist/zsys_eventBus-CZOk9fTb.js +178 -0
  21. package/dist/zsys_time-4KclnYJN.js +17 -0
  22. package/dist/zsyslist.vue_vue_type_script_setup_true_lang-C714Dj9O.js +465 -0
  23. package/dist/zsysview.es.js +1 -1
  24. package/package.json +1 -1
  25. package/dist/backup-BrCAKHW5.js +0 -519
  26. package/dist/breadcrumb.vue_vue_type_script_setup_true_lang-DxqktuR5.js +0 -43
  27. package/dist/change_password-CY87a5gc.js +0 -135
  28. package/dist/department-BDW7DB5F.js +0 -410
  29. package/dist/desktop-DgyBqclt.js +0 -9
  30. package/dist/http_api_v1-BQLGtV9G.js +0 -1008
  31. package/dist/index-DXGp4B8l.js +0 -6688
  32. package/dist/index.es-BcGc183Q.js +0 -170
  33. package/dist/log-2ZY0HGuh.js +0 -163
  34. package/dist/login-BAuvM04T.js +0 -111
  35. package/dist/main-CxdkVN-C.js +0 -293
  36. package/dist/message-CdVUOGzt.js +0 -26
  37. package/dist/position-D7wr1m96.js +0 -311
  38. package/dist/role-M_ZYR2ta.js +0 -405
  39. package/dist/self-DAB-5Co8.js +0 -102
  40. package/dist/sys-BjlP52cg.js +0 -30
  41. package/dist/user-CEaf7VIW.js +0 -650
  42. package/dist/zsys_delbutton.vue_vue_type_script_setup_true_lang-BYahBvHu.js +0 -72
  43. package/dist/zsys_eventBus-DDrk0Aw8.js +0 -178
  44. package/dist/zsys_time-DHEMuVgo.js +0 -17
  45. package/dist/zsyslist.vue_vue_type_script_setup_true_lang-Bl1QXOML.js +0 -466
@@ -0,0 +1,72 @@
1
+ import { defineComponent, reactive, resolveComponent, createElementBlock, openBlock, Fragment, createBlock, createCommentVNode, withCtx, createVNode, createTextVNode } from "vue";
2
+ import { H as HttpApiV1 } from "./http_api_v1-CkjqXdob.js";
3
+ import { Z as ZSYSMessage } from "./message-CVTa4Hb1.js";
4
+ import { z as zsysEventBus } from "./zsys_eventBus-CZOk9fTb.js";
5
+ const _sfc_main = /* @__PURE__ */ defineComponent({
6
+ __name: "zsys_delbutton",
7
+ props: {
8
+ id: { type: BigInt, required: !0 },
9
+ api_url: { type: String, required: !0 },
10
+ module: { type: String, default: "all" }
11
+ // closeOnClickModal: { type: Boolean, default: true }
12
+ },
13
+ setup(__props) {
14
+ const eventBus = zsysEventBus(), view = reactive({
15
+ loading: !1
16
+ }), props = __props, confirm = async () => {
17
+ view.loading = !0;
18
+ try {
19
+ (await HttpApiV1.Post(props.api_url, { id: props.id })).IsSuccess ? (view.loading = !1, ZSYSMessage.ShowSuccess("删除成功"), console.log("aud", props.module), console.log(props.module), eventBus.emit("aud", { module: props.module, id: props.id })) : ZSYSMessage.ShowError("删除失败");
20
+ } catch {
21
+ }
22
+ view.loading = !1;
23
+ };
24
+ return (_ctx, _cache) => {
25
+ const _component_el_link = resolveComponent("el-link"), _component_el_popconfirm = resolveComponent("el-popconfirm"), _component_el_popover = resolveComponent("el-popover");
26
+ return openBlock(), createElementBlock(Fragment, null, [
27
+ view.loading ? createCommentVNode("", !0) : (openBlock(), createBlock(_component_el_popconfirm, {
28
+ key: 0,
29
+ onConfirm: confirm,
30
+ title: "确认要删除吗?",
31
+ "confirm-button-text": "删除",
32
+ "cancel-button-text": "取消",
33
+ "confirm-button-type": "danger"
34
+ }, {
35
+ reference: withCtx(() => [
36
+ createVNode(_component_el_link, { type: "primary" }, {
37
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [
38
+ createTextVNode("删除", -1)
39
+ ])]),
40
+ _: 1
41
+ })
42
+ ]),
43
+ _: 1
44
+ })),
45
+ view.loading ? (openBlock(), createBlock(_component_el_popover, {
46
+ key: 1,
47
+ visible: view.loading,
48
+ width: 40,
49
+ placement: "top",
50
+ content: "正在删除"
51
+ }, {
52
+ reference: withCtx(() => [
53
+ createVNode(_component_el_link, {
54
+ type: "primary",
55
+ style: { "margin-left": "6px" },
56
+ disabled: ""
57
+ }, {
58
+ default: withCtx(() => [..._cache[1] || (_cache[1] = [
59
+ createTextVNode("删除", -1)
60
+ ])]),
61
+ _: 1
62
+ })
63
+ ]),
64
+ _: 1
65
+ }, 8, ["visible"])) : createCommentVNode("", !0)
66
+ ], 64);
67
+ };
68
+ }
69
+ });
70
+ export {
71
+ _sfc_main as _
72
+ };
@@ -0,0 +1,178 @@
1
+ import { watch, unref, getCurrentScope, onScopeDispose, reactive, computed, ref } from "vue";
2
+ var _a;
3
+ const isClient = typeof window < "u", isString = (val) => typeof val == "string", noop = () => {
4
+ };
5
+ isClient && ((_a = window?.navigator) != null && _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
6
+ function resolveUnref(r) {
7
+ return typeof r == "function" ? r() : unref(r);
8
+ }
9
+ function identity(arg) {
10
+ return arg;
11
+ }
12
+ function tryOnScopeDispose(fn) {
13
+ return getCurrentScope() ? (onScopeDispose(fn), !0) : !1;
14
+ }
15
+ function whenever(source, cb, options) {
16
+ return watch(source, (v, ov, onInvalidate) => {
17
+ v && cb(v, ov, onInvalidate);
18
+ }, options);
19
+ }
20
+ function unrefElement(elRef) {
21
+ var _a2;
22
+ const plain = resolveUnref(elRef);
23
+ return (_a2 = plain?.$el) != null ? _a2 : plain;
24
+ }
25
+ const defaultWindow = isClient ? window : void 0;
26
+ function useEventListener(...args) {
27
+ let target, events, listeners, options;
28
+ if (isString(args[0]) || Array.isArray(args[0]) ? ([events, listeners, options] = args, target = defaultWindow) : [target, events, listeners, options] = args, !target)
29
+ return noop;
30
+ Array.isArray(events) || (events = [events]), Array.isArray(listeners) || (listeners = [listeners]);
31
+ const cleanups = [], cleanup = () => {
32
+ cleanups.forEach((fn) => fn()), cleanups.length = 0;
33
+ }, register = (el, event, listener, options2) => (el.addEventListener(event, listener, options2), () => el.removeEventListener(event, listener, options2)), stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {
34
+ cleanup(), el && cleanups.push(...events.flatMap((event) => listeners.map((listener) => register(el, event, listener, options2))));
35
+ }, { immediate: !0, flush: "post" }), stop = () => {
36
+ stopWatch(), cleanup();
37
+ };
38
+ return tryOnScopeDispose(stop), stop;
39
+ }
40
+ const _global = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, globalKey = "__vueuse_ssr_handlers__";
41
+ _global[globalKey] = _global[globalKey] || {};
42
+ const DefaultMagicKeysAliasMap = {
43
+ ctrl: "control",
44
+ command: "meta",
45
+ cmd: "meta",
46
+ option: "alt",
47
+ up: "arrowup",
48
+ down: "arrowdown",
49
+ left: "arrowleft",
50
+ right: "arrowright"
51
+ };
52
+ function useMagicKeys(options = {}) {
53
+ const {
54
+ reactive: useReactive = !1,
55
+ target = defaultWindow,
56
+ aliasMap = DefaultMagicKeysAliasMap,
57
+ passive = !0,
58
+ onEventFired = noop
59
+ } = options, current = reactive(/* @__PURE__ */ new Set()), obj = {
60
+ toJSON() {
61
+ return {};
62
+ },
63
+ current
64
+ }, refs = useReactive ? reactive(obj) : obj, metaDeps = /* @__PURE__ */ new Set(), usedKeys = /* @__PURE__ */ new Set();
65
+ function setRefs(key, value) {
66
+ key in refs && (useReactive ? refs[key] = value : refs[key].value = value);
67
+ }
68
+ function reset() {
69
+ current.clear();
70
+ for (const key of usedKeys)
71
+ setRefs(key, !1);
72
+ }
73
+ function updateRefs(e, value) {
74
+ var _a2, _b;
75
+ const key = (_a2 = e.key) == null ? void 0 : _a2.toLowerCase(), values = [(_b = e.code) == null ? void 0 : _b.toLowerCase(), key].filter(Boolean);
76
+ key && (value ? current.add(key) : current.delete(key));
77
+ for (const key2 of values)
78
+ usedKeys.add(key2), setRefs(key2, value);
79
+ key === "meta" && !value ? (metaDeps.forEach((key2) => {
80
+ current.delete(key2), setRefs(key2, !1);
81
+ }), metaDeps.clear()) : typeof e.getModifierState == "function" && e.getModifierState("Meta") && value && [...current, ...values].forEach((key2) => metaDeps.add(key2));
82
+ }
83
+ useEventListener(target, "keydown", (e) => (updateRefs(e, !0), onEventFired(e)), { passive }), useEventListener(target, "keyup", (e) => (updateRefs(e, !1), onEventFired(e)), { passive }), useEventListener("blur", reset, { passive: !0 }), useEventListener("focus", reset, { passive: !0 });
84
+ const proxy = new Proxy(refs, {
85
+ get(target2, prop, rec) {
86
+ if (typeof prop != "string")
87
+ return Reflect.get(target2, prop, rec);
88
+ if (prop = prop.toLowerCase(), prop in aliasMap && (prop = aliasMap[prop]), !(prop in refs))
89
+ if (/[+_-]/.test(prop)) {
90
+ const keys = prop.split(/[+_-]/g).map((i) => i.trim());
91
+ refs[prop] = computed(() => keys.every((key) => unref(proxy[key])));
92
+ } else
93
+ refs[prop] = ref(!1);
94
+ const r = Reflect.get(target2, prop, rec);
95
+ return useReactive ? unref(r) : r;
96
+ }
97
+ });
98
+ return proxy;
99
+ }
100
+ var SwipeDirection;
101
+ (function(SwipeDirection2) {
102
+ SwipeDirection2.UP = "UP", SwipeDirection2.RIGHT = "RIGHT", SwipeDirection2.DOWN = "DOWN", SwipeDirection2.LEFT = "LEFT", SwipeDirection2.NONE = "NONE";
103
+ })(SwipeDirection || (SwipeDirection = {}));
104
+ var __defProp = Object.defineProperty, __getOwnPropSymbols = Object.getOwnPropertySymbols, __hasOwnProp = Object.prototype.hasOwnProperty, __propIsEnum = Object.prototype.propertyIsEnumerable, __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value, __spreadValues = (a, b) => {
105
+ for (var prop in b || (b = {}))
106
+ __hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);
107
+ if (__getOwnPropSymbols)
108
+ for (var prop of __getOwnPropSymbols(b))
109
+ __propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);
110
+ return a;
111
+ };
112
+ const _TransitionPresets = {
113
+ easeInSine: [0.12, 0, 0.39, 0],
114
+ easeOutSine: [0.61, 1, 0.88, 1],
115
+ easeInOutSine: [0.37, 0, 0.63, 1],
116
+ easeInQuad: [0.11, 0, 0.5, 0],
117
+ easeOutQuad: [0.5, 1, 0.89, 1],
118
+ easeInOutQuad: [0.45, 0, 0.55, 1],
119
+ easeInCubic: [0.32, 0, 0.67, 0],
120
+ easeOutCubic: [0.33, 1, 0.68, 1],
121
+ easeInOutCubic: [0.65, 0, 0.35, 1],
122
+ easeInQuart: [0.5, 0, 0.75, 0],
123
+ easeOutQuart: [0.25, 1, 0.5, 1],
124
+ easeInOutQuart: [0.76, 0, 0.24, 1],
125
+ easeInQuint: [0.64, 0, 0.78, 0],
126
+ easeOutQuint: [0.22, 1, 0.36, 1],
127
+ easeInOutQuint: [0.83, 0, 0.17, 1],
128
+ easeInExpo: [0.7, 0, 0.84, 0],
129
+ easeOutExpo: [0.16, 1, 0.3, 1],
130
+ easeInOutExpo: [0.87, 0, 0.13, 1],
131
+ easeInCirc: [0.55, 0, 1, 0.45],
132
+ easeOutCirc: [0, 0.55, 0.45, 1],
133
+ easeInOutCirc: [0.85, 0, 0.15, 1],
134
+ easeInBack: [0.36, 0, 0.66, -0.56],
135
+ easeOutBack: [0.34, 1.56, 0.64, 1],
136
+ easeInOutBack: [0.68, -0.6, 0.32, 1.6]
137
+ };
138
+ __spreadValues({
139
+ linear: identity
140
+ }, _TransitionPresets);
141
+ function mitt(n) {
142
+ return { all: n = n || /* @__PURE__ */ new Map(), on: function(t, e) {
143
+ var i = n.get(t);
144
+ i ? i.push(e) : n.set(t, [e]);
145
+ }, off: function(t, e) {
146
+ var i = n.get(t);
147
+ i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n.set(t, []));
148
+ }, emit: function(t, e) {
149
+ var i = n.get(t);
150
+ i && i.slice().map(function(n2) {
151
+ n2(e);
152
+ }), (i = n.get("*")) && i.slice().map(function(n2) {
153
+ n2(t, e);
154
+ });
155
+ } };
156
+ }
157
+ const emitter = mitt(), zsysEventBus = () => ({
158
+ // 触发事件
159
+ emit: emitter.emit,
160
+ // 监听事件
161
+ on: emitter.on,
162
+ // 取消监听
163
+ off: emitter.off,
164
+ // 一次性监听
165
+ once: (event, handler) => {
166
+ const onceHandler = (payload) => {
167
+ handler(payload), emitter.off(event, onceHandler);
168
+ };
169
+ emitter.on(event, onceHandler);
170
+ },
171
+ // 清空所有监听
172
+ clearAll: emitter.all.clear
173
+ });
174
+ export {
175
+ useMagicKeys as u,
176
+ whenever as w,
177
+ zsysEventBus as z
178
+ };
@@ -0,0 +1,17 @@
1
+ function formatDateTime(date) {
2
+ if (date == "0001-01-01T00:00:00Z")
3
+ return "";
4
+ const d = new Date(date);
5
+ return isNaN(d.getTime()) ? "" : [
6
+ d.getFullYear(),
7
+ (d.getMonth() + 1).toString().padStart(2, "0"),
8
+ d.getDate().toString().padStart(2, "0")
9
+ ].join("-") + " " + [
10
+ d.getHours().toString().padStart(2, "0"),
11
+ d.getMinutes().toString().padStart(2, "0"),
12
+ d.getSeconds().toString().padStart(2, "0")
13
+ ].join(":");
14
+ }
15
+ export {
16
+ formatDateTime as f
17
+ };