@bchr/bchr-front-lib 0.3.122 → 0.3.126

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.
@@ -5,6 +5,12 @@ var _moment = _interopRequireDefault(require("moment"));
5
5
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
6
6
 
7
7
  window.AppFormulaFunctions = {
8
+ getCurrentMonthFirstDay: function getCurrentMonthFirstDay() {
9
+ return (0, _moment["default"])().date(1).format("YYYY-MM-DD");
10
+ },
11
+ getCurrentDateNextMonthFirstDay: function getCurrentDateNextMonthFirstDay() {
12
+ return (0, _moment["default"])().add(1, 'months').date(1).format("YYYY-MM-DD");
13
+ },
8
14
  currentMonthStartDay: function currentMonthStartDay(dateStr) {
9
15
  if (dateStr) {
10
16
  var baseDate = (0, _moment["default"])(dateStr, "YYYY-MM-DD");
@@ -30,12 +30,18 @@ var ProcessLink = function ProcessLink(props) {
30
30
  }
31
31
 
32
32
  return data.map(function (item) {
33
+ var cardContent = (item.deal_process = 0 || item[status] == WorkflowLinkContext.setUp) ? null : /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, "\u5904\u7406\u4EBA\u540D\u79F0\uFF1A", item.handler_ext_name)), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, "\u5904\u7406\u4EBA\u6240\u5C5E\u516C\u53F8\uFF1A", item.handler_corp_ext_name)), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, "\u5904\u7406\u4EBA\u6240\u5C5E\u90E8\u95E8\uFF1A", item.handler_dept_ext_name)), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, "\u5904\u7406\u4EBA\u6240\u5C5E\u5C97\u4F4D\uFF1A", item.handler_post_ext_name)), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, "\u5904\u7406\u4EBA\u529E\u516C\u7535\u8BDD\uFF1A", item.handler_mobile)));
33
34
  var status_css_class = "process-item-status-set-up",
34
35
  status_icon_css_class = "icon-bchr-time";
36
+ var handlerTipTitle = cardContent;
35
37
 
36
38
  if (item[status] === WorkflowLinkContext.haveInHand) {
37
39
  status_css_class = "process-item-status-have-in-hand";
38
40
  status_icon_css_class = "icon-bchr-refresh";
41
+
42
+ if (!item.b_assign_handler) {
43
+ handlerTipTitle = "工单还未分配处理人";
44
+ }
39
45
  } else if (item[status] === WorkflowLinkContext.approved) {
40
46
  status_css_class = "process-item-status-finish";
41
47
  status_icon_css_class = "icon-bchr-tick";
@@ -45,6 +51,7 @@ var ProcessLink = function ProcessLink(props) {
45
51
  } else {
46
52
  status_css_class = "process-item-status-set-up";
47
53
  status_icon_css_class = "icon-bchr-time";
54
+ handlerTipTitle = "工单处理还未到此环节";
48
55
  }
49
56
 
50
57
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -56,7 +63,12 @@ var ProcessLink = function ProcessLink(props) {
56
63
  }, /*#__PURE__*/_react["default"].createElement("span", null, item[tag])), /*#__PURE__*/_react["default"].createElement("div", {
57
64
  className: "process-item-label",
58
65
  title: item[field]
59
- }, item[field]), /*#__PURE__*/_react["default"].createElement("div", {
66
+ }, item[field]), /*#__PURE__*/_react["default"].createElement(_antd.Tooltip, {
67
+ title: handlerTipTitle,
68
+ color: "#5cb85c",
69
+ key: item.segment_pk,
70
+ placement: "bottom"
71
+ }, /*#__PURE__*/_react["default"].createElement("div", {
60
72
  className: "process-item-status"
61
73
  }, /*#__PURE__*/_react["default"].createElement("div", {
62
74
  className: "process-item-status-bar"
@@ -64,7 +76,7 @@ var ProcessLink = function ProcessLink(props) {
64
76
  className: "process-item-status-tag"
65
77
  }, /*#__PURE__*/_react["default"].createElement("span", {
66
78
  className: "iconfont ".concat(status_icon_css_class)
67
- }))));
79
+ })))));
68
80
  });
69
81
  };
70
82
 
@@ -41,6 +41,8 @@ var addTabOrBlankLink = function addTabOrBlankLink(location) {
41
41
  host += "3016";
42
42
  } else if (location.url.indexOf('talent') !== -1) {
43
43
  host += "3017";
44
+ } else if (location.url.indexOf('lzyq') !== -1) {
45
+ host += "3063";
44
46
  }
45
47
 
46
48
  if (pageTargetBlankObj && !pageTargetBlank) {
@@ -131,22 +131,24 @@ var HttpService = /*#__PURE__*/function () {
131
131
  rpcMethodName = "";
132
132
  }
133
133
 
134
- if (jsonObject) {
135
- ajaxOptions.data = jsonObject;
136
- }
134
+ if (!this.__checkJSONObjectSecurity(jsonObject)) {
135
+ if (jsonObject) {
136
+ ajaxOptions.data = jsonObject;
137
+ }
137
138
 
138
- if (ajaxOptions.rpcMethodName) {
139
- delete ajaxOptions.rpcMethodName;
140
- }
139
+ if (ajaxOptions.rpcMethodName) {
140
+ delete ajaxOptions.rpcMethodName;
141
+ }
141
142
 
142
- ajaxOptions.type = "post";
143
- ajaxOptions.dataType = "json";
143
+ ajaxOptions.type = "post";
144
+ ajaxOptions.dataType = "json";
144
145
 
145
- if (!ajaxOptions.url) {
146
- ajaxOptions.url = this.requestContextPath + rpcMethodName;
147
- }
146
+ if (!ajaxOptions.url) {
147
+ ajaxOptions.url = this.requestContextPath + rpcMethodName;
148
+ }
148
149
 
149
- return _jquery["default"].ajax(ajaxOptions);
150
+ return _jquery["default"].ajax(ajaxOptions);
151
+ }
150
152
  }
151
153
  }, {
152
154
  key: "__postForMock",
@@ -322,7 +324,7 @@ var HttpService = /*#__PURE__*/function () {
322
324
  var containsHTML = /<(noframes|noscript|object|script|video).*?<\/\2>/i.test(str);
323
325
 
324
326
  if (containsHTML) {
325
- throw new Error("不安全的输入,请检查!【" + str + "】");
327
+ throw new Error("不安全的输入,请检查!");
326
328
  }
327
329
  }
328
330
  }, {
@@ -359,10 +361,10 @@ var HttpService = /*#__PURE__*/function () {
359
361
  return;
360
362
  }
361
363
 
362
- var containsHTML = /<(br|basefont|hr|input|source|frame|param|area|meta|!--|col|link|option|base|img|wbr|!DOCTYPE).*?>|<(a|abbr|acronym|address|applet|article|aside|audio|b|bdi|bdo|big|blockquote|body|button|canvas|caption|center|cite|code|colgroup|command|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frameset|head|header|hgroup|h1|h2|h3|h4|h5|h6|html|i|iframe|ins|kbd|keygen|label|legend|li|map|mark|menu|meter|nav|noframes|noscript|object|ol|optgroup|output|p|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video).*?<\/\2>/i.test(str);
364
+ var containsHTML = /<(br|basefont|hr|input|source|frame|param|area|meta|!--|col|link|option|base|img|wbr|!DOCTYPE).*?>|<(a|abbr|acronym|address|applet|article|aside|audio|b|bdi|bdo|big|blockquote|body|button|canvas|caption|center|cite|code|colgroup|command|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frameset|head|header|hgroup|h1|h2|h3|h4|h5|h6|html|i|iframe|ins|kbd|keygen|label|legend|li|map|mark|menu|meter|nav|noframes|noscript|object|ol|optgroup|output|p|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video|svg).*?<\/\2>/i.test(str);
363
365
 
364
366
  if (containsHTML) {
365
- throw new Error("不安全的输入,请检查!【" + str + "】");
367
+ throw new Error("不安全的输入,请检查!");
366
368
  }
367
369
  }
368
370
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bchr/bchr-front-lib",
3
- "version": "0.3.122",
3
+ "version": "0.3.126",
4
4
  "description": "bchr front lib",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -1,6 +1,14 @@
1
1
  import moment from "moment";
2
2
 
3
3
  window.AppFormulaFunctions = {
4
+ getCurrentMonthFirstDay : function () {
5
+ return moment().date(1).format("YYYY-MM-DD");
6
+ },
7
+
8
+ getCurrentDateNextMonthFirstDay : function () {
9
+ return moment().add(1,'months').date(1).format("YYYY-MM-DD");
10
+ },
11
+
4
12
  currentMonthStartDay : function (dateStr) {
5
13
  if (dateStr) {
6
14
  let baseDate = moment(dateStr, "YYYY-MM-DD");
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import {Empty} from "antd";
2
+ import {Empty, Tooltip} from "antd";
3
3
 
4
4
  const WorkflowLinkContext = {
5
5
  setUp: 0,
@@ -21,11 +21,25 @@ const ProcessLink = (props) => {
21
21
  return <Empty/>
22
22
  }
23
23
  return data.map(item => {
24
+
25
+ let cardContent = (item.deal_process = 0 || item[status] == WorkflowLinkContext.setUp) ? null : <div>
26
+ <div><p>处理人名称:{item.handler_ext_name}</p></div>
27
+ <div><p>处理人所属公司:{item.handler_corp_ext_name}</p></div>
28
+ <div><p>处理人所属部门:{item.handler_dept_ext_name}</p></div>
29
+ <div><p>处理人所属岗位:{item.handler_post_ext_name}</p></div>
30
+ <div><p>处理人办公电话:{item.handler_mobile}</p></div>
31
+ </div>
32
+
24
33
  let status_css_class = "process-item-status-set-up",
25
34
  status_icon_css_class = "icon-bchr-time";
35
+ let handlerTipTitle = cardContent;
26
36
  if (item[status] === WorkflowLinkContext.haveInHand) {
27
37
  status_css_class = "process-item-status-have-in-hand";
28
38
  status_icon_css_class = "icon-bchr-refresh";
39
+
40
+ if (!item.b_assign_handler) {
41
+ handlerTipTitle = "工单还未分配处理人"
42
+ }
29
43
  } else if (item[status] === WorkflowLinkContext.approved) {
30
44
  status_css_class = "process-item-status-finish";
31
45
  status_icon_css_class = "icon-bchr-tick";
@@ -35,16 +49,20 @@ const ProcessLink = (props) => {
35
49
  } else {
36
50
  status_css_class = "process-item-status-set-up";
37
51
  status_icon_css_class = "icon-bchr-time";
52
+ handlerTipTitle = "工单处理还未到此环节";
38
53
  }
54
+
39
55
  return <div key={item.pk} className={`process-item ${status_css_class}`}>
40
56
  {tag && <div className="process-item-tag" title={item[tag]}><span>{item[tag]}</span></div>}
41
57
  <div className="process-item-label" title={item[field]}>{item[field]}</div>
42
- <div className="process-item-status">
43
- <div className="process-item-status-bar"/>
44
- <div className="process-item-status-tag">
45
- <span className={`iconfont ${status_icon_css_class}`}/>
58
+ <Tooltip title={handlerTipTitle} color={"#5cb85c"} key={item.segment_pk} placement="bottom">
59
+ <div className="process-item-status">
60
+ <div className="process-item-status-bar"/>
61
+ <div className="process-item-status-tag">
62
+ <span className={`iconfont ${status_icon_css_class}`}/>
63
+ </div>
46
64
  </div>
47
- </div>
65
+ </Tooltip>
48
66
  </div>
49
67
  })
50
68
  }
@@ -33,6 +33,8 @@ const addTabOrBlankLink = (location) => {
33
33
  host += "3016";
34
34
  } else if (location.url.indexOf('talent') !== -1) {
35
35
  host += "3017";
36
+ } else if (location.url.indexOf('lzyq') !== -1) {
37
+ host += "3063";
36
38
  }
37
39
 
38
40
  if (pageTargetBlankObj && !pageTargetBlank) {
@@ -114,22 +114,24 @@ class HttpService {
114
114
  rpcMethodName = "";
115
115
  }
116
116
 
117
- if (jsonObject) {
118
- ajaxOptions.data = jsonObject;
119
- }
117
+ if (!this.__checkJSONObjectSecurity(jsonObject)) {
118
+ if (jsonObject) {
119
+ ajaxOptions.data = jsonObject;
120
+ }
120
121
 
121
- if (ajaxOptions.rpcMethodName) {
122
- delete ajaxOptions.rpcMethodName;
123
- }
122
+ if (ajaxOptions.rpcMethodName) {
123
+ delete ajaxOptions.rpcMethodName;
124
+ }
124
125
 
125
- ajaxOptions.type = "post";
126
- ajaxOptions.dataType = "json";
126
+ ajaxOptions.type = "post";
127
+ ajaxOptions.dataType = "json";
127
128
 
128
- if (!ajaxOptions.url) {
129
- ajaxOptions.url = this.requestContextPath + rpcMethodName;
130
- }
129
+ if (!ajaxOptions.url) {
130
+ ajaxOptions.url = this.requestContextPath + rpcMethodName;
131
+ }
131
132
 
132
- return $.ajax(ajaxOptions);
133
+ return $.ajax(ajaxOptions);
134
+ }
133
135
  }
134
136
 
135
137
  __postForMock(mockOptions) {
@@ -301,7 +303,7 @@ class HttpService {
301
303
 
302
304
  let containsHTML = /<(noframes|noscript|object|script|video).*?<\/\2>/i.test(str);
303
305
  if (containsHTML) {
304
- throw new Error("不安全的输入,请检查!【" + str + "】");
306
+ throw new Error("不安全的输入,请检查!");
305
307
  }
306
308
  }
307
309
 
@@ -337,9 +339,9 @@ class HttpService {
337
339
  return;
338
340
  }
339
341
 
340
- let containsHTML = /<(br|basefont|hr|input|source|frame|param|area|meta|!--|col|link|option|base|img|wbr|!DOCTYPE).*?>|<(a|abbr|acronym|address|applet|article|aside|audio|b|bdi|bdo|big|blockquote|body|button|canvas|caption|center|cite|code|colgroup|command|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frameset|head|header|hgroup|h1|h2|h3|h4|h5|h6|html|i|iframe|ins|kbd|keygen|label|legend|li|map|mark|menu|meter|nav|noframes|noscript|object|ol|optgroup|output|p|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video).*?<\/\2>/i.test(str);
342
+ let containsHTML = /<(br|basefont|hr|input|source|frame|param|area|meta|!--|col|link|option|base|img|wbr|!DOCTYPE).*?>|<(a|abbr|acronym|address|applet|article|aside|audio|b|bdi|bdo|big|blockquote|body|button|canvas|caption|center|cite|code|colgroup|command|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frameset|head|header|hgroup|h1|h2|h3|h4|h5|h6|html|i|iframe|ins|kbd|keygen|label|legend|li|map|mark|menu|meter|nav|noframes|noscript|object|ol|optgroup|output|p|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video|svg).*?<\/\2>/i.test(str);
341
343
  if (containsHTML) {
342
- throw new Error("不安全的输入,请检查!【" + str + "】");
344
+ throw new Error("不安全的输入,请检查!");
343
345
  }
344
346
  }
345
347