@aplus-frontend/ui 0.6.0-beta.19 → 0.6.0-beta.20
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/es/src/ap-form/ap-form.vue2.mjs +78 -67
- package/es/src/business/ap-keep-alive/hook.d.ts +1 -1
- package/es/src/business/ap-keep-alive/hook.mjs +13 -11
- package/es/src/business/ap-keep-alive/index.d.ts +6 -0
- package/es/src/business/ap-keep-alive/interface.d.ts +1 -0
- package/es/src/business/ap-keep-alive/interface.mjs +6 -6
- package/es/src/business/ap-keep-alive/keep-alive.d.ts +3 -0
- package/es/src/business/ap-keep-alive/keep-alive.mjs +55 -55
- package/es/src/business/ap-keep-alive/keeper/index.mjs +1 -0
- package/es/src/business/ap-view/ap-view.vue2.mjs +109 -101
- package/es/src/tests/mock-resize-observer.d.ts +2 -0
- package/es/src/tests/utils.d.ts +8 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/es/src/work-order-modal/createWorkOrder.d.ts +2 -1
- package/es/src/work-order-modal/createWorkOrder.mjs +19 -15
- package/es/src/work-order-modal/interfaces.d.ts +4 -0
- package/es/src/work-order-modal/work-order-modal.vue.mjs +120 -105
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/business/ap-keep-alive/hook.d.ts +1 -1
- package/lib/src/business/ap-keep-alive/hook.js +1 -1
- package/lib/src/business/ap-keep-alive/index.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/interface.d.ts +1 -0
- package/lib/src/business/ap-keep-alive/interface.js +1 -1
- package/lib/src/business/ap-keep-alive/keep-alive.d.ts +3 -0
- package/lib/src/business/ap-keep-alive/keep-alive.js +1 -1
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/tests/mock-resize-observer.d.ts +2 -0
- package/lib/src/tests/utils.d.ts +8 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/lib/src/work-order-modal/createWorkOrder.d.ts +2 -1
- package/lib/src/work-order-modal/createWorkOrder.js +1 -1
- package/lib/src/work-order-modal/interfaces.d.ts +4 -0
- package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
- package/package.json +1 -1
- package/theme/index.css +1 -1
- package/theme/text/index.css +1 -1
- package/theme/text/index.less +1 -1
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as q, computed as B, ref as v, createVNode as _, onMounted as H, watch as J, createBlock as Q, openBlock as X, unref as K, mergeProps as Z, withCtx as U, createElementVNode as C, normalizeClass as R } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import
|
|
4
|
-
import { ApBatchActionGroup as
|
|
3
|
+
import S from "./icons/line-down.vue.mjs";
|
|
4
|
+
import { ApBatchActionGroup as D } from "../ap-batch-action-group/index.mjs";
|
|
5
5
|
import "./components/main-button-content.vue.mjs";
|
|
6
6
|
import "./components/menu-list-content.vue.mjs";
|
|
7
|
-
import { useViewProvide as
|
|
8
|
-
import { useInjectApTable as
|
|
9
|
-
import { SYSTEM_VIEW_KEY as
|
|
10
|
-
import { isValid as
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
7
|
+
import { useViewProvide as O } from "./hooks/use-view-provide.mjs";
|
|
8
|
+
import { useInjectApTable as ee } from "../../ap-table/context.mjs";
|
|
9
|
+
import { SYSTEM_VIEW_KEY as w } from "./utils/enum.mjs";
|
|
10
|
+
import { isValid as te } from "@aplus-frontend/utils";
|
|
11
|
+
import "../ap-keep-alive/index.mjs";
|
|
12
|
+
import { useGlobalConfig as se } from "../../config-provider/hooks/use-global-config.mjs";
|
|
13
|
+
import { useNamespace as ie } from "../../config-provider/hooks/use-namespace.mjs";
|
|
14
|
+
import { useLocale as le } from "../../config-provider/hooks/use-locale.mjs";
|
|
15
|
+
import oe from "./components/main-button-content.vue2.mjs";
|
|
16
|
+
import ne from "./components/menu-list-content.vue2.mjs";
|
|
17
|
+
import { useApKeepAliveInject as ae } from "../ap-keep-alive/hook.mjs";
|
|
18
|
+
const xe = /* @__PURE__ */ q({
|
|
17
19
|
name: "ApView",
|
|
18
20
|
__name: "ap-view",
|
|
19
21
|
props: {
|
|
@@ -33,170 +35,176 @@ const ve = /* @__PURE__ */ M({
|
|
|
33
35
|
}
|
|
34
36
|
},
|
|
35
37
|
setup(E, {
|
|
36
|
-
expose:
|
|
38
|
+
expose: T
|
|
37
39
|
}) {
|
|
38
|
-
const
|
|
40
|
+
const r = E, j = se("viewCacheOption"), {
|
|
39
41
|
b
|
|
40
|
-
} =
|
|
41
|
-
t:
|
|
42
|
-
} =
|
|
43
|
-
viewKey:
|
|
44
|
-
viewName:
|
|
42
|
+
} = ie("ap-view"), {
|
|
43
|
+
t: k
|
|
44
|
+
} = le(), g = B(() => ({
|
|
45
|
+
viewKey: w,
|
|
46
|
+
viewName: k("ap.apView.systemView")
|
|
45
47
|
})), {
|
|
46
|
-
getSearchFormValues:
|
|
47
|
-
setSearchFormValues:
|
|
48
|
-
submit:
|
|
49
|
-
reset:
|
|
50
|
-
} =
|
|
48
|
+
getSearchFormValues: L,
|
|
49
|
+
setSearchFormValues: P,
|
|
50
|
+
submit: G,
|
|
51
|
+
reset: I
|
|
52
|
+
} = ee(), $ = v(!1), N = v(!1), V = v("");
|
|
51
53
|
let d = !1, F = !1;
|
|
52
|
-
const
|
|
54
|
+
const M = {
|
|
53
55
|
dropdownType: "dropdown",
|
|
54
|
-
content: _(
|
|
55
|
-
maxViewNum:
|
|
56
|
+
content: _(oe, {
|
|
57
|
+
maxViewNum: r.maxViewNum
|
|
56
58
|
}, null)
|
|
57
59
|
}, o = v([g.value]), Y = B(() => o.value.map((t) => ({
|
|
58
60
|
id: t.viewKey,
|
|
59
|
-
content: _(
|
|
61
|
+
content: _(ne, {
|
|
60
62
|
view: t
|
|
61
63
|
}, null)
|
|
62
64
|
}))), e = {
|
|
63
|
-
getSearchFormValues:
|
|
64
|
-
setSearchFormValues:
|
|
65
|
-
submit:
|
|
66
|
-
reset:
|
|
67
|
-
...
|
|
68
|
-
},
|
|
69
|
-
...
|
|
70
|
-
...
|
|
65
|
+
getSearchFormValues: L,
|
|
66
|
+
setSearchFormValues: P,
|
|
67
|
+
submit: G,
|
|
68
|
+
reset: I,
|
|
69
|
+
...r.saveDataSource
|
|
70
|
+
}, s = {
|
|
71
|
+
...j.value,
|
|
72
|
+
...r.viewCacheOption
|
|
71
73
|
}, x = () => {
|
|
72
|
-
if (
|
|
73
|
-
return
|
|
74
|
-
if ((
|
|
75
|
-
return
|
|
76
|
-
const t = o.value.find((
|
|
77
|
-
return (t == null ? void 0 : t.viewKey) ??
|
|
78
|
-
},
|
|
74
|
+
if (r.isDefaultSystemView)
|
|
75
|
+
return w;
|
|
76
|
+
if ((r.isFirstDefaultSystemView || F) && d)
|
|
77
|
+
return w;
|
|
78
|
+
const t = o.value.find((i) => i.isDefault);
|
|
79
|
+
return (t == null ? void 0 : t.viewKey) ?? w;
|
|
80
|
+
}, c = (t) => {
|
|
79
81
|
V.value = t;
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
var l, n,
|
|
83
|
-
|
|
84
|
-
...Object.fromEntries(Object.keys(((
|
|
85
|
-
...((
|
|
82
|
+
const i = o.value.find((l) => l.viewKey === V.value);
|
|
83
|
+
i && setTimeout(() => {
|
|
84
|
+
var l, n, a, f, m, u;
|
|
85
|
+
i.viewKey === w ? d ? (l = e == null ? void 0 : e.submit) == null || l.call(e) : (n = e == null ? void 0 : e.reset) == null || n.call(e) : ((m = e == null ? void 0 : e.setSearchFormValues) == null || m.call(e, {
|
|
86
|
+
...Object.fromEntries(Object.keys(((a = e == null ? void 0 : e.getSearchFormValues) == null ? void 0 : a.call(e)) ?? {}).map((y) => [y, void 0])) ?? {},
|
|
87
|
+
...((f = i.viewConfig) == null ? void 0 : f.searchForm) ?? {}
|
|
86
88
|
}), (u = e == null ? void 0 : e.submit) == null || u.call(e)), d = !1;
|
|
87
89
|
});
|
|
88
|
-
},
|
|
90
|
+
}, p = {
|
|
89
91
|
getViewList: async (t) => {
|
|
90
|
-
var
|
|
92
|
+
var i;
|
|
91
93
|
try {
|
|
92
94
|
const {
|
|
93
95
|
tableKey: l
|
|
94
|
-
} = t, n = await ((
|
|
96
|
+
} = t, n = await ((i = s == null ? void 0 : s.getViewList) == null ? void 0 : i.call(s, {
|
|
95
97
|
tableKey: l
|
|
96
98
|
}));
|
|
97
|
-
return o.value = [g.value, ...n ?? []],
|
|
99
|
+
return o.value = [g.value, ...n ?? []], c(x()), o.value;
|
|
98
100
|
} catch {
|
|
99
|
-
return o.value = [g.value],
|
|
101
|
+
return o.value = [g.value], c(w), o.value;
|
|
100
102
|
}
|
|
101
103
|
},
|
|
102
104
|
addView: async (t) => {
|
|
103
|
-
var
|
|
105
|
+
var m;
|
|
104
106
|
const {
|
|
105
|
-
tableKey:
|
|
107
|
+
tableKey: i,
|
|
106
108
|
viewKey: l,
|
|
107
109
|
viewName: n,
|
|
108
|
-
isDefault:
|
|
109
|
-
viewConfig:
|
|
110
|
+
isDefault: a,
|
|
111
|
+
viewConfig: f
|
|
110
112
|
} = t;
|
|
111
|
-
await ((
|
|
112
|
-
tableKey:
|
|
113
|
+
await ((m = s == null ? void 0 : s.addView) == null ? void 0 : m.call(s, {
|
|
114
|
+
tableKey: i,
|
|
113
115
|
viewKey: l,
|
|
114
116
|
viewName: n,
|
|
115
|
-
isDefault:
|
|
116
|
-
viewConfig:
|
|
117
|
-
})),
|
|
117
|
+
isDefault: a,
|
|
118
|
+
viewConfig: f
|
|
119
|
+
})), a && (o.value = o.value.map((u) => ({
|
|
118
120
|
...u,
|
|
119
121
|
isDefault: !1
|
|
120
122
|
}))), o.value = [...o.value, {
|
|
121
123
|
viewKey: l,
|
|
122
124
|
viewName: n,
|
|
123
|
-
isDefault:
|
|
124
|
-
viewConfig:
|
|
125
|
-
}],
|
|
125
|
+
isDefault: a,
|
|
126
|
+
viewConfig: f
|
|
127
|
+
}], c(l);
|
|
126
128
|
},
|
|
127
129
|
changeView: async (t) => {
|
|
128
130
|
var u;
|
|
129
131
|
const {
|
|
130
|
-
tableKey:
|
|
132
|
+
tableKey: i,
|
|
131
133
|
viewKey: l,
|
|
132
134
|
viewName: n,
|
|
133
|
-
isDefault:
|
|
134
|
-
viewConfig:
|
|
135
|
+
isDefault: a,
|
|
136
|
+
viewConfig: f
|
|
135
137
|
} = t;
|
|
136
|
-
await ((u =
|
|
137
|
-
tableKey:
|
|
138
|
+
await ((u = s == null ? void 0 : s.changeView) == null ? void 0 : u.call(s, {
|
|
139
|
+
tableKey: i,
|
|
138
140
|
viewKey: l,
|
|
139
141
|
viewName: n,
|
|
140
|
-
isDefault:
|
|
141
|
-
viewConfig:
|
|
142
|
-
})),
|
|
143
|
-
...
|
|
142
|
+
isDefault: a,
|
|
143
|
+
viewConfig: f
|
|
144
|
+
})), a && (o.value = o.value.map((y) => ({
|
|
145
|
+
...y,
|
|
144
146
|
isDefault: !1
|
|
145
147
|
})));
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
+
const m = o.value.find((y) => y.viewKey === l);
|
|
149
|
+
m && (m.viewName = n, m.isDefault = a, m.viewConfig = f), c(l);
|
|
148
150
|
},
|
|
149
151
|
removeView: async (t) => {
|
|
150
152
|
var n;
|
|
151
153
|
const {
|
|
152
|
-
tableKey:
|
|
154
|
+
tableKey: i,
|
|
153
155
|
viewKey: l
|
|
154
156
|
} = t;
|
|
155
|
-
await ((n =
|
|
156
|
-
tableKey:
|
|
157
|
+
await ((n = s == null ? void 0 : s.removeView) == null ? void 0 : n.call(s, {
|
|
158
|
+
tableKey: i,
|
|
157
159
|
viewKey: l
|
|
158
|
-
})), o.value = o.value.filter((
|
|
160
|
+
})), o.value = o.value.filter((a) => a.viewKey !== l), l === V.value && c(x());
|
|
159
161
|
}
|
|
160
162
|
}, z = {
|
|
161
|
-
tableKey:
|
|
163
|
+
tableKey: r.tableKey,
|
|
162
164
|
currentViewKey: V,
|
|
163
|
-
changeCurrentViewKey:
|
|
165
|
+
changeCurrentViewKey: c,
|
|
164
166
|
popoverOpen: $,
|
|
165
167
|
menuOpen: N,
|
|
166
168
|
viewList: o,
|
|
167
|
-
viewListCRUD:
|
|
169
|
+
viewListCRUD: p,
|
|
168
170
|
saveDataSource: e
|
|
169
171
|
};
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
172
|
+
O(z);
|
|
173
|
+
const {
|
|
174
|
+
has: W
|
|
175
|
+
} = ae(), A = (t) => {
|
|
176
|
+
F = t;
|
|
177
|
+
}, h = (t) => {
|
|
178
|
+
var i;
|
|
179
|
+
te(t) && (d = !0, (i = p == null ? void 0 : p.getViewList) == null || i.call(p, {
|
|
173
180
|
tableKey: t
|
|
174
181
|
}));
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
+
};
|
|
183
|
+
return H(async () => {
|
|
184
|
+
await W() && A(!0), h(r.tableKey);
|
|
185
|
+
}), J(() => r.tableKey, (t) => {
|
|
186
|
+
h(t);
|
|
187
|
+
}), T({
|
|
188
|
+
setFirstDefaultSystemView: A
|
|
189
|
+
}), (t, i) => (X(), Q(K(D), Z({
|
|
182
190
|
...t.$attrs
|
|
183
191
|
}, {
|
|
184
192
|
open: N.value,
|
|
185
|
-
"onUpdate:open":
|
|
193
|
+
"onUpdate:open": i[0] || (i[0] = (l) => N.value = l),
|
|
186
194
|
class: [K(b)()],
|
|
187
|
-
"button-props":
|
|
195
|
+
"button-props": M,
|
|
188
196
|
"menu-list": Y.value,
|
|
189
197
|
"overlay-class-name": [K(b)("overlay")],
|
|
190
198
|
trigger: "click",
|
|
191
199
|
placement: "bottom"
|
|
192
200
|
}), {
|
|
193
|
-
icon:
|
|
194
|
-
class:
|
|
195
|
-
}, [_(
|
|
201
|
+
icon: U(() => [C("div", {
|
|
202
|
+
class: R([K(b)("icon")])
|
|
203
|
+
}, [_(S)], 2)]),
|
|
196
204
|
_: 1
|
|
197
205
|
}, 16, ["open", "class", "menu-list", "overlay-class-name"]));
|
|
198
206
|
}
|
|
199
207
|
});
|
|
200
208
|
export {
|
|
201
|
-
|
|
209
|
+
xe as default
|
|
202
210
|
};
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.6.0-beta.
|
|
1
|
+
declare const _default: "0.6.0-beta.20";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { GetOssAccess } from './interfaces';
|
|
2
|
-
|
|
2
|
+
import { Recordable } from '../type';
|
|
3
|
+
export declare function createWorkOrderModal(api: (args?: any) => Promise<any>, getOssAccess: GetOssAccess, initialValues?: Recordable, disabledList?: string[], successCallback?: () => void): void;
|
|
@@ -1,29 +1,33 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as c, createVNode as t, render as n, h as p } from "vue";
|
|
2
2
|
import "./work-order-modal.vue2.mjs";
|
|
3
3
|
import "../config-provider/index.mjs";
|
|
4
|
-
import { ConfigProvider as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { ConfigProvider as u, globalConfigCached as f } from "../config-provider/config-provider.mjs";
|
|
5
|
+
import C from "./work-order-modal.vue.mjs";
|
|
6
|
+
function M(r, a, l = {}, d = [], i = () => {
|
|
7
|
+
}) {
|
|
8
|
+
const m = document.getElementsByTagName("body")[0], e = document.createElement("div");
|
|
9
|
+
m.appendChild(e), n(p(/* @__PURE__ */ c({
|
|
9
10
|
render() {
|
|
10
|
-
return
|
|
11
|
-
default: () => [
|
|
12
|
-
api:
|
|
13
|
-
getOssAccess:
|
|
14
|
-
onModalClose:
|
|
15
|
-
open: !0
|
|
11
|
+
return t(u, f.value, {
|
|
12
|
+
default: () => [t(C, {
|
|
13
|
+
api: r,
|
|
14
|
+
getOssAccess: a,
|
|
15
|
+
onModalClose: s,
|
|
16
|
+
open: !0,
|
|
17
|
+
initialValues: l,
|
|
18
|
+
disabledList: d,
|
|
19
|
+
successCallback: i
|
|
16
20
|
}, null)]
|
|
17
21
|
});
|
|
18
22
|
}
|
|
19
23
|
})), e);
|
|
20
|
-
function
|
|
24
|
+
function s() {
|
|
21
25
|
setTimeout(() => {
|
|
22
26
|
var o;
|
|
23
|
-
|
|
27
|
+
n(null, e), (o = e.parentElement) == null || o.removeChild(e);
|
|
24
28
|
}, 500);
|
|
25
29
|
}
|
|
26
30
|
}
|
|
27
31
|
export {
|
|
28
|
-
|
|
32
|
+
M as createWorkOrderModal
|
|
29
33
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { client } from '@aplus-frontend/oss';
|
|
2
2
|
import { ModalProps } from '@aplus-frontend/antdv';
|
|
3
|
+
import { Recordable } from '../type';
|
|
3
4
|
/**
|
|
4
5
|
* 表单项
|
|
5
6
|
*/
|
|
@@ -21,6 +22,9 @@ export type GetOssAccess = Parameters<typeof client.initOssClient>[0]['getOssAcc
|
|
|
21
22
|
export interface WorkOrderModalProps extends ModalProps {
|
|
22
23
|
api: (args?: any) => Promise<any>;
|
|
23
24
|
getOssAccess: GetOssAccess;
|
|
25
|
+
initialValues?: Recordable;
|
|
26
|
+
disabledList?: string[];
|
|
27
|
+
successCallback?: () => void;
|
|
24
28
|
}
|
|
25
29
|
type LocaleType = 'zh_CN' | 'en_US';
|
|
26
30
|
export declare const langMap: Record<string, LocaleType>;
|