@titaui/pc 1.11.54 → 1.12.0-beta.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.
- package/lib/components/button/rect-btn/index.js +3 -3
- package/lib/components/checkbox/index.css +0 -4
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +11 -9
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
- package/lib/components/okr-detail/e-list/index.js +2 -2
- package/lib/components/search-input/index.css +1 -1
- package/lib/components/select-layer/index.css +1 -1
- package/lib/components/task-relation-modal/helper.js +2 -139
- package/lib/components/task-relation-modal/index.js +0 -9
- package/lib/components/task-relation-modal/request-api.js +2 -28
- package/lib/components/task-relation-modal/search/okr-status-select.js +3 -3
- package/lib/components/task-relation-modal/search/principal.js +5 -20
- package/lib/components/task-relation-modal/search/search-dropdown/index.css +1 -2
- package/lib/components/task-relation-modal/search/search-dropdown/index.js +1 -1
- package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +2 -16
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +1 -3
- package/lib/components/tooltip/index.js +0 -3
- package/lib/components/user-selector/empty/index.css +5 -0
- package/lib/components/user-selector/empty/index.js +9 -3
- package/lib/components/user-selector/export-modules/depart-search-selector/index.js +48 -17
- package/lib/components/user-selector/images/no-auth.png +0 -0
- package/lib/components/user-selector/searched-panel/index.js +1 -0
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +18 -46
- package/package.json +1 -1
- package/lib/components/button/images/blue.svg +0 -21
- package/lib/components/button/images/red.svg +0 -21
- package/lib/components/button/images/white.svg +0 -19
- package/lib/components/period-selector/interface.js +0 -7
- package/lib/components/task-relation-modal/image/loading.gif +0 -0
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.css +0 -18
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +0 -262
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +0 -135
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.css +0 -0
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +0 -129
- package/lib/components/task-relation-modal/okr-relation/request-api.js +0 -106
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +0 -120
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +0 -185
- package/lib/components/task-relation-modal/search/task-relation.js +0 -83
- package/lib/components/task-relation-modal/search/task-status-select.js +0 -87
- package/lib/components/task-relation-modal/search/work-relation.js +0 -83
- package/lib/components/task-relation-modal/search/work-status-select.js +0 -74
- package/lib/components/task-relation-modal/tree/task-list/index.css +0 -0
- package/lib/components/task-relation-modal/tree/task-list/index.js +0 -1
- package/lib/components/task-relation-modal/tree/work-list/index.css +0 -14
- package/lib/components/task-relation-modal/tree/work-list/index.js +0 -176
- package/lib/components/task-relation-modal/tree/work-list/search-form.js +0 -123
- package/lib/components/task-relation-modal/work-relation/index.css +0 -0
- package/lib/components/task-relation-modal/work-relation/index.js +0 -256
- package/lib/components/tooltip/tooltip-rows/index.css +0 -26
- package/lib/components/tooltip/tooltip-rows/index.js +0 -106
- package/lib/utils/planDataJson.js +0 -11115
|
@@ -34,10 +34,10 @@ function RectBtn(props) {
|
|
|
34
34
|
className = _props$className === void 0 ? '' : _props$className,
|
|
35
35
|
_props$disabled = props.disabled,
|
|
36
36
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
37
|
-
_props$loading = props.loading,
|
|
38
|
-
loading = _props$loading === void 0 ? false : _props$loading,
|
|
39
37
|
style = props.style,
|
|
40
|
-
children = props.children
|
|
38
|
+
children = props.children,
|
|
39
|
+
_props$loading = props.loading,
|
|
40
|
+
loading = _props$loading === void 0 ? false : _props$loading;
|
|
41
41
|
|
|
42
42
|
var renderIcon = function renderIcon() {
|
|
43
43
|
if (typeof icon === 'string') {
|
|
@@ -28,7 +28,8 @@ exports.defaultRefObject = defaultRefObject;
|
|
|
28
28
|
var _getBSGlobal = (0, _bsGlobal.getBSGlobal)("AssessAdvancedSetting"),
|
|
29
29
|
_getBSGlobal$AssessFu = _getBSGlobal.AssessFunctionSetting,
|
|
30
30
|
StartAssessByDepartmentLeader = _getBSGlobal$AssessFu.StartAssessByDepartmentLeader,
|
|
31
|
-
StartAssessByUser = _getBSGlobal$AssessFu.StartAssessByUser
|
|
31
|
+
StartAssessByUser = _getBSGlobal$AssessFu.StartAssessByUser,
|
|
32
|
+
StartAssessByHrbp = _getBSGlobal$AssessFu.StartAssessByHrbp;
|
|
32
33
|
|
|
33
34
|
var _getUserInfo = (0, _bsGlobal.getUserInfo)(),
|
|
34
35
|
HasSub = _getUserInfo.HasSub,
|
|
@@ -36,10 +37,11 @@ var _getUserInfo = (0, _bsGlobal.getUserInfo)(),
|
|
|
36
37
|
IsLeader = _getUserInfo.IsLeader,
|
|
37
38
|
IsBoss = _getUserInfo.IsBoss,
|
|
38
39
|
IsRoot = _getUserInfo.IsRoot,
|
|
39
|
-
Role = _getUserInfo.Role
|
|
40
|
+
Role = _getUserInfo.Role,
|
|
41
|
+
IsHrbp = _getUserInfo.IsHrbp;
|
|
40
42
|
|
|
41
|
-
var performanceManageAuthority = IsAssessManager || IsLeader && StartAssessByDepartmentLeader || StartAssessByUser;
|
|
42
|
-
var performanceStatisticsAuthority = IsAssessManager || IsBoss || IsRoot && Role
|
|
43
|
+
var performanceManageAuthority = IsAssessManager || IsLeader && StartAssessByDepartmentLeader || StartAssessByUser || IsHrbp && StartAssessByHrbp;
|
|
44
|
+
var performanceStatisticsAuthority = IsAssessManager || IsBoss || IsRoot && Role !== 4 || IsLeader || IsHrbp;
|
|
43
45
|
var PAGE_MY_APPRAISAL = "my-appraisal";
|
|
44
46
|
exports.PAGE_MY_APPRAISAL = PAGE_MY_APPRAISAL;
|
|
45
47
|
var PAGE_EVALUATE_APPRAISAL = "evaluate-appraisal";
|
|
@@ -86,7 +88,7 @@ var AppraisalMenus = /*#__PURE__*/function () {
|
|
|
86
88
|
label: _i18n.locale.menu_department_ass,
|
|
87
89
|
key: PAGE_DEPART_APPRAISAL,
|
|
88
90
|
href: "#/performance?reactRouterName=department",
|
|
89
|
-
isShow: IsLeader
|
|
91
|
+
isShow: IsLeader || IsHrbp
|
|
90
92
|
}, {
|
|
91
93
|
icon: "",
|
|
92
94
|
label: _i18n.locale.menu_management_ass,
|
|
@@ -151,16 +153,16 @@ var AppraisalMenus = /*#__PURE__*/function () {
|
|
|
151
153
|
_createClass(AppraisalMenus, [{
|
|
152
154
|
key: "getMenus",
|
|
153
155
|
value: function getMenus() {
|
|
154
|
-
var menus = this.formateToTreeNodeData(
|
|
156
|
+
var menus = this.formateToTreeNodeData();
|
|
155
157
|
return menus;
|
|
156
158
|
}
|
|
157
159
|
}, {
|
|
158
160
|
key: "formateToTreeNodeData",
|
|
159
|
-
value: function formateToTreeNodeData(
|
|
161
|
+
value: function formateToTreeNodeData() {
|
|
160
162
|
var treeNodes = [];
|
|
161
163
|
|
|
162
|
-
for (var i = 0; i < menus.length; i
|
|
163
|
-
var menu = menus[i];
|
|
164
|
+
for (var i = 0; i < this.menus.length; i += 1) {
|
|
165
|
+
var menu = this.menus[i];
|
|
164
166
|
|
|
165
167
|
if (menu.isShow) {
|
|
166
168
|
treeNodes.push({
|
|
@@ -47,7 +47,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
47
47
|
|
|
48
48
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
49
49
|
|
|
50
|
-
var ConfirmWrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* TODO padding \u53EF\u52A8\u6001\u8C03\u6574 */\n width: 300px;\n
|
|
50
|
+
var ConfirmWrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* TODO padding \u53EF\u52A8\u6001\u8C03\u6574 */\n width: 300px;\n max-height: 100px;\n border-radius: 5px;\n box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.15);\n padding: 15px 12px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n background-color: #fff;\n"])));
|
|
51
51
|
|
|
52
52
|
var FooterWrapper = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-top: 5px;\n button {\n padding: 2px 12px;\n font-size: 12px;\n }\n"])));
|
|
53
53
|
|
|
@@ -84,12 +84,12 @@ function Elist(props, ref) {
|
|
|
84
84
|
krList = _useState2[0],
|
|
85
85
|
setKrList = _useState2[1];
|
|
86
86
|
|
|
87
|
-
var _useState3 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerECheckedStatus".concat(loginUser))
|
|
87
|
+
var _useState3 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerECheckedStatus".concat(loginUser))) : []),
|
|
88
88
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
89
89
|
checkedStatus = _useState4[0],
|
|
90
90
|
setCheckedStatus = _useState4[1];
|
|
91
91
|
|
|
92
|
-
var _useState5 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerESelectUsers".concat(loginUser))
|
|
92
|
+
var _useState5 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerESelectUsers".concat(loginUser))) : []),
|
|
93
93
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
94
94
|
selectUsers = _useState6[0],
|
|
95
95
|
setSelectUsers = _useState6[1];
|
|
@@ -3,18 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.formatDateStr = void 0;
|
|
7
|
-
exports.formatPeriodPlanData = formatPeriodPlanData;
|
|
8
|
-
exports.lableTypeMap = exports.isOpenWorkManage = exports.isOpenOkrManage = exports.isOpenLabel = void 0;
|
|
9
|
-
exports.momentDate = momentDate;
|
|
10
|
-
exports.workStatus = exports.timeFormat = exports.preCls = exports.okrStatus = void 0;
|
|
6
|
+
exports.preCls = exports.lableTypeMap = exports.isOpenWorkManage = exports.isOpenOkrManage = exports.isOpenLabel = exports.formatDateStr = void 0;
|
|
11
7
|
|
|
12
8
|
var _bsGlobal = require("../../utils/bs-global");
|
|
13
9
|
|
|
14
|
-
var _getLocale = require("../../utils/getLocale");
|
|
15
|
-
|
|
16
|
-
var _planDataJson = require("../../utils/planDataJson");
|
|
17
|
-
|
|
18
10
|
var preCls = "titaui-task-relation";
|
|
19
11
|
exports.preCls = preCls;
|
|
20
12
|
var isOpenOkrManage = (0, _bsGlobal.getAppHead)("113"); // 开通OKR
|
|
@@ -37,29 +29,7 @@ var lableTypeMap = {
|
|
|
37
29
|
};
|
|
38
30
|
exports.lableTypeMap = lableTypeMap;
|
|
39
31
|
|
|
40
|
-
var strFormat = function strFormat(num) {
|
|
41
|
-
if (num < 10) {
|
|
42
|
-
return '0' + num;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return num;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
var timeFormat = function timeFormat(NowDate) {
|
|
49
|
-
var date = new Date(NowDate);
|
|
50
|
-
var y = date.getFullYear(); // 年
|
|
51
|
-
|
|
52
|
-
var m = date.getMonth() + 1; // 月
|
|
53
|
-
|
|
54
|
-
var d = date.getDate(); // 日
|
|
55
|
-
|
|
56
|
-
return "".concat(y, "/").concat(strFormat(m), "/").concat(strFormat(d));
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
exports.timeFormat = timeFormat;
|
|
60
|
-
|
|
61
32
|
var formatDateStr = function formatDateStr(str) {
|
|
62
|
-
str = timeFormat(str);
|
|
63
33
|
var currentYear = new Date().getFullYear();
|
|
64
34
|
|
|
65
35
|
if (str.indexOf(currentYear) !== -1) {
|
|
@@ -69,111 +39,4 @@ var formatDateStr = function formatDateStr(str) {
|
|
|
69
39
|
return str;
|
|
70
40
|
};
|
|
71
41
|
|
|
72
|
-
exports.formatDateStr = formatDateStr;
|
|
73
|
-
|
|
74
|
-
var okrStatus = function okrStatus(key) {
|
|
75
|
-
// 分类的类型(4:项目 17:普通分类 62:目标
|
|
76
|
-
var label = (0, _getLocale.getLocale)('OKR_MyO_E_From_AllStates');
|
|
77
|
-
|
|
78
|
-
switch (Number(key)) {
|
|
79
|
-
case 1:
|
|
80
|
-
label = (0, _getLocale.getLocale)('Per_MyRe_text_Inprogress');
|
|
81
|
-
break;
|
|
82
|
-
|
|
83
|
-
case 2:
|
|
84
|
-
label = (0, _getLocale.getLocale)('Pro_page_Sta_Completed');
|
|
85
|
-
break;
|
|
86
|
-
|
|
87
|
-
case 3:
|
|
88
|
-
label = (0, _getLocale.getLocale)('OKR_MyO_E_From_Delayed');
|
|
89
|
-
break;
|
|
90
|
-
|
|
91
|
-
case 4:
|
|
92
|
-
label = (0, _getLocale.getLocale)('OKR_MyO_E_From_Cancelled');
|
|
93
|
-
break;
|
|
94
|
-
|
|
95
|
-
case 5:
|
|
96
|
-
label = (0, _getLocale.getLocale)('OKR_MyO_E_From_Notaccepted');
|
|
97
|
-
break;
|
|
98
|
-
|
|
99
|
-
case 6:
|
|
100
|
-
label = (0, _getLocale.getLocale)('OKR_MyO_E_From_Suspended');
|
|
101
|
-
break;
|
|
102
|
-
|
|
103
|
-
case 0:
|
|
104
|
-
label = (0, _getLocale.getLocale)('OKR_MyO_E_From_NotStarted');
|
|
105
|
-
break;
|
|
106
|
-
|
|
107
|
-
default:
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return label;
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
exports.okrStatus = okrStatus;
|
|
115
|
-
|
|
116
|
-
var workStatus = function workStatus() {
|
|
117
|
-
return {
|
|
118
|
-
1: (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress"),
|
|
119
|
-
2: (0, _getLocale.getLocale)("OKR_MyO_E_From_Completed")
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
exports.workStatus = workStatus;
|
|
124
|
-
|
|
125
|
-
function momentDate(date) {
|
|
126
|
-
var reg = new RegExp('年|月|日', 'g');
|
|
127
|
-
return date.replace(reg, '/').slice(0, -1);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function formatPeriodPlanData(period) {
|
|
131
|
-
var planData; // 获取选取年份的 dataJSON
|
|
132
|
-
|
|
133
|
-
var yearGroup = (0, _planDataJson.PlanDataJson)().find(function (p) {
|
|
134
|
-
return p.GroupName == period.annualNum + '';
|
|
135
|
-
}); // 年份下的 ‘年/季’ data
|
|
136
|
-
|
|
137
|
-
var seasonData = yearGroup ? yearGroup.PlanTableListModels.find(function (item) {
|
|
138
|
-
return item.TagName == (0, _getLocale.getLocale)('Tasks_Menu_Yearseason');
|
|
139
|
-
}) : null;
|
|
140
|
-
|
|
141
|
-
switch (period.cycleType) {
|
|
142
|
-
// case '-1': // 全部周期
|
|
143
|
-
// break;
|
|
144
|
-
case '0':
|
|
145
|
-
planData = {
|
|
146
|
-
StartDate: period.startDate,
|
|
147
|
-
EndDate: period.endDate
|
|
148
|
-
};
|
|
149
|
-
break;
|
|
150
|
-
|
|
151
|
-
case '1':
|
|
152
|
-
// 年度
|
|
153
|
-
planData = seasonData ? seasonData.PlanTableModels[0] : null;
|
|
154
|
-
break;
|
|
155
|
-
|
|
156
|
-
case '2':
|
|
157
|
-
planData = seasonData ? seasonData.PlanTableModels[period.yqmNum] : null; // 季度
|
|
158
|
-
|
|
159
|
-
break;
|
|
160
|
-
|
|
161
|
-
case '3':
|
|
162
|
-
// @ts-ignore
|
|
163
|
-
var monthData = yearGroup ? yearGroup.PlanTableListModels.find(function (p) {
|
|
164
|
-
return p.TagName == period.yqmNum + '月';
|
|
165
|
-
}) : null;
|
|
166
|
-
planData = monthData ? monthData.PlanTableModels[0] : null;
|
|
167
|
-
break;
|
|
168
|
-
|
|
169
|
-
default:
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
return {
|
|
174
|
-
endDate: planData ? period.cycleType == '0' ? planData.EndDate : momentDate(planData.EndDate || '') : '',
|
|
175
|
-
planTableId: planData && planData.PlanTableId,
|
|
176
|
-
planTableType: planData && planData.PlanTableType,
|
|
177
|
-
startDate: planData ? period.cycleType == '0' ? planData.StartDate : momentDate(planData.StartDate || '') : ''
|
|
178
|
-
};
|
|
179
|
-
}
|
|
42
|
+
exports.formatDateStr = formatDateStr;
|
|
@@ -29,12 +29,6 @@ var _requestApi = require("./request-api");
|
|
|
29
29
|
|
|
30
30
|
var _getLocale = require("../../utils/getLocale");
|
|
31
31
|
|
|
32
|
-
var _relationTaskModel = _interopRequireDefault(require("./okr-relation/relation-task-model"));
|
|
33
|
-
|
|
34
|
-
var _relationWorkModel = _interopRequireDefault(require("./okr-relation/relation-work-model"));
|
|
35
|
-
|
|
36
|
-
var _workRelation = _interopRequireDefault(require("./work-relation"));
|
|
37
|
-
|
|
38
32
|
require("./index.css");
|
|
39
33
|
|
|
40
34
|
var _excluded = ["defaultVisible", "multiple", "onOk", "onCancel", "taskId", "isRelationOther", "lastSelected"];
|
|
@@ -312,8 +306,5 @@ function TaskRelationModal(props) {
|
|
|
312
306
|
}, selected.length), "\u9879"))));
|
|
313
307
|
}
|
|
314
308
|
|
|
315
|
-
TaskRelationModal.RelationTaskModel = _relationTaskModel["default"];
|
|
316
|
-
TaskRelationModal.RelationWorkModel = _relationWorkModel["default"];
|
|
317
|
-
TaskRelationModal.WorkRelationModal = _workRelation["default"];
|
|
318
309
|
var _default = TaskRelationModal;
|
|
319
310
|
exports["default"] = _default;
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.updateLable = exports.relationWorks = exports.okrSearch = exports.getWorks = exports.getUserById = exports.getCategory = void 0;
|
|
7
7
|
|
|
8
8
|
var _request = require("../../utils/request");
|
|
9
9
|
|
|
10
|
-
var _helpers = require("../../utils/helpers");
|
|
11
|
-
|
|
12
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
11
|
|
|
14
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -81,28 +79,4 @@ var getUserById = function getUserById(userId) {
|
|
|
81
79
|
});
|
|
82
80
|
};
|
|
83
81
|
|
|
84
|
-
exports.getUserById = getUserById;
|
|
85
|
-
|
|
86
|
-
var workData = function workData(params, pageNum, pageSize) {
|
|
87
|
-
var _params$keyWords2 = params.keyWords,
|
|
88
|
-
keyWords = _params$keyWords2 === void 0 ? "" : _params$keyWords2,
|
|
89
|
-
_params$status = params.status,
|
|
90
|
-
status = _params$status === void 0 ? 0 : _params$status,
|
|
91
|
-
_params$relation = params.relation,
|
|
92
|
-
relation = _params$relation === void 0 ? 0 : _params$relation,
|
|
93
|
-
userIds = params.userIds;
|
|
94
|
-
var url = "work/list?toUserId=".concat(userIds || (0, _helpers.getLoginUserInfo)().Id);
|
|
95
|
-
return (0, _request.rpost)("v1")(url, {
|
|
96
|
-
keyWords: keyWords,
|
|
97
|
-
orderType: 1,
|
|
98
|
-
pageNum: pageNum,
|
|
99
|
-
pageSize: pageSize,
|
|
100
|
-
relation: relation,
|
|
101
|
-
status: status,
|
|
102
|
-
userIds: userIds
|
|
103
|
-
}).then(function (res) {
|
|
104
|
-
return res;
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
exports.workData = workData;
|
|
82
|
+
exports.getUserById = getUserById;
|
|
@@ -37,7 +37,7 @@ function OkrStatusSelect(props) {
|
|
|
37
37
|
var onChange = props.onChange,
|
|
38
38
|
initValue = props.initValue;
|
|
39
39
|
|
|
40
|
-
var _useState = (0, _react.useState)((0, _getLocale.getLocale)("
|
|
40
|
+
var _useState = (0, _react.useState)((0, _getLocale.getLocale)("OKR_MyO_Butt_AllStates")),
|
|
41
41
|
_useState2 = _slicedToArray(_useState, 2),
|
|
42
42
|
selectText = _useState2[0],
|
|
43
43
|
setSelectText = _useState2[1];
|
|
@@ -48,13 +48,13 @@ function OkrStatusSelect(props) {
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
var selectOptions = [{
|
|
51
|
-
label: (0, _getLocale.getLocale)("
|
|
51
|
+
label: (0, _getLocale.getLocale)("OKR_MyO_Butt_AllStates"),
|
|
52
52
|
value: 0
|
|
53
53
|
}, {
|
|
54
54
|
label: (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress"),
|
|
55
55
|
value: 1
|
|
56
56
|
}, {
|
|
57
|
-
label: (0, _getLocale.getLocale)("
|
|
57
|
+
label: (0, _getLocale.getLocale)("OKR_MyO_Butt_Hasended"),
|
|
58
58
|
value: 2
|
|
59
59
|
}];
|
|
60
60
|
return /*#__PURE__*/_react["default"].createElement(_selectLayer["default"], {
|
|
@@ -41,9 +41,7 @@ function Principal(props) {
|
|
|
41
41
|
initValue = _props$initValue === void 0 ? [] : _props$initValue,
|
|
42
42
|
setRelation = props.setRelation,
|
|
43
43
|
_props$position = props.position,
|
|
44
|
-
position = _props$position === void 0 ? "bottom" : _props$position
|
|
45
|
-
_props$multiple = props.multiple,
|
|
46
|
-
multiple = _props$multiple === void 0 ? true : _props$multiple;
|
|
44
|
+
position = _props$position === void 0 ? "bottom" : _props$position;
|
|
47
45
|
|
|
48
46
|
var _useState = (0, _react.useState)(initValue),
|
|
49
47
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -62,29 +60,17 @@ function Principal(props) {
|
|
|
62
60
|
|
|
63
61
|
var userSelectorRef = (0, _react.useRef)(document.createElement("div"));
|
|
64
62
|
|
|
65
|
-
var singleSelect = function singleSelect(users) {
|
|
66
|
-
var _users$;
|
|
67
|
-
|
|
68
|
-
if (multiple || !users || !((_users$ = users[0]) !== null && _users$ !== void 0 && _users$.data)) return;
|
|
69
|
-
var user = users[0];
|
|
70
|
-
var data = user.data;
|
|
71
|
-
setUsers([{
|
|
72
|
-
avatar: data.avatar,
|
|
73
|
-
name: data.name,
|
|
74
|
-
userId: data.userId
|
|
75
|
-
}]);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
63
|
var onSelectUser = function onSelectUser(_ref) {
|
|
79
64
|
var users = _ref.users;
|
|
80
|
-
setUsers(users);
|
|
65
|
+
return setUsers(users);
|
|
81
66
|
};
|
|
82
67
|
|
|
83
68
|
(0, _react.useEffect)(function () {
|
|
84
69
|
setIsInit(true);
|
|
85
70
|
}, []);
|
|
86
71
|
(0, _react.useEffect)(function () {
|
|
87
|
-
setRelation(0);
|
|
72
|
+
setRelation(0);
|
|
73
|
+
console.log(users);
|
|
88
74
|
|
|
89
75
|
if (users.length > 0) {
|
|
90
76
|
var text = ""; // 我在拼name
|
|
@@ -106,11 +92,10 @@ function Principal(props) {
|
|
|
106
92
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
107
93
|
ref: userSelectorRef
|
|
108
94
|
}, /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
|
|
109
|
-
multiple:
|
|
95
|
+
multiple: true,
|
|
110
96
|
selectNodes: {
|
|
111
97
|
users: users
|
|
112
98
|
},
|
|
113
|
-
onSelect: singleSelect,
|
|
114
99
|
onOk: onSelectUser,
|
|
115
100
|
position: position,
|
|
116
101
|
disabledDepartSelect: true,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
border: 1px solid #e9ecf0;
|
|
7
7
|
padding: 7px 28px 7px 12px;
|
|
8
8
|
position: relative;
|
|
9
|
-
border-radius:
|
|
9
|
+
border-radius: 4px;
|
|
10
10
|
font-size: 0;
|
|
11
11
|
cursor: pointer;
|
|
12
12
|
transition: color 0.3s ease, border 0.3s ease;
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.titaui-search-dropdown .tu-icon-sort-down {
|
|
44
|
-
color: #6F7886;
|
|
45
44
|
font-size: 14px;
|
|
46
45
|
position: absolute;
|
|
47
46
|
right: 12px;
|
|
@@ -23,8 +23,6 @@ var _principal = _interopRequireDefault(require("../../search/principal"));
|
|
|
23
23
|
|
|
24
24
|
var _relation = _interopRequireDefault(require("../../search/relation"));
|
|
25
25
|
|
|
26
|
-
var _helpers = require("../../../../utils/helpers");
|
|
27
|
-
|
|
28
26
|
var _getLocale = require("../../../../utils/getLocale");
|
|
29
27
|
|
|
30
28
|
require("./index.css");
|
|
@@ -54,18 +52,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
54
52
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
55
53
|
|
|
56
54
|
function SearchForm(props) {
|
|
57
|
-
var _loginUser$UserAvatar, _loginUser$UserAvatar2, _loginUser$UserAvatar3;
|
|
58
|
-
|
|
59
|
-
var loginUser = (0, _helpers.getLoginUserInfo)();
|
|
60
|
-
var user = {
|
|
61
|
-
userId: loginUser.Id,
|
|
62
|
-
name: loginUser.Name,
|
|
63
|
-
avatar: {
|
|
64
|
-
original: loginUser === null || loginUser === void 0 ? void 0 : (_loginUser$UserAvatar = loginUser.UserAvatar) === null || _loginUser$UserAvatar === void 0 ? void 0 : _loginUser$UserAvatar.Original,
|
|
65
|
-
color: loginUser === null || loginUser === void 0 ? void 0 : (_loginUser$UserAvatar2 = loginUser.UserAvatar) === null || _loginUser$UserAvatar2 === void 0 ? void 0 : _loginUser$UserAvatar2.Color,
|
|
66
|
-
hasAvatar: loginUser === null || loginUser === void 0 ? void 0 : (_loginUser$UserAvatar3 = loginUser.UserAvatar) === null || _loginUser$UserAvatar3 === void 0 ? void 0 : _loginUser$UserAvatar3.HasAvatar
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
55
|
var onChange = props.onChange;
|
|
70
56
|
|
|
71
57
|
var _useState = (0, _react.useState)({
|
|
@@ -83,7 +69,7 @@ function SearchForm(props) {
|
|
|
83
69
|
okrType = _useState4[0],
|
|
84
70
|
setOkrType = _useState4[1];
|
|
85
71
|
|
|
86
|
-
var _useState5 = (0, _react.useState)([
|
|
72
|
+
var _useState5 = (0, _react.useState)([]),
|
|
87
73
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
88
74
|
users = _useState6[0],
|
|
89
75
|
setUsers = _useState6[1];
|
|
@@ -131,7 +117,7 @@ function SearchForm(props) {
|
|
|
131
117
|
className: "rel-okr-tree__search-item"
|
|
132
118
|
}, /*#__PURE__*/_react["default"].createElement(_principal["default"], {
|
|
133
119
|
onChange: setUsers,
|
|
134
|
-
initValue:
|
|
120
|
+
initValue: [],
|
|
135
121
|
setRelation: setRelation
|
|
136
122
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
137
123
|
className: "rel-okr-tree__search-item"
|
|
@@ -21,8 +21,6 @@ var _openData = require("../../../../utils/open-data");
|
|
|
21
21
|
|
|
22
22
|
var _tools = require("../../../../utils/tools");
|
|
23
23
|
|
|
24
|
-
var _helpers = require("../../../../utils/helpers");
|
|
25
|
-
|
|
26
24
|
var _getLocale = require("../../../../utils/getLocale");
|
|
27
25
|
|
|
28
26
|
require("./index.css");
|
|
@@ -51,7 +49,7 @@ function WorkNode(props) {
|
|
|
51
49
|
removeSelected = _useContext.removeSelected;
|
|
52
50
|
|
|
53
51
|
var gotoWorkDetail = function gotoWorkDetail() {
|
|
54
|
-
window.open("#work?work_id=".concat(data.WorkId, "&to_user_id=
|
|
52
|
+
window.open("#work?work_id=".concat(data.WorkId, "&to_user_id=560000209&status=1"));
|
|
55
53
|
};
|
|
56
54
|
|
|
57
55
|
var onCheckHandler = function onCheckHandler(checked) {
|
|
@@ -11,14 +11,11 @@ var _tooltip = _interopRequireDefault(require("./tooltip"));
|
|
|
11
11
|
|
|
12
12
|
var _tooltipText = _interopRequireDefault(require("./tooltip-text"));
|
|
13
13
|
|
|
14
|
-
var _tooltipRows = _interopRequireDefault(require("./tooltip-rows"));
|
|
15
|
-
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
15
|
|
|
18
16
|
// export const TooltipText = _TooltipText;
|
|
19
17
|
// export const ErrorToolTip = _ErrorTip;
|
|
20
18
|
_tooltip["default"].Text = _tooltipText["default"];
|
|
21
19
|
_tooltip["default"].Error = _errorTip["default"];
|
|
22
|
-
_tooltip["default"].Rows = _tooltipRows["default"];
|
|
23
20
|
var _default = _tooltip["default"];
|
|
24
21
|
exports["default"] = _default;
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
background: url(../images/empty-131.png) transparent no-repeat 50% 50%;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.persel-empty > span.empty-special {
|
|
16
|
+
background-image: url("../images/no-auth.png");
|
|
17
|
+
background-size: contain;
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
.add-group {
|
|
16
21
|
display: inline-block;
|
|
17
22
|
color: #2879ff;
|
|
@@ -7,13 +7,17 @@ exports["default"] = _default;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
10
12
|
var _getLocale = require("../../../utils/getLocale");
|
|
11
13
|
|
|
12
14
|
require("./index.css");
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
17
|
|
|
16
|
-
function _default() {
|
|
18
|
+
function _default(_ref) {
|
|
19
|
+
var _ref$errorTip = _ref.errorTip,
|
|
20
|
+
errorTip = _ref$errorTip === void 0 ? "" : _ref$errorTip;
|
|
17
21
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
18
22
|
style: {
|
|
19
23
|
textAlign: "center"
|
|
@@ -21,8 +25,10 @@ function _default() {
|
|
|
21
25
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
22
26
|
className: "persel-empty"
|
|
23
27
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
24
|
-
className: "icon"
|
|
28
|
+
className: (0, _classnames["default"])("icon", {
|
|
29
|
+
"empty-special": !!errorTip
|
|
30
|
+
})
|
|
25
31
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
26
32
|
className: "empty-tip"
|
|
27
|
-
}, (0, _getLocale.getLocale)("OKR_MyO_Thnothinghere")));
|
|
33
|
+
}, errorTip || (0, _getLocale.getLocale)("OKR_MyO_Thnothinghere")));
|
|
28
34
|
}
|