@titaui/pc 1.13.2-beta.19 → 1.13.2-beta.21
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/checkbox-list/index.css +31 -0
- package/lib/components/checkbox-list/index.js +68 -0
- package/lib/components/create-okr-modal/index.js +4 -1
- package/lib/components/dialog-qq-docs/index.css +106 -0
- package/lib/components/dialog-qq-docs/index.js +501 -0
- package/lib/components/dialog-qq-docs/request-apis.js +16 -0
- package/lib/components/dialog-qq-docs/utils.js +83 -0
- package/lib/components/dialog-select/index.css +9 -0
- package/lib/components/dialog-select/index.js +48 -0
- package/lib/components/dialog-upload/img/folder.svg +40 -0
- package/lib/components/dialog-upload/img/form.svg +38 -0
- package/lib/components/dialog-upload/img/mind.svg +39 -0
- package/lib/components/dialog-upload/util.js +20 -2
- package/lib/components/dialog-upload-type/assets/folder.svg +20 -0
- package/lib/components/dialog-upload-type/assets/qq-docs.svg +20 -0
- package/lib/components/dialog-upload-type/components/upload-type-item/index.css +14 -0
- package/lib/components/dialog-upload-type/components/upload-type-item/index.js +36 -0
- package/lib/components/dialog-upload-type/index.css +7 -0
- package/lib/components/dialog-upload-type/index.js +68 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +2 -3
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +1 -5
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.css +0 -12
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.js +2 -13
- package/lib/components/dynamic/dynamic-item/components/task-progress/render-row.js +2 -2
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +1 -16
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +9 -51
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +10 -27
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +4 -6
- package/lib/components/dynamic/dynamic-item/index.js +3 -23
- package/lib/components/dynamic/request-api.js +2 -9
- package/lib/components/file-list/components/single-file/index.css +29 -0
- package/lib/components/file-list/components/single-file/index.js +19 -28
- package/lib/components/file-list/img/folder.svg +40 -0
- package/lib/components/file-list/img/form.svg +38 -0
- package/lib/components/file-list/img/mind.svg +39 -0
- package/lib/components/file-list/index.js +2 -1
- package/lib/components/file-list/util.js +20 -2
- package/lib/components/file-preview/index.css +44 -0
- package/lib/components/file-preview/index.js +68 -0
- package/lib/components/loading/assets/loading.gif +0 -0
- package/lib/components/loading/index.css +28 -0
- package/lib/components/loading/index.js +64 -0
- package/lib/components/nav/index.css +37 -0
- package/lib/components/nav/index.js +31 -0
- package/lib/components/nav-top/components/app-center/index.js +6 -1
- package/lib/components/nav-top/components/menu/index.js +44 -14
- package/lib/components/nav-top/index.css +6 -0
- package/lib/components/nav-top/index.js +138 -2
- package/lib/components/nav-top/request.apis.js +10 -2
- package/lib/components/okr-detail/schedule/components/kr-progress/index.js +4 -1
- package/lib/components/okr-guide/constant.js +23 -0
- package/lib/components/okr-guide/img/left-img.jpg +0 -0
- package/lib/components/okr-guide/index.css +148 -0
- package/lib/components/okr-guide/index.js +242 -0
- package/lib/components/okr-guide/request-api.js +57 -0
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +1 -1
- package/lib/components/rich-editor/plugins/inline/color/commond.js +3 -3
- package/lib/components/rich-editor-at/index.js +13 -85
- package/lib/components/scroll-container/index.js +27 -6
- package/lib/components/search-input/index.css +2 -2
- package/lib/components/search-input/index.js +4 -0
- package/lib/components/upload/img/folder.svg +40 -0
- package/lib/components/upload/img/form.svg +38 -0
- package/lib/components/upload/img/mind.svg +39 -0
- package/lib/components/upload/index.js +193 -25
- package/lib/components/upload/index2.js +381 -0
- package/lib/components/upload/util.js +20 -2
- package/lib/components/user-selector/request-apis.js +3 -3
- package/lib/components/version-change-modal/index.js +1 -3
- package/lib/index.js +8 -0
- package/lib/utils/open-data.js +77 -68
- package/lib/utils/tools.js +11 -1
- package/package.json +2 -3
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/utils.js +0 -56
- package/lib/utils/mock-bsglobal.js +0 -1837
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
.titaui-ork-guide__wrap .rc-dialog {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.titaui-ork-guide__wrap .rc-dialog-content {
|
|
7
|
+
border-radius: 0;
|
|
8
|
+
height: 100%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.titaui-ork-guide__wrap .rc-dialog-body {
|
|
12
|
+
height: 100%;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.titaui-ork-guide__bg {
|
|
16
|
+
position: relative;
|
|
17
|
+
height: 100%;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
background: linear-gradient(135deg, #9FBFFF 0%, #FEF7E5 65%, #FFFFFF 100%);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.titaui-ork-guide__bg::before {
|
|
23
|
+
content: '';
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 0px;
|
|
26
|
+
right: 172px;
|
|
27
|
+
width: 283px;
|
|
28
|
+
height: 128px;
|
|
29
|
+
background: rgba(240, 94, 94, 0.2);
|
|
30
|
+
filter: blur(50px);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.titaui-ork-guide__container {
|
|
34
|
+
position: relative;
|
|
35
|
+
height: 100%;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
overflow-y: scroll;
|
|
38
|
+
padding-top: 91px;
|
|
39
|
+
padding-bottom: 104px;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.titaui-ork-guide__container::before {
|
|
44
|
+
content: '';
|
|
45
|
+
position: absolute;
|
|
46
|
+
bottom: 72px;
|
|
47
|
+
right: -237px;
|
|
48
|
+
width: 339px;
|
|
49
|
+
height: 359px;
|
|
50
|
+
background: rgba(0, 214, 133, 0.1);
|
|
51
|
+
filter: blur(48px);
|
|
52
|
+
z-index: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.titaui-ork-guide__container__top {
|
|
56
|
+
font-size: 28px;
|
|
57
|
+
font-weight: normal;
|
|
58
|
+
color: #141C28;
|
|
59
|
+
line-height: 44px;
|
|
60
|
+
letter-spacing: 1px;
|
|
61
|
+
margin-bottom: 60px;
|
|
62
|
+
text-align: center;
|
|
63
|
+
font-weight: 600;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.titaui-ork-guide__container__card {
|
|
67
|
+
width: 874px;
|
|
68
|
+
height: 501px;
|
|
69
|
+
background: linear-gradient(270deg, #FFFFFF 0%, #FFFFFF 100%);
|
|
70
|
+
box-shadow: 0px 12px 24px 0px rgba(127, 145, 180, 0.08);
|
|
71
|
+
border-radius: 24px;
|
|
72
|
+
margin: 0 auto;
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: row;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.titaui-ork-guide__container__card__left {
|
|
78
|
+
width: 50%;
|
|
79
|
+
position: relative;
|
|
80
|
+
padding: 32px;
|
|
81
|
+
box-sizing: border-box;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.titaui-ork-guide__container__card__left img {
|
|
85
|
+
width: 370px;
|
|
86
|
+
height: 437px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.titaui-ork-guide__container__card__left::before {
|
|
90
|
+
position: absolute;
|
|
91
|
+
content: '';
|
|
92
|
+
right: 0;
|
|
93
|
+
width: 1px;
|
|
94
|
+
height: 501px;
|
|
95
|
+
background: linear-gradient(20deg, rgba(233, 236, 240, 0) 0%, #D1D8E1 51%, rgba(233, 236, 240, 0) 100%);
|
|
96
|
+
border-radius: 24px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.titaui-ork-guide__container__card__right {
|
|
100
|
+
width: 50%;
|
|
101
|
+
padding: 52px 52px 52px 38px;
|
|
102
|
+
box-sizing: border-box;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.titaui-ork-guide__container__card__right__title {
|
|
106
|
+
font-size: 20px;
|
|
107
|
+
color: #141C28;
|
|
108
|
+
line-height: 30px;
|
|
109
|
+
font-weight: 600;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.titaui-ork-guide__container__card__right__desc {
|
|
113
|
+
font-size: 14px;
|
|
114
|
+
font-weight: normal;
|
|
115
|
+
color: #6F7886;
|
|
116
|
+
line-height: 22px;
|
|
117
|
+
margin-top: 8px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.titaui-ork-guide__container__card__right__checkbox {
|
|
121
|
+
padding-top: 28px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.titaui-ork-guide__container__card__right__checkbox .titaui-switch {
|
|
125
|
+
margin-bottom: 20px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.titaui-ork-guide__container__card__right__checkbox .titaui-switch-label {
|
|
129
|
+
display: inline-block;
|
|
130
|
+
width: 48px;
|
|
131
|
+
font-size: 16px;
|
|
132
|
+
font-weight: normal;
|
|
133
|
+
color: #141C28;
|
|
134
|
+
line-height: 24px;
|
|
135
|
+
margin-right: 20px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.titaui-ork-guide__container__card__right__btn {
|
|
139
|
+
text-align: center;
|
|
140
|
+
margin-top: 48px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.titaui-ork-guide__container__card__right__btn .tita-button-primary {
|
|
144
|
+
width: 190px;
|
|
145
|
+
height: 40px;
|
|
146
|
+
background: #2879FF;
|
|
147
|
+
border-radius: 20px;
|
|
148
|
+
}
|
|
@@ -0,0 +1,242 @@
|
|
|
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 _dialog = _interopRequireDefault(require("../dialog"));
|
|
13
|
+
|
|
14
|
+
var _switch = _interopRequireDefault(require("../switch"));
|
|
15
|
+
|
|
16
|
+
var _button = _interopRequireDefault(require("../button"));
|
|
17
|
+
|
|
18
|
+
var _toast = _interopRequireDefault(require("../toast"));
|
|
19
|
+
|
|
20
|
+
var _constant = require("./constant");
|
|
21
|
+
|
|
22
|
+
var _requestApi = require("./request-api");
|
|
23
|
+
|
|
24
|
+
var _leftImg = _interopRequireDefault(require("./img/left-img.jpg"));
|
|
25
|
+
|
|
26
|
+
require("./index.css");
|
|
27
|
+
|
|
28
|
+
var _excluded = ["hasSetting"],
|
|
29
|
+
_excluded2 = ["isOpenCustom"];
|
|
30
|
+
|
|
31
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
32
|
+
|
|
33
|
+
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); }
|
|
34
|
+
|
|
35
|
+
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; }
|
|
36
|
+
|
|
37
|
+
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; }
|
|
38
|
+
|
|
39
|
+
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; }
|
|
40
|
+
|
|
41
|
+
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; }
|
|
42
|
+
|
|
43
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
44
|
+
|
|
45
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
46
|
+
|
|
47
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
48
|
+
|
|
49
|
+
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."); }
|
|
50
|
+
|
|
51
|
+
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); }
|
|
52
|
+
|
|
53
|
+
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; }
|
|
54
|
+
|
|
55
|
+
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; }
|
|
56
|
+
|
|
57
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
58
|
+
|
|
59
|
+
var preCls = 'titaui-ork-guide';
|
|
60
|
+
|
|
61
|
+
var OkrGuide = function OkrGuide(props) {
|
|
62
|
+
var visible = props.visible,
|
|
63
|
+
handlerOnclickCreatOkr = props.handlerOnclickCreatOkr;
|
|
64
|
+
|
|
65
|
+
var _useState = (0, _react.useState)(_constant.cycleList),
|
|
66
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
67
|
+
cycleListData = _useState2[0],
|
|
68
|
+
setCycleListData = _useState2[1];
|
|
69
|
+
|
|
70
|
+
var _useState3 = (0, _react.useState)(0),
|
|
71
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
72
|
+
isOpenCount = _useState4[0],
|
|
73
|
+
setIsOpenCount = _useState4[1];
|
|
74
|
+
|
|
75
|
+
var _useState5 = (0, _react.useState)({
|
|
76
|
+
isOpenCustom: false,
|
|
77
|
+
isOpenMonth: false,
|
|
78
|
+
isOpenQuarter: true,
|
|
79
|
+
isOpenYear: true,
|
|
80
|
+
isOpenBimonthly: false,
|
|
81
|
+
isOpenHalfYear: false
|
|
82
|
+
}),
|
|
83
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
84
|
+
setting = _useState6[0],
|
|
85
|
+
changeSetting = _useState6[1];
|
|
86
|
+
|
|
87
|
+
var getIsOpenById = {
|
|
88
|
+
1: {
|
|
89
|
+
isOpen: setting.isOpenYear
|
|
90
|
+
},
|
|
91
|
+
2: {
|
|
92
|
+
isOpen: setting.isOpenQuarter
|
|
93
|
+
},
|
|
94
|
+
3: {
|
|
95
|
+
isOpen: setting.isOpenMonth
|
|
96
|
+
},
|
|
97
|
+
4: {
|
|
98
|
+
isOpen: setting.isOpenHalfYear
|
|
99
|
+
},
|
|
100
|
+
5: {
|
|
101
|
+
isOpen: setting.isOpenBimonthly
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
(0, _react.useEffect)(function () {
|
|
105
|
+
var keys = ['isOpenMonth', 'isOpenQuarter', 'isOpenYear', 'isOpenBimonthly', 'isOpenHalfYear'];
|
|
106
|
+
var count = 0;
|
|
107
|
+
keys.forEach(function (k) {
|
|
108
|
+
if (setting[k]) count++;
|
|
109
|
+
});
|
|
110
|
+
setIsOpenCount(count);
|
|
111
|
+
}, [setting]);
|
|
112
|
+
(0, _react.useEffect)(function () {
|
|
113
|
+
(0, _requestApi.getCycleSetting)().then(function (res) {
|
|
114
|
+
var hasSetting = res.hasSetting,
|
|
115
|
+
onthers = _objectWithoutProperties(res, _excluded);
|
|
116
|
+
|
|
117
|
+
changeSetting(onthers);
|
|
118
|
+
console.log(hasSetting, 'hasSetting');
|
|
119
|
+
});
|
|
120
|
+
}, []);
|
|
121
|
+
|
|
122
|
+
var handlerOnchangeSwitch = function handlerOnchangeSwitch(e, id) {
|
|
123
|
+
var isOpen = e;
|
|
124
|
+
|
|
125
|
+
if (isOpen) {
|
|
126
|
+
if (isOpenCount > 2) {
|
|
127
|
+
_toast["default"].Warning('周期最多选择 3 项');
|
|
128
|
+
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
} else {
|
|
132
|
+
if (isOpenCount < 2) {
|
|
133
|
+
_toast["default"].Warning('周期至少选择 1 项');
|
|
134
|
+
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
switch (id) {
|
|
140
|
+
case 1:
|
|
141
|
+
changeSetting(_objectSpread(_objectSpread({}, setting), {}, {
|
|
142
|
+
isOpenYear: isOpen
|
|
143
|
+
}));
|
|
144
|
+
break;
|
|
145
|
+
|
|
146
|
+
case 2:
|
|
147
|
+
changeSetting(_objectSpread(_objectSpread({}, setting), {}, {
|
|
148
|
+
isOpenQuarter: isOpen
|
|
149
|
+
}));
|
|
150
|
+
break;
|
|
151
|
+
|
|
152
|
+
case 3:
|
|
153
|
+
changeSetting(_objectSpread(_objectSpread({}, setting), {}, {
|
|
154
|
+
isOpenMonth: isOpen
|
|
155
|
+
}));
|
|
156
|
+
break;
|
|
157
|
+
|
|
158
|
+
case 4:
|
|
159
|
+
changeSetting(_objectSpread(_objectSpread({}, setting), {}, {
|
|
160
|
+
isOpenHalfYear: isOpen
|
|
161
|
+
}));
|
|
162
|
+
break;
|
|
163
|
+
|
|
164
|
+
case 5:
|
|
165
|
+
changeSetting(_objectSpread(_objectSpread({}, setting), {}, {
|
|
166
|
+
isOpenBimonthly: isOpen
|
|
167
|
+
}));
|
|
168
|
+
break;
|
|
169
|
+
|
|
170
|
+
default:
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
var handleSubmit = function handleSubmit() {
|
|
176
|
+
console.log(isOpenCount, 'count');
|
|
177
|
+
|
|
178
|
+
if (isOpenCount > 3) {
|
|
179
|
+
_toast["default"].Warning('周期最多选择 3 项');
|
|
180
|
+
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
var isOpenCustom = setting.isOpenCustom,
|
|
185
|
+
others = _objectWithoutProperties(setting, _excluded2);
|
|
186
|
+
|
|
187
|
+
(0, _requestApi.addCycleSetting)(_objectSpread({}, others)).then(function () {
|
|
188
|
+
console.log('then');
|
|
189
|
+
handlerOnclickCreatOkr();
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
194
|
+
extraClass: preCls,
|
|
195
|
+
wrapClassName: "".concat(preCls, "__wrap"),
|
|
196
|
+
visible: visible,
|
|
197
|
+
mask: false,
|
|
198
|
+
noHeadLine: true,
|
|
199
|
+
noFooterLine: true,
|
|
200
|
+
noCloseIcon: true,
|
|
201
|
+
noFooter: true,
|
|
202
|
+
zIndex: 2001
|
|
203
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
204
|
+
className: "".concat(preCls, "__bg")
|
|
205
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
206
|
+
className: "".concat(preCls, "__container")
|
|
207
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
208
|
+
className: "".concat(preCls, "__container__top")
|
|
209
|
+
}, "\u2728\u6B22\u8FCE\u4F7F\u7528 Tita OKR"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
210
|
+
className: "".concat(preCls, "__container__card")
|
|
211
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
212
|
+
className: "".concat(preCls, "__container__card__left")
|
|
213
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
214
|
+
src: _leftImg["default"]
|
|
215
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
216
|
+
className: "".concat(preCls, "__container__card__right")
|
|
217
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
218
|
+
className: "".concat(preCls, "__container__card__right__title")
|
|
219
|
+
}, "\uD83D\uDC4B Hi\uFF5E \u8BF7\u5148\u8BBE\u7F6E\u4E00\u4E0B\u76EE\u6807\u5468\u671F"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
220
|
+
className: "".concat(preCls, "__container__card__right__desc")
|
|
221
|
+
}, "\u4F01\u4E1A\u6B65\u8C03\u4E00\u81F4\uFF0C\u7EDF\u4E00\u884C\u52A8\u63A8\u8FDB OKR\uFF0C\u6210\u529F\u7387\u5C06\u63D0\u5347 80%"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
222
|
+
className: "".concat(preCls, "__container__card__right__checkbox")
|
|
223
|
+
}, cycleListData.map(function (item) {
|
|
224
|
+
return /*#__PURE__*/_react["default"].createElement(_react.Fragment, {
|
|
225
|
+
key: item.id
|
|
226
|
+
}, /*#__PURE__*/_react["default"].createElement(_switch["default"], {
|
|
227
|
+
onChange: function onChange(e) {
|
|
228
|
+
return handlerOnchangeSwitch(e, item.id);
|
|
229
|
+
},
|
|
230
|
+
label: item.name,
|
|
231
|
+
checked: getIsOpenById[item.id].isOpen
|
|
232
|
+
}));
|
|
233
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
234
|
+
className: "".concat(preCls, "__container__card__right__btn"),
|
|
235
|
+
onClick: handleSubmit
|
|
236
|
+
}, /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
237
|
+
type: 'primary'
|
|
238
|
+
}, "\u5B8C\u6210\u8BBE\u7F6E\uFF0C\u521B\u5EFA OKR")))))));
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
var _default = OkrGuide;
|
|
242
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getCycleSetting = exports.addWorkManageSetting = exports.addListWorkManage = exports.addCycleSetting = void 0;
|
|
7
|
+
|
|
8
|
+
var _request = _interopRequireDefault(require("../../utils/request"));
|
|
9
|
+
|
|
10
|
+
var _toast = _interopRequireDefault(require("../toast"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
;
|
|
15
|
+
var rget = _request["default"].rget,
|
|
16
|
+
rpost = _request["default"].rpost;
|
|
17
|
+
|
|
18
|
+
var addWorkManageSetting = function addWorkManageSetting(data) {
|
|
19
|
+
var url = "WorkManageSetting/Add";
|
|
20
|
+
return rpost('v1')(url, data).then(function (res) {
|
|
21
|
+
if (!!res.Code) {
|
|
22
|
+
return res.Data;
|
|
23
|
+
} else {
|
|
24
|
+
_toast["default"].Error(res.Message || '操作失败,请联系客服');
|
|
25
|
+
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
})["catch"](function (err) {
|
|
29
|
+
_toast["default"].Error('操作失败,请联系客服');
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.addWorkManageSetting = addWorkManageSetting;
|
|
34
|
+
|
|
35
|
+
var addListWorkManage = function addListWorkManage(data) {
|
|
36
|
+
return rpost('v1')('WorkManageSetting/AddList', data).then(function (res) {
|
|
37
|
+
return res.Data;
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
exports.addListWorkManage = addListWorkManage;
|
|
42
|
+
|
|
43
|
+
var addCycleSetting = function addCycleSetting(data) {
|
|
44
|
+
return rpost('v1')('okr/addCycleSetting', data).then(function (res) {
|
|
45
|
+
return res.Data;
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.addCycleSetting = addCycleSetting;
|
|
50
|
+
|
|
51
|
+
var getCycleSetting = function getCycleSetting() {
|
|
52
|
+
return rget('v1')('okr/cycleSetting').then(function (res) {
|
|
53
|
+
return res.Data;
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
exports.getCycleSetting = getCycleSetting;
|
|
@@ -605,7 +605,7 @@ var ReviewBody = /*#__PURE__*/function (_PureComponent) {
|
|
|
605
605
|
data = _this$state.data,
|
|
606
606
|
popContainer = _this$state.popContainer;
|
|
607
607
|
var maxHeight = 595;
|
|
608
|
-
screenHeight <= 768 ? maxHeight = 300 : maxHeight =
|
|
608
|
+
screenHeight <= 768 ? maxHeight = 300 : maxHeight = 500;
|
|
609
609
|
return /*#__PURE__*/_react["default"].createElement(_style.ReviewBodyContainer, null, /*#__PURE__*/_react["default"].createElement(_style.ReviewBodyScroll, {
|
|
610
610
|
maxHeight: maxHeight
|
|
611
611
|
}, /*#__PURE__*/_react["default"].createElement(_style.ReviewTarget, null, /*#__PURE__*/_react["default"].createElement(_style.ReviewCatalog, null, (0, _getLocale.getLocale)("OKR_MyO_KRP_Pop_Reviewobject")), /*#__PURE__*/_react["default"].createElement(_style.ReviewContent, {
|
|
@@ -101,14 +101,14 @@ function toggleMark(markType, attrs) {
|
|
|
101
101
|
if (has) {
|
|
102
102
|
tr.removeMark(_$from.pos, _$to.pos, markType);
|
|
103
103
|
} else {
|
|
104
|
-
var
|
|
104
|
+
var _$exec, _$exec2;
|
|
105
105
|
|
|
106
106
|
var from = _$from.pos,
|
|
107
107
|
to = _$to.pos,
|
|
108
108
|
start = _$from.nodeAfter,
|
|
109
109
|
end = _$to.nodeBefore;
|
|
110
|
-
var spaceStart = start && start.isText ? ((
|
|
111
|
-
var spaceEnd = end && end.isText ? ((
|
|
110
|
+
var spaceStart = start && start.isText ? ((_$exec = /^\s*/.exec(start.text)) === null || _$exec === void 0 ? void 0 : _$exec[0].length) || 0 : 0;
|
|
111
|
+
var spaceEnd = end && end.isText ? ((_$exec2 = /\s*$/.exec(end.text)) === null || _$exec2 === void 0 ? void 0 : _$exec2[0].length) || 0 : 0;
|
|
112
112
|
|
|
113
113
|
if (from + spaceStart < to) {
|
|
114
114
|
from += spaceStart;
|
|
@@ -40,87 +40,43 @@ var RichEditorAt = function RichEditorAt(_ref) {
|
|
|
40
40
|
users = _ref$users === void 0 ? [] : _ref$users,
|
|
41
41
|
onChange = _ref.onChange,
|
|
42
42
|
_ref$text = _ref.text,
|
|
43
|
-
text = _ref$text === void 0 ? "" : _ref$text
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
_ref$groups = _ref.groups,
|
|
47
|
-
groups = _ref$groups === void 0 ? [] : _ref$groups,
|
|
48
|
-
_ref$isOnlySelectUser = _ref.isOnlySelectUser,
|
|
49
|
-
isOnlySelectUser = _ref$isOnlySelectUser === void 0 ? true : _ref$isOnlySelectUser;
|
|
50
|
-
|
|
51
|
-
var _useState = (0, _react.useState)(),
|
|
43
|
+
text = _ref$text === void 0 ? "" : _ref$text;
|
|
44
|
+
|
|
45
|
+
var _useState = (0, _react.useState)(users),
|
|
52
46
|
_useState2 = _slicedToArray(_useState, 2),
|
|
53
|
-
|
|
47
|
+
seleceUsers = _useState2[0],
|
|
54
48
|
setSelectUsers = _useState2[1];
|
|
55
49
|
|
|
56
|
-
var _useState3 = (0, _react.useState)(),
|
|
57
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
58
|
-
selectDepartments = _useState4[0],
|
|
59
|
-
setSelectDepartments = _useState4[1];
|
|
60
|
-
|
|
61
|
-
var _useState5 = (0, _react.useState)(),
|
|
62
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
63
|
-
selectGroups = _useState6[0],
|
|
64
|
-
setSelectGroups = _useState6[1];
|
|
65
|
-
|
|
66
50
|
var handleSelectUser = function handleSelectUser(_ref2) {
|
|
67
|
-
var users = _ref2.users
|
|
68
|
-
departments = _ref2.departments,
|
|
69
|
-
groups = _ref2.groups;
|
|
51
|
+
var users = _ref2.users;
|
|
70
52
|
setSelectUsers(users);
|
|
71
|
-
setSelectDepartments(departments);
|
|
72
|
-
setSelectGroups(groups);
|
|
73
53
|
|
|
74
54
|
if (onChange) {
|
|
75
|
-
onChange(users
|
|
55
|
+
onChange(users);
|
|
76
56
|
}
|
|
77
57
|
};
|
|
78
58
|
|
|
79
59
|
var handleDeleteUser = function handleDeleteUser(info) {
|
|
80
|
-
var newData =
|
|
60
|
+
var newData = seleceUsers.filter(function (user) {
|
|
81
61
|
return user.userId !== info.userId;
|
|
82
62
|
});
|
|
83
63
|
setSelectUsers(newData);
|
|
84
64
|
|
|
85
65
|
if (onChange) {
|
|
86
|
-
onChange(newData
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
var handleDeleteDepart = function handleDeleteDepart(info) {
|
|
91
|
-
var newData = selectDepartments === null || selectDepartments === void 0 ? void 0 : selectDepartments.filter(function (item) {
|
|
92
|
-
return item.id !== info.id;
|
|
93
|
-
});
|
|
94
|
-
setSelectDepartments(newData);
|
|
95
|
-
|
|
96
|
-
if (onChange) {
|
|
97
|
-
onChange(selectUsers, newData, selectGroups);
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
var handleDeleteGroup = function handleDeleteGroup(info) {
|
|
102
|
-
var newData = selectGroups === null || selectGroups === void 0 ? void 0 : selectGroups.filter(function (item) {
|
|
103
|
-
return item.id !== info.id;
|
|
104
|
-
});
|
|
105
|
-
setSelectGroups(newData);
|
|
106
|
-
|
|
107
|
-
if (onChange) {
|
|
108
|
-
onChange(selectUsers, selectDepartments, newData);
|
|
66
|
+
onChange(newData);
|
|
109
67
|
}
|
|
110
68
|
};
|
|
111
69
|
|
|
112
70
|
(0, _react.useEffect)(function () {
|
|
113
71
|
setSelectUsers(users);
|
|
114
|
-
|
|
115
|
-
setSelectGroups(groups);
|
|
116
|
-
}, [users, departments, groups]);
|
|
72
|
+
}, [users]);
|
|
117
73
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
118
74
|
className: prefix
|
|
119
75
|
}, text && /*#__PURE__*/_react["default"].createElement("div", {
|
|
120
76
|
className: "".concat(prefix, "__title")
|
|
121
77
|
}, text), /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
78
|
className: "".concat(prefix, "__content")
|
|
123
|
-
},
|
|
79
|
+
}, users.map(function (item) {
|
|
124
80
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
125
81
|
className: "".concat(prefix, "__content-user")
|
|
126
82
|
}, /*#__PURE__*/_react["default"].createElement(_components["default"], {
|
|
@@ -134,44 +90,16 @@ var RichEditorAt = function RichEditorAt(_ref) {
|
|
|
134
90
|
},
|
|
135
91
|
color: item.avatar.color
|
|
136
92
|
}));
|
|
137
|
-
}), selectDepartments && selectDepartments.map(function (item) {
|
|
138
|
-
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
139
|
-
className: "".concat(prefix, "__content-user")
|
|
140
|
-
}, /*#__PURE__*/_react["default"].createElement(_components["default"], {
|
|
141
|
-
showNameTips: true,
|
|
142
|
-
canDelUser: true,
|
|
143
|
-
onDelUser: function onDelUser() {
|
|
144
|
-
return handleDeleteDepart(item);
|
|
145
|
-
},
|
|
146
|
-
color: '#3296fa',
|
|
147
|
-
name: item.name
|
|
148
|
-
}));
|
|
149
|
-
}), selectGroups && selectGroups.map(function (item) {
|
|
150
|
-
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
151
|
-
className: "".concat(prefix, "__content-user")
|
|
152
|
-
}, /*#__PURE__*/_react["default"].createElement(_components["default"], {
|
|
153
|
-
showNameTips: true,
|
|
154
|
-
canDelUser: true,
|
|
155
|
-
onDelUser: function onDelUser() {
|
|
156
|
-
return handleDeleteGroup(item);
|
|
157
|
-
},
|
|
158
|
-
color: 'rgba(90, 216, 166)',
|
|
159
|
-
name: item.name
|
|
160
|
-
}));
|
|
161
93
|
}), /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
|
|
162
94
|
multiple: true,
|
|
163
95
|
position: "right",
|
|
164
96
|
onOk: handleSelectUser,
|
|
165
|
-
disabledDepartSelect:
|
|
97
|
+
disabledDepartSelect: true,
|
|
166
98
|
panes: {
|
|
167
|
-
depart: true
|
|
168
|
-
group: !isOnlySelectUser,
|
|
169
|
-
subordinate: !isOnlySelectUser
|
|
99
|
+
depart: true
|
|
170
100
|
},
|
|
171
101
|
selectNodes: {
|
|
172
|
-
users:
|
|
173
|
-
departments: selectDepartments,
|
|
174
|
-
groups: selectGroups
|
|
102
|
+
users: seleceUsers
|
|
175
103
|
},
|
|
176
104
|
trigger: /*#__PURE__*/_react["default"].createElement("div", {
|
|
177
105
|
className: "".concat(prefix, "__import")
|