@titaui/pc 1.7.31 → 1.7.35
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/nav-top/components/user-message/components/inform/inform-item.js +12 -0
- package/lib/components/nav-top/components/user-message/constant.js +3 -2
- package/lib/components/nav-top/index.js +1 -4
- package/lib/components/nav-top/utils.js +16 -2
- package/lib/components/weekly-report/card.js +5 -2
- package/lib/components/weekly-report/index.js +1 -1
- package/package.json +1 -1
- package/src/components/nav-top/components/user-message/components/inform/inform-item.tsx +13 -0
- package/src/components/nav-top/components/user-message/constant.ts +1 -0
- package/src/components/nav-top/index.tsx +2 -3
- package/src/components/nav-top/utils.ts +7 -1
- package/src/components/weekly-report/card.tsx +2 -2
- package/src/components/weekly-report/index.tsx +1 -1
|
@@ -88,10 +88,13 @@ var Inform = function Inform(props) {
|
|
|
88
88
|
if (!isMessageMerging) {
|
|
89
89
|
if (messageType === _constant.informType.details) {
|
|
90
90
|
window.open("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#more/taskinfo?Id=").concat(item.objId), '_blank');
|
|
91
|
+
return;
|
|
91
92
|
} else if (item.objId && objType !== 8) {
|
|
92
93
|
window.open("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#work?work_id=").concat(item.objId));
|
|
94
|
+
return;
|
|
93
95
|
} else if (messageType === _constant.informType.todayJob) {
|
|
94
96
|
window.open("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#plan?tag_id=0&tag_type=0&filter=1"));
|
|
97
|
+
return;
|
|
95
98
|
} else if (messageType === _constant.informType.daily) {
|
|
96
99
|
var str = item.content.slice(0, 18);
|
|
97
100
|
var Year = str.slice(4, 8);
|
|
@@ -121,16 +124,24 @@ var Inform = function Inform(props) {
|
|
|
121
124
|
|
|
122
125
|
if (str.indexOf('日报') !== -1) {
|
|
123
126
|
window.open("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#/daily?to_user_id=").concat(_constant.userId, "&group_id=9&tag_type=1&date=").concat(Year, "/").concat(Month, "/").concat(Day, "&tag_id=").concat(parseInt(Month) + 1, "&dailyType=1"));
|
|
127
|
+
return;
|
|
124
128
|
} else if (str.indexOf('月报') !== -1) {
|
|
125
129
|
window.open("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#/daily?to_user_id=").concat(_constant.userId, "&group_id=9&tag_type=1&date=").concat(Year, "/").concat(Month, "/01&tag_id=").concat(parseInt(Month) + 1, "&dailyType=3"));
|
|
130
|
+
return;
|
|
126
131
|
} else {
|
|
127
132
|
window.open("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#/daily?to_user_id=").concat(_constant.userId, "&group_id=9&tag_type=1&date=").concat(Year, "/").concat(Month, "/").concat(parseInt(Week) * 7, "&tag_id=").concat(parseInt(Month) + 1, "&dailyType=2"));
|
|
133
|
+
return;
|
|
128
134
|
}
|
|
129
135
|
} else if (item.objUrl) {
|
|
130
136
|
window.open(item.objUrl);
|
|
137
|
+
return;
|
|
131
138
|
} else if (item.objType === _constant.informType.Okr) {
|
|
132
139
|
var url = item.content.match(/(http[s]?:\/\/([\w-]+.)+([:\d+])?(\/[\w-\.\/\?%&=]*))/g);
|
|
133
140
|
window.open(url, '_blank');
|
|
141
|
+
return;
|
|
142
|
+
} else if (item.objType === _constant.informType.okrRemind) {
|
|
143
|
+
window.open("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#/work?iTalentNavCode=tita-work&work_id=").concat(objId));
|
|
144
|
+
return;
|
|
134
145
|
} else {
|
|
135
146
|
var reg = /href='.*?(?=')/g;
|
|
136
147
|
var _url = '';
|
|
@@ -140,6 +151,7 @@ var Inform = function Inform(props) {
|
|
|
140
151
|
|
|
141
152
|
if (_url) {
|
|
142
153
|
window.open(_url, '_blank');
|
|
154
|
+
return;
|
|
143
155
|
}
|
|
144
156
|
}
|
|
145
157
|
}
|
|
@@ -27,8 +27,6 @@ var _utils = require("./utils");
|
|
|
27
27
|
|
|
28
28
|
require("./index.css");
|
|
29
29
|
|
|
30
|
-
var _logoWhite = _interopRequireDefault(require("./images/logo-white.png"));
|
|
31
|
-
|
|
32
30
|
var _request = require("../../utils/request");
|
|
33
31
|
|
|
34
32
|
var _toast = _interopRequireDefault(require("../toast"));
|
|
@@ -53,8 +51,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
53
51
|
|
|
54
52
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
55
53
|
|
|
56
|
-
var Logo = (0,
|
|
57
|
-
|
|
54
|
+
var Logo = (0, _utils.getLogo)();
|
|
58
55
|
var hasOKRApp = (0, _bsGlobal.getBSGlobal)("newNavigation").find(function (item) {
|
|
59
56
|
return item.appId === 113;
|
|
60
57
|
});
|
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getMenus = void 0;
|
|
6
|
+
exports.getMenus = exports.getLogo = void 0;
|
|
7
|
+
|
|
8
|
+
var _bsGlobal = require("../../utils/bs-global");
|
|
9
|
+
|
|
10
|
+
var _logoWhite = _interopRequireDefault(require("./images/logo-white.png"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
7
13
|
|
|
8
14
|
var getMenus = function getMenus() {
|
|
9
15
|
// @ts-ignore
|
|
@@ -14,4 +20,12 @@ var getMenus = function getMenus() {
|
|
|
14
20
|
return navs;
|
|
15
21
|
};
|
|
16
22
|
|
|
17
|
-
exports.getMenus = getMenus;
|
|
23
|
+
exports.getMenus = getMenus;
|
|
24
|
+
|
|
25
|
+
var getLogo = function getLogo() {
|
|
26
|
+
// 232637ab8a674427a1d6489329035d86_n 是老logo的路径,没法判断是否用户自定义过,所以只能这么硬核
|
|
27
|
+
var tenantInfo = (0, _bsGlobal.getTenantInfo)();
|
|
28
|
+
return tenantInfo.isNewIndex && /232637ab8a674427a1d6489329035d86_n/g.test(tenantInfo.Logo) ? _logoWhite["default"] : tenantInfo.Logo;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.getLogo = getLogo;
|
|
@@ -191,13 +191,16 @@ function Card(_ref, ref) {
|
|
|
191
191
|
src: require("./img/bofang.png")
|
|
192
192
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
193
193
|
className: preCls + "__avatar"
|
|
194
|
-
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
194
|
+
}, !!avatarSrc && /*#__PURE__*/_react["default"].createElement("img", {
|
|
195
195
|
src: avatarSrc
|
|
196
196
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
197
197
|
className: preCls + "__body"
|
|
198
198
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
199
199
|
className: preCls + "__userName",
|
|
200
|
-
src: nameSrc
|
|
200
|
+
src: nameSrc,
|
|
201
|
+
style: {
|
|
202
|
+
opacity: nameSrc ? 1 : 0
|
|
203
|
+
}
|
|
201
204
|
}), /*#__PURE__*/_react["default"].createElement("img", {
|
|
202
205
|
className: preCls + "__quote",
|
|
203
206
|
src: require("./img/quote.png"),
|
|
@@ -177,7 +177,7 @@ function WeeklyReportModal(_ref4) {
|
|
|
177
177
|
if (!visible) return;
|
|
178
178
|
var current = new Date();
|
|
179
179
|
var dateTimeTicks = current.getFullYear() + '/' + (current.getMonth() + 1) + '/' + current.getDate();
|
|
180
|
-
var param = "redisKey=".concat(redisKey ||
|
|
180
|
+
var param = "redisKey=".concat(redisKey || '', "&dateTimeTicks=").concat(dateTimeTicks || '');
|
|
181
181
|
|
|
182
182
|
if (data) {
|
|
183
183
|
setData(null);
|
package/package.json
CHANGED
|
@@ -48,10 +48,13 @@ const Inform = (props) => {
|
|
|
48
48
|
if (!isMessageMerging) {
|
|
49
49
|
if (messageType === informType.details) {
|
|
50
50
|
window.open(`${apiServer}/u/${userId}/Home#more/taskinfo?Id=${item.objId}`, '_blank');
|
|
51
|
+
return;
|
|
51
52
|
} else if (item.objId && objType !== 8) {
|
|
52
53
|
window.open(`${apiServer}/u/${userId}/Home#work?work_id=${item.objId}`);
|
|
54
|
+
return;
|
|
53
55
|
} else if (messageType === informType.todayJob) {
|
|
54
56
|
window.open(`${apiServer}/u/${userId}/Home#plan?tag_id=0&tag_type=0&filter=1`);
|
|
57
|
+
return;
|
|
55
58
|
} else if (messageType === informType.daily) {
|
|
56
59
|
const str = item.content.slice(0, 18);
|
|
57
60
|
const Year = str.slice(4, 8);
|
|
@@ -81,24 +84,32 @@ const Inform = (props) => {
|
|
|
81
84
|
Month
|
|
82
85
|
) + 1}&dailyType=1`
|
|
83
86
|
);
|
|
87
|
+
return;
|
|
84
88
|
} else if (str.indexOf('月报') !== -1) {
|
|
85
89
|
window.open(
|
|
86
90
|
`${apiServer}/u/${userId}/Home#/daily?to_user_id=${userId}&group_id=9&tag_type=1&date=${Year}/${Month}/01&tag_id=${parseInt(
|
|
87
91
|
Month
|
|
88
92
|
) + 1}&dailyType=3`
|
|
89
93
|
);
|
|
94
|
+
return;
|
|
90
95
|
} else {
|
|
91
96
|
window.open(
|
|
92
97
|
`${apiServer}/u/${userId}/Home#/daily?to_user_id=${userId}&group_id=9&tag_type=1&date=${Year}/${Month}/${parseInt(
|
|
93
98
|
Week
|
|
94
99
|
) * 7}&tag_id=${parseInt(Month) + 1}&dailyType=2`
|
|
95
100
|
);
|
|
101
|
+
return;
|
|
96
102
|
}
|
|
97
103
|
} else if (item.objUrl) {
|
|
98
104
|
window.open(item.objUrl);
|
|
105
|
+
return;
|
|
99
106
|
} else if (item.objType === informType.Okr) {
|
|
100
107
|
let url = item.content.match(/(http[s]?:\/\/([\w-]+.)+([:\d+])?(\/[\w-\.\/\?%&=]*))/g);
|
|
101
108
|
window.open(url, '_blank');
|
|
109
|
+
return;
|
|
110
|
+
} else if(item.objType === informType.okrRemind) {
|
|
111
|
+
window.open(`${apiServer}/u/${userId}/Home#/work?iTalentNavCode=tita-work&work_id=${objId}`);
|
|
112
|
+
return;
|
|
102
113
|
} else {
|
|
103
114
|
const reg = /href='.*?(?=')/g;
|
|
104
115
|
let url = '';
|
|
@@ -107,9 +118,11 @@ const Inform = (props) => {
|
|
|
107
118
|
})
|
|
108
119
|
if(url) {
|
|
109
120
|
window.open(url, '_blank');
|
|
121
|
+
return;
|
|
110
122
|
}
|
|
111
123
|
}
|
|
112
124
|
}
|
|
125
|
+
|
|
113
126
|
let type = 'eReport'; // E-周报提醒消息合并
|
|
114
127
|
if (messageType == '83') {
|
|
115
128
|
// 项目,目标进展提醒消息合并
|
|
@@ -6,12 +6,11 @@ import Menu from "./components/menu";
|
|
|
6
6
|
import Msg from "./components/user-message";
|
|
7
7
|
import Home from "./images/home.png";
|
|
8
8
|
import Version from "./components/version";
|
|
9
|
-
import { getMenus } from "./utils";
|
|
9
|
+
import { getLogo, getMenus } from "./utils";
|
|
10
10
|
import "./index.scss";
|
|
11
|
-
import defaultLogo from "./images/logo-white.png";
|
|
12
11
|
import { rpost } from "../../utils/request";
|
|
13
12
|
import Toast from "../toast";
|
|
14
|
-
const Logo =
|
|
13
|
+
const Logo = getLogo();
|
|
15
14
|
const hasOKRApp = getBSGlobal("newNavigation").find(
|
|
16
15
|
(item) => item.appId === 113
|
|
17
16
|
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { getTenantInfo } from "../../utils/bs-global";
|
|
2
2
|
import { INavType } from "./interface";
|
|
3
|
+
import defaultLogo from "./images/logo-white.png";
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
export const getMenus = () => {
|
|
@@ -11,3 +12,8 @@ export const getMenus = () => {
|
|
|
11
12
|
return navs;
|
|
12
13
|
}
|
|
13
14
|
|
|
15
|
+
export const getLogo = () => {
|
|
16
|
+
// 232637ab8a674427a1d6489329035d86_n 是老logo的路径,没法判断是否用户自定义过,所以只能这么硬核
|
|
17
|
+
const tenantInfo = getTenantInfo();
|
|
18
|
+
return tenantInfo.isNewIndex && /232637ab8a674427a1d6489329035d86_n/g.test(tenantInfo.Logo) ? defaultLogo : tenantInfo.Logo
|
|
19
|
+
}
|
|
@@ -117,11 +117,11 @@ function Card({data}: Props, ref): ReactElement {
|
|
|
117
117
|
<img className={preCls + "__laba"} src={require("./img/laba.png")} />
|
|
118
118
|
<img className={preCls + "__bofang"} src={require("./img/bofang.png")} />
|
|
119
119
|
<div className={preCls + "__avatar"}>
|
|
120
|
-
<img src={avatarSrc} />
|
|
120
|
+
{!!avatarSrc && <img src={avatarSrc} />}
|
|
121
121
|
</div>
|
|
122
122
|
<div className={preCls + "__body"}>
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
<img className={preCls + "__userName"} src={nameSrc} style={{opacity:nameSrc ? 1:0}}/>
|
|
125
125
|
<img
|
|
126
126
|
className={preCls + "__quote"}
|
|
127
127
|
src={require("./img/quote.png")}
|
|
@@ -79,7 +79,7 @@ function WeeklyReportModal({}: Props) {
|
|
|
79
79
|
if(!visible) return
|
|
80
80
|
const current = new Date()
|
|
81
81
|
const dateTimeTicks=(current.getFullYear()+'/'+(current.getMonth()+1)+'/'+current.getDate())
|
|
82
|
-
let param = `redisKey=${redisKey||
|
|
82
|
+
let param = `redisKey=${redisKey || ''}&dateTimeTicks=${dateTimeTicks||''}`
|
|
83
83
|
if(data) {
|
|
84
84
|
setData(null)
|
|
85
85
|
}
|