@kmkf-fe-packages/services-components 2.1.0 → 2.1.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class WorkOrderId implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
@@ -13,8 +13,8 @@ declare class WorkOrderId implements ComponentInterface {
|
|
|
13
13
|
formField: string;
|
|
14
14
|
canSort: boolean;
|
|
15
15
|
children: ComponentInterface[];
|
|
16
|
-
dataType: ComponentInterface[
|
|
17
|
-
options: ComponentInterface[
|
|
16
|
+
dataType: ComponentInterface["dataType"];
|
|
17
|
+
options: ComponentInterface["options"];
|
|
18
18
|
constructor(options: PickOption);
|
|
19
19
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
20
20
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -6,11 +6,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
|
-
import React from
|
|
10
|
-
import { ApaasSelect } from
|
|
11
|
-
import { filterFn as _filterFn } from
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { ApaasSelect } from "@kmkf-fe-packages/basic-components";
|
|
11
|
+
import { filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
12
12
|
import GetFormItem from "../GetFormItem";
|
|
13
|
-
import get from
|
|
13
|
+
import get from "lodash/get";
|
|
14
14
|
import { SYMBOL } from "../../constant";
|
|
15
15
|
// 节点状态
|
|
16
16
|
var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
@@ -40,9 +40,10 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
|
40
40
|
style: {
|
|
41
41
|
color: status.color
|
|
42
42
|
}
|
|
43
|
-
}, status === null || status === void 0 ? void 0 : status.label)
|
|
43
|
+
}, status === null || status === void 0 ? void 0 : status.label) :
|
|
44
|
+
/*#__PURE__*/
|
|
44
45
|
// </Dropdown>
|
|
45
|
-
|
|
46
|
+
React.createElement("span", null, "--");
|
|
46
47
|
});
|
|
47
48
|
_defineProperty(this, "renderLog", function (r) {
|
|
48
49
|
var status = get(_this.workOrderStatus, r === null || r === void 0 ? void 0 : r["".concat(_this.id)]);
|
|
@@ -55,7 +56,7 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
|
55
56
|
});
|
|
56
57
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
57
58
|
var status = get(_this.workOrderStatus, record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
|
|
58
|
-
return status ? status === null || status === void 0 ? void 0 : status.label :
|
|
59
|
+
return status ? status === null || status === void 0 ? void 0 : status.label : "--";
|
|
59
60
|
});
|
|
60
61
|
_defineProperty(this, "renderClient", function () {
|
|
61
62
|
return null;
|
|
@@ -69,7 +70,7 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
|
69
70
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
70
71
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
71
72
|
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
72
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
73
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
73
74
|
component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
|
|
74
75
|
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
75
76
|
showSearch: true
|
|
@@ -77,7 +78,7 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
|
77
78
|
});
|
|
78
79
|
});
|
|
79
80
|
_defineProperty(this, "filterConfig", function (item) {
|
|
80
|
-
var _Object$keys;
|
|
81
|
+
var _Object$keys, _Object$keys$filter;
|
|
81
82
|
return {
|
|
82
83
|
searchDefaultConditions: SYMBOL.in,
|
|
83
84
|
type: item.type,
|
|
@@ -85,9 +86,11 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
|
85
86
|
// 过滤组件id
|
|
86
87
|
name: item.name,
|
|
87
88
|
// 过滤组件名称
|
|
88
|
-
filterComponentType:
|
|
89
|
+
filterComponentType: "MultipleSelect",
|
|
89
90
|
props: {
|
|
90
|
-
options: (_Object$keys = Object.keys(_this.workOrderStatus)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.
|
|
91
|
+
options: (_Object$keys = Object.keys(_this.workOrderStatus)) === null || _Object$keys === void 0 ? void 0 : (_Object$keys$filter = _Object$keys.filter(function (key) {
|
|
92
|
+
return key !== "HANDLING";
|
|
93
|
+
})) === null || _Object$keys$filter === void 0 ? void 0 : _Object$keys$filter.map(function (item) {
|
|
91
94
|
return {
|
|
92
95
|
label: _this.workOrderStatus[item].label,
|
|
93
96
|
value: item
|
|
@@ -96,7 +99,7 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
|
96
99
|
},
|
|
97
100
|
filterFn: function filterFn(value) {
|
|
98
101
|
return function (i) {
|
|
99
|
-
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
102
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ""));
|
|
100
103
|
};
|
|
101
104
|
}
|
|
102
105
|
};
|
|
@@ -113,33 +116,33 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
|
113
116
|
this.canSort = true;
|
|
114
117
|
this.children = [];
|
|
115
118
|
this.workOrderStatus = {
|
|
116
|
-
|
|
117
|
-
label:
|
|
118
|
-
color:
|
|
119
|
-
bgColor:
|
|
119
|
+
WAITING: {
|
|
120
|
+
label: "待处理",
|
|
121
|
+
color: "#faad14",
|
|
122
|
+
bgColor: "#faad14"
|
|
120
123
|
},
|
|
121
|
-
|
|
122
|
-
label:
|
|
123
|
-
color:
|
|
124
|
-
bgColor:
|
|
124
|
+
HANDLING: {
|
|
125
|
+
label: "处理中",
|
|
126
|
+
color: "#1890ff",
|
|
127
|
+
bgColor: "#1890ff"
|
|
125
128
|
},
|
|
126
|
-
|
|
127
|
-
label:
|
|
128
|
-
color:
|
|
129
|
-
bgColor:
|
|
129
|
+
STOPPING: {
|
|
130
|
+
label: "暂停中",
|
|
131
|
+
color: "#ff4d4f",
|
|
132
|
+
bgColor: "#ff4d4f"
|
|
130
133
|
},
|
|
131
|
-
|
|
132
|
-
label:
|
|
133
|
-
color:
|
|
134
|
-
bgColor:
|
|
134
|
+
COMPLETED: {
|
|
135
|
+
label: "已完成",
|
|
136
|
+
color: "#73d13d",
|
|
137
|
+
bgColor: "#73d13d"
|
|
135
138
|
},
|
|
136
|
-
|
|
137
|
-
label:
|
|
138
|
-
color:
|
|
139
|
-
bgColor:
|
|
139
|
+
CLOSED: {
|
|
140
|
+
label: "已关闭",
|
|
141
|
+
color: "rgba(0, 0, 0, 0.65)",
|
|
142
|
+
bgColor: "rgba(0, 0, 0, 0.04);"
|
|
140
143
|
}
|
|
141
144
|
};
|
|
142
|
-
this.dataType =
|
|
145
|
+
this.dataType = "string";
|
|
143
146
|
this.options = (_Object$keys2 = Object.keys(this.workOrderStatus)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.map(function (item) {
|
|
144
147
|
return {
|
|
145
148
|
label: _this.workOrderStatus[item].label,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "2.1.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.1.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.1.1",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.1.1",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "fbfab5e12781f7bfdc14afe31bdec00598f74202",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|