@titaui/pc 1.9.70 → 1.9.71

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.
@@ -40,12 +40,17 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
40
40
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
41
41
 
42
42
  var prefix = "titaui-dynamic-search-input";
43
- var SearchType = {
44
- dynamic: (0, _getLocale.getLocale)("Menu_Title_Feed"),
45
- person: (0, _getLocale.getLocale)("Mod_UserName")
43
+
44
+ var SearchType = function SearchType() {
45
+ return {
46
+ dynamic: (0, _getLocale.getLocale)("Menu_Title_Feed"),
47
+ person: (0, _getLocale.getLocale)("Mod_UserName")
48
+ };
46
49
  };
47
50
 
48
51
  var DynamicSearchInput = function DynamicSearchInput(_ref) {
52
+ var _SearchType;
53
+
49
54
  var setSearchKey = _ref.setSearchKey,
50
55
  setSearchKeyType = _ref.setSearchKeyType,
51
56
  setSearchUser = _ref.setSearchUser;
@@ -152,7 +157,7 @@ var DynamicSearchInput = function DynamicSearchInput(_ref) {
152
157
  }
153
158
  }, /*#__PURE__*/_react["default"].createElement("span", {
154
159
  className: "".concat(prefix, "__select-type")
155
- }, /*#__PURE__*/_react["default"].createElement("span", null, SearchType[searchDynamicType]), /*#__PURE__*/_react["default"].createElement("i", {
160
+ }, /*#__PURE__*/_react["default"].createElement("span", null, (_SearchType = SearchType()) === null || _SearchType === void 0 ? void 0 : _SearchType[searchDynamicType]), /*#__PURE__*/_react["default"].createElement("i", {
156
161
  className: (0, _classnames["default"])("tu-icon-sort-down", "".concat(prefix, "__icon"))
157
162
  }))), /*#__PURE__*/_react["default"].createElement("input", {
158
163
  className: "".concat(prefix, "__input"),
@@ -72,23 +72,27 @@ exports.EObjType = EObjType;
72
72
 
73
73
  var ObjTypeMapText = (_ObjTypeMapText = {}, _defineProperty(_ObjTypeMapText, EObjType.Project, (0, _getLocale.getLocale)("Menu_Title_Projects")), _defineProperty(_ObjTypeMapText, EObjType.Task, (0, _getLocale.getLocale)("Mod_Tasks")), _defineProperty(_ObjTypeMapText, EObjType.O, (0, _getLocale.getLocale)("Mod_Objective")), _defineProperty(_ObjTypeMapText, EObjType.Kr, (0, _getLocale.getLocale)("Mod_KeyResults")), _defineProperty(_ObjTypeMapText, EObjType.MileStone, (0, _getLocale.getLocale)("Pro_page_Plan_Milestone")), _defineProperty(_ObjTypeMapText, EObjType.KanBan, (0, _getLocale.getLocale)("Pro_page_V_Tab_Kanban")), _ObjTypeMapText);
74
74
  exports.ObjTypeMapText = ObjTypeMapText;
75
- var ObjectType = {
76
- 1: (0, _getLocale.getLocale)("Mod_sannouncement"),
77
- 4: (0, _getLocale.getLocale)("Menu_Title_Projects"),
78
- 5: (0, _getLocale.getLocale)("Mod_sPerformanceForm"),
79
- 6: (0, _getLocale.getLocale)("Mod_sPerformanceGoals"),
80
- 7: (0, _getLocale.getLocale)("Mod_stasks"),
81
- 8: (0, _getLocale.getLocale)("Mod_sDailySummary"),
82
- 10: (0, _getLocale.getLocale)("Feed_sFeed"),
83
- 11: (0, _getLocale.getLocale)("Pro_page_Plan"),
84
- 12: (0, _getLocale.getLocale)("Feed_OperationTasks"),
85
- 62: (0, _getLocale.getLocale)("Mod_sobjective"),
86
- 65: (0, _getLocale.getLocale)("Feed_Keyresults"),
87
- 70: (0, _getLocale.getLocale)("OKR_MyO_KRP_Review"),
88
- 79: (0, _getLocale.getLocale)("Mod_skeyprogress"),
89
- 80: (0, _getLocale.getLocale)("Feed_sAnnouncement"),
90
- 42: (0, _getLocale.getLocale)("OKR_MyO_E_Reward")
75
+
76
+ var ObjectType = function ObjectType() {
77
+ return {
78
+ 1: (0, _getLocale.getLocale)("Mod_sannouncement"),
79
+ 4: (0, _getLocale.getLocale)("Menu_Title_Projects"),
80
+ 5: (0, _getLocale.getLocale)("Mod_sPerformanceForm"),
81
+ 6: (0, _getLocale.getLocale)("Mod_sPerformanceGoals"),
82
+ 7: (0, _getLocale.getLocale)("Mod_stasks"),
83
+ 8: (0, _getLocale.getLocale)("Mod_sDailySummary"),
84
+ 10: (0, _getLocale.getLocale)("Feed_sFeed"),
85
+ 11: (0, _getLocale.getLocale)("Pro_page_Plan"),
86
+ 12: (0, _getLocale.getLocale)("Feed_OperationTasks"),
87
+ 62: (0, _getLocale.getLocale)("Mod_sobjective"),
88
+ 65: (0, _getLocale.getLocale)("Feed_Keyresults"),
89
+ 70: (0, _getLocale.getLocale)("OKR_MyO_KRP_Review"),
90
+ 79: (0, _getLocale.getLocale)("Mod_skeyprogress"),
91
+ 80: (0, _getLocale.getLocale)("Feed_sAnnouncement"),
92
+ 42: (0, _getLocale.getLocale)("OKR_MyO_E_Reward")
93
+ };
91
94
  };
95
+
92
96
  exports.ObjectType = ObjectType;
93
97
  var EStatusStatus2ClassType = {
94
98
  2: "tu-icon-finished",
@@ -43,6 +43,7 @@ var Item = function Item(_ref) {
43
43
  // window.open(url, "_blank");
44
44
  // };
45
45
 
46
+ var ObjectTypeText = (0, _constant.ObjectType)();
46
47
  return /*#__PURE__*/_react["default"].createElement("div", {
47
48
  className: "".concat(preCls)
48
49
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -64,7 +65,7 @@ var Item = function Item(_ref) {
64
65
  text: /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("Feed_Kudos"), /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
65
66
  id: toUserId,
66
67
  name: toUserName
67
- }), "".concat(_constant.ObjectType[pariseObjType] || "feed")),
68
+ }), "".concat(ObjectTypeText[pariseObjType] || "feed")),
68
69
  maxWidth: 150
69
70
  }))), /*#__PURE__*/_react["default"].createElement("div", {
70
71
  className: "".concat(preCls, "-center-time")
@@ -107,7 +107,7 @@ function OkrCaseCard(props) {
107
107
 
108
108
  window.titaTracker // @ts-ignore
109
109
  && window.titaTracker("action").record({
110
- action: (0, _getLocale.getLocale)("Per_Ass_Pop_button_Apply"),
110
+ action: '套用',
111
111
  actionGroup: (0, _getLocale.getLocale)("OKR_OKRex_Casebase"),
112
112
  productName: (0, _getLocale.getLocale)("OKR_OKRex_Casebase")
113
113
  });
@@ -205,6 +205,10 @@ var NewOkrList = function NewOkrList(props) {
205
205
  params.Searchpage = 2;
206
206
  }
207
207
 
208
+ if (departmentId !== 0) {
209
+ params.keyWords = '';
210
+ }
211
+
208
212
  var request;
209
213
 
210
214
  if (!relation) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.9.70",
3
+ "version": "1.9.71",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "src/index.js",
@@ -8,10 +8,12 @@ import "./index.scss";
8
8
 
9
9
  const prefix = "titaui-dynamic-search-input";
10
10
 
11
- const SearchType = {
12
- dynamic: getLocale("Menu_Title_Feed"),
13
- person: getLocale("Mod_UserName"),
14
- };
11
+ const SearchType = () => {
12
+ return {
13
+ dynamic: getLocale("Menu_Title_Feed"),
14
+ person: getLocale("Mod_UserName"),
15
+ }
16
+ }
15
17
 
16
18
  const DynamicSearchInput: FC<IDynamicSearchInputProps> = ({
17
19
  setSearchKey,
@@ -114,7 +116,7 @@ const DynamicSearchInput: FC<IDynamicSearchInputProps> = ({
114
116
  }}
115
117
  >
116
118
  <span className={`${prefix}__select-type`}>
117
- <span>{SearchType[searchDynamicType]}</span>
119
+ <span>{SearchType()?.[searchDynamicType]}</span>
118
120
  <i className={classNames("tu-icon-sort-down", `${prefix}__icon`)} />
119
121
  </span>
120
122
  </Popup>
@@ -55,23 +55,25 @@ export const ObjTypeMapText = {
55
55
  [EObjType.KanBan]: getLocale("Pro_page_V_Tab_Kanban"),
56
56
  };
57
57
 
58
- export const ObjectType = {
59
- 1: getLocale("Mod_sannouncement"),
60
- 4: getLocale("Menu_Title_Projects"),
61
- 5: getLocale("Mod_sPerformanceForm"),
62
- 6: getLocale("Mod_sPerformanceGoals"),
63
- 7: getLocale("Mod_stasks"),
64
- 8: getLocale("Mod_sDailySummary"),
65
- 10: getLocale("Feed_sFeed"),
66
- 11: getLocale("Pro_page_Plan"),
67
- 12: getLocale("Feed_OperationTasks"),
68
- 62: getLocale("Mod_sobjective"),
69
- 65: getLocale("Feed_Keyresults"),
70
- 70: getLocale("OKR_MyO_KRP_Review"),
71
- 79: getLocale("Mod_skeyprogress"),
72
- 80: getLocale("Feed_sAnnouncement"),
73
- 42: getLocale("OKR_MyO_E_Reward"),
74
- };
58
+ export const ObjectType = () => {
59
+ return {
60
+ 1: getLocale("Mod_sannouncement"),
61
+ 4: getLocale("Menu_Title_Projects"),
62
+ 5: getLocale("Mod_sPerformanceForm"),
63
+ 6: getLocale("Mod_sPerformanceGoals"),
64
+ 7: getLocale("Mod_stasks"),
65
+ 8: getLocale("Mod_sDailySummary"),
66
+ 10: getLocale("Feed_sFeed"),
67
+ 11: getLocale("Pro_page_Plan"),
68
+ 12: getLocale("Feed_OperationTasks"),
69
+ 62: getLocale("Mod_sobjective"),
70
+ 65: getLocale("Feed_Keyresults"),
71
+ 70: getLocale("OKR_MyO_KRP_Review"),
72
+ 79: getLocale("Mod_skeyprogress"),
73
+ 80: getLocale("Feed_sAnnouncement"),
74
+ 42: getLocale("OKR_MyO_E_Reward"),
75
+ };
76
+ }
75
77
 
76
78
  export const EStatusStatus2ClassType = {
77
79
  2: "tu-icon-finished",
@@ -28,6 +28,7 @@ const Item: FC<any> = ({ userInfo }) => {
28
28
  // const handleOpenUserPage = () => {
29
29
  // window.open(url, "_blank");
30
30
  // };
31
+ const ObjectTypeText = ObjectType();
31
32
  return (
32
33
  <div className={`${preCls}`}>
33
34
  <div className={`${preCls}-center`}>
@@ -47,7 +48,7 @@ const Item: FC<any> = ({ userInfo }) => {
47
48
  <span>
48
49
  {getLocale("Feed_Kudos")}
49
50
  <OpenUserName id={toUserId} name={toUserName} />
50
- {`${ObjectType[pariseObjType] || "feed"}`}
51
+ {`${ObjectTypeText[pariseObjType] || "feed"}`}
51
52
  </span>
52
53
  )}
53
54
  maxWidth={150}
@@ -70,7 +70,7 @@ function OkrCaseCard(props: Props) {
70
70
  window.titaTracker
71
71
  // @ts-ignore
72
72
  && window.titaTracker("action").record({
73
- action: getLocale("Per_Ass_Pop_button_Apply"),
73
+ action: '套用',
74
74
  actionGroup: getLocale("OKR_OKRex_Casebase"),
75
75
  productName: getLocale("OKR_OKRex_Casebase"),
76
76
  });
@@ -120,6 +120,9 @@ const NewOkrList: FC<any> = (props: {
120
120
  params.showOkrE = 1;
121
121
  params.Searchpage = 2;
122
122
  }
123
+ if(departmentId !== 0) {
124
+ params.keyWords = ''
125
+ }
123
126
  let request;
124
127
 
125
128
  if (!relation) {