@aplus-frontend/ui 0.0.1 → 0.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/es/src/ap-field/date/index.vue.d.ts +63 -5
- package/es/src/ap-field/date/index.vue.mjs +115 -46
- package/es/src/ap-field/date-range/index.vue.d.ts +68 -6
- package/es/src/ap-field/date-range/index.vue.mjs +135 -62
- package/es/src/ap-field/interface.d.ts +3 -7
- package/es/src/ap-field/select/index.vue.d.ts +45 -179
- package/es/src/ap-field/select/index.vue.mjs +137 -66
- package/es/src/ap-form/items/date/index.vue.mjs +27 -29
- package/es/src/ap-form/items/date-range/index.vue.d.ts +1 -1
- package/es/src/ap-form/items/date-range/index.vue.mjs +27 -29
- package/es/src/ap-form/items/interface.d.ts +1 -1
- package/es/src/ap-form/items/select/index.vue.mjs +32 -32
- package/es/src/ap-table/ap-table.vue.d.ts +12 -8
- package/es/src/ap-table/ap-table.vue.mjs +88 -78
- package/es/src/ap-table/constants.d.ts +3092 -1827
- package/es/src/ap-table/hooks/use-table-paging.mjs +23 -23
- package/es/src/ap-table/interface.d.ts +5 -9
- package/es/src/ap-table/utils.d.ts +18 -0
- package/es/src/ap-table/utils.mjs +45 -17
- package/es/src/theme/antd-global-overwrite/admin/button.css +0 -11
- package/es/src/theme/antd-global-overwrite/admin/index.css +0 -11
- package/es/src/theme/antd-global-overwrite/aplus/button.css +0 -11
- package/es/src/theme/antd-global-overwrite/aplus/index.css +0 -11
- package/es/src/utils/index.d.ts +8 -0
- package/es/src/utils/index.mjs +40 -32
- package/es/src/work-order-modal/work-order-modal.vue.mjs +6 -8
- package/lib/src/ap-field/date/index.vue.d.ts +63 -5
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.d.ts +68 -6
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +3 -7
- package/lib/src/ap-field/select/index.vue.d.ts +45 -179
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/interface.d.ts +1 -1
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +12 -8
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +3092 -1827
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-table/interface.d.ts +5 -9
- package/lib/src/ap-table/utils.d.ts +18 -0
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/theme/antd-global-overwrite/admin/button.css +0 -11
- package/lib/src/theme/antd-global-overwrite/admin/index.css +0 -11
- package/lib/src/theme/antd-global-overwrite/aplus/button.css +0 -11
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +0 -11
- package/lib/src/utils/index.d.ts +8 -0
- package/lib/src/utils/index.js +1 -1
- package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
- package/package.json +3 -3
|
@@ -17,11 +17,11 @@ const ae = ({
|
|
|
17
17
|
sortFields: E = []
|
|
18
18
|
}) => {
|
|
19
19
|
let F = 0, f = {};
|
|
20
|
-
const L = (e) => T ? T(e) : e,
|
|
20
|
+
const L = (e) => T ? T(e) : e, i = v(), l = v(y), g = v(S), { t: V } = Y(), n = v({
|
|
21
21
|
total: 0,
|
|
22
22
|
records: A,
|
|
23
23
|
loading: !1
|
|
24
|
-
}),
|
|
24
|
+
}), b = async (e) => {
|
|
25
25
|
var o;
|
|
26
26
|
const a = L(e), t = Date.now();
|
|
27
27
|
F = t, n.value.loading = !0;
|
|
@@ -36,7 +36,7 @@ const ae = ({
|
|
|
36
36
|
} finally {
|
|
37
37
|
n.value.loading = !1;
|
|
38
38
|
}
|
|
39
|
-
},
|
|
39
|
+
}, w = (e) => {
|
|
40
40
|
const a = {};
|
|
41
41
|
return Object.entries(e).forEach(([t, o]) => {
|
|
42
42
|
if (a[t] = o, z && o) {
|
|
@@ -45,30 +45,30 @@ const ae = ({
|
|
|
45
45
|
}
|
|
46
46
|
}), a;
|
|
47
47
|
}, M = (e) => {
|
|
48
|
-
var o, s, d, p, m, u,
|
|
49
|
-
const a = ((s = (o =
|
|
48
|
+
var o, s, d, p, m, u, c;
|
|
49
|
+
const a = ((s = (o = i.value) == null ? void 0 : o.apForm) == null ? void 0 : s.getFieldsValue()) || {}, t = {};
|
|
50
50
|
Object.entries(a).forEach(([$, K]) => {
|
|
51
51
|
P && P.indexOf($) > -1 && (t[$] = K);
|
|
52
|
-
}), (p = (d =
|
|
52
|
+
}), (p = (d = i.value) == null ? void 0 : d.apForm) == null || p.resetFields(), (c = (u = (m = i.value) == null ? void 0 : m.apForm) == null ? void 0 : u.setFieldsValue) == null || c.call(u, t), e == null || e();
|
|
53
53
|
}, h = (e) => {
|
|
54
54
|
f = e;
|
|
55
|
-
const a =
|
|
56
|
-
|
|
55
|
+
const a = w(e);
|
|
56
|
+
b(a);
|
|
57
57
|
}, q = (e) => {
|
|
58
58
|
h({
|
|
59
59
|
...f,
|
|
60
60
|
...e
|
|
61
61
|
});
|
|
62
|
-
},
|
|
62
|
+
}, C = () => {
|
|
63
63
|
var a, t;
|
|
64
|
-
const e = ((t = (a =
|
|
64
|
+
const e = ((t = (a = i.value) == null ? void 0 : a.apForm) == null ? void 0 : t.getFieldsValue(!0)) || {};
|
|
65
65
|
h({
|
|
66
66
|
...e,
|
|
67
|
-
|
|
67
|
+
current: 1,
|
|
68
68
|
pageSize: f.pageSize || S
|
|
69
69
|
});
|
|
70
70
|
}, J = () => {
|
|
71
|
-
M(
|
|
71
|
+
M(C);
|
|
72
72
|
}, Q = () => {
|
|
73
73
|
h(f);
|
|
74
74
|
}, G = (e) => {
|
|
@@ -78,14 +78,14 @@ const ae = ({
|
|
|
78
78
|
});
|
|
79
79
|
}, O = (e, a, t) => {
|
|
80
80
|
var m, u;
|
|
81
|
-
const o = ((u = (m =
|
|
81
|
+
const o = ((u = (m = i.value) == null ? void 0 : m.apForm) == null ? void 0 : u.getFieldsValue(!0)) || {};
|
|
82
82
|
l.value = e.current, g.value = e.pageSize;
|
|
83
83
|
const s = X(t) ? [...t] : [t], d = {};
|
|
84
|
-
for (const
|
|
85
|
-
E.includes(
|
|
84
|
+
for (const c of s)
|
|
85
|
+
E.includes(c.field) && (d[W(c.field)] = c.order);
|
|
86
86
|
const p = {};
|
|
87
|
-
for (const
|
|
88
|
-
B.includes(
|
|
87
|
+
for (const c of Object.keys(a))
|
|
88
|
+
B.includes(c) && (p[c] = a[c]);
|
|
89
89
|
h({
|
|
90
90
|
...o,
|
|
91
91
|
filter: p,
|
|
@@ -96,14 +96,14 @@ const ae = ({
|
|
|
96
96
|
};
|
|
97
97
|
N(() => {
|
|
98
98
|
var a, t;
|
|
99
|
-
const e = ((t = (a =
|
|
99
|
+
const e = ((t = (a = i.value) == null ? void 0 : a.apForm) == null ? void 0 : t.getFieldsValue(!0)) || {};
|
|
100
100
|
if (f = {
|
|
101
101
|
current: r(l),
|
|
102
102
|
pageSize: r(g),
|
|
103
103
|
...e
|
|
104
104
|
}, !x) {
|
|
105
|
-
const o =
|
|
106
|
-
|
|
105
|
+
const o = w(f);
|
|
106
|
+
b(o);
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
const H = j(() => r(n).total === 0 ? "-" : `${r(l.value)}/${Math.ceil(
|
|
@@ -116,7 +116,7 @@ const ae = ({
|
|
|
116
116
|
total: r(n).total,
|
|
117
117
|
showSizeChanger: !0,
|
|
118
118
|
showQuickJumper: !0,
|
|
119
|
-
showTotal: (e) => `${
|
|
119
|
+
showTotal: (e) => `${V("ap.apTable.pagination.totalLeft", { total: e })} ${V(
|
|
120
120
|
"ap.apTable.pagination.totalRight",
|
|
121
121
|
{ page: r(H) }
|
|
122
122
|
)}`
|
|
@@ -125,8 +125,8 @@ const ae = ({
|
|
|
125
125
|
dataSource: r(n).records
|
|
126
126
|
}));
|
|
127
127
|
return {
|
|
128
|
-
formRef:
|
|
129
|
-
submit:
|
|
128
|
+
formRef: i,
|
|
129
|
+
submit: C,
|
|
130
130
|
reset: J,
|
|
131
131
|
refresh: Q,
|
|
132
132
|
refreshByDelete: G,
|
|
@@ -7,7 +7,7 @@ import { CSSProperties } from 'vue';
|
|
|
7
7
|
import { ApActionGroupProps } from '../ap-action';
|
|
8
8
|
import { ApTableIndexProps } from './components/interface';
|
|
9
9
|
|
|
10
|
-
type
|
|
10
|
+
export type ValueEnumType = {
|
|
11
11
|
text: string;
|
|
12
12
|
status?: string;
|
|
13
13
|
color?: string;
|
|
@@ -44,7 +44,7 @@ export type ApTableValueFields = {
|
|
|
44
44
|
*/
|
|
45
45
|
index: ApTableIndexProps;
|
|
46
46
|
};
|
|
47
|
-
export type ValueEnum = Record<string,
|
|
47
|
+
export type ValueEnum = Record<string, ValueEnumType>;
|
|
48
48
|
export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children'> & {
|
|
49
49
|
sorter?: string | boolean | CompareFn<T> | {
|
|
50
50
|
compare?: CompareFn<T>;
|
|
@@ -75,8 +75,7 @@ export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text'> =
|
|
|
75
75
|
*/
|
|
76
76
|
hideInTable?: boolean;
|
|
77
77
|
/**
|
|
78
|
-
* 值的枚举,会自动转化把值当成 key 来取出要显示的内容(也会作为select
|
|
79
|
-
* @deprecated 未实现请使用`fieldProps.options`
|
|
78
|
+
* 值的枚举,会自动转化把值当成 key 来取出要显示的内容(也会作为select等组件的选项)
|
|
80
79
|
*/
|
|
81
80
|
valueEnum?: ValueEnum;
|
|
82
81
|
/**
|
|
@@ -111,9 +110,7 @@ export type ApTableProps<RecordType = any, ParamsType = any, ValueType extends k
|
|
|
111
110
|
params?: ParamsType;
|
|
112
111
|
/**
|
|
113
112
|
* 自定义渲染搜索表单
|
|
114
|
-
* @
|
|
115
|
-
* @param defaultDom
|
|
116
|
-
* @returns
|
|
113
|
+
* @deprecated 未实现 暂不可用
|
|
117
114
|
*/
|
|
118
115
|
searchFormRender?: (props: ApTableProps<RecordType, ParamsType, ValueType>, defaultDom: any) => any;
|
|
119
116
|
/**
|
|
@@ -129,7 +126,7 @@ export type ApTableProps<RecordType = any, ParamsType = any, ValueType extends k
|
|
|
129
126
|
}) => Promise<Partial<RequestData<RecordType>>>;
|
|
130
127
|
/**
|
|
131
128
|
* 数据加载完成后触发
|
|
132
|
-
* @
|
|
129
|
+
* @deprecated 已弃用,请自行实现类似效果
|
|
133
130
|
* @returns
|
|
134
131
|
*/
|
|
135
132
|
onLoad?: (data: RecordType[]) => void;
|
|
@@ -181,4 +178,3 @@ export type ApTableExpose = {
|
|
|
181
178
|
submit: () => void;
|
|
182
179
|
reset: () => void;
|
|
183
180
|
};
|
|
184
|
-
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ValueEnum, ValueEnumType } from './interface';
|
|
2
|
+
|
|
1
3
|
export type FieldValueType = 'multiple' | 'multipleNumber' | 'dayjs' | 'dayjsRange' | 'dayjsDayRange' | 'number' | 'boolean' | 'object';
|
|
2
4
|
export declare const formatParamsValueType: (type: FieldValueType | Record<string, FieldValueType>, value: any, cb: (t: FieldValueType, value: any) => any) => any;
|
|
3
5
|
/**
|
|
@@ -12,3 +14,19 @@ export declare const parseFieldValue: (t: FieldValueType, value: any) => any;
|
|
|
12
14
|
* @returns
|
|
13
15
|
*/
|
|
14
16
|
export declare function dataIndexToStr(dataIndex: string | number | (string | number)[]): string | number;
|
|
17
|
+
type OptionType = {
|
|
18
|
+
label?: string;
|
|
19
|
+
text?: string;
|
|
20
|
+
value?: any;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
};
|
|
24
|
+
type ValueEnumMap = Map<string | number | boolean, ValueEnumType>;
|
|
25
|
+
export declare const objectToMap: (value: ValueEnum | undefined) => ValueEnumMap;
|
|
26
|
+
/**
|
|
27
|
+
* valueEnum转options array
|
|
28
|
+
* @param valueEnumParams
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
export declare const valueEnumToArray: (valueEnumParams: ValueEnum) => OptionType;
|
|
32
|
+
export {};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { isObject as
|
|
2
|
-
const
|
|
3
|
-
let
|
|
4
|
-
return t
|
|
5
|
-
t
|
|
6
|
-
}) :
|
|
7
|
-
},
|
|
8
|
-
switch (
|
|
1
|
+
import { isObject as c, isArray as a } from "lodash-unified";
|
|
2
|
+
const u = (t, r, n) => {
|
|
3
|
+
let o = {};
|
|
4
|
+
return c(t) ? Object.keys(t).forEach((s) => {
|
|
5
|
+
c(t[s]) ? o[s] = u(t[s], r[s], n) : o[s] = n(t[s], r);
|
|
6
|
+
}) : o = n(t, r), o;
|
|
7
|
+
}, d = (t, r) => {
|
|
8
|
+
switch (t) {
|
|
9
9
|
case "dayjs":
|
|
10
10
|
return r.valueOf();
|
|
11
11
|
case "dayjsRange":
|
|
12
|
-
return r.map((
|
|
12
|
+
return r.map((n) => n.valueOf());
|
|
13
13
|
case "dayjsDayRange": {
|
|
14
|
-
const [
|
|
15
|
-
return [
|
|
14
|
+
const [n, o] = r;
|
|
15
|
+
return [n.startOf("day").valueOf(), o.endOf("day").valueOf()];
|
|
16
16
|
}
|
|
17
17
|
case "multiple":
|
|
18
18
|
case "multipleNumber":
|
|
19
|
-
return
|
|
19
|
+
return a(r) ? r : [r];
|
|
20
20
|
case "boolean":
|
|
21
21
|
return r;
|
|
22
22
|
case "object":
|
|
@@ -25,11 +25,39 @@ const f = (e, r, s) => {
|
|
|
25
25
|
return r;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
function
|
|
29
|
-
return
|
|
28
|
+
function p(t) {
|
|
29
|
+
return a(t) ? t.join(".") : t;
|
|
30
30
|
}
|
|
31
|
+
function f(t) {
|
|
32
|
+
const r = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
|
|
33
|
+
return r === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : r;
|
|
34
|
+
}
|
|
35
|
+
const i = (t) => f(t) === "map" ? t : new Map(Object.entries(t || {})), b = (t) => {
|
|
36
|
+
const r = [], n = i(t);
|
|
37
|
+
return n.forEach((o, s) => {
|
|
38
|
+
const e = n.get(s) || n.get(`${s}`);
|
|
39
|
+
if (e) {
|
|
40
|
+
if (typeof e == "object" && (e != null && e.text)) {
|
|
41
|
+
r.push({
|
|
42
|
+
text: e == null ? void 0 : e.text,
|
|
43
|
+
value: s,
|
|
44
|
+
label: e == null ? void 0 : e.text,
|
|
45
|
+
disabled: e.disabled
|
|
46
|
+
});
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
r.push({
|
|
50
|
+
text: e,
|
|
51
|
+
label: e,
|
|
52
|
+
value: s
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}), r;
|
|
56
|
+
};
|
|
31
57
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
58
|
+
p as dataIndexToStr,
|
|
59
|
+
u as formatParamsValueType,
|
|
60
|
+
i as objectToMap,
|
|
61
|
+
d as parseFieldValue,
|
|
62
|
+
b as valueEnumToArray
|
|
35
63
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
.ant-btn {
|
|
2
|
-
min-width: 88px;
|
|
3
2
|
box-shadow: none;
|
|
4
3
|
}
|
|
5
4
|
.ant-btn-primary[disabled],
|
|
@@ -26,13 +25,3 @@
|
|
|
26
25
|
.ant-btn-text[disabled]:hover {
|
|
27
26
|
color: rgba(24, 144, 255, 0.2) !important;
|
|
28
27
|
}
|
|
29
|
-
.ant-form-item-control-input-content [text='重置'],
|
|
30
|
-
.ant-form-item-control-input-content [text='查询'],
|
|
31
|
-
.ant-form-item-control-input-content [text='Reset'],
|
|
32
|
-
.ant-form-item-control-input-content [text='Search'] {
|
|
33
|
-
min-width: 0;
|
|
34
|
-
}
|
|
35
|
-
.ant-btn-link,
|
|
36
|
-
.ant-btn-text {
|
|
37
|
-
min-width: 0;
|
|
38
|
-
}
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
border: 1px solid rgba(255, 77, 79, 0.4);
|
|
47
47
|
}
|
|
48
48
|
.ant-btn {
|
|
49
|
-
min-width: 88px;
|
|
50
49
|
box-shadow: none;
|
|
51
50
|
}
|
|
52
51
|
.ant-btn-primary[disabled],
|
|
@@ -73,16 +72,6 @@
|
|
|
73
72
|
.ant-btn-text[disabled]:hover {
|
|
74
73
|
color: rgba(24, 144, 255, 0.2) !important;
|
|
75
74
|
}
|
|
76
|
-
.ant-form-item-control-input-content [text='重置'],
|
|
77
|
-
.ant-form-item-control-input-content [text='查询'],
|
|
78
|
-
.ant-form-item-control-input-content [text='Reset'],
|
|
79
|
-
.ant-form-item-control-input-content [text='Search'] {
|
|
80
|
-
min-width: 0;
|
|
81
|
-
}
|
|
82
|
-
.ant-btn-link,
|
|
83
|
-
.ant-btn-text {
|
|
84
|
-
min-width: 0;
|
|
85
|
-
}
|
|
86
75
|
.ant-form .ant-form-item label {
|
|
87
76
|
font-weight: normal;
|
|
88
77
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
.ant-btn {
|
|
2
|
-
min-width: 88px;
|
|
3
2
|
box-shadow: none;
|
|
4
3
|
}
|
|
5
4
|
.ant-btn-primary[disabled],
|
|
@@ -26,13 +25,3 @@
|
|
|
26
25
|
.ant-btn-text[disabled]:hover {
|
|
27
26
|
color: #cce2ff !important;
|
|
28
27
|
}
|
|
29
|
-
.ant-form-item-control-input-content [text='重置'],
|
|
30
|
-
.ant-form-item-control-input-content [text='查询'],
|
|
31
|
-
.ant-form-item-control-input-content [text='Reset'],
|
|
32
|
-
.ant-form-item-control-input-content [text='Search'] {
|
|
33
|
-
min-width: 0;
|
|
34
|
-
}
|
|
35
|
-
.ant-btn-link,
|
|
36
|
-
.ant-btn-text {
|
|
37
|
-
min-width: 0;
|
|
38
|
-
}
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
border: 1px solid rgba(255, 77, 79, 0.4);
|
|
47
47
|
}
|
|
48
48
|
.ant-btn {
|
|
49
|
-
min-width: 88px;
|
|
50
49
|
box-shadow: none;
|
|
51
50
|
}
|
|
52
51
|
.ant-btn-primary[disabled],
|
|
@@ -73,16 +72,6 @@
|
|
|
73
72
|
.ant-btn-text[disabled]:hover {
|
|
74
73
|
color: #cce2ff !important;
|
|
75
74
|
}
|
|
76
|
-
.ant-form-item-control-input-content [text='重置'],
|
|
77
|
-
.ant-form-item-control-input-content [text='查询'],
|
|
78
|
-
.ant-form-item-control-input-content [text='Reset'],
|
|
79
|
-
.ant-form-item-control-input-content [text='Search'] {
|
|
80
|
-
min-width: 0;
|
|
81
|
-
}
|
|
82
|
-
.ant-btn-link,
|
|
83
|
-
.ant-btn-text {
|
|
84
|
-
min-width: 0;
|
|
85
|
-
}
|
|
86
75
|
.ant-form .ant-form-item label {
|
|
87
76
|
font-weight: normal;
|
|
88
77
|
}
|
package/es/src/utils/index.d.ts
CHANGED
|
@@ -20,3 +20,11 @@ export declare function isPascalCase(str: string): boolean;
|
|
|
20
20
|
* @returns
|
|
21
21
|
*/
|
|
22
22
|
export declare function convertReactiveToRaw(obj: Recordable<any>): Recordable<any>;
|
|
23
|
+
/**
|
|
24
|
+
* 删除对象中为undefined的key
|
|
25
|
+
* @param value
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
export declare function omitUndefined(value: Recordable<any>): {
|
|
29
|
+
[x: string]: any;
|
|
30
|
+
};
|
package/es/src/utils/index.mjs
CHANGED
|
@@ -1,43 +1,51 @@
|
|
|
1
|
-
import { unref as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { unref as s, markRaw as u } from "vue";
|
|
2
|
+
import { isUndefined as a } from "lodash-unified";
|
|
3
|
+
function p(e) {
|
|
4
|
+
return (e == null ? void 0 : e.parentNode) ?? document.body;
|
|
4
5
|
}
|
|
5
|
-
function
|
|
6
|
-
return typeof
|
|
6
|
+
function m(e) {
|
|
7
|
+
return typeof e < "u";
|
|
7
8
|
}
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
return Object.keys(
|
|
11
|
-
|
|
12
|
-
}),
|
|
9
|
+
function d(e) {
|
|
10
|
+
const t = {};
|
|
11
|
+
return Object.keys(e).map((n) => {
|
|
12
|
+
t[n] = s(e[n]);
|
|
13
|
+
}), t;
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
-
const r = Object.assign({},
|
|
16
|
-
for (let
|
|
17
|
-
const
|
|
18
|
-
(
|
|
15
|
+
function g(e, t = [], n) {
|
|
16
|
+
const r = Object.assign({}, e), i = Object.keys(r);
|
|
17
|
+
for (let c = 0; c < i.length; c += 1) {
|
|
18
|
+
const o = i[c];
|
|
19
|
+
(t.includes(o) || n != null && n(o, r[o])) && delete r[o];
|
|
19
20
|
}
|
|
20
21
|
return r;
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
return /^[A-Z][A-Za-z]*$/.test(
|
|
23
|
+
function k(e) {
|
|
24
|
+
return /^[A-Z][A-Za-z]*$/.test(e);
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
if (Array.isArray(
|
|
27
|
-
return
|
|
28
|
-
if (typeof
|
|
29
|
-
const
|
|
30
|
-
for (const n in
|
|
31
|
-
|
|
32
|
-
return
|
|
26
|
+
function f(e) {
|
|
27
|
+
if (Array.isArray(e))
|
|
28
|
+
return e.map((t) => f(t));
|
|
29
|
+
if (typeof e == "object" && e !== null) {
|
|
30
|
+
const t = {};
|
|
31
|
+
for (const n in e)
|
|
32
|
+
t[n] = f(e[n]);
|
|
33
|
+
return u(t);
|
|
33
34
|
}
|
|
34
|
-
return
|
|
35
|
+
return e;
|
|
36
|
+
}
|
|
37
|
+
function O(e) {
|
|
38
|
+
const t = { ...e };
|
|
39
|
+
for (const n of Object.keys(t))
|
|
40
|
+
a(t[n]) && delete t[n];
|
|
41
|
+
return console.log("copy", t), t;
|
|
35
42
|
}
|
|
36
43
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
f as convertReactiveToRaw,
|
|
45
|
+
d as getDynamicProps,
|
|
46
|
+
p as getPopupContainer,
|
|
47
|
+
m as isDef,
|
|
48
|
+
k as isPascalCase,
|
|
49
|
+
O as omitUndefined,
|
|
50
|
+
g as omitWhen
|
|
43
51
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as F, ref as c, openBlock as w, createElementBlock as T, createVNode as t, unref as e, mergeProps as N, h as m, withCtx as l } from "vue";
|
|
2
|
-
import { message as O, Modal as A, Input as L, Textarea as
|
|
2
|
+
import { message as O, Modal as A, Input as L, Textarea as q } from "ant-design-vue";
|
|
3
3
|
import { ApForm as r } from "../ap-form/index.mjs";
|
|
4
4
|
import "./help-message.vue.mjs";
|
|
5
5
|
import "../ap-upload/index.mjs";
|
|
6
6
|
import { DictCode as k } from "./interfaces.mjs";
|
|
7
7
|
import "../config-provider/index.mjs";
|
|
8
8
|
import "./style/index.css";
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
import { useGlobalConfig as
|
|
9
|
+
import { useNamespace as I } from "../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
import { useGlobalConfig as P } from "../config-provider/hooks/use-global-config.mjs";
|
|
11
11
|
import { useLocale as R } from "../config-provider/hooks/use-locale.mjs";
|
|
12
12
|
import S from "../ap-form/items/select/index.vue.mjs";
|
|
13
13
|
import $ from "../ap-form/items/radio/index.vue.mjs";
|
|
@@ -59,7 +59,7 @@ const oe = /* @__PURE__ */ F({
|
|
|
59
59
|
},
|
|
60
60
|
emits: ["modalClose"],
|
|
61
61
|
setup(x, { emit: C }) {
|
|
62
|
-
const { b: v, e: D } =
|
|
62
|
+
const { b: v, e: D } = I("work-order-modal"), p = c(), a = c(!1), u = c(!0), i = x, _ = P("api"), { lang: b } = R(), h = C, f = async (n) => {
|
|
63
63
|
var s, y;
|
|
64
64
|
const o = await ((y = (s = _.value) == null ? void 0 : s.select) == null ? void 0 : y.call(s, {
|
|
65
65
|
dictCode: n,
|
|
@@ -122,9 +122,7 @@ const oe = /* @__PURE__ */ F({
|
|
|
122
122
|
name: "ticketsType",
|
|
123
123
|
rules: [{ required: !0, message: "不可为空" }],
|
|
124
124
|
field: {
|
|
125
|
-
|
|
126
|
-
placeholder: "请选择"
|
|
127
|
-
},
|
|
125
|
+
placeholder: "请选择",
|
|
128
126
|
request: () => f(e(k).TicketsType)
|
|
129
127
|
}
|
|
130
128
|
}, null, 8, ["field"]),
|
|
@@ -134,7 +132,7 @@ const oe = /* @__PURE__ */ F({
|
|
|
134
132
|
rules: [{ required: !0, message: "不可为空" }]
|
|
135
133
|
}, {
|
|
136
134
|
default: l(() => [
|
|
137
|
-
t(e(
|
|
135
|
+
t(e(q), {
|
|
138
136
|
placeholder: "请输入",
|
|
139
137
|
maxlength: 300,
|
|
140
138
|
"show-count": !0
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { default as dayjs } from 'dayjs';
|
|
1
2
|
import { ApFieldDateProps, FieldMode } from '../interface';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
-
import {
|
|
3
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, VNode, RendererNode, RendererElement, PropType } from 'vue';
|
|
4
|
+
import { SharedTimeProps } from 'ant-design-vue/es/vc-picker/panels/TimePanel';
|
|
4
5
|
|
|
5
6
|
type ApFieldDataSlots = {
|
|
6
7
|
dateRender: any;
|
|
@@ -18,19 +19,76 @@ type ApFieldDataSlots = {
|
|
|
18
19
|
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldDateProps>, {
|
|
19
20
|
format: string;
|
|
20
21
|
mode: string;
|
|
21
|
-
|
|
22
|
+
emptyText: string;
|
|
23
|
+
allowClear: undefined;
|
|
24
|
+
autofocus: undefined;
|
|
25
|
+
bordered: undefined;
|
|
26
|
+
clearIcon: undefined;
|
|
27
|
+
defaultOpen: undefined;
|
|
28
|
+
disabled: undefined;
|
|
29
|
+
hideDisabledOptions: undefined;
|
|
30
|
+
inputReadOnly: undefined;
|
|
31
|
+
open: undefined;
|
|
32
|
+
showHour: undefined;
|
|
33
|
+
showMinute: undefined;
|
|
34
|
+
showNow: undefined;
|
|
35
|
+
showSecond: undefined;
|
|
36
|
+
showTime: undefined;
|
|
37
|
+
showToday: undefined;
|
|
38
|
+
suffixIcon: undefined;
|
|
39
|
+
use12Hours: undefined;
|
|
22
40
|
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
23
41
|
"update:value": (...args: any[]) => void;
|
|
24
42
|
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldDateProps>, {
|
|
25
43
|
format: string;
|
|
26
44
|
mode: string;
|
|
27
|
-
|
|
45
|
+
emptyText: string;
|
|
46
|
+
allowClear: undefined;
|
|
47
|
+
autofocus: undefined;
|
|
48
|
+
bordered: undefined;
|
|
49
|
+
clearIcon: undefined;
|
|
50
|
+
defaultOpen: undefined;
|
|
51
|
+
disabled: undefined;
|
|
52
|
+
hideDisabledOptions: undefined;
|
|
53
|
+
inputReadOnly: undefined;
|
|
54
|
+
open: undefined;
|
|
55
|
+
showHour: undefined;
|
|
56
|
+
showMinute: undefined;
|
|
57
|
+
showNow: undefined;
|
|
58
|
+
showSecond: undefined;
|
|
59
|
+
showTime: undefined;
|
|
60
|
+
showToday: undefined;
|
|
61
|
+
suffixIcon: undefined;
|
|
62
|
+
use12Hours: undefined;
|
|
28
63
|
}>>> & {
|
|
29
64
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
30
65
|
}, {
|
|
66
|
+
disabled: boolean;
|
|
67
|
+
open: boolean;
|
|
68
|
+
autofocus: boolean;
|
|
31
69
|
mode: FieldMode;
|
|
70
|
+
suffixIcon: string | number | boolean | void | VNode<RendererNode, RendererElement, {
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}> | (string | number | boolean | void | VNode<RendererNode, RendererElement, {
|
|
73
|
+
[key: string]: any;
|
|
74
|
+
}> | null | undefined)[] | VNode<RendererNode, RendererElement, {
|
|
75
|
+
[key: string]: any;
|
|
76
|
+
}> | null;
|
|
77
|
+
bordered: boolean;
|
|
78
|
+
clearIcon: string | number | boolean | void | VNode<RendererNode, RendererElement, {
|
|
79
|
+
[key: string]: any;
|
|
80
|
+
}> | (string | number | boolean | void | VNode<RendererNode, RendererElement, {
|
|
81
|
+
[key: string]: any;
|
|
82
|
+
}> | null | undefined)[] | VNode<RendererNode, RendererElement, {
|
|
83
|
+
[key: string]: any;
|
|
84
|
+
}> | null;
|
|
85
|
+
allowClear: boolean;
|
|
86
|
+
defaultOpen: boolean;
|
|
32
87
|
format: string;
|
|
33
|
-
|
|
88
|
+
inputReadOnly: boolean;
|
|
89
|
+
showToday: boolean;
|
|
90
|
+
showTime: boolean | SharedTimeProps<dayjs.Dayjs>;
|
|
91
|
+
emptyText: string;
|
|
34
92
|
}, {}>, Readonly<ApFieldDataSlots> & ApFieldDataSlots>;
|
|
35
93
|
export default _default;
|
|
36
94
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("dayjs"),b=require("ant-design-vue"),f=require("./constant.js");require("../../hooks/index.js");const c=require("lodash-unified"),m=require("./helper.js"),S=require("../../hooks/useControllableValue.js"),_=e.defineComponent({name:"ApFieldDate",__name:"index",props:{mode:{default:"edit"},dropdownClassName:{},dropdownAlign:{},popupStyle:{},transitionName:{},placeholder:{},allowClear:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},tabindex:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},inputReadOnly:{type:Boolean,default:void 0},id:{},presets:{},suffixIcon:{type:[Object,String,Number,Boolean,null,Array],default:void 0},clearIcon:{type:[Object,String,Number,Boolean,null,Array],default:void 0},getPopupContainer:{},panelRender:{},inputRender:{},onOpenChange:{},onPanelChange:{},onFocus:{},onBlur:{},onMousedown:{},onMouseup:{},onMouseenter:{},onMouseleave:{},onClick:{},onContextmenu:{},onKeydown:{},role:{},name:{},autocomplete:{},direction:{},showToday:{type:Boolean,default:void 0},showTime:{type:Boolean,default:void 0},picker:{},prefixCls:{},defaultPickerValue:{},disabledDate:{},dateRender:{},monthCellRender:{},renderExtraFooter:{},onSelect:{},locale:{},size:{},bordered:{type:Boolean,default:void 0},showNow:{type:Boolean,default:void 0},disabledTime:{},defaultOpenValue:{},showHour:{type:Boolean,default:void 0},showMinute:{type:Boolean,default:void 0},showSecond:{type:Boolean,default:void 0},use12Hours:{type:Boolean,default:void 0},hourStep:{},minuteStep:{},secondStep:{},hideDisabledOptions:{type:Boolean,default:void 0},disabledHours:{},disabledMinutes:{},disabledSeconds:{},valueFormat:{},emptyText:{default:"-"},value:{},defaultValue:{},onChange:{},onOk:{},format:{default:"Y-D"}},emits:["update:value"],setup(v,{emit:y}){const o=v,h=y,{value:i,updateValue:p}=S.useControllableValue(o,h),l=e.computed(()=>f.ApFieldDatePresetFormats.indexOf(o.format)>-1),u=e.computed(()=>l.value?f.PRESET_FORMAT_MAP[o.format]:o.format),B=e.computed(()=>c.isNil(e.unref(i))?void 0:d(e.unref(i))),k=e.computed(()=>e.unref(l)?o.picker??f.PRESET_FORMAT_PICK_MAP[o.format]:o.picker),g=e.computed(()=>{const t=e.unref(l)?f.PRESET_FORMAT_TIME_MAP[o.format]:{};return{...c.omit(o,["value","defaultValue","onChange","onOk","format","onUpdate:value","mode"]),...t}});function O(t){if(c.isNil(t)){p(null);return}const n=d(t);e.unref(l)?p(m.formatDay(n,e.unref(u))):p(n.valueOf())}function P(t,n){var s;const r=d(t),a=e.unref(l)?m.formatDay(r,e.unref(u)):t?r.valueOf():null;(s=o.onChange)==null||s.call(o,a,n)}function C(t){var a;const n=d(t),r=e.unref(l)?m.formatDay(n,e.unref(u)):t?n.valueOf():null;(a=o.onOk)==null||a.call(o,r)}return(t,n)=>t.mode==="read"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(i)?e.unref(d)(e.unref(i)).format(u.value):t.emptyText),1)],64)):(e.openBlock(),e.createBlock(e.unref(b.DatePicker),e.mergeProps({key:1},g.value,{value:B.value,format:u.value,"onUpdate:value":O,onChange:P,onOk:C,picker:k.value}),e.createSlots({_:2},[e.renderList(t.$slots,(r,a)=>({name:a,fn:e.withCtx(s=>[e.renderSlot(t.$slots,a,e.normalizeProps(e.guardReactiveProps(s||{})))])}))]),1040,["value","format","picker"]))}});exports.default=_;
|