@kmkf-fe-packages/services-components 0.15.1-alpha.1 → 0.15.1-alpha.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.
@@ -44,6 +44,12 @@ var typeMap = {
44
44
  failValue: '发送失败'
45
45
  }
46
46
  };
47
+ var msgTypeCh = {
48
+ ding: '钉钉',
49
+ wechat: '微信',
50
+ qq: 'QQ',
51
+ qywx: '企业微信'
52
+ };
47
53
  var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
48
54
  var _this = this,
49
55
  _typeMap$options$type,
@@ -107,16 +113,17 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
107
113
  var _typeMap$_this$type10;
108
114
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key)];
109
115
  return (list || []).map(function (item) {
110
- var _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _typeMap$_this$type15, _typeMap$_this$type16;
116
+ var _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _typeMap$_this$type15;
111
117
  var currentOption = (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : (_typeMap$_this$type12 = _typeMap$_this$type11.options) === null || _typeMap$_this$type12 === void 0 ? void 0 : (_typeMap$_this$type13 = _typeMap$_this$type12.find) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.call(_typeMap$_this$type12, function (option) {
112
118
  var _typeMap$_this$type14;
113
119
  return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
114
120
  });
115
- return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || '' : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.valueKey]) || '');
121
+ var key = item.msgType || 'ding';
122
+ return "".concat(msgTypeCh[key], "-").concat(item.ruleName, ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || '' : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.valueKey]) || '');
116
123
  }).join(',');
117
124
  });
118
125
  _defineProperty(this, "editRender", function (p) {
119
- var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type17;
126
+ var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type16;
120
127
  return /*#__PURE__*/React.createElement(GetFormItem, {
121
128
  title: _this.name,
122
129
  name: _this.id,
@@ -124,30 +131,30 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
124
131
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
125
132
  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,
126
133
  component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
127
- type: (_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.type,
134
+ type: (_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.type,
128
135
  failValue: typeMap[_this.type].failValue
129
136
  }))
130
137
  });
131
138
  });
132
139
  _defineProperty(this, "filterConfig", function (item) {
133
- var _typeMap$_this$type18, _item$templateConfig;
140
+ var _typeMap$_this$type17, _item$templateConfig;
134
141
  return {
135
142
  searchDefaultConditions: SYMBOL.in,
136
143
  type: item.type,
137
- id: "".concat(item.id, "_").concat((_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.code),
144
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.code),
138
145
  name: "".concat(_this.name),
139
146
  filterComponentType: 'MultipleSelect',
140
147
  props: {
141
148
  options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
142
149
  fieldNames: {
143
- label: "label",
144
- value: "value"
150
+ label: 'label',
151
+ value: 'value'
145
152
  }
146
153
  },
147
154
  filterFn: function filterFn(value) {
148
155
  return function (i) {
149
- var _typeMap$_this$type19;
150
- return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.code), value);
156
+ var _typeMap$_this$type18;
157
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.code), value);
151
158
  };
152
159
  }
153
160
  };
@@ -168,12 +175,12 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
168
175
  required: true,
169
176
  validator: function validator(_, value) {
170
177
  var hasNo = (value || []).some(function (item) {
171
- var _typeMap$_this$type20;
172
- return item[(_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.valueKey];
178
+ var _typeMap$_this$type19;
179
+ return item[(_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.valueKey];
173
180
  });
174
181
  if (!hasNo) {
175
- var _typeMap$_this$type21;
176
- return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type21 = typeMap[_this.type]) === null || _typeMap$_this$type21 === void 0 ? void 0 : _typeMap$_this$type21.name)));
182
+ var _typeMap$_this$type20;
183
+ return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.name)));
177
184
  }
178
185
  return Promise.resolve();
179
186
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.15.1-alpha.1",
3
+ "version": "0.15.1-alpha.2",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -37,7 +37,7 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "a626bb6ca7496ba70af959c6ff37bb3ef40f6e9d",
40
+ "gitHead": "832747c54cd32b70e2d8fc780842a968d7338337",
41
41
  "gitHooks": {
42
42
  "pre-commit": "lint-staged"
43
43
  }