@ebiz/designer-components 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.
package/dist/index.mjs
CHANGED
@@ -117890,26 +117890,26 @@ const na = {
|
|
117890
117890
|
"DEL_DATA",
|
117891
117891
|
"BATCH_DEL_DATA",
|
117892
117892
|
"MULTIPLE_DATA_LINK_SEARCH"
|
117893
|
-
], a = t, { text: o, isNormal: i, disabled: l, type: s, size: u, variant: c, apiConfig: d, data: f } = et(n), v = J("请先设置接口配置"), h = J(!1), p =
|
117894
|
-
if (n.onClick(), a("click",
|
117893
|
+
], a = t, { text: o, isNormal: i, disabled: l, type: s, size: u, variant: c, apiConfig: d, data: f } = et(n), v = J("请先设置接口配置"), h = J(!1), p = async (m) => {
|
117894
|
+
if (n.onClick(), a("click", m), !i.value)
|
117895
117895
|
try {
|
117896
117896
|
h.value = !0, a("loading", !0);
|
117897
|
-
const
|
117898
|
-
if (a("prepare",
|
117897
|
+
const g = await Promise.resolve(n.onPrepare());
|
117898
|
+
if (a("prepare", g), g === !1)
|
117899
117899
|
return null;
|
117900
|
-
const
|
117900
|
+
const y = r[d.value.apiType], w = await na.fetch(f.value, {
|
117901
117901
|
key: d.value.key,
|
117902
117902
|
apiId: d.value.apiId,
|
117903
|
-
apiType:
|
117903
|
+
apiType: y
|
117904
117904
|
});
|
117905
|
-
return a("success",
|
117906
|
-
} catch (
|
117907
|
-
return a("error",
|
117905
|
+
return a("success", w), n.onFinish(w), w;
|
117906
|
+
} catch (g) {
|
117907
|
+
return a("error", g), n.onError(g), null;
|
117908
117908
|
} finally {
|
117909
117909
|
h.value = !1, a("loading", !1);
|
117910
117910
|
}
|
117911
117911
|
};
|
117912
|
-
return (
|
117912
|
+
return (m, g) => (k(), re(Ae(xn), {
|
117913
117913
|
content: !Ae(i) && !Ae(d).apiId ? v.value : "",
|
117914
117914
|
placement: "top"
|
117915
117915
|
}, {
|
@@ -117918,10 +117918,10 @@ const na = {
|
|
117918
117918
|
disabled: Ae(l) || h.value,
|
117919
117919
|
theme: Ae(s),
|
117920
117920
|
size: Ae(u),
|
117921
|
-
onClick:
|
117921
|
+
onClick: p
|
117922
117922
|
}, {
|
117923
117923
|
default: Q(() => [
|
117924
|
-
ne(
|
117924
|
+
ne(m.$slots, "default", {}, () => [
|
117925
117925
|
Se(te(Ae(o)), 1)
|
117926
117926
|
])
|
117927
117927
|
]),
|
@@ -130315,6 +130315,10 @@ const gTt = /* @__PURE__ */ Tt(wAt, [["render", CAt], ["__scopeId", "data-v-d22a
|
|
130315
130315
|
type: [String, Number, Array],
|
130316
130316
|
default: void 0
|
130317
130317
|
},
|
130318
|
+
companyId: {
|
130319
|
+
type: Number,
|
130320
|
+
default: null
|
130321
|
+
},
|
130318
130322
|
placeholder: {
|
130319
130323
|
type: String,
|
130320
130324
|
default: "请选择部门"
|
@@ -130366,7 +130370,10 @@ const gTt = /* @__PURE__ */ Tt(wAt, [["render", CAt], ["__scopeId", "data-v-d22a
|
|
130366
130370
|
};
|
130367
130371
|
}), c = async () => {
|
130368
130372
|
try {
|
130369
|
-
i.value = !0, na.fetch({
|
130373
|
+
i.value = !0, na.fetch({
|
130374
|
+
companyId: n.companyId
|
130375
|
+
}, {
|
130376
|
+
apiKey: "deptAllList",
|
130370
130377
|
apiId: 1933,
|
130371
130378
|
apiType: "MULTIPLE_DATA_SEARCH"
|
130372
130379
|
}).then((d) => {
|
package/package.json
CHANGED
@@ -33,6 +33,10 @@ const props = defineProps({
|
|
33
33
|
type: [String, Number, Array],
|
34
34
|
default: undefined
|
35
35
|
},
|
36
|
+
companyId:{
|
37
|
+
type: Number,
|
38
|
+
default: null,
|
39
|
+
},
|
36
40
|
placeholder: {
|
37
41
|
type: String,
|
38
42
|
default: '请选择部门'
|
@@ -105,7 +109,10 @@ const buildDepartmentTree = (data, parentId = null) => {
|
|
105
109
|
const loadDepartmentData = async () => {
|
106
110
|
try {
|
107
111
|
loading.value = true;
|
108
|
-
dataService.fetch({
|
112
|
+
dataService.fetch({
|
113
|
+
companyId: props.companyId,
|
114
|
+
},{
|
115
|
+
apiKey: 'deptAllList',
|
109
116
|
apiId: 1933,
|
110
117
|
apiType: 'MULTIPLE_DATA_SEARCH'
|
111
118
|
}).then(res => {
|