kmkf-work-order-service-component 0.0.1-alpha.9 → 0.0.1
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/README.md +2 -2
- package/dist/esm/WorkOrder/common/utils/tools.d.ts +1 -1
- package/dist/esm/WorkOrder/common/utils/tools.js +38 -36
- package/dist/esm/WorkOrder/components/CustomizeFormModal/index.js +29 -12
- package/dist/esm/WorkOrder/components/CustomizeFormModal/index.module.less +1 -1
- package/dist/esm/WorkOrder/components/ListOrderItem/index.js +6 -5
- package/dist/esm/WorkOrder/components/ListOrderItem/index.module.less +2 -2
- package/dist/esm/WorkOrder/components/PayListOrderItem/ModifyModal.js +16 -2
- package/dist/esm/WorkOrder/components/PayListOrderItem/RecordModal.js +3 -2
- package/dist/esm/WorkOrder/components/PayListOrderItem/index.js +1 -0
- package/dist/esm/WorkOrder/components/RecordLog/index.js +1 -0
- package/dist/esm/WorkOrder/components/TransferOrderModal/index.js +4 -2
- package/dist/esm/WorkOrder/components/Widget/basic/Picture/index.js +1 -1
- package/dist/esm/WorkOrder/components/Widget/electricity/EItemEncode/index.js +2 -2
- package/dist/esm/WorkOrder/components/Widget/electricity/EItemId/index.js +2 -2
- package/dist/esm/WorkOrder/components/Widget/electricity/ETradeId/index.js +10 -2
- package/dist/esm/WorkOrder/components/Widget/third/ItemSelect/index.js +2 -2
- package/dist/esm/WorkOrder/index.d.ts +1 -0
- package/dist/esm/WorkOrder/index.js +122 -89
- package/dist/esm/WorkOrder/{index.module.less → index.less} +2 -1
- package/dist/esm/WorkOrder/model/workOrder.d.ts +5 -0
- package/dist/esm/WorkOrder/model/workOrder.js +23 -8
- package/package.json +2 -2
- package/dist/esm/WorkOrder/components/Widget/common/utils.d.ts +0 -0
- package/dist/esm/WorkOrder/components/Widget/common/utils.js +0 -98
@@ -1,98 +0,0 @@
|
|
1
|
-
// import { get, isEmpty, find, keys } from 'lodash';
|
2
|
-
// import V from 'voca';
|
3
|
-
// const ONLY_SHOW_COMPONENT_TYPE = [
|
4
|
-
// 'RADIO',
|
5
|
-
// 'INPUT',
|
6
|
-
// 'TEXTAREA',
|
7
|
-
// 'CHECKBOX',
|
8
|
-
// 'SELECT',
|
9
|
-
// 'DATETIME',
|
10
|
-
// 'PICTURE',
|
11
|
-
// 'MULT_SELECT',
|
12
|
-
// 'ORDINARY_INVOICE',
|
13
|
-
// ];
|
14
|
-
// /**
|
15
|
-
// * 校验数据是不是空
|
16
|
-
// * @param {*} value
|
17
|
-
// * @returns
|
18
|
-
// */
|
19
|
-
// export const isNull = (value: number) => {
|
20
|
-
// return typeof value === 'object' ? isEmpty(value) : !value && value !== 0;
|
21
|
-
// };
|
22
|
-
// export const findLabelBySelectValue = (vales: any[], options: { [x: string]: { [x: string]: any; }; }) => {
|
23
|
-
// if (isEmpty(vales)) return [];
|
24
|
-
// const newKV: any[] = [];
|
25
|
-
// vales.map((value, index) => {
|
26
|
-
// const list = options[index]['list'];
|
27
|
-
// const flatt = keys(list).reduce((next: string | any[], cur: string | number) => {
|
28
|
-
// return next.concat(list[cur]);
|
29
|
-
// }, []);
|
30
|
-
// const label = get(find(flatt, { actived: value }), 'label');
|
31
|
-
// newKV.push({
|
32
|
-
// label,
|
33
|
-
// actived: value,
|
34
|
-
// });
|
35
|
-
// });
|
36
|
-
// return newKV;
|
37
|
-
// };
|
38
|
-
// export const formatPictures = (pictures: any) => {
|
39
|
-
// if (!pictures) return [];
|
40
|
-
// pictures = pictures.replace(/[\[\]]/g, '');
|
41
|
-
// pictures = pictures.replace(/\s/g, '');
|
42
|
-
// pictures = pictures ? pictures.split(',') : [];
|
43
|
-
// return pictures.map((item: any) => {
|
44
|
-
// return {
|
45
|
-
// thumbUrl: `http://gdfw.superboss.cc/${item}`,
|
46
|
-
// uid: `${Date.now()}-${Math.random()}`,
|
47
|
-
// };
|
48
|
-
// });
|
49
|
-
// };
|
50
|
-
// export const filterComponent = (originDataSource = []) => {
|
51
|
-
// return originDataSource.filter((data: any) =>
|
52
|
-
// ONLY_SHOW_COMPONENT_TYPE.includes(data?.workOrderComponentType),
|
53
|
-
// );
|
54
|
-
// };
|
55
|
-
// export const radioTextHandle = (radioValue: any, radioOtherValue: string) => {
|
56
|
-
// return radioValue === '其他'
|
57
|
-
// ? radioOtherValue
|
58
|
-
// ? `${radioValue}(${radioOtherValue})`
|
59
|
-
// : radioValue
|
60
|
-
// : radioValue;
|
61
|
-
// };
|
62
|
-
// const findNodeById = (tree: any[], actived: string = '') => {
|
63
|
-
// for (let i = 0; i < tree.length; i++) {
|
64
|
-
// if (tree[i].actived == actived) {
|
65
|
-
// return tree[i];
|
66
|
-
// }
|
67
|
-
// if (tree[i].children) {
|
68
|
-
// let result: any = findNodeById(tree[i].children, actived);
|
69
|
-
// if (result) {
|
70
|
-
// return result;
|
71
|
-
// }
|
72
|
-
// }
|
73
|
-
// }
|
74
|
-
// };
|
75
|
-
// /**
|
76
|
-
// * 多级下拉框数据转换成aPaas数据结构
|
77
|
-
// * @param {*} sourceOptions
|
78
|
-
// */
|
79
|
-
// export const transMultSelectOptions = (sourceOptions: any[]) => {
|
80
|
-
// let tree: any[] = [];
|
81
|
-
// sourceOptions.map((item: any) => {
|
82
|
-
// if (tree.length === 0) {
|
83
|
-
// return (tree = tree.concat(get(item, 'list.1', [])));
|
84
|
-
// }
|
85
|
-
// Object.keys(item.list).map(l => {
|
86
|
-
// // 在树中找到l对应的节点,将当前数组放到children里面
|
87
|
-
// let result: any = findNodeById(tree, l);
|
88
|
-
// result && (result = { ...result, children: item.list[l] });
|
89
|
-
// });
|
90
|
-
// });
|
91
|
-
// return tree;
|
92
|
-
// };
|
93
|
-
// export const getCookie = (name: string) => {
|
94
|
-
// var arr,
|
95
|
-
// reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)');
|
96
|
-
// if ((arr = document.cookie.match(reg))) return arr[2];
|
97
|
-
// else return null;
|
98
|
-
// };
|