@aplus-frontend/ui 0.0.1-beta.37 → 0.0.1-beta.39

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.
Files changed (29) hide show
  1. package/es/src/ap-form/interface.d.ts +1 -0
  2. package/es/src/ap-form/search-form/index.vue.d.ts +3 -0
  3. package/es/src/ap-form/search-form/index.vue.mjs +26 -22
  4. package/es/src/ap-table/hooks/use-table-paging.d.ts +27 -6
  5. package/es/src/ap-table/interface.d.ts +3 -5
  6. package/es/src/ap-table/style/ap-table.css +7 -1
  7. package/es/src/ap-table/utils.d.ts +6 -0
  8. package/es/src/theme/antd-global-overwrite/admin/index.css +3 -3
  9. package/es/src/theme/antd-global-overwrite/admin/pagination.css +3 -3
  10. package/es/src/theme/antd-global-overwrite/aplus/index.css +3 -3
  11. package/es/src/theme/antd-global-overwrite/aplus/pagination.css +3 -3
  12. package/es/src/theme/ap-table/ap-table.css +7 -1
  13. package/es/src/work-order-modal/help-message.vue2.mjs +1 -1
  14. package/es/src/work-order-modal/work-order-modal.vue.mjs +1 -0
  15. package/lib/src/ap-form/interface.d.ts +1 -0
  16. package/lib/src/ap-form/search-form/index.vue.d.ts +3 -0
  17. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  18. package/lib/src/ap-table/hooks/use-table-paging.d.ts +27 -6
  19. package/lib/src/ap-table/interface.d.ts +3 -5
  20. package/lib/src/ap-table/style/ap-table.css +7 -1
  21. package/lib/src/ap-table/utils.d.ts +6 -0
  22. package/lib/src/theme/antd-global-overwrite/admin/index.css +3 -3
  23. package/lib/src/theme/antd-global-overwrite/admin/pagination.css +3 -3
  24. package/lib/src/theme/antd-global-overwrite/aplus/index.css +3 -3
  25. package/lib/src/theme/antd-global-overwrite/aplus/pagination.css +3 -3
  26. package/lib/src/theme/ap-table/ap-table.css +7 -1
  27. package/lib/src/work-order-modal/help-message.vue2.js +1 -1
  28. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  29. package/package.json +3 -3
@@ -40,6 +40,7 @@ export type ApFormSearchFormProps = ApFormProps & {
40
40
  resetText?: string;
41
41
  onSubmit?: (values: any) => void;
42
42
  onReset?: () => void;
43
+ customReset?: boolean;
43
44
  extraInAction?: boolean;
44
45
  forceExpand?: boolean;
45
46
  countPerRow?: number;
@@ -14,6 +14,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
14
14
  forceExpand: boolean;
15
15
  countPerRow: number;
16
16
  collapse: undefined;
17
+ customReset: boolean;
17
18
  }>, {
18
19
  apForm: ComputedRef<ApFormExpose<any> | undefined>;
19
20
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -30,6 +31,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
30
31
  forceExpand: boolean;
31
32
  countPerRow: number;
32
33
  collapse: undefined;
34
+ customReset: boolean;
33
35
  }>>> & {
34
36
  "onUpdate:collapse"?: ((...args: any[]) => any) | undefined;
35
37
  }, {
@@ -42,6 +44,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
42
44
  validateOnRuleChange: boolean;
43
45
  countPerRow: number;
44
46
  defaultCollapse: boolean;
47
+ customReset: boolean;
45
48
  extraInAction: boolean;
46
49
  forceExpand: boolean;
47
50
  }, {}>, Readonly<{
@@ -13,12 +13,12 @@ import { useControllableValue as ne } from "../../hooks/useControllableValue.mjs
13
13
  import { useNamespace as re } from "../../config-provider/hooks/use-namespace.mjs";
14
14
  import { useLocale as se } from "../../config-provider/hooks/use-locale.mjs";
15
15
  import V from "../ap-form-item.vue.mjs";
16
- import pe from "../ap-form.vue2.mjs";
17
- import ce from "../ap-form-item-group/index.vue.mjs";
18
- function ie(c) {
19
- return typeof c == "function" || Object.prototype.toString.call(c) === "[object Object]" && !J(c);
16
+ import ce from "../ap-form.vue2.mjs";
17
+ import pe from "../ap-form-item-group/index.vue.mjs";
18
+ function ie(p) {
19
+ return typeof p == "function" || Object.prototype.toString.call(p) === "[object Object]" && !J(p);
20
20
  }
21
- const p = 24, Pe = /* @__PURE__ */ K({
21
+ const c = 24, Pe = /* @__PURE__ */ K({
22
22
  name: "ApFormSearchForm",
23
23
  __name: "index",
24
24
  props: {
@@ -77,6 +77,10 @@ const p = 24, Pe = /* @__PURE__ */ K({
77
77
  searchText: {},
78
78
  resetText: {},
79
79
  onReset: {},
80
+ customReset: {
81
+ type: Boolean,
82
+ default: !1
83
+ },
80
84
  extraInAction: {
81
85
  type: Boolean,
82
86
  default: !1
@@ -90,12 +94,12 @@ const p = 24, Pe = /* @__PURE__ */ K({
90
94
  }
91
95
  },
92
96
  emits: ["update:collapse"],
93
- setup(c, {
97
+ setup(p, {
94
98
  expose: I,
95
99
  emit: j
96
100
  }) {
97
101
  var S;
98
- const l = Q(), t = c, M = j, {
102
+ const l = Q(), t = p, M = j, {
99
103
  value: d,
100
104
  updateValue: O
101
105
  } = ne(t, M, {
@@ -104,7 +108,7 @@ const p = 24, Pe = /* @__PURE__ */ K({
104
108
  }), {
105
109
  b: $
106
110
  } = re("ap-form-search-form"), {
107
- t: F
111
+ t: R
108
112
  } = se(), f = X();
109
113
  function D() {
110
114
  O(!o(d));
@@ -115,11 +119,11 @@ const p = 24, Pe = /* @__PURE__ */ K({
115
119
  }
116
120
  function z() {
117
121
  var e, i, u;
118
- (i = (e = f.value) == null ? void 0 : e.resetFields) == null || i.call(e), (u = t.onReset) == null || u.call(t);
122
+ t.customReset || (i = (e = f.value) == null ? void 0 : e.resetFields) == null || i.call(e), (u = t.onReset) == null || u.call(t);
119
123
  }
120
- const g = v(T(l.default())), m = v((S = l.extra) == null ? void 0 : S.call(l)), R = C(() => Math.floor(p / t.countPerRow));
124
+ const F = v(T(l.default())), m = v((S = l.extra) == null ? void 0 : S.call(l)), g = C(() => Math.floor(c / t.countPerRow));
121
125
  P(() => l.default(), (e) => {
122
- g.value = T(e);
126
+ F.value = T(e);
123
127
  }), P(() => {
124
128
  var e;
125
129
  return (e = l.extra) == null ? void 0 : e.call(l);
@@ -128,24 +132,24 @@ const p = 24, Pe = /* @__PURE__ */ K({
128
132
  });
129
133
  const U = C(() => {
130
134
  let e;
131
- const i = [...o(g)], u = [], b = [], n = o(R);
135
+ const i = [...o(F)], u = [], b = [], n = o(g);
132
136
  let h = 0;
133
137
  i.forEach((r) => {
134
138
  const s = r.props;
135
139
  s != null && s.hidden ? u.push(r) : (h += s.span || n, b.push(r));
136
140
  });
137
- const w = p - (h + n) % p, W = w < n ? p : w, x = p - n * (o(m) && !t.extraInAction ? 2 : 1), L = !t.forceExpand && h > x;
141
+ const B = c - (h + n) % c, W = B < n ? c : B, x = c - n * (o(m) && !t.extraInAction ? 2 : 1), L = !t.forceExpand && h > x;
138
142
  let _ = 0;
139
143
  const G = b.map((r, s) => {
140
- const B = r.props;
141
- return _ += B.span || n, Y(r, {
142
- span: B.span || n,
144
+ const w = r.props;
145
+ return _ += w.span || n, Y(r, {
146
+ span: w.span || n,
143
147
  key: `ApFormSearchFormItem-${s}`,
144
148
  hidden: !t.forceExpand && o(d) && _ > x
145
149
  });
146
- }), H = p - Math.min(x, _) - n;
150
+ }), H = c - Math.min(x, _) - n;
147
151
  return a(Z, null, [G, u, a(V, {
148
- span: o(R)
152
+ span: o(g)
149
153
  }, {
150
154
  default: () => [a(N, {
151
155
  justify: "space-between"
@@ -155,11 +159,11 @@ const p = 24, Pe = /* @__PURE__ */ K({
155
159
  type: "primary",
156
160
  onClick: q
157
161
  }, {
158
- default: () => [t.searchText || F("ap.apForm.search.search")]
162
+ default: () => [t.searchText || R("ap.apForm.search.search")]
159
163
  }), a(y, {
160
164
  onClick: z
161
165
  }, {
162
- default: () => [t.resetText || F("ap.apForm.search.reset")]
166
+ default: () => [t.resetText || R("ap.apForm.search.reset")]
163
167
  }), L ? a(y, {
164
168
  onClick: D,
165
169
  icon: a(ae, {
@@ -181,12 +185,12 @@ const p = 24, Pe = /* @__PURE__ */ K({
181
185
  });
182
186
  return I({
183
187
  apForm: C(() => o(f))
184
- }), (e, i) => (k(), A(pe, ee({
188
+ }), (e, i) => (k(), A(ce, ee({
185
189
  class: o($)(),
186
190
  ref_key: "apForm",
187
191
  ref: f
188
192
  }, o(le)(t, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
189
- default: E(() => [a(ce, {
193
+ default: E(() => [a(pe, {
190
194
  "count-per-row": t.countPerRow
191
195
  }, {
192
196
  default: E(() => [(k(), A(te(U.value)))]),
@@ -1,7 +1,7 @@
1
- import { Ref } from 'vue';
1
+ import { Ref, ComputedRef } from 'vue';
2
2
  import { RequestData } from '../interface';
3
- import { ApFormExpose } from '../../ap-form';
4
- import { TablePaginationConfig } from 'ant-design-vue';
3
+ import { ApFormSearchFormExpose } from '../../ap-form';
4
+ import { TablePaginationConfig, FilterValue, SorterResult, TableCurrentDataSource } from 'ant-design-vue/es/table/interface';
5
5
 
6
6
  export type UseTablePagingParams<DataType, ParamsType> = {
7
7
  request: (params: any) => Promise<RequestData<DataType>>;
@@ -39,9 +39,17 @@ export type UseTablePagingParams<DataType, ParamsType> = {
39
39
  * 重设表单需要忽略的字段
40
40
  */
41
41
  resetFieldsIgnores?: string[];
42
+ /**
43
+ * 需要后端筛选的字段列表
44
+ */
45
+ filterFields?: string[];
46
+ /**
47
+ * 需要后端筛选的排序字段列表
48
+ */
49
+ sortFields?: string[];
42
50
  };
43
- export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, defaultCurrent, defaultPageSize, request, defaultParams, formatParams, paramsValueTypeMap, resetFieldsIgnores }: UseTablePagingParams<DataType, ParamsType>) => {
44
- formRef: Ref<ApFormExpose<any> | undefined>;
51
+ export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, defaultCurrent, defaultPageSize, request, defaultParams, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields }: UseTablePagingParams<DataType, ParamsType>) => {
52
+ formRef: Ref<ApFormSearchFormExpose | undefined>;
45
53
  submit: () => void;
46
54
  reset: () => void;
47
55
  refresh: () => void;
@@ -53,5 +61,18 @@ export declare const useTablePaging: <DataType = any, ParamsType = Record<string
53
61
  }>;
54
62
  current: Ref<number>;
55
63
  pageSize: Ref<number>;
56
- onChange: (p: TablePaginationConfig) => void;
64
+ handleTableChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
65
+ tableProps: ComputedRef<{
66
+ loading: boolean;
67
+ pagination: {
68
+ current: number;
69
+ pageSize: number;
70
+ total: number;
71
+ showSizeChanger: boolean;
72
+ showQuickJumper: boolean;
73
+ showTotal: (total: number) => string;
74
+ };
75
+ onChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
76
+ dataSource: DataType[];
77
+ }>;
57
78
  };
@@ -1,5 +1,5 @@
1
1
  import { ColumnType, TableProps } from 'ant-design-vue/es/table';
2
- import { CompareFn, SortOrder } from 'ant-design-vue/es/table/interface';
2
+ import { CompareFn } from 'ant-design-vue/es/table/interface';
3
3
  import { ApFormSearchFormProps } from '../ap-form';
4
4
  import { ApFormItemDateProps, ApFormItemDateRangeProps, ApFormItemNumberProps, ApFormItemRadioProps, ApFormItemSelectProps, ApFormItemSwitchProps, ApFormItemTextAreaProps, ApFormItemTextProps } from 'src/ap-form/items/interface';
5
5
  import { CSSProperties } from 'vue';
@@ -80,7 +80,7 @@ export type ApColumnType<ValueType extends keyof ApTableFormFields = 'text'> = E
80
80
  };
81
81
  export type RequestData<T> = {
82
82
  data: T[] | undefined;
83
- total?: number;
83
+ total: number;
84
84
  } & Record<string, any>;
85
85
  export type ApTableProps<RecordType = any, ParamsType = any, ValueType extends keyof ApTableFormFields = 'text'> = Omit<TableProps<RecordType>, 'columns' | 'pagination'> & {
86
86
  /**
@@ -105,14 +105,12 @@ export type ApTableProps<RecordType = any, ParamsType = any, ValueType extends k
105
105
  /**
106
106
  * 请求获取dataSource
107
107
  * @param params
108
- * @param sort
109
- * @param filter
110
108
  * @returns
111
109
  */
112
110
  request?: (params: ParamsType & {
113
111
  pageSize?: number;
114
112
  current?: number;
115
- }, sort: Record<string, SortOrder>, filter: Record<string, (string | number)[] | null>) => Promise<Partial<RequestData<RecordType>>>;
113
+ }) => Promise<Partial<RequestData<RecordType>>>;
116
114
  /**
117
115
  * 数据加载完成后触发
118
116
  * @param data
@@ -8,7 +8,13 @@
8
8
  background-color: #fff;
9
9
  margin-bottom: 16px;
10
10
  }
11
- .aplus-ap-table__form-wrapper {
11
+ .aplus-ap-table__table-wrapper {
12
12
  padding: 16px;
13
13
  background-color: #fff;
14
14
  }
15
+ .aplus-ap-table-table .ant-pagination {
16
+ margin-bottom: 0 !important;
17
+ }
18
+ .aplus-ap-table-table .ant-pagination .ant-pagination-total-text {
19
+ flex: 1;
20
+ }
@@ -6,3 +6,9 @@ export declare const formatParamsValueType: (type: FieldValueType | Record<strin
6
6
  * @param value 值
7
7
  */
8
8
  export declare const parseFieldValue: (t: FieldValueType, value: any) => any;
9
+ /**
10
+ * 对表格的dataIndex进行拼接处理
11
+ * @param dataIndex
12
+ * @returns
13
+ */
14
+ export declare function dataIndexToStr(dataIndex: string | number | (string | number)[]): string | number;
@@ -301,7 +301,7 @@ div[class$='-basic-table-form-container'] form[class$='-basic-form--compact'] di
301
301
  margin: 0 4px;
302
302
  font-weight: 400;
303
303
  font-size: 14px;
304
- line-height: 29px;
304
+ line-height: 28px;
305
305
  text-align: center;
306
306
  border-radius: 4px;
307
307
  }
@@ -312,14 +312,14 @@ div[class$='-basic-table-form-container'] form[class$='-basic-form--compact'] di
312
312
  width: 30px;
313
313
  height: 30px;
314
314
  margin: 0 4px;
315
- line-height: 30px;
315
+ line-height: 28px;
316
316
  border: 1px solid #d9d9d9;
317
317
  }
318
318
  .ant-table-wrapper .ant-pagination .ant-pagination-next {
319
319
  width: 30px;
320
320
  height: 30px;
321
321
  margin: 0 4px;
322
- line-height: 30px;
322
+ line-height: 28px;
323
323
  border: 1px solid #d9d9d9;
324
324
  }
325
325
  .ant-table-wrapper .ant-pagination .ant-pagination-next .ant-pagination-disabled {
@@ -17,7 +17,7 @@
17
17
  margin: 0 4px;
18
18
  font-weight: 400;
19
19
  font-size: 14px;
20
- line-height: 29px;
20
+ line-height: 28px;
21
21
  text-align: center;
22
22
  border-radius: 4px;
23
23
  }
@@ -28,14 +28,14 @@
28
28
  width: 30px;
29
29
  height: 30px;
30
30
  margin: 0 4px;
31
- line-height: 30px;
31
+ line-height: 28px;
32
32
  border: 1px solid #d9d9d9;
33
33
  }
34
34
  .ant-table-wrapper .ant-pagination .ant-pagination-next {
35
35
  width: 30px;
36
36
  height: 30px;
37
37
  margin: 0 4px;
38
- line-height: 30px;
38
+ line-height: 28px;
39
39
  border: 1px solid #d9d9d9;
40
40
  }
41
41
  .ant-table-wrapper .ant-pagination .ant-pagination-next .ant-pagination-disabled {
@@ -320,7 +320,7 @@ div[class$='-basic-table-form-container'] form[class$='-basic-form--compact'] di
320
320
  margin: 0 4px;
321
321
  font-weight: 400;
322
322
  font-size: 14px;
323
- line-height: 29px;
323
+ line-height: 28px;
324
324
  text-align: center;
325
325
  border-radius: 4px;
326
326
  }
@@ -331,7 +331,7 @@ div[class$='-basic-table-form-container'] form[class$='-basic-form--compact'] di
331
331
  width: 30px;
332
332
  height: 30px;
333
333
  margin: 0 4px;
334
- line-height: 30px;
334
+ line-height: 28px;
335
335
  border: 1px solid #d9d9d9;
336
336
  }
337
337
  .ant-table-wrapper .ant-pagination .ant-pagination-prev .anticon.anticon-left {
@@ -351,7 +351,7 @@ div[class$='-basic-table-form-container'] form[class$='-basic-form--compact'] di
351
351
  width: 30px;
352
352
  height: 30px;
353
353
  margin: 0 4px;
354
- line-height: 30px;
354
+ line-height: 28px;
355
355
  border: 1px solid #d9d9d9;
356
356
  }
357
357
  .ant-table-wrapper .ant-pagination .ant-pagination-next .anticon.anticon-right {
@@ -17,7 +17,7 @@
17
17
  margin: 0 4px;
18
18
  font-weight: 400;
19
19
  font-size: 14px;
20
- line-height: 29px;
20
+ line-height: 28px;
21
21
  text-align: center;
22
22
  border-radius: 4px;
23
23
  }
@@ -28,7 +28,7 @@
28
28
  width: 30px;
29
29
  height: 30px;
30
30
  margin: 0 4px;
31
- line-height: 30px;
31
+ line-height: 28px;
32
32
  border: 1px solid #d9d9d9;
33
33
  }
34
34
  .ant-table-wrapper .ant-pagination .ant-pagination-prev .anticon.anticon-left {
@@ -48,7 +48,7 @@
48
48
  width: 30px;
49
49
  height: 30px;
50
50
  margin: 0 4px;
51
- line-height: 30px;
51
+ line-height: 28px;
52
52
  border: 1px solid #d9d9d9;
53
53
  }
54
54
  .ant-table-wrapper .ant-pagination .ant-pagination-next .anticon.anticon-right {
@@ -8,7 +8,13 @@
8
8
  background-color: #fff;
9
9
  margin-bottom: 16px;
10
10
  }
11
- .aplus-ap-table__form-wrapper {
11
+ .aplus-ap-table__table-wrapper {
12
12
  padding: 16px;
13
13
  background-color: #fff;
14
14
  }
15
+ .aplus-ap-table-table .ant-pagination {
16
+ margin-bottom: 0 !important;
17
+ }
18
+ .aplus-ap-table-table .ant-pagination .ant-pagination-total-text {
19
+ flex: 1;
20
+ }
@@ -21,7 +21,7 @@ const c = /* @__PURE__ */ e("div", { class: "title" }, [
21
21
  r(t(s), { style: {
22
22
  color: "#1890FF",
23
23
  fontSize: "16px",
24
- transform: "translateX(6px)"
24
+ transform: "translateX(-6px)"
25
25
  } })
26
26
  ]),
27
27
  _: 1
@@ -81,6 +81,7 @@ const Y = /* @__PURE__ */ F({
81
81
  };
82
82
  return (n, o) => (h(), T("div", null, [
83
83
  t(e(A), w(i, {
84
+ centered: !0,
84
85
  open: u.value,
85
86
  title: "创建工单",
86
87
  "ok-text": m("span", {}, ["确认"]),
@@ -40,6 +40,7 @@ export type ApFormSearchFormProps = ApFormProps & {
40
40
  resetText?: string;
41
41
  onSubmit?: (values: any) => void;
42
42
  onReset?: () => void;
43
+ customReset?: boolean;
43
44
  extraInAction?: boolean;
44
45
  forceExpand?: boolean;
45
46
  countPerRow?: number;
@@ -14,6 +14,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
14
14
  forceExpand: boolean;
15
15
  countPerRow: number;
16
16
  collapse: undefined;
17
+ customReset: boolean;
17
18
  }>, {
18
19
  apForm: ComputedRef<ApFormExpose<any> | undefined>;
19
20
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -30,6 +31,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
30
31
  forceExpand: boolean;
31
32
  countPerRow: number;
32
33
  collapse: undefined;
34
+ customReset: boolean;
33
35
  }>>> & {
34
36
  "onUpdate:collapse"?: ((...args: any[]) => any) | undefined;
35
37
  }, {
@@ -42,6 +44,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
42
44
  validateOnRuleChange: boolean;
43
45
  countPerRow: number;
44
46
  defaultCollapse: boolean;
47
+ customReset: boolean;
45
48
  extraInAction: boolean;
46
49
  forceExpand: boolean;
47
50
  }, {}>, Readonly<{
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("ant-design-vue");require("../ap-form.vue.js");require("../ap-form-item-group/index.vue2.js");require("../ap-form-item.vue2.js");require("../../hooks/index.js");const q=require("../ap-form-item-group/helper.js"),D=require("@ant-design/icons-vue");require("../../config-provider/index.js");require("../style/search-form.css");const U=require("lodash-unified"),z=require("../../hooks/useControllableValue.js"),L=require("../../config-provider/hooks/use-namespace.js"),W=require("../../config-provider/hooks/use-locale.js"),R=require("../ap-form-item.vue.js"),$=require("../ap-form.vue2.js"),G=require("../ap-form-item-group/index.vue.js");function H(c){return typeof c=="function"||Object.prototype.toString.call(c)==="[object Object]"&&!e.isVNode(c)}const s=24,J=e.defineComponent({name:"ApFormSearchForm",__name:"index",props:{initialValues:{},layout:{default:"horizontal"},labelCol:{},wrapperCol:{},colon:{type:Boolean,default:!0},labelAlign:{default:"right"},labelWrap:{type:Boolean},prefixCls:{},requiredMark:{},hideRequiredMark:{type:Boolean,default:!1},rules:{},validateMessages:{},validateOnRuleChange:{type:Boolean,default:!0},scrollToFirstError:{},onSubmit:{},name:{},validateTrigger:{default:"change"},size:{},disabled:{type:Boolean},onValuesChange:{},onFieldsChange:{},onFinish:{},onFinishFailed:{},onValidate:{},collapse:{type:Boolean,default:void 0},defaultCollapse:{type:Boolean,default:!1},"onUpdate:collapse":{},searchText:{},resetText:{},onReset:{},extraInAction:{type:Boolean,default:!1},forceExpand:{type:Boolean,default:!1},countPerRow:{default:4}},emits:["update:collapse"],setup(c,{expose:S,emit:b}){var v;const o=e.useSlots(),a=c,B=b,{value:d,updateValue:w}=z.useControllableValue(a,B,{valuePropName:"collapse",defaultValuePropName:"defaultCollapse"}),{b:P}=L.useNamespace("ap-form-search-form"),{t:C}=W.useLocale(),f=e.ref();function k(){w(!e.unref(d))}function T(){var t;(t=f.value)==null||t.validateFields().then(a.onSubmit)}function A(){var t,i,p;(i=(t=f.value)==null?void 0:t.resetFields)==null||i.call(t),(p=a.onReset)==null||p.call(a)}const g=e.shallowRef(q.genRealChildren(o.default())),h=e.shallowRef((v=o.extra)==null?void 0:v.call(o)),y=e.computed(()=>Math.floor(s/a.countPerRow));e.watch(()=>o.default(),t=>{g.value=q.genRealChildren(t)}),e.watch(()=>{var t;return(t=o.extra)==null?void 0:t.call(o)},t=>{h.value=t});const E=e.computed(()=>{let t;const i=[...e.unref(g)],p=[],F=[],n=e.unref(y);let m=0;i.forEach(l=>{const r=l.props;r!=null&&r.hidden?p.push(l):(m+=r.span||n,F.push(l))});const V=s-(m+n)%s,I=V<n?s:V,_=s-n*(e.unref(h)&&!a.extraInAction?2:1),M=!a.forceExpand&&m>_;let x=0;const j=F.map((l,r)=>{const N=l.props;return x+=N.span||n,e.cloneVNode(l,{span:N.span||n,key:`ApFormSearchFormItem-${r}`,hidden:!a.forceExpand&&e.unref(d)&&x>_})}),O=s-Math.min(_,x)-n;return e.createVNode(e.Fragment,null,[j,p,e.createVNode(R.default,{span:e.unref(y)},{default:()=>[e.createVNode(u.Flex,{justify:"space-between"},{default:()=>[e.createVNode(u.Space,null,{default:()=>[e.createVNode(u.Button,{type:"primary",onClick:T},{default:()=>[a.searchText||C("ap.apForm.search.search")]}),e.createVNode(u.Button,{onClick:A},{default:()=>[a.resetText||C("ap.apForm.search.reset")]}),M?e.createVNode(u.Button,{onClick:k,icon:e.createVNode(D.DoubleRightOutlined,{style:"color:#B8C3D1",rotate:e.unref(d)?90:-90},null)},null):null]}),a.extraInAction?e.unref(h):null]})]}),a.extraInAction?null:e.createVNode(R.default,{span:e.unref(d)?O:I},{default:()=>[e.createVNode(u.Flex,{justify:"end"},H(t=e.unref(h))?t:{default:()=>[t]})]})])});return S({apForm:e.computed(()=>e.unref(f))}),(t,i)=>(e.openBlock(),e.createBlock($.default,e.mergeProps({class:e.unref(P)(),ref_key:"apForm",ref:f},e.unref(U.omit)(a,["collapse","defaultCollapse","onUpdate:collapse","searchText","resetText","onSubmit","onReset","extraInAction","forceExpand","countPerRow"])),{default:e.withCtx(()=>[e.createVNode(G.default,{"count-per-row":a.countPerRow},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.value)))]),_:1},8,["count-per-row"])]),_:1},16,["class"]))}});exports.default=J;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("ant-design-vue");require("../ap-form.vue.js");require("../ap-form-item-group/index.vue2.js");require("../ap-form-item.vue2.js");require("../../hooks/index.js");const N=require("../ap-form-item-group/helper.js"),D=require("@ant-design/icons-vue");require("../../config-provider/index.js");require("../style/search-form.css");const U=require("lodash-unified"),z=require("../../hooks/useControllableValue.js"),L=require("../../config-provider/hooks/use-namespace.js"),W=require("../../config-provider/hooks/use-locale.js"),q=require("../ap-form-item.vue.js"),$=require("../ap-form.vue2.js"),G=require("../ap-form-item-group/index.vue.js");function H(c){return typeof c=="function"||Object.prototype.toString.call(c)==="[object Object]"&&!e.isVNode(c)}const s=24,J=e.defineComponent({name:"ApFormSearchForm",__name:"index",props:{initialValues:{},layout:{default:"horizontal"},labelCol:{},wrapperCol:{},colon:{type:Boolean,default:!0},labelAlign:{default:"right"},labelWrap:{type:Boolean},prefixCls:{},requiredMark:{},hideRequiredMark:{type:Boolean,default:!1},rules:{},validateMessages:{},validateOnRuleChange:{type:Boolean,default:!0},scrollToFirstError:{},onSubmit:{},name:{},validateTrigger:{default:"change"},size:{},disabled:{type:Boolean},onValuesChange:{},onFieldsChange:{},onFinish:{},onFinishFailed:{},onValidate:{},collapse:{type:Boolean,default:void 0},defaultCollapse:{type:Boolean,default:!1},"onUpdate:collapse":{},searchText:{},resetText:{},onReset:{},customReset:{type:Boolean,default:!1},extraInAction:{type:Boolean,default:!1},forceExpand:{type:Boolean,default:!1},countPerRow:{default:4}},emits:["update:collapse"],setup(c,{expose:S,emit:B}){var v;const o=e.useSlots(),a=c,b=B,{value:d,updateValue:w}=z.useControllableValue(a,b,{valuePropName:"collapse",defaultValuePropName:"defaultCollapse"}),{b:P}=L.useNamespace("ap-form-search-form"),{t:C}=W.useLocale(),f=e.ref();function k(){w(!e.unref(d))}function T(){var t;(t=f.value)==null||t.validateFields().then(a.onSubmit)}function A(){var t,i,p;a.customReset||(i=(t=f.value)==null?void 0:t.resetFields)==null||i.call(t),(p=a.onReset)==null||p.call(a)}const y=e.shallowRef(N.genRealChildren(o.default())),h=e.shallowRef((v=o.extra)==null?void 0:v.call(o)),g=e.computed(()=>Math.floor(s/a.countPerRow));e.watch(()=>o.default(),t=>{y.value=N.genRealChildren(t)}),e.watch(()=>{var t;return(t=o.extra)==null?void 0:t.call(o)},t=>{h.value=t});const E=e.computed(()=>{let t;const i=[...e.unref(y)],p=[],F=[],n=e.unref(g);let m=0;i.forEach(l=>{const r=l.props;r!=null&&r.hidden?p.push(l):(m+=r.span||n,F.push(l))});const R=s-(m+n)%s,I=R<n?s:R,_=s-n*(e.unref(h)&&!a.extraInAction?2:1),M=!a.forceExpand&&m>_;let x=0;const j=F.map((l,r)=>{const V=l.props;return x+=V.span||n,e.cloneVNode(l,{span:V.span||n,key:`ApFormSearchFormItem-${r}`,hidden:!a.forceExpand&&e.unref(d)&&x>_})}),O=s-Math.min(_,x)-n;return e.createVNode(e.Fragment,null,[j,p,e.createVNode(q.default,{span:e.unref(g)},{default:()=>[e.createVNode(u.Flex,{justify:"space-between"},{default:()=>[e.createVNode(u.Space,null,{default:()=>[e.createVNode(u.Button,{type:"primary",onClick:T},{default:()=>[a.searchText||C("ap.apForm.search.search")]}),e.createVNode(u.Button,{onClick:A},{default:()=>[a.resetText||C("ap.apForm.search.reset")]}),M?e.createVNode(u.Button,{onClick:k,icon:e.createVNode(D.DoubleRightOutlined,{style:"color:#B8C3D1",rotate:e.unref(d)?90:-90},null)},null):null]}),a.extraInAction?e.unref(h):null]})]}),a.extraInAction?null:e.createVNode(q.default,{span:e.unref(d)?O:I},{default:()=>[e.createVNode(u.Flex,{justify:"end"},H(t=e.unref(h))?t:{default:()=>[t]})]})])});return S({apForm:e.computed(()=>e.unref(f))}),(t,i)=>(e.openBlock(),e.createBlock($.default,e.mergeProps({class:e.unref(P)(),ref_key:"apForm",ref:f},e.unref(U.omit)(a,["collapse","defaultCollapse","onUpdate:collapse","searchText","resetText","onSubmit","onReset","extraInAction","forceExpand","countPerRow"])),{default:e.withCtx(()=>[e.createVNode(G.default,{"count-per-row":a.countPerRow},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.value)))]),_:1},8,["count-per-row"])]),_:1},16,["class"]))}});exports.default=J;
@@ -1,7 +1,7 @@
1
- import { Ref } from 'vue';
1
+ import { Ref, ComputedRef } from 'vue';
2
2
  import { RequestData } from '../interface';
3
- import { ApFormExpose } from '../../ap-form';
4
- import { TablePaginationConfig } from 'ant-design-vue';
3
+ import { ApFormSearchFormExpose } from '../../ap-form';
4
+ import { TablePaginationConfig, FilterValue, SorterResult, TableCurrentDataSource } from 'ant-design-vue/es/table/interface';
5
5
 
6
6
  export type UseTablePagingParams<DataType, ParamsType> = {
7
7
  request: (params: any) => Promise<RequestData<DataType>>;
@@ -39,9 +39,17 @@ export type UseTablePagingParams<DataType, ParamsType> = {
39
39
  * 重设表单需要忽略的字段
40
40
  */
41
41
  resetFieldsIgnores?: string[];
42
+ /**
43
+ * 需要后端筛选的字段列表
44
+ */
45
+ filterFields?: string[];
46
+ /**
47
+ * 需要后端筛选的排序字段列表
48
+ */
49
+ sortFields?: string[];
42
50
  };
43
- export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, defaultCurrent, defaultPageSize, request, defaultParams, formatParams, paramsValueTypeMap, resetFieldsIgnores }: UseTablePagingParams<DataType, ParamsType>) => {
44
- formRef: Ref<ApFormExpose<any> | undefined>;
51
+ export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, defaultCurrent, defaultPageSize, request, defaultParams, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields }: UseTablePagingParams<DataType, ParamsType>) => {
52
+ formRef: Ref<ApFormSearchFormExpose | undefined>;
45
53
  submit: () => void;
46
54
  reset: () => void;
47
55
  refresh: () => void;
@@ -53,5 +61,18 @@ export declare const useTablePaging: <DataType = any, ParamsType = Record<string
53
61
  }>;
54
62
  current: Ref<number>;
55
63
  pageSize: Ref<number>;
56
- onChange: (p: TablePaginationConfig) => void;
64
+ handleTableChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
65
+ tableProps: ComputedRef<{
66
+ loading: boolean;
67
+ pagination: {
68
+ current: number;
69
+ pageSize: number;
70
+ total: number;
71
+ showSizeChanger: boolean;
72
+ showQuickJumper: boolean;
73
+ showTotal: (total: number) => string;
74
+ };
75
+ onChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
76
+ dataSource: DataType[];
77
+ }>;
57
78
  };
@@ -1,5 +1,5 @@
1
1
  import { ColumnType, TableProps } from 'ant-design-vue/es/table';
2
- import { CompareFn, SortOrder } from 'ant-design-vue/es/table/interface';
2
+ import { CompareFn } from 'ant-design-vue/es/table/interface';
3
3
  import { ApFormSearchFormProps } from '../ap-form';
4
4
  import { ApFormItemDateProps, ApFormItemDateRangeProps, ApFormItemNumberProps, ApFormItemRadioProps, ApFormItemSelectProps, ApFormItemSwitchProps, ApFormItemTextAreaProps, ApFormItemTextProps } from 'src/ap-form/items/interface';
5
5
  import { CSSProperties } from 'vue';
@@ -80,7 +80,7 @@ export type ApColumnType<ValueType extends keyof ApTableFormFields = 'text'> = E
80
80
  };
81
81
  export type RequestData<T> = {
82
82
  data: T[] | undefined;
83
- total?: number;
83
+ total: number;
84
84
  } & Record<string, any>;
85
85
  export type ApTableProps<RecordType = any, ParamsType = any, ValueType extends keyof ApTableFormFields = 'text'> = Omit<TableProps<RecordType>, 'columns' | 'pagination'> & {
86
86
  /**
@@ -105,14 +105,12 @@ export type ApTableProps<RecordType = any, ParamsType = any, ValueType extends k
105
105
  /**
106
106
  * 请求获取dataSource
107
107
  * @param params
108
- * @param sort
109
- * @param filter
110
108
  * @returns
111
109
  */
112
110
  request?: (params: ParamsType & {
113
111
  pageSize?: number;
114
112
  current?: number;
115
- }, sort: Record<string, SortOrder>, filter: Record<string, (string | number)[] | null>) => Promise<Partial<RequestData<RecordType>>>;
113
+ }) => Promise<Partial<RequestData<RecordType>>>;
116
114
  /**
117
115
  * 数据加载完成后触发
118
116
  * @param data
@@ -8,7 +8,13 @@
8
8
  background-color: #fff;
9
9
  margin-bottom: 16px;
10
10
  }
11
- .aplus-ap-table__form-wrapper {
11
+ .aplus-ap-table__table-wrapper {
12
12
  padding: 16px;
13
13
  background-color: #fff;
14
14
  }
15
+ .aplus-ap-table-table .ant-pagination {
16
+ margin-bottom: 0 !important;
17
+ }
18
+ .aplus-ap-table-table .ant-pagination .ant-pagination-total-text {
19
+ flex: 1;
20
+ }
@@ -6,3 +6,9 @@ export declare const formatParamsValueType: (type: FieldValueType | Record<strin
6
6
  * @param value 值
7
7
  */
8
8
  export declare const parseFieldValue: (t: FieldValueType, value: any) => any;
9
+ /**
10
+ * 对表格的dataIndex进行拼接处理
11
+ * @param dataIndex
12
+ * @returns
13
+ */
14
+ export declare function dataIndexToStr(dataIndex: string | number | (string | number)[]): string | number;
@@ -301,7 +301,7 @@ div[class$='-basic-table-form-container'] form[class$='-basic-form--compact'] di
301
301
  margin: 0 4px;
302
302
  font-weight: 400;
303
303
  font-size: 14px;
304
- line-height: 29px;
304
+ line-height: 28px;
305
305
  text-align: center;
306
306
  border-radius: 4px;
307
307
  }
@@ -312,14 +312,14 @@ div[class$='-basic-table-form-container'] form[class$='-basic-form--compact'] di
312
312
  width: 30px;
313
313
  height: 30px;
314
314
  margin: 0 4px;
315
- line-height: 30px;
315
+ line-height: 28px;
316
316
  border: 1px solid #d9d9d9;
317
317
  }
318
318
  .ant-table-wrapper .ant-pagination .ant-pagination-next {
319
319
  width: 30px;
320
320
  height: 30px;
321
321
  margin: 0 4px;
322
- line-height: 30px;
322
+ line-height: 28px;
323
323
  border: 1px solid #d9d9d9;
324
324
  }
325
325
  .ant-table-wrapper .ant-pagination .ant-pagination-next .ant-pagination-disabled {
@@ -17,7 +17,7 @@
17
17
  margin: 0 4px;
18
18
  font-weight: 400;
19
19
  font-size: 14px;
20
- line-height: 29px;
20
+ line-height: 28px;
21
21
  text-align: center;
22
22
  border-radius: 4px;
23
23
  }
@@ -28,14 +28,14 @@
28
28
  width: 30px;
29
29
  height: 30px;
30
30
  margin: 0 4px;
31
- line-height: 30px;
31
+ line-height: 28px;
32
32
  border: 1px solid #d9d9d9;
33
33
  }
34
34
  .ant-table-wrapper .ant-pagination .ant-pagination-next {
35
35
  width: 30px;
36
36
  height: 30px;
37
37
  margin: 0 4px;
38
- line-height: 30px;
38
+ line-height: 28px;
39
39
  border: 1px solid #d9d9d9;
40
40
  }
41
41
  .ant-table-wrapper .ant-pagination .ant-pagination-next .ant-pagination-disabled {
@@ -320,7 +320,7 @@ div[class$='-basic-table-form-container'] form[class$='-basic-form--compact'] di
320
320
  margin: 0 4px;
321
321
  font-weight: 400;
322
322
  font-size: 14px;
323
- line-height: 29px;
323
+ line-height: 28px;
324
324
  text-align: center;
325
325
  border-radius: 4px;
326
326
  }
@@ -331,7 +331,7 @@ div[class$='-basic-table-form-container'] form[class$='-basic-form--compact'] di
331
331
  width: 30px;
332
332
  height: 30px;
333
333
  margin: 0 4px;
334
- line-height: 30px;
334
+ line-height: 28px;
335
335
  border: 1px solid #d9d9d9;
336
336
  }
337
337
  .ant-table-wrapper .ant-pagination .ant-pagination-prev .anticon.anticon-left {
@@ -351,7 +351,7 @@ div[class$='-basic-table-form-container'] form[class$='-basic-form--compact'] di
351
351
  width: 30px;
352
352
  height: 30px;
353
353
  margin: 0 4px;
354
- line-height: 30px;
354
+ line-height: 28px;
355
355
  border: 1px solid #d9d9d9;
356
356
  }
357
357
  .ant-table-wrapper .ant-pagination .ant-pagination-next .anticon.anticon-right {
@@ -17,7 +17,7 @@
17
17
  margin: 0 4px;
18
18
  font-weight: 400;
19
19
  font-size: 14px;
20
- line-height: 29px;
20
+ line-height: 28px;
21
21
  text-align: center;
22
22
  border-radius: 4px;
23
23
  }
@@ -28,7 +28,7 @@
28
28
  width: 30px;
29
29
  height: 30px;
30
30
  margin: 0 4px;
31
- line-height: 30px;
31
+ line-height: 28px;
32
32
  border: 1px solid #d9d9d9;
33
33
  }
34
34
  .ant-table-wrapper .ant-pagination .ant-pagination-prev .anticon.anticon-left {
@@ -48,7 +48,7 @@
48
48
  width: 30px;
49
49
  height: 30px;
50
50
  margin: 0 4px;
51
- line-height: 30px;
51
+ line-height: 28px;
52
52
  border: 1px solid #d9d9d9;
53
53
  }
54
54
  .ant-table-wrapper .ant-pagination .ant-pagination-next .anticon.anticon-right {
@@ -8,7 +8,13 @@
8
8
  background-color: #fff;
9
9
  margin-bottom: 16px;
10
10
  }
11
- .aplus-ap-table__form-wrapper {
11
+ .aplus-ap-table__table-wrapper {
12
12
  padding: 16px;
13
13
  background-color: #fff;
14
14
  }
15
+ .aplus-ap-table-table .ant-pagination {
16
+ margin-bottom: 0 !important;
17
+ }
18
+ .aplus-ap-table-table .ant-pagination .ant-pagination-total-text {
19
+ flex: 1;
20
+ }
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("@ant-design/icons-vue"),l=require("ant-design-vue"),n=e.createElementVNode("div",{class:"title"},[e.createElementVNode("div",{class:"flex"},[e.createElementVNode("div",null,"1."),e.createElementVNode("div",null,"单个文件大小限制:50MB")]),e.createElementVNode("div",{class:"flex"},[e.createElementVNode("div",null,"2."),e.createElementVNode("div",null,"单次数量限制:10个")])],-1),o=e.defineComponent({__name:"help-message",setup(r){return(c,i)=>(e.openBlock(),e.createBlock(e.unref(l.Tooltip),{placement:"right"},{title:e.withCtx(()=>[n]),default:e.withCtx(()=>[e.createVNode(e.unref(t.QuestionCircleOutlined),{style:{color:"#1890FF",fontSize:"16px",transform:"translateX(6px)"}})]),_:1}))}});exports.default=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("@ant-design/icons-vue"),l=require("ant-design-vue"),n=e.createElementVNode("div",{class:"title"},[e.createElementVNode("div",{class:"flex"},[e.createElementVNode("div",null,"1."),e.createElementVNode("div",null,"单个文件大小限制:50MB")]),e.createElementVNode("div",{class:"flex"},[e.createElementVNode("div",null,"2."),e.createElementVNode("div",null,"单次数量限制:10个")])],-1),o=e.defineComponent({__name:"help-message",setup(r){return(c,i)=>(e.openBlock(),e.createBlock(e.unref(l.Tooltip),{placement:"right"},{title:e.withCtx(()=>[n]),default:e.withCtx(()=>[e.createVNode(e.unref(t.QuestionCircleOutlined),{style:{color:"#1890FF",fontSize:"16px",transform:"translateX(-6px)"}})]),_:1}))}});exports.default=o;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("ant-design-vue"),l=require("../ap-form/index.js");require("./help-message.vue.js");require("../ap-upload/index.js");const f=require("./interfaces.js");require("../config-provider/index.js");require("./style/index.css");const C=require("../config-provider/hooks/use-global-config.js"),h=require("../config-provider/hooks/use-locale.js"),b=require("../ap-form/items/select/index.vue.js"),q=require("../ap-form/items/radio/index.vue.js"),F=require("../ap-upload/apUpload.vue.js"),B=require("./help-message.vue2.js"),N=e.defineComponent({__name:"work-order-modal",props:{api:{type:Function},getOssAccess:{type:Function},prefixCls:{},visible:{type:Boolean},open:{type:Boolean},confirmLoading:{type:Boolean},title:{},closable:{type:Boolean},closeIcon:{},onOk:{type:Function},onCancel:{type:Function},"onUpdate:visible":{type:Function},"onUpdate:open":{type:Function},onChange:{type:Function},afterClose:{type:Function},centered:{type:Boolean},width:{},footer:{},okText:{},okType:{},cancelText:{},icon:{},maskClosable:{type:Boolean},forceRender:{type:Boolean},okButtonProps:{},cancelButtonProps:{},destroyOnClose:{type:Boolean},wrapClassName:{},maskTransitionName:{},transitionName:{},getContainer:{type:[String,Boolean,Function]},zIndex:{},bodyStyle:{},maskStyle:{},mask:{type:Boolean},keyboard:{type:Boolean},wrapProps:{},focusTriggerAfterClose:{type:Boolean},modalRender:{type:Function},mousePosition:{}},emits:["modalClose"],setup(_,{emit:y}){const u=e.ref(),o=e.ref(!1),i=e.ref(!0),s=_,g=C.useGlobalConfig("api"),{lang:v}=h.useLocale(),x=y,c=async n=>{var a,d;const t=await((d=(a=g.value)==null?void 0:a.select)==null?void 0:d.call(a,{dictCode:n,locale:v.value}));return t==null?void 0:t.map(m=>({label:m.itemText,value:m.itemValue}))},k=async()=>{var n;if(!o.value)try{o.value=!0;const t=await((n=u.value)==null?void 0:n.validateFields());console.log("params",t),await s.api(t),o.value=!1,r.message.success("操作成功"),p()}catch{o.value=!1;return}},p=()=>{i.value=!1,x("modalClose")};return(n,t)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(r.Modal),e.mergeProps(s,{open:i.value,title:"创建工单","ok-text":e.h("span",{},["确认"]),"cancel-text":e.h("span",{},["取消"]),mask:!0,"mask-closable":!0,onOk:k,confirmLoading:o.value,onCancel:p}),{default:e.withCtx(()=>[e.createVNode(e.unref(l.ApForm),{ref_key:"formRef",ref:u},{default:e.withCtx(()=>[e.createVNode(e.unref(l.ApForm).FormItem,{label:"工单标题",name:"ticketsTitle",rules:[{required:!0,message:"不可为空"}]},{default:e.withCtx(()=>[e.createVNode(e.unref(r.Input),{maxlength:50,"show-count":!0})]),_:1}),e.createVNode(e.unref(b.default),{label:"工单类型",name:"ticketsType",rules:[{required:!0,message:"不可为空"}],field:{request:()=>c(e.unref(f.DictCode).TicketsType)}},null,8,["field"]),e.createVNode(e.unref(l.ApForm).FormItem,{label:"工单详情",name:"ticketsContent",rules:[{required:!0,message:"不可为空"}]},{default:e.withCtx(()=>[e.createVNode(e.unref(r.Textarea),{maxlength:300,"show-count":!0})]),_:1}),e.createVNode(e.unref(q.default),{label:"优先级",name:"ticketsLevel",rules:[{required:!0,message:"不可为空"}],field:{request:()=>c(e.unref(f.DictCode).TicketsLevel)}},null,8,["field"]),e.createVNode(e.unref(l.ApForm).FormItem,{name:"files"},{default:e.withCtx(()=>[e.createVNode(e.unref(F.default),{dirName:"WorkOrder",getOssAccess:s.getOssAccess,type:"multipleFile",needName:{pathKey:"filePath",nameKey:"fileName"},accept:".txt,.doc,.docx,.rtf,.pdf,.jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.mp4,.avi,.wmv,.mov,.mkv,.xls,.xlsx,.csv,.ppt,.pptx",maxCount:10,maxSize:50,subTitle:e.h(B.default)},null,8,["getOssAccess","subTitle"])]),_:1})]),_:1},512)]),_:1},16,["open","ok-text","cancel-text","confirmLoading"])]))}});exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("ant-design-vue"),l=require("../ap-form/index.js");require("./help-message.vue.js");require("../ap-upload/index.js");const f=require("./interfaces.js");require("../config-provider/index.js");require("./style/index.css");const C=require("../config-provider/hooks/use-global-config.js"),h=require("../config-provider/hooks/use-locale.js"),b=require("../ap-form/items/select/index.vue.js"),q=require("../ap-form/items/radio/index.vue.js"),F=require("../ap-upload/apUpload.vue.js"),B=require("./help-message.vue2.js"),N=e.defineComponent({__name:"work-order-modal",props:{api:{type:Function},getOssAccess:{type:Function},prefixCls:{},visible:{type:Boolean},open:{type:Boolean},confirmLoading:{type:Boolean},title:{},closable:{type:Boolean},closeIcon:{},onOk:{type:Function},onCancel:{type:Function},"onUpdate:visible":{type:Function},"onUpdate:open":{type:Function},onChange:{type:Function},afterClose:{type:Function},centered:{type:Boolean},width:{},footer:{},okText:{},okType:{},cancelText:{},icon:{},maskClosable:{type:Boolean},forceRender:{type:Boolean},okButtonProps:{},cancelButtonProps:{},destroyOnClose:{type:Boolean},wrapClassName:{},maskTransitionName:{},transitionName:{},getContainer:{type:[String,Boolean,Function]},zIndex:{},bodyStyle:{},maskStyle:{},mask:{type:Boolean},keyboard:{type:Boolean},wrapProps:{},focusTriggerAfterClose:{type:Boolean},modalRender:{type:Function},mousePosition:{}},emits:["modalClose"],setup(_,{emit:y}){const u=e.ref(),o=e.ref(!1),i=e.ref(!0),s=_,g=C.useGlobalConfig("api"),{lang:v}=h.useLocale(),x=y,c=async n=>{var a,d;const t=await((d=(a=g.value)==null?void 0:a.select)==null?void 0:d.call(a,{dictCode:n,locale:v.value}));return t==null?void 0:t.map(m=>({label:m.itemText,value:m.itemValue}))},k=async()=>{var n;if(!o.value)try{o.value=!0;const t=await((n=u.value)==null?void 0:n.validateFields());console.log("params",t),await s.api(t),o.value=!1,r.message.success("操作成功"),p()}catch{o.value=!1;return}},p=()=>{i.value=!1,x("modalClose")};return(n,t)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(r.Modal),e.mergeProps(s,{centered:!0,open:i.value,title:"创建工单","ok-text":e.h("span",{},["确认"]),"cancel-text":e.h("span",{},["取消"]),mask:!0,"mask-closable":!0,onOk:k,confirmLoading:o.value,onCancel:p}),{default:e.withCtx(()=>[e.createVNode(e.unref(l.ApForm),{ref_key:"formRef",ref:u},{default:e.withCtx(()=>[e.createVNode(e.unref(l.ApForm).FormItem,{label:"工单标题",name:"ticketsTitle",rules:[{required:!0,message:"不可为空"}]},{default:e.withCtx(()=>[e.createVNode(e.unref(r.Input),{maxlength:50,"show-count":!0})]),_:1}),e.createVNode(e.unref(b.default),{label:"工单类型",name:"ticketsType",rules:[{required:!0,message:"不可为空"}],field:{request:()=>c(e.unref(f.DictCode).TicketsType)}},null,8,["field"]),e.createVNode(e.unref(l.ApForm).FormItem,{label:"工单详情",name:"ticketsContent",rules:[{required:!0,message:"不可为空"}]},{default:e.withCtx(()=>[e.createVNode(e.unref(r.Textarea),{maxlength:300,"show-count":!0})]),_:1}),e.createVNode(e.unref(q.default),{label:"优先级",name:"ticketsLevel",rules:[{required:!0,message:"不可为空"}],field:{request:()=>c(e.unref(f.DictCode).TicketsLevel)}},null,8,["field"]),e.createVNode(e.unref(l.ApForm).FormItem,{name:"files"},{default:e.withCtx(()=>[e.createVNode(e.unref(F.default),{dirName:"WorkOrder",getOssAccess:s.getOssAccess,type:"multipleFile",needName:{pathKey:"filePath",nameKey:"fileName"},accept:".txt,.doc,.docx,.rtf,.pdf,.jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.mp4,.avi,.wmv,.mov,.mkv,.xls,.xlsx,.csv,.ppt,.pptx",maxCount:10,maxSize:50,subTitle:e.h(B.default)},null,8,["getOssAccess","subTitle"])]),_:1})]),_:1},512)]),_:1},16,["open","ok-text","cancel-text","confirmLoading"])]))}});exports.default=N;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "0.0.1-beta.37",
3
+ "version": "0.0.1-beta.39",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "files": [
@@ -60,8 +60,8 @@
60
60
  "sortablejs": "^1.15.2",
61
61
  "@aplus-frontend/oss": "^1.0.11",
62
62
  "mime": "^4.0.3",
63
- "@aplus-frontend/utils": "1.0.19",
64
- "@aplus-frontend/hooks": "1.0.4"
63
+ "@aplus-frontend/hooks": "1.0.4",
64
+ "@aplus-frontend/utils": "1.0.19"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "ant-design-vue": "^4.2.1",