liyu-pc-base 1.0.2
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/README.md +1 -0
- package/dist/SearchRender-4500beb0.js +39100 -0
- package/dist/api/api-model.js +32 -0
- package/dist/components/FormRender/utils.js +19 -0
- package/dist/components/index.js +2480 -0
- package/dist/components/remotePages/index.js +6851 -0
- package/dist/components/remotePages/utils.js +111 -0
- package/dist/index.js +28 -0
- package/dist/init-plugin-3dcd1452.js +144 -0
- package/dist/lodash-14d7cb6d.js +3679 -0
- package/dist/modal-tools-05a597e4.js +4271 -0
- package/dist/style.css +1 -0
- package/dist/utils/excel.js +93 -0
- package/dist/utils/function.js +251 -0
- package/dist/utils/hooks/useFetchData.js +89 -0
- package/dist/utils/hooks/useTableColumn.js +148 -0
- package/package.json +231 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { i } from "../init-plugin-3dcd1452.js";
|
|
2
|
+
async function f(l, n, s, d = {}) {
|
|
3
|
+
if (s) {
|
|
4
|
+
let h = function(t) {
|
|
5
|
+
t.forEach((a) => {
|
|
6
|
+
a != null && a.children && a.children.length > 0 ? (a.children.sort((p, u) => p.sort - u.sort), h(a.children)) : delete a.children;
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
const e = await i().post(n, l, d), c = new Map(
|
|
10
|
+
e.data.map((t) => [
|
|
11
|
+
t.id,
|
|
12
|
+
{ ...t, key: t.id, value: t.id, title: t.name, children: [] }
|
|
13
|
+
])
|
|
14
|
+
), r = [];
|
|
15
|
+
return e.data.forEach((t) => {
|
|
16
|
+
var a;
|
|
17
|
+
t.key = t.id, t.value = t.id, t.title = t.name, t.parent_id !== null && ((a = c.get(t.parent_id)) != null && a.children) ? c.get(t.parent_id).children.push(c.get(t.id)) : r.push(c.get(t.id));
|
|
18
|
+
}), r.sort((t, a) => t.sort - a.sort), h(r), e.data = r, r.length != 0 ? (e.data = r, e.total = r.length) : e.total = e.data.length, e;
|
|
19
|
+
} else
|
|
20
|
+
return i().post(n, l, d);
|
|
21
|
+
}
|
|
22
|
+
async function g(l, n, s) {
|
|
23
|
+
return i().post(n, l, s);
|
|
24
|
+
}
|
|
25
|
+
async function y(l, n, s) {
|
|
26
|
+
return i().put(n, l, s);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
f as getApiData,
|
|
30
|
+
g as getApiUpload,
|
|
31
|
+
y as getApiUploadPut
|
|
32
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { m as p, q as c } from "../../init-plugin-3dcd1452.js";
|
|
2
|
+
import { message as f } from "ant-design-vue";
|
|
3
|
+
const y = (e) => e instanceof Array ? e.join() : e instanceof Object ? JSON.stringify(e) : e.toString(), S = (e) => e instanceof Array ? e.join() : typeof e == "number" ? String(e) : e === void 0 ? "undefined" : e === null ? "null" : typeof e == "boolean" ? String(e) : typeof e == "object" ? Object.keys(e).sort((t, u) => t.localeCompare(u)).map((t) => `${t}-${y(e[t])}`).join() : (console.error("error type" + typeof e), e.toString()), O = (e, t) => (o, l) => {
|
|
4
|
+
const n = p().currentOrg, a = Object.keys(o).sort((r, i) => r.localeCompare(i)).map((r) => `${r}-${S(o[r])}`).join(), m = (/* @__PURE__ */ new Date()).getTime() + 3600 * 1e3, s = c().get(`${n == null ? void 0 : n.id}_${t}`);
|
|
5
|
+
return new Promise((r) => {
|
|
6
|
+
!l && s && s.time > (/* @__PURE__ */ new Date()).getTime() && s.paramsKey == a ? r(s.data) : e(o).then((i) => {
|
|
7
|
+
c().set(`${n == null ? void 0 : n.id}_${t}`, {
|
|
8
|
+
data: i,
|
|
9
|
+
time: m,
|
|
10
|
+
paramsKey: a
|
|
11
|
+
}), r(i);
|
|
12
|
+
}).catch(() => {
|
|
13
|
+
f.destroy(), f.error("接口调用失败", 10);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
O as default
|
|
19
|
+
};
|