@titaui/pc 1.12.17-beta.5 → 1.12.17-beta.8

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.
@@ -106,11 +106,7 @@ var RemindDialog = function RemindDialog(props) {
106
106
  var params = {
107
107
  objId: feedId,
108
108
  objType: "8",
109
- // tenantId,
110
- // userId,
111
109
  toUserId: toUserId,
112
- // evaluateType,
113
- // evaluateValue,
114
110
  remark: remark,
115
111
  evaluateInfo: [{
116
112
  evaluateType: evaluateType,
@@ -139,7 +135,7 @@ var RemindDialog = function RemindDialog(props) {
139
135
  if ((res === null || res === void 0 ? void 0 : (_res$Data2 = res.Data) === null || _res$Data2 === void 0 ? void 0 : _res$Data2.type) === 1) {
140
136
  var _res$Data3;
141
137
 
142
- setRatingScore((res === null || res === void 0 ? void 0 : (_res$Data3 = res.Data) === null || _res$Data3 === void 0 ? void 0 : _res$Data3.value) / 2);
138
+ setRatingScore(Number(res === null || res === void 0 ? void 0 : (_res$Data3 = res.Data) === null || _res$Data3 === void 0 ? void 0 : _res$Data3.value) / 2);
143
139
  } else if ((res === null || res === void 0 ? void 0 : (_res$Data4 = res.Data) === null || _res$Data4 === void 0 ? void 0 : _res$Data4.type) === 2) {
144
140
  var _res$Data5;
145
141
 
@@ -69,14 +69,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
69
69
 
70
70
  var getEReportType = function getEReportType(type) {
71
71
  var reportTextMap = {
72
- 8: (0, _getLocale.getLocale)("Rep_Tab_Dailynewspaper"),
73
- 26: (0, _getLocale.getLocale)("Rep_Tab_Weeklynewspaper"),
74
- 27: (0, _getLocale.getLocale)("Rep_Tab_MonthlyReport")
72
+ 8: (0, _getLocale.getLocale)('Rep_Tab_Dailynewspaper'),
73
+ 26: (0, _getLocale.getLocale)('Rep_Tab_Weeklynewspaper'),
74
+ 27: (0, _getLocale.getLocale)('Rep_Tab_MonthlyReport')
75
75
  };
76
76
  return reportTextMap[type];
77
77
  };
78
78
 
79
- var prefix = "titaui-dynamic-new-report-item";
79
+ var prefix = 'titaui-dynamic-new-report-item';
80
80
 
81
81
  var DynamicReply = function DynamicReply(_ref) {
82
82
  var data = _ref.data,
@@ -93,7 +93,7 @@ var DynamicReply = function DynamicReply(_ref) {
93
93
  evaluates = data.evaluates;
94
94
  var files = (0, _util.formatAttachments)(attachments);
95
95
 
96
- var _useState = (0, _react.useState)(""),
96
+ var _useState = (0, _react.useState)(''),
97
97
  _useState2 = _slicedToArray(_useState, 2),
98
98
  mindImg = _useState2[0],
99
99
  setMindImg = _useState2[1];
@@ -140,9 +140,9 @@ var DynamicReply = function DynamicReply(_ref) {
140
140
  }, []);
141
141
  var renderDesc = (0, _react.useMemo)(function () {
142
142
  var reportTextMap = {
143
- 8: (0, _getLocale.getLocale)("Rep_Tab_Mys_Dailynewsp"),
144
- 26: (0, _getLocale.getLocale)("Rep_Tab_Mys_sweeklyReport"),
145
- 27: (0, _getLocale.getLocale)("Rep_Tab_Sub_monthlyeport")
143
+ 8: (0, _getLocale.getLocale)('Rep_Tab_Mys_Dailynewsp'),
144
+ 26: (0, _getLocale.getLocale)('Rep_Tab_Mys_sweeklyReport'),
145
+ 27: (0, _getLocale.getLocale)('Rep_Tab_Sub_monthlyeport')
146
146
  };
147
147
  return /*#__PURE__*/_react["default"].createElement("span", {
148
148
  className: "".concat(prefix, "__operate-desc")
@@ -160,28 +160,31 @@ var DynamicReply = function DynamicReply(_ref) {
160
160
  }, [data, searchKeyWord]);
161
161
  (0, _react.useEffect)(function () {
162
162
  if (dailyContent) {
163
- var _dailyContent$filter$, _dailyContent$filter$2, _dailyContent$filter$3, _dailyContent$filter$4, _mindData$, _mindData$2;
163
+ var _dailyContent$filter$, _dailyContent$filter$2, _dailyContent$filter$3, _dailyContent$filter$4, _dailyContent$filter$5, _mindData$, _mindData$2;
164
164
 
165
165
  var mindData = dailyContent.filter(function (item) {
166
- return (item === null || item === void 0 ? void 0 : item.ContentType) === 1;
166
+ return (item === null || item === void 0 ? void 0 : item.contentType) === 1;
167
167
  });
168
- setOkrtableData(((_dailyContent$filter$ = dailyContent.filter(function (item) {
169
- return (item === null || item === void 0 ? void 0 : item.ContentType) === 2;
170
- })[0]) === null || _dailyContent$filter$ === void 0 ? void 0 : _dailyContent$filter$.content) || null);
171
- setOkrtableTitle((_dailyContent$filter$2 = dailyContent.filter(function (item) {
172
- return (item === null || item === void 0 ? void 0 : item.ContentType) === 2;
173
- })[0]) === null || _dailyContent$filter$2 === void 0 ? void 0 : _dailyContent$filter$2.title);
174
- setTasktableData(((_dailyContent$filter$3 = dailyContent.filter(function (item) {
175
- return (item === null || item === void 0 ? void 0 : item.ContentType) === 3;
176
- })[0]) === null || _dailyContent$filter$3 === void 0 ? void 0 : _dailyContent$filter$3.content) || null);
177
- setTasktableTitle((_dailyContent$filter$4 = dailyContent.filter(function (item) {
178
- return (item === null || item === void 0 ? void 0 : item.ContentType) === 3;
179
- })[0]) === null || _dailyContent$filter$4 === void 0 ? void 0 : _dailyContent$filter$4.title);
168
+ console.log((_dailyContent$filter$ = dailyContent.filter(function (item) {
169
+ return (item === null || item === void 0 ? void 0 : item.contentType) === 2;
170
+ })[0]) === null || _dailyContent$filter$ === void 0 ? void 0 : _dailyContent$filter$.content);
171
+ setOkrtableData(((_dailyContent$filter$2 = dailyContent.filter(function (item) {
172
+ return (item === null || item === void 0 ? void 0 : item.contentType) === 2;
173
+ })[0]) === null || _dailyContent$filter$2 === void 0 ? void 0 : _dailyContent$filter$2.content) || null);
174
+ setOkrtableTitle((_dailyContent$filter$3 = dailyContent.filter(function (item) {
175
+ return (item === null || item === void 0 ? void 0 : item.contentType) === 2;
176
+ })[0]) === null || _dailyContent$filter$3 === void 0 ? void 0 : _dailyContent$filter$3.title);
177
+ setTasktableData(((_dailyContent$filter$4 = dailyContent.filter(function (item) {
178
+ return (item === null || item === void 0 ? void 0 : item.contentType) === 3;
179
+ })[0]) === null || _dailyContent$filter$4 === void 0 ? void 0 : _dailyContent$filter$4.content) || null);
180
+ setTasktableTitle((_dailyContent$filter$5 = dailyContent.filter(function (item) {
181
+ return (item === null || item === void 0 ? void 0 : item.contentType) === 3;
182
+ })[0]) === null || _dailyContent$filter$5 === void 0 ? void 0 : _dailyContent$filter$5.title);
180
183
  setRichTextData(dailyContent.filter(function (item) {
181
- return (item === null || item === void 0 ? void 0 : item.ContentType) === _constant.dailyContentType.richText;
184
+ return (item === null || item === void 0 ? void 0 : item.contentType) === _constant.dailyContentType.richText;
182
185
  }));
183
186
 
184
- if (typeof ((_mindData$ = mindData[0]) === null || _mindData$ === void 0 ? void 0 : _mindData$.content) === "string" && ((_mindData$2 = mindData[0]) === null || _mindData$2 === void 0 ? void 0 : _mindData$2.content) !== "") {
187
+ if (typeof ((_mindData$ = mindData[0]) === null || _mindData$ === void 0 ? void 0 : _mindData$.content) === 'string' && ((_mindData$2 = mindData[0]) === null || _mindData$2 === void 0 ? void 0 : _mindData$2.content) !== '') {
185
188
  setMindImg(_constant.Motion.filter(function (item) {
186
189
  return item.id === JSON.parse(mindData[0].content).SelectedValues[0];
187
190
  })[0].img);
@@ -212,14 +215,14 @@ var DynamicReply = function DynamicReply(_ref) {
212
215
  src: mindImg,
213
216
  className: "".concat(prefix, "__content-mind"),
214
217
  alt: ""
215
- })), richTextData && richTextData.map(function (item) {
216
- return /*#__PURE__*/_react["default"].createElement("div", {
218
+ })), (richTextData === null || richTextData === void 0 ? void 0 : richTextData.length) !== 0 && (richTextData === null || richTextData === void 0 ? void 0 : richTextData.map(function (item) {
219
+ return item.richContent !== '' && typeof item.richContent === 'string' && /*#__PURE__*/_react["default"].createElement("div", {
217
220
  className: "".concat(prefix, "__work")
218
- }, item.title, item.content && /*#__PURE__*/_react["default"].createElement(_richEditor["default"].Editor, {
219
- defaultState: JSON.parse(item.content).RichText,
221
+ }, item.title, /*#__PURE__*/_react["default"].createElement(_richEditor["default"].Editor, {
222
+ defaultState: JSON.parse(item.richContent),
220
223
  editable: false
221
224
  }));
222
- }), okrTableData && /*#__PURE__*/_react["default"].createElement(_okrProgress["default"], {
225
+ })), okrTableData && /*#__PURE__*/_react["default"].createElement(_okrProgress["default"], {
223
226
  data: okrTableData,
224
227
  title: okrTableTitle
225
228
  }), taskTableData && /*#__PURE__*/_react["default"].createElement(_taskProgress["default"], {
@@ -3,9 +3,7 @@
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 = exports.getCycleDate = void 0;
6
+ exports.lableTypeMap = exports.isOpenWorkManage = exports.isOpenOkrManage = exports.isOpenLabel = exports.getCycleDate = exports.formatDateStr = void 0;
9
7
  exports.momentDate = momentDate;
10
8
  exports.workStatus = exports.timeFormat = exports.preCls = exports.okrStatus = void 0;
11
9
 
@@ -13,8 +11,6 @@ var _bsGlobal = require("../../utils/bs-global");
13
11
 
14
12
  var _getLocale = require("../../utils/getLocale");
15
13
 
16
- var _planDataJson = require("../../utils/planDataJson");
17
-
18
14
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
19
15
 
20
16
  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."); }
@@ -139,57 +135,6 @@ function momentDate(date) {
139
135
  return date.replace(reg, '/').slice(0, -1);
140
136
  }
141
137
 
142
- function formatPeriodPlanData(period) {
143
- var planData; // 获取选取年份的 dataJSON
144
-
145
- var yearGroup = (0, _planDataJson.PlanDataJson)().find(function (p) {
146
- return p.GroupName == period.annualNum + '';
147
- }); // 年份下的 ‘年/季’ data
148
-
149
- var seasonData = yearGroup ? yearGroup.PlanTableListModels.find(function (item) {
150
- return item.TagName == (0, _getLocale.getLocale)('Tasks_Menu_Yearseason');
151
- }) : null;
152
-
153
- switch (period.cycleType) {
154
- // case '-1': // 全部周期
155
- // break;
156
- case '0':
157
- planData = {
158
- StartDate: period.startDate,
159
- EndDate: period.endDate
160
- };
161
- break;
162
-
163
- case '1':
164
- // 年度
165
- planData = seasonData ? seasonData.PlanTableModels[0] : null;
166
- break;
167
-
168
- case '2':
169
- planData = seasonData ? seasonData.PlanTableModels[period.yqmNum] : null; // 季度
170
-
171
- break;
172
-
173
- case '3':
174
- // @ts-ignore
175
- var monthData = yearGroup ? yearGroup.PlanTableListModels.find(function (p) {
176
- return p.TagName == period.yqmNum + '月';
177
- }) : null;
178
- planData = monthData ? monthData.PlanTableModels[0] : null;
179
- break;
180
-
181
- default:
182
- break;
183
- }
184
-
185
- return {
186
- endDate: planData ? period.cycleType == '0' ? planData.EndDate : momentDate(planData.EndDate || '') : '',
187
- planTableId: planData && planData.PlanTableId,
188
- planTableType: planData && planData.PlanTableType,
189
- startDate: planData ? period.cycleType == '0' ? planData.StartDate : momentDate(planData.StartDate || '') : ''
190
- };
191
- }
192
-
193
138
  var getCycleDate = function getCycleDate(date) {
194
139
  if (date) {
195
140
  var _date$split = date.split('/'),
@@ -15,6 +15,8 @@ var _getLocale = require("../../../utils/getLocale");
15
15
 
16
16
  var _okrTree = _interopRequireDefault(require("../tree/okr-tree"));
17
17
 
18
+ var _toast = _interopRequireDefault(require("../../toast"));
19
+
18
20
  require("./index.css");
19
21
 
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -70,6 +72,12 @@ function ImportOKRModal(props) {
70
72
  var selectedRef = (0, _react.useRef)(selected); // 解决闭包
71
73
 
72
74
  var onOkHandler = function onOkHandler() {
75
+ if (selected.length < 1) {
76
+ _toast["default"].Error((0, _getLocale.getLocale)('OKR_MyO_Selectaleastone'));
77
+
78
+ return;
79
+ }
80
+
73
81
  onOk && onOk(selected);
74
82
  setSelected([]);
75
83
  onCancelHandler();
@@ -25,6 +25,8 @@ var _loading = _interopRequireDefault(require("../image/loading.gif"));
25
25
 
26
26
  var _getLocale = require("../../../utils/getLocale");
27
27
 
28
+ var _toast = _interopRequireDefault(require("../../toast"));
29
+
28
30
  require("./index.css");
29
31
 
30
32
  var _excluded = ["isVisible", "multiple", "onOk", "onCancel", "isRelationOther", "onRelateSuccess", "lastSelected", "time"];
@@ -169,6 +171,12 @@ function ImportTaskModal(props) {
169
171
  };
170
172
 
171
173
  var onOkHandler = function onOkHandler() {
174
+ if (selected.length < 1) {
175
+ _toast["default"].Error((0, _getLocale.getLocale)('OKR_MyO_Selectaleastone'));
176
+
177
+ return;
178
+ }
179
+
172
180
  onCancelHandler();
173
181
  onOk && onOk(selected);
174
182
  setSelected([]);
@@ -77,13 +77,11 @@ function SearchForm(props) {
77
77
 
78
78
  var dilagRef = (0, _react.useRef)(document.createElement('div'));
79
79
  (0, _react.useEffect)(function () {
80
- if (!cycle) return;
81
- var planCycle = (0, _helper.formatPeriodPlanData)(cycle);
82
80
  onChange(_objectSpread({
83
81
  status: status,
84
82
  keyWords: keyWords,
85
83
  relation: relation
86
- }, planCycle));
84
+ }, cycle));
87
85
  }, [status, keyWords, cycle, relation]);
88
86
  (0, _react.useEffect)(function () {
89
87
  if (time) {
@@ -9,7 +9,7 @@
9
9
  display: inline-block;
10
10
  width: 60px;
11
11
  height: 60px;
12
- border-radius: 8px;
12
+ border-radius: 30px;
13
13
  overflow: hidden;
14
14
  position: relative;
15
15
  }
@@ -22,7 +22,7 @@
22
22
  display: flex;
23
23
  align-items: center;
24
24
  justify-content: center;
25
- font-size: 16px;
25
+ font-size: 14px;
26
26
  font-weight: 400;
27
27
  color: #ffffff;
28
28
  line-height: 24px;
@@ -61,6 +61,7 @@
61
61
  font-size: 14px;
62
62
  color: #6f7886;
63
63
  line-height: 20px;
64
- margin-left: 4px;
65
64
  text-align: center;
65
+ margin: 0 auto;
66
+ margin-top: 6px;
66
67
  }
@@ -12,13 +12,13 @@
12
12
  }
13
13
 
14
14
  .titaui-rich-editor-at__content-user {
15
- margin-right: 10px;
15
+ margin-right: 20px;
16
16
  }
17
17
 
18
18
  .titaui-rich-editor-at__import {
19
19
  width: 60px;
20
20
  height: 60px;
21
- border-radius: 8px;
21
+ border-radius: 30px;
22
22
  border: 1px solid #e9ecf0;
23
23
  display: flex;
24
24
  align-items: center;
@@ -27,7 +27,7 @@
27
27
 
28
28
  .titaui-rich-editor-at__import-icon {
29
29
  font-size: 24px;
30
- color: #BFC7D5;
30
+ color: #bfc7d5;
31
31
  }
32
32
 
33
33
  .titaui-rich-editor-at__import:hover {
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = exports.color = void 0;
7
+ var color = [{
8
+ bg: "#2879FF",
9
+ contentBg: "rgba(40, 121, 255, 0.2)"
10
+ }, {
11
+ bg: "#5AD8A6",
12
+ contentBg: "rgba(90, 216, 166, 0.2)"
13
+ }, {
14
+ bg: "#F6BD16",
15
+ contentBg: "rgba(246, 189, 22, 0.2)"
16
+ }];
17
+ exports.color = color;
18
+ var _default = {
19
+ color: color
20
+ };
21
+ exports["default"] = _default;
@@ -17,7 +17,7 @@ var _requestApi = require("./request-api");
17
17
 
18
18
  require("./index.css");
19
19
 
20
- var _utils = require("./utils");
20
+ var _constants = require("./constants");
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
23
 
@@ -121,8 +121,7 @@ var WriteSummaryModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
121
121
  maskClosable: false
122
122
  }, /*#__PURE__*/_react["default"].createElement("div", {
123
123
  className: "".concat(prefix)
124
- }, modalList.map(function (item) {
125
- var randomColor = (0, _utils.getRandomColor)();
124
+ }, modalList.map(function (item, index) {
126
125
  return /*#__PURE__*/_react["default"].createElement("div", {
127
126
  className: "".concat(prefix, "__content-item"),
128
127
  onClick: function onClick() {
@@ -133,7 +132,7 @@ var WriteSummaryModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
133
132
  }, /*#__PURE__*/_react["default"].createElement("div", {
134
133
  className: "".concat(prefix, "__content-item-title-avatar"),
135
134
  style: {
136
- background: randomColor.bg
135
+ background: _constants.color[index].bg
137
136
  }
138
137
  }, item.name[0]), /*#__PURE__*/_react["default"].createElement("span", {
139
138
  className: "".concat(prefix, "__content-item-title-name")
@@ -144,21 +143,21 @@ var WriteSummaryModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
144
143
  }, (0, _getLocale.getLocale)("Rep_Tab_Mys_Workprogre")), /*#__PURE__*/_react["default"].createElement("div", {
145
144
  className: "".concat(prefix, "__content-item-desc-block"),
146
145
  style: {
147
- background: randomColor.contentBg
146
+ background: _constants.color[index].contentBg
148
147
  }
149
148
  }), /*#__PURE__*/_react["default"].createElement("div", {
150
149
  className: "".concat(prefix, "__content-item-desc-text")
151
150
  }, (0, _getLocale.getLocale)("Tasks_Tab_MyS_JobSummary")), /*#__PURE__*/_react["default"].createElement("div", {
152
151
  className: "".concat(prefix, "__content-item-desc-block"),
153
152
  style: {
154
- background: randomColor.contentBg
153
+ background: _constants.color[index].contentBg
155
154
  }
156
155
  }), /*#__PURE__*/_react["default"].createElement("div", {
157
156
  className: "".concat(prefix, "__content-item-desc-text")
158
157
  }, (0, _getLocale.getLocale)("Rep_Tab_Mys_NextWorkPlans")), /*#__PURE__*/_react["default"].createElement("div", {
159
158
  className: "".concat(prefix, "__content-item-desc-block"),
160
159
  style: {
161
- background: randomColor.contentBg
160
+ background: _constants.color[index].contentBg
162
161
  }
163
162
  })));
164
163
  })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.12.17-beta.5",
3
+ "version": "1.12.17-beta.8",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",