yc-vep-ui 0.3.49 → 0.3.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{entry-DkpTPBfE.js → entry-C17RPT3H.js} +113 -128
- package/dist/hooks/index.js +1 -1
- package/dist/index.css +6 -6
- package/dist/utils/index.js +1 -1
- package/dist/vep-ui.js +1 -1
- package/package.json +1 -1
|
@@ -1696,10 +1696,15 @@ var _hoisted_1$11 = { style: {
|
|
|
1696
1696
|
]);
|
|
1697
1697
|
};
|
|
1698
1698
|
}
|
|
1699
|
-
}), Dialog_exports = /* @__PURE__ */ __exportAll$1({ default: () => Dialog_default }), Dialog_default = index_vue_vue_type_script_setup_true_lang_default$4
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1699
|
+
}), Dialog_exports = /* @__PURE__ */ __exportAll$1({ default: () => Dialog_default }), Dialog_default = index_vue_vue_type_script_setup_true_lang_default$4;
|
|
1700
|
+
//#endregion
|
|
1701
|
+
//#region src/utils/request.ts
|
|
1702
|
+
function getHeaders() {
|
|
1703
|
+
return new Headers({
|
|
1704
|
+
"Content-Type": "application/json",
|
|
1705
|
+
token: localStorage.getItem("TOKEN") || ""
|
|
1706
|
+
});
|
|
1707
|
+
}
|
|
1703
1708
|
async function get(e, n) {
|
|
1704
1709
|
let r = `${baseUrl}${e}`;
|
|
1705
1710
|
if (n) {
|
|
@@ -1707,20 +1712,20 @@ async function get(e, n) {
|
|
|
1707
1712
|
e && (r = `${r}?${e}`);
|
|
1708
1713
|
}
|
|
1709
1714
|
return (await fetch(r, {
|
|
1710
|
-
headers,
|
|
1715
|
+
headers: getHeaders(),
|
|
1711
1716
|
method: "GET"
|
|
1712
1717
|
})).json();
|
|
1713
1718
|
}
|
|
1714
1719
|
async function post(e, n) {
|
|
1715
1720
|
return (await fetch(`${baseUrl}${e}`, {
|
|
1716
|
-
headers,
|
|
1721
|
+
headers: getHeaders(),
|
|
1717
1722
|
method: "POST",
|
|
1718
1723
|
body: JSON.stringify(n)
|
|
1719
1724
|
})).json();
|
|
1720
1725
|
}
|
|
1721
1726
|
async function blob(e, n) {
|
|
1722
1727
|
return (await fetch(`${baseUrl}${e}`, {
|
|
1723
|
-
headers,
|
|
1728
|
+
headers: getHeaders(),
|
|
1724
1729
|
method: "POST",
|
|
1725
1730
|
body: JSON.stringify(n)
|
|
1726
1731
|
})).blob();
|
|
@@ -1753,27 +1758,18 @@ var default_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
1753
1758
|
},
|
|
1754
1759
|
emits: ["update:modelValue"],
|
|
1755
1760
|
setup(e, { emit: n }) {
|
|
1756
|
-
let r = e, i = n, a = r.valueAt ?? "all", o =
|
|
1757
|
-
"Content-Type": "application/json",
|
|
1758
|
-
"X-Requested-With": "XMLHttpRequest",
|
|
1759
|
-
token: localStorage.getItem("TOKEN") ?? "",
|
|
1760
|
-
Accept: "application/json"
|
|
1761
|
-
}), s = computed({
|
|
1761
|
+
let r = e, i = n, a = r.valueAt ?? "all", o = computed({
|
|
1762
1762
|
get: () => r.modelValue || "",
|
|
1763
1763
|
set: (e) => i("update:modelValue", e)
|
|
1764
|
-
}),
|
|
1764
|
+
}), s = ref([]);
|
|
1765
1765
|
onMounted(() => {
|
|
1766
|
-
r.modelValue &&
|
|
1766
|
+
r.modelValue && c(r.modelValue);
|
|
1767
1767
|
});
|
|
1768
|
-
async function
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
page: 1,
|
|
1774
|
-
pageSize: 999,
|
|
1775
|
-
name: e
|
|
1776
|
-
})
|
|
1768
|
+
async function c(e = "") {
|
|
1769
|
+
s.value = ((await request_default.post("/user/pageQueryUser", {
|
|
1770
|
+
page: 1,
|
|
1771
|
+
pageSize: 999,
|
|
1772
|
+
name: e
|
|
1777
1773
|
}).then((e) => e.json()))?.table || []).map((e) => {
|
|
1778
1774
|
let n = a === "all" ? `${e.name}(${e.account})` : e[a];
|
|
1779
1775
|
return {
|
|
@@ -1783,23 +1779,23 @@ var default_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
1783
1779
|
};
|
|
1784
1780
|
});
|
|
1785
1781
|
}
|
|
1786
|
-
async function
|
|
1787
|
-
e.length < 1 || (
|
|
1782
|
+
async function l(e) {
|
|
1783
|
+
e.length < 1 || (o.value = e, await c(e));
|
|
1788
1784
|
}
|
|
1789
1785
|
return (e, n) => {
|
|
1790
1786
|
let r = resolveComponent("el-icon"), i = resolveComponent("el-option"), a = resolveComponent("el-select");
|
|
1791
1787
|
return openBlock(), createBlock(a, mergeProps({
|
|
1792
1788
|
remote: "",
|
|
1793
1789
|
filterable: "",
|
|
1794
|
-
modelValue:
|
|
1795
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
1796
|
-
"remote-method":
|
|
1790
|
+
modelValue: o.value,
|
|
1791
|
+
"onUpdate:modelValue": n[0] ||= (e) => o.value = e,
|
|
1792
|
+
"remote-method": l
|
|
1797
1793
|
}, e.$attrs), {
|
|
1798
1794
|
prefix: withCtx(() => [createVNode(r, null, {
|
|
1799
1795
|
default: withCtx(() => [createVNode(unref(User_default))]),
|
|
1800
1796
|
_: 1
|
|
1801
1797
|
})]),
|
|
1802
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1798
|
+
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (e) => (openBlock(), createBlock(i, {
|
|
1803
1799
|
key: `${e.employeeCode}-${e.employeeName}`,
|
|
1804
1800
|
label: e.label,
|
|
1805
1801
|
value: e.value
|
|
@@ -2006,40 +2002,28 @@ var _hoisted_1$4 = { style: {
|
|
|
2006
2002
|
},
|
|
2007
2003
|
emits: ["update:modelValue", "change"],
|
|
2008
2004
|
setup(e, { expose: n, emit: r }) {
|
|
2009
|
-
let i = r, a = useAttrs(), o = e, s = o.valueAt ?? "all", c = ref(), l = ref(!1), u =
|
|
2010
|
-
"Content-Type": "application/json",
|
|
2011
|
-
"X-Requested-With": "XMLHttpRequest",
|
|
2012
|
-
token: localStorage.getItem("TOKEN") ?? "",
|
|
2013
|
-
Accept: "application/json"
|
|
2014
|
-
}), d = reactive({
|
|
2005
|
+
let i = r, a = useAttrs(), o = e, s = o.valueAt ?? "all", c = ref(), l = ref(!1), u = reactive({
|
|
2015
2006
|
searchData: [],
|
|
2016
2007
|
staffData: [],
|
|
2017
2008
|
loading: !1,
|
|
2018
2009
|
filterText: "",
|
|
2019
2010
|
requiredVisible: !1
|
|
2020
|
-
}),
|
|
2011
|
+
}), d = ref([]), f = ref([]), p = computed(() => u.searchData?.length ? u.searchData : u.staffData), m = computed(() => o.required ?? a?.required ?? !1);
|
|
2021
2012
|
watchEffect(() => {
|
|
2022
|
-
|
|
2013
|
+
f.value = uniq(o.modelValue || []);
|
|
2023
2014
|
}), watchEffect(() => {
|
|
2024
|
-
l.value &&
|
|
2015
|
+
l.value && g();
|
|
2025
2016
|
});
|
|
2026
|
-
async function
|
|
2027
|
-
let e = await
|
|
2028
|
-
|
|
2029
|
-
headers: u
|
|
2030
|
-
}).then((e) => e.json());
|
|
2031
|
-
d.staffData = e.data || [], e.data?.[0] && y(e.data?.[0]);
|
|
2032
|
-
}
|
|
2033
|
-
async function v(e) {
|
|
2034
|
-
return fetch(baseUrl + "/user/pageQueryUser", {
|
|
2035
|
-
method: "POST",
|
|
2036
|
-
headers: u,
|
|
2037
|
-
body: JSON.stringify(e)
|
|
2038
|
-
}).then((e) => e.json());
|
|
2017
|
+
async function g() {
|
|
2018
|
+
let e = await request_default.get("/department/queryDepartmentTree").then((e) => e.json());
|
|
2019
|
+
u.staffData = e.data || [], e.data?.[0] && v(e.data?.[0]);
|
|
2039
2020
|
}
|
|
2040
|
-
async function
|
|
2021
|
+
async function _(e) {
|
|
2022
|
+
return request_default.post("/user/pageQueryUser", e).then((e) => e.json());
|
|
2023
|
+
}
|
|
2024
|
+
async function v(e, n) {
|
|
2041
2025
|
let r = !!e?.data?.code, i = e?.data?.code || e?.code;
|
|
2042
|
-
return !i || e?.data?.account ? n?.([]) : (
|
|
2026
|
+
return !i || e?.data?.account ? n?.([]) : (u.loading = !0, _({
|
|
2043
2027
|
page: 1,
|
|
2044
2028
|
pageSize: 9999,
|
|
2045
2029
|
departmentCode: i
|
|
@@ -2049,73 +2033,73 @@ var _hoisted_1$4 = { style: {
|
|
|
2049
2033
|
...e,
|
|
2050
2034
|
code: e.account
|
|
2051
2035
|
}));
|
|
2052
|
-
r ? e.data.children = uniqBy([...i, ...e.data.children || []], "code") : e.children = uniqBy([...i, ...e.children || []], "code"),
|
|
2036
|
+
r ? e.data.children = uniqBy([...i, ...e.data.children || []], "code") : e.children = uniqBy([...i, ...e.children || []], "code"), u.loading = !1;
|
|
2053
2037
|
}), n?.(e?.children || []));
|
|
2054
2038
|
}
|
|
2055
|
-
function
|
|
2056
|
-
let r =
|
|
2039
|
+
function y(e, { data: n }) {
|
|
2040
|
+
let r = u.searchData?.length > 0;
|
|
2057
2041
|
return n?.account ? e("div", { style: { display: "flex" } }, [e("el-icon", { style: {
|
|
2058
2042
|
width: "14px",
|
|
2059
2043
|
height: "14px"
|
|
2060
2044
|
} }, e(User_default)), r ? n.fullName : n.name]) : r ? n.fullName : n.name;
|
|
2061
2045
|
}
|
|
2062
|
-
function
|
|
2063
|
-
l.value = !0,
|
|
2046
|
+
function b() {
|
|
2047
|
+
l.value = !0, u.filterText = "", u.searchData = [];
|
|
2064
2048
|
}
|
|
2065
|
-
function
|
|
2066
|
-
if (
|
|
2049
|
+
function x(e) {
|
|
2050
|
+
if (f.value = f.value.filter((n) => n !== e), c.value) {
|
|
2067
2051
|
let n = e.match(/\((.*?)\)/)?.[1];
|
|
2068
2052
|
nextTick(() => {
|
|
2069
2053
|
c.value?.setChecked(n, !1);
|
|
2070
2054
|
});
|
|
2071
2055
|
}
|
|
2072
2056
|
}
|
|
2073
|
-
async function
|
|
2074
|
-
if (!
|
|
2075
|
-
let e = await
|
|
2057
|
+
async function S() {
|
|
2058
|
+
if (!u.filterText?.trim()) return u.searchData = [];
|
|
2059
|
+
let e = await _({
|
|
2076
2060
|
page: 1,
|
|
2077
2061
|
pageSize: 9999,
|
|
2078
|
-
name:
|
|
2062
|
+
name: u.filterText?.trim()
|
|
2079
2063
|
});
|
|
2080
2064
|
if (e.code !== "ok") return VepMessage.error(e.message);
|
|
2081
|
-
|
|
2065
|
+
u.searchData = (e?.table || []).map((e) => ({
|
|
2082
2066
|
...e,
|
|
2083
2067
|
code: e.account
|
|
2084
2068
|
}));
|
|
2085
2069
|
}
|
|
2086
|
-
function
|
|
2070
|
+
function C(e, n) {
|
|
2087
2071
|
let r = n?.checkedNodes?.map((e) => `${e.name}(${e.account ?? e.code})`);
|
|
2088
|
-
|
|
2072
|
+
f.value = uniq([...f.value, ...r]);
|
|
2089
2073
|
}
|
|
2090
|
-
function
|
|
2091
|
-
let e = s === "all" ?
|
|
2074
|
+
function w() {
|
|
2075
|
+
let e = s === "all" ? f.value : f.value?.map((e) => {
|
|
2092
2076
|
let [n, r] = e.split("(");
|
|
2093
2077
|
return {
|
|
2094
2078
|
name: n.trim(),
|
|
2095
2079
|
account: r?.replace(")", "")
|
|
2096
2080
|
}[s] || e.trim();
|
|
2097
2081
|
});
|
|
2098
|
-
i("change", e), i("update:modelValue", e), l.value = !1,
|
|
2082
|
+
i("change", e), i("update:modelValue", e), l.value = !1, E();
|
|
2099
2083
|
}
|
|
2100
|
-
function
|
|
2084
|
+
function T() {
|
|
2101
2085
|
i("update:modelValue", void 0), l.value = !1;
|
|
2102
2086
|
}
|
|
2103
|
-
function
|
|
2104
|
-
return
|
|
2087
|
+
function E() {
|
|
2088
|
+
return u.requiredVisible = m.value && f.value.length === 0, u.requiredVisible;
|
|
2105
2089
|
}
|
|
2106
|
-
return n({ validate:
|
|
2107
|
-
let r = resolveComponent("el-select"), i = resolveComponent("el-input"), a = resolveComponent("el-tree"), s = resolveComponent("el-icon"),
|
|
2090
|
+
return n({ validate: E }), (e, n) => {
|
|
2091
|
+
let r = resolveComponent("el-select"), i = resolveComponent("el-input"), a = resolveComponent("el-tree"), s = resolveComponent("el-icon"), m = resolveComponent("el-button"), g = resolveComponent("el-dialog");
|
|
2108
2092
|
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("div", {
|
|
2109
2093
|
class: "staff-select-trigger",
|
|
2110
|
-
onClick: n[1] ||= (e) => !o.disabled &&
|
|
2094
|
+
onClick: n[1] ||= (e) => !o.disabled && b()
|
|
2111
2095
|
}, [createVNode(r, mergeProps({
|
|
2112
2096
|
...e.$attrs,
|
|
2113
2097
|
...e.$props
|
|
2114
2098
|
}, {
|
|
2115
|
-
modelValue:
|
|
2116
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
2117
|
-
class: { "is-required":
|
|
2118
|
-
options:
|
|
2099
|
+
modelValue: f.value,
|
|
2100
|
+
"onUpdate:modelValue": n[0] ||= (e) => f.value = e,
|
|
2101
|
+
class: { "is-required": u.requiredVisible },
|
|
2102
|
+
options: d.value,
|
|
2119
2103
|
placeholder: "请选择",
|
|
2120
2104
|
multiple: "",
|
|
2121
2105
|
disabled: o.disabled,
|
|
@@ -2143,19 +2127,19 @@ var _hoisted_1$4 = { style: {
|
|
|
2143
2127
|
}, {
|
|
2144
2128
|
default: withCtx(() => [createElementVNode("div", _hoisted_1$4, [createElementVNode("div", _hoisted_2$2, [createVNode(i, {
|
|
2145
2129
|
placeholder: "请输入",
|
|
2146
|
-
modelValue:
|
|
2147
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
2130
|
+
modelValue: u.filterText,
|
|
2131
|
+
"onUpdate:modelValue": n[2] ||= (e) => u.filterText = e,
|
|
2148
2132
|
clearable: "",
|
|
2149
2133
|
"prefix-icon": unref(Search_default),
|
|
2150
|
-
onKeydown: withKeys(
|
|
2134
|
+
onKeydown: withKeys(S, ["enter"])
|
|
2151
2135
|
}, null, 8, ["modelValue", "prefix-icon"]), createVNode(a, {
|
|
2152
|
-
loading:
|
|
2153
|
-
data:
|
|
2136
|
+
loading: u.loading,
|
|
2137
|
+
data: p.value,
|
|
2154
2138
|
props: { label: "fullName" },
|
|
2155
2139
|
"highlight-current": !0,
|
|
2156
|
-
"render-content":
|
|
2157
|
-
load:
|
|
2158
|
-
onCheck:
|
|
2140
|
+
"render-content": y,
|
|
2141
|
+
load: v,
|
|
2142
|
+
onCheck: C,
|
|
2159
2143
|
"show-checkbox": "",
|
|
2160
2144
|
"check-strictly": "",
|
|
2161
2145
|
lazy: "",
|
|
@@ -2163,21 +2147,21 @@ var _hoisted_1$4 = { style: {
|
|
|
2163
2147
|
ref_key: "staffDialogRef",
|
|
2164
2148
|
ref: c,
|
|
2165
2149
|
"node-key": "code"
|
|
2166
|
-
}, null, 8, ["loading", "data"])]), createElementVNode("div", _hoisted_3$1, [createElementVNode("div", _hoisted_4$1, [n[4] ||= createElementVNode("h3", null, "已选择", -1),
|
|
2150
|
+
}, null, 8, ["loading", "data"])]), createElementVNode("div", _hoisted_3$1, [createElementVNode("div", _hoisted_4$1, [n[4] ||= createElementVNode("h3", null, "已选择", -1), f.value.length ? (openBlock(), createElementBlock("span", _hoisted_5$1, "已选择" + toDisplayString(f.value.length) + "个用户", 1)) : createCommentVNode("", !0)]), createElementVNode("div", _hoisted_6$1, [(openBlock(!0), createElementBlock(Fragment, null, renderList(f.value, (e) => (openBlock(), createElementBlock("li", {
|
|
2167
2151
|
key: e,
|
|
2168
2152
|
class: "staff-item"
|
|
2169
2153
|
}, [createElementVNode("span", null, toDisplayString(e), 1), createVNode(s, {
|
|
2170
2154
|
color: "red",
|
|
2171
|
-
onClick: withModifiers((n) =>
|
|
2155
|
+
onClick: withModifiers((n) => x(e), ["stop"])
|
|
2172
2156
|
}, {
|
|
2173
2157
|
default: withCtx(() => [createVNode(unref(CloseBold_default))]),
|
|
2174
2158
|
_: 1
|
|
2175
|
-
}, 8, ["onClick"])]))), 128))])])]), createElementVNode("div", _hoisted_7$1, [createVNode(
|
|
2159
|
+
}, 8, ["onClick"])]))), 128))])])]), createElementVNode("div", _hoisted_7$1, [createVNode(m, { onClick: T }, {
|
|
2176
2160
|
default: withCtx(() => [...n[5] ||= [createTextVNode("取消", -1)]]),
|
|
2177
2161
|
_: 1
|
|
2178
|
-
}), createVNode(
|
|
2162
|
+
}), createVNode(m, {
|
|
2179
2163
|
type: "primary",
|
|
2180
|
-
onClick:
|
|
2164
|
+
onClick: w
|
|
2181
2165
|
}, {
|
|
2182
2166
|
default: withCtx(() => [...n[6] ||= [createTextVNode("确定", -1)]]),
|
|
2183
2167
|
_: 1
|
|
@@ -2186,7 +2170,7 @@ var _hoisted_1$4 = { style: {
|
|
|
2186
2170
|
}, 8, ["modelValue"])], 64);
|
|
2187
2171
|
};
|
|
2188
2172
|
}
|
|
2189
|
-
}), dialog_default = /* @__PURE__ */ _plugin_vue_export_helper_default(dialog_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
2173
|
+
}), dialog_default = /* @__PURE__ */ _plugin_vue_export_helper_default(dialog_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-0bda0c06"]]), index_vue_vue_type_script_setup_true_lang_default$3 = /* @__PURE__ */ defineComponent({
|
|
2190
2174
|
__name: "index",
|
|
2191
2175
|
props: {
|
|
2192
2176
|
multiple: { type: Boolean },
|
|
@@ -2408,7 +2392,7 @@ var _hoisted_1$4 = { style: {
|
|
|
2408
2392
|
"remove"
|
|
2409
2393
|
],
|
|
2410
2394
|
setup(e, { emit: n }) {
|
|
2411
|
-
let r = n, i = e, { type: a = "file", onChange: o, limit: s, action: c, data: l, prop: u, fileList: d, accept: f, ...p } = i, m = c || baseUrl + "/attachment/uploadAttachment", g = { token: localStorage.getItem("TOKEN") || "" }, _ = computed(() => f?.length ? new Set(f.map((e) => e.startsWith(".") ? e.toLowerCase() : `.${e.toLowerCase()}`)) : null), v = (e) => {
|
|
2395
|
+
let r = n, i = e, { type: a = "file", onChange: o, limit: s, action: c, data: l, prop: u, fileList: d, accept: f, ...p } = i, m = c || baseUrl + "/attachment/uploadAttachment", g = computed(() => ({ token: localStorage.getItem("TOKEN") || "" })), _ = computed(() => f?.length ? new Set(f.map((e) => e.startsWith(".") ? e.toLowerCase() : `.${e.toLowerCase()}`)) : null), v = (e) => {
|
|
2412
2396
|
if (!_.value) return !0;
|
|
2413
2397
|
let n = "." + e.name.split(".").pop().toLowerCase();
|
|
2414
2398
|
return _.value.has(n) ? !0 : (VepMessage.warning(`只能上传 ${f?.join("、")} 格式的文件`), !1);
|
|
@@ -2428,7 +2412,7 @@ var _hoisted_1$4 = { style: {
|
|
|
2428
2412
|
}
|
|
2429
2413
|
function T(e, n) {
|
|
2430
2414
|
if (e?.code !== "ok") return VepMessage.error(e?.message);
|
|
2431
|
-
let a = baseUrl + `/attachment/downloadAttachment?objectKey=${e.data?.objectKey}&fileName=${e.data?.fileName}&token=${g.token}`, o = l && u && l[u] ? l[u] : i.fileList || [], s = o.some((r) => r?.uid === n.uid || r?.objectKey === e.data?.objectKey), c;
|
|
2415
|
+
let a = baseUrl + `/attachment/downloadAttachment?objectKey=${e.data?.objectKey}&fileName=${e.data?.fileName}&token=${g.value.token}`, o = l && u && l[u] ? l[u] : i.fileList || [], s = o.some((r) => r?.uid === n.uid || r?.objectKey === e.data?.objectKey), c;
|
|
2432
2416
|
c = s ? o.map((r) => r.uid === n.uid ? {
|
|
2433
2417
|
...r,
|
|
2434
2418
|
status: "success",
|
|
@@ -2450,7 +2434,7 @@ var _hoisted_1$4 = { style: {
|
|
|
2450
2434
|
ref: "uploadInstance",
|
|
2451
2435
|
name: "file",
|
|
2452
2436
|
action: unref(m),
|
|
2453
|
-
headers: g,
|
|
2437
|
+
headers: g.value.value,
|
|
2454
2438
|
"on-change": S,
|
|
2455
2439
|
"on-exceed": C,
|
|
2456
2440
|
"on-remove": w,
|
|
@@ -2463,6 +2447,7 @@ var _hoisted_1$4 = { style: {
|
|
|
2463
2447
|
"before-upload": v
|
|
2464
2448
|
}, p), null, 16, [
|
|
2465
2449
|
"action",
|
|
2450
|
+
"headers",
|
|
2466
2451
|
"file-list",
|
|
2467
2452
|
"count",
|
|
2468
2453
|
"limit"
|
|
@@ -2472,55 +2457,55 @@ var _hoisted_1$4 = { style: {
|
|
|
2472
2457
|
//#endregion
|
|
2473
2458
|
//#region src/hooks/useFetch.ts
|
|
2474
2459
|
function useFetch(e, n = {}) {
|
|
2475
|
-
let { immediate: r = !0, method: i = "GET", onBefore: a, onSuccess: o, onError: s, onFinally: c, ...l } = n, u =
|
|
2460
|
+
let { immediate: r = !0, method: i = "GET", onBefore: a, onSuccess: o, onError: s, onFinally: c, ...l } = n, u = {
|
|
2476
2461
|
method: i,
|
|
2477
2462
|
headers: new Headers({
|
|
2478
2463
|
"Content-Type": "application/json",
|
|
2479
|
-
token:
|
|
2464
|
+
token: localStorage.getItem("TOKEN") ?? "",
|
|
2480
2465
|
...l.headers || {}
|
|
2481
2466
|
})
|
|
2482
|
-
},
|
|
2483
|
-
async function
|
|
2484
|
-
if (
|
|
2485
|
-
|
|
2467
|
+
}, d = ref(!1), f = ref(null), p = ref(null), m = reactive({}), g = !1;
|
|
2468
|
+
async function _() {
|
|
2469
|
+
if (g) return Promise.reject(/* @__PURE__ */ Error("请求正在进行中,请勿重复触发"));
|
|
2470
|
+
g = !0, d.value = !0, p.value = null;
|
|
2486
2471
|
try {
|
|
2487
|
-
|
|
2472
|
+
y = JSON.stringify(toRaw(m)), b = isRef(n.ready) ? n.ready.value : n.ready ?? !0;
|
|
2488
2473
|
let r = baseUrl + e;
|
|
2489
|
-
if (a?.(
|
|
2474
|
+
if (a?.(u) === !1) return Promise.reject(/* @__PURE__ */ Error("请求被 onBefore 钩子取消"));
|
|
2490
2475
|
if (i === "GET") {
|
|
2491
|
-
let e = new URLSearchParams(toRaw(
|
|
2476
|
+
let e = new URLSearchParams(toRaw(m)).toString();
|
|
2492
2477
|
e && (r = `${r}?${e}`);
|
|
2493
|
-
} else
|
|
2494
|
-
let s = await (await fetch(r,
|
|
2495
|
-
return s.code ? ["return.optSuccess", "ok"].includes(s.code) || VepMessage.error(s.message || "未知错误!") : s.data?.success || VepMessage.error(s.message || "未知错误!"),
|
|
2478
|
+
} else u.body = JSON.stringify(toRaw(m));
|
|
2479
|
+
let s = await (await fetch(r, u)).json();
|
|
2480
|
+
return s.code ? ["return.optSuccess", "ok"].includes(s.code) || VepMessage.error(s.message || "未知错误!") : s.data?.success || VepMessage.error(s.message || "未知错误!"), f.value = s, o?.(s), s;
|
|
2496
2481
|
} catch (e) {
|
|
2497
2482
|
let n = e instanceof Error ? e : Error(String(e));
|
|
2498
|
-
throw
|
|
2483
|
+
throw p.value = n, console.error("请求发生错误:", n), s?.(n), n;
|
|
2499
2484
|
} finally {
|
|
2500
|
-
|
|
2485
|
+
d.value = !1, g = !1, c?.();
|
|
2501
2486
|
}
|
|
2502
2487
|
}
|
|
2503
|
-
let
|
|
2488
|
+
let v = null, y = "", b;
|
|
2504
2489
|
watchEffect(() => {
|
|
2505
2490
|
let e = toValue(l.defaultParams);
|
|
2506
|
-
Object.keys(
|
|
2491
|
+
Object.keys(m).forEach((e) => delete m[e]), Object.assign(m, e || {});
|
|
2507
2492
|
let i = isRef(n.ready) ? n.ready.value : n.ready ?? !0;
|
|
2508
|
-
i &&
|
|
2509
|
-
let e = JSON.stringify(toRaw(
|
|
2510
|
-
r &&
|
|
2493
|
+
i && b === !1 && (y = ""), b = i, v && clearTimeout(v), v = setTimeout(() => {
|
|
2494
|
+
let e = JSON.stringify(toRaw(m));
|
|
2495
|
+
r && b && !g && e !== y && (y = e, nextTick(() => _()));
|
|
2511
2496
|
}, 10);
|
|
2512
2497
|
});
|
|
2513
|
-
function
|
|
2514
|
-
for (let e in
|
|
2515
|
-
Object.assign(
|
|
2498
|
+
function x(e) {
|
|
2499
|
+
for (let e in m) m[e] = void 0;
|
|
2500
|
+
Object.assign(m, e);
|
|
2516
2501
|
}
|
|
2517
2502
|
return {
|
|
2518
|
-
execute:
|
|
2519
|
-
loading:
|
|
2520
|
-
data:
|
|
2521
|
-
error:
|
|
2522
|
-
params:
|
|
2523
|
-
setParams:
|
|
2503
|
+
execute: _,
|
|
2504
|
+
loading: d,
|
|
2505
|
+
data: f,
|
|
2506
|
+
error: p,
|
|
2507
|
+
params: m,
|
|
2508
|
+
setParams: x
|
|
2524
2509
|
};
|
|
2525
2510
|
}
|
|
2526
2511
|
//#endregion
|
|
@@ -4639,9 +4624,9 @@ function parseJwt(e) {
|
|
|
4639
4624
|
//#endregion
|
|
4640
4625
|
//#region src/hooks/useUser.ts
|
|
4641
4626
|
function useUser() {
|
|
4642
|
-
let e = localStorage.getItem("TOKEN"), n = reactive(parseJwt(e) || {});
|
|
4627
|
+
let e = () => localStorage.getItem("TOKEN"), n = reactive(parseJwt(e()) || {});
|
|
4643
4628
|
function r() {
|
|
4644
|
-
return parseJwt(e);
|
|
4629
|
+
return parseJwt(e());
|
|
4645
4630
|
}
|
|
4646
4631
|
return {
|
|
4647
4632
|
userInfo: n,
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as e, d as t, f as n, l as r, s as i, u as a } from "../entry-
|
|
1
|
+
import { c as e, d as t, f as n, l as r, s as i, u as a } from "../entry-C17RPT3H.js";
|
|
2
2
|
export { e as useDictionary, n as useFetch, r as useRoute, a as useRouter, t as useTable, i as useUser };
|
package/dist/index.css
CHANGED
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
.staff-tree[data-v-
|
|
145
|
+
.staff-tree[data-v-0bda0c06] {
|
|
146
146
|
position: relative;
|
|
147
147
|
height: 90%;
|
|
148
148
|
overflow-y: auto;
|
|
@@ -150,28 +150,28 @@
|
|
|
150
150
|
border-radius: 4px;
|
|
151
151
|
margin-top: 8px;
|
|
152
152
|
}
|
|
153
|
-
.staff-select-trigger[data-v-
|
|
153
|
+
.staff-select-trigger[data-v-0bda0c06] {
|
|
154
154
|
width: 100%;
|
|
155
155
|
cursor: pointer;
|
|
156
156
|
}
|
|
157
|
-
.staff-select-trigger[data-v-
|
|
157
|
+
.staff-select-trigger[data-v-0bda0c06] .el-select {
|
|
158
158
|
width: 100%;
|
|
159
159
|
pointer-events: none;
|
|
160
160
|
}
|
|
161
161
|
.staff-item {
|
|
162
|
-
&[data-v-
|
|
162
|
+
&[data-v-0bda0c06] {
|
|
163
163
|
line-height: 28px;
|
|
164
164
|
padding: 0% 20px 0% 10px;
|
|
165
165
|
display: flex;
|
|
166
166
|
justify-content: space-between;
|
|
167
167
|
align-items: center;
|
|
168
168
|
}
|
|
169
|
-
&[data-v-
|
|
169
|
+
&[data-v-0bda0c06]:hover {
|
|
170
170
|
background-color: rgba(102, 177, 255, 0.5);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
.is-required {
|
|
174
|
-
&[data-v-
|
|
174
|
+
&[data-v-0bda0c06] .el-select__wrapper {
|
|
175
175
|
border: 1px solid red;
|
|
176
176
|
}
|
|
177
177
|
}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { O as e, _ as t, b as n, v as r, y as i } from "../entry-
|
|
1
|
+
import { O as e, _ as t, b as n, v as r, y as i } from "../entry-C17RPT3H.js";
|
|
2
2
|
export { t as baseUrl, n as request, e as tempToRender, r as uniq, i as uniqBy };
|
package/dist/vep-ui.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, S as i, T as a, a as o, g as s, h as c, i as l, k as u, m as d, n as f, o as p, p as m, r as h, t as g, w as _, x as v } from "./entry-
|
|
1
|
+
import { A as e, C as t, D as n, E as r, S as i, T as a, a as o, g as s, h as c, i as l, k as u, m as d, n as f, o as p, p as m, r as h, t as g, w as _, x as v } from "./entry-C17RPT3H.js";
|
|
2
2
|
export { e as UiCard, i as UiDescriptions, v as UiDialog, a as UiEditor, n as UiFilter, r as UiForm, t as UiInfiniteScroll, d as UiStaffSelect, u as UiTable, _ as UiTree, m as UiUpload, s as WcUtils, o as YcApproval, c as YcMessage, l as YcPageAgent, h as default, h as ycPlugin, g as getHostVue, p as hooks, f as setHostVue };
|