@titaui/pc 1.12.9-beta.1 → 1.12.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/menus/export-modules/demo-menus/menu-highlight.js +19 -1
- package/lib/components/menus/export-modules/demo-menus/menus.js +34 -1
- package/lib/components/okr-flow/export-modal/color.png +0 -0
- package/lib/components/okr-flow/export-modal/index.css +13 -28
- package/lib/components/okr-flow/export-modal/index.js +8 -51
- package/lib/components/okr-flow/export-modal/trans1.png +0 -0
- package/lib/components/period-selector/components/button/style.js +1 -1
- package/lib/components/period-selector/index.css +0 -1
- package/lib/components/period-selector/index.js +2 -7
- package/lib/components/select-layer/index.js +8 -22
- package/lib/components/task-relation-modal/helper.js +56 -1
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +4 -1
- package/lib/components/task-relation-modal/okr-relation/request-api.js +6 -2
- package/lib/components/task-relation-modal/request-api.js +2 -5
- package/lib/components/task-relation-modal/tree/work-tree/index.js +31 -27
- package/lib/components/task-relation-modal/tree/work-tree/search-form.js +3 -22
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +11 -11
- package/lib/components/tooltip/tooltip.js +4 -9
- package/lib/components/user-selector/category-selector-panel/depart-tree.js +1 -3
- package/lib/components/user-selector/export-modules/field-tree-selector/index.css +1 -2
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +3 -17
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.css +1 -1
- package/lib/utils/planDataJson.js +11115 -0
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ var _default = /*#__PURE__*/function () {
|
|
|
25
25
|
_createClass(_default, [{
|
|
26
26
|
key: "highlight",
|
|
27
27
|
value: function highlight(cb) {
|
|
28
|
-
if (this.isUnAssigned()) cb(_menus.PAGE_UNASSIGNED_DEMOFREE);else if (this.isAssigned()) cb(_menus.PAGE_ASSIGNED_DEMOFREE);else if (this.isReserved()) cb(_menus.PAGE_RESERVED_DEMOFREE);else if (this.isDone()) cb(_menus.PAGE_DONE_DEMOFREE);else if (this.isIgnore()) cb(_menus.PAGE_IGNORED_DEMOFREE);else if (this.isChart()) cb(_menus.PAGE_CHARTS_DEMOFREE);else if (this.isRechargeList()) cb(_menus.PAGE_RECHARGE_LIST);else if (this.isRechargeStatistics()) cb(_menus.PAGE_RECHARGE_STATISTICS);else if (this.isRechargeStatus()) cb(_menus.PAGE_RECHARGE_STATUS);else if (this.isDueDateOrder()) cb(_menus.PAGE_DUEDATE_ORDER);
|
|
28
|
+
if (this.isUnAssigned()) cb(_menus.PAGE_UNASSIGNED_DEMOFREE);else if (this.isAssigned()) cb(_menus.PAGE_ASSIGNED_DEMOFREE);else if (this.isReserved()) cb(_menus.PAGE_RESERVED_DEMOFREE);else if (this.isDone()) cb(_menus.PAGE_DONE_DEMOFREE);else if (this.isIgnore()) cb(_menus.PAGE_IGNORED_DEMOFREE);else if (this.isChart()) cb(_menus.PAGE_CHARTS_DEMOFREE);else if (this.isRechargeList()) cb(_menus.PAGE_RECHARGE_LIST);else if (this.isRechargeStatistics()) cb(_menus.PAGE_RECHARGE_STATISTICS);else if (this.isRechargeStatus()) cb(_menus.PAGE_RECHARGE_STATUS);else if (this.isDueDateOrder()) cb(_menus.PAGE_DUEDATE_ORDER);else if (this.isAllCustomer()) cb(_menus.PAGE_ALL_CUSTOMER);else if (this.isPublicCustomer()) cb(_menus.PAGE_PUBLIC_CUSTOMER);else if (this.isMyCustomer()) cb(_menus.PAGE_MY_CUSTOMER);
|
|
29
29
|
}
|
|
30
30
|
}, {
|
|
31
31
|
key: "isChart",
|
|
@@ -102,6 +102,24 @@ var _default = /*#__PURE__*/function () {
|
|
|
102
102
|
search = _this$history$locatio5.search;
|
|
103
103
|
return pathname.match(/demofree/) && search.match(/selected[\s]*?=[\s]*?ignore/);
|
|
104
104
|
}
|
|
105
|
+
}, {
|
|
106
|
+
key: "isPublicCustomer",
|
|
107
|
+
value: function isPublicCustomer() {
|
|
108
|
+
var pathname = this.history.location.pathname;
|
|
109
|
+
return pathname.match(/demofree\/customer\/public/);
|
|
110
|
+
}
|
|
111
|
+
}, {
|
|
112
|
+
key: "isMyCustomer",
|
|
113
|
+
value: function isMyCustomer() {
|
|
114
|
+
var pathname = this.history.location.pathname;
|
|
115
|
+
return pathname.match(/demofree\/customer\/my/);
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
key: "isAllCustomer",
|
|
119
|
+
value: function isAllCustomer() {
|
|
120
|
+
var pathname = this.history.location.pathname;
|
|
121
|
+
return pathname.match(/demofree\/customer\/all/);
|
|
122
|
+
}
|
|
105
123
|
}]);
|
|
106
124
|
|
|
107
125
|
return _default;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.defaultRefObject = exports["default"] = exports.PAGE_UNASSIGNED_DEMOFREE = exports.PAGE_RESERVED_DEMOFREE = exports.PAGE_RECHARGE_STATUS = exports.PAGE_RECHARGE_STATISTICS = exports.PAGE_RECHARGE_LIST = exports.PAGE_IGNORED_DEMOFREE = exports.PAGE_DUEDATE_ORDER = exports.PAGE_DONE_DEMOFREE = exports.PAGE_CHARTS_DEMOFREE = exports.PAGE_ASSIGNED_DEMOFREE = void 0;
|
|
6
|
+
exports.defaultRefObject = exports["default"] = exports.PAGE_UNASSIGNED_DEMOFREE = exports.PAGE_RESERVED_DEMOFREE = exports.PAGE_RECHARGE_STATUS = exports.PAGE_RECHARGE_STATISTICS = exports.PAGE_RECHARGE_LIST = exports.PAGE_PUBLIC_CUSTOMER = exports.PAGE_MY_CUSTOMER = exports.PAGE_IGNORED_DEMOFREE = exports.PAGE_DUEDATE_ORDER = exports.PAGE_DONE_DEMOFREE = exports.PAGE_CHARTS_DEMOFREE = exports.PAGE_CHARTS = exports.PAGE_ASSIGNED_DEMOFREE = exports.PAGE_ALL_CUSTOMER = void 0;
|
|
7
7
|
|
|
8
8
|
var _index = require("../../components/menu-tree/tree-node/index");
|
|
9
9
|
|
|
@@ -40,6 +40,14 @@ var PAGE_IGNORED_DEMOFREE = "ignore";
|
|
|
40
40
|
exports.PAGE_IGNORED_DEMOFREE = PAGE_IGNORED_DEMOFREE;
|
|
41
41
|
var PAGE_CHARTS_DEMOFREE = "charts";
|
|
42
42
|
exports.PAGE_CHARTS_DEMOFREE = PAGE_CHARTS_DEMOFREE;
|
|
43
|
+
var PAGE_ALL_CUSTOMER = "allCustomer";
|
|
44
|
+
exports.PAGE_ALL_CUSTOMER = PAGE_ALL_CUSTOMER;
|
|
45
|
+
var PAGE_PUBLIC_CUSTOMER = "publicCustomer";
|
|
46
|
+
exports.PAGE_PUBLIC_CUSTOMER = PAGE_PUBLIC_CUSTOMER;
|
|
47
|
+
var PAGE_MY_CUSTOMER = "myCustomer";
|
|
48
|
+
exports.PAGE_MY_CUSTOMER = PAGE_MY_CUSTOMER;
|
|
49
|
+
var PAGE_CHARTS = "charts";
|
|
50
|
+
exports.PAGE_CHARTS = PAGE_CHARTS;
|
|
43
51
|
var PAGE_RECHARGE_LIST = "rechargeList";
|
|
44
52
|
exports.PAGE_RECHARGE_LIST = PAGE_RECHARGE_LIST;
|
|
45
53
|
var PAGE_DUEDATE_ORDER = "dueDateOrder";
|
|
@@ -91,6 +99,31 @@ var DemoMenuData = /*#__PURE__*/function () {
|
|
|
91
99
|
href: "#/demofree/list?selected=ignore",
|
|
92
100
|
isShow: this.isManager === EManagerType.Manager
|
|
93
101
|
}]
|
|
102
|
+
}, {
|
|
103
|
+
icon: "KH-help",
|
|
104
|
+
label: "公海资源",
|
|
105
|
+
key: "customer",
|
|
106
|
+
href: "#/demofree/customer/public",
|
|
107
|
+
isShow: true,
|
|
108
|
+
children: [{
|
|
109
|
+
icon: "",
|
|
110
|
+
label: "全部客户",
|
|
111
|
+
key: PAGE_ALL_CUSTOMER,
|
|
112
|
+
href: "#/demofree/customer/all",
|
|
113
|
+
isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager
|
|
114
|
+
}, {
|
|
115
|
+
icon: "",
|
|
116
|
+
label: "公海资源",
|
|
117
|
+
key: PAGE_PUBLIC_CUSTOMER,
|
|
118
|
+
href: "#/demofree/customer/public",
|
|
119
|
+
isShow: this.isManager !== EManagerType.ReCharge
|
|
120
|
+
}, {
|
|
121
|
+
icon: "",
|
|
122
|
+
label: "我的资源",
|
|
123
|
+
key: PAGE_MY_CUSTOMER,
|
|
124
|
+
href: "#/demofree/customer/my",
|
|
125
|
+
isShow: this.isManager !== EManagerType.ReCharge
|
|
126
|
+
}]
|
|
94
127
|
}, {
|
|
95
128
|
icon: "KH-help",
|
|
96
129
|
label: "客户续费",
|
|
Binary file
|
|
@@ -15,43 +15,28 @@
|
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|
|
17
17
|
padding: 0 32px 10px;
|
|
18
|
+
color: #89919F;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
.export-map-
|
|
21
|
+
.export-map-modal__color-trigger {
|
|
22
|
+
border-radius: 4px;
|
|
23
|
+
display: inline-block;
|
|
24
|
+
width: 30px;
|
|
21
25
|
height: 30px;
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
padding: 0 12px;
|
|
25
|
-
background: #FFFFFF;
|
|
26
|
-
border-radius: 16px;
|
|
27
|
-
border: 1px solid #E9ECF0;
|
|
28
|
-
font-size: 14px;
|
|
29
|
-
font-weight: 400;
|
|
30
|
-
color: #141C28;
|
|
31
|
-
margin-right: 12px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.export-map-modal__setting-color:hover {
|
|
35
|
-
border: 1px solid #2879ff;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.export-map-modal__setting-color-trigger {
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
width: 20px;
|
|
41
|
-
height: 20px;
|
|
42
26
|
background: url("./color.png") no-repeat;
|
|
43
27
|
background-size: cover;
|
|
44
|
-
|
|
45
|
-
margin-right: 4px;
|
|
28
|
+
cursor: pointer;
|
|
46
29
|
}
|
|
47
30
|
|
|
48
|
-
.export-map-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
31
|
+
.export-map-modal__color-trans {
|
|
32
|
+
border-radius: 4px;
|
|
33
|
+
display: inline-block;
|
|
34
|
+
width: 30px;
|
|
35
|
+
height: 30px;
|
|
52
36
|
background: url("./trans1.png") no-repeat;
|
|
53
37
|
background-size: cover;
|
|
54
|
-
|
|
38
|
+
margin-left: 10px;
|
|
39
|
+
cursor: pointer;
|
|
55
40
|
}
|
|
56
41
|
|
|
57
42
|
.export-map-modal .titaui-color-picker {
|
|
@@ -21,10 +21,6 @@ var _toast = _interopRequireDefault(require("../../toast"));
|
|
|
21
21
|
|
|
22
22
|
var _dialog = _interopRequireDefault(require("../../dialog"));
|
|
23
23
|
|
|
24
|
-
var _tooltip = _interopRequireDefault(require("../../tooltip"));
|
|
25
|
-
|
|
26
|
-
var _selectLayer = _interopRequireDefault(require("../../select-layer"));
|
|
27
|
-
|
|
28
24
|
var _utils = require("../utils");
|
|
29
25
|
|
|
30
26
|
var _context2 = require("../context");
|
|
@@ -105,25 +101,8 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
105
101
|
isExport = _useState6[0],
|
|
106
102
|
setIsExport = _useState6[1];
|
|
107
103
|
|
|
108
|
-
var _useState7 = (0, _react.useState)({
|
|
109
|
-
label: (0, _getLocale.getLocale)('Rep_NewS_HDmode'),
|
|
110
|
-
value: 20
|
|
111
|
-
}),
|
|
112
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
113
|
-
model = _useState8[0],
|
|
114
|
-
setModel = _useState8[1];
|
|
115
|
-
|
|
116
104
|
var modalRef = (0, _react.useRef)();
|
|
117
105
|
var virtualElements = (0, _react.useRef)([]);
|
|
118
|
-
var models = [{
|
|
119
|
-
label: (0, _getLocale.getLocale)('Rep_NewS_Standardmode'),
|
|
120
|
-
value: 10,
|
|
121
|
-
toolText: (0, _getLocale.getLocale)('Rep_NewS_SmallFileSuita')
|
|
122
|
-
}, {
|
|
123
|
-
label: (0, _getLocale.getLocale)('Rep_NewS_HDmode'),
|
|
124
|
-
value: 20,
|
|
125
|
-
toolText: (0, _getLocale.getLocale)('Rep_NewS_LargeileSize')
|
|
126
|
-
}];
|
|
127
106
|
(0, _react.useEffect)(function () {
|
|
128
107
|
if ((0, _bsGlobal.isWx)() && window.WWOpenData) {
|
|
129
108
|
if (window.WWOpenData.enableCanvasSharing) {
|
|
@@ -155,7 +134,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
155
134
|
|
|
156
135
|
canvas = document.createElement('canvas'); // 创建一个canvas节点
|
|
157
136
|
|
|
158
|
-
scale =
|
|
137
|
+
scale = 20; // 定义任意放大倍数 支持小数
|
|
159
138
|
|
|
160
139
|
canvas.width = width * scale; // 定义canvas 宽度 * 缩放
|
|
161
140
|
|
|
@@ -317,10 +296,6 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
317
296
|
setMapInstance(instance);
|
|
318
297
|
};
|
|
319
298
|
|
|
320
|
-
var onChangeHandler = function onChangeHandler(data) {
|
|
321
|
-
setModel(data);
|
|
322
|
-
};
|
|
323
|
-
|
|
324
299
|
var colorChangeHandler = function colorChangeHandler(colors) {
|
|
325
300
|
setBgColor(colors ? colors.color : 'none');
|
|
326
301
|
};
|
|
@@ -342,7 +317,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
342
317
|
title: (0, _getLocale.getLocale)('OKR_Ali_Exportmap'),
|
|
343
318
|
noFooterLine: true,
|
|
344
319
|
visible: visible,
|
|
345
|
-
width: "
|
|
320
|
+
width: "1000px",
|
|
346
321
|
onClose: onCloseHandler,
|
|
347
322
|
onOk: confirmHandler,
|
|
348
323
|
onCancel: onCloseHandler,
|
|
@@ -352,11 +327,9 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
352
327
|
forceRender: true
|
|
353
328
|
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
354
329
|
className: "export-map-modal__setting"
|
|
355
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
356
|
-
className: "export-map-modal__setting-color"
|
|
357
330
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
358
331
|
style: {
|
|
359
|
-
marginRight:
|
|
332
|
+
marginRight: 10
|
|
360
333
|
}
|
|
361
334
|
}, (0, _getLocale.getLocale)('OKR_Ali_Selectbackground')), /*#__PURE__*/_react["default"].createElement(_rcColorPicker["default"], {
|
|
362
335
|
animation: "slide-up",
|
|
@@ -364,28 +337,12 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
364
337
|
onChange: colorChangeHandler,
|
|
365
338
|
className: "titaui-color-picker",
|
|
366
339
|
mode: "HSB"
|
|
367
|
-
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
368
|
-
overlay: (0, _getLocale.getLocale)('Mod_Customization'),
|
|
369
|
-
placement: "top"
|
|
370
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
371
|
-
className: "export-map-modal__setting-color-trigger"
|
|
372
|
-
}))), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
373
|
-
overlay: (0, _getLocale.getLocale)('OKR_Ali_Butt_Transparent'),
|
|
374
|
-
placement: "top"
|
|
375
340
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
376
|
-
className: "export-map-
|
|
341
|
+
className: "export-map-modal__color-trigger"
|
|
342
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
343
|
+
className: "export-map-modal__color-trans",
|
|
377
344
|
onClick: colorChangeHandler
|
|
378
|
-
}))
|
|
379
|
-
onChangeSelect: onChangeHandler,
|
|
380
|
-
items: models,
|
|
381
|
-
initValue: model.value
|
|
382
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
383
|
-
className: "titaui-search-dropdown"
|
|
384
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
385
|
-
className: "titaui-search-dropdown__text"
|
|
386
|
-
}, model.label), /*#__PURE__*/_react["default"].createElement("span", {
|
|
387
|
-
className: "tu-icon-sort-down"
|
|
388
|
-
})))), /*#__PURE__*/_react["default"].createElement("div", null, visible && /*#__PURE__*/_react["default"].createElement(_context2.CommonContext.Provider, {
|
|
345
|
+
})), /*#__PURE__*/_react["default"].createElement("div", null, visible && /*#__PURE__*/_react["default"].createElement(_context2.CommonContext.Provider, {
|
|
389
346
|
value: {
|
|
390
347
|
direction: direction,
|
|
391
348
|
showkr: showkr,
|
|
@@ -404,7 +361,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
404
361
|
zoomOnDoubleClick: false,
|
|
405
362
|
paneMoveable: false,
|
|
406
363
|
style: {
|
|
407
|
-
height:
|
|
364
|
+
height: 600,
|
|
408
365
|
width: '100%',
|
|
409
366
|
background: bgColor
|
|
410
367
|
}
|
|
Binary file
|
|
@@ -13,7 +13,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
13
13
|
|
|
14
14
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
15
|
|
|
16
|
-
var DefaultWrapper = _styledComponents["default"].button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: inline-flex;\n\n align-items: center;\n justify-content: center;\n color: #6f7886;\n cursor: pointer;\n outline: none;\n transition: color 0.3s ease, border 0.3s ease;\n background: transparent;\n border-radius: 3px;\n border: 1px solid #e9ecf0;\n &.btn-size-m {\n min-width: 90px;\n height: 36px;\n
|
|
16
|
+
var DefaultWrapper = _styledComponents["default"].button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: inline-flex;\n\n align-items: center;\n justify-content: center;\n color: #6f7886;\n cursor: pointer;\n outline: none;\n transition: color 0.3s ease, border 0.3s ease;\n background: transparent;\n border-radius: 3px;\n border: 1px solid #e9ecf0;\n &.btn-size-m {\n min-width: 90px;\n height: 36px;\n padding: 0 18px;\n font-size: 14px;\n font-weight: 400;\n }\n &.btn-size-s {\n min-width: 68px;\n height: 26px;\n padding: 0 20px;\n font-size: 13px;\n font-weight: 400;\n }\n :hover {\n color: #2879ff;\n border-color: #2879ff;\n }\n :disabled {\n cursor: not-allowed;\n background-color: #f0f2f5;\n color: #a4acb9;\n border: none;\n :hover {\n border: none;\n color: #bfc7d5;\n opacity: 1;\n background-color: #f0f2f5;\n }\n }\n"])));
|
|
17
17
|
|
|
18
18
|
exports.DefaultWrapper = DefaultWrapper;
|
|
19
19
|
var PrimaryWrapper = (0, _styledComponents["default"])(DefaultWrapper)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: #ffffff;\n background: #2879ff;\n border: none;\n :hover {\n color: #ffffff;\n background-color: #5c8eff;\n border: none;\n }\n"])));
|
|
@@ -52,12 +52,9 @@ function PeriodSelector(_ref) {
|
|
|
52
52
|
onChange = _ref.onChange,
|
|
53
53
|
getPopupContainer = _ref.getPopupContainer,
|
|
54
54
|
selected = _ref.selected,
|
|
55
|
-
lastSelected = _ref.lastSelected,
|
|
56
55
|
selectorClass = _ref.selectorClass,
|
|
57
56
|
_ref$showCustom = _ref.showCustom,
|
|
58
57
|
showCustom = _ref$showCustom === void 0 ? true : _ref$showCustom,
|
|
59
|
-
_ref$isShowCustom = _ref.isShowCustom,
|
|
60
|
-
isShowCustom = _ref$isShowCustom === void 0 ? true : _ref$isShowCustom,
|
|
61
58
|
_ref$showFullCycle = _ref.showFullCycle,
|
|
62
59
|
showFullCycle = _ref$showFullCycle === void 0 ? true : _ref$showFullCycle,
|
|
63
60
|
_ref$showMonth = _ref.showMonth,
|
|
@@ -113,8 +110,6 @@ function PeriodSelector(_ref) {
|
|
|
113
110
|
(0, _react.useEffect)(function () {
|
|
114
111
|
if (selected) {
|
|
115
112
|
setSelectedPeriod(selected);
|
|
116
|
-
} else if (lastSelected) {
|
|
117
|
-
setSelectedPeriod(lastSelected);
|
|
118
113
|
}
|
|
119
114
|
}, []);
|
|
120
115
|
(0, _react.useEffect)(function () {
|
|
@@ -129,7 +124,7 @@ function PeriodSelector(_ref) {
|
|
|
129
124
|
|
|
130
125
|
if (selected) {
|
|
131
126
|
setSelectedPeriod(selected);
|
|
132
|
-
} else
|
|
127
|
+
} else {
|
|
133
128
|
setSelectedPeriod((0, _common.getDefalutCycle)(res.Data));
|
|
134
129
|
onChange && onChange((0, _common.getDefalutCycle)(res.Data));
|
|
135
130
|
}
|
|
@@ -148,7 +143,7 @@ function PeriodSelector(_ref) {
|
|
|
148
143
|
var popup = /*#__PURE__*/_react["default"].createElement(_selector["default"], {
|
|
149
144
|
className: selectorClass,
|
|
150
145
|
selected: selectedPeriod,
|
|
151
|
-
showCustom:
|
|
146
|
+
showCustom: isFetch ? cycleSetting.isOpenCustom : showCustom,
|
|
152
147
|
showFullCycle: showFullCycle,
|
|
153
148
|
showMonth: isFetch ? cycleSetting.isOpenMonth : showMonth,
|
|
154
149
|
showQuarter: isFetch ? cycleSetting.isOpenQuarter : showQuarter,
|
|
@@ -13,8 +13,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _popup = _interopRequireDefault(require("../popup"));
|
|
15
15
|
|
|
16
|
-
var _tooltip = _interopRequireDefault(require("../tooltip"));
|
|
17
|
-
|
|
18
16
|
var _getLocale = require("../../utils/getLocale");
|
|
19
17
|
|
|
20
18
|
require("./index.css");
|
|
@@ -44,7 +42,7 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
44
42
|
onChangeSelect = props.onChangeSelect,
|
|
45
43
|
items = props.items,
|
|
46
44
|
_props$initText = props.initText,
|
|
47
|
-
initText = _props$initText === void 0 ? (0, _getLocale.getLocale)(
|
|
45
|
+
initText = _props$initText === void 0 ? (0, _getLocale.getLocale)("OKR_MyO_E_Temporarilynone") : _props$initText,
|
|
48
46
|
popupProps = props.popupProps,
|
|
49
47
|
renderPrefixIcon = props.renderPrefixIcon,
|
|
50
48
|
renderSuffixIcon = props.renderSuffixIcon,
|
|
@@ -84,25 +82,13 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
84
82
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
85
83
|
className: "select-layout__layer-select-wrapper"
|
|
86
84
|
}, items.map(function (item, index) {
|
|
87
|
-
if (item.toolText) return /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
88
|
-
placement: "top",
|
|
89
|
-
overlay: item.toolText
|
|
90
|
-
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
|
-
key: index,
|
|
92
|
-
onClick: function onClick(e) {
|
|
93
|
-
return handleSelectItem(item);
|
|
94
|
-
},
|
|
95
|
-
className: (0, _classnames["default"])('select-layout__layer-select-text', {
|
|
96
|
-
'select-layout__layer-select-text--active': selectItem && item.value === selectItem.value
|
|
97
|
-
})
|
|
98
|
-
}, item.label)));
|
|
99
85
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
86
|
key: index,
|
|
101
87
|
onClick: function onClick(e) {
|
|
102
88
|
return handleSelectItem(item);
|
|
103
89
|
},
|
|
104
|
-
className: (0, _classnames["default"])(
|
|
105
|
-
|
|
90
|
+
className: (0, _classnames["default"])("select-layout__layer-select-text", {
|
|
91
|
+
"select-layout__layer-select-text--active": selectItem && item.value === selectItem.value
|
|
106
92
|
})
|
|
107
93
|
}, item.label);
|
|
108
94
|
}));
|
|
@@ -127,9 +113,9 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
127
113
|
}
|
|
128
114
|
|
|
129
115
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
130
|
-
className: (0, _classnames["default"])(
|
|
131
|
-
|
|
132
|
-
|
|
116
|
+
className: (0, _classnames["default"])("select-layout__layer-text", {
|
|
117
|
+
"select-layout__layer-text--focus": visible && canEdit,
|
|
118
|
+
"select-layout__layer-text--hidden-border": !canEdit
|
|
133
119
|
}),
|
|
134
120
|
onClick: handleClickText
|
|
135
121
|
}, renderPrefixIcon && /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -150,7 +136,7 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
150
136
|
// @ts-ignore
|
|
151
137
|
_react["default"].createElement(_popup["default"], _extends({
|
|
152
138
|
popupVisible: visible,
|
|
153
|
-
action: [
|
|
139
|
+
action: ["click"],
|
|
154
140
|
destroyPopupOnHide: true,
|
|
155
141
|
popup: renderSelection,
|
|
156
142
|
mask: false,
|
|
@@ -158,7 +144,7 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
158
144
|
return popupRef.current;
|
|
159
145
|
},
|
|
160
146
|
popupStyle: {
|
|
161
|
-
width:
|
|
147
|
+
width: "100%"
|
|
162
148
|
}
|
|
163
149
|
}, popupProps, {
|
|
164
150
|
onPopupVisibleChange: function onPopupVisibleChange(visible) {
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.formatDateStr = void 0;
|
|
7
|
+
exports.formatPeriodPlanData = formatPeriodPlanData;
|
|
8
|
+
exports.lableTypeMap = exports.isOpenWorkManage = exports.isOpenOkrManage = exports.isOpenLabel = void 0;
|
|
7
9
|
exports.momentDate = momentDate;
|
|
8
10
|
exports.workStatus = exports.timeFormat = exports.preCls = exports.okrStatus = void 0;
|
|
9
11
|
|
|
@@ -11,6 +13,8 @@ var _bsGlobal = require("../../utils/bs-global");
|
|
|
11
13
|
|
|
12
14
|
var _getLocale = require("../../utils/getLocale");
|
|
13
15
|
|
|
16
|
+
var _planDataJson = require("../../utils/planDataJson");
|
|
17
|
+
|
|
14
18
|
var preCls = "titaui-task-relation";
|
|
15
19
|
exports.preCls = preCls;
|
|
16
20
|
var isOpenOkrManage = (0, _bsGlobal.getAppHead)("113"); // 开通OKR
|
|
@@ -121,4 +125,55 @@ exports.workStatus = workStatus;
|
|
|
121
125
|
function momentDate(date) {
|
|
122
126
|
var reg = new RegExp('年|月|日', 'g');
|
|
123
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
|
+
};
|
|
124
179
|
}
|
|
@@ -21,6 +21,8 @@ var _taskStatusSelect = _interopRequireDefault(require("../../search/task-status
|
|
|
21
21
|
|
|
22
22
|
var _taskRelation = _interopRequireDefault(require("../../search/task-relation"));
|
|
23
23
|
|
|
24
|
+
var _helper = require("../../helper");
|
|
25
|
+
|
|
24
26
|
var _formatTime = require("../../../../utils/format-time");
|
|
25
27
|
|
|
26
28
|
var _getLocale = require("../../../../utils/getLocale");
|
|
@@ -83,11 +85,12 @@ function SearchForm(props) {
|
|
|
83
85
|
|
|
84
86
|
var dilagRef = (0, _react.useRef)(document.createElement('div'));
|
|
85
87
|
(0, _react.useEffect)(function () {
|
|
88
|
+
var planCycle = (0, _helper.formatPeriodPlanData)(cycle);
|
|
86
89
|
onChange(_objectSpread({
|
|
87
90
|
status: status,
|
|
88
91
|
keyWords: keyWords,
|
|
89
92
|
relation: relation
|
|
90
|
-
},
|
|
93
|
+
}, planCycle));
|
|
91
94
|
}, [status, keyWords, cycle, relation]);
|
|
92
95
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
93
96
|
ref: dilagRef
|
|
@@ -32,6 +32,10 @@ var planTableTask = function planTableTask(params, pageNum, pageSize) {
|
|
|
32
32
|
keyWords = _params$keyWords === void 0 ? '' : _params$keyWords,
|
|
33
33
|
_params$status = params.status,
|
|
34
34
|
status = _params$status === void 0 ? 10 : _params$status,
|
|
35
|
+
_params$planTableId = params.planTableId,
|
|
36
|
+
planTableId = _params$planTableId === void 0 ? '' : _params$planTableId,
|
|
37
|
+
_params$planTableType = params.planTableType,
|
|
38
|
+
planTableType = _params$planTableType === void 0 ? '' : _params$planTableType,
|
|
35
39
|
_params$relation = params.relation,
|
|
36
40
|
relation = _params$relation === void 0 ? 0 : _params$relation;
|
|
37
41
|
|
|
@@ -50,8 +54,8 @@ var planTableTask = function planTableTask(params, pageNum, pageSize) {
|
|
|
50
54
|
EndDate: endDate,
|
|
51
55
|
startNum: pageNum,
|
|
52
56
|
count: pageSize,
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
planTableId: planTableId,
|
|
58
|
+
planTableType: planTableType,
|
|
55
59
|
fromLevel: 1,
|
|
56
60
|
toLevel: 1,
|
|
57
61
|
RelationType: relation,
|
|
@@ -90,9 +90,7 @@ var workData = function workData(params, pageNum, pageSize) {
|
|
|
90
90
|
status = _params$status === void 0 ? 0 : _params$status,
|
|
91
91
|
_params$relation = params.relation,
|
|
92
92
|
relation = _params$relation === void 0 ? 0 : _params$relation,
|
|
93
|
-
userIds = params.userIds
|
|
94
|
-
_params$isGetMileston = params.isGetMilestone,
|
|
95
|
-
isGetMilestone = _params$isGetMileston === void 0 ? false : _params$isGetMileston;
|
|
93
|
+
userIds = params.userIds;
|
|
96
94
|
var url = "work/list?toUserId=".concat(userIds || (0, _helpers.getLoginUserInfo)().Id);
|
|
97
95
|
return (0, _request.rpost)("v1")(url, {
|
|
98
96
|
keyWords: keyWords,
|
|
@@ -101,8 +99,7 @@ var workData = function workData(params, pageNum, pageSize) {
|
|
|
101
99
|
pageSize: pageSize,
|
|
102
100
|
relation: relation,
|
|
103
101
|
status: status,
|
|
104
|
-
userIds: userIds
|
|
105
|
-
isGetMilestone: isGetMilestone
|
|
102
|
+
userIds: userIds
|
|
106
103
|
}).then(function (res) {
|
|
107
104
|
return res;
|
|
108
105
|
});
|