@bchr/bchr-front-lib 0.3.121 → 0.3.125
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(
|
|
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
|
|
|
@@ -324,7 +324,7 @@ var HttpService = /*#__PURE__*/function () {
|
|
|
324
324
|
var containsHTML = /<(noframes|noscript|object|script|video).*?<\/\2>/i.test(str);
|
|
325
325
|
|
|
326
326
|
if (containsHTML) {
|
|
327
|
-
throw new Error("
|
|
327
|
+
throw new Error("不安全的输入,请检查!");
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
}, {
|
|
@@ -361,10 +361,10 @@ var HttpService = /*#__PURE__*/function () {
|
|
|
361
361
|
return;
|
|
362
362
|
}
|
|
363
363
|
|
|
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).*?<\/\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);
|
|
365
365
|
|
|
366
366
|
if (containsHTML) {
|
|
367
|
-
throw new Error("
|
|
367
|
+
throw new Error("不安全的输入,请检查!");
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
}, {
|
package/package.json
CHANGED
|
@@ -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
|
-
<
|
|
43
|
-
<div className="process-item-status
|
|
44
|
-
|
|
45
|
-
<
|
|
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
|
-
</
|
|
65
|
+
</Tooltip>
|
|
48
66
|
</div>
|
|
49
67
|
})
|
|
50
68
|
}
|
|
@@ -303,7 +303,7 @@ class HttpService {
|
|
|
303
303
|
|
|
304
304
|
let containsHTML = /<(noframes|noscript|object|script|video).*?<\/\2>/i.test(str);
|
|
305
305
|
if (containsHTML) {
|
|
306
|
-
throw new Error("
|
|
306
|
+
throw new Error("不安全的输入,请检查!");
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
|
|
@@ -339,9 +339,9 @@ class HttpService {
|
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
341
341
|
|
|
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).*?<\/\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);
|
|
343
343
|
if (containsHTML) {
|
|
344
|
-
throw new Error("
|
|
344
|
+
throw new Error("不安全的输入,请检查!");
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
|