@titaui/pc 1.12.7-beta.1 → 1.12.7-beta.10
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/color-date-picker/index.css +65 -0
- package/lib/components/color-date-picker/index.js +123 -0
- package/lib/components/color-date-picker/interface.js +14 -0
- package/lib/components/dialog-upload/uploaded-preview.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/encourage.js +7 -7
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.js +23 -17
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +2 -1
- package/lib/components/dynamic/dynamic-item/components/summary-header/constant.js +45 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +47 -14
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +2 -1
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +2 -1
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +45 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +40 -16
- package/lib/components/dynamic/dynamic-item/index.js +15 -5
- package/lib/components/import-modal/import-okr-modal/index.js +4 -1
- package/lib/components/menus/components/menu-tree/tree-node/subordinates.js +7 -3
- package/lib/components/menus/components/menu-tree/tree-node/summary-share.js +7 -3
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +59 -29
- package/lib/components/menus/export-modules/summary-menus/menus.js +56 -50
- package/lib/components/menus/request-apis.js +8 -2
- package/lib/components/new-confidence/index.js +5 -5
- package/lib/components/picker/components/panels/week-panel/utils.js +45 -0
- package/lib/components/picker/components/panels/week-panel/week-body.js +9 -56
- package/lib/components/picker/components/picker-trigger/index.js +2 -3
- package/lib/components/rate/index.js +0 -2
- package/lib/components/regulation-setting-item/index.css +33 -0
- package/lib/components/regulation-setting-item/index.js +37 -0
- package/lib/components/rich-editor-upload/index.js +3 -0
- package/lib/components/write-summary-modal/index.css +79 -0
- package/lib/components/write-summary-modal/index.js +151 -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 +16 -0
- package/lib/utils/constant.js +8 -2
- package/lib/utils/helpers.js +48 -11
- package/package.json +1 -1
|
@@ -31,11 +31,11 @@ var _richEditorUpload = _interopRequireDefault(require("../../../rich-editor-upl
|
|
|
31
31
|
|
|
32
32
|
var _getLocale = require("../../../../utils/getLocale");
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _constant = require("./constant");
|
|
35
35
|
|
|
36
36
|
require("./index.css");
|
|
37
37
|
|
|
38
|
-
var _excluded = ["data"];
|
|
38
|
+
var _excluded = ["data", "dailyContent"];
|
|
39
39
|
|
|
40
40
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
41
41
|
|
|
@@ -65,17 +65,18 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
65
65
|
|
|
66
66
|
var getEReportType = function getEReportType(type) {
|
|
67
67
|
var reportTextMap = {
|
|
68
|
-
8: (0, _getLocale.getLocale)(
|
|
69
|
-
26: (0, _getLocale.getLocale)(
|
|
70
|
-
27: (0, _getLocale.getLocale)(
|
|
68
|
+
8: (0, _getLocale.getLocale)("Rep_Tab_Dailynewspaper"),
|
|
69
|
+
26: (0, _getLocale.getLocale)("Rep_Tab_Weeklynewspaper"),
|
|
70
|
+
27: (0, _getLocale.getLocale)("Rep_Tab_MonthlyReport")
|
|
71
71
|
};
|
|
72
72
|
return reportTextMap[type];
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
-
var prefix =
|
|
75
|
+
var prefix = "titaui-dynamic-new-report-item";
|
|
76
76
|
|
|
77
77
|
var DynamicReply = function DynamicReply(_ref) {
|
|
78
78
|
var data = _ref.data,
|
|
79
|
+
dailyContent = _ref.dailyContent,
|
|
79
80
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
80
81
|
|
|
81
82
|
var submitState = data.submitState,
|
|
@@ -88,6 +89,11 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
88
89
|
attachments = _useState2[0],
|
|
89
90
|
setAttachments = _useState2[1];
|
|
90
91
|
|
|
92
|
+
var _useState3 = (0, _react.useState)(""),
|
|
93
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
94
|
+
mindImg = _useState4[0],
|
|
95
|
+
setMindImg = _useState4[1];
|
|
96
|
+
|
|
91
97
|
var contentRichTextRef = (0, _react.useRef)();
|
|
92
98
|
var workPlanRichTextRef = (0, _react.useRef)();
|
|
93
99
|
|
|
@@ -101,13 +107,13 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
101
107
|
className: (0, _classnames["default"])("".concat(prefix, "__complete-type"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "__complete-type--normal"), submitState === 1), _defineProperty(_classNames, "".concat(prefix, "__complete-type--delay"), submitState === 2), _classNames))
|
|
102
108
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
103
109
|
className: (0, _classnames["default"])("".concat(prefix, "__complete-type-icon"), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefix, "__complete-type-icon--normal"), submitState === 1), _defineProperty(_classNames2, "".concat(prefix, "__complete-type-icon--delay"), submitState === 2), _classNames2))
|
|
104
|
-
}), submitState === 1 ? (0, _getLocale.getLocale)(
|
|
110
|
+
}), submitState === 1 ? (0, _getLocale.getLocale)("Rep_Tab_Mys_Submitontime") : (0, _getLocale.getLocale)("Tasks_Tab_DelaSubmission"));
|
|
105
111
|
}, []);
|
|
106
112
|
var renderDesc = (0, _react.useMemo)(function () {
|
|
107
113
|
var reportTextMap = {
|
|
108
|
-
8: (0, _getLocale.getLocale)(
|
|
109
|
-
26: (0, _getLocale.getLocale)(
|
|
110
|
-
27: (0, _getLocale.getLocale)(
|
|
114
|
+
8: (0, _getLocale.getLocale)("Rep_Tab_Mys_Dailynewsp"),
|
|
115
|
+
26: (0, _getLocale.getLocale)("Rep_Tab_Mys_sweeklyReport"),
|
|
116
|
+
27: (0, _getLocale.getLocale)("Rep_Tab_Sub_monthlyeport")
|
|
111
117
|
};
|
|
112
118
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
113
119
|
className: "".concat(prefix, "__operate-desc")
|
|
@@ -123,10 +129,22 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
123
129
|
keyWord: searchKeyWord
|
|
124
130
|
});
|
|
125
131
|
}, [data, searchKeyWord]);
|
|
132
|
+
(0, _react.useEffect)(function () {
|
|
133
|
+
var mindData = dailyContent.filter(function (item) {
|
|
134
|
+
return item.title === "心情";
|
|
135
|
+
}); // 暂时用title
|
|
136
|
+
|
|
137
|
+
if (mindData[0].content !== "") {
|
|
138
|
+
setMindImg(_constant.Motion.filter(function (item) {
|
|
139
|
+
return item.id === parseInt(mindData[0].content, 10);
|
|
140
|
+
})[0].img);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
126
143
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
127
144
|
className: prefix
|
|
128
145
|
}, /*#__PURE__*/_react["default"].createElement(_summaryHeader["default"], _extends({
|
|
129
|
-
data: data
|
|
146
|
+
data: data,
|
|
147
|
+
dailyContent: dailyContent
|
|
130
148
|
}, restProps, {
|
|
131
149
|
desc: renderDesc,
|
|
132
150
|
user: publishUser,
|
|
@@ -141,14 +159,20 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
141
159
|
typeBgColor: "rgba(92, 142, 255, 0.5)",
|
|
142
160
|
titleBgColor: "rgba(92, 142, 255, 0.1)",
|
|
143
161
|
contentColor: "#5C8EFF"
|
|
144
|
-
}), /*#__PURE__*/_react["default"].createElement("img", {
|
|
145
|
-
src:
|
|
162
|
+
}), mindImg && /*#__PURE__*/_react["default"].createElement("img", {
|
|
163
|
+
src: mindImg,
|
|
146
164
|
className: "".concat(prefix, "__content-mind")
|
|
147
|
-
})), /*#__PURE__*/_react["default"].createElement(_okrProgress["default"],
|
|
148
|
-
|
|
165
|
+
})), /*#__PURE__*/_react["default"].createElement(_okrProgress["default"], {
|
|
166
|
+
data: dailyContent
|
|
167
|
+
}), /*#__PURE__*/_react["default"].createElement(_taskProgress["default"], {
|
|
168
|
+
data: dailyContent
|
|
169
|
+
}), /*#__PURE__*/_react["default"].createElement(_richEditorUpload["default"], {
|
|
170
|
+
text: "\u9644\u4EF6",
|
|
149
171
|
files: attachments,
|
|
150
172
|
editable: false
|
|
151
|
-
}), /*#__PURE__*/_react["default"].createElement(_remindUserView["default"],
|
|
173
|
+
}), /*#__PURE__*/_react["default"].createElement(_remindUserView["default"], {
|
|
174
|
+
data: dailyContent
|
|
175
|
+
}), /*#__PURE__*/_react["default"].createElement(_evalute["default"], null)));
|
|
152
176
|
};
|
|
153
177
|
|
|
154
178
|
var _default = DynamicReply;
|
|
@@ -29,6 +29,8 @@ var _dynamicAnnouncement = _interopRequireDefault(require("./dynamic-announcemen
|
|
|
29
29
|
|
|
30
30
|
var _dynamicReply = _interopRequireDefault(require("./dynamic-reply"));
|
|
31
31
|
|
|
32
|
+
var _dynamicReport = _interopRequireDefault(require("./dynamic-report"));
|
|
33
|
+
|
|
32
34
|
var _dynamicRelative = _interopRequireDefault(require("./dynamic-relative"));
|
|
33
35
|
|
|
34
36
|
var _dynamicAlign = _interopRequireDefault(require("./dynamic-align"));
|
|
@@ -272,11 +274,19 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
272
274
|
});
|
|
273
275
|
|
|
274
276
|
case _constant.EFeedType.Report:
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
277
|
+
var newSummary = data.newSummary;
|
|
278
|
+
|
|
279
|
+
if (!newSummary) {
|
|
280
|
+
return /*#__PURE__*/_react["default"].createElement(_dynamicNewReport["default"], {
|
|
281
|
+
data: data,
|
|
282
|
+
onDeleteFeed: onDeleteFeed
|
|
283
|
+
});
|
|
284
|
+
} else {
|
|
285
|
+
return /*#__PURE__*/_react["default"].createElement(_dynamicReport["default"], {
|
|
286
|
+
data: data,
|
|
287
|
+
onDeleteFeed: onDeleteFeed
|
|
288
|
+
});
|
|
289
|
+
}
|
|
280
290
|
|
|
281
291
|
case _constant.EFeedType.Reply:
|
|
282
292
|
return /*#__PURE__*/_react["default"].createElement(_dynamicReply["default"], {
|
|
@@ -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,
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] =
|
|
8
|
+
exports["default"] = exports.Subordinates = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -35,7 +35,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
35
35
|
|
|
36
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
37
|
|
|
38
|
-
function
|
|
38
|
+
var Subordinates = function Subordinates(props) {
|
|
39
39
|
var onExpand = props.onExpand,
|
|
40
40
|
title = props.title,
|
|
41
41
|
data = props.data;
|
|
@@ -71,4 +71,8 @@ function _default(props) {
|
|
|
71
71
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
72
72
|
className: (0, _classnames["default"])('tu-icon-APP-xi', _defineProperty({}, "".concat(_precls["default"], "__subordinates-arrow-down"), isShowSubordinates))
|
|
73
73
|
})));
|
|
74
|
-
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
exports.Subordinates = Subordinates;
|
|
77
|
+
var _default = Subordinates;
|
|
78
|
+
exports["default"] = _default;
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] =
|
|
8
|
+
exports["default"] = exports.SummaryShare = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -35,7 +35,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
35
35
|
|
|
36
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
37
|
|
|
38
|
-
function
|
|
38
|
+
var SummaryShare = function SummaryShare(props) {
|
|
39
39
|
var onExpand = props.onExpand,
|
|
40
40
|
title = props.title,
|
|
41
41
|
data = props.data;
|
|
@@ -71,4 +71,8 @@ function _default(props) {
|
|
|
71
71
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
72
72
|
className: (0, _classnames["default"])('tu-icon-APP-xi', _defineProperty({}, "".concat(_precls["default"], "__share-arrow-down"), isShowShare))
|
|
73
73
|
})));
|
|
74
|
-
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
exports.SummaryShare = SummaryShare;
|
|
77
|
+
var _default = SummaryShare;
|
|
78
|
+
exports["default"] = _default;
|
|
@@ -23,6 +23,8 @@ var _index = require("../../../components/menu-tree/tree-node/index");
|
|
|
23
23
|
|
|
24
24
|
var _utils = require("../../../utils");
|
|
25
25
|
|
|
26
|
+
var _bsGlobal = require("../../../../../utils/bs-global.js");
|
|
27
|
+
|
|
26
28
|
var _precls = _interopRequireDefault(require("../../../precls"));
|
|
27
29
|
|
|
28
30
|
var _scrollbar = _interopRequireDefault(require("../../../../scrollbar"));
|
|
@@ -72,7 +74,7 @@ function _default() {
|
|
|
72
74
|
rawTreeData = _useState4[0],
|
|
73
75
|
setRawTreeData = _useState4[1];
|
|
74
76
|
|
|
75
|
-
var _useState5 = (0, _react.useState)([
|
|
77
|
+
var _useState5 = (0, _react.useState)(['0']),
|
|
76
78
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
77
79
|
selectedMenuKeys = _useState6[0],
|
|
78
80
|
setSelectedMenuKeys = _useState6[1];
|
|
@@ -92,44 +94,70 @@ function _default() {
|
|
|
92
94
|
_useState12 = _slicedToArray(_useState11, 1),
|
|
93
95
|
itemHeight = _useState12[0];
|
|
94
96
|
|
|
97
|
+
var isBoss = (0, _bsGlobal.getUserInfo)().IsBoss;
|
|
98
|
+
|
|
95
99
|
var _useState13 = (0, _react.useState)(window.BSGlobal.OkrAdvancedSetting.KRSetting.OkrDepsShowUser),
|
|
96
100
|
_useState14 = _slicedToArray(_useState13, 1),
|
|
97
101
|
isGetUser = _useState14[0];
|
|
98
102
|
|
|
99
103
|
(0, _react.useEffect)(function () {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
var
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
104
|
+
if (isBoss) {
|
|
105
|
+
location.href = '#/summary/manage?departmentName=公司全部&departmentId=0';
|
|
106
|
+
|
|
107
|
+
var allDepartmentText = window.getLocale && window.getLocale(_i18n.locale.menu_alldeparment) || _i18n.locale.menu_alldeparment;
|
|
108
|
+
|
|
109
|
+
(0, _requestApis.getDepsAndUsers)(-1, isGetUser).then(function (rawTreeData) {
|
|
110
|
+
var rootNode = {
|
|
111
|
+
async: true,
|
|
112
|
+
data: {
|
|
113
|
+
id: 0,
|
|
114
|
+
name: allDepartmentText
|
|
115
|
+
},
|
|
116
|
+
pid: -1,
|
|
117
|
+
id: '0',
|
|
118
|
+
key: '0',
|
|
119
|
+
isLeaf: true,
|
|
120
|
+
nodeType: _index.DEPART_NODE,
|
|
121
|
+
title: allDepartmentText
|
|
122
|
+
};
|
|
123
|
+
setRawTreeData([rootNode].concat(_toConsumableArray(rawTreeData)));
|
|
124
|
+
setTreeData((0, _utils.toTree)([rootNode].concat(_toConsumableArray(rawTreeData))));
|
|
125
|
+
setLoading(false);
|
|
126
|
+
});
|
|
127
|
+
} else {
|
|
128
|
+
(0, _requestApis.getMyDepartMent)().then(function (res) {
|
|
129
|
+
location.href = "#/summary/manage?departmentName=".concat(res.Data[0].name, "&departmentId=").concat(res.Data[0].id);
|
|
130
|
+
var rawTreeData = res.Data;
|
|
131
|
+
var rootNode = {
|
|
132
|
+
async: true,
|
|
133
|
+
data: {
|
|
134
|
+
id: rawTreeData[0].id,
|
|
135
|
+
name: rawTreeData[0].name,
|
|
136
|
+
isOpen: rawTreeData[0].isOpen,
|
|
137
|
+
hasChild: rawTreeData[0].hasChild
|
|
138
|
+
},
|
|
139
|
+
pid: -1,
|
|
140
|
+
id: '0',
|
|
141
|
+
key: '0',
|
|
142
|
+
isLeaf: true,
|
|
143
|
+
nodeType: _index.DEPART_NODE,
|
|
144
|
+
title: rawTreeData[0].name
|
|
145
|
+
};
|
|
146
|
+
setRawTreeData([rootNode].concat(_toConsumableArray(rawTreeData)));
|
|
147
|
+
setTreeData((0, _utils.toTree)([rootNode].concat(_toConsumableArray(rawTreeData))));
|
|
148
|
+
setLoading(false);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
120
151
|
}, []); // 因为要实现虚拟列表的功能,所有要动态的计算出一个菜单的高度
|
|
121
152
|
|
|
122
153
|
(0, _react.useEffect)(function () {
|
|
123
154
|
setHeight(document.body.offsetHeight - 164);
|
|
124
|
-
}, []); //
|
|
125
|
-
// location.href = "#/okr/manage?departmentName=公司全部&departmentId=0";
|
|
126
|
-
// }, []);
|
|
127
|
-
// 动态加载子节点数据集
|
|
155
|
+
}, []); // 动态加载子节点数据集
|
|
128
156
|
|
|
129
157
|
var onLoadTreeNodeDataHandler = function onLoadTreeNodeDataHandler(treeNode) {
|
|
130
158
|
if (loadedNode.current.includes(treeNode.id)) return null;
|
|
131
159
|
return new Promise(function (resolve) {
|
|
132
|
-
(0, _requestApis.getDepsAndUsers)(treeNode.id,
|
|
160
|
+
(0, _requestApis.getDepsAndUsers)(treeNode.id, false).then(function (nodes) {
|
|
133
161
|
if (!nodes.length) {
|
|
134
162
|
resolve(true);
|
|
135
163
|
return;
|
|
@@ -152,8 +180,10 @@ function _default() {
|
|
|
152
180
|
var nodeType = node.nodeType,
|
|
153
181
|
data = node.data;
|
|
154
182
|
|
|
155
|
-
if (nodeType == _index.USER_NODE) {
|
|
156
|
-
|
|
183
|
+
if (nodeType == _index.USER_NODE) {
|
|
184
|
+
location.href = "#/summary/manage?toUserId=".concat(data.userId);
|
|
185
|
+
} else if (nodeType == _index.DEPART_NODE) {
|
|
186
|
+
location.href = "#/summary/manage?departmentName=".concat(data.name, "&departmentId=").concat(data.id);
|
|
157
187
|
}
|
|
158
188
|
|
|
159
189
|
setSelectedMenuKeys(selectedKyes);
|
|
@@ -194,7 +224,7 @@ function _default() {
|
|
|
194
224
|
itemHeight: itemHeight,
|
|
195
225
|
virtual: true,
|
|
196
226
|
onSelect: onSelectHandler,
|
|
197
|
-
defaultExpandedKeys: [
|
|
227
|
+
defaultExpandedKeys: ['0'],
|
|
198
228
|
selectedKeys: selectedMenuKeys,
|
|
199
229
|
loadData: onLoadTreeNodeDataHandler
|
|
200
230
|
})));
|
|
@@ -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
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.removeFollower = exports.getSubordinates = exports.getFollowerList = exports.getDepsAndUsers = exports.addFollower = void 0;
|
|
6
|
+
exports.removeFollower = exports.getSubordinates = exports.getMyDepartMent = exports.getFollowerList = exports.getDepsAndUsers = exports.addFollower = void 0;
|
|
7
7
|
|
|
8
8
|
var _axios = _interopRequireDefault(require("axios"));
|
|
9
9
|
|
|
@@ -137,4 +137,10 @@ var getDepsAndUsers = function getDepsAndUsers() {
|
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
-
exports.getDepsAndUsers = getDepsAndUsers;
|
|
140
|
+
exports.getDepsAndUsers = getDepsAndUsers;
|
|
141
|
+
|
|
142
|
+
var getMyDepartMent = function getMyDepartMent() {
|
|
143
|
+
return (0, _request.rget)('v2')("department/myLead?toUserId=".concat(userId));
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
exports.getMyDepartMent = getMyDepartMent;
|
|
@@ -39,7 +39,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
39
39
|
|
|
40
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
41
|
|
|
42
|
-
var prefix =
|
|
42
|
+
var prefix = "tita-ui-new-confidence";
|
|
43
43
|
|
|
44
44
|
var NewConfidence = function NewConfidence(_ref) {
|
|
45
45
|
var value = _ref.value,
|
|
@@ -70,7 +70,7 @@ var NewConfidence = function NewConfidence(_ref) {
|
|
|
70
70
|
setConfidence(value);
|
|
71
71
|
}, [value]);
|
|
72
72
|
var renderPopContent = (0, _react.useMemo)(function () {
|
|
73
|
-
if (!editable) return;
|
|
73
|
+
if (!editable) return null;
|
|
74
74
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
75
|
className: "".concat(prefix, "__pop-content")
|
|
76
76
|
}, _constant.ConfidencePointArr.map(function (point) {
|
|
@@ -85,12 +85,12 @@ var NewConfidence = function NewConfidence(_ref) {
|
|
|
85
85
|
src: _constant.ConfidenceMapIcon[point]
|
|
86
86
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
87
87
|
className: "".concat(prefix, "__pop-content-item-text")
|
|
88
|
-
}, point, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)(
|
|
88
|
+
}, point, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("Per_Set_Form_Quantifier_Points"))));
|
|
89
89
|
}));
|
|
90
90
|
}, [editable]);
|
|
91
91
|
return /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
92
92
|
popup: renderPopContent,
|
|
93
|
-
popupPlacement:
|
|
93
|
+
popupPlacement: "bottom",
|
|
94
94
|
ref: popupRef,
|
|
95
95
|
popupAlign: {
|
|
96
96
|
offset: [0, 5],
|
|
@@ -102,7 +102,7 @@ var NewConfidence = function NewConfidence(_ref) {
|
|
|
102
102
|
}
|
|
103
103
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
104
104
|
className: (0, _classnames["default"])(prefix, _defineProperty({}, "".concat(prefix, "--editable"), editable))
|
|
105
|
-
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
105
|
+
}, confidence > 0 && /*#__PURE__*/_react["default"].createElement("img", {
|
|
106
106
|
className: "".concat(prefix, "__icon"),
|
|
107
107
|
alt: "",
|
|
108
108
|
src: _constant.ConfidenceMapIcon[confidence]
|