@titaui/pc 1.12.7-beta.4 → 1.12.7-beta.7
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/lib/components/dynamic/dynamic-item/components/comments-dialog/index.js +10 -8
- package/lib/components/import-modal/import-okr-modal/index.js +4 -1
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +8 -6
- package/lib/components/menus/export-modules/summary-menus/menus.js +56 -50
- package/lib/components/picker/components/picker-trigger/index.js +2 -47
- package/lib/components/write-summary-modal/index.css +79 -0
- package/lib/components/write-summary-modal/index.js +152 -0
- package/lib/components/write-summary-modal/interface.js +19 -0
- package/lib/components/write-summary-modal/request-api.js +18 -0
- package/lib/components/write-summary-modal/utils.js +31 -0
- package/lib/index.js +8 -0
- package/package.json +1 -1
|
@@ -43,13 +43,13 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
43
43
|
|
|
44
44
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
45
|
|
|
46
|
-
var precls =
|
|
46
|
+
var precls = "remind-dialog";
|
|
47
47
|
|
|
48
48
|
var RemindDialog = function RemindDialog(props) {
|
|
49
49
|
var visible = props.visible,
|
|
50
50
|
closeDialog = props.closeDialog;
|
|
51
51
|
|
|
52
|
-
var _useState = (0, _react.useState)(
|
|
52
|
+
var _useState = (0, _react.useState)(""),
|
|
53
53
|
_useState2 = _slicedToArray(_useState, 2),
|
|
54
54
|
comments = _useState2[0],
|
|
55
55
|
setComments = _useState2[1];
|
|
@@ -59,7 +59,7 @@ var RemindDialog = function RemindDialog(props) {
|
|
|
59
59
|
ratingScore = _useState4[0],
|
|
60
60
|
setRatingScore = _useState4[1];
|
|
61
61
|
|
|
62
|
-
var _useState5 = (0, _react.useState)(
|
|
62
|
+
var _useState5 = (0, _react.useState)(""),
|
|
63
63
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
64
64
|
encourageState = _useState6[0],
|
|
65
65
|
setEencourageState = _useState6[1];
|
|
@@ -72,10 +72,12 @@ var RemindDialog = function RemindDialog(props) {
|
|
|
72
72
|
|
|
73
73
|
var changeRate = function changeRate(v) {
|
|
74
74
|
setRatingScore(v);
|
|
75
|
+
setEencourageState("");
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
var changeEncourage = function changeEncourage(v) {
|
|
78
79
|
setEencourageState(v);
|
|
80
|
+
setRatingScore(0);
|
|
79
81
|
};
|
|
80
82
|
|
|
81
83
|
return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
@@ -85,22 +87,22 @@ var RemindDialog = function RemindDialog(props) {
|
|
|
85
87
|
},
|
|
86
88
|
onCancel: closeDialog,
|
|
87
89
|
onOk: closeDialog,
|
|
88
|
-
title: (0, _getLocale.getLocale)(
|
|
90
|
+
title: (0, _getLocale.getLocale)("Rep_NewS_Evaluation"),
|
|
89
91
|
onClose: closeDialog
|
|
90
92
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
93
|
className: "".concat(precls, "-content")
|
|
92
94
|
}, /*#__PURE__*/_react["default"].createElement(_form["default"], null, /*#__PURE__*/_react["default"].createElement(_regulationSettingItem["default"], {
|
|
93
|
-
label: (0, _getLocale.getLocale)(
|
|
95
|
+
label: (0, _getLocale.getLocale)("Rep_NewS_OverallRating")
|
|
94
96
|
}, /*#__PURE__*/_react["default"].createElement(_rate["default"], {
|
|
95
97
|
ratingScore: ratingScore,
|
|
96
98
|
changeRate: changeRate
|
|
97
99
|
})), /*#__PURE__*/_react["default"].createElement(_regulationSettingItem["default"], {
|
|
98
|
-
label: (0, _getLocale.getLocale)(
|
|
100
|
+
label: (0, _getLocale.getLocale)("Rep_NewS_MedalEncour")
|
|
99
101
|
}, /*#__PURE__*/_react["default"].createElement(_encourage["default"], {
|
|
100
102
|
encourageState: encourageState,
|
|
101
103
|
changeEncourage: changeEncourage
|
|
102
104
|
})), /*#__PURE__*/_react["default"].createElement(_regulationSettingItem["default"], {
|
|
103
|
-
label: (0, _getLocale.getLocale)(
|
|
105
|
+
label: (0, _getLocale.getLocale)("Per_Ass_New_Appr_detail_Com")
|
|
104
106
|
}, /*#__PURE__*/_react["default"].createElement(_textarea["default"], {
|
|
105
107
|
maxLine: 4,
|
|
106
108
|
line: 4,
|
|
@@ -109,7 +111,7 @@ var RemindDialog = function RemindDialog(props) {
|
|
|
109
111
|
return _onChange(e.target.value);
|
|
110
112
|
},
|
|
111
113
|
wrapperClass: "textarea",
|
|
112
|
-
placeholder: (0, _getLocale.getLocale)(
|
|
114
|
+
placeholder: (0, _getLocale.getLocale)("Rep_NewS_PleaEnteCom"),
|
|
113
115
|
inputRef: inputRef
|
|
114
116
|
})))));
|
|
115
117
|
};
|
|
@@ -69,9 +69,9 @@ function ImportOKRModal(props) {
|
|
|
69
69
|
var selectedRef = (0, _react.useRef)(selected); // 解决闭包
|
|
70
70
|
|
|
71
71
|
var onOkHandler = function onOkHandler() {
|
|
72
|
-
onCancelHandler();
|
|
73
72
|
onOk && onOk(selected);
|
|
74
73
|
setSelected([]);
|
|
74
|
+
onCancelHandler();
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
var onCancelHandler = function onCancelHandler() {
|
|
@@ -100,6 +100,9 @@ function ImportOKRModal(props) {
|
|
|
100
100
|
(0, _react.useEffect)(function () {
|
|
101
101
|
setVisible(isVisible);
|
|
102
102
|
}, [isVisible]);
|
|
103
|
+
(0, _react.useEffect)(function () {
|
|
104
|
+
setSelected(lastSelected);
|
|
105
|
+
}, [lastSelected]);
|
|
103
106
|
return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
104
107
|
title: (0, _getLocale.getLocale)('Per_details_ReviewDetails_ImOK'),
|
|
105
108
|
visible: visible,
|
|
@@ -121,10 +121,10 @@ function _default() {
|
|
|
121
121
|
|
|
122
122
|
(0, _react.useEffect)(function () {
|
|
123
123
|
setHeight(document.body.offsetHeight - 164);
|
|
124
|
-
}, []);
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
// 动态加载子节点数据集
|
|
124
|
+
}, []);
|
|
125
|
+
(0, _react.useEffect)(function () {
|
|
126
|
+
location.href = "#/summary/manage?departmentName=公司全部&departmentId=0";
|
|
127
|
+
}, []); // 动态加载子节点数据集
|
|
128
128
|
|
|
129
129
|
var onLoadTreeNodeDataHandler = function onLoadTreeNodeDataHandler(treeNode) {
|
|
130
130
|
if (loadedNode.current.includes(treeNode.id)) return null;
|
|
@@ -152,8 +152,10 @@ function _default() {
|
|
|
152
152
|
var nodeType = node.nodeType,
|
|
153
153
|
data = node.data;
|
|
154
154
|
|
|
155
|
-
if (nodeType == _index.USER_NODE) {
|
|
156
|
-
|
|
155
|
+
if (nodeType == _index.USER_NODE) {
|
|
156
|
+
location.href = "#/summary/manage?toUserId=".concat(data.userId);
|
|
157
|
+
} else if (nodeType == _index.DEPART_NODE) {
|
|
158
|
+
location.href = "#/summary/manage?departmentName=".concat(data.name, "&departmentId=").concat(data.id);
|
|
157
159
|
}
|
|
158
160
|
|
|
159
161
|
setSelectedMenuKeys(selectedKyes);
|
|
@@ -5,41 +5,44 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.defaultRefObject = exports["default"] = exports.PAGE_SUMMARY_SUBORDINATE = exports.PAGE_SUMMARY_SHARE = exports.PAGE_SUMMARY_ROLE = exports.PAGE_SUMMARY_MY = exports.PAGE_SUMMARY_DEPART = exports.PAGE_SUMMARY_CHART = exports.PAGE_SUMMARY_ALl = void 0;
|
|
7
7
|
|
|
8
|
-
var _auth = require("../../../../utils/auth");
|
|
9
|
-
|
|
10
8
|
var _i18n = require("../../i18n");
|
|
11
9
|
|
|
12
10
|
var _index = require("../../components/menu-tree/tree-node/index");
|
|
13
11
|
|
|
14
12
|
var _getLocale = require("../../../../utils/getLocale");
|
|
15
13
|
|
|
14
|
+
var _request = require("@titaui/request");
|
|
15
|
+
|
|
16
|
+
var _bsGlobal = require("../../../../utils/bs-global");
|
|
17
|
+
|
|
16
18
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
19
|
|
|
18
20
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
19
21
|
|
|
20
22
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
21
23
|
|
|
24
|
+
var userId = (0, _bsGlobal.getUserInfo)().Id;
|
|
22
25
|
var defaultRefObject = {
|
|
23
26
|
menus: [],
|
|
24
27
|
insertSubordinates: function insertSubordinates() {},
|
|
25
28
|
getMenus: function getMenus() {},
|
|
26
29
|
setSubordinatesLoading: function setSubordinatesLoading() {},
|
|
27
|
-
SUBORDINATES:
|
|
30
|
+
SUBORDINATES: ''
|
|
28
31
|
};
|
|
29
32
|
exports.defaultRefObject = defaultRefObject;
|
|
30
|
-
var PAGE_SUMMARY_ALl =
|
|
33
|
+
var PAGE_SUMMARY_ALl = 'summaryall';
|
|
31
34
|
exports.PAGE_SUMMARY_ALl = PAGE_SUMMARY_ALl;
|
|
32
|
-
var PAGE_SUMMARY_MY =
|
|
35
|
+
var PAGE_SUMMARY_MY = 'summarymy';
|
|
33
36
|
exports.PAGE_SUMMARY_MY = PAGE_SUMMARY_MY;
|
|
34
|
-
var PAGE_SUMMARY_SUBORDINATE =
|
|
37
|
+
var PAGE_SUMMARY_SUBORDINATE = 'subordinates';
|
|
35
38
|
exports.PAGE_SUMMARY_SUBORDINATE = PAGE_SUMMARY_SUBORDINATE;
|
|
36
|
-
var PAGE_SUMMARY_SHARE =
|
|
39
|
+
var PAGE_SUMMARY_SHARE = 'share';
|
|
37
40
|
exports.PAGE_SUMMARY_SHARE = PAGE_SUMMARY_SHARE;
|
|
38
|
-
var PAGE_SUMMARY_DEPART =
|
|
41
|
+
var PAGE_SUMMARY_DEPART = 'depart';
|
|
39
42
|
exports.PAGE_SUMMARY_DEPART = PAGE_SUMMARY_DEPART;
|
|
40
|
-
var PAGE_SUMMARY_ROLE =
|
|
43
|
+
var PAGE_SUMMARY_ROLE = 'role';
|
|
41
44
|
exports.PAGE_SUMMARY_ROLE = PAGE_SUMMARY_ROLE;
|
|
42
|
-
var PAGE_SUMMARY_CHART =
|
|
45
|
+
var PAGE_SUMMARY_CHART = 'chart';
|
|
43
46
|
exports.PAGE_SUMMARY_CHART = PAGE_SUMMARY_CHART;
|
|
44
47
|
|
|
45
48
|
var summaryMenus = /*#__PURE__*/function () {
|
|
@@ -49,66 +52,69 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
49
52
|
this.COMPANYALL = _index.COMPANY_ALL_NODE;
|
|
50
53
|
this.SHARE = _index.SHARE_NODE;
|
|
51
54
|
this.SUBORDINATES = 'subordinates';
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
var isShowShare;
|
|
56
|
+
(0, _request.rget)('v1')("summary/getShareUsers?toUserId=".concat(userId)).then(function (res) {
|
|
57
|
+
if (res.total === 0) {
|
|
58
|
+
isShowShare = true;
|
|
59
|
+
} else {
|
|
60
|
+
isShowShare = false;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
59
63
|
this.menus = [{
|
|
60
|
-
icon:
|
|
64
|
+
icon: 'all-zongjie',
|
|
61
65
|
label: _i18n.locale.menu_all_summary,
|
|
62
66
|
key: PAGE_SUMMARY_ALl,
|
|
63
67
|
type: _index.MENU_ITEM_NOE,
|
|
64
|
-
href:
|
|
68
|
+
href: '#/summary/all'
|
|
65
69
|
}, {
|
|
66
|
-
icon:
|
|
70
|
+
icon: 'caidan-my',
|
|
67
71
|
label: _i18n.locale.menu_my_summary,
|
|
68
72
|
key: PAGE_SUMMARY_MY,
|
|
69
73
|
type: _index.MENU_ITEM_NOE,
|
|
70
|
-
href:
|
|
74
|
+
href: '#/summary/my'
|
|
71
75
|
}, {
|
|
72
|
-
icon:
|
|
76
|
+
icon: 'caidan-xiashu',
|
|
73
77
|
label: _i18n.locale.menu_my_subordinates,
|
|
74
78
|
key: this.SUBORDINATES,
|
|
75
79
|
type: _index.SUBORDINATES_NODE,
|
|
76
80
|
isLeaf: false,
|
|
77
81
|
children: [],
|
|
78
|
-
href:
|
|
82
|
+
href: '#/summary/subordinates',
|
|
79
83
|
isShow: window.BSGlobal.loginUserInfo.HasSub
|
|
80
84
|
}, {
|
|
81
|
-
icon:
|
|
85
|
+
icon: 'caidan-enjoy',
|
|
82
86
|
label: _i18n.locale.menu_my_share,
|
|
83
87
|
key: PAGE_SUMMARY_SHARE,
|
|
84
88
|
type: _index.MENU_ITEM_NOE,
|
|
85
|
-
href:
|
|
89
|
+
href: '#/summary/share',
|
|
90
|
+
isShow: isShowShare
|
|
86
91
|
}, {
|
|
87
|
-
icon:
|
|
92
|
+
icon: 'bumen',
|
|
88
93
|
label: _i18n.locale.menu_department,
|
|
89
94
|
key: this.COMPANYALL,
|
|
90
95
|
type: this.COMPANYALL,
|
|
91
|
-
href:
|
|
96
|
+
href: ''
|
|
92
97
|
}, {
|
|
93
|
-
icon:
|
|
98
|
+
icon: '',
|
|
94
99
|
label: _i18n.locale.menu_summary,
|
|
95
|
-
key:
|
|
100
|
+
key: 'other',
|
|
96
101
|
type: _index.GROUP_NAME_NODE,
|
|
97
|
-
href:
|
|
102
|
+
href: ''
|
|
98
103
|
}, {
|
|
99
|
-
icon:
|
|
104
|
+
icon: 'my-setup',
|
|
100
105
|
label: _i18n.locale.menu_summary_role,
|
|
101
106
|
key: PAGE_SUMMARY_ROLE,
|
|
102
107
|
type: _index.MENU_ITEM_NOE,
|
|
103
|
-
href:
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
108
|
+
href: '#/enterprise/manage?reactRouterName=daily'
|
|
109
|
+
} // {
|
|
110
|
+
// icon: "yibiao",
|
|
111
|
+
// label: locale.menu_summary_count,
|
|
112
|
+
// key: PAGE_SUMMARY_CHART,
|
|
113
|
+
// type: MENU_ITEM_NOE,
|
|
114
|
+
// href: "#/summary/chart",
|
|
115
|
+
// isShow: hasDashboardAuth,
|
|
116
|
+
// }
|
|
117
|
+
];
|
|
112
118
|
}
|
|
113
119
|
|
|
114
120
|
_createClass(summaryMenus, [{
|
|
@@ -118,11 +124,11 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
118
124
|
|
|
119
125
|
if (loading) {
|
|
120
126
|
this.menus[1].children.push({
|
|
121
|
-
icon:
|
|
122
|
-
label:
|
|
123
|
-
key:
|
|
127
|
+
icon: '',
|
|
128
|
+
label: 'loading',
|
|
129
|
+
key: 'loading-subordinates',
|
|
124
130
|
type: _index.LOADING_NODE,
|
|
125
|
-
href:
|
|
131
|
+
href: '',
|
|
126
132
|
data: {}
|
|
127
133
|
});
|
|
128
134
|
}
|
|
@@ -132,11 +138,11 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
132
138
|
value: function insertSubordinates(users) {
|
|
133
139
|
if (!users || !users.length) {
|
|
134
140
|
this.menus[2].children = [{
|
|
135
|
-
icon:
|
|
136
|
-
label:
|
|
137
|
-
key:
|
|
141
|
+
icon: '',
|
|
142
|
+
label: 'empty-subordinates',
|
|
143
|
+
key: 'empty-subordinates',
|
|
138
144
|
type: _index.NO_SUBORDINATES_NODE,
|
|
139
|
-
href:
|
|
145
|
+
href: '',
|
|
140
146
|
data: {}
|
|
141
147
|
}];
|
|
142
148
|
return;
|
|
@@ -147,11 +153,11 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
147
153
|
for (var i = 0; i < users.length; i++) {
|
|
148
154
|
var user = users[i];
|
|
149
155
|
treeNodeUsers.push({
|
|
150
|
-
icon:
|
|
156
|
+
icon: '',
|
|
151
157
|
label: user.name,
|
|
152
158
|
key: "".concat(user.userId),
|
|
153
159
|
type: _index.USER_NODE,
|
|
154
|
-
href:
|
|
160
|
+
href: '',
|
|
155
161
|
data: user
|
|
156
162
|
});
|
|
157
163
|
}
|
|
@@ -25,18 +25,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
25
25
|
|
|
26
26
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
27
|
|
|
28
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
29
|
-
|
|
30
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31
|
-
|
|
32
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
33
|
-
|
|
34
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
35
|
-
|
|
36
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
37
|
-
|
|
38
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
|
-
|
|
40
28
|
var PickerTrigger = function PickerTrigger(props) {
|
|
41
29
|
var children = props.children,
|
|
42
30
|
viewDate = props.viewDate,
|
|
@@ -45,29 +33,13 @@ var PickerTrigger = function PickerTrigger(props) {
|
|
|
45
33
|
_props$allowClear = props.allowClear,
|
|
46
34
|
allowClear = _props$allowClear === void 0 ? false : _props$allowClear,
|
|
47
35
|
placeholder = props.placeholder,
|
|
48
|
-
_onClick = props.onClick
|
|
49
|
-
viewDateRange = props.viewDateRange;
|
|
36
|
+
_onClick = props.onClick;
|
|
50
37
|
|
|
51
38
|
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
52
39
|
mode = _useContext.mode,
|
|
53
40
|
format = _useContext.format,
|
|
54
41
|
value = _useContext.value;
|
|
55
42
|
|
|
56
|
-
var _useState = (0, _react.useState)(false),
|
|
57
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
58
|
-
isCkeckTime = _useState2[0],
|
|
59
|
-
setIsCheckTime = _useState2[1];
|
|
60
|
-
|
|
61
|
-
var _useState3 = (0, _react.useState)(value),
|
|
62
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
63
|
-
firstValue = _useState4[0],
|
|
64
|
-
setFirstValue = _useState4[1];
|
|
65
|
-
|
|
66
|
-
var _useState5 = (0, _react.useState)(mode),
|
|
67
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
68
|
-
modeType = _useState6[0],
|
|
69
|
-
setModeType = _useState6[1];
|
|
70
|
-
|
|
71
43
|
var currFormat = format;
|
|
72
44
|
|
|
73
45
|
switch (mode) {
|
|
@@ -88,23 +60,6 @@ var PickerTrigger = function PickerTrigger(props) {
|
|
|
88
60
|
break;
|
|
89
61
|
}
|
|
90
62
|
|
|
91
|
-
(0, _react.useEffect)(function () {
|
|
92
|
-
if (modeType === mode) {
|
|
93
|
-
if (firstValue !== value) {
|
|
94
|
-
setIsCheckTime(true);
|
|
95
|
-
}
|
|
96
|
-
} else {
|
|
97
|
-
setModeType(mode);
|
|
98
|
-
|
|
99
|
-
if (viewDateRange) {
|
|
100
|
-
setFirstValue(viewDateRange);
|
|
101
|
-
} else {
|
|
102
|
-
setFirstValue(value);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
setIsCheckTime(false);
|
|
106
|
-
}
|
|
107
|
-
}, [value, mode, viewDateRange]);
|
|
108
63
|
return (
|
|
109
64
|
/*#__PURE__*/
|
|
110
65
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
@@ -119,7 +74,7 @@ var PickerTrigger = function PickerTrigger(props) {
|
|
|
119
74
|
}
|
|
120
75
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
121
76
|
className: (0, _classnames["default"])("".concat(_utils.PickerTriggerClass, "__input"), _defineProperty({}, "".concat(_utils.PickerTriggerClass, "__input--placeholder"), !value && placeholder))
|
|
122
|
-
},
|
|
77
|
+
}, value ? viewDate.format(currFormat) : placeholder), /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
78
|
className: (0, _classnames["default"])("".concat(_utils.PickerTriggerClass, "__operation"))
|
|
124
79
|
}, !disabled && /*#__PURE__*/_react["default"].createElement("span", {
|
|
125
80
|
className: "tu-icon-caret-down"
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
.tita-ui-write-summary-modal {
|
|
2
|
+
background: #ffffff;
|
|
3
|
+
height: 522px;
|
|
4
|
+
overflow: auto;
|
|
5
|
+
overflow: overlay;
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-template-columns: repeat(3, 1fr);
|
|
8
|
+
border-radius: 24px;
|
|
9
|
+
padding: 10px 32px;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tita-ui-write-summary-modal__content-item {
|
|
14
|
+
width: 248px;
|
|
15
|
+
height: 232px;
|
|
16
|
+
border-radius: 12px;
|
|
17
|
+
padding: 24px 24px 0 24px;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
background: #ffffff;
|
|
20
|
+
border: 1px solid #e9ecf0;
|
|
21
|
+
position: relative;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.tita-ui-write-summary-modal__content-item:hover {
|
|
26
|
+
border: 1px solid #2879ff;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.tita-ui-write-summary-modal__content-item-title {
|
|
30
|
+
display: flex;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.tita-ui-write-summary-modal__content-item-title-avatar {
|
|
34
|
+
width: 32px;
|
|
35
|
+
height: 32px;
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
color: #ffffff;
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.tita-ui-write-summary-modal__content-item-title-name {
|
|
45
|
+
font-size: 20px;
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
margin-left: 8px;
|
|
48
|
+
color: #141c28;
|
|
49
|
+
line-height: 30px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.tita-ui-write-summary-modal__content-item-desc {
|
|
53
|
+
margin-top: 23px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.tita-ui-write-summary-modal__content-item-desc-text {
|
|
57
|
+
font-size: 12px;
|
|
58
|
+
font-weight: normal;
|
|
59
|
+
color: #6f7886;
|
|
60
|
+
line-height: 18px;
|
|
61
|
+
margin-top: 12px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.tita-ui-write-summary-modal__content-item-desc-block {
|
|
65
|
+
width: 196px;
|
|
66
|
+
height: 12px;
|
|
67
|
+
border-radius: 4px;
|
|
68
|
+
margin-top: 6px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.tita-ui-write-summary-modal__content-item::after {
|
|
72
|
+
content: '';
|
|
73
|
+
position: absolute;
|
|
74
|
+
height: 36px;
|
|
75
|
+
width: 100%;
|
|
76
|
+
bottom: 16px;
|
|
77
|
+
left: 0;
|
|
78
|
+
background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%);
|
|
79
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _getLocale = require("../../utils/getLocale");
|
|
13
|
+
|
|
14
|
+
var _dialog = _interopRequireDefault(require("../dialog"));
|
|
15
|
+
|
|
16
|
+
var _interface = require("./interface");
|
|
17
|
+
|
|
18
|
+
var _requestApi = require("./request-api");
|
|
19
|
+
|
|
20
|
+
require("./index.css");
|
|
21
|
+
|
|
22
|
+
var _utils = require("./utils");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
+
|
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
+
|
|
30
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
|
+
|
|
32
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
33
|
+
|
|
34
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
35
|
+
|
|
36
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
37
|
+
|
|
38
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
39
|
+
|
|
40
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
+
|
|
42
|
+
var prefix = "tita-ui-write-summary-modal";
|
|
43
|
+
var WriteSummaryModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
44
|
+
var onSelect = _ref.onSelect;
|
|
45
|
+
|
|
46
|
+
var _useState = (0, _react.useState)(false),
|
|
47
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
48
|
+
visible = _useState2[0],
|
|
49
|
+
setVisible = _useState2[1];
|
|
50
|
+
|
|
51
|
+
var _useState3 = (0, _react.useState)(_interface.EReportType.Daily),
|
|
52
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
53
|
+
reportType = _useState4[0],
|
|
54
|
+
setReportType = _useState4[1];
|
|
55
|
+
|
|
56
|
+
var _useState5 = (0, _react.useState)([]),
|
|
57
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
58
|
+
modalList = _useState6[0],
|
|
59
|
+
setModalList = _useState6[1];
|
|
60
|
+
|
|
61
|
+
var randomColor = (0, _utils.getRandomColor)();
|
|
62
|
+
|
|
63
|
+
var handleCloseModal = function handleCloseModal() {
|
|
64
|
+
setVisible(false);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
var handleShowModal = function handleShowModal(type) {
|
|
68
|
+
setVisible(true);
|
|
69
|
+
setReportType(type);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
var handleItemSelect = function handleItemSelect(selected) {
|
|
73
|
+
if (onSelect) {
|
|
74
|
+
onSelect(selected);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
setVisible(false);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
81
|
+
return {
|
|
82
|
+
show: handleShowModal,
|
|
83
|
+
hide: handleCloseModal
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
(0, _react.useEffect)(function () {
|
|
87
|
+
if (visible) {
|
|
88
|
+
(0, _requestApi.getWriteSummaryModalList)(reportType).then(function (resp) {
|
|
89
|
+
if (resp.Code === 1) {
|
|
90
|
+
setModalList(resp.Data);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}, [visible, reportType]);
|
|
95
|
+
return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
96
|
+
zIndex: 1200,
|
|
97
|
+
noHeadLine: true,
|
|
98
|
+
visible: visible,
|
|
99
|
+
onClose: handleCloseModal,
|
|
100
|
+
noFooter: true,
|
|
101
|
+
title: (0, _getLocale.getLocale)("Rep_NewS_PleaseTemplate"),
|
|
102
|
+
destroyOnClose: true,
|
|
103
|
+
style: {
|
|
104
|
+
width: "840px",
|
|
105
|
+
borderRadius: "24px"
|
|
106
|
+
},
|
|
107
|
+
maskClosable: false
|
|
108
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
109
|
+
className: "".concat(prefix)
|
|
110
|
+
}, modalList.map(function (item) {
|
|
111
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
112
|
+
className: "".concat(prefix, "__content-item"),
|
|
113
|
+
onClick: function onClick() {
|
|
114
|
+
return handleItemSelect(item);
|
|
115
|
+
}
|
|
116
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
117
|
+
className: "".concat(prefix, "__content-item-title")
|
|
118
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
119
|
+
className: "".concat(prefix, "__content-item-title-avatar"),
|
|
120
|
+
style: {
|
|
121
|
+
background: randomColor.bg
|
|
122
|
+
}
|
|
123
|
+
}, item.name[0]), /*#__PURE__*/_react["default"].createElement("span", {
|
|
124
|
+
className: "".concat(prefix, "__content-item-title-name")
|
|
125
|
+
}, item.name)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
126
|
+
className: "".concat(prefix, "__content-item-desc")
|
|
127
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
128
|
+
className: "".concat(prefix, "__content-item-desc-text")
|
|
129
|
+
}, (0, _getLocale.getLocale)("Rep_Tab_Mys_Workprogre")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
130
|
+
className: "".concat(prefix, "__content-item-desc-block"),
|
|
131
|
+
style: {
|
|
132
|
+
background: randomColor.contentBg
|
|
133
|
+
}
|
|
134
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
135
|
+
className: "".concat(prefix, "__content-item-desc-text")
|
|
136
|
+
}, (0, _getLocale.getLocale)("Tasks_Tab_MyS_JobSummary")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
137
|
+
className: "".concat(prefix, "__content-item-desc-block"),
|
|
138
|
+
style: {
|
|
139
|
+
background: randomColor.contentBg
|
|
140
|
+
}
|
|
141
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
142
|
+
className: "".concat(prefix, "__content-item-desc-text")
|
|
143
|
+
}, (0, _getLocale.getLocale)("Rep_Tab_Mys_NextWorkPlans")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
144
|
+
className: "".concat(prefix, "__content-item-desc-block"),
|
|
145
|
+
style: {
|
|
146
|
+
background: randomColor.contentBg
|
|
147
|
+
}
|
|
148
|
+
})));
|
|
149
|
+
})));
|
|
150
|
+
});
|
|
151
|
+
var _default = WriteSummaryModal;
|
|
152
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.EReportType = void 0;
|
|
7
|
+
var EReportType;
|
|
8
|
+
exports.EReportType = EReportType;
|
|
9
|
+
|
|
10
|
+
(function (EReportType) {
|
|
11
|
+
EReportType[EReportType["Daily"] = 8] = "Daily";
|
|
12
|
+
EReportType[EReportType["Weekly"] = 26] = "Weekly";
|
|
13
|
+
EReportType[EReportType["Month"] = 27] = "Month";
|
|
14
|
+
})(EReportType || (exports.EReportType = EReportType = {}));
|
|
15
|
+
|
|
16
|
+
var _default = {
|
|
17
|
+
EReportType: EReportType
|
|
18
|
+
};
|
|
19
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getWriteSummaryModalList = exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _request = require("@titaui/request");
|
|
9
|
+
|
|
10
|
+
var getWriteSummaryModalList = function getWriteSummaryModalList(reportType) {
|
|
11
|
+
return (0, _request.rget)("v1")("summaryTemplate/getTemplates?summaryType=".concat(reportType));
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.getWriteSummaryModalList = getWriteSummaryModalList;
|
|
15
|
+
var _default = {
|
|
16
|
+
getWriteSummaryModalList: getWriteSummaryModalList
|
|
17
|
+
};
|
|
18
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getRandomColor = exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var getRandomColor = function getRandomColor() {
|
|
9
|
+
var randomNum = Math.ceil(Math.random() * 3);
|
|
10
|
+
var color = {
|
|
11
|
+
1: {
|
|
12
|
+
bg: "#2879FF",
|
|
13
|
+
contentBg: "rgba(40, 121, 255, 0.2)"
|
|
14
|
+
},
|
|
15
|
+
2: {
|
|
16
|
+
bg: "#5AD8A6",
|
|
17
|
+
contentBg: "rgba(90, 216, 166, 0.2)"
|
|
18
|
+
},
|
|
19
|
+
3: {
|
|
20
|
+
bg: "#F6BD16",
|
|
21
|
+
contentBg: "rgba(246, 189, 22, 0.2)"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return color[randomNum];
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.getRandomColor = getRandomColor;
|
|
28
|
+
var _default = {
|
|
29
|
+
getRandomColor: getRandomColor
|
|
30
|
+
};
|
|
31
|
+
exports["default"] = _default;
|
package/lib/index.js
CHANGED
|
@@ -633,6 +633,12 @@ Object.defineProperty(exports, "WordCloud", {
|
|
|
633
633
|
return _wordCloud["default"];
|
|
634
634
|
}
|
|
635
635
|
});
|
|
636
|
+
Object.defineProperty(exports, "WriteSummaryModal", {
|
|
637
|
+
enumerable: true,
|
|
638
|
+
get: function get() {
|
|
639
|
+
return _writeSummaryModal["default"];
|
|
640
|
+
}
|
|
641
|
+
});
|
|
636
642
|
Object.defineProperty(exports, "drawerManager", {
|
|
637
643
|
enumerable: true,
|
|
638
644
|
get: function get() {
|
|
@@ -886,4 +892,6 @@ var _newConfidence = _interopRequireDefault(require("./components/new-confidence
|
|
|
886
892
|
|
|
887
893
|
var _colorDatePicker = _interopRequireDefault(require("./components/color-date-picker"));
|
|
888
894
|
|
|
895
|
+
var _writeSummaryModal = _interopRequireDefault(require("./components/write-summary-modal"));
|
|
896
|
+
|
|
889
897
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|